• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/media/video/bt8xx/

Lines Matching refs:btv

46 static void boot_msp34xx(struct bttv *btv, int pin);
47 static void hauppauge_eeprom(struct bttv *btv);
48 static void avermedia_eeprom(struct bttv *btv);
49 static void osprey_eeprom(struct bttv *btv, const u8 ee[256]);
50 static void modtec_eeprom(struct bttv *btv);
51 static void init_PXC200(struct bttv *btv);
52 static void init_RTV24(struct bttv *btv);
54 static void rv605_muxsel(struct bttv *btv, unsigned int input);
55 static void eagle_muxsel(struct bttv *btv, unsigned int input);
56 static void xguard_muxsel(struct bttv *btv, unsigned int input);
57 static void ivc120_muxsel(struct bttv *btv, unsigned int input);
58 static void gvc1100_muxsel(struct bttv *btv, unsigned int input);
60 static void PXC200_muxsel(struct bttv *btv, unsigned int input);
62 static void picolo_tetra_muxsel(struct bttv *btv, unsigned int input);
63 static void picolo_tetra_init(struct bttv *btv);
65 static void tibetCS16_muxsel(struct bttv *btv, unsigned int input);
66 static void tibetCS16_init(struct bttv *btv);
68 static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input);
69 static void kodicom4400r_init(struct bttv *btv);
71 static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input);
72 static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input);
74 static void geovision_muxsel(struct bttv *btv, unsigned int input);
76 static void phytec_muxsel(struct bttv *btv, unsigned int input);
78 static void gv800s_muxsel(struct bttv *btv, unsigned int input);
79 static void gv800s_init(struct bttv *btv);
81 static int terratec_active_radio_upgrade(struct bttv *btv);
82 static int tea5757_read(struct bttv *btv);
83 static int tea5757_write(struct bttv *btv, int value);
84 static void identify_by_eeprom(struct bttv *btv,
86 static int __devinit pvr_boot(struct bttv *btv);
2924 void __devinit bttv_idcard(struct bttv *btv)
2931 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_ID, &tmp);
2932 btv->cardid = tmp << 16;
2933 pci_read_config_word(btv->c.pci, PCI_SUBSYSTEM_VENDOR_ID, &tmp);
2934 btv->cardid |= tmp;
2936 if (0 != btv->cardid && 0xffffffff != btv->cardid) {
2939 if (cards[i].id == btv->cardid)
2946 btv->c.nr,cards[type].name,cards[type].cardnr,
2947 btv->cardid & 0xffff,
2948 (btv->cardid >> 16) & 0xffff);
2949 btv->c.type = cards[type].cardnr;
2953 btv->c.nr, btv->cardid & 0xffff,
2954 (btv->cardid >> 16) & 0xffff);
2961 if (card[btv->c.nr] < bttv_num_tvcards)
2962 btv->c.type=card[btv->c.nr];
2965 printk(KERN_INFO "bttv%d: using: %s [card=%d,%s]\n",btv->c.nr,
2966 bttv_tvcards[btv->c.type].name, btv->c.type,
2967 card[btv->c.nr] < bttv_num_tvcards
2977 bttv_tvcards[btv->c.type].gpiomux[i] = audiomux[i];
2983 bttv_tvcards[btv->c.type].gpiomux[i] = audioall;
2986 bttv_tvcards[btv->c.type].gpiomask = (UNSET != gpiomask) ? gpiomask : gpiobits;
2988 btv->c.nr,bttv_tvcards[btv->c.type].gpiomask);
2990 printk("%s0x%x", i ? "," : "", bttv_tvcards[btv->c.type].gpiomux[i]);
3000 static void identify_by_eeprom(struct bttv *btv, unsigned char eeprom_data[256])
3012 btv->c.type = type;
3014 btv->c.nr, bttv_tvcards[btv->c.type].name, btv->c.type);
3018 static void flyvideo_gpio(struct bttv *btv)
3057 printk(KERN_INFO "bttv%d: FlyVideo_gpio: unknown tuner type.\n", btv->c.nr);
3075 btv->c.nr, has_radio ? "yes" : "no ",
3078 btv->c.nr, is_lr90 ? "yes" : "no ",
3083 btv->tuner_type = tuner_type;
3084 btv->has_radio = has_radio;
3090 btv->audio_mode_gpio = lt9415_audio;
3091 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
3099 static void miro_pinnacle_gpio(struct bttv *btv)
3107 msp = bttv_I2CRead(btv, I2C_ADDR_MSP3400, "MSP34xx");
3109 btv->tuner_type = miro_tunermap[id];
3111 btv->has_radio = 1;
3113 btv->has_matchbox = 1;
3114 btv->mbox_we = (1<<6);
3115 btv->mbox_most = (1<<7);
3116 btv->mbox_clk = (1<<8);
3117 btv->mbox_data = (1<<9);
3118 btv->mbox_mask = (1<<6)|(1<<7)|(1<<8)|(1<<9);
3121 btv->has_radio = 0;
3124 if (btv->c.type == BTTV_BOARD_MIRO)
3125 btv->c.type = BTTV_BOARD_MIROPRO;
3126 if (btv->c.type == BTTV_BOARD_PINNACLE)
3127 btv->c.type = BTTV_BOARD_PINNACLEPRO;
3131 btv->c.nr, id+1, btv->tuner_type,
3132 !btv->has_radio ? "no" :
3133 (btv->has_matchbox ? "matchbox" : "fmtuner"),
3138 btv->has_radio = 0;
3142 btv->tda9887_conf = TDA9887_INTERCARRIER;
3146 btv->has_radio = 1;
3147 btv->tda9887_conf = TDA9887_QSS;
3151 btv->has_radio = 1;
3152 btv->tda9887_conf = TDA9887_QSS;
3156 btv->tda9887_conf = TDA9887_QSS;
3160 btv->tda9887_conf = TDA9887_INTERCARRIER;
3164 btv->tda9887_conf = TDA9887_INTERCARRIER;
3168 btv->tda9887_conf = TDA9887_INTERCARRIER;
3175 btv->c.type = BTTV_BOARD_PINNACLEPRO;
3178 btv->c.nr, id, info, btv->has_radio ? "yes" : "no");
3179 btv->tuner_type = TUNER_MT2032;
3186 static void init_ids_eagle(struct bttv *btv)
3204 static void eagle_muxsel(struct bttv *btv, unsigned int input)
3219 static void gvc1100_muxsel(struct bttv *btv, unsigned int input)
3238 static void init_lmlbt4x(struct bttv *btv)
3246 static void sigmaSQ_muxsel(struct bttv *btv, unsigned int input)
3253 static void sigmaSLC_muxsel(struct bttv *btv, unsigned int input)
3260 static void geovision_muxsel(struct bttv *btv, unsigned int input)
3269 static void bttv_reset_audio(struct bttv *btv)
3280 if (btv->id != 878)
3284 printk("bttv%d: BT878A ARESET\n",btv->c.nr);
3291 void __devinit bttv_init_card1(struct bttv *btv)
3293 switch (btv->c.type) {
3296 boot_msp34xx(btv,5);
3300 boot_msp34xx(btv,20);
3303 boot_msp34xx(btv,11);
3306 pvr_boot(btv);
3311 btv->use_i2c_hw = 1;
3314 init_RTV24( btv );
3318 if (!bttv_tvcards[btv->c.type].has_dvb)
3319 bttv_reset_audio(btv);
3323 void __devinit bttv_init_card2(struct bttv *btv)
3325 btv->tuner_type = UNSET;
3327 if (BTTV_BOARD_UNKNOWN == btv->c.type) {
3328 bttv_readee(btv,eeprom_data,0xa0);
3329 identify_by_eeprom(btv,eeprom_data);
3332 switch (btv->c.type) {
3338 miro_pinnacle_gpio(btv);
3351 flyvideo_gpio(btv);
3357 bttv_readee(btv,eeprom_data,0xa0);
3358 hauppauge_eeprom(btv);
3362 bttv_readee(btv,eeprom_data,0xa0);
3363 avermedia_eeprom(btv);
3366 init_PXC200(btv);
3369 picolo_tetra_init(btv);
3372 btv->has_radio = 1;
3373 btv->has_matchbox = 1;
3374 btv->mbox_we = 0x20;
3375 btv->mbox_most = 0;
3376 btv->mbox_clk = 0x08;
3377 btv->mbox_data = 0x10;
3378 btv->mbox_mask = 0x38;
3382 terratec_active_radio_upgrade(btv);
3385 if (btv->cardid == 0x3002144f) {
3386 btv->has_radio=1;
3387 printk("bttv%d: radio detected by subsystem id (CPH05x)\n",btv->c.nr);
3391 if (btv->cardid == 0x3060121a) {
3394 btv->has_radio=0;
3395 btv->tuner_type=TUNER_TEMIC_NTSC;
3410 bttv_readee(btv,eeprom_data,0xa0);
3411 osprey_eeprom(btv, eeprom_data);
3414 init_ids_eagle(btv);
3417 bttv_readee(btv,eeprom_data,0xa0);
3418 modtec_eeprom(btv);
3421 init_lmlbt4x(btv);
3424 tibetCS16_init(btv);
3427 kodicom4400r_init(btv);
3430 gv800s_init(btv);
3435 if (!(btv->id==848 && btv->revision==0x11)) {
3437 if (PLL_28 == bttv_tvcards[btv->c.type].pll) {
3438 btv->pll.pll_ifreq=28636363;
3439 btv->pll.pll_crystal=BT848_IFORM_XT0;
3441 if (PLL_35 == bttv_tvcards[btv->c.type].pll) {
3442 btv->pll.pll_ifreq=35468950;
3443 btv->pll.pll_crystal=BT848_IFORM_XT1;
3446 switch (pll[btv->c.nr]) {
3448 btv->pll.pll_crystal = 0;
3449 btv->pll.pll_ifreq = 0;
3450 btv->pll.pll_ofreq = 0;
3454 btv->pll.pll_ifreq = 28636363;
3455 btv->pll.pll_ofreq = 0;
3456 btv->pll.pll_crystal = BT848_IFORM_XT0;
3460 btv->pll.pll_ifreq = 35468950;
3461 btv->pll.pll_ofreq = 0;
3462 btv->pll.pll_crystal = BT848_IFORM_XT1;
3466 btv->pll.pll_current = -1;
3469 if (UNSET != bttv_tvcards[btv->c.type].tuner_type)
3470 if (UNSET == btv->tuner_type)
3471 btv->tuner_type = bttv_tvcards[btv->c.type].tuner_type;
3472 if (UNSET != tuner[btv->c.nr])
3473 btv->tuner_type = tuner[btv->c.nr];
3475 if (btv->tuner_type == TUNER_ABSENT)
3476 printk(KERN_INFO "bttv%d: tuner absent\n", btv->c.nr);
3477 else if(btv->tuner_type == UNSET)
3478 printk(KERN_WARNING "bttv%d: tuner type unset\n", btv->c.nr);
3480 printk(KERN_INFO "bttv%d: tuner type=%d\n", btv->c.nr,
3481 btv->tuner_type);
3484 printk(KERN_WARNING "bttv%d: the autoload option is obsolete.\n", btv->c.nr);
3485 printk(KERN_WARNING "bttv%d: use option msp3400, tda7432 or tvaudio to\n", btv->c.nr);
3486 printk(KERN_WARNING "bttv%d: override which audio module should be used.\n", btv->c.nr);
3489 if (UNSET == btv->tuner_type)
3490 btv->tuner_type = TUNER_ABSENT;
3492 btv->dig = bttv_tvcards[btv->c.type].has_dig_in ?
3493 bttv_tvcards[btv->c.type].video_inputs - 1 : UNSET;
3494 btv->svhs = bttv_tvcards[btv->c.type].svhs == NO_SVHS ?
3495 UNSET : bttv_tvcards[btv->c.type].svhs;
3496 if (svhs[btv->c.nr] != UNSET)
3497 btv->svhs = svhs[btv->c.nr];
3498 if (remote[btv->c.nr] != UNSET)
3499 btv->has_remote = remote[btv->c.nr];
3501 if (bttv_tvcards[btv->c.type].has_radio)
3502 btv->has_radio = 1;
3503 if (bttv_tvcards[btv->c.type].has_remote)
3504 btv->has_remote = 1;
3505 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3506 btv->gpioirq = 1;
3507 if (bttv_tvcards[btv->c.type].volume_gpio)
3508 btv->volume_gpio = bttv_tvcards[btv->c.type].volume_gpio;
3509 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3510 btv->audio_mode_gpio = bttv_tvcards[btv->c.type].audio_mode_gpio;
3512 if (btv->tuner_type == TUNER_ABSENT)
3515 if (btv->has_saa6588 || saa6588[btv->c.nr]) {
3524 sd = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3525 &btv->c.i2c_adap, "saa6588", "saa6588", 0, addrs);
3526 btv->has_saa6588 = (sd != NULL);
3534 switch (audiodev[btv->c.nr]) {
3549 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3550 &btv->c.i2c_adap, "msp3400", "msp3400", 0, addrs);
3551 if (btv->sd_msp34xx)
3563 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3564 &btv->c.i2c_adap, "tda7432", "tda7432", 0, addrs))
3571 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3572 &btv->c.i2c_adap, "tvaudio", "tvaudio", 0, tvaudio_addrs());
3573 if (btv->sd_tvaudio)
3580 btv->c.nr);
3590 if (!bttv_tvcards[btv->c.type].no_msp34xx) {
3591 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3592 &btv->c.i2c_adap, "msp3400", "msp3400",
3594 } else if (bttv_tvcards[btv->c.type].msp34xx_alt) {
3595 btv->sd_msp34xx = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3596 &btv->c.i2c_adap, "msp3400", "msp3400",
3601 if (btv->sd_msp34xx)
3605 if (!bttv_tvcards[btv->c.type].no_tda7432) {
3611 if (v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3612 &btv->c.i2c_adap, "tda7432", "tda7432", 0, addrs))
3617 btv->sd_tvaudio = v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3618 &btv->c.i2c_adap, "tvaudio", "tvaudio", 0, tvaudio_addrs());
3619 if (btv->sd_tvaudio)
3624 btv->c.nr);
3629 void __devinit bttv_init_tuner(struct bttv *btv)
3633 if (ADDR_UNSET != bttv_tvcards[btv->c.type].tuner_addr)
3634 addr = bttv_tvcards[btv->c.type].tuner_addr;
3636 if (btv->tuner_type != TUNER_ABSENT) {
3640 if (bttv_tvcards[btv->c.type].has_radio)
3641 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3642 &btv->c.i2c_adap, "tuner", "tuner",
3644 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3645 &btv->c.i2c_adap, "tuner", "tuner",
3647 v4l2_i2c_new_subdev(&btv->c.v4l2_dev,
3648 &btv->c.i2c_adap, "tuner", "tuner",
3652 tun_setup.type = btv->tuner_type;
3655 if (bttv_tvcards[btv->c.type].has_radio)
3658 bttv_call_all(btv, tuner, s_type_addr, &tun_setup);
3661 if (btv->tda9887_conf) {
3665 tda9887_cfg.priv = &btv->tda9887_conf;
3667 bttv_call_all(btv, tuner, s_config, &tda9887_cfg);
3673 static void modtec_eeprom(struct bttv *btv)
3676 btv->tuner_type=TUNER_TEMIC_4066FY5_PAL_I;
3678 btv->c.nr,&eeprom_data[0x1e]);
3680 btv->tuner_type=TUNER_ALPS_TSBB5_PAL_I;
3682 btv->c.nr,&eeprom_data[0x1e]);
3684 btv->tuner_type=TUNER_PHILIPS_NTSC;
3686 btv->c.nr,&eeprom_data[0x1e]);
3689 btv->c.nr,&eeprom_data[0x1e]);
3693 static void __devinit hauppauge_eeprom(struct bttv *btv)
3697 tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data);
3698 btv->tuner_type = tv.tuner_type;
3699 btv->has_radio = tv.has_radio;
3702 btv->c.nr, tv.model);
3710 btv->c.nr,
3711 bttv_tvcards[btv->c.type].name,
3713 btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB;
3717 static int terratec_active_radio_upgrade(struct bttv *btv)
3721 btv->has_radio = 1;
3722 btv->has_matchbox = 1;
3723 btv->mbox_we = 0x10;
3724 btv->mbox_most = 0x20;
3725 btv->mbox_clk = 0x08;
3726 btv->mbox_data = 0x04;
3727 btv->mbox_mask = 0x3c;
3729 btv->mbox_iow = 1 << 8;
3730 btv->mbox_ior = 1 << 9;
3731 btv->mbox_csel = 1 << 10;
3734 tea5757_write(btv, 5 * freq + 0x358); /* write 0x1ed8 */
3735 if (0x1ed8 == tea5757_read(btv)) {
3737 btv->c.nr);
3738 btv->has_radio = 1;
3739 btv->has_saa6588 = 1;
3740 btv->has_matchbox = 1;
3742 btv->has_radio = 0;
3743 btv->has_matchbox = 0;
3764 static int __devinit pvr_altera_load(struct bttv *btv, const u8 *micro,
3802 static int __devinit pvr_boot(struct bttv *btv)
3807 rc = request_firmware(&fw_entry, "hcwamc.rbf", &btv->c.pci->dev);
3810 btv->c.nr);
3813 rc = pvr_altera_load(btv, fw_entry->data, fw_entry->size);
3815 btv->c.nr, (rc < 0) ? "failed" : "ok");
3823 static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
3830 if (btv->c.type == BTTV_BOARD_UNKNOWN) {
3897 /* bttv_osprey_540_init(btv); */
3913 btv->c.nr, type);
3920 btv->c.nr, cardid,
3923 if (cardid<0 || btv->c.type == cardid)
3927 if (card[btv->c.nr] < bttv_num_tvcards) {
3929 "Not overriding user specified card type\n", btv->c.nr);
3932 "Changing card type from %d to %d\n", btv->c.nr,
3933 btv->c.type, cardid);
3934 btv->c.type = cardid;
3956 static void __devinit avermedia_eeprom(struct bttv *btv)
3963 btv->has_remote = (eeprom_data[0x42] & 0x01);
3977 btv->c.nr, eeprom_data[0x41], eeprom_data[0x42]);
3979 btv->tuner_type = tuner_type;
3985 btv->has_remote ? "yes" : "no");
3996 u32 bttv_tda9880_setnorm(struct bttv *btv, u32 gpiobits)
3999 if (btv->audio == TVAUDIO_INPUT_TUNER) {
4000 if (bttv_tvnorms[btv->tvnorm].v4l2_id & V4L2_STD_MN)
4006 gpio_bits(bttv_tvcards[btv->c.type].gpiomask, gpiobits);
4018 static void __devinit boot_msp34xx(struct bttv *btv, int pin)
4029 bttv_gpio_tracking(btv,"msp34xx");
4032 "init [%d]\n", btv->c.nr, pin);
4041 static void __devinit init_PXC200(struct bttv *btv)
4059 bttv_gpio_tracking(btv,"pxc200");
4073 bttv_I2CWrite(btv,0x5E,0,0x80,1);
4098 tmp=bttv_I2CWrite(btv,0x1E,0,vals[i],1);
4102 vals[i],tmp,bttv_I2CRead(btv,0x1F,NULL));
4140 init_RTV24 (struct bttv *btv)
4147 btv->c.nr);
4162 btv->c.nr, dataRead);
4176 btv->c.nr, dataRead);
4182 "bttv%d: Adlink RTV-24 initialisation complete.\n", btv->c.nr);
4196 static void bus_low(struct bttv *btv, int bit)
4198 if (btv->mbox_ior) {
4199 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4200 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4207 if (btv->mbox_ior) {
4208 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4213 static void bus_high(struct bttv *btv, int bit)
4215 if (btv->mbox_ior) {
4216 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4217 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4224 if (btv->mbox_ior) {
4225 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4230 static int bus_in(struct bttv *btv, int bit)
4232 if (btv->mbox_ior) {
4233 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4234 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4237 gpio_bits(btv->mbox_iow | btv->mbox_csel, 0);
4271 static int tea5757_read(struct bttv *btv)
4278 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we);
4280 if (btv->mbox_ior) {
4281 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4282 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4287 bttv_gpio_tracking(btv,"tea5757 read");
4289 bus_low(btv,btv->mbox_we);
4290 bus_low(btv,btv->mbox_clk);
4296 while (bus_in(btv,btv->mbox_data) && time_before(jiffies, timeout))
4298 if (bus_in(btv,btv->mbox_data)) {
4299 printk(KERN_WARNING "bttv%d: tea5757: read timeout\n",btv->c.nr);
4303 dprintk("bttv%d: tea5757:",btv->c.nr);
4306 bus_high(btv,btv->mbox_clk);
4308 dprintk("%c",(bus_in(btv,btv->mbox_most) == 0)?'T':'-');
4309 bus_low(btv,btv->mbox_clk);
4311 value |= (bus_in(btv,btv->mbox_data) == 0)?0:1; /* MSB first */
4312 dprintk("%c", (bus_in(btv,btv->mbox_most) == 0)?'S':'M');
4314 dprintk("\nbttv%d: tea5757: read 0x%X\n", btv->c.nr, value);
4318 static int tea5757_write(struct bttv *btv, int value)
4323 gpio_inout(btv->mbox_mask, btv->mbox_clk | btv->mbox_we | btv->mbox_data);
4325 if (btv->mbox_ior) {
4326 gpio_bits(btv->mbox_ior | btv->mbox_iow | btv->mbox_csel,
4327 btv->mbox_ior | btv->mbox_iow | btv->mbox_csel);
4331 bttv_gpio_tracking(btv,"tea5757 write");
4333 dprintk("bttv%d: tea5757: write 0x%X\n", btv->c.nr, value);
4334 bus_low(btv,btv->mbox_clk);
4335 bus_high(btv,btv->mbox_we);
4338 bus_high(btv,btv->mbox_data);
4340 bus_low(btv,btv->mbox_data);
4342 bus_high(btv,btv->mbox_clk);
4344 bus_low(btv,btv->mbox_clk);
4347 bus_low(btv,btv->mbox_we); /* unmute !!! */
4351 void tea5757_set_freq(struct bttv *btv, unsigned short freq)
4354 tea5757_write(btv, 5 * freq + 0x358); /* add 10.7MHz (see docs) */
4381 static void rv605_muxsel(struct bttv *btv, unsigned int input)
4429 static void tibetCS16_muxsel(struct bttv *btv, unsigned int input)
4435 static void tibetCS16_init(struct bttv *btv)
4471 static void kodicom4400r_write(struct bttv *btv,
4491 static void kodicom4400r_muxsel(struct bttv *btv, unsigned int input)
4498 mctlr = master[btv->c.nr];
4502 yaddr = (btv->c.nr - mctlr->c.nr + 1) & 3; /* the '&' is for safety */
4522 static void kodicom4400r_init(struct bttv *btv)
4524 char *sw_status = (char *)(&btv->mbox_we);
4533 kodicom4400r_write(btv, ix, ix, 1);
4540 if ((btv->c.nr<1) || (btv->c.nr>BTTV_MAX-3))
4542 master[btv->c.nr-1] = btv;
4543 master[btv->c.nr] = btv;
4544 master[btv->c.nr+1] = btv;
4545 master[btv->c.nr+2] = btv;
4558 static void xguard_muxsel(struct bttv *btv, unsigned int input)
4568 static void picolo_tetra_init(struct bttv *btv)
4574 static void picolo_tetra_muxsel (struct bttv* btv, unsigned int input)
4577 dprintk (KERN_DEBUG "bttv%d : picolo_tetra_muxsel => input = %d\n",btv->c.nr,input);
4616 static void ivc120_muxsel(struct bttv *btv, unsigned int input)
4623 btv->c.nr, input, matrix, key);
4626 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x00,
4628 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x00,
4630 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x00,
4632 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x00,
4636 bttv_I2CWrite(btv, I2C_TDA8540_ALT3, 0x02,
4638 bttv_I2CWrite(btv, I2C_TDA8540_ALT4, 0x02,
4640 bttv_I2CWrite(btv, I2C_TDA8540_ALT5, 0x02,
4642 bttv_I2CWrite(btv, I2C_TDA8540_ALT6, 0x02,
4666 static void PXC200_muxsel(struct bttv *btv, unsigned int input)
4677 rc=bttv_I2CWrite(btv,(PX_I2C_PIC<<1),buf[0],buf[1],1);
4679 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: pic cfg write failed:%d\n", btv->c.nr,rc);
4684 rc=bttv_I2CRead(btv,(PX_I2C_PIC<<1),NULL);
4686 printk(KERN_DEBUG "bttv%d: PXC200_muxsel: not PXC200F rc:%d \n", btv->c.nr,rc);
4693 /* mux = bttv_tvcards[btv->type].muxsel[input] & 3; */
4701 if (btv->cardid == PX_PXC200A_CARDID) {
4708 if (btv->cardid == PX_PXC200A_CARDID)
4721 if (btv->cardid == PX_PXC200A_CARDID)
4726 printk(KERN_DEBUG "bttv%d: setting input channel to:%d\n", btv->c.nr,(int)mux);
4729 static void phytec_muxsel(struct bttv *btv, unsigned int input)
4733 if (input == btv->svhs)
4754 static void gv800s_write(struct bttv *btv,
4783 * of the "master" card. A pointer to this card is stored in master[btv->c.nr].
4796 static void gv800s_muxsel(struct bttv *btv, unsigned int input)
4806 mctlr = master[btv->c.nr];
4811 yaddr = (btv->c.nr - mctlr->c.nr) & 3;
4825 static void gv800s_init(struct bttv *btv)
4827 char *sw_status = (char *)(&btv->mbox_we);
4837 gv800s_write(btv, ix, ix, 1);
4841 bttv_I2CWrite(btv, 0x18, 0x5, 0x90, 1);
4843 if (btv->c.nr > BTTV_MAX-4)
4849 master[btv->c.nr] = btv;
4850 master[btv->c.nr+1] = btv;
4851 master[btv->c.nr+2] = btv;
4852 master[btv->c.nr+3] = btv;
4903 int __devinit bttv_handle_chipset(struct bttv *btv)
4912 printk(KERN_INFO "bttv%d: enabling ETBF (430FX/VP3 compatibilty)\n",btv->c.nr);
4913 if (vsfx && btv->id >= 878)
4914 printk(KERN_INFO "bttv%d: enabling VSFX\n",btv->c.nr);
4917 btv->c.nr,latency);
4920 if (btv->id < 878) {
4923 btv->triton1 = BT848_INT_ETBF;
4926 pci_read_config_byte(btv->c.pci, BT878_DEVCTRL, &command);
4931 pci_write_config_byte(btv->c.pci, BT878_DEVCTRL, command);
4934 pci_write_config_byte(btv->c.pci, PCI_LATENCY_TIMER, latency);