case TDA10046_AGC_IFO_AUTO_POS: tda1004x_write_byteI(state, TDA10046H_AGC_CONF, 0x0a); tda1004x_write_byteI(state, TDA10046H_CONF_POLARITY, 0x00); break; case TDA10046_AGC_TDA827X: tda1004x_write_byteI(state, TDA10046H_AGC_CONF, 0x02); tda1004x_write_byteI(state, TDA10046H_AGC_THR, 0x70); tda1004x_write_byteI(state, TDA10046H_AGC_RENORM, 0x0E); tda1004x_write_byteI(state, TDA10046H_CONF_POLARITY, 0x60); break; 
static int tda10046_init(struct dvb_frontend* fe){	struct tda1004x_state* state = fe->demodulator_priv;	dprintk("%s\n", __FUNCTION__);	if (state->initialised)		return 0;	if (tda10046_fwupload(fe)) {		printk("tda1004x: firmware upload failed\n");			return -EIO;	}	// Init the tuner PLL	if (state->config->pll_init) {		tda1004x_enable_tuner_i2c(state);		state->config->pll_init(fe);		tda1004x_disable_tuner_i2c(state);	}	// tda setup	tda1004x_write_mask(state, TDA1004X_CONFC4, 0x20, 0); // disable DSP watchdog timer	tda1004x_write_byteI(state, TDA1004X_AUTO, 7); // select HP stream	tda1004x_write_byteI(state, TDA1004X_CONFC1, 8); // disable pulse killer	tda10046_init_plls(fe);	switch (state->config->agc_config) {	case TDA10046_AGC_DEFAULT:		tda1004x_write_byteI(state, TDA10046H_AGC_CONF, 0x00); // AGC setup		tda1004x_write_byteI(state, TDA10046H_CONF_POLARITY, 0x60); // set AGC polarities		break;	case TDA10046_AGC_IFO_AUTO_NEG:		tda1004x_write_byteI(state, TDA10046H_AGC_CONF, 0x0a); // AGC setup		tda1004x_write_byteI(state, TDA10046H_CONF_POLARITY, 0x60); // set AGC polarities		break;	}	tda1004x_write_byteI(state, TDA10046H_CONF_TRISTATE1, 0x61); // Turn both AGC outputs on	tda1004x_write_byteI(state, TDA10046H_AGC_TUN_MIN, 0);	  // }	tda1004x_write_byteI(state, TDA10046H_AGC_TUN_MAX, 0xff); // } AGC min/max values	tda1004x_write_byteI(state, TDA10046H_AGC_IF_MIN, 0);	  // }	tda1004x_write_byteI(state, TDA10046H_AGC_IF_MAX, 0xff);  // }	tda1004x_write_byteI(state, TDA10046H_AGC_GAINS, 1); // IF gain 2, TUN gain 1	tda1004x_write_byteI(state, TDA10046H_CVBER_CTRL, 0x1a); // 10^6 VBER measurement bits	tda1004x_write_byteI(state, TDA1004X_CONF_TS1, 7); // MPEG2 interface config	tda1004x_write_byteI(state, TDA1004X_CONF_TS2, 0xc0); // MPEG2 interface config	tda1004x_write_mask(state, 0x3a, 0x80, state->config->invert_oclk << 7);	tda1004x_write_byteI(state, TDA10046H_CONF_TRISTATE2, 0xe1); // tristate setup	tda1004x_write_byteI(state, TDA10046H_GPIO_OUT_SEL, 0xcc); // GPIO output config	tda1004x_write_byteI(state, TDA10046H_GPIO_SELECT, 8); // GPIO select	state->initialised = 1;	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/f03cbea36ab9412dcea58e953be4933b36c9b7be/tda1004x.c/clean/drivers/media/dvb/frontends/tda1004x.c