• Home
  • Raw
  • Download

Lines Matching refs:btv

48 static void boot_msp34xx(struct bttv *btv, int pin);
49 static void hauppauge_eeprom(struct bttv *btv);
50 static void avermedia_eeprom(struct bttv *btv);
51 static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
52 static void modtec_eeprom(struct bttv *btv);
53 static void init_PXC200(struct bttv *btv);
54 static void init_RTV24(struct bttv *btv);
55 static void init_PCI8604PW(struct bttv *btv);
57 static void rv605_muxsel(struct bttv *btv, unsigned int input);
58 static void eagle_muxsel(struct bttv *btv, unsigned int input);
59 static void xguard_muxsel(struct bttv *btv, unsigned int input);
60 static void ivc120_muxsel(struct bttv *btv, unsigned int input);
61 static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
63 static void PXC200_muxsel(struct bttv *btv, unsigned int input);
65 static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
66 static void picolo_tetra_init(struct bttv *btv);
68 static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
69 static void tibetCS16_init(struct bttv *btv);
71 static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
72 static void kodicom4400r_init(struct bttv *btv);
74 static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
75 static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
77 static void geovision_muxsel(struct bttv *btv, unsigned int input);
79 static void phytec_muxsel(struct bttv *btv, unsigned int input);
81 static void gv800s_muxsel(struct bttv *btv, unsigned int input);
82 static void gv800s_init(struct bttv *btv);
84 static void td3116_muxsel(struct bttv *btv, unsigned int input);
86 static int terratec_active_radio_upgrade(struct bttv *btv);
87 static int tea575x_init(struct bttv *btv);
88 static void identify_by_eeprom(struct bttv *btv,
90 static int pvr_boot(struct bttv *btv);
2901 void bttv_idcard(struct bttv *btv) in bttv_idcard() argument
2907 btv->cardid = btv->c.pci->subsystem_device << 16; in bttv_idcard()
2908 btv->cardid |= btv->c.pci->subsystem_vendor; in bttv_idcard()
2910 if (0 != btv->cardid && 0xffffffff != btv->cardid) { in bttv_idcard()
2913 if (cards[i].id == btv->cardid) in bttv_idcard()
2919 btv->c.nr, cards[type].name, cards[type].cardnr, in bttv_idcard()
2920 btv->cardid & 0xffff, in bttv_idcard()
2921 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2922 btv->c.type = cards[type].cardnr; in bttv_idcard()
2926 btv->c.nr, btv->cardid & 0xffff, in bttv_idcard()
2927 (btv->cardid >> 16) & 0xffff); in bttv_idcard()
2933 if (card[btv->c.nr] < bttv_num_tvcards) in bttv_idcard()
2934 btv->c.type=card[btv->c.nr]; in bttv_idcard()
2938 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type, in bttv_idcard()
2939 card[btv->c.nr] < bttv_num_tvcards in bttv_idcard()
2949 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i]; in bttv_idcard()
2955 bttv_tvcards[btv->c.type].gpiomux[i] = audioall; in bttv_idcard()
2958 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits; in bttv_idcard()
2960 btv->c.nr, bttv_tvcards[btv->c.type].gpiomask); in bttv_idcard()
2963 i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]); in bttv_idcard()
2973 static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256]) in identify_by_eeprom() argument
2985 btv->c.type = type; in identify_by_eeprom()
2987 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type); in identify_by_eeprom()
2991 static void flyvideo_gpio(struct bttv *btv) in flyvideo_gpio() argument
3031 pr_info("%d: FlyVideo_gpio: unknown tuner type\n", btv->c.nr); in flyvideo_gpio()
3049 btv->c.nr, has_radio ? "yes" : "no", in flyvideo_gpio()
3052 btv->c.nr, is_lr90 ? "yes" : "no", in flyvideo_gpio()
3057 btv->tuner_type = tuner_type; in flyvideo_gpio()
3058 btv->has_radio = has_radio; in flyvideo_gpio()
3064 btv->audio_mode_gpio = lt9415_audio; in flyvideo_gpio()
3073 static void miro_pinnacle_gpio(struct bttv *btv) in miro_pinnacle_gpio() argument
3081 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx"); in miro_pinnacle_gpio()
3083 btv->tuner_type = miro_tunermap[id]; in miro_pinnacle_gpio()
3085 btv->has_radio = 1; in miro_pinnacle_gpio()
3087 btv->has_tea575x = 1; in miro_pinnacle_gpio()
3088 btv->tea_gpio.wren = 6; in miro_pinnacle_gpio()
3089 btv->tea_gpio.most = 7; in miro_pinnacle_gpio()
3090 btv->tea_gpio.clk = 8; in miro_pinnacle_gpio()
3091 btv->tea_gpio.data = 9; in miro_pinnacle_gpio()
3092 tea575x_init(btv); in miro_pinnacle_gpio()
3095 btv->has_radio = 0; in miro_pinnacle_gpio()
3098 if (btv->c.type == BTTV_BOARD_MIRO) in miro_pinnacle_gpio()
3099 btv->c.type = BTTV_BOARD_MIROPRO; in miro_pinnacle_gpio()
3100 if (btv->c.type == BTTV_BOARD_PINNACLE) in miro_pinnacle_gpio()
3101 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3104 btv->c.nr, id+1, btv->tuner_type, in miro_pinnacle_gpio()
3105 !btv->has_radio ? "no" : in miro_pinnacle_gpio()
3106 (btv->has_tea575x ? "tea575x" : "fmtuner"), in miro_pinnacle_gpio()
3111 btv->has_radio = 0; in miro_pinnacle_gpio()
3115 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3119 btv->has_radio = 1; in miro_pinnacle_gpio()
3120 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3124 btv->has_radio = 1; in miro_pinnacle_gpio()
3125 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3129 btv->tda9887_conf = TDA9887_QSS; in miro_pinnacle_gpio()
3133 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3137 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3141 btv->tda9887_conf = TDA9887_INTERCARRIER; in miro_pinnacle_gpio()
3148 btv->c.type = BTTV_BOARD_PINNACLEPRO; in miro_pinnacle_gpio()
3150 btv->c.nr, id, info, btv->has_radio ? "yes" : "no"); in miro_pinnacle_gpio()
3151 btv->tuner_type = TUNER_MT2032; in miro_pinnacle_gpio()
3158 static void init_ids_eagle(struct bttv *btv) in init_ids_eagle() argument
3176 static void eagle_muxsel(struct bttv *btv, unsigned int input) in eagle_muxsel() argument
3191 static void gvc1100_muxsel(struct bttv *btv, unsigned int input) in gvc1100_muxsel() argument
3210 static void init_lmlbt4x(struct bttv *btv) in init_lmlbt4x() argument
3218 static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input) in sigmaSQ_muxsel() argument
3225 static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input) in sigmaSLC_muxsel() argument
3232 static void geovision_muxsel(struct bttv *btv, unsigned int input) in geovision_muxsel() argument
3249 static void td3116_latch_value(struct bttv *btv, u32 value) in td3116_latch_value() argument
3257 static void td3116_muxsel(struct bttv *btv, unsigned int input) in td3116_muxsel() argument
3267 td3116_latch_value(btv, value); in td3116_muxsel()
3272 td3116_latch_value(btv, value); in td3116_muxsel()
3277 static void bttv_reset_audio(struct bttv *btv) in bttv_reset_audio() argument
3288 if (btv->id != 878) in bttv_reset_audio()
3292 pr_debug("%d: BT878A ARESET\n", btv->c.nr); in bttv_reset_audio()
3299 void bttv_init_card1(struct bttv *btv) in bttv_init_card1() argument
3301 switch (btv->c.type) { in bttv_init_card1()
3304 boot_msp34xx(btv,5); in bttv_init_card1()
3308 boot_msp34xx(btv,20); in bttv_init_card1()
3311 boot_msp34xx(btv,11); in bttv_init_card1()
3314 pvr_boot(btv); in bttv_init_card1()
3319 btv->use_i2c_hw = 1; in bttv_init_card1()
3322 init_RTV24( btv ); in bttv_init_card1()
3325 init_PCI8604PW(btv); in bttv_init_card1()
3329 if (!bttv_tvcards[btv->c.type].has_dvb) in bttv_init_card1()
3330 bttv_reset_audio(btv); in bttv_init_card1()
3334 void bttv_init_card2(struct bttv *btv) in bttv_init_card2() argument
3336 btv->tuner_type = UNSET; in bttv_init_card2()
3338 if (BTTV_BOARD_UNKNOWN == btv->c.type) { in bttv_init_card2()
3339 bttv_readee(btv,eeprom_data,0xa0); in bttv_init_card2()
3340 identify_by_eeprom(btv,eeprom_data); in bttv_init_card2()
3343 switch (btv->c.type) { in bttv_init_card2()
3349 miro_pinnacle_gpio(btv); in bttv_init_card2()
3362 flyvideo_gpio(btv); in bttv_init_card2()
3368 bttv_readee(btv,eeprom_data,0xa0); in bttv_init_card2()
3369 hauppauge_eeprom(btv); in bttv_init_card2()
3373 bttv_readee(btv,eeprom_data,0xa0); in bttv_init_card2()
3374 avermedia_eeprom(btv); in bttv_init_card2()
3377 init_PXC200(btv); in bttv_init_card2()
3380 picolo_tetra_init(btv); in bttv_init_card2()
3383 btv->has_radio = 1; in bttv_init_card2()
3384 btv->has_tea575x = 1; in bttv_init_card2()
3385 btv->tea_gpio.wren = 5; in bttv_init_card2()
3386 btv->tea_gpio.most = 6; in bttv_init_card2()
3387 btv->tea_gpio.clk = 3; in bttv_init_card2()
3388 btv->tea_gpio.data = 4; in bttv_init_card2()
3389 tea575x_init(btv); in bttv_init_card2()
3393 terratec_active_radio_upgrade(btv); in bttv_init_card2()
3396 if (btv->cardid == 0x3002144f) { in bttv_init_card2()
3397 btv->has_radio=1; in bttv_init_card2()
3399 btv->c.nr); in bttv_init_card2()
3403 if (btv->cardid == 0x3060121a) { in bttv_init_card2()
3406 btv->has_radio=0; in bttv_init_card2()
3407 btv->tuner_type=TUNER_TEMIC_NTSC; in bttv_init_card2()
3422 bttv_readee(btv,eeprom_data,0xa0); in bttv_init_card2()
3423 osprey_eeprom(btv, eeprom_data); in bttv_init_card2()
3426 init_ids_eagle(btv); in bttv_init_card2()
3429 bttv_readee(btv,eeprom_data,0xa0); in bttv_init_card2()
3430 modtec_eeprom(btv); in bttv_init_card2()
3433 init_lmlbt4x(btv); in bttv_init_card2()
3436 tibetCS16_init(btv); in bttv_init_card2()
3439 kodicom4400r_init(btv); in bttv_init_card2()
3442 gv800s_init(btv); in bttv_init_card2()
3447 if (!(btv->id==848 && btv->revision==0x11)) { in bttv_init_card2()
3449 if (PLL_28 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3450 btv->pll.pll_ifreq=28636363; in bttv_init_card2()
3451 btv->pll.pll_crystal=BT848_IFORM_XT0; in bttv_init_card2()
3453 if (PLL_35 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3454 btv->pll.pll_ifreq=35468950; in bttv_init_card2()
3455 btv->pll.pll_crystal=BT848_IFORM_XT1; in bttv_init_card2()
3457 if (PLL_14 == bttv_tvcards[btv->c.type].pll) { in bttv_init_card2()
3458 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3459 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3462 switch (pll[btv->c.nr]) { in bttv_init_card2()
3464 btv->pll.pll_crystal = 0; in bttv_init_card2()
3465 btv->pll.pll_ifreq = 0; in bttv_init_card2()
3466 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3470 btv->pll.pll_ifreq = 28636363; in bttv_init_card2()
3471 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3472 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3476 btv->pll.pll_ifreq = 35468950; in bttv_init_card2()
3477 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3478 btv->pll.pll_crystal = BT848_IFORM_XT1; in bttv_init_card2()
3482 btv->pll.pll_ifreq = 14318181; in bttv_init_card2()
3483 btv->pll.pll_ofreq = 0; in bttv_init_card2()
3484 btv->pll.pll_crystal = BT848_IFORM_XT0; in bttv_init_card2()
3488 btv->pll.pll_current = -1; in bttv_init_card2()
3491 if (UNSET != bttv_tvcards[btv->c.type].tuner_type) in bttv_init_card2()
3492 if (UNSET == btv->tuner_type) in bttv_init_card2()
3493 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type; in bttv_init_card2()
3494 if (UNSET != tuner[btv->c.nr]) in bttv_init_card2()
3495 btv->tuner_type = tuner[btv->c.nr]; in bttv_init_card2()
3497 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3498 pr_info("%d: tuner absent\n", btv->c.nr); in bttv_init_card2()
3499 else if (btv->tuner_type == UNSET) in bttv_init_card2()
3500 pr_warn("%d: tuner type unset\n", btv->c.nr); in bttv_init_card2()
3502 pr_info("%d: tuner type=%d\n", btv->c.nr, btv->tuner_type); in bttv_init_card2()
3505 pr_warn("%d: the autoload option is obsolete\n", btv->c.nr); in bttv_init_card2()
3507 btv->c.nr); in bttv_init_card2()
3510 if (UNSET == btv->tuner_type) in bttv_init_card2()
3511 btv->tuner_type = TUNER_ABSENT; in bttv_init_card2()
3513 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ? in bttv_init_card2()
3514 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET; in bttv_init_card2()
3515 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ? in bttv_init_card2()
3516 UNSET : bttv_tvcards[btv->c.type].svhs; in bttv_init_card2()
3517 if (svhs[btv->c.nr] != UNSET) in bttv_init_card2()
3518 btv->svhs = svhs[btv->c.nr]; in bttv_init_card2()
3519 if (remote[btv->c.nr] != UNSET) in bttv_init_card2()
3520 btv->has_remote = remote[btv->c.nr]; in bttv_init_card2()
3522 if (bttv_tvcards[btv->c.type].has_radio) in bttv_init_card2()
3523 btv->has_radio = 1; in bttv_init_card2()
3524 if (bttv_tvcards[btv->c.type].has_remote) in bttv_init_card2()
3525 btv->has_remote = 1; in bttv_init_card2()
3526 if (!bttv_tvcards[btv->c.type].no_gpioirq) in bttv_init_card2()
3527 btv->gpioirq = 1; in bttv_init_card2()
3528 if (bttv_tvcards[btv->c.type].volume_gpio) in bttv_init_card2()
3529 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio; in bttv_init_card2()
3530 if (bttv_tvcards[btv->c.type].audio_mode_gpio) in bttv_init_card2()
3531 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio; in bttv_init_card2()
3533 if (btv->tuner_type == TUNER_ABSENT) in bttv_init_card2()
3536 if (btv->has_saa6588 || saa6588[btv->c.nr]) { in bttv_init_card2()
3545 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3546 &btv->c.i2c_adap, "saa6588", 0, addrs); in bttv_init_card2()
3547 btv->has_saa6588 = (sd != NULL); in bttv_init_card2()
3555 switch (audiodev[btv->c.nr]) { in bttv_init_card2()
3570 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3571 &btv->c.i2c_adap, "msp3400", 0, addrs); in bttv_init_card2()
3572 if (btv->sd_msp34xx) in bttv_init_card2()
3584 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3585 &btv->c.i2c_adap, "tda7432", 0, addrs)) in bttv_init_card2()
3592 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3593 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3594 if (btv->sd_tvaudio) in bttv_init_card2()
3600 pr_warn("%d: unknown audiodev value!\n", btv->c.nr); in bttv_init_card2()
3610 if (!bttv_tvcards[btv->c.type].no_msp34xx) { in bttv_init_card2()
3611 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3612 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3614 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) { in bttv_init_card2()
3615 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3616 &btv->c.i2c_adap, "msp3400", in bttv_init_card2()
3621 if (btv->sd_msp34xx) in bttv_init_card2()
3625 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3626 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3627 if (btv->sd_tvaudio) { in bttv_init_card2()
3630 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3631 &btv->c.i2c_adap, "tvaudio", 0, tvaudio_addrs()); in bttv_init_card2()
3635 if (!bttv_tvcards[btv->c.type].no_tda7432) { in bttv_init_card2()
3641 btv->sd_tda7432 = v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_card2()
3642 &btv->c.i2c_adap, "tda7432", 0, addrs); in bttv_init_card2()
3643 if (btv->sd_tda7432) in bttv_init_card2()
3646 if (btv->sd_tvaudio) in bttv_init_card2()
3650 pr_warn("%d: audio absent, no audio device found!\n", btv->c.nr); in bttv_init_card2()
3655 void bttv_init_tuner(struct bttv *btv) in bttv_init_tuner() argument
3659 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr) in bttv_init_tuner()
3660 addr = bttv_tvcards[btv->c.type].tuner_addr; in bttv_init_tuner()
3662 if (btv->tuner_type != TUNER_ABSENT) { in bttv_init_tuner()
3666 if (btv->has_radio) in bttv_init_tuner()
3667 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3668 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3670 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3671 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3673 v4l2_i2c_new_subdev(&btv->c.v4l2_dev, in bttv_init_tuner()
3674 &btv->c.i2c_adap, "tuner", in bttv_init_tuner()
3678 tun_setup.type = btv->tuner_type; in bttv_init_tuner()
3681 if (btv->has_radio) in bttv_init_tuner()
3684 bttv_call_all(btv, tuner, s_type_addr, &tun_setup); in bttv_init_tuner()
3687 if (btv->tda9887_conf) { in bttv_init_tuner()
3691 tda9887_cfg.priv = &btv->tda9887_conf; in bttv_init_tuner()
3693 bttv_call_all(btv, tuner, s_config, &tda9887_cfg); in bttv_init_tuner()
3699 static void modtec_eeprom(struct bttv *btv) in modtec_eeprom() argument
3702 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I; in modtec_eeprom()
3704 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3706 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I; in modtec_eeprom()
3708 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3710 btv->tuner_type=TUNER_PHILIPS_NTSC; in modtec_eeprom()
3712 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3715 btv->c.nr, &eeprom_data[0x1e]); in modtec_eeprom()
3719 static void hauppauge_eeprom(struct bttv *btv) in hauppauge_eeprom() argument
3723 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data); in hauppauge_eeprom()
3724 btv->tuner_type = tv.tuner_type; in hauppauge_eeprom()
3725 btv->has_radio = tv.has_radio; in hauppauge_eeprom()
3728 btv->c.nr, tv.model); in hauppauge_eeprom()
3736 btv->c.nr, in hauppauge_eeprom()
3737 bttv_tvcards[btv->c.type].name, in hauppauge_eeprom()
3739 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB; in hauppauge_eeprom()
3744 btv->radio_uses_msp_demodulator = 1; in hauppauge_eeprom()
3751 struct bttv *btv = tea->private_data; in bttv_tea575x_set_pins() local
3752 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_pins()
3760 if (btv->mbox_ior) { in bttv_tea575x_set_pins()
3762 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0); in bttv_tea575x_set_pins()
3765 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_set_pins()
3766 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_set_pins()
3772 struct bttv *btv = tea->private_data; in bttv_tea575x_get_pins() local
3773 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_get_pins()
3777 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3779 gpio_bits(btv->mbox_ior | btv->mbox_csel, 0); in bttv_tea575x_get_pins()
3783 if (btv->mbox_ior) { in bttv_tea575x_get_pins()
3785 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel, in bttv_tea575x_get_pins()
3786 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel); in bttv_tea575x_get_pins()
3799 struct bttv *btv = tea->private_data; in bttv_tea575x_set_direction() local
3800 struct bttv_tea575x_gpio gpio = btv->tea_gpio; in bttv_tea575x_set_direction()
3817 static int tea575x_init(struct bttv *btv) in tea575x_init() argument
3819 btv->tea.private_data = btv; in tea575x_init()
3820 btv->tea.ops = &bttv_tea_ops; in tea575x_init()
3821 if (!snd_tea575x_hw_init(&btv->tea)) { in tea575x_init()
3822 pr_info("%d: detected TEA575x radio\n", btv->c.nr); in tea575x_init()
3823 btv->tea.mute = false; in tea575x_init()
3827 btv->has_tea575x = 0; in tea575x_init()
3828 btv->has_radio = 0; in tea575x_init()
3835 static int terratec_active_radio_upgrade(struct bttv *btv) in terratec_active_radio_upgrade() argument
3837 btv->has_radio = 1; in terratec_active_radio_upgrade()
3838 btv->has_tea575x = 1; in terratec_active_radio_upgrade()
3839 btv->tea_gpio.wren = 4; in terratec_active_radio_upgrade()
3840 btv->tea_gpio.most = 5; in terratec_active_radio_upgrade()
3841 btv->tea_gpio.clk = 3; in terratec_active_radio_upgrade()
3842 btv->tea_gpio.data = 2; in terratec_active_radio_upgrade()
3844 btv->mbox_iow = 1 << 8; in terratec_active_radio_upgrade()
3845 btv->mbox_ior = 1 << 9; in terratec_active_radio_upgrade()
3846 btv->mbox_csel = 1 << 10; in terratec_active_radio_upgrade()
3848 if (!tea575x_init(btv)) { in terratec_active_radio_upgrade()
3849 pr_info("%d: Terratec Active Radio Upgrade found\n", btv->c.nr); in terratec_active_radio_upgrade()
3850 btv->has_saa6588 = 1; in terratec_active_radio_upgrade()
3872 static int pvr_altera_load(struct bttv *btv, const u8 *micro, u32 microlen) in pvr_altera_load() argument
3909 static int pvr_boot(struct bttv *btv) in pvr_boot() argument
3914 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev); in pvr_boot()
3916 pr_warn("%d: no altera firmware [via hotplug]\n", btv->c.nr); in pvr_boot()
3919 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size); in pvr_boot()
3921 btv->c.nr, (rc < 0) ? "failed" : "ok"); in pvr_boot()
3929 static void osprey_eeprom(struct bttv *btv, const u8 ee[256]) in osprey_eeprom() argument
3936 if (btv->c.type == BTTV_BOARD_UNKNOWN) { in osprey_eeprom()
4018 btv->c.nr, type); in osprey_eeprom()
4025 btv->c.nr, cardid, in osprey_eeprom()
4028 if (cardid<0 || btv->c.type == cardid) in osprey_eeprom()
4032 if (card[btv->c.nr] < bttv_num_tvcards) { in osprey_eeprom()
4034 btv->c.nr); in osprey_eeprom()
4037 btv->c.nr, btv->c.type, cardid); in osprey_eeprom()
4038 btv->c.type = cardid; in osprey_eeprom()
4060 static void avermedia_eeprom(struct bttv *btv) in avermedia_eeprom() argument
4067 btv->has_remote = (eeprom_data[0x42] & 0x01); in avermedia_eeprom()
4081 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]); in avermedia_eeprom()
4083 btv->tuner_type = tuner_type; in avermedia_eeprom()
4089 btv->has_remote ? "yes" : "no"); in avermedia_eeprom()
4100 u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits) in bttv_tda9880_setnorm() argument
4103 if (btv->audio_input == TVAUDIO_INPUT_TUNER) { in bttv_tda9880_setnorm()
4104 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN) in bttv_tda9880_setnorm()
4110 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits); in bttv_tda9880_setnorm()
4122 static void boot_msp34xx(struct bttv *btv, int pin) in boot_msp34xx() argument
4133 bttv_gpio_tracking(btv,"msp34xx"); in boot_msp34xx()
4136 btv->c.nr, pin); in boot_msp34xx()
4145 static void init_PXC200(struct bttv *btv) in init_PXC200() argument
4162 bttv_gpio_tracking(btv,"pxc200"); in init_PXC200()
4176 bttv_I2CWrite(btv,0x5E,0,0x80,1); in init_PXC200()
4201 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1); in init_PXC200()
4204 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL)); in init_PXC200()
4242 init_RTV24 (struct bttv *btv) in init_RTV24() argument
4248 btv->c.nr); in init_RTV24()
4262 btv->c.nr, dataRead); in init_RTV24()
4275 btv->c.nr, dataRead); in init_RTV24()
4280 pr_info("%d: Adlink RTV-24 initialisation complete\n", btv->c.nr); in init_RTV24()
4307 init_PCI8604PW(struct bttv *btv) in init_PCI8604PW() argument
4311 if ((PCI_SLOT(btv->c.pci->devfn) & ~3) != 0xC) { in init_PCI8604PW()
4316 if (PCI_SLOT(btv->c.pci->devfn) != 0xD) in init_PCI8604PW()
4397 static void rv605_muxsel(struct bttv *btv, unsigned int input) in rv605_muxsel() argument
4445 static void tibetCS16_muxsel(struct bttv *btv, unsigned int input) in tibetCS16_muxsel() argument
4451 static void tibetCS16_init(struct bttv *btv) in tibetCS16_init() argument
4485 static void kodicom4400r_write(struct bttv *btv, in kodicom4400r_write() argument
4505 static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input) in kodicom4400r_muxsel() argument
4511 mctlr = master[btv->c.nr]; in kodicom4400r_muxsel()
4515 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */ in kodicom4400r_muxsel()
4534 static void kodicom4400r_init(struct bttv *btv) in kodicom4400r_init() argument
4543 btv->sw_status[ix] = ix; in kodicom4400r_init()
4544 kodicom4400r_write(btv, ix, ix, 1); in kodicom4400r_init()
4551 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3)) in kodicom4400r_init()
4553 master[btv->c.nr-1] = btv; in kodicom4400r_init()
4554 master[btv->c.nr] = btv; in kodicom4400r_init()
4555 master[btv->c.nr+1] = btv; in kodicom4400r_init()
4556 master[btv->c.nr+2] = btv; in kodicom4400r_init()
4577 static void xguard_muxsel(struct bttv *btv, unsigned int input) in xguard_muxsel() argument
4587 static void picolo_tetra_init(struct bttv *btv) in picolo_tetra_init() argument
4593 static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input) in picolo_tetra_muxsel() argument
4596 dprintk("%d : picolo_tetra_muxsel => input = %d\n", btv->c.nr, input); in picolo_tetra_muxsel()
4635 static void ivc120_muxsel(struct bttv *btv, unsigned int input) in ivc120_muxsel() argument
4642 btv->c.nr, input, matrix, key); in ivc120_muxsel()
4645 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00, in ivc120_muxsel()
4647 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00, in ivc120_muxsel()
4649 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00, in ivc120_muxsel()
4651 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00, in ivc120_muxsel()
4655 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02, in ivc120_muxsel()
4657 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02, in ivc120_muxsel()
4659 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02, in ivc120_muxsel()
4661 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02, in ivc120_muxsel()
4685 static void PXC200_muxsel(struct bttv *btv, unsigned int input) in PXC200_muxsel() argument
4696 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1); in PXC200_muxsel()
4699 btv->c.nr, rc); in PXC200_muxsel()
4704 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL); in PXC200_muxsel()
4707 btv->c.nr, rc); in PXC200_muxsel()
4722 if (btv->cardid == PX_PXC200A_CARDID) { in PXC200_muxsel()
4729 if (btv->cardid == PX_PXC200A_CARDID) in PXC200_muxsel()
4742 if (btv->cardid == PX_PXC200A_CARDID) in PXC200_muxsel()
4747 pr_debug("%d: setting input channel to:%d\n", btv->c.nr, (int)mux); in PXC200_muxsel()
4750 static void phytec_muxsel(struct bttv *btv, unsigned int input) in phytec_muxsel() argument
4754 if (input == btv->svhs) in phytec_muxsel()
4775 static void gv800s_write(struct bttv *btv, in gv800s_write() argument
4817 static void gv800s_muxsel(struct bttv *btv, unsigned int input) in gv800s_muxsel() argument
4826 mctlr = master[btv->c.nr]; in gv800s_muxsel()
4831 yaddr = (btv->c.nr - mctlr->c.nr) & 3; in gv800s_muxsel()
4844 static void gv800s_init(struct bttv *btv) in gv800s_init() argument
4854 btv->sw_status[ix] = ix; in gv800s_init()
4855 gv800s_write(btv, ix, ix, 1); in gv800s_init()
4859 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1); in gv800s_init()
4861 if (btv->c.nr > BTTV_MAX-4) in gv800s_init()
4867 master[btv->c.nr] = btv; in gv800s_init()
4868 master[btv->c.nr+1] = btv; in gv800s_init()
4869 master[btv->c.nr+2] = btv; in gv800s_init()
4870 master[btv->c.nr+3] = btv; in gv800s_init()
4919 int bttv_handle_chipset(struct bttv *btv) in bttv_handle_chipset() argument
4929 btv->c.nr); in bttv_handle_chipset()
4930 if (vsfx && btv->id >= 878) in bttv_handle_chipset()
4931 pr_info("%d: enabling VSFX\n", btv->c.nr); in bttv_handle_chipset()
4934 btv->c.nr, latency); in bttv_handle_chipset()
4937 if (btv->id < 878) { in bttv_handle_chipset()
4940 btv->triton1 = BT848_INT_ETBF; in bttv_handle_chipset()
4943 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command); in bttv_handle_chipset()
4948 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command); in bttv_handle_chipset()
4951 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency); in bttv_handle_chipset()