diff options
Diffstat (limited to 'drivers/media/video/bttv-cards.c')
-rw-r--r-- | drivers/media/video/bttv-cards.c | 56 |
1 files changed, 47 insertions, 9 deletions
diff --git a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c index 012be639aa18..1621ab133d23 100644 --- a/drivers/media/video/bttv-cards.c +++ b/drivers/media/video/bttv-cards.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <asm/io.h> | 38 | #include <asm/io.h> |
39 | 39 | ||
40 | #include "bttvp.h" | 40 | #include "bttvp.h" |
41 | #include <media/v4l2-common.h> | ||
41 | 42 | ||
42 | /* fwd decl */ | 43 | /* fwd decl */ |
43 | static void boot_msp34xx(struct bttv *btv, int pin); | 44 | static void boot_msp34xx(struct bttv *btv, int pin); |
@@ -292,6 +293,9 @@ static struct CARD { | |||
292 | /* likely broken, vendor id doesn't match the other magic views ... | 293 | /* likely broken, vendor id doesn't match the other magic views ... |
293 | * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */ | 294 | * { 0xa0fca04f, BTTV_BOARD_MAGICTVIEW063, "Guillemot Maxi TV Video 3" }, */ |
294 | 295 | ||
296 | /* Duplicate PCI ID, reconfigure for this board during the eeprom read. | ||
297 | * { 0x13eb0070, BTTV_BOARD_HAUPPAUGE_IMPACTVCB, "Hauppauge ImpactVCB" }, */ | ||
298 | |||
295 | /* DVB cards (using pci function .1 for mpeg data xfer) */ | 299 | /* DVB cards (using pci function .1 for mpeg data xfer) */ |
296 | { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, | 300 | { 0x01010071, BTTV_BOARD_NEBULA_DIGITV, "Nebula Electronics DigiTV" }, |
297 | { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" }, | 301 | { 0x07611461, BTTV_BOARD_AVDVBT_761, "AverMedia AverTV DVB-T 761" }, |
@@ -2136,7 +2140,6 @@ struct tvcard bttv_tvcards[] = { | |||
2136 | .has_remote = 1, | 2140 | .has_remote = 1, |
2137 | .gpiomask = 0x1b, | 2141 | .gpiomask = 0x1b, |
2138 | .no_gpioirq = 1, | 2142 | .no_gpioirq = 1, |
2139 | .any_irq = 1, | ||
2140 | }, | 2143 | }, |
2141 | [BTTV_BOARD_PV143] = { | 2144 | [BTTV_BOARD_PV143] = { |
2142 | /* Jorge Boncompte - DTI2 <jorge@dti2.net> */ | 2145 | /* Jorge Boncompte - DTI2 <jorge@dti2.net> */ |
@@ -2817,6 +2820,22 @@ struct tvcard bttv_tvcards[] = { | |||
2817 | .tuner_addr = ADDR_UNSET, | 2820 | .tuner_addr = ADDR_UNSET, |
2818 | .has_radio = 1, | 2821 | .has_radio = 1, |
2819 | }, | 2822 | }, |
2823 | /* ---- card 0x8f ---------------------------------- */ | ||
2824 | [BTTV_BOARD_HAUPPAUGE_IMPACTVCB] = { | ||
2825 | .name = "Hauppauge ImpactVCB (bt878)", | ||
2826 | .video_inputs = 4, | ||
2827 | .audio_inputs = 0, | ||
2828 | .tuner = -1, | ||
2829 | .svhs = -1, | ||
2830 | .gpiomask = 0x0f, /* old: 7 */ | ||
2831 | .muxsel = { 0, 1, 3, 2}, /* Composite 0-3 */ | ||
2832 | .no_msp34xx = 1, | ||
2833 | .no_tda9875 = 1, | ||
2834 | .no_tda7432 = 1, | ||
2835 | .tuner_type = -1, | ||
2836 | .tuner_addr = ADDR_UNSET, | ||
2837 | .radio_addr = ADDR_UNSET, | ||
2838 | }, | ||
2820 | }; | 2839 | }; |
2821 | 2840 | ||
2822 | static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); | 2841 | static const unsigned int bttv_num_tvcards = ARRAY_SIZE(bttv_tvcards); |
@@ -3037,26 +3056,33 @@ static void miro_pinnacle_gpio(struct bttv *btv) | |||
3037 | switch (id) { | 3056 | switch (id) { |
3038 | case 1: | 3057 | case 1: |
3039 | info = "PAL / mono"; | 3058 | info = "PAL / mono"; |
3059 | btv->tda9887_conf = TDA9887_INTERCARRIER; | ||
3040 | break; | 3060 | break; |
3041 | case 2: | 3061 | case 2: |
3042 | info = "PAL+SECAM / stereo"; | 3062 | info = "PAL+SECAM / stereo"; |
3043 | btv->has_radio = 1; | 3063 | btv->has_radio = 1; |
3064 | btv->tda9887_conf = TDA9887_QSS; | ||
3044 | break; | 3065 | break; |
3045 | case 3: | 3066 | case 3: |
3046 | info = "NTSC / stereo"; | 3067 | info = "NTSC / stereo"; |
3047 | btv->has_radio = 1; | 3068 | btv->has_radio = 1; |
3069 | btv->tda9887_conf = TDA9887_QSS; | ||
3048 | break; | 3070 | break; |
3049 | case 4: | 3071 | case 4: |
3050 | info = "PAL+SECAM / mono"; | 3072 | info = "PAL+SECAM / mono"; |
3073 | btv->tda9887_conf = TDA9887_QSS; | ||
3051 | break; | 3074 | break; |
3052 | case 5: | 3075 | case 5: |
3053 | info = "NTSC / mono"; | 3076 | info = "NTSC / mono"; |
3077 | btv->tda9887_conf = TDA9887_INTERCARRIER; | ||
3054 | break; | 3078 | break; |
3055 | case 6: | 3079 | case 6: |
3056 | info = "NTSC / stereo"; | 3080 | info = "NTSC / stereo"; |
3081 | btv->tda9887_conf = TDA9887_INTERCARRIER; | ||
3057 | break; | 3082 | break; |
3058 | case 7: | 3083 | case 7: |
3059 | info = "PAL / stereo"; | 3084 | info = "PAL / stereo"; |
3085 | btv->tda9887_conf = TDA9887_INTERCARRIER; | ||
3060 | break; | 3086 | break; |
3061 | default: | 3087 | default: |
3062 | info = "oops: unknown card"; | 3088 | info = "oops: unknown card"; |
@@ -3067,8 +3093,7 @@ static void miro_pinnacle_gpio(struct bttv *btv) | |||
3067 | printk(KERN_INFO | 3093 | printk(KERN_INFO |
3068 | "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n", | 3094 | "bttv%d: pinnacle/mt: id=%d info=\"%s\" radio=%s\n", |
3069 | btv->c.nr, id, info, btv->has_radio ? "yes" : "no"); | 3095 | btv->c.nr, id, info, btv->has_radio ? "yes" : "no"); |
3070 | btv->tuner_type = 33; | 3096 | btv->tuner_type = TUNER_MT2032; |
3071 | btv->pinnacle_id = id; | ||
3072 | } | 3097 | } |
3073 | } | 3098 | } |
3074 | 3099 | ||
@@ -3370,9 +3395,9 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3370 | bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup); | 3395 | bttv_call_i2c_clients(btv, TUNER_SET_TYPE_ADDR, &tun_setup); |
3371 | } | 3396 | } |
3372 | 3397 | ||
3373 | if (btv->pinnacle_id != UNSET) { | 3398 | if (btv->tda9887_conf) { |
3374 | bttv_call_i2c_clients(btv, AUDC_CONFIG_PINNACLE, | 3399 | bttv_call_i2c_clients(btv, TDA9887_SET_CONFIG, |
3375 | &btv->pinnacle_id); | 3400 | &btv->tda9887_conf); |
3376 | } | 3401 | } |
3377 | 3402 | ||
3378 | btv->svhs = bttv_tvcards[btv->c.type].svhs; | 3403 | btv->svhs = bttv_tvcards[btv->c.type].svhs; |
@@ -3387,8 +3412,6 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3387 | btv->has_remote=1; | 3412 | btv->has_remote=1; |
3388 | if (!bttv_tvcards[btv->c.type].no_gpioirq) | 3413 | if (!bttv_tvcards[btv->c.type].no_gpioirq) |
3389 | btv->gpioirq=1; | 3414 | btv->gpioirq=1; |
3390 | if (bttv_tvcards[btv->c.type].any_irq) | ||
3391 | btv->any_irq = 1; | ||
3392 | if (bttv_tvcards[btv->c.type].audio_hook) | 3415 | if (bttv_tvcards[btv->c.type].audio_hook) |
3393 | btv->audio_hook=bttv_tvcards[btv->c.type].audio_hook; | 3416 | btv->audio_hook=bttv_tvcards[btv->c.type].audio_hook; |
3394 | 3417 | ||
@@ -3424,7 +3447,7 @@ void __devinit bttv_init_card2(struct bttv *btv) | |||
3424 | 3447 | ||
3425 | /* tuner modules */ | 3448 | /* tuner modules */ |
3426 | tda9887 = 0; | 3449 | tda9887 = 0; |
3427 | if (btv->pinnacle_id != UNSET) | 3450 | if (btv->tda9887_conf) |
3428 | tda9887 = 1; | 3451 | tda9887 = 1; |
3429 | if (0 == tda9887 && 0 == bttv_tvcards[btv->c.type].has_dvb && | 3452 | if (0 == tda9887 && 0 == bttv_tvcards[btv->c.type].has_dvb && |
3430 | bttv_I2CRead(btv, I2C_TDA9887, "TDA9887") >=0) | 3453 | bttv_I2CRead(btv, I2C_TDA9887, "TDA9887") >=0) |
@@ -3471,6 +3494,21 @@ static void __devinit hauppauge_eeprom(struct bttv *btv) | |||
3471 | tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data); | 3494 | tveeprom_hauppauge_analog(&btv->i2c_client, &tv, eeprom_data); |
3472 | btv->tuner_type = tv.tuner_type; | 3495 | btv->tuner_type = tv.tuner_type; |
3473 | btv->has_radio = tv.has_radio; | 3496 | btv->has_radio = tv.has_radio; |
3497 | |||
3498 | printk("bttv%d: Hauppauge eeprom indicates model#%d\n", | ||
3499 | btv->c.nr, tv.model); | ||
3500 | |||
3501 | /* | ||
3502 | * Some of the 878 boards have duplicate PCI IDs. Switch the board | ||
3503 | * type based on model #. | ||
3504 | */ | ||
3505 | if(tv.model == 64900) { | ||
3506 | printk("bttv%d: Switching board type from %s to %s\n", | ||
3507 | btv->c.nr, | ||
3508 | bttv_tvcards[btv->c.type].name, | ||
3509 | bttv_tvcards[BTTV_BOARD_HAUPPAUGE_IMPACTVCB].name); | ||
3510 | btv->c.type = BTTV_BOARD_HAUPPAUGE_IMPACTVCB; | ||
3511 | } | ||
3474 | } | 3512 | } |
3475 | 3513 | ||
3476 | static int terratec_active_radio_upgrade(struct bttv *btv) | 3514 | static int terratec_active_radio_upgrade(struct bttv *btv) |