btv                15 drivers/media/pci/bt8xx/bttv-audio-hook.c void winview_volume(struct bttv *btv, __u16 volume)
btv                55 drivers/media/pci/bt8xx/bttv-audio-hook.c void gvbctv3pci_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv                86 drivers/media/pci/bt8xx/bttv-audio-hook.c void gvbctv5pci_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv                90 drivers/media/pci/bt8xx/bttv-audio-hook.c 	if (btv->radio_user)
btv               109 drivers/media/pci/bt8xx/bttv-audio-hook.c 				bttv_gpio_tracking(btv, "gvbctv5pci");
btv               157 drivers/media/pci/bt8xx/bttv-audio-hook.c void avermedia_tvphone_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               184 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "avermedia");
btv               188 drivers/media/pci/bt8xx/bttv-audio-hook.c void avermedia_tv_stereo_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               216 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "avermedia");
btv               221 drivers/media/pci/bt8xx/bttv-audio-hook.c void lt9415_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               255 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "lt9415");
btv               259 drivers/media/pci/bt8xx/bttv-audio-hook.c void terratv_audio(struct bttv *btv,  struct v4l2_tuner *t, int set)
btv               288 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "terratv");
btv               292 drivers/media/pci/bt8xx/bttv-audio-hook.c void winfast2000_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               325 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "winfast2000");
btv               336 drivers/media/pci/bt8xx/bttv-audio-hook.c void pvbt878p9b_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               340 drivers/media/pci/bt8xx/bttv-audio-hook.c 	if (btv->radio_user)
btv               369 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "pvbt878p9b");
btv               377 drivers/media/pci/bt8xx/bttv-audio-hook.c void fv2000s_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               381 drivers/media/pci/bt8xx/bttv-audio-hook.c 	if (btv->radio_user)
btv               409 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "fv2000s");
btv               416 drivers/media/pci/bt8xx/bttv-audio-hook.c void windvr_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               444 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "windvr");
btv               451 drivers/media/pci/bt8xx/bttv-audio-hook.c void adtvk503_audio(struct bttv *btv, struct v4l2_tuner *t, int set)
btv               488 drivers/media/pci/bt8xx/bttv-audio-hook.c 		bttv_gpio_tracking(btv, "adtvk503");
btv                12 drivers/media/pci/bt8xx/bttv-audio-hook.h void winview_volume (struct bttv *btv, __u16 volume);
btv                14 drivers/media/pci/bt8xx/bttv-audio-hook.h void lt9415_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                15 drivers/media/pci/bt8xx/bttv-audio-hook.h void avermedia_tvphone_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                16 drivers/media/pci/bt8xx/bttv-audio-hook.h void avermedia_tv_stereo_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                17 drivers/media/pci/bt8xx/bttv-audio-hook.h void terratv_audio(struct bttv *btv,  struct v4l2_tuner *tuner, int set);
btv                18 drivers/media/pci/bt8xx/bttv-audio-hook.h void gvbctv3pci_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                19 drivers/media/pci/bt8xx/bttv-audio-hook.h void gvbctv5pci_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                20 drivers/media/pci/bt8xx/bttv-audio-hook.h void winfast2000_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                21 drivers/media/pci/bt8xx/bttv-audio-hook.h void pvbt878p9b_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                22 drivers/media/pci/bt8xx/bttv-audio-hook.h void fv2000s_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                23 drivers/media/pci/bt8xx/bttv-audio-hook.h void windvr_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                24 drivers/media/pci/bt8xx/bttv-audio-hook.h void adtvk503_audio(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv                36 drivers/media/pci/bt8xx/bttv-cards.c static void boot_msp34xx(struct bttv *btv, int pin);
btv                37 drivers/media/pci/bt8xx/bttv-cards.c static void hauppauge_eeprom(struct bttv *btv);
btv                38 drivers/media/pci/bt8xx/bttv-cards.c static void avermedia_eeprom(struct bttv *btv);
btv                39 drivers/media/pci/bt8xx/bttv-cards.c static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
btv                40 drivers/media/pci/bt8xx/bttv-cards.c static void modtec_eeprom(struct bttv *btv);
btv                41 drivers/media/pci/bt8xx/bttv-cards.c static void init_PXC200(struct bttv *btv);
btv                42 drivers/media/pci/bt8xx/bttv-cards.c static void init_RTV24(struct bttv *btv);
btv                43 drivers/media/pci/bt8xx/bttv-cards.c static void init_PCI8604PW(struct bttv *btv);
btv                45 drivers/media/pci/bt8xx/bttv-cards.c static void rv605_muxsel(struct bttv *btv, unsigned int input);
btv                46 drivers/media/pci/bt8xx/bttv-cards.c static void eagle_muxsel(struct bttv *btv, unsigned int input);
btv                47 drivers/media/pci/bt8xx/bttv-cards.c static void xguard_muxsel(struct bttv *btv, unsigned int input);
btv                48 drivers/media/pci/bt8xx/bttv-cards.c static void ivc120_muxsel(struct bttv *btv, unsigned int input);
btv                49 drivers/media/pci/bt8xx/bttv-cards.c static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
btv                51 drivers/media/pci/bt8xx/bttv-cards.c static void PXC200_muxsel(struct bttv *btv, unsigned int input);
btv                53 drivers/media/pci/bt8xx/bttv-cards.c static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
btv                54 drivers/media/pci/bt8xx/bttv-cards.c static void picolo_tetra_init(struct bttv *btv);
btv                56 drivers/media/pci/bt8xx/bttv-cards.c static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
btv                57 drivers/media/pci/bt8xx/bttv-cards.c static void tibetCS16_init(struct bttv *btv);
btv                59 drivers/media/pci/bt8xx/bttv-cards.c static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
btv                60 drivers/media/pci/bt8xx/bttv-cards.c static void kodicom4400r_init(struct bttv *btv);
btv                62 drivers/media/pci/bt8xx/bttv-cards.c static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
btv                63 drivers/media/pci/bt8xx/bttv-cards.c static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
btv                65 drivers/media/pci/bt8xx/bttv-cards.c static void geovision_muxsel(struct bttv *btv, unsigned int input);
btv                67 drivers/media/pci/bt8xx/bttv-cards.c static void phytec_muxsel(struct bttv *btv, unsigned int input);
btv                69 drivers/media/pci/bt8xx/bttv-cards.c static void gv800s_muxsel(struct bttv *btv, unsigned int input);
btv                70 drivers/media/pci/bt8xx/bttv-cards.c static void gv800s_init(struct bttv *btv);
btv                72 drivers/media/pci/bt8xx/bttv-cards.c static void td3116_muxsel(struct bttv *btv, unsigned int input);
btv                74 drivers/media/pci/bt8xx/bttv-cards.c static int terratec_active_radio_upgrade(struct bttv *btv);
btv                75 drivers/media/pci/bt8xx/bttv-cards.c static int tea575x_init(struct bttv *btv);
btv                76 drivers/media/pci/bt8xx/bttv-cards.c static void identify_by_eeprom(struct bttv *btv,
btv                78 drivers/media/pci/bt8xx/bttv-cards.c static int pvr_boot(struct bttv *btv);
btv              2893 drivers/media/pci/bt8xx/bttv-cards.c void bttv_idcard(struct bttv *btv)
btv              2899 drivers/media/pci/bt8xx/bttv-cards.c 	btv->cardid  = btv->c.pci->subsystem_device << 16;
btv              2900 drivers/media/pci/bt8xx/bttv-cards.c 	btv->cardid |= btv->c.pci->subsystem_vendor;
btv              2902 drivers/media/pci/bt8xx/bttv-cards.c 	if (0 != btv->cardid && 0xffffffff != btv->cardid) {
btv              2905 drivers/media/pci/bt8xx/bttv-cards.c 			if (cards[i].id  == btv->cardid)
btv              2911 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.nr, cards[type].name, cards[type].cardnr,
btv              2912 drivers/media/pci/bt8xx/bttv-cards.c 				btv->cardid & 0xffff,
btv              2913 drivers/media/pci/bt8xx/bttv-cards.c 				(btv->cardid >> 16) & 0xffff);
btv              2914 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.type = cards[type].cardnr;
btv              2918 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.nr, btv->cardid & 0xffff,
btv              2919 drivers/media/pci/bt8xx/bttv-cards.c 				(btv->cardid >> 16) & 0xffff);
btv              2925 drivers/media/pci/bt8xx/bttv-cards.c 	if (card[btv->c.nr] < bttv_num_tvcards)
btv              2926 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.type=card[btv->c.nr];
btv              2930 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type,
btv              2931 drivers/media/pci/bt8xx/bttv-cards.c 		card[btv->c.nr] < bttv_num_tvcards
btv              2941 drivers/media/pci/bt8xx/bttv-cards.c 			bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
btv              2947 drivers/media/pci/bt8xx/bttv-cards.c 			bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
btv              2950 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
btv              2952 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, bttv_tvcards[btv->c.type].gpiomask);
btv              2955 drivers/media/pci/bt8xx/bttv-cards.c 			i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
btv              2965 drivers/media/pci/bt8xx/bttv-cards.c static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
btv              2977 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.type = type;
btv              2979 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
btv              2983 drivers/media/pci/bt8xx/bttv-cards.c static void flyvideo_gpio(struct bttv *btv)
btv              3023 drivers/media/pci/bt8xx/bttv-cards.c 		pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr);
btv              3041 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, has_radio ? "yes" : "no",
btv              3044 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, is_lr90 ? "yes" : "no",
btv              3049 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type = tuner_type;
btv              3050 drivers/media/pci/bt8xx/bttv-cards.c 	btv->has_radio = has_radio;
btv              3056 drivers/media/pci/bt8xx/bttv-cards.c 		btv->audio_mode_gpio = lt9415_audio;
btv              3065 drivers/media/pci/bt8xx/bttv-cards.c static void miro_pinnacle_gpio(struct bttv *btv)
btv              3073 drivers/media/pci/bt8xx/bttv-cards.c 	msp  = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
btv              3075 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type = miro_tunermap[id];
btv              3077 drivers/media/pci/bt8xx/bttv-cards.c 			btv->has_radio = 1;
btv              3079 drivers/media/pci/bt8xx/bttv-cards.c 				btv->has_tea575x = 1;
btv              3080 drivers/media/pci/bt8xx/bttv-cards.c 				btv->tea_gpio.wren = 6;
btv              3081 drivers/media/pci/bt8xx/bttv-cards.c 				btv->tea_gpio.most = 7;
btv              3082 drivers/media/pci/bt8xx/bttv-cards.c 				btv->tea_gpio.clk  = 8;
btv              3083 drivers/media/pci/bt8xx/bttv-cards.c 				btv->tea_gpio.data = 9;
btv              3084 drivers/media/pci/bt8xx/bttv-cards.c 				tea575x_init(btv);
btv              3087 drivers/media/pci/bt8xx/bttv-cards.c 			btv->has_radio = 0;
btv              3090 drivers/media/pci/bt8xx/bttv-cards.c 			if (btv->c.type == BTTV_BOARD_MIRO)
btv              3091 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.type = BTTV_BOARD_MIROPRO;
btv              3092 drivers/media/pci/bt8xx/bttv-cards.c 			if (btv->c.type == BTTV_BOARD_PINNACLE)
btv              3093 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.type = BTTV_BOARD_PINNACLEPRO;
btv              3096 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, id+1, btv->tuner_type,
btv              3097 drivers/media/pci/bt8xx/bttv-cards.c 			!btv->has_radio ? "no" :
btv              3098 drivers/media/pci/bt8xx/bttv-cards.c 			(btv->has_tea575x ? "tea575x" : "fmtuner"),
btv              3103 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_radio = 0;
btv              3107 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tda9887_conf = TDA9887_INTERCARRIER;
btv              3111 drivers/media/pci/bt8xx/bttv-cards.c 			btv->has_radio = 1;
btv              3112 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tda9887_conf = TDA9887_QSS;
btv              3116 drivers/media/pci/bt8xx/bttv-cards.c 			btv->has_radio = 1;
btv              3117 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tda9887_conf = TDA9887_QSS;
btv              3121 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tda9887_conf = TDA9887_QSS;
btv              3125 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tda9887_conf = TDA9887_INTERCARRIER;
btv              3129 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tda9887_conf = TDA9887_INTERCARRIER;
btv              3133 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tda9887_conf = TDA9887_INTERCARRIER;
btv              3140 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.type = BTTV_BOARD_PINNACLEPRO;
btv              3142 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
btv              3143 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type = TUNER_MT2032;
btv              3150 drivers/media/pci/bt8xx/bttv-cards.c static void init_ids_eagle(struct bttv *btv)
btv              3168 drivers/media/pci/bt8xx/bttv-cards.c static void eagle_muxsel(struct bttv *btv, unsigned int input)
btv              3183 drivers/media/pci/bt8xx/bttv-cards.c static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
btv              3202 drivers/media/pci/bt8xx/bttv-cards.c static void init_lmlbt4x(struct bttv *btv)
btv              3210 drivers/media/pci/bt8xx/bttv-cards.c static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
btv              3217 drivers/media/pci/bt8xx/bttv-cards.c static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
btv              3224 drivers/media/pci/bt8xx/bttv-cards.c static void geovision_muxsel(struct bttv *btv, unsigned int input)
btv              3241 drivers/media/pci/bt8xx/bttv-cards.c static void td3116_latch_value(struct bttv *btv, u32 value)
btv              3249 drivers/media/pci/bt8xx/bttv-cards.c static void td3116_muxsel(struct bttv *btv, unsigned int input)
btv              3259 drivers/media/pci/bt8xx/bttv-cards.c 	td3116_latch_value(btv, value);
btv              3264 drivers/media/pci/bt8xx/bttv-cards.c 	td3116_latch_value(btv, value);
btv              3269 drivers/media/pci/bt8xx/bttv-cards.c static void bttv_reset_audio(struct bttv *btv)
btv              3280 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->id != 878)
btv              3284 drivers/media/pci/bt8xx/bttv-cards.c 		pr_debug("%d: BT878A ARESET\n", btv->c.nr);
btv              3291 drivers/media/pci/bt8xx/bttv-cards.c void bttv_init_card1(struct bttv *btv)
btv              3293 drivers/media/pci/bt8xx/bttv-cards.c 	switch (btv->c.type) {
btv              3296 drivers/media/pci/bt8xx/bttv-cards.c 		boot_msp34xx(btv,5);
btv              3300 drivers/media/pci/bt8xx/bttv-cards.c 		boot_msp34xx(btv,20);
btv              3303 drivers/media/pci/bt8xx/bttv-cards.c 		boot_msp34xx(btv,11);
btv              3306 drivers/media/pci/bt8xx/bttv-cards.c 		pvr_boot(btv);
btv              3311 drivers/media/pci/bt8xx/bttv-cards.c 		btv->use_i2c_hw = 1;
btv              3314 drivers/media/pci/bt8xx/bttv-cards.c 		init_RTV24( btv );
btv              3317 drivers/media/pci/bt8xx/bttv-cards.c 		init_PCI8604PW(btv);
btv              3321 drivers/media/pci/bt8xx/bttv-cards.c 	if (!bttv_tvcards[btv->c.type].has_dvb)
btv              3322 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_reset_audio(btv);
btv              3326 drivers/media/pci/bt8xx/bttv-cards.c void bttv_init_card2(struct bttv *btv)
btv              3328 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tuner_type = UNSET;
btv              3330 drivers/media/pci/bt8xx/bttv-cards.c 	if (BTTV_BOARD_UNKNOWN == btv->c.type) {
btv              3331 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_readee(btv,eeprom_data,0xa0);
btv              3332 drivers/media/pci/bt8xx/bttv-cards.c 		identify_by_eeprom(btv,eeprom_data);
btv              3335 drivers/media/pci/bt8xx/bttv-cards.c 	switch (btv->c.type) {
btv              3341 drivers/media/pci/bt8xx/bttv-cards.c 		miro_pinnacle_gpio(btv);
btv              3354 drivers/media/pci/bt8xx/bttv-cards.c 		flyvideo_gpio(btv);
btv              3360 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_readee(btv,eeprom_data,0xa0);
btv              3361 drivers/media/pci/bt8xx/bttv-cards.c 		hauppauge_eeprom(btv);
btv              3365 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_readee(btv,eeprom_data,0xa0);
btv              3366 drivers/media/pci/bt8xx/bttv-cards.c 		avermedia_eeprom(btv);
btv              3369 drivers/media/pci/bt8xx/bttv-cards.c 		init_PXC200(btv);
btv              3372 drivers/media/pci/bt8xx/bttv-cards.c 		picolo_tetra_init(btv);
btv              3375 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_radio    = 1;
btv              3376 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_tea575x  = 1;
btv              3377 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tea_gpio.wren = 5;
btv              3378 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tea_gpio.most = 6;
btv              3379 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tea_gpio.clk  = 3;
btv              3380 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tea_gpio.data = 4;
btv              3381 drivers/media/pci/bt8xx/bttv-cards.c 		tea575x_init(btv);
btv              3385 drivers/media/pci/bt8xx/bttv-cards.c 		terratec_active_radio_upgrade(btv);
btv              3388 drivers/media/pci/bt8xx/bttv-cards.c 		if (btv->cardid == 0x3002144f) {
btv              3389 drivers/media/pci/bt8xx/bttv-cards.c 			btv->has_radio=1;
btv              3391 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.nr);
btv              3395 drivers/media/pci/bt8xx/bttv-cards.c 		if (btv->cardid == 0x3060121a) {
btv              3398 drivers/media/pci/bt8xx/bttv-cards.c 			btv->has_radio=0;
btv              3399 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tuner_type=TUNER_TEMIC_NTSC;
btv              3414 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_readee(btv,eeprom_data,0xa0);
btv              3415 drivers/media/pci/bt8xx/bttv-cards.c 		osprey_eeprom(btv, eeprom_data);
btv              3418 drivers/media/pci/bt8xx/bttv-cards.c 		init_ids_eagle(btv);
btv              3421 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_readee(btv,eeprom_data,0xa0);
btv              3422 drivers/media/pci/bt8xx/bttv-cards.c 		modtec_eeprom(btv);
btv              3425 drivers/media/pci/bt8xx/bttv-cards.c 		init_lmlbt4x(btv);
btv              3428 drivers/media/pci/bt8xx/bttv-cards.c 		tibetCS16_init(btv);
btv              3431 drivers/media/pci/bt8xx/bttv-cards.c 		kodicom4400r_init(btv);
btv              3434 drivers/media/pci/bt8xx/bttv-cards.c 		gv800s_init(btv);
btv              3439 drivers/media/pci/bt8xx/bttv-cards.c 	if (!(btv->id==848 && btv->revision==0x11)) {
btv              3441 drivers/media/pci/bt8xx/bttv-cards.c 		if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
btv              3442 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ifreq=28636363;
btv              3443 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_crystal=BT848_IFORM_XT0;
btv              3445 drivers/media/pci/bt8xx/bttv-cards.c 		if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
btv              3446 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ifreq=35468950;
btv              3447 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_crystal=BT848_IFORM_XT1;
btv              3449 drivers/media/pci/bt8xx/bttv-cards.c 		if (PLL_14 == bttv_tvcards[btv->c.type].pll) {
btv              3450 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ifreq = 14318181;
btv              3451 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_crystal = BT848_IFORM_XT0;
btv              3454 drivers/media/pci/bt8xx/bttv-cards.c 		switch (pll[btv->c.nr]) {
btv              3456 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_crystal = 0;
btv              3457 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ifreq   = 0;
btv              3458 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ofreq   = 0;
btv              3462 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ifreq   = 28636363;
btv              3463 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ofreq   = 0;
btv              3464 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_crystal = BT848_IFORM_XT0;
btv              3468 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ifreq   = 35468950;
btv              3469 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ofreq   = 0;
btv              3470 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_crystal = BT848_IFORM_XT1;
btv              3474 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ifreq   = 14318181;
btv              3475 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_ofreq   = 0;
btv              3476 drivers/media/pci/bt8xx/bttv-cards.c 			btv->pll.pll_crystal = BT848_IFORM_XT0;
btv              3480 drivers/media/pci/bt8xx/bttv-cards.c 	btv->pll.pll_current = -1;
btv              3483 drivers/media/pci/bt8xx/bttv-cards.c 	if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
btv              3484 drivers/media/pci/bt8xx/bttv-cards.c 		if (UNSET == btv->tuner_type)
btv              3485 drivers/media/pci/bt8xx/bttv-cards.c 			btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
btv              3486 drivers/media/pci/bt8xx/bttv-cards.c 	if (UNSET != tuner[btv->c.nr])
btv              3487 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type = tuner[btv->c.nr];
btv              3489 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->tuner_type == TUNER_ABSENT)
btv              3490 drivers/media/pci/bt8xx/bttv-cards.c 		pr_info("%d: tuner absent\n", btv->c.nr);
btv              3491 drivers/media/pci/bt8xx/bttv-cards.c 	else if (btv->tuner_type == UNSET)
btv              3492 drivers/media/pci/bt8xx/bttv-cards.c 		pr_warn("%d: tuner type unset\n", btv->c.nr);
btv              3494 drivers/media/pci/bt8xx/bttv-cards.c 		pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type);
btv              3497 drivers/media/pci/bt8xx/bttv-cards.c 		pr_warn("%d: the autoload option is obsolete\n", btv->c.nr);
btv              3499 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr);
btv              3502 drivers/media/pci/bt8xx/bttv-cards.c 	if (UNSET == btv->tuner_type)
btv              3503 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type = TUNER_ABSENT;
btv              3505 drivers/media/pci/bt8xx/bttv-cards.c 	btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
btv              3506 drivers/media/pci/bt8xx/bttv-cards.c 		   bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
btv              3507 drivers/media/pci/bt8xx/bttv-cards.c 	btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
btv              3508 drivers/media/pci/bt8xx/bttv-cards.c 		    UNSET : bttv_tvcards[btv->c.type].svhs;
btv              3509 drivers/media/pci/bt8xx/bttv-cards.c 	if (svhs[btv->c.nr] != UNSET)
btv              3510 drivers/media/pci/bt8xx/bttv-cards.c 		btv->svhs = svhs[btv->c.nr];
btv              3511 drivers/media/pci/bt8xx/bttv-cards.c 	if (remote[btv->c.nr] != UNSET)
btv              3512 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_remote = remote[btv->c.nr];
btv              3514 drivers/media/pci/bt8xx/bttv-cards.c 	if (bttv_tvcards[btv->c.type].has_radio)
btv              3515 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_radio = 1;
btv              3516 drivers/media/pci/bt8xx/bttv-cards.c 	if (bttv_tvcards[btv->c.type].has_remote)
btv              3517 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_remote = 1;
btv              3518 drivers/media/pci/bt8xx/bttv-cards.c 	if (!bttv_tvcards[btv->c.type].no_gpioirq)
btv              3519 drivers/media/pci/bt8xx/bttv-cards.c 		btv->gpioirq = 1;
btv              3520 drivers/media/pci/bt8xx/bttv-cards.c 	if (bttv_tvcards[btv->c.type].volume_gpio)
btv              3521 drivers/media/pci/bt8xx/bttv-cards.c 		btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio;
btv              3522 drivers/media/pci/bt8xx/bttv-cards.c 	if (bttv_tvcards[btv->c.type].audio_mode_gpio)
btv              3523 drivers/media/pci/bt8xx/bttv-cards.c 		btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio;
btv              3525 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->tuner_type == TUNER_ABSENT)
btv              3528 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->has_saa6588 || saa6588[btv->c.nr]) {
btv              3537 drivers/media/pci/bt8xx/bttv-cards.c 		sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3538 drivers/media/pci/bt8xx/bttv-cards.c 			&btv->c.i2c_adap, "saa6588", 0, addrs);
btv              3539 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_saa6588 = (sd != NULL);
btv              3547 drivers/media/pci/bt8xx/bttv-cards.c 	switch (audiodev[btv->c.nr]) {
btv              3562 drivers/media/pci/bt8xx/bttv-cards.c 		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3563 drivers/media/pci/bt8xx/bttv-cards.c 			&btv->c.i2c_adap, "msp3400", 0, addrs);
btv              3564 drivers/media/pci/bt8xx/bttv-cards.c 		if (btv->sd_msp34xx)
btv              3576 drivers/media/pci/bt8xx/bttv-cards.c 		if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3577 drivers/media/pci/bt8xx/bttv-cards.c 				&btv->c.i2c_adap, "tda7432", 0, addrs))
btv              3584 drivers/media/pci/bt8xx/bttv-cards.c 		btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3585 drivers/media/pci/bt8xx/bttv-cards.c 			&btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
btv              3586 drivers/media/pci/bt8xx/bttv-cards.c 		if (btv->sd_tvaudio)
btv              3592 drivers/media/pci/bt8xx/bttv-cards.c 		pr_warn("%d: unknown audiodev value!\n", btv->c.nr);
btv              3602 drivers/media/pci/bt8xx/bttv-cards.c 	if (!bttv_tvcards[btv->c.type].no_msp34xx) {
btv              3603 drivers/media/pci/bt8xx/bttv-cards.c 		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3604 drivers/media/pci/bt8xx/bttv-cards.c 			&btv->c.i2c_adap, "msp3400",
btv              3606 drivers/media/pci/bt8xx/bttv-cards.c 	} else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
btv              3607 drivers/media/pci/bt8xx/bttv-cards.c 		btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3608 drivers/media/pci/bt8xx/bttv-cards.c 			&btv->c.i2c_adap, "msp3400",
btv              3613 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->sd_msp34xx)
btv              3617 drivers/media/pci/bt8xx/bttv-cards.c 	btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3618 drivers/media/pci/bt8xx/bttv-cards.c 		&btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
btv              3619 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->sd_tvaudio) {
btv              3622 drivers/media/pci/bt8xx/bttv-cards.c 		v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3623 drivers/media/pci/bt8xx/bttv-cards.c 			&btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs());
btv              3627 drivers/media/pci/bt8xx/bttv-cards.c 	if (!bttv_tvcards[btv->c.type].no_tda7432) {
btv              3633 drivers/media/pci/bt8xx/bttv-cards.c 		btv->sd_tda7432 = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3634 drivers/media/pci/bt8xx/bttv-cards.c 				&btv->c.i2c_adap, "tda7432", 0, addrs);
btv              3635 drivers/media/pci/bt8xx/bttv-cards.c 		if (btv->sd_tda7432)
btv              3638 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->sd_tvaudio)
btv              3642 drivers/media/pci/bt8xx/bttv-cards.c 	pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr);
btv              3647 drivers/media/pci/bt8xx/bttv-cards.c void bttv_init_tuner(struct bttv *btv)
btv              3651 drivers/media/pci/bt8xx/bttv-cards.c 	if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
btv              3652 drivers/media/pci/bt8xx/bttv-cards.c 		addr = bttv_tvcards[btv->c.type].tuner_addr;
btv              3654 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->tuner_type != TUNER_ABSENT) {
btv              3658 drivers/media/pci/bt8xx/bttv-cards.c 		if (btv->has_radio)
btv              3659 drivers/media/pci/bt8xx/bttv-cards.c 			v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3660 drivers/media/pci/bt8xx/bttv-cards.c 				&btv->c.i2c_adap, "tuner",
btv              3662 drivers/media/pci/bt8xx/bttv-cards.c 		v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3663 drivers/media/pci/bt8xx/bttv-cards.c 				&btv->c.i2c_adap, "tuner",
btv              3665 drivers/media/pci/bt8xx/bttv-cards.c 		v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
btv              3666 drivers/media/pci/bt8xx/bttv-cards.c 				&btv->c.i2c_adap, "tuner",
btv              3670 drivers/media/pci/bt8xx/bttv-cards.c 		tun_setup.type = btv->tuner_type;
btv              3673 drivers/media/pci/bt8xx/bttv-cards.c 		if (btv->has_radio)
btv              3676 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
btv              3679 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->tda9887_conf) {
btv              3683 drivers/media/pci/bt8xx/bttv-cards.c 		tda9887_cfg.priv = &btv->tda9887_conf;
btv              3685 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
btv              3691 drivers/media/pci/bt8xx/bttv-cards.c static void modtec_eeprom(struct bttv *btv)
btv              3694 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
btv              3696 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, &eeprom_data[0x1e]);
btv              3698 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
btv              3700 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, &eeprom_data[0x1e]);
btv              3702 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type=TUNER_PHILIPS_NTSC;
btv              3704 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, &eeprom_data[0x1e]);
btv              3707 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, &eeprom_data[0x1e]);
btv              3711 drivers/media/pci/bt8xx/bttv-cards.c static void hauppauge_eeprom(struct bttv *btv)
btv              3716 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tuner_type = tv.tuner_type;
btv              3717 drivers/media/pci/bt8xx/bttv-cards.c 	btv->has_radio  = tv.has_radio;
btv              3720 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, tv.model);
btv              3728 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr,
btv              3729 drivers/media/pci/bt8xx/bttv-cards.c 			bttv_tvcards[btv->c.type].name,
btv              3731 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
btv              3736 drivers/media/pci/bt8xx/bttv-cards.c 		btv->radio_uses_msp_demodulator = 1;
btv              3743 drivers/media/pci/bt8xx/bttv-cards.c 	struct bttv *btv = tea->private_data;
btv              3744 drivers/media/pci/bt8xx/bttv-cards.c 	struct bttv_tea575x_gpio gpio = btv->tea_gpio;
btv              3752 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->mbox_ior) {
btv              3754 drivers/media/pci/bt8xx/bttv-cards.c 		gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
btv              3757 drivers/media/pci/bt8xx/bttv-cards.c 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
btv              3758 drivers/media/pci/bt8xx/bttv-cards.c 			  btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
btv              3764 drivers/media/pci/bt8xx/bttv-cards.c 	struct bttv *btv = tea->private_data;
btv              3765 drivers/media/pci/bt8xx/bttv-cards.c 	struct bttv_tea575x_gpio gpio = btv->tea_gpio;
btv              3769 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->mbox_ior) {
btv              3771 drivers/media/pci/bt8xx/bttv-cards.c 		gpio_bits(btv->mbox_ior | btv->mbox_csel, 0);
btv              3775 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->mbox_ior) {
btv              3777 drivers/media/pci/bt8xx/bttv-cards.c 		gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
btv              3778 drivers/media/pci/bt8xx/bttv-cards.c 			  btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
btv              3791 drivers/media/pci/bt8xx/bttv-cards.c 	struct bttv *btv = tea->private_data;
btv              3792 drivers/media/pci/bt8xx/bttv-cards.c 	struct bttv_tea575x_gpio gpio = btv->tea_gpio;
btv              3809 drivers/media/pci/bt8xx/bttv-cards.c static int tea575x_init(struct bttv *btv)
btv              3811 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tea.private_data = btv;
btv              3812 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tea.ops = &bttv_tea_ops;
btv              3813 drivers/media/pci/bt8xx/bttv-cards.c 	if (!snd_tea575x_hw_init(&btv->tea)) {
btv              3814 drivers/media/pci/bt8xx/bttv-cards.c 		pr_info("%d: detected TEA575x radio\n", btv->c.nr);
btv              3815 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tea.mute = false;
btv              3819 drivers/media/pci/bt8xx/bttv-cards.c 	btv->has_tea575x = 0;
btv              3820 drivers/media/pci/bt8xx/bttv-cards.c 	btv->has_radio = 0;
btv              3827 drivers/media/pci/bt8xx/bttv-cards.c static int terratec_active_radio_upgrade(struct bttv *btv)
btv              3829 drivers/media/pci/bt8xx/bttv-cards.c 	btv->has_radio    = 1;
btv              3830 drivers/media/pci/bt8xx/bttv-cards.c 	btv->has_tea575x  = 1;
btv              3831 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tea_gpio.wren = 4;
btv              3832 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tea_gpio.most = 5;
btv              3833 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tea_gpio.clk  = 3;
btv              3834 drivers/media/pci/bt8xx/bttv-cards.c 	btv->tea_gpio.data = 2;
btv              3836 drivers/media/pci/bt8xx/bttv-cards.c 	btv->mbox_iow     = 1 <<  8;
btv              3837 drivers/media/pci/bt8xx/bttv-cards.c 	btv->mbox_ior     = 1 <<  9;
btv              3838 drivers/media/pci/bt8xx/bttv-cards.c 	btv->mbox_csel    = 1 << 10;
btv              3840 drivers/media/pci/bt8xx/bttv-cards.c 	if (!tea575x_init(btv)) {
btv              3841 drivers/media/pci/bt8xx/bttv-cards.c 		pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr);
btv              3842 drivers/media/pci/bt8xx/bttv-cards.c 		btv->has_saa6588 = 1;
btv              3864 drivers/media/pci/bt8xx/bttv-cards.c static int pvr_altera_load(struct bttv *btv, const u8 *micro, u32 microlen)
btv              3901 drivers/media/pci/bt8xx/bttv-cards.c static int pvr_boot(struct bttv *btv)
btv              3906 drivers/media/pci/bt8xx/bttv-cards.c 	rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
btv              3908 drivers/media/pci/bt8xx/bttv-cards.c 		pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr);
btv              3911 drivers/media/pci/bt8xx/bttv-cards.c 	rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
btv              3913 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, (rc < 0) ? "failed" : "ok");
btv              3921 drivers/media/pci/bt8xx/bttv-cards.c static void osprey_eeprom(struct bttv *btv, const u8 ee[256])
btv              3928 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->c.type == BTTV_BOARD_UNKNOWN) {
btv              4010 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.nr, type);
btv              4017 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, cardid,
btv              4020 drivers/media/pci/bt8xx/bttv-cards.c 	if (cardid<0 || btv->c.type == cardid)
btv              4024 drivers/media/pci/bt8xx/bttv-cards.c 	if (card[btv->c.nr] < bttv_num_tvcards) {
btv              4026 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr);
btv              4029 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, btv->c.type, cardid);
btv              4030 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.type = cardid;
btv              4052 drivers/media/pci/bt8xx/bttv-cards.c static void avermedia_eeprom(struct bttv *btv)
btv              4059 drivers/media/pci/bt8xx/bttv-cards.c 	btv->has_remote = (eeprom_data[0x42] & 0x01);
btv              4073 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
btv              4075 drivers/media/pci/bt8xx/bttv-cards.c 		btv->tuner_type = tuner_type;
btv              4081 drivers/media/pci/bt8xx/bttv-cards.c 	       btv->has_remote ? "yes" : "no");
btv              4092 drivers/media/pci/bt8xx/bttv-cards.c u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
btv              4095 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->audio_input == TVAUDIO_INPUT_TUNER) {
btv              4096 drivers/media/pci/bt8xx/bttv-cards.c 		if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
btv              4102 drivers/media/pci/bt8xx/bttv-cards.c 	gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
btv              4114 drivers/media/pci/bt8xx/bttv-cards.c static void boot_msp34xx(struct bttv *btv, int pin)
btv              4125 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_gpio_tracking(btv,"msp34xx");
btv              4128 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, pin);
btv              4137 drivers/media/pci/bt8xx/bttv-cards.c static void init_PXC200(struct bttv *btv)
btv              4154 drivers/media/pci/bt8xx/bttv-cards.c 		bttv_gpio_tracking(btv,"pxc200");
btv              4168 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv,0x5E,0,0x80,1);
btv              4193 drivers/media/pci/bt8xx/bttv-cards.c 		tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
btv              4196 drivers/media/pci/bt8xx/bttv-cards.c 			       vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
btv              4234 drivers/media/pci/bt8xx/bttv-cards.c init_RTV24 (struct bttv *btv)
btv              4240 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr);
btv              4254 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, dataRead);
btv              4267 drivers/media/pci/bt8xx/bttv-cards.c 			btv->c.nr, dataRead);
btv              4272 drivers/media/pci/bt8xx/bttv-cards.c 	pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr);
btv              4299 drivers/media/pci/bt8xx/bttv-cards.c init_PCI8604PW(struct bttv *btv)
btv              4303 drivers/media/pci/bt8xx/bttv-cards.c 	if ((PCI_SLOT(btv->c.pci->devfn) & ~3) != 0xC) {
btv              4308 drivers/media/pci/bt8xx/bttv-cards.c 	if (PCI_SLOT(btv->c.pci->devfn) != 0xD)
btv              4389 drivers/media/pci/bt8xx/bttv-cards.c static void rv605_muxsel(struct bttv *btv, unsigned int input)
btv              4437 drivers/media/pci/bt8xx/bttv-cards.c static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
btv              4443 drivers/media/pci/bt8xx/bttv-cards.c static void tibetCS16_init(struct bttv *btv)
btv              4477 drivers/media/pci/bt8xx/bttv-cards.c static void kodicom4400r_write(struct bttv *btv,
btv              4497 drivers/media/pci/bt8xx/bttv-cards.c static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
btv              4503 drivers/media/pci/bt8xx/bttv-cards.c 	mctlr = master[btv->c.nr];
btv              4507 drivers/media/pci/bt8xx/bttv-cards.c 	yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
btv              4526 drivers/media/pci/bt8xx/bttv-cards.c static void kodicom4400r_init(struct bttv *btv)
btv              4535 drivers/media/pci/bt8xx/bttv-cards.c 		btv->sw_status[ix] = ix;
btv              4536 drivers/media/pci/bt8xx/bttv-cards.c 		kodicom4400r_write(btv, ix, ix, 1);
btv              4543 drivers/media/pci/bt8xx/bttv-cards.c 	if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
btv              4545 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr-1] = btv;
btv              4546 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr]   = btv;
btv              4547 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr+1] = btv;
btv              4548 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr+2] = btv;
btv              4569 drivers/media/pci/bt8xx/bttv-cards.c static void xguard_muxsel(struct bttv *btv, unsigned int input)
btv              4579 drivers/media/pci/bt8xx/bttv-cards.c static void picolo_tetra_init(struct bttv *btv)
btv              4585 drivers/media/pci/bt8xx/bttv-cards.c static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
btv              4588 drivers/media/pci/bt8xx/bttv-cards.c 	dprintk("%d : picolo_tetra_muxsel =>  input = %d\n", btv->c.nr, input);
btv              4627 drivers/media/pci/bt8xx/bttv-cards.c static void ivc120_muxsel(struct bttv *btv, unsigned int input)
btv              4634 drivers/media/pci/bt8xx/bttv-cards.c 		btv->c.nr, input, matrix, key);
btv              4637 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
btv              4639 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
btv              4641 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
btv              4643 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
btv              4647 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
btv              4649 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
btv              4651 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
btv              4653 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
btv              4677 drivers/media/pci/bt8xx/bttv-cards.c static void PXC200_muxsel(struct bttv *btv, unsigned int input)
btv              4688 drivers/media/pci/bt8xx/bttv-cards.c 	rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
btv              4691 drivers/media/pci/bt8xx/bttv-cards.c 			 btv->c.nr, rc);
btv              4696 drivers/media/pci/bt8xx/bttv-cards.c 	rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
btv              4699 drivers/media/pci/bt8xx/bttv-cards.c 			 btv->c.nr, rc);
btv              4714 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->cardid == PX_PXC200A_CARDID)  {
btv              4721 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->cardid == PX_PXC200A_CARDID)
btv              4734 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->cardid == PX_PXC200A_CARDID)
btv              4739 drivers/media/pci/bt8xx/bttv-cards.c 	pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux);
btv              4742 drivers/media/pci/bt8xx/bttv-cards.c static void phytec_muxsel(struct bttv *btv, unsigned int input)
btv              4746 drivers/media/pci/bt8xx/bttv-cards.c 	if (input == btv->svhs)
btv              4767 drivers/media/pci/bt8xx/bttv-cards.c static void gv800s_write(struct bttv *btv,
btv              4809 drivers/media/pci/bt8xx/bttv-cards.c static void gv800s_muxsel(struct bttv *btv, unsigned int input)
btv              4818 drivers/media/pci/bt8xx/bttv-cards.c 	mctlr = master[btv->c.nr];
btv              4823 drivers/media/pci/bt8xx/bttv-cards.c 	yaddr = (btv->c.nr - mctlr->c.nr) & 3;
btv              4836 drivers/media/pci/bt8xx/bttv-cards.c static void gv800s_init(struct bttv *btv)
btv              4846 drivers/media/pci/bt8xx/bttv-cards.c 		btv->sw_status[ix] = ix;
btv              4847 drivers/media/pci/bt8xx/bttv-cards.c 		gv800s_write(btv, ix, ix, 1);
btv              4851 drivers/media/pci/bt8xx/bttv-cards.c 	bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
btv              4853 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->c.nr > BTTV_MAX-4)
btv              4859 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr]   = btv;
btv              4860 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr+1] = btv;
btv              4861 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr+2] = btv;
btv              4862 drivers/media/pci/bt8xx/bttv-cards.c 	master[btv->c.nr+3] = btv;
btv              4911 drivers/media/pci/bt8xx/bttv-cards.c int bttv_handle_chipset(struct bttv *btv)
btv              4921 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.nr);
btv              4922 drivers/media/pci/bt8xx/bttv-cards.c 		if (vsfx && btv->id >= 878)
btv              4923 drivers/media/pci/bt8xx/bttv-cards.c 			pr_info("%d: enabling VSFX\n", btv->c.nr);
btv              4926 drivers/media/pci/bt8xx/bttv-cards.c 				btv->c.nr, latency);
btv              4929 drivers/media/pci/bt8xx/bttv-cards.c 	if (btv->id < 878) {
btv              4932 drivers/media/pci/bt8xx/bttv-cards.c 			btv->triton1 = BT848_INT_ETBF;
btv              4935 drivers/media/pci/bt8xx/bttv-cards.c 		pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
btv              4940 drivers/media/pci/bt8xx/bttv-cards.c 		pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
btv              4943 drivers/media/pci/bt8xx/bttv-cards.c 		pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);
btv               177 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = video_get_drvdata(vfd);
btv               178 drivers/media/pci/bt8xx/bttv-driver.c 	return sprintf(buf, "%d\n", btv ? btv->c.type : UNSET);
btv               652 drivers/media/pci/bt8xx/bttv-driver.c int check_alloc_btres_lock(struct bttv *btv, struct bttv_fh *fh, int bit)
btv               665 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->resources & xbits) {
btv               671 drivers/media/pci/bt8xx/bttv-driver.c 	    && 0 == (btv->resources & VIDEO_RESOURCES)) {
btv               673 drivers/media/pci/bt8xx/bttv-driver.c 		__s32 top = btv->crop[!!fh->do_crop].rect.top;
btv               675 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->vbi_end > top)
btv               680 drivers/media/pci/bt8xx/bttv-driver.c 		btv->crop_start = top;
btv               684 drivers/media/pci/bt8xx/bttv-driver.c 		if (end > btv->crop_start)
btv               688 drivers/media/pci/bt8xx/bttv-driver.c 		btv->vbi_end = end;
btv               693 drivers/media/pci/bt8xx/bttv-driver.c 	btv->resources |= bit;
btv               707 drivers/media/pci/bt8xx/bttv-driver.c int locked_btres(struct bttv *btv, int bit)
btv               709 drivers/media/pci/bt8xx/bttv-driver.c 	return (btv->resources & bit);
btv               714 drivers/media/pci/bt8xx/bttv-driver.c disclaim_vbi_lines(struct bttv *btv)
btv               716 drivers/media/pci/bt8xx/bttv-driver.c 	btv->vbi_end = 0;
btv               721 drivers/media/pci/bt8xx/bttv-driver.c disclaim_video_lines(struct bttv *btv)
btv               726 drivers/media/pci/bt8xx/bttv-driver.c 	tvnorm = &bttv_tvnorms[btv->tvnorm];
btv               727 drivers/media/pci/bt8xx/bttv-driver.c 	btv->crop_start = tvnorm->cropcap.bounds.top
btv               742 drivers/media/pci/bt8xx/bttv-driver.c void free_btres_lock(struct bttv *btv, struct bttv_fh *fh, int bits)
btv               749 drivers/media/pci/bt8xx/bttv-driver.c 	btv->resources &= ~bits;
btv               751 drivers/media/pci/bt8xx/bttv-driver.c 	bits = btv->resources;
btv               754 drivers/media/pci/bt8xx/bttv-driver.c 		disclaim_video_lines(btv);
btv               757 drivers/media/pci/bt8xx/bttv-driver.c 		disclaim_vbi_lines(btv);
btv               773 drivers/media/pci/bt8xx/bttv-driver.c static void set_pll_freq(struct bttv *btv, unsigned int fin, unsigned int fout)
btv               795 drivers/media/pci/bt8xx/bttv-driver.c static void set_pll(struct bttv *btv)
btv               799 drivers/media/pci/bt8xx/bttv-driver.c 	if (!btv->pll.pll_crystal)
btv               802 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->pll.pll_ofreq == btv->pll.pll_current) {
btv               803 drivers/media/pci/bt8xx/bttv-driver.c 		dprintk("%d: PLL: no change required\n", btv->c.nr);
btv               807 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->pll.pll_ifreq == btv->pll.pll_ofreq) {
btv               809 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->pll.pll_current == 0)
btv               813 drivers/media/pci/bt8xx/bttv-driver.c 				btv->c.nr, btv->pll.pll_ifreq);
btv               816 drivers/media/pci/bt8xx/bttv-driver.c 		btv->pll.pll_current = 0;
btv               822 drivers/media/pci/bt8xx/bttv-driver.c 			btv->c.nr,
btv               823 drivers/media/pci/bt8xx/bttv-driver.c 			btv->pll.pll_ifreq, btv->pll.pll_ofreq);
btv               824 drivers/media/pci/bt8xx/bttv-driver.c 	set_pll_freq(btv, btv->pll.pll_ifreq, btv->pll.pll_ofreq);
btv               834 drivers/media/pci/bt8xx/bttv-driver.c 			btv->pll.pll_current = btv->pll.pll_ofreq;
btv               840 drivers/media/pci/bt8xx/bttv-driver.c 	btv->pll.pll_current = -1;
btv               847 drivers/media/pci/bt8xx/bttv-driver.c static void bt848A_set_timing(struct bttv *btv)
btv               850 drivers/media/pci/bt8xx/bttv-driver.c 	int table_idx = bttv_tvnorms[btv->tvnorm].sram;
btv               851 drivers/media/pci/bt8xx/bttv-driver.c 	int fsc       = bttv_tvnorms[btv->tvnorm].Fsc;
btv               853 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->input == btv->dig) {
btv               855 drivers/media/pci/bt8xx/bttv-driver.c 			btv->c.nr,table_idx);
btv               865 drivers/media/pci/bt8xx/bttv-driver.c 		btv->pll.pll_ofreq = 27000000;
btv               867 drivers/media/pci/bt8xx/bttv-driver.c 		set_pll(btv);
btv               871 drivers/media/pci/bt8xx/bttv-driver.c 		btv->pll.pll_ofreq = fsc;
btv               872 drivers/media/pci/bt8xx/bttv-driver.c 		set_pll(btv);
btv               879 drivers/media/pci/bt8xx/bttv-driver.c static void bt848_bright(struct bttv *btv, int bright)
btv               884 drivers/media/pci/bt8xx/bttv-driver.c 	btv->bright = bright;
btv               891 drivers/media/pci/bt8xx/bttv-driver.c static void bt848_hue(struct bttv *btv, int hue)
btv               895 drivers/media/pci/bt8xx/bttv-driver.c 	btv->hue = hue;
btv               902 drivers/media/pci/bt8xx/bttv-driver.c static void bt848_contrast(struct bttv *btv, int cont)
btv               906 drivers/media/pci/bt8xx/bttv-driver.c 	btv->contrast = cont;
btv               916 drivers/media/pci/bt8xx/bttv-driver.c static void bt848_sat(struct bttv *btv, int color)
btv               920 drivers/media/pci/bt8xx/bttv-driver.c 	btv->saturation = color;
btv               923 drivers/media/pci/bt8xx/bttv-driver.c 	val_u   = ((color * btv->opt_uv_ratio) / 50) >> 7;
btv               924 drivers/media/pci/bt8xx/bttv-driver.c 	val_v   = (((color * (100 - btv->opt_uv_ratio) / 50) >>7)*180L)/254;
btv               936 drivers/media/pci/bt8xx/bttv-driver.c video_mux(struct bttv *btv, unsigned int input)
btv               940 drivers/media/pci/bt8xx/bttv-driver.c 	if (input >= bttv_tvcards[btv->c.type].video_inputs)
btv               944 drivers/media/pci/bt8xx/bttv-driver.c 	mask2 = bttv_tvcards[btv->c.type].gpiomask2;
btv               948 drivers/media/pci/bt8xx/bttv-driver.c 	if (input == btv->svhs)  {
btv               955 drivers/media/pci/bt8xx/bttv-driver.c 	mux = bttv_muxsel(btv, input);
btv               957 drivers/media/pci/bt8xx/bttv-driver.c 	dprintk("%d: video mux: input=%d mux=%d\n", btv->c.nr, input, mux);
btv               960 drivers/media/pci/bt8xx/bttv-driver.c 	if(bttv_tvcards[btv->c.type].muxsel_hook)
btv               961 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_tvcards[btv->c.type].muxsel_hook (btv, input);
btv               971 drivers/media/pci/bt8xx/bttv-driver.c audio_mux_gpio(struct bttv *btv, int input, int mute)
btv               975 drivers/media/pci/bt8xx/bttv-driver.c 	gpio_inout(bttv_tvcards[btv->c.type].gpiomask,
btv               976 drivers/media/pci/bt8xx/bttv-driver.c 		   bttv_tvcards[btv->c.type].gpiomask);
btv               980 drivers/media/pci/bt8xx/bttv-driver.c 	mute_gpio = mute || (btv->opt_automute && (!signal || !btv->users)
btv               981 drivers/media/pci/bt8xx/bttv-driver.c 				&& !btv->has_radio_tuner);
btv               984 drivers/media/pci/bt8xx/bttv-driver.c 		gpio_val = bttv_tvcards[btv->c.type].gpiomute;
btv               986 drivers/media/pci/bt8xx/bttv-driver.c 		gpio_val = bttv_tvcards[btv->c.type].gpiomux[input];
btv               988 drivers/media/pci/bt8xx/bttv-driver.c 	switch (btv->c.type) {
btv               991 drivers/media/pci/bt8xx/bttv-driver.c 		gpio_val = bttv_tda9880_setnorm(btv, gpio_val);
btv               995 drivers/media/pci/bt8xx/bttv-driver.c 		gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpio_val);
btv               999 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_gpio_tracking(btv, audio_modes[mute_gpio ? 4 : input]);
btv              1003 drivers/media/pci/bt8xx/bttv-driver.c audio_mute(struct bttv *btv, int mute)
btv              1007 drivers/media/pci/bt8xx/bttv-driver.c 	audio_mux_gpio(btv, btv->audio_input, mute);
btv              1009 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->sd_msp34xx) {
btv              1010 drivers/media/pci/bt8xx/bttv-driver.c 		ctrl = v4l2_ctrl_find(btv->sd_msp34xx->ctrl_handler, V4L2_CID_AUDIO_MUTE);
btv              1014 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->sd_tvaudio) {
btv              1015 drivers/media/pci/bt8xx/bttv-driver.c 		ctrl = v4l2_ctrl_find(btv->sd_tvaudio->ctrl_handler, V4L2_CID_AUDIO_MUTE);
btv              1019 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->sd_tda7432) {
btv              1020 drivers/media/pci/bt8xx/bttv-driver.c 		ctrl = v4l2_ctrl_find(btv->sd_tda7432->ctrl_handler, V4L2_CID_AUDIO_MUTE);
btv              1028 drivers/media/pci/bt8xx/bttv-driver.c audio_input(struct bttv *btv, int input)
btv              1030 drivers/media/pci/bt8xx/bttv-driver.c 	audio_mux_gpio(btv, input, btv->mute);
btv              1032 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->sd_msp34xx) {
btv              1043 drivers/media/pci/bt8xx/bttv-driver.c 			if (btv->radio_uses_msp_demodulator) {
btv              1068 drivers/media/pci/bt8xx/bttv-driver.c 			if (btv->c.type == BTTV_BOARD_VOODOOTV_200)
btv              1075 drivers/media/pci/bt8xx/bttv-driver.c 		v4l2_subdev_call(btv->sd_msp34xx, audio, s_routing,
btv              1078 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->sd_tvaudio) {
btv              1079 drivers/media/pci/bt8xx/bttv-driver.c 		v4l2_subdev_call(btv->sd_tvaudio, audio, s_routing,
btv              1116 drivers/media/pci/bt8xx/bttv-driver.c set_tvnorm(struct bttv *btv, unsigned int norm)
btv              1122 drivers/media/pci/bt8xx/bttv-driver.c 	BUG_ON(btv->tvnorm >= BTTV_TVNORMS);
btv              1126 drivers/media/pci/bt8xx/bttv-driver.c 	if (memcmp(&bttv_tvnorms[btv->tvnorm].cropcap, &tvnorm->cropcap,
btv              1128 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_crop_reset(&btv->crop[0], norm);
btv              1129 drivers/media/pci/bt8xx/bttv-driver.c 		btv->crop[1] = btv->crop[0]; /* current = default */
btv              1131 drivers/media/pci/bt8xx/bttv-driver.c 		if (0 == (btv->resources & VIDEO_RESOURCES)) {
btv              1132 drivers/media/pci/bt8xx/bttv-driver.c 			btv->crop_start = tvnorm->cropcap.bounds.top
btv              1137 drivers/media/pci/bt8xx/bttv-driver.c 	btv->tvnorm = norm;
btv              1145 drivers/media/pci/bt8xx/bttv-driver.c 	bt848A_set_timing(btv);
btv              1147 drivers/media/pci/bt8xx/bttv-driver.c 	switch (btv->c.type) {
btv              1150 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_tda9880_setnorm(btv, gpio_read());
btv              1154 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, video, s_std, id);
btv              1161 drivers/media/pci/bt8xx/bttv-driver.c set_input(struct bttv *btv, unsigned int input, unsigned int norm)
btv              1165 drivers/media/pci/bt8xx/bttv-driver.c 	btv->input = input;
btv              1167 drivers/media/pci/bt8xx/bttv-driver.c 		spin_lock_irqsave(&btv->s_lock,flags);
btv              1168 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->curr.frame_irq) {
btv              1170 drivers/media/pci/bt8xx/bttv-driver.c 			btv->new_input = input;
btv              1172 drivers/media/pci/bt8xx/bttv-driver.c 			video_mux(btv,input);
btv              1174 drivers/media/pci/bt8xx/bttv-driver.c 		spin_unlock_irqrestore(&btv->s_lock,flags);
btv              1176 drivers/media/pci/bt8xx/bttv-driver.c 		video_mux(btv,input);
btv              1178 drivers/media/pci/bt8xx/bttv-driver.c 	btv->audio_input = (btv->tuner_type != TUNER_ABSENT && input == 0) ?
btv              1180 drivers/media/pci/bt8xx/bttv-driver.c 	audio_input(btv, btv->audio_input);
btv              1181 drivers/media/pci/bt8xx/bttv-driver.c 	set_tvnorm(btv, norm);
btv              1184 drivers/media/pci/bt8xx/bttv-driver.c static void init_irqreg(struct bttv *btv)
btv              1189 drivers/media/pci/bt8xx/bttv-driver.c 	if (bttv_tvcards[btv->c.type].no_video) {
btv              1195 drivers/media/pci/bt8xx/bttv-driver.c 		btwrite((btv->triton1)  |
btv              1196 drivers/media/pci/bt8xx/bttv-driver.c 			(btv->gpioirq ? BT848_INT_GPINT : 0) |
btv              1206 drivers/media/pci/bt8xx/bttv-driver.c static void init_bt848(struct bttv *btv)
btv              1208 drivers/media/pci/bt8xx/bttv-driver.c 	if (bttv_tvcards[btv->c.type].no_video) {
btv              1210 drivers/media/pci/bt8xx/bttv-driver.c 		init_irqreg(btv);
btv              1230 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_ctrl_handler_setup(&btv->ctrl_handler);
btv              1233 drivers/media/pci/bt8xx/bttv-driver.c 	init_irqreg(btv);
btv              1236 drivers/media/pci/bt8xx/bttv-driver.c static void bttv_reinit_bt848(struct bttv *btv)
btv              1241 drivers/media/pci/bt8xx/bttv-driver.c 		pr_info("%d: reset, reinitialize\n", btv->c.nr);
btv              1242 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock_irqsave(&btv->s_lock,flags);
btv              1243 drivers/media/pci/bt8xx/bttv-driver.c 	btv->errors=0;
btv              1244 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_dma(btv,0);
btv              1245 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock_irqrestore(&btv->s_lock,flags);
btv              1247 drivers/media/pci/bt8xx/bttv-driver.c 	init_bt848(btv);
btv              1248 drivers/media/pci/bt8xx/bttv-driver.c 	btv->pll.pll_current = -1;
btv              1249 drivers/media/pci/bt8xx/bttv-driver.c 	set_input(btv, btv->input, btv->tvnorm);
btv              1254 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = container_of(c->handler, struct bttv, ctrl_handler);
btv              1259 drivers/media/pci/bt8xx/bttv-driver.c 		bt848_bright(btv, c->val);
btv              1262 drivers/media/pci/bt8xx/bttv-driver.c 		bt848_hue(btv, c->val);
btv              1265 drivers/media/pci/bt8xx/bttv-driver.c 		bt848_contrast(btv, c->val);
btv              1268 drivers/media/pci/bt8xx/bttv-driver.c 		bt848_sat(btv, c->val);
btv              1280 drivers/media/pci/bt8xx/bttv-driver.c 		audio_mute(btv, c->val);
btv              1281 drivers/media/pci/bt8xx/bttv-driver.c 		btv->mute = c->val;
btv              1284 drivers/media/pci/bt8xx/bttv-driver.c 		btv->volume_gpio(btv, c->val);
btv              1293 drivers/media/pci/bt8xx/bttv-driver.c 		btv->opt_combfilter = c->val;
btv              1305 drivers/media/pci/bt8xx/bttv-driver.c 		btv->opt_automute = c->val;
btv              1313 drivers/media/pci/bt8xx/bttv-driver.c 		btv->opt_vcr_hack = c->val;
btv              1322 drivers/media/pci/bt8xx/bttv-driver.c 		btv->opt_uv_ratio = c->val;
btv              1323 drivers/media/pci/bt8xx/bttv-driver.c 		bt848_sat(btv, btv->saturation);
btv              1454 drivers/media/pci/bt8xx/bttv-driver.c void bttv_gpio_tracking(struct bttv *btv, char *comment)
btv              1460 drivers/media/pci/bt8xx/bttv-driver.c 		 btv->c.nr, outbits, data & outbits, data & ~outbits, comment);
btv              1463 drivers/media/pci/bt8xx/bttv-driver.c static void bttv_field_count(struct bttv *btv)
btv              1467 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->users)
btv              1476 drivers/media/pci/bt8xx/bttv-driver.c 		btv->field_count = 0;
btv              1498 drivers/media/pci/bt8xx/bttv-driver.c bttv_switch_overlay(struct bttv *btv, struct bttv_fh *fh,
btv              1507 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock_irqsave(&btv->s_lock,flags);
btv              1508 drivers/media/pci/bt8xx/bttv-driver.c 	old = btv->screen;
btv              1509 drivers/media/pci/bt8xx/bttv-driver.c 	btv->screen = new;
btv              1510 drivers/media/pci/bt8xx/bttv-driver.c 	btv->loop_irq |= 1;
btv              1511 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_dma(btv, 0x03);
btv              1512 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock_irqrestore(&btv->s_lock,flags);
btv              1516 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_dma_free(&fh->cap,btv, old);
btv              1520 drivers/media/pci/bt8xx/bttv-driver.c 		free_btres_lock(btv,fh,RESOURCE_OVERLAY);
btv              1528 drivers/media/pci/bt8xx/bttv-driver.c static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv,
btv              1553 drivers/media/pci/bt8xx/bttv-driver.c 		norm = btv->tvnorm;
btv              1557 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->vbi_end > bttv_tvnorms[norm].cropcap.defrect.top) {
btv              1563 drivers/media/pci/bt8xx/bttv-driver.c 		norm = btv->tvnorm;
btv              1564 drivers/media/pci/bt8xx/bttv-driver.c 		c = btv->crop[!!fh->do_crop];
btv              1612 drivers/media/pci/bt8xx/bttv-driver.c 		if (0 != (rc = videobuf_iolock(q,&buf->vb,&btv->fbuf)))
btv              1617 drivers/media/pci/bt8xx/bttv-driver.c 		if (0 != (rc = bttv_buffer_risc(btv,buf)))
btv              1624 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_dma_free(q,btv,buf);
btv              1648 drivers/media/pci/bt8xx/bttv-driver.c 	return bttv_prepare_buffer(q,fh->btv, buf, fh->fmt,
btv              1657 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv    *btv = fh->btv;
btv              1660 drivers/media/pci/bt8xx/bttv-driver.c 	list_add_tail(&buf->vb.queue,&btv->capture);
btv              1661 drivers/media/pci/bt8xx/bttv-driver.c 	if (!btv->curr.frame_irq) {
btv              1662 drivers/media/pci/bt8xx/bttv-driver.c 		btv->loop_irq |= 1;
btv              1663 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_set_dma(btv, 0x03);
btv              1672 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_dma_free(q,fh->btv,buf);
btv              1682 drivers/media/pci/bt8xx/bttv-driver.c static void radio_enable(struct bttv *btv)
btv              1685 drivers/media/pci/bt8xx/bttv-driver.c 	if (!btv->has_radio_tuner) {
btv              1686 drivers/media/pci/bt8xx/bttv-driver.c 		btv->has_radio_tuner = 1;
btv              1687 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_call_all(btv, tuner, s_radio);
btv              1688 drivers/media/pci/bt8xx/bttv-driver.c 		btv->audio_input = TVAUDIO_INPUT_RADIO;
btv              1689 drivers/media/pci/bt8xx/bttv-driver.c 		audio_input(btv, btv->audio_input);
btv              1696 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1704 drivers/media/pci/bt8xx/bttv-driver.c 	btv->std = id;
btv              1705 drivers/media/pci/bt8xx/bttv-driver.c 	set_tvnorm(btv, i);
btv              1712 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1714 drivers/media/pci/bt8xx/bttv-driver.c 	*id = btv->std;
btv              1721 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1734 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1736 drivers/media/pci/bt8xx/bttv-driver.c 	if (i->index >= bttv_tvcards[btv->c.type].video_inputs)
btv              1742 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->tuner_type != TUNER_ABSENT && i->index == 0) {
btv              1746 drivers/media/pci/bt8xx/bttv-driver.c 	} else if (i->index == btv->svhs) {
btv              1752 drivers/media/pci/bt8xx/bttv-driver.c 	if (i->index == btv->input) {
btv              1767 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1769 drivers/media/pci/bt8xx/bttv-driver.c 	*i = btv->input;
btv              1777 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1779 drivers/media/pci/bt8xx/bttv-driver.c 	if (i >= bttv_tvcards[btv->c.type].video_inputs)
btv              1782 drivers/media/pci/bt8xx/bttv-driver.c 	set_input(btv, i, btv->tvnorm);
btv              1790 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1795 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, tuner, s_tuner, t);
btv              1797 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->audio_mode_gpio) {
btv              1800 drivers/media/pci/bt8xx/bttv-driver.c 		btv->audio_mode_gpio(btv, &copy, 1);
btv              1809 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1815 drivers/media/pci/bt8xx/bttv-driver.c 		radio_enable(btv);
btv              1817 drivers/media/pci/bt8xx/bttv-driver.c 				btv->radio_freq : btv->tv_freq;
btv              1822 drivers/media/pci/bt8xx/bttv-driver.c static void bttv_set_frequency(struct bttv *btv, const struct v4l2_frequency *f)
btv              1826 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, tuner, s_frequency, f);
btv              1829 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, tuner, g_frequency, &new_freq);
btv              1831 drivers/media/pci/bt8xx/bttv-driver.c 		radio_enable(btv);
btv              1832 drivers/media/pci/bt8xx/bttv-driver.c 		btv->radio_freq = new_freq.frequency;
btv              1833 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->has_tea575x) {
btv              1834 drivers/media/pci/bt8xx/bttv-driver.c 			btv->tea.freq = btv->radio_freq;
btv              1835 drivers/media/pci/bt8xx/bttv-driver.c 			snd_tea575x_set_freq(&btv->tea);
btv              1838 drivers/media/pci/bt8xx/bttv-driver.c 		btv->tv_freq = new_freq.frequency;
btv              1846 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1851 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_frequency(btv, f);
btv              1859 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1861 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_ctrl_handler_log_status(vdev->ctrl_handler, btv->c.v4l2_dev.name);
btv              1862 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, core, log_status);
btv              1871 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1885 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1954 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              1969 drivers/media/pci/bt8xx/bttv-driver.c 	b = &bttv_tvnorms[btv->tvnorm].cropcap.bounds;
btv              1972 drivers/media/pci/bt8xx/bttv-driver.c 	c = &btv->crop[!!fh->do_crop];
btv              1977 drivers/media/pci/bt8xx/bttv-driver.c 	    && !locked_btres(btv, VIDEO_RESOURCES)) {
btv              1990 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->vbi_end > b->top) {
btv              1991 drivers/media/pci/bt8xx/bttv-driver.c 			max_height -= btv->vbi_end - b->top;
btv              1998 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->vbi_end > c->rect.top)
btv              2026 drivers/media/pci/bt8xx/bttv-driver.c 			if (btv->vbi_end > c->rect.top) {
btv              2028 drivers/media/pci/bt8xx/bttv-driver.c 				c->rect.top = btv->vbi_end;
btv              2086 drivers/media/pci/bt8xx/bttv-driver.c 		height2 = fh->btv->crop[!!fh->do_crop].rect.height >> 1;
btv              2123 drivers/media/pci/bt8xx/bttv-driver.c static int setup_window_lock(struct bttv_fh *fh, struct bttv *btv,
btv              2154 drivers/media/pci/bt8xx/bttv-driver.c 	if (NULL != btv->fbuf.base)
btv              2155 drivers/media/pci/bt8xx/bttv-driver.c 		n = btcx_screen_clips(btv->fbuf.fmt.width, btv->fbuf.fmt.height,
btv              2183 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.w.width   = win->w.width;
btv              2184 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.w.height  = win->w.height;
btv              2185 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.field     = win->field;
btv              2193 drivers/media/pci/bt8xx/bttv-driver.c 		new->crop = btv->crop[!!fh->do_crop].rect;
btv              2194 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
btv              2195 drivers/media/pci/bt8xx/bttv-driver.c 		retval = bttv_switch_overlay(btv,fh,new);
btv              2310 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2337 drivers/media/pci/bt8xx/bttv-driver.c 		height2 = btv->crop[!!fh->do_crop].rect.height >> 1;
btv              2380 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2414 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.fmt        = fmt;
btv              2415 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.width      = f->fmt.pix.width;
btv              2416 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.height     = f->fmt.pix.height;
btv              2425 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2432 drivers/media/pci/bt8xx/bttv-driver.c 	return setup_window_lock(fh, btv, &f->fmt.win, 1);
btv              2439 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2445 drivers/media/pci/bt8xx/bttv-driver.c 	strscpy(cap->card, btv->video_dev.name, sizeof(cap->card));
btv              2447 drivers/media/pci/bt8xx/bttv-driver.c 		 "PCI:%s", pci_name(btv->c.pci));
btv              2452 drivers/media/pci/bt8xx/bttv-driver.c 	if (video_is_registered(&btv->vbi_dev))
btv              2454 drivers/media/pci/bt8xx/bttv-driver.c 	if (video_is_registered(&btv->radio_dev)) {
btv              2456 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->has_tea575x)
btv              2464 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->has_saa6588)
btv              2466 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->tuner_type != TUNER_ABSENT)
btv              2525 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2527 drivers/media/pci/bt8xx/bttv-driver.c 	*fb = btv->fbuf;
btv              2538 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2544 drivers/media/pci/bt8xx/bttv-driver.c 		if (unlikely(!btv->fbuf.base)) {
btv              2548 drivers/media/pci/bt8xx/bttv-driver.c 			dprintk("%d: overlay: !setup_ok\n", btv->c.nr);
btv              2555 drivers/media/pci/bt8xx/bttv-driver.c 	if (!check_alloc_btres_lock(btv, fh, RESOURCE_OVERLAY))
btv              2559 drivers/media/pci/bt8xx/bttv-driver.c 		fh->ov.tvnorm = btv->tvnorm;
btv              2561 drivers/media/pci/bt8xx/bttv-driver.c 		new->crop = btv->crop[!!fh->do_crop].rect;
btv              2562 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
btv              2568 drivers/media/pci/bt8xx/bttv-driver.c 	retval = bttv_switch_overlay(btv, fh, new);
btv              2576 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2607 drivers/media/pci/bt8xx/bttv-driver.c 	btv->fbuf.base       = fb->base;
btv              2608 drivers/media/pci/bt8xx/bttv-driver.c 	btv->fbuf.fmt.width  = fb->fmt.width;
btv              2609 drivers/media/pci/bt8xx/bttv-driver.c 	btv->fbuf.fmt.height = fb->fmt.height;
btv              2611 drivers/media/pci/bt8xx/bttv-driver.c 		btv->fbuf.fmt.bytesperline = fb->fmt.bytesperline;
btv              2613 drivers/media/pci/bt8xx/bttv-driver.c 		btv->fbuf.fmt.bytesperline = btv->fbuf.fmt.width*fmt->depth/8;
btv              2617 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ovfmt = fmt;
btv              2623 drivers/media/pci/bt8xx/bttv-driver.c 		btv->init.ov.w.width  = fb->fmt.width;
btv              2624 drivers/media/pci/bt8xx/bttv-driver.c 		btv->init.ov.w.height = fb->fmt.height;
btv              2634 drivers/media/pci/bt8xx/bttv-driver.c 			new->crop = btv->crop[!!fh->do_crop].rect;
btv              2635 drivers/media/pci/bt8xx/bttv-driver.c 			bttv_overlay_risc(btv, &fh->ov, fh->ovfmt, new);
btv              2636 drivers/media/pci/bt8xx/bttv-driver.c 			retval = bttv_switch_overlay(btv, fh, new);
btv              2659 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2662 drivers/media/pci/bt8xx/bttv-driver.c 	if (!check_alloc_btres_lock(btv, fh, res))
btv              2679 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2682 drivers/media/pci/bt8xx/bttv-driver.c 	if (!check_alloc_btres_lock(btv, fh, res))
btv              2692 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2700 drivers/media/pci/bt8xx/bttv-driver.c 	free_btres_lock(btv, fh, res);
btv              2708 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2713 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_video_std_frame_period(bttv_tvnorms[btv->tvnorm].v4l2_id,
btv              2723 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2730 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, tuner, g_tuner, t);
btv              2736 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->audio_mode_gpio)
btv              2737 drivers/media/pci/bt8xx/bttv-driver.c 		btv->audio_mode_gpio(btv, t, 0);
btv              2746 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2752 drivers/media/pci/bt8xx/bttv-driver.c 	*f = bttv_tvnorms[btv->tvnorm].cropcap.pixelaspect;
btv              2759 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2772 drivers/media/pci/bt8xx/bttv-driver.c 		sel->r = btv->crop[!!fh->do_crop].rect;
btv              2775 drivers/media/pci/bt8xx/bttv-driver.c 		sel->r = bttv_tvnorms[btv->tvnorm].cropcap.defrect;
btv              2778 drivers/media/pci/bt8xx/bttv-driver.c 		sel->r = bttv_tvnorms[btv->tvnorm].cropcap.bounds;
btv              2790 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              2811 drivers/media/pci/bt8xx/bttv-driver.c 	if (locked_btres(fh->btv, VIDEO_RESOURCES)) {
btv              2815 drivers/media/pci/bt8xx/bttv-driver.c 	b = &bttv_tvnorms[btv->tvnorm].cropcap.bounds;
btv              2821 drivers/media/pci/bt8xx/bttv-driver.c 	b_top = max(b->top, btv->vbi_end);
btv              2845 drivers/media/pci/bt8xx/bttv-driver.c 	btv->crop[1] = c;
btv              2851 drivers/media/pci/bt8xx/bttv-driver.c 		btv->init.width = c.min_scaled_width;
btv              2854 drivers/media/pci/bt8xx/bttv-driver.c 		btv->init.width = c.max_scaled_width;
btv              2859 drivers/media/pci/bt8xx/bttv-driver.c 		btv->init.height = c.min_scaled_height;
btv              2862 drivers/media/pci/bt8xx/bttv-driver.c 		btv->init.height = c.max_scaled_height;
btv              2874 drivers/media/pci/bt8xx/bttv-driver.c 	if (fh->btv->errors)
btv              2875 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_reinit_bt848(fh->btv);
btv              2877 drivers/media/pci/bt8xx/bttv-driver.c 		fh->btv->c.nr, (int)count, v4l2_type_names[fh->type]);
btv              2881 drivers/media/pci/bt8xx/bttv-driver.c 		if (!check_alloc_btres_lock(fh->btv, fh, RESOURCE_VIDEO_READ)) {
btv              2888 drivers/media/pci/bt8xx/bttv-driver.c 		free_btres_lock(fh->btv, fh, RESOURCE_VIDEO_READ);
btv              2891 drivers/media/pci/bt8xx/bttv-driver.c 		if (!check_alloc_btres_lock(fh->btv,fh,RESOURCE_VBI))
btv              2919 drivers/media/pci/bt8xx/bttv-driver.c 		if (!check_alloc_btres_lock(fh->btv,fh,RESOURCE_VBI))
btv              2933 drivers/media/pci/bt8xx/bttv-driver.c 			if (locked_btres(fh->btv,RESOURCE_VIDEO_STREAM))
btv              2961 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = video_drvdata(file);
btv              2977 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.nr, v4l2_type_names[type]);
btv              2983 drivers/media/pci/bt8xx/bttv-driver.c 	btv->users++;
btv              2986 drivers/media/pci/bt8xx/bttv-driver.c 	*fh = btv->init;
btv              2993 drivers/media/pci/bt8xx/bttv-driver.c 			    &btv->c.pci->dev, &btv->s_lock,
btv              2997 drivers/media/pci/bt8xx/bttv-driver.c 			    fh, &btv->lock);
btv              2999 drivers/media/pci/bt8xx/bttv-driver.c 			    &btv->c.pci->dev, &btv->s_lock,
btv              3003 drivers/media/pci/bt8xx/bttv-driver.c 			    fh, &btv->lock);
btv              3004 drivers/media/pci/bt8xx/bttv-driver.c 	set_tvnorm(btv,btv->tvnorm);
btv              3005 drivers/media/pci/bt8xx/bttv-driver.c 	set_input(btv, btv->input, btv->tvnorm);
btv              3006 drivers/media/pci/bt8xx/bttv-driver.c 	audio_mute(btv, btv->mute);
btv              3022 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_vbi_fmt_reset(&fh->vbi_fmt, btv->tvnorm);
btv              3024 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_field_count(btv);
btv              3032 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3036 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_switch_overlay(btv,fh,NULL);
btv              3041 drivers/media/pci/bt8xx/bttv-driver.c 		free_btres_lock(btv,fh,RESOURCE_VIDEO_STREAM);
btv              3048 drivers/media/pci/bt8xx/bttv-driver.c 		free_btres_lock(btv, fh, RESOURCE_VIDEO_READ);
btv              3054 drivers/media/pci/bt8xx/bttv-driver.c 		free_btres_lock(btv,fh,RESOURCE_VBI);
btv              3063 drivers/media/pci/bt8xx/bttv-driver.c 	btv->users--;
btv              3064 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_field_count(btv);
btv              3066 drivers/media/pci/bt8xx/bttv-driver.c 	if (!btv->users)
btv              3067 drivers/media/pci/bt8xx/bttv-driver.c 		audio_mute(btv, btv->mute);
btv              3081 drivers/media/pci/bt8xx/bttv-driver.c 		fh->btv->c.nr, v4l2_type_names[fh->type],
btv              3154 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = video_drvdata(file);
btv              3159 drivers/media/pci/bt8xx/bttv-driver.c 	dprintk("%d: open called (radio)\n", btv->c.nr);
btv              3166 drivers/media/pci/bt8xx/bttv-driver.c 	*fh = btv->init;
btv              3169 drivers/media/pci/bt8xx/bttv-driver.c 	btv->radio_user++;
btv              3170 drivers/media/pci/bt8xx/bttv-driver.c 	audio_mute(btv, btv->mute);
btv              3180 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3188 drivers/media/pci/bt8xx/bttv-driver.c 	btv->radio_user--;
btv              3190 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, core, ioctl, SAA6588_CMD_CLOSE, &cmd);
btv              3192 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->radio_user == 0)
btv              3193 drivers/media/pci/bt8xx/bttv-driver.c 		btv->has_radio_tuner = 0;
btv              3200 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3206 drivers/media/pci/bt8xx/bttv-driver.c 	radio_enable(btv);
btv              3208 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, tuner, g_tuner, t);
btv              3210 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->audio_mode_gpio)
btv              3211 drivers/media/pci/bt8xx/bttv-driver.c 		btv->audio_mode_gpio(btv, t, 0);
btv              3213 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->has_tea575x)
btv              3214 drivers/media/pci/bt8xx/bttv-driver.c 		return snd_tea575x_g_tuner(&btv->tea, t);
btv              3223 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3228 drivers/media/pci/bt8xx/bttv-driver.c 	radio_enable(btv);
btv              3229 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, tuner, s_tuner, t);
btv              3237 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3239 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->has_tea575x)
btv              3240 drivers/media/pci/bt8xx/bttv-driver.c 		return snd_tea575x_s_hw_freq_seek(file, &btv->tea, a);
btv              3249 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3251 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->has_tea575x)
btv              3252 drivers/media/pci/bt8xx/bttv-driver.c 		return snd_tea575x_enum_freq_bands(&btv->tea, band);
btv              3261 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3269 drivers/media/pci/bt8xx/bttv-driver.c 	radio_enable(btv);
btv              3271 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, core, ioctl, SAA6588_CMD_READ, &cmd);
btv              3279 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = fh->btv;
btv              3288 drivers/media/pci/bt8xx/bttv-driver.c 	radio_enable(btv);
btv              3292 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_call_all(btv, core, ioctl, SAA6588_CMD_POLL, &cmd);
btv              3365 drivers/media/pci/bt8xx/bttv-driver.c static void bttv_risc_disasm(struct bttv *btv,
btv              3371 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.v4l2_dev.name, risc->cpu, (unsigned long)risc->dma);
btv              3374 drivers/media/pci/bt8xx/bttv-driver.c 			btv->c.v4l2_dev.name,
btv              3379 drivers/media/pci/bt8xx/bttv-driver.c 				btv->c.v4l2_dev.name,
btv              3387 drivers/media/pci/bt8xx/bttv-driver.c static void bttv_print_riscaddr(struct bttv *btv)
btv              3389 drivers/media/pci/bt8xx/bttv-driver.c 	pr_info("  main: %08llx\n", (unsigned long long)btv->main.dma);
btv              3391 drivers/media/pci/bt8xx/bttv-driver.c 		btv->cvbi ? (unsigned long long)btv->cvbi->top.dma : 0,
btv              3392 drivers/media/pci/bt8xx/bttv-driver.c 		btv->cvbi ? (unsigned long long)btv->cvbi->bottom.dma : 0);
btv              3394 drivers/media/pci/bt8xx/bttv-driver.c 		btv->curr.top
btv              3395 drivers/media/pci/bt8xx/bttv-driver.c 		? (unsigned long long)btv->curr.top->top.dma : 0,
btv              3396 drivers/media/pci/bt8xx/bttv-driver.c 		btv->curr.bottom
btv              3397 drivers/media/pci/bt8xx/bttv-driver.c 		? (unsigned long long)btv->curr.bottom->bottom.dma : 0);
btv              3399 drivers/media/pci/bt8xx/bttv-driver.c 		btv->screen ? (unsigned long long)btv->screen->top.dma : 0,
btv              3400 drivers/media/pci/bt8xx/bttv-driver.c 		btv->screen ? (unsigned long long)btv->screen->bottom.dma : 0);
btv              3401 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_risc_disasm(btv, &btv->main);
btv              3442 drivers/media/pci/bt8xx/bttv-driver.c static void bttv_irq_debug_low_latency(struct bttv *btv, u32 rc)
btv              3445 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.nr,
btv              3446 drivers/media/pci/bt8xx/bttv-driver.c 		(unsigned long)btv->main.dma,
btv              3447 drivers/media/pci/bt8xx/bttv-driver.c 		(unsigned long)le32_to_cpu(btv->main.cpu[RISC_SLOT_O_VBI+1]),
btv              3448 drivers/media/pci/bt8xx/bttv-driver.c 		(unsigned long)le32_to_cpu(btv->main.cpu[RISC_SLOT_O_FIELD+1]),
btv              3453 drivers/media/pci/bt8xx/bttv-driver.c 			  btv->c.nr);
btv              3457 drivers/media/pci/bt8xx/bttv-driver.c 		  btv->c.nr);
btv              3459 drivers/media/pci/bt8xx/bttv-driver.c 		  btv->c.nr);
btv              3464 drivers/media/pci/bt8xx/bttv-driver.c bttv_irq_next_video(struct bttv *btv, struct bttv_buffer_set *set)
btv              3471 drivers/media/pci/bt8xx/bttv-driver.c 	if (!list_empty(&btv->capture)) {
btv              3473 drivers/media/pci/bt8xx/bttv-driver.c 		item = list_entry(btv->capture.next, struct bttv_buffer, vb.queue);
btv              3481 drivers/media/pci/bt8xx/bttv-driver.c 		    (item->vb.queue.next != &btv->capture)) {
btv              3522 drivers/media/pci/bt8xx/bttv-driver.c 	if (NULL != btv->screen) {
btv              3523 drivers/media/pci/bt8xx/bttv-driver.c 		if (V4L2_FIELD_HAS_BOTH(btv->screen->vb.field)) {
btv              3525 drivers/media/pci/bt8xx/bttv-driver.c 				set->top    = btv->screen;
btv              3526 drivers/media/pci/bt8xx/bttv-driver.c 				set->bottom = btv->screen;
btv              3529 drivers/media/pci/bt8xx/bttv-driver.c 			if (V4L2_FIELD_TOP == btv->screen->vb.field &&
btv              3531 drivers/media/pci/bt8xx/bttv-driver.c 				set->top = btv->screen;
btv              3533 drivers/media/pci/bt8xx/bttv-driver.c 			if (V4L2_FIELD_BOTTOM == btv->screen->vb.field &&
btv              3535 drivers/media/pci/bt8xx/bttv-driver.c 				set->bottom = btv->screen;
btv              3541 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.nr, set->top, set->bottom,
btv              3542 drivers/media/pci/bt8xx/bttv-driver.c 		btv->screen, set->frame_irq, set->top_irq);
btv              3547 drivers/media/pci/bt8xx/bttv-driver.c bttv_irq_wakeup_video(struct bttv *btv, struct bttv_buffer_set *wakeup,
btv              3556 drivers/media/pci/bt8xx/bttv-driver.c 					 btv->c.nr, wakeup->top);
btv              3558 drivers/media/pci/bt8xx/bttv-driver.c 			wakeup->top->vb.field_count = btv->field_count;
btv              3566 drivers/media/pci/bt8xx/bttv-driver.c 					 btv->c.nr, wakeup->top);
btv              3568 drivers/media/pci/bt8xx/bttv-driver.c 			wakeup->top->vb.field_count = btv->field_count;
btv              3575 drivers/media/pci/bt8xx/bttv-driver.c 					 btv->c.nr, wakeup->bottom);
btv              3577 drivers/media/pci/bt8xx/bttv-driver.c 			wakeup->bottom->vb.field_count = btv->field_count;
btv              3585 drivers/media/pci/bt8xx/bttv-driver.c bttv_irq_wakeup_vbi(struct bttv *btv, struct bttv_buffer *wakeup,
btv              3592 drivers/media/pci/bt8xx/bttv-driver.c 	wakeup->vb.field_count = btv->field_count;
btv              3599 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = from_timer(btv, t, timeout);
btv              3607 drivers/media/pci/bt8xx/bttv-driver.c 			btv->c.nr, btv->framedrop, btv->irq_me, btv->irq_total,
btv              3613 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock_irqsave(&btv->s_lock,flags);
btv              3617 drivers/media/pci/bt8xx/bttv-driver.c 	old  = btv->curr;
btv              3618 drivers/media/pci/bt8xx/bttv-driver.c 	ovbi = btv->cvbi;
btv              3619 drivers/media/pci/bt8xx/bttv-driver.c 	btv->curr = new;
btv              3620 drivers/media/pci/bt8xx/bttv-driver.c 	btv->cvbi = NULL;
btv              3621 drivers/media/pci/bt8xx/bttv-driver.c 	btv->loop_irq = 0;
btv              3622 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_video(btv, &new);
btv              3623 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_vbi(btv,   NULL);
btv              3624 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_dma(btv, 0);
btv              3627 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_irq_wakeup_video(btv, &old, &new, VIDEOBUF_ERROR);
btv              3628 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_irq_wakeup_vbi(btv, ovbi, VIDEOBUF_ERROR);
btv              3631 drivers/media/pci/bt8xx/bttv-driver.c 	while (!list_empty(&btv->capture)) {
btv              3632 drivers/media/pci/bt8xx/bttv-driver.c 		item = list_entry(btv->capture.next, struct bttv_buffer, vb.queue);
btv              3637 drivers/media/pci/bt8xx/bttv-driver.c 	while (!list_empty(&btv->vcapture)) {
btv              3638 drivers/media/pci/bt8xx/bttv-driver.c 		item = list_entry(btv->vcapture.next, struct bttv_buffer, vb.queue);
btv              3644 drivers/media/pci/bt8xx/bttv-driver.c 	btv->errors++;
btv              3645 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock_irqrestore(&btv->s_lock,flags);
btv              3649 drivers/media/pci/bt8xx/bttv-driver.c bttv_irq_wakeup_top(struct bttv *btv)
btv              3651 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv_buffer *wakeup = btv->curr.top;
btv              3656 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock(&btv->s_lock);
btv              3657 drivers/media/pci/bt8xx/bttv-driver.c 	btv->curr.top_irq = 0;
btv              3658 drivers/media/pci/bt8xx/bttv-driver.c 	btv->curr.top = NULL;
btv              3659 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_risc_hook(btv, RISC_SLOT_O_FIELD, NULL, 0);
btv              3662 drivers/media/pci/bt8xx/bttv-driver.c 	wakeup->vb.field_count = btv->field_count;
btv              3665 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock(&btv->s_lock);
btv              3678 drivers/media/pci/bt8xx/bttv-driver.c bttv_irq_switch_video(struct bttv *btv)
btv              3684 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock(&btv->s_lock);
btv              3687 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_irq_next_video(btv, &new);
btv              3689 drivers/media/pci/bt8xx/bttv-driver.c 	if ((btv->curr.top    && is_active(&btv->curr.top->top,       rc)) ||
btv              3690 drivers/media/pci/bt8xx/bttv-driver.c 	    (btv->curr.bottom && is_active(&btv->curr.bottom->bottom, rc))) {
btv              3691 drivers/media/pci/bt8xx/bttv-driver.c 		btv->framedrop++;
btv              3693 drivers/media/pci/bt8xx/bttv-driver.c 			bttv_irq_debug_low_latency(btv, rc);
btv              3694 drivers/media/pci/bt8xx/bttv-driver.c 		spin_unlock(&btv->s_lock);
btv              3699 drivers/media/pci/bt8xx/bttv-driver.c 	old = btv->curr;
btv              3700 drivers/media/pci/bt8xx/bttv-driver.c 	btv->curr = new;
btv              3701 drivers/media/pci/bt8xx/bttv-driver.c 	btv->loop_irq &= ~1;
btv              3702 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_video(btv, &new);
btv              3703 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_dma(btv, 0);
btv              3706 drivers/media/pci/bt8xx/bttv-driver.c 	if (UNSET != btv->new_input) {
btv              3707 drivers/media/pci/bt8xx/bttv-driver.c 		video_mux(btv,btv->new_input);
btv              3708 drivers/media/pci/bt8xx/bttv-driver.c 		btv->new_input = UNSET;
btv              3712 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_irq_wakeup_video(btv, &old, &new, VIDEOBUF_DONE);
btv              3713 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock(&btv->s_lock);
btv              3717 drivers/media/pci/bt8xx/bttv-driver.c bttv_irq_switch_vbi(struct bttv *btv)
btv              3723 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock(&btv->s_lock);
btv              3725 drivers/media/pci/bt8xx/bttv-driver.c 	if (!list_empty(&btv->vcapture))
btv              3726 drivers/media/pci/bt8xx/bttv-driver.c 		new = list_entry(btv->vcapture.next, struct bttv_buffer, vb.queue);
btv              3727 drivers/media/pci/bt8xx/bttv-driver.c 	old = btv->cvbi;
btv              3732 drivers/media/pci/bt8xx/bttv-driver.c 		btv->framedrop++;
btv              3734 drivers/media/pci/bt8xx/bttv-driver.c 			bttv_irq_debug_low_latency(btv, rc);
btv              3735 drivers/media/pci/bt8xx/bttv-driver.c 		spin_unlock(&btv->s_lock);
btv              3740 drivers/media/pci/bt8xx/bttv-driver.c 	btv->cvbi = new;
btv              3741 drivers/media/pci/bt8xx/bttv-driver.c 	btv->loop_irq &= ~4;
btv              3742 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_vbi(btv, new);
btv              3743 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_dma(btv, 0);
btv              3745 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_irq_wakeup_vbi(btv, old, VIDEOBUF_DONE);
btv              3746 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock(&btv->s_lock);
btv              3754 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv;
btv              3757 drivers/media/pci/bt8xx/bttv-driver.c 	btv=(struct bttv *)dev_id;
btv              3774 drivers/media/pci/bt8xx/bttv-driver.c 				 btv->c.nr, count, btv->field_count,
btv              3793 drivers/media/pci/bt8xx/bttv-driver.c 			btv->field_count++;
btv              3795 drivers/media/pci/bt8xx/bttv-driver.c 		if ((astat & BT848_INT_GPINT) && btv->remote) {
btv              3796 drivers/media/pci/bt8xx/bttv-driver.c 			bttv_input_irq(btv);
btv              3800 drivers/media/pci/bt8xx/bttv-driver.c 			btv->i2c_done = stat;
btv              3801 drivers/media/pci/bt8xx/bttv-driver.c 			wake_up(&btv->i2c_queue);
btv              3805 drivers/media/pci/bt8xx/bttv-driver.c 			bttv_irq_switch_vbi(btv);
btv              3808 drivers/media/pci/bt8xx/bttv-driver.c 			bttv_irq_wakeup_top(btv);
btv              3811 drivers/media/pci/bt8xx/bttv-driver.c 			bttv_irq_switch_video(btv);
btv              3813 drivers/media/pci/bt8xx/bttv-driver.c 		if ((astat & BT848_INT_HLOCK)  &&  btv->opt_automute)
btv              3815 drivers/media/pci/bt8xx/bttv-driver.c 			audio_mux_gpio(btv, btv->audio_input, btv->mute);
btv              3819 drivers/media/pci/bt8xx/bttv-driver.c 				btv->c.nr,
btv              3826 drivers/media/pci/bt8xx/bttv-driver.c 				bttv_print_riscaddr(btv);
btv              3830 drivers/media/pci/bt8xx/bttv-driver.c 				btv->c.nr, btread(BT848_RISC_COUNT));
btv              3832 drivers/media/pci/bt8xx/bttv-driver.c 				bttv_print_riscaddr(btv);
btv              3842 drivers/media/pci/bt8xx/bttv-driver.c 				       btv->c.nr);
btv              3845 drivers/media/pci/bt8xx/bttv-driver.c 				       btv->c.nr);
btv              3856 drivers/media/pci/bt8xx/bttv-driver.c 	btv->irq_total++;
btv              3858 drivers/media/pci/bt8xx/bttv-driver.c 		btv->irq_me++;
btv              3866 drivers/media/pci/bt8xx/bttv-driver.c static void vdev_init(struct bttv *btv,
btv              3872 drivers/media/pci/bt8xx/bttv-driver.c 	vfd->v4l2_dev = &btv->c.v4l2_dev;
btv              3874 drivers/media/pci/bt8xx/bttv-driver.c 	video_set_drvdata(vfd, btv);
btv              3876 drivers/media/pci/bt8xx/bttv-driver.c 		 btv->id, (btv->id==848 && btv->revision==0x12) ? "A" : "",
btv              3877 drivers/media/pci/bt8xx/bttv-driver.c 		 type_name, bttv_tvcards[btv->c.type].name);
btv              3878 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->tuner_type == TUNER_ABSENT) {
btv              3886 drivers/media/pci/bt8xx/bttv-driver.c static void bttv_unregister_video(struct bttv *btv)
btv              3888 drivers/media/pci/bt8xx/bttv-driver.c 	video_unregister_device(&btv->video_dev);
btv              3889 drivers/media/pci/bt8xx/bttv-driver.c 	video_unregister_device(&btv->vbi_dev);
btv              3890 drivers/media/pci/bt8xx/bttv-driver.c 	video_unregister_device(&btv->radio_dev);
btv              3894 drivers/media/pci/bt8xx/bttv-driver.c static int bttv_register_video(struct bttv *btv)
btv              3900 drivers/media/pci/bt8xx/bttv-driver.c 	vdev_init(btv, &btv->video_dev, &bttv_video_template, "video");
btv              3901 drivers/media/pci/bt8xx/bttv-driver.c 	btv->video_dev.device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
btv              3903 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->tuner_type != TUNER_ABSENT)
btv              3904 drivers/media/pci/bt8xx/bttv-driver.c 		btv->video_dev.device_caps |= V4L2_CAP_TUNER;
btv              3906 drivers/media/pci/bt8xx/bttv-driver.c 		btv->video_dev.device_caps |= V4L2_CAP_VIDEO_OVERLAY;
btv              3908 drivers/media/pci/bt8xx/bttv-driver.c 	if (video_register_device(&btv->video_dev, VFL_TYPE_GRABBER,
btv              3909 drivers/media/pci/bt8xx/bttv-driver.c 				  video_nr[btv->c.nr]) < 0)
btv              3912 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.nr, video_device_node_name(&btv->video_dev));
btv              3913 drivers/media/pci/bt8xx/bttv-driver.c 	if (device_create_file(&btv->video_dev.dev,
btv              3915 drivers/media/pci/bt8xx/bttv-driver.c 		pr_err("%d: device_create_file 'card' failed\n", btv->c.nr);
btv              3920 drivers/media/pci/bt8xx/bttv-driver.c 	vdev_init(btv, &btv->vbi_dev, &bttv_video_template, "vbi");
btv              3921 drivers/media/pci/bt8xx/bttv-driver.c 	btv->vbi_dev.device_caps = V4L2_CAP_VBI_CAPTURE | V4L2_CAP_READWRITE |
btv              3923 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->tuner_type != TUNER_ABSENT)
btv              3924 drivers/media/pci/bt8xx/bttv-driver.c 		btv->vbi_dev.device_caps |= V4L2_CAP_TUNER;
btv              3926 drivers/media/pci/bt8xx/bttv-driver.c 	if (video_register_device(&btv->vbi_dev, VFL_TYPE_VBI,
btv              3927 drivers/media/pci/bt8xx/bttv-driver.c 				  vbi_nr[btv->c.nr]) < 0)
btv              3930 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.nr, video_device_node_name(&btv->vbi_dev));
btv              3932 drivers/media/pci/bt8xx/bttv-driver.c 	if (!btv->has_radio)
btv              3935 drivers/media/pci/bt8xx/bttv-driver.c 	vdev_init(btv, &btv->radio_dev, &radio_template, "radio");
btv              3936 drivers/media/pci/bt8xx/bttv-driver.c 	btv->radio_dev.device_caps = V4L2_CAP_RADIO | V4L2_CAP_TUNER;
btv              3937 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->has_saa6588)
btv              3938 drivers/media/pci/bt8xx/bttv-driver.c 		btv->radio_dev.device_caps |= V4L2_CAP_READWRITE |
btv              3940 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->has_tea575x)
btv              3941 drivers/media/pci/bt8xx/bttv-driver.c 		btv->radio_dev.device_caps |= V4L2_CAP_HW_FREQ_SEEK;
btv              3942 drivers/media/pci/bt8xx/bttv-driver.c 	btv->radio_dev.ctrl_handler = &btv->radio_ctrl_handler;
btv              3943 drivers/media/pci/bt8xx/bttv-driver.c 	if (video_register_device(&btv->radio_dev, VFL_TYPE_RADIO,
btv              3944 drivers/media/pci/bt8xx/bttv-driver.c 				  radio_nr[btv->c.nr]) < 0)
btv              3947 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.nr, video_device_node_name(&btv->radio_dev));
btv              3953 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_unregister_video(btv);
btv              3980 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv;
btv              3986 drivers/media/pci/bt8xx/bttv-driver.c 	bttvs[bttv_num] = btv = kzalloc(sizeof(*btv), GFP_KERNEL);
btv              3987 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv == NULL) {
btv              3991 drivers/media/pci/bt8xx/bttv-driver.c 	btv->c.nr  = bttv_num;
btv              3992 drivers/media/pci/bt8xx/bttv-driver.c 	snprintf(btv->c.v4l2_dev.name, sizeof(btv->c.v4l2_dev.name),
btv              3993 drivers/media/pci/bt8xx/bttv-driver.c 			"bttv%d", btv->c.nr);
btv              3996 drivers/media/pci/bt8xx/bttv-driver.c 	mutex_init(&btv->lock);
btv              3997 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock_init(&btv->s_lock);
btv              3998 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock_init(&btv->gpio_lock);
btv              3999 drivers/media/pci/bt8xx/bttv-driver.c 	init_waitqueue_head(&btv->i2c_queue);
btv              4000 drivers/media/pci/bt8xx/bttv-driver.c 	INIT_LIST_HEAD(&btv->c.subs);
btv              4001 drivers/media/pci/bt8xx/bttv-driver.c 	INIT_LIST_HEAD(&btv->capture);
btv              4002 drivers/media/pci/bt8xx/bttv-driver.c 	INIT_LIST_HEAD(&btv->vcapture);
btv              4004 drivers/media/pci/bt8xx/bttv-driver.c 	timer_setup(&btv->timeout, bttv_irq_timeout, 0);
btv              4006 drivers/media/pci/bt8xx/bttv-driver.c 	btv->i2c_rc = -1;
btv              4007 drivers/media/pci/bt8xx/bttv-driver.c 	btv->tuner_type  = UNSET;
btv              4008 drivers/media/pci/bt8xx/bttv-driver.c 	btv->new_input   = UNSET;
btv              4009 drivers/media/pci/bt8xx/bttv-driver.c 	btv->has_radio=radio[btv->c.nr];
btv              4012 drivers/media/pci/bt8xx/bttv-driver.c 	btv->c.pci = dev;
btv              4013 drivers/media/pci/bt8xx/bttv-driver.c 	btv->id  = dev->device;
btv              4015 drivers/media/pci/bt8xx/bttv-driver.c 		pr_warn("%d: Can't enable device\n", btv->c.nr);
btv              4019 drivers/media/pci/bt8xx/bttv-driver.c 		pr_warn("%d: No suitable DMA available\n", btv->c.nr);
btv              4024 drivers/media/pci/bt8xx/bttv-driver.c 				btv->c.v4l2_dev.name)) {
btv              4026 drivers/media/pci/bt8xx/bttv-driver.c 			btv->c.nr,
btv              4033 drivers/media/pci/bt8xx/bttv-driver.c 	result = v4l2_device_register(&dev->dev, &btv->c.v4l2_dev);
btv              4035 drivers/media/pci/bt8xx/bttv-driver.c 		pr_warn("%d: v4l2_device_register() failed\n", btv->c.nr);
btv              4038 drivers/media/pci/bt8xx/bttv-driver.c 	hdl = &btv->ctrl_handler;
btv              4040 drivers/media/pci/bt8xx/bttv-driver.c 	btv->c.v4l2_dev.ctrl_handler = hdl;
btv              4041 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_ctrl_handler_init(&btv->radio_ctrl_handler, 6);
btv              4043 drivers/media/pci/bt8xx/bttv-driver.c 	btv->revision = dev->revision;
btv              4046 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_num, btv->id, btv->revision, pci_name(dev),
btv              4047 drivers/media/pci/bt8xx/bttv-driver.c 		btv->c.pci->irq, lat,
btv              4051 drivers/media/pci/bt8xx/bttv-driver.c 	btv->bt848_mmio = ioremap(pci_resource_start(dev, 0), 0x1000);
btv              4052 drivers/media/pci/bt8xx/bttv-driver.c 	if (NULL == btv->bt848_mmio) {
btv              4053 drivers/media/pci/bt8xx/bttv-driver.c 		pr_err("%d: ioremap() failed\n", btv->c.nr);
btv              4059 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_idcard(btv);
btv              4063 drivers/media/pci/bt8xx/bttv-driver.c 	result = request_irq(btv->c.pci->irq, bttv_irq,
btv              4064 drivers/media/pci/bt8xx/bttv-driver.c 	    IRQF_SHARED, btv->c.v4l2_dev.name, (void *)btv);
btv              4067 drivers/media/pci/bt8xx/bttv-driver.c 		       bttv_num, btv->c.pci->irq);
btv              4071 drivers/media/pci/bt8xx/bttv-driver.c 	if (0 != bttv_handle_chipset(btv)) {
btv              4077 drivers/media/pci/bt8xx/bttv-driver.c 	btv->opt_combfilter = combfilter;
btv              4080 drivers/media/pci/bt8xx/bttv-driver.c 	btv->opt_automute   = automute;
btv              4083 drivers/media/pci/bt8xx/bttv-driver.c 	btv->opt_vcr_hack   = vcr_hack;
btv              4087 drivers/media/pci/bt8xx/bttv-driver.c 	btv->opt_uv_ratio   = uv_ratio;
btv              4093 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.btv         = btv;
btv              4094 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.w.width  = 320;
btv              4095 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.w.height = 240;
btv              4096 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.fmt         = format_by_fourcc(V4L2_PIX_FMT_BGR24);
btv              4097 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.width       = 320;
btv              4098 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.height      = 240;
btv              4099 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.w.width  = 320;
btv              4100 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.w.height = 240;
btv              4101 drivers/media/pci/bt8xx/bttv-driver.c 	btv->init.ov.field    = V4L2_FIELD_INTERLACED;
btv              4102 drivers/media/pci/bt8xx/bttv-driver.c 	btv->input = 0;
btv              4118 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->volume_gpio)
btv              4134 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_gpio_tracking(btv,"pre-init");
btv              4136 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_risc_init_main(btv);
btv              4137 drivers/media/pci/bt8xx/bttv-driver.c 	init_bt848(btv);
btv              4143 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_gpio_tracking(btv,"init");
btv              4146 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_init_card1(btv);
btv              4149 drivers/media/pci/bt8xx/bttv-driver.c 	init_bttv_i2c(btv);
btv              4152 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_init_card2(btv);
btv              4153 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_init_tuner(btv);
btv              4154 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->tuner_type != TUNER_ABSENT) {
btv              4155 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_set_frequency(btv, &init_freq);
btv              4156 drivers/media/pci/bt8xx/bttv-driver.c 		btv->radio_freq = 90500 * 16; /* 90.5Mhz default */
btv              4158 drivers/media/pci/bt8xx/bttv-driver.c 	btv->std = V4L2_STD_PAL;
btv              4159 drivers/media/pci/bt8xx/bttv-driver.c 	init_irqreg(btv);
btv              4160 drivers/media/pci/bt8xx/bttv-driver.c 	if (!bttv_tvcards[btv->c.type].no_video)
btv              4167 drivers/media/pci/bt8xx/bttv-driver.c 	audio_mute(btv, 1);
btv              4170 drivers/media/pci/bt8xx/bttv-driver.c 	if (!bttv_tvcards[btv->c.type].no_video) {
btv              4171 drivers/media/pci/bt8xx/bttv-driver.c 		v4l2_ctrl_add_handler(&btv->radio_ctrl_handler, hdl,
btv              4173 drivers/media/pci/bt8xx/bttv-driver.c 		if (btv->radio_ctrl_handler.error) {
btv              4174 drivers/media/pci/bt8xx/bttv-driver.c 			result = btv->radio_ctrl_handler.error;
btv              4177 drivers/media/pci/bt8xx/bttv-driver.c 		set_input(btv, 0, btv->tvnorm);
btv              4178 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_crop_reset(&btv->crop[0], btv->tvnorm);
btv              4179 drivers/media/pci/bt8xx/bttv-driver.c 		btv->crop[1] = btv->crop[0]; /* current = default */
btv              4180 drivers/media/pci/bt8xx/bttv-driver.c 		disclaim_vbi_lines(btv);
btv              4181 drivers/media/pci/bt8xx/bttv-driver.c 		disclaim_video_lines(btv);
btv              4182 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_register_video(btv);
btv              4186 drivers/media/pci/bt8xx/bttv-driver.c 	if (bttv_tvcards[btv->c.type].has_dvb) {
btv              4187 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_sub_add_device(&btv->c, "dvb");
btv              4188 drivers/media/pci/bt8xx/bttv-driver.c 		request_modules(btv);
btv              4192 drivers/media/pci/bt8xx/bttv-driver.c 		init_bttv_i2c_ir(btv);
btv              4193 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_input_init(btv);
btv              4201 drivers/media/pci/bt8xx/bttv-driver.c 	free_irq(btv->c.pci->irq,btv);
btv              4204 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_ctrl_handler_free(&btv->ctrl_handler);
btv              4205 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_ctrl_handler_free(&btv->radio_ctrl_handler);
btv              4206 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_device_unregister(&btv->c.v4l2_dev);
btv              4209 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->bt848_mmio)
btv              4210 drivers/media/pci/bt8xx/bttv-driver.c 		iounmap(btv->bt848_mmio);
btv              4211 drivers/media/pci/bt8xx/bttv-driver.c 	release_mem_region(pci_resource_start(btv->c.pci,0),
btv              4212 drivers/media/pci/bt8xx/bttv-driver.c 			   pci_resource_len(btv->c.pci,0));
btv              4213 drivers/media/pci/bt8xx/bttv-driver.c 	pci_disable_device(btv->c.pci);
btv              4220 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = to_bttv(v4l2_dev);
btv              4223 drivers/media/pci/bt8xx/bttv-driver.c 		pr_info("%d: unloading\n", btv->c.nr);
btv              4225 drivers/media/pci/bt8xx/bttv-driver.c 	if (bttv_tvcards[btv->c.type].has_dvb)
btv              4226 drivers/media/pci/bt8xx/bttv-driver.c 		flush_request_modules(btv);
btv              4234 drivers/media/pci/bt8xx/bttv-driver.c 		bttv_gpio_tracking(btv,"cleanup");
btv              4237 drivers/media/pci/bt8xx/bttv-driver.c 	btv->shutdown=1;
btv              4238 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_input_fini(btv);
btv              4239 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_sub_del_devices(&btv->c);
btv              4242 drivers/media/pci/bt8xx/bttv-driver.c 	fini_bttv_i2c(btv);
btv              4245 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_unregister_video(btv);
btv              4248 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_ctrl_handler_free(&btv->ctrl_handler);
btv              4249 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_ctrl_handler_free(&btv->radio_ctrl_handler);
btv              4250 drivers/media/pci/bt8xx/bttv-driver.c 	btcx_riscmem_free(btv->c.pci,&btv->main);
btv              4253 drivers/media/pci/bt8xx/bttv-driver.c 	free_irq(btv->c.pci->irq,btv);
btv              4254 drivers/media/pci/bt8xx/bttv-driver.c 	iounmap(btv->bt848_mmio);
btv              4255 drivers/media/pci/bt8xx/bttv-driver.c 	release_mem_region(pci_resource_start(btv->c.pci,0),
btv              4256 drivers/media/pci/bt8xx/bttv-driver.c 			   pci_resource_len(btv->c.pci,0));
btv              4257 drivers/media/pci/bt8xx/bttv-driver.c 	pci_disable_device(btv->c.pci);
btv              4259 drivers/media/pci/bt8xx/bttv-driver.c 	v4l2_device_unregister(&btv->c.v4l2_dev);
btv              4260 drivers/media/pci/bt8xx/bttv-driver.c 	bttvs[btv->c.nr] = NULL;
btv              4261 drivers/media/pci/bt8xx/bttv-driver.c 	kfree(btv);
btv              4270 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = to_bttv(v4l2_dev);
btv              4274 drivers/media/pci/bt8xx/bttv-driver.c 	dprintk("%d: suspend %d\n", btv->c.nr, state.event);
btv              4277 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock_irqsave(&btv->s_lock,flags);
btv              4279 drivers/media/pci/bt8xx/bttv-driver.c 	btv->state.video = btv->curr;
btv              4280 drivers/media/pci/bt8xx/bttv-driver.c 	btv->state.vbi   = btv->cvbi;
btv              4281 drivers/media/pci/bt8xx/bttv-driver.c 	btv->state.loop_irq = btv->loop_irq;
btv              4282 drivers/media/pci/bt8xx/bttv-driver.c 	btv->curr = idle;
btv              4283 drivers/media/pci/bt8xx/bttv-driver.c 	btv->loop_irq = 0;
btv              4284 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_video(btv, &idle);
btv              4285 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_vbi(btv, NULL);
btv              4286 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_dma(btv, 0);
btv              4288 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock_irqrestore(&btv->s_lock,flags);
btv              4291 drivers/media/pci/bt8xx/bttv-driver.c 	btv->state.gpio_enable = btread(BT848_GPIO_OUT_EN);
btv              4292 drivers/media/pci/bt8xx/bttv-driver.c 	btv->state.gpio_data   = gpio_read();
btv              4298 drivers/media/pci/bt8xx/bttv-driver.c 		btv->state.disabled = 1;
btv              4306 drivers/media/pci/bt8xx/bttv-driver.c 	struct bttv *btv = to_bttv(v4l2_dev);
btv              4310 drivers/media/pci/bt8xx/bttv-driver.c 	dprintk("%d: resume\n", btv->c.nr);
btv              4313 drivers/media/pci/bt8xx/bttv-driver.c 	if (btv->state.disabled) {
btv              4316 drivers/media/pci/bt8xx/bttv-driver.c 			pr_warn("%d: Can't enable device\n", btv->c.nr);
btv              4319 drivers/media/pci/bt8xx/bttv-driver.c 		btv->state.disabled = 0;
btv              4324 drivers/media/pci/bt8xx/bttv-driver.c 		pr_warn("%d: Can't enable device\n", btv->c.nr);
btv              4325 drivers/media/pci/bt8xx/bttv-driver.c 		btv->state.disabled = 1;
btv              4332 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_reinit_bt848(btv);
btv              4333 drivers/media/pci/bt8xx/bttv-driver.c 	gpio_inout(0xffffff, btv->state.gpio_enable);
btv              4334 drivers/media/pci/bt8xx/bttv-driver.c 	gpio_write(btv->state.gpio_data);
btv              4337 drivers/media/pci/bt8xx/bttv-driver.c 	spin_lock_irqsave(&btv->s_lock,flags);
btv              4338 drivers/media/pci/bt8xx/bttv-driver.c 	btv->curr = btv->state.video;
btv              4339 drivers/media/pci/bt8xx/bttv-driver.c 	btv->cvbi = btv->state.vbi;
btv              4340 drivers/media/pci/bt8xx/bttv-driver.c 	btv->loop_irq = btv->state.loop_irq;
btv              4341 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_video(btv, &btv->curr);
btv              4342 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_buffer_activate_vbi(btv, btv->cvbi);
btv              4343 drivers/media/pci/bt8xx/bttv-driver.c 	bttv_set_dma(btv, 0);
btv              4344 drivers/media/pci/bt8xx/bttv-driver.c 	spin_unlock_irqrestore(&btv->s_lock,flags);
btv               131 drivers/media/pci/bt8xx/bttv-gpio.c 	struct bttv *btv = container_of(core, struct bttv, c);
btv               135 drivers/media/pci/bt8xx/bttv-gpio.c 	spin_lock_irqsave(&btv->gpio_lock,flags);
btv               140 drivers/media/pci/bt8xx/bttv-gpio.c 	spin_unlock_irqrestore(&btv->gpio_lock,flags);
btv               145 drivers/media/pci/bt8xx/bttv-gpio.c 	struct bttv *btv = container_of(core, struct bttv, c);
btv               154 drivers/media/pci/bt8xx/bttv-gpio.c 	struct bttv *btv = container_of(core, struct bttv, c);
btv               161 drivers/media/pci/bt8xx/bttv-gpio.c 	struct bttv *btv = container_of(core, struct bttv, c);
btv               165 drivers/media/pci/bt8xx/bttv-gpio.c 	spin_lock_irqsave(&btv->gpio_lock,flags);
btv               170 drivers/media/pci/bt8xx/bttv-gpio.c 	spin_unlock_irqrestore(&btv->gpio_lock,flags);
btv                48 drivers/media/pci/bt8xx/bttv-i2c.c 	struct bttv *btv = (struct bttv*)data;
btv                51 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_state |= 0x02;
btv                53 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_state &= ~0x02;
btv                54 drivers/media/pci/bt8xx/bttv-i2c.c 	btwrite(btv->i2c_state, BT848_I2C);
btv                60 drivers/media/pci/bt8xx/bttv-i2c.c 	struct bttv *btv = (struct bttv*)data;
btv                63 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_state |= 0x01;
btv                65 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_state &= ~0x01;
btv                66 drivers/media/pci/bt8xx/bttv-i2c.c 	btwrite(btv->i2c_state, BT848_I2C);
btv                72 drivers/media/pci/bt8xx/bttv-i2c.c 	struct bttv *btv = (struct bttv*)data;
btv                81 drivers/media/pci/bt8xx/bttv-i2c.c 	struct bttv *btv = (struct bttv*)data;
btv               106 drivers/media/pci/bt8xx/bttv-i2c.c bttv_i2c_wait_done(struct bttv *btv)
btv               111 drivers/media/pci/bt8xx/bttv-i2c.c 	if (wait_event_interruptible_timeout(btv->i2c_queue,
btv               112 drivers/media/pci/bt8xx/bttv-i2c.c 	    btv->i2c_done, msecs_to_jiffies(85)) == -ERESTARTSYS)
btv               115 drivers/media/pci/bt8xx/bttv-i2c.c 	if (btv->i2c_done & BT848_INT_RACK)
btv               117 drivers/media/pci/bt8xx/bttv-i2c.c 	btv->i2c_done = 0;
btv               125 drivers/media/pci/bt8xx/bttv-i2c.c bttv_i2c_sendbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
btv               139 drivers/media/pci/bt8xx/bttv-i2c.c 	retval = bttv_i2c_wait_done(btv);
btv               154 drivers/media/pci/bt8xx/bttv-i2c.c 		retval = bttv_i2c_wait_done(btv);
btv               175 drivers/media/pci/bt8xx/bttv-i2c.c bttv_i2c_readbytes(struct bttv *btv, const struct i2c_msg *msg, int last)
btv               196 drivers/media/pci/bt8xx/bttv-i2c.c 		retval = bttv_i2c_wait_done(btv);
btv               223 drivers/media/pci/bt8xx/bttv-i2c.c 	struct bttv *btv = to_bttv(v4l2_dev);
btv               234 drivers/media/pci/bt8xx/bttv-i2c.c 			retval = bttv_i2c_readbytes(btv, &msgs[i], i+1 == num);
btv               239 drivers/media/pci/bt8xx/bttv-i2c.c 			retval = bttv_i2c_sendbytes(btv, &msgs[i], i+1 == num);
btv               259 drivers/media/pci/bt8xx/bttv-i2c.c int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for)
btv               263 drivers/media/pci/bt8xx/bttv-i2c.c 	if (0 != btv->i2c_rc)
btv               267 drivers/media/pci/bt8xx/bttv-i2c.c 			btv->c.nr, probe_for, addr);
btv               268 drivers/media/pci/bt8xx/bttv-i2c.c 	btv->i2c_client.addr = addr >> 1;
btv               269 drivers/media/pci/bt8xx/bttv-i2c.c 	if (1 != i2c_master_recv(&btv->i2c_client, &buffer, 1)) {
btv               275 drivers/media/pci/bt8xx/bttv-i2c.c 				btv->c.nr, addr);
btv               284 drivers/media/pci/bt8xx/bttv-i2c.c int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
btv               290 drivers/media/pci/bt8xx/bttv-i2c.c 	if (0 != btv->i2c_rc)
btv               292 drivers/media/pci/bt8xx/bttv-i2c.c 	btv->i2c_client.addr = addr >> 1;
btv               295 drivers/media/pci/bt8xx/bttv-i2c.c 	if (bytes != i2c_master_send(&btv->i2c_client, buffer, bytes))
btv               301 drivers/media/pci/bt8xx/bttv-i2c.c void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr)
btv               304 drivers/media/pci/bt8xx/bttv-i2c.c 	if (0 != btv->i2c_rc)
btv               306 drivers/media/pci/bt8xx/bttv-i2c.c 	btv->i2c_client.addr = addr >> 1;
btv               307 drivers/media/pci/bt8xx/bttv-i2c.c 	tveeprom_read(&btv->i2c_client, eedata, 256);
btv               336 drivers/media/pci/bt8xx/bttv-i2c.c int init_bttv_i2c(struct bttv *btv)
btv               338 drivers/media/pci/bt8xx/bttv-i2c.c 	strscpy(btv->i2c_client.name, "bttv internal", I2C_NAME_SIZE);
btv               341 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->use_i2c_hw = 1;
btv               342 drivers/media/pci/bt8xx/bttv-i2c.c 	if (btv->use_i2c_hw) {
btv               344 drivers/media/pci/bt8xx/bttv-i2c.c 		strscpy(btv->c.i2c_adap.name, "bt878",
btv               345 drivers/media/pci/bt8xx/bttv-i2c.c 			sizeof(btv->c.i2c_adap.name));
btv               346 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->c.i2c_adap.algo = &bttv_algo;
btv               353 drivers/media/pci/bt8xx/bttv-i2c.c 		strscpy(btv->c.i2c_adap.name, "bttv",
btv               354 drivers/media/pci/bt8xx/bttv-i2c.c 			sizeof(btv->c.i2c_adap.name));
btv               355 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_algo = bttv_i2c_algo_bit_template;
btv               356 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_algo.udelay = i2c_udelay;
btv               357 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_algo.data = btv;
btv               358 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->c.i2c_adap.algo_data = &btv->i2c_algo;
btv               360 drivers/media/pci/bt8xx/bttv-i2c.c 	btv->c.i2c_adap.owner = THIS_MODULE;
btv               362 drivers/media/pci/bt8xx/bttv-i2c.c 	btv->c.i2c_adap.dev.parent = &btv->c.pci->dev;
btv               363 drivers/media/pci/bt8xx/bttv-i2c.c 	snprintf(btv->c.i2c_adap.name, sizeof(btv->c.i2c_adap.name),
btv               364 drivers/media/pci/bt8xx/bttv-i2c.c 		 "bt%d #%d [%s]", btv->id, btv->c.nr,
btv               365 drivers/media/pci/bt8xx/bttv-i2c.c 		 btv->use_i2c_hw ? "hw" : "sw");
btv               367 drivers/media/pci/bt8xx/bttv-i2c.c 	i2c_set_adapdata(&btv->c.i2c_adap, &btv->c.v4l2_dev);
btv               368 drivers/media/pci/bt8xx/bttv-i2c.c 	btv->i2c_client.adapter = &btv->c.i2c_adap;
btv               371 drivers/media/pci/bt8xx/bttv-i2c.c 	if (btv->use_i2c_hw) {
btv               372 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_rc = i2c_add_adapter(&btv->c.i2c_adap);
btv               374 drivers/media/pci/bt8xx/bttv-i2c.c 		bttv_bit_setscl(btv,1);
btv               375 drivers/media/pci/bt8xx/bttv-i2c.c 		bttv_bit_setsda(btv,1);
btv               376 drivers/media/pci/bt8xx/bttv-i2c.c 		btv->i2c_rc = i2c_bit_add_bus(&btv->c.i2c_adap);
btv               378 drivers/media/pci/bt8xx/bttv-i2c.c 	if (0 == btv->i2c_rc && i2c_scan)
btv               379 drivers/media/pci/bt8xx/bttv-i2c.c 		do_i2c_scan(btv->c.v4l2_dev.name, &btv->i2c_client);
btv               381 drivers/media/pci/bt8xx/bttv-i2c.c 	return btv->i2c_rc;
btv               384 drivers/media/pci/bt8xx/bttv-i2c.c int fini_bttv_i2c(struct bttv *btv)
btv               386 drivers/media/pci/bt8xx/bttv-i2c.c 	if (btv->i2c_rc == 0)
btv               387 drivers/media/pci/bt8xx/bttv-i2c.c 		i2c_del_adapter(&btv->c.i2c_adap);
btv                47 drivers/media/pci/bt8xx/bttv-if.c 	struct bttv *btv;
btv                53 drivers/media/pci/bt8xx/bttv-if.c 	btv = bttvs[card];
btv                54 drivers/media/pci/bt8xx/bttv-if.c 	if (!btv)
btv                59 drivers/media/pci/bt8xx/bttv-if.c 		bttv_gpio_tracking(btv,"extern enable");
btv                65 drivers/media/pci/bt8xx/bttv-if.c 	struct bttv *btv;
btv                71 drivers/media/pci/bt8xx/bttv-if.c 	btv = bttvs[card];
btv                72 drivers/media/pci/bt8xx/bttv-if.c 	if (!btv)
btv                75 drivers/media/pci/bt8xx/bttv-if.c 	if(btv->shutdown) {
btv                87 drivers/media/pci/bt8xx/bttv-if.c 	struct bttv *btv;
btv                93 drivers/media/pci/bt8xx/bttv-if.c 	btv = bttvs[card];
btv                94 drivers/media/pci/bt8xx/bttv-if.c 	if (!btv)
btv               101 drivers/media/pci/bt8xx/bttv-if.c 		bttv_gpio_tracking(btv,"extern write");
btv                40 drivers/media/pci/bt8xx/bttv-input.c static void ir_handle_key(struct bttv *btv)
btv                42 drivers/media/pci/bt8xx/bttv-input.c 	struct bttv_ir *ir = btv->remote;
btv                46 drivers/media/pci/bt8xx/bttv-input.c 	gpio = bttv_gpio_read(&btv->c);
btv                67 drivers/media/pci/bt8xx/bttv-input.c 		if (btv->c.type == BTTV_BOARD_WINFAST2000)
btv                75 drivers/media/pci/bt8xx/bttv-input.c static void ir_enltv_handle_key(struct bttv *btv)
btv                77 drivers/media/pci/bt8xx/bttv-input.c 	struct bttv_ir *ir = btv->remote;
btv                81 drivers/media/pci/bt8xx/bttv-input.c 	gpio = bttv_gpio_read(&btv->c);
btv               115 drivers/media/pci/bt8xx/bttv-input.c static int bttv_rc5_irq(struct bttv *btv);
btv               117 drivers/media/pci/bt8xx/bttv-input.c void bttv_input_irq(struct bttv *btv)
btv               119 drivers/media/pci/bt8xx/bttv-input.c 	struct bttv_ir *ir = btv->remote;
btv               122 drivers/media/pci/bt8xx/bttv-input.c 		bttv_rc5_irq(btv);
btv               124 drivers/media/pci/bt8xx/bttv-input.c 		ir_handle_key(btv);
btv               130 drivers/media/pci/bt8xx/bttv-input.c 	struct bttv *btv = ir->btv;
btv               132 drivers/media/pci/bt8xx/bttv-input.c 	if (btv->c.type == BTTV_BOARD_ENLTV_FM_2)
btv               133 drivers/media/pci/bt8xx/bttv-input.c 		ir_enltv_handle_key(btv);
btv               135 drivers/media/pci/bt8xx/bttv-input.c 		ir_handle_key(btv);
btv               235 drivers/media/pci/bt8xx/bttv-input.c static int bttv_rc5_irq(struct bttv *btv)
btv               237 drivers/media/pci/bt8xx/bttv-input.c 	struct bttv_ir *ir = btv->remote;
btv               244 drivers/media/pci/bt8xx/bttv-input.c 	gpio = bttv_gpio_read(&btv->c);
btv               283 drivers/media/pci/bt8xx/bttv-input.c 	bttv_gpio_write(&btv->c, gpio & ~(1 << 4));
btv               284 drivers/media/pci/bt8xx/bttv-input.c 	bttv_gpio_write(&btv->c, gpio | (1 << 4));
btv               304 drivers/media/pci/bt8xx/bttv-input.c static void bttv_ir_stop(struct bttv *btv)
btv               306 drivers/media/pci/bt8xx/bttv-input.c 	if (btv->remote->polling)
btv               307 drivers/media/pci/bt8xx/bttv-input.c 		del_timer_sync(&btv->remote->timer);
btv               309 drivers/media/pci/bt8xx/bttv-input.c 	if (btv->remote->rc5_gpio) {
btv               312 drivers/media/pci/bt8xx/bttv-input.c 		del_timer_sync(&btv->remote->timer);
btv               314 drivers/media/pci/bt8xx/bttv-input.c 		gpio = bttv_gpio_read(&btv->c);
btv               315 drivers/media/pci/bt8xx/bttv-input.c 		bttv_gpio_write(&btv->c, gpio & ~(1 << 4));
btv               362 drivers/media/pci/bt8xx/bttv-input.c void init_bttv_i2c_ir(struct bttv *btv)
btv               371 drivers/media/pci/bt8xx/bttv-input.c 	if (0 != btv->i2c_rc)
btv               375 drivers/media/pci/bt8xx/bttv-input.c 	memset(&btv->init_data, 0, sizeof(btv->init_data));
btv               378 drivers/media/pci/bt8xx/bttv-input.c 	switch (btv->c.type) {
btv               380 drivers/media/pci/bt8xx/bttv-input.c 		btv->init_data.name = "PV951";
btv               381 drivers/media/pci/bt8xx/bttv-input.c 		btv->init_data.get_key = get_key_pv951;
btv               382 drivers/media/pci/bt8xx/bttv-input.c 		btv->init_data.ir_codes = RC_MAP_PV951;
btv               387 drivers/media/pci/bt8xx/bttv-input.c 	if (btv->init_data.name) {
btv               388 drivers/media/pci/bt8xx/bttv-input.c 		info.platform_data = &btv->init_data;
btv               389 drivers/media/pci/bt8xx/bttv-input.c 		i2c_dev = i2c_new_device(&btv->c.i2c_adap, &info);
btv               399 drivers/media/pci/bt8xx/bttv-input.c 		i2c_dev = i2c_new_probed_device(&btv->c.i2c_adap, &info, addr_list, NULL);
btv               409 drivers/media/pci/bt8xx/bttv-input.c int bttv_input_init(struct bttv *btv)
btv               416 drivers/media/pci/bt8xx/bttv-input.c 	if (!btv->has_remote)
btv               425 drivers/media/pci/bt8xx/bttv-input.c 	switch (btv->c.type) {
btv               504 drivers/media/pci/bt8xx/bttv-input.c 		ir->last_gpio    = ir_extract_bits(bttv_gpio_read(&btv->c),
btv               510 drivers/media/pci/bt8xx/bttv-input.c 		dprintk("Ooops: IR config error [card=%d]\n", btv->c.type);
btv               518 drivers/media/pci/bt8xx/bttv-input.c 		bttv_gpio_inout(&btv->c, (1 << 4), 1 << 4);
btv               519 drivers/media/pci/bt8xx/bttv-input.c 		gpio = bttv_gpio_read(&btv->c);
btv               520 drivers/media/pci/bt8xx/bttv-input.c 		bttv_gpio_write(&btv->c, gpio & ~(1 << 4));
btv               521 drivers/media/pci/bt8xx/bttv-input.c 		bttv_gpio_write(&btv->c, gpio | (1 << 4));
btv               524 drivers/media/pci/bt8xx/bttv-input.c 		bttv_gpio_inout(&btv->c, ir->mask_keycode | ir->mask_keydown, 0);
btv               529 drivers/media/pci/bt8xx/bttv-input.c 	ir->btv = btv;
btv               532 drivers/media/pci/bt8xx/bttv-input.c 		 btv->c.type);
btv               534 drivers/media/pci/bt8xx/bttv-input.c 		 pci_name(btv->c.pci));
btv               540 drivers/media/pci/bt8xx/bttv-input.c 	if (btv->c.pci->subsystem_vendor) {
btv               541 drivers/media/pci/bt8xx/bttv-input.c 		rc->input_id.vendor  = btv->c.pci->subsystem_vendor;
btv               542 drivers/media/pci/bt8xx/bttv-input.c 		rc->input_id.product = btv->c.pci->subsystem_device;
btv               544 drivers/media/pci/bt8xx/bttv-input.c 		rc->input_id.vendor  = btv->c.pci->vendor;
btv               545 drivers/media/pci/bt8xx/bttv-input.c 		rc->input_id.product = btv->c.pci->device;
btv               547 drivers/media/pci/bt8xx/bttv-input.c 	rc->dev.parent = &btv->c.pci->dev;
btv               551 drivers/media/pci/bt8xx/bttv-input.c 	btv->remote = ir;
btv               562 drivers/media/pci/bt8xx/bttv-input.c 	bttv_ir_stop(btv);
btv               563 drivers/media/pci/bt8xx/bttv-input.c 	btv->remote = NULL;
btv               570 drivers/media/pci/bt8xx/bttv-input.c void bttv_input_fini(struct bttv *btv)
btv               572 drivers/media/pci/bt8xx/bttv-input.c 	if (btv->remote == NULL)
btv               575 drivers/media/pci/bt8xx/bttv-input.c 	bttv_ir_stop(btv);
btv               576 drivers/media/pci/bt8xx/bttv-input.c 	rc_unregister_device(btv->remote->dev);
btv               577 drivers/media/pci/bt8xx/bttv-input.c 	kfree(btv->remote);
btv               578 drivers/media/pci/bt8xx/bttv-input.c 	btv->remote = NULL;
btv                35 drivers/media/pci/bt8xx/bttv-risc.c bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
btv                54 drivers/media/pci/bt8xx/bttv-risc.c 	if ((rc = btcx_riscmem_alloc(btv->c.pci,risc,instructions)) < 0)
btv                70 drivers/media/pci/bt8xx/bttv-risc.c 		if ((btv->opt_vcr_hack) &&
btv               114 drivers/media/pci/bt8xx/bttv-risc.c bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
btv               137 drivers/media/pci/bt8xx/bttv-risc.c 	if ((rc = btcx_riscmem_alloc(btv->c.pci,risc,instructions*4*5)) < 0)
btv               150 drivers/media/pci/bt8xx/bttv-risc.c 		if ((btv->opt_vcr_hack) &&
btv               235 drivers/media/pci/bt8xx/bttv-risc.c bttv_risc_overlay(struct bttv *btv, struct btcx_riscmem *risc,
btv               256 drivers/media/pci/bt8xx/bttv-risc.c 	if ((rc = btcx_riscmem_alloc(btv->c.pci,risc,dwords*4)) < 0) {
btv               266 drivers/media/pci/bt8xx/bttv-risc.c 	addr  = (unsigned long)btv->fbuf.base;
btv               267 drivers/media/pci/bt8xx/bttv-risc.c 	addr += btv->fbuf.fmt.bytesperline * ov->w.top;
btv               272 drivers/media/pci/bt8xx/bttv-risc.c 	     line++, addr += btv->fbuf.fmt.bytesperline) {
btv               273 drivers/media/pci/bt8xx/bttv-risc.c 		if ((btv->opt_vcr_hack) &&
btv               326 drivers/media/pci/bt8xx/bttv-risc.c bttv_calc_geo_old(struct bttv *btv, struct bttv_geometry *geo,
btv               337 drivers/media/pci/bt8xx/bttv-risc.c 	if (btv->input == btv->dig) {
btv               360 drivers/media/pci/bt8xx/bttv-risc.c 	if (btv->opt_combfilter) {
btv               370 drivers/media/pci/bt8xx/bttv-risc.c bttv_calc_geo		(struct bttv *                  btv,
btv               387 drivers/media/pci/bt8xx/bttv-risc.c 	    || btv->input == btv->dig) {
btv               388 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_calc_geo_old(btv, geo, width, height,
btv               416 drivers/media/pci/bt8xx/bttv-risc.c 	if (btv->opt_combfilter) {
btv               426 drivers/media/pci/bt8xx/bttv-risc.c bttv_apply_geo(struct bttv *btv, struct bttv_geometry *geo, int odd)
btv               453 drivers/media/pci/bt8xx/bttv-risc.c bttv_set_dma(struct bttv *btv, int override)
btv               458 drivers/media/pci/bt8xx/bttv-risc.c 	btv->cap_ctl = 0;
btv               459 drivers/media/pci/bt8xx/bttv-risc.c 	if (NULL != btv->curr.top)      btv->cap_ctl |= 0x02;
btv               460 drivers/media/pci/bt8xx/bttv-risc.c 	if (NULL != btv->curr.bottom)   btv->cap_ctl |= 0x01;
btv               461 drivers/media/pci/bt8xx/bttv-risc.c 	if (NULL != btv->cvbi)          btv->cap_ctl |= 0x0c;
btv               464 drivers/media/pci/bt8xx/bttv-risc.c 	capctl |= (btv->cap_ctl & 0x03) ? 0x03 : 0x00;  /* capture  */
btv               465 drivers/media/pci/bt8xx/bttv-risc.c 	capctl |= (btv->cap_ctl & 0x0c) ? 0x0c : 0x00;  /* vbi data */
btv               469 drivers/media/pci/bt8xx/bttv-risc.c 		 btv->c.nr,capctl,btv->loop_irq,
btv               470 drivers/media/pci/bt8xx/bttv-risc.c 		 btv->cvbi         ? (unsigned long long)btv->cvbi->top.dma            : 0,
btv               471 drivers/media/pci/bt8xx/bttv-risc.c 		 btv->curr.top     ? (unsigned long long)btv->curr.top->top.dma        : 0,
btv               472 drivers/media/pci/bt8xx/bttv-risc.c 		 btv->cvbi         ? (unsigned long long)btv->cvbi->bottom.dma         : 0,
btv               473 drivers/media/pci/bt8xx/bttv-risc.c 		 btv->curr.bottom  ? (unsigned long long)btv->curr.bottom->bottom.dma  : 0);
btv               476 drivers/media/pci/bt8xx/bttv-risc.c 	if (btv->loop_irq) {
btv               478 drivers/media/pci/bt8xx/bttv-risc.c 		cmd |= (btv->loop_irq  & 0x0f) << 16;
btv               479 drivers/media/pci/bt8xx/bttv-risc.c 		cmd |= (~btv->loop_irq & 0x0f) << 20;
btv               481 drivers/media/pci/bt8xx/bttv-risc.c 	if (btv->curr.frame_irq || btv->loop_irq || btv->cvbi) {
btv               482 drivers/media/pci/bt8xx/bttv-risc.c 		mod_timer(&btv->timeout, jiffies+BTTV_TIMEOUT);
btv               484 drivers/media/pci/bt8xx/bttv-risc.c 		del_timer(&btv->timeout);
btv               486 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[RISC_SLOT_LOOP] = cpu_to_le32(cmd);
btv               490 drivers/media/pci/bt8xx/bttv-risc.c 		if (btv->dma_on)
btv               492 drivers/media/pci/bt8xx/bttv-risc.c 		btwrite(btv->main.dma, BT848_RISC_STRT_ADD);
btv               494 drivers/media/pci/bt8xx/bttv-risc.c 		btv->dma_on = 1;
btv               496 drivers/media/pci/bt8xx/bttv-risc.c 		if (!btv->dma_on)
btv               499 drivers/media/pci/bt8xx/bttv-risc.c 		btv->dma_on = 0;
btv               505 drivers/media/pci/bt8xx/bttv-risc.c bttv_risc_init_main(struct bttv *btv)
btv               509 drivers/media/pci/bt8xx/bttv-risc.c 	if ((rc = btcx_riscmem_alloc(btv->c.pci,&btv->main,PAGE_SIZE)) < 0)
btv               512 drivers/media/pci/bt8xx/bttv-risc.c 		btv->c.nr, (unsigned long long)btv->main.dma);
btv               514 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[0] = cpu_to_le32(BT848_RISC_SYNC | BT848_RISC_RESYNC |
btv               516 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[1] = cpu_to_le32(0);
btv               517 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[2] = cpu_to_le32(BT848_RISC_JUMP);
btv               518 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[3] = cpu_to_le32(btv->main.dma + (4<<2));
btv               521 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[4] = cpu_to_le32(BT848_RISC_JUMP);
btv               522 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[5] = cpu_to_le32(btv->main.dma + (6<<2));
btv               523 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[6] = cpu_to_le32(BT848_RISC_JUMP);
btv               524 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[7] = cpu_to_le32(btv->main.dma + (8<<2));
btv               526 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[8] = cpu_to_le32(BT848_RISC_SYNC | BT848_RISC_RESYNC |
btv               528 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[9] = cpu_to_le32(0);
btv               531 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[10] = cpu_to_le32(BT848_RISC_JUMP);
btv               532 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[11] = cpu_to_le32(btv->main.dma + (12<<2));
btv               533 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[12] = cpu_to_le32(BT848_RISC_JUMP);
btv               534 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[13] = cpu_to_le32(btv->main.dma + (14<<2));
btv               537 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[14] = cpu_to_le32(BT848_RISC_JUMP);
btv               538 drivers/media/pci/bt8xx/bttv-risc.c 	btv->main.cpu[15] = cpu_to_le32(btv->main.dma + (0<<2));
btv               544 drivers/media/pci/bt8xx/bttv-risc.c bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc,
btv               548 drivers/media/pci/bt8xx/bttv-risc.c 	unsigned long next = btv->main.dma + ((slot+2) << 2);
btv               551 drivers/media/pci/bt8xx/bttv-risc.c 		d2printk("%d: risc=%p slot[%d]=NULL\n", btv->c.nr, risc, slot);
btv               552 drivers/media/pci/bt8xx/bttv-risc.c 		btv->main.cpu[slot+1] = cpu_to_le32(next);
btv               555 drivers/media/pci/bt8xx/bttv-risc.c 			 btv->c.nr, risc, slot,
btv               565 drivers/media/pci/bt8xx/bttv-risc.c 		btv->main.cpu[slot+1] = cpu_to_le32(risc->dma);
btv               571 drivers/media/pci/bt8xx/bttv-risc.c bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf)
btv               579 drivers/media/pci/bt8xx/bttv-risc.c 	btcx_riscmem_free(btv->c.pci,&buf->bottom);
btv               580 drivers/media/pci/bt8xx/bttv-risc.c 	btcx_riscmem_free(btv->c.pci,&buf->top);
btv               585 drivers/media/pci/bt8xx/bttv-risc.c bttv_buffer_activate_vbi(struct bttv *btv,
btv               630 drivers/media/pci/bt8xx/bttv-risc.c 	bttv_risc_hook(btv, RISC_SLOT_O_VBI, top, top_irq_flags);
btv               631 drivers/media/pci/bt8xx/bttv-risc.c 	bttv_risc_hook(btv, RISC_SLOT_E_VBI, bottom, bottom_irq_flags);
btv               637 drivers/media/pci/bt8xx/bttv-risc.c bttv_buffer_activate_video(struct bttv *btv,
btv               654 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_apply_geo(btv, &set->top->geo, 1);
btv               655 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_apply_geo(btv, &set->bottom->geo,0);
btv               656 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_O_FIELD, &set->top->top,
btv               658 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_E_FIELD, &set->bottom->bottom,
btv               668 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_apply_geo(btv, &set->top->geo,1);
btv               669 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_apply_geo(btv, &set->top->geo,0);
btv               670 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_O_FIELD, &set->top->top,
btv               672 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_E_FIELD, NULL,           0);
btv               679 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_apply_geo(btv, &set->bottom->geo,1);
btv               680 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_apply_geo(btv, &set->bottom->geo,0);
btv               681 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_O_FIELD, NULL, 0);
btv               682 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_E_FIELD, &set->bottom->bottom,
btv               687 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_O_FIELD, NULL, 0);
btv               688 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_hook(btv, RISC_SLOT_E_FIELD, NULL, 0);
btv               697 drivers/media/pci/bt8xx/bttv-risc.c bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
btv               703 drivers/media/pci/bt8xx/bttv-risc.c 		btv->c.nr, v4l2_field_names[buf->vb.field],
btv               711 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_calc_geo(btv,&buf->geo,buf->vb.width,buf->vb.height,
btv               717 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_packed(btv,&buf->top,dma->sglist,
btv               723 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_packed(btv,&buf->bottom,dma->sglist,
btv               727 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_packed(btv,&buf->top,dma->sglist,
btv               729 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_packed(btv,&buf->bottom,dma->sglist,
btv               733 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_packed(btv,&buf->top,dma->sglist,
btv               735 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_packed(btv,&buf->bottom,dma->sglist,
btv               765 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_calc_geo(btv,&buf->geo,buf->vb.width,
btv               768 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_planar(btv, &buf->top, dma->sglist,
btv               774 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_calc_geo(btv,&buf->geo,buf->vb.width,
btv               777 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_planar(btv, &buf->bottom, dma->sglist,
btv               783 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_calc_geo(btv,&buf->geo,buf->vb.width,
btv               789 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_planar(btv,&buf->top,
btv               796 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_planar(btv,&buf->bottom,
btv               806 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_calc_geo(btv,&buf->geo,buf->vb.width,
btv               812 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_planar(btv,&buf->top,
btv               820 drivers/media/pci/bt8xx/bttv-risc.c 			bttv_risc_planar(btv,&buf->bottom,
btv               838 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_calc_geo(btv,&buf->geo,tvnorm->swidth,tvnorm->sheight,
btv               840 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_packed(btv, &buf->top,  dma->sglist,
btv               843 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_packed(btv, &buf->bottom, dma->sglist,
btv               857 drivers/media/pci/bt8xx/bttv-risc.c bttv_overlay_risc(struct bttv *btv,
btv               864 drivers/media/pci/bt8xx/bttv-risc.c 		btv->c.nr, v4l2_field_names[buf->vb.field],
btv               868 drivers/media/pci/bt8xx/bttv-risc.c 	bttv_calc_geo(btv,&buf->geo,ov->w.width,ov->w.height,
btv               875 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_overlay(btv, &buf->top,    fmt, ov, 0, 0);
btv               878 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_overlay(btv, &buf->bottom, fmt, ov, 0, 0);
btv               881 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_overlay(btv, &buf->top,    fmt, ov, 0, 1);
btv               882 drivers/media/pci/bt8xx/bttv-risc.c 		bttv_risc_overlay(btv, &buf->bottom, fmt, ov, 1, 0);
btv                61 drivers/media/pci/bt8xx/bttv-vbi.c 		pr_debug("%d: " fmt, btv->c.nr, ##__VA_ARGS__);		\
btv                74 drivers/media/pci/bt8xx/bttv-vbi.c 	struct bttv *btv = fh->btv;
btv                96 drivers/media/pci/bt8xx/bttv-vbi.c 	struct bttv *btv = fh->btv;
btv               153 drivers/media/pci/bt8xx/bttv-vbi.c 			rc = bttv_risc_packed(btv, &buf->top,
btv               165 drivers/media/pci/bt8xx/bttv-vbi.c 			rc = bttv_risc_packed(btv, &buf->bottom,
btv               194 drivers/media/pci/bt8xx/bttv-vbi.c 	bttv_dma_free(q,btv,buf);
btv               202 drivers/media/pci/bt8xx/bttv-vbi.c 	struct bttv *btv = fh->btv;
btv               207 drivers/media/pci/bt8xx/bttv-vbi.c 	list_add_tail(&buf->vb.queue,&btv->vcapture);
btv               208 drivers/media/pci/bt8xx/bttv-vbi.c 	if (NULL == btv->cvbi) {
btv               209 drivers/media/pci/bt8xx/bttv-vbi.c 		fh->btv->loop_irq |= 4;
btv               210 drivers/media/pci/bt8xx/bttv-vbi.c 		bttv_set_dma(btv,0x0c);
btv               217 drivers/media/pci/bt8xx/bttv-vbi.c 	struct bttv *btv = fh->btv;
btv               221 drivers/media/pci/bt8xx/bttv-vbi.c 	bttv_dma_free(q,fh->btv,buf);
btv               303 drivers/media/pci/bt8xx/bttv-vbi.c 	struct bttv *btv = fh->btv;
btv               307 drivers/media/pci/bt8xx/bttv-vbi.c 	mutex_lock(&btv->lock);
btv               309 drivers/media/pci/bt8xx/bttv-vbi.c 	tvnorm = &bttv_tvnorms[btv->tvnorm];
btv               310 drivers/media/pci/bt8xx/bttv-vbi.c 	crop_start = btv->crop_start;
btv               312 drivers/media/pci/bt8xx/bttv-vbi.c 	mutex_unlock(&btv->lock);
btv               321 drivers/media/pci/bt8xx/bttv-vbi.c 	struct bttv *btv = fh->btv;
btv               326 drivers/media/pci/bt8xx/bttv-vbi.c 	mutex_lock(&btv->lock);
btv               332 drivers/media/pci/bt8xx/bttv-vbi.c 	tvnorm = &bttv_tvnorms[btv->tvnorm];
btv               334 drivers/media/pci/bt8xx/bttv-vbi.c 	rc = try_fmt(&frt->fmt.vbi, tvnorm, btv->crop_start);
btv               360 drivers/media/pci/bt8xx/bttv-vbi.c 	mutex_unlock(&btv->lock);
btv               373 drivers/media/pci/bt8xx/bttv-vbi.c 	tvnorm = &bttv_tvnorms[fh->btv->tvnorm];
btv               219 drivers/media/pci/bt8xx/bttv.h 	void (*volume_gpio)(struct bttv *btv, __u16 volume);
btv               220 drivers/media/pci/bt8xx/bttv.h 	void (*audio_mode_gpio)(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv               221 drivers/media/pci/bt8xx/bttv.h 	void (*muxsel_hook)(struct bttv *btv, unsigned int input);
btv               286 drivers/media/pci/bt8xx/bttv.h extern void bttv_idcard(struct bttv *btv);
btv               287 drivers/media/pci/bt8xx/bttv.h extern void bttv_init_card1(struct bttv *btv);
btv               288 drivers/media/pci/bt8xx/bttv.h extern void bttv_init_card2(struct bttv *btv);
btv               289 drivers/media/pci/bt8xx/bttv.h extern void bttv_init_tuner(struct bttv *btv);
btv               292 drivers/media/pci/bt8xx/bttv.h extern void tea5757_set_freq(struct bttv *btv, unsigned short freq);
btv               293 drivers/media/pci/bt8xx/bttv.h extern u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits);
btv               297 drivers/media/pci/bt8xx/bttv.h extern int bttv_handle_chipset(struct bttv *btv);
btv               356 drivers/media/pci/bt8xx/bttv.h #define gpio_inout(mask,bits)  bttv_gpio_inout(&btv->c, mask, bits)
btv               357 drivers/media/pci/bt8xx/bttv.h #define gpio_read()            bttv_gpio_read(&btv->c)
btv               358 drivers/media/pci/bt8xx/bttv.h #define gpio_write(value)      bttv_gpio_write(&btv->c, value)
btv               359 drivers/media/pci/bt8xx/bttv.h #define gpio_bits(mask,bits)   bttv_gpio_bits(&btv->c, mask, bits)
btv               365 drivers/media/pci/bt8xx/bttv.h #define bttv_call_all(btv, o, f, args...) \
btv               366 drivers/media/pci/bt8xx/bttv.h 	v4l2_device_call_all(&btv->c.v4l2_dev, 0, o, f, ##args)
btv               368 drivers/media/pci/bt8xx/bttv.h #define bttv_call_all_err(btv, o, f, args...) \
btv               369 drivers/media/pci/bt8xx/bttv.h 	v4l2_device_call_until_err(&btv->c.v4l2_dev, 0, o, f, ##args)
btv               371 drivers/media/pci/bt8xx/bttv.h extern int bttv_I2CRead(struct bttv *btv, unsigned char addr, char *probe_for);
btv               372 drivers/media/pci/bt8xx/bttv.h extern int bttv_I2CWrite(struct bttv *btv, unsigned char addr, unsigned char b1,
btv               374 drivers/media/pci/bt8xx/bttv.h extern void bttv_readee(struct bttv *btv, unsigned char *eedata, int addr);
btv               112 drivers/media/pci/bt8xx/bttvp.h 	struct bttv		*btv;
btv               209 drivers/media/pci/bt8xx/bttvp.h 	struct bttv              *btv;
btv               238 drivers/media/pci/bt8xx/bttvp.h int bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
btv               245 drivers/media/pci/bt8xx/bttvp.h void bttv_set_dma(struct bttv *btv, int override);
btv               246 drivers/media/pci/bt8xx/bttvp.h int bttv_risc_init_main(struct bttv *btv);
btv               247 drivers/media/pci/bt8xx/bttvp.h int bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc,
btv               251 drivers/media/pci/bt8xx/bttvp.h int bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf);
btv               252 drivers/media/pci/bt8xx/bttvp.h int bttv_buffer_activate_video(struct bttv *btv,
btv               254 drivers/media/pci/bt8xx/bttvp.h int bttv_buffer_activate_vbi(struct bttv *btv,
btv               256 drivers/media/pci/bt8xx/bttvp.h void bttv_dma_free(struct videobuf_queue *q, struct bttv *btv,
btv               260 drivers/media/pci/bt8xx/bttvp.h int bttv_overlay_risc(struct bttv *btv, struct bttv_overlay *ov,
btv               289 drivers/media/pci/bt8xx/bttvp.h extern void init_bttv_i2c_ir(struct bttv *btv);
btv               293 drivers/media/pci/bt8xx/bttvp.h extern int init_bttv_i2c(struct bttv *btv);
btv               294 drivers/media/pci/bt8xx/bttvp.h extern int fini_bttv_i2c(struct bttv *btv);
btv               303 drivers/media/pci/bt8xx/bttvp.h extern void bttv_gpio_tracking(struct bttv *btv, char *comment);
btv               378 drivers/media/pci/bt8xx/bttvp.h 	void (*volume_gpio)(struct bttv *btv, __u16 volume);
btv               379 drivers/media/pci/bt8xx/bttvp.h 	void (*audio_mode_gpio)(struct bttv *btv, struct v4l2_tuner *tuner, int set);
btv               508 drivers/media/pci/bt8xx/bttvp.h static inline unsigned int bttv_muxsel(const struct bttv *btv,
btv               511 drivers/media/pci/bt8xx/bttvp.h 	return (bttv_tvcards[btv->c.type].muxsel >> (input * 2)) & 3;
btv               516 drivers/media/pci/bt8xx/bttvp.h #define btwrite(dat,adr)    writel((dat), btv->bt848_mmio+(adr))
btv               517 drivers/media/pci/bt8xx/bttvp.h #define btread(adr)         readl(btv->bt848_mmio+(adr))