tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV; 
tun_setup.mode_mask =  T_ANALOG_TV | T_DIGITAL_TV; 
void __devinit bttv_init_card2(struct bttv *btv){	int tda9887;	int addr=ADDR_UNSET;        btv->tuner_type = -1;	if (BTTV_BOARD_UNKNOWN == btv->c.type) {		bttv_readee(btv,eeprom_data,0xa0);		identify_by_eeprom(btv,eeprom_data);	}	switch (btv->c.type) {	case BTTV_BOARD_MIRO:	case BTTV_BOARD_MIROPRO:	case BTTV_BOARD_PINNACLE:	case BTTV_BOARD_PINNACLEPRO:		/* miro/pinnacle */		miro_pinnacle_gpio(btv);		break;	case BTTV_BOARD_FLYVIDEO_98:	case BTTV_BOARD_MAXI:	case BTTV_BOARD_LIFE_FLYKIT:	case BTTV_BOARD_FLYVIDEO:	case BTTV_BOARD_TYPHOON_TVIEW:	case BTTV_BOARD_CHRONOS_VS2:	case BTTV_BOARD_FLYVIDEO_98FM:	case BTTV_BOARD_FLYVIDEO2000:	case BTTV_BOARD_FLYVIDEO98EZ:	case BTTV_BOARD_CONFERENCETV:	case BTTV_BOARD_LIFETEC_9415:		flyvideo_gpio(btv);		break;	case BTTV_BOARD_HAUPPAUGE:	case BTTV_BOARD_HAUPPAUGE878:	case BTTV_BOARD_HAUPPAUGEPVR:		/* pick up some config infos from the eeprom */		bttv_readee(btv,eeprom_data,0xa0);                hauppauge_eeprom(btv);		break;	case BTTV_BOARD_AVERMEDIA98:	case BTTV_BOARD_AVPHONE98:		bttv_readee(btv,eeprom_data,0xa0);		avermedia_eeprom(btv);		break;	case BTTV_BOARD_PXC200:		init_PXC200(btv);		break;	case BTTV_BOARD_PICOLO_TETRA_CHIP:		picolo_tetra_init(btv);		break;	case BTTV_BOARD_VHX:		btv->has_radio    = 1;		btv->has_matchbox = 1;		btv->mbox_we      = 0x20;		btv->mbox_most    = 0;		btv->mbox_clk     = 0x08;		btv->mbox_data    = 0x10;		btv->mbox_mask    = 0x38;		break;	case BTTV_BOARD_VOBIS_BOOSTAR:	case BTTV_BOARD_TERRATV:		terratec_active_radio_upgrade(btv);		break;	case BTTV_BOARD_MAGICTVIEW061:		if (btv->cardid == 0x3002144f) {			btv->has_radio=1;			printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);		}		break;       case BTTV_BOARD_STB2:                if (btv->cardid == 0x3060121a) {			/* Fix up entry for 3DFX VoodooTV 100,			   which is an OEM STB card variant. */			btv->has_radio=0;			btv->tuner_type=TUNER_TEMIC_NTSC;		}		break;	case BTTV_BOARD_OSPREY1x0:	case BTTV_BOARD_OSPREY1x0_848:	case BTTV_BOARD_OSPREY101_848:	case BTTV_BOARD_OSPREY1x1:	case BTTV_BOARD_OSPREY1x1_SVID:	case BTTV_BOARD_OSPREY2xx:	case BTTV_BOARD_OSPREY2x0_SVID:	case BTTV_BOARD_OSPREY2x0:	case BTTV_BOARD_OSPREY500:	case BTTV_BOARD_OSPREY540:	case BTTV_BOARD_OSPREY2000:		bttv_readee(btv,eeprom_data,0xa0);                osprey_eeprom(btv);		break;	case BTTV_BOARD_IDS_EAGLE:		init_ids_eagle(btv);		break;	case BTTV_BOARD_MODTEC_205:		bttv_readee(btv,eeprom_data,0xa0);		modtec_eeprom(btv);		break;	case BTTV_BOARD_LMLBT4:		init_lmlbt4x(btv);		break;	case BTTV_BOARD_TIBET_CS16:		tibetCS16_init(btv);		break;	case BTTV_BOARD_KODICOM_4400R:		kodicom4400r_init(btv);		break;	}	/* pll configuration */        if (!(btv->id==848 && btv->revision==0x11)) {		/* defaults from card list */		if (PLL_28 == bttv_tvcards[btv->c.type].pll) {			btv->pll.pll_ifreq=28636363;			btv->pll.pll_crystal=BT848_IFORM_XT0;		}		if (PLL_35 == bttv_tvcards[btv->c.type].pll) {			btv->pll.pll_ifreq=35468950;			btv->pll.pll_crystal=BT848_IFORM_XT1;		}		/* insmod options can override */                switch (pll[btv->c.nr]) {                case 0: /* none */			btv->pll.pll_crystal = 0;			btv->pll.pll_ifreq   = 0;			btv->pll.pll_ofreq   = 0;                        break;                case 1: /* 28 MHz */		case 28:                        btv->pll.pll_ifreq   = 28636363;			btv->pll.pll_ofreq   = 0;                        btv->pll.pll_crystal = BT848_IFORM_XT0;                        break;                case 2: /* 35 MHz */		case 35:                        btv->pll.pll_ifreq   = 35468950;			btv->pll.pll_ofreq   = 0;                        btv->pll.pll_crystal = BT848_IFORM_XT1;                        break;                }        }	btv->pll.pll_current = -1;	/* tuner configuration (from card list / autodetect / insmod option) */	if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)		addr = bttv_tvcards[btv->c.type].tuner_addr;	if (UNSET != bttv_tvcards[btv->c.type].tuner_type)		if(UNSET == btv->tuner_type)        	       	btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;	if (UNSET != tuner[btv->c.nr])		btv->tuner_type = tuner[btv->c.nr];	printk("bttv%d: using tuner=%d\n",btv->c.nr,btv->tuner_type);	if (btv->pinnacle_id != UNSET)		bttv_call_i2c_clients(btv, AUDC_CONFIG_PINNACLE,				      &btv->pinnacle_id);	if (btv->tuner_type != UNSET) {	        struct tuner_setup tun_setup;	        tun_setup.mode_mask = T_RADIO | T_ANALOG_TV | T_DIGITAL_TV;		tun_setup.type = btv->tuner_type;		tun_setup.addr = addr;		bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup);	}	btv->svhs = bttv_tvcards[btv->c.type].svhs;	if (svhs[btv->c.nr] != UNSET)		btv->svhs = svhs[btv->c.nr];	if (remote[btv->c.nr] != UNSET)		btv->has_remote = remote[btv->c.nr];	if (bttv_tvcards[btv->c.type].has_radio)		btv->has_radio=1;	if (bttv_tvcards[btv->c.type].has_remote)		btv->has_remote=1;	if (!bttv_tvcards[btv->c.type].no_gpioirq)		btv->gpioirq=1;	if (bttv_tvcards[btv->c.type].audio_hook)		btv->audio_hook=bttv_tvcards[btv->c.type].audio_hook;	if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {		/* detect Bt832 chip for quartzsight digital camera */		if ((bttv_I2CRead(btv, I2C_BT832_ALT1, "Bt832") >=0) ||		    (bttv_I2CRead(btv, I2C_BT832_ALT2, "Bt832") >=0))			boot_bt832(btv);	}	if (!autoload)		return;	/* try to detect audio/fader chips */	if (!bttv_tvcards[btv->c.type].no_msp34xx &&	    bttv_I2CRead(btv, I2C_MSP3400, "MSP34xx") >=0)		request_module("msp3400");	if (bttv_tvcards[btv->c.type].msp34xx_alt &&	    bttv_I2CRead(btv, I2C_MSP3400_ALT, "MSP34xx (alternate address)") >=0)		request_module("msp3400");	if (!bttv_tvcards[btv->c.type].no_tda9875 &&	    bttv_I2CRead(btv, I2C_TDA9875, "TDA9875") >=0)		request_module("tda9875");	if (!bttv_tvcards[btv->c.type].no_tda7432 &&	    bttv_I2CRead(btv, I2C_TDA7432, "TDA7432") >=0)		request_module("tda7432");	if (bttv_tvcards[btv->c.type].needs_tvaudio)		request_module("tvaudio");	/* tuner modules */	tda9887 = 0;	if (btv->pinnacle_id != UNSET)		tda9887 = 1;	if (0 == tda9887 && 0 == bttv_tvcards[btv->c.type].has_dvb &&	    bttv_I2CRead(btv, I2C_TDA9887, "TDA9887") >=0)		tda9887 = 1;	if((btv->tuner_type == TUNER_PHILIPS_FM1216ME_MK3) ||	   (btv->tuner_type == TUNER_PHILIPS_FM1236_MK3) ||	   (btv->tuner_type == TUNER_PHILIPS_FM1256_IH3) ||	    tda9887)		request_module("tda9887");	if (btv->tuner_type != UNSET)		request_module("tuner");}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/10c2c8b18a9cd29fc3f5faa5ad8e825dcc8b58e6/bttv-cards.c/clean/drivers/media/video/bttv-cards.c