aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt8xx/bttv-cards.c
diff options
context:
space:
mode:
authorNickolay V. Shmyrev <nshmyrev@yandex.ru>2006-08-25 15:53:04 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:00:59 -0500
commit4b9b936f278163614543d66f8e8c93d5484dd148 (patch)
treef7f03bb576f318a32f3d0959ccf41f7031f241be /drivers/media/video/bt8xx/bttv-cards.c
parent40c6e683a238c561db00c4fdfead43cb3b19d75f (diff)
V4L/DVB (6416): Split hooks on volume and audio mode and rework their handling
Also convert audio_mode_gpio functions from audio_hook Signed-off-by: Nickolay V. Shmyrev <nshmyrev@yandex.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-cards.c')
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index 78e5e29748ac..63a47cd4c161 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -414,7 +414,7 @@ struct tvcard bttv_tvcards[] = {
414 .tuner_type = UNSET, 414 .tuner_type = UNSET,
415 .tuner_addr = ADDR_UNSET, 415 .tuner_addr = ADDR_UNSET,
416 .radio_addr = ADDR_UNSET, 416 .radio_addr = ADDR_UNSET,
417 .audio_hook = avermedia_tvphone_audio, 417 .audio_mode_gpio= avermedia_tvphone_audio,
418 .has_remote = 1, 418 .has_remote = 1,
419 }, 419 },
420 [BTTV_BOARD_MATRIX_VISION] = { 420 [BTTV_BOARD_MATRIX_VISION] = {
@@ -526,7 +526,7 @@ struct tvcard bttv_tvcards[] = {
526 .tuner_type = TUNER_PHILIPS_PAL, 526 .tuner_type = TUNER_PHILIPS_PAL,
527 .tuner_addr = ADDR_UNSET, 527 .tuner_addr = ADDR_UNSET,
528 .radio_addr = ADDR_UNSET, 528 .radio_addr = ADDR_UNSET,
529 .audio_hook = avermedia_tv_stereo_audio, 529 .audio_mode_gpio= avermedia_tv_stereo_audio,
530 .no_gpioirq = 1, 530 .no_gpioirq = 1,
531 }, 531 },
532 [BTTV_BOARD_VHX] = { 532 [BTTV_BOARD_VHX] = {
@@ -591,7 +591,7 @@ struct tvcard bttv_tvcards[] = {
591 .tuner_type = UNSET, 591 .tuner_type = UNSET,
592 .tuner_addr = ADDR_UNSET, 592 .tuner_addr = ADDR_UNSET,
593 .radio_addr = ADDR_UNSET, 593 .radio_addr = ADDR_UNSET,
594 .audio_hook = winview_audio, 594 .volume_gpio = winview_volume,
595 .has_radio = 1, 595 .has_radio = 1,
596 }, 596 },
597 [BTTV_BOARD_AVEC_INTERCAP] = { 597 [BTTV_BOARD_AVEC_INTERCAP] = {
@@ -715,7 +715,7 @@ struct tvcard bttv_tvcards[] = {
715 .tuner_type = TUNER_PHILIPS_PAL, 715 .tuner_type = TUNER_PHILIPS_PAL,
716 .tuner_addr = ADDR_UNSET, 716 .tuner_addr = ADDR_UNSET,
717 .radio_addr = ADDR_UNSET, 717 .radio_addr = ADDR_UNSET,
718 .audio_hook = terratv_audio, 718 .audio_mode_gpio= terratv_audio,
719 }, 719 },
720 [BTTV_BOARD_HAUPPAUG_WCAM] = { 720 [BTTV_BOARD_HAUPPAUG_WCAM] = {
721 .name = "Hauppauge WinCam newer (bt878)", 721 .name = "Hauppauge WinCam newer (bt878)",
@@ -763,7 +763,7 @@ struct tvcard bttv_tvcards[] = {
763 .tuner_type = TUNER_PHILIPS_PAL, 763 .tuner_type = TUNER_PHILIPS_PAL,
764 .tuner_addr = ADDR_UNSET, 764 .tuner_addr = ADDR_UNSET,
765 .radio_addr = ADDR_UNSET, 765 .radio_addr = ADDR_UNSET,
766 .audio_hook = terratv_audio, 766 .audio_mode_gpio= terratv_audio,
767 /* GPIO wiring: 767 /* GPIO wiring:
768 External 20 pin connector (for Active Radio Upgrade board) 768 External 20 pin connector (for Active Radio Upgrade board)
769 gpio00: i2c-sda 769 gpio00: i2c-sda
@@ -902,7 +902,7 @@ struct tvcard bttv_tvcards[] = {
902 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */ 902 .tuner_type = TUNER_PHILIPS_PAL, /* default for now, gpio reads BFFF06 for Pal bg+dk */
903 .tuner_addr = ADDR_UNSET, 903 .tuner_addr = ADDR_UNSET,
904 .radio_addr = ADDR_UNSET, 904 .radio_addr = ADDR_UNSET,
905 .audio_hook = winfast2000_audio, 905 .audio_mode_gpio= winfast2000_audio,
906 .has_remote = 1, 906 .has_remote = 1,
907 }, 907 },
908 [BTTV_BOARD_CHRONOS_VS2] = { 908 [BTTV_BOARD_CHRONOS_VS2] = {
@@ -1022,7 +1022,7 @@ struct tvcard bttv_tvcards[] = {
1022 .tuner_addr = ADDR_UNSET, 1022 .tuner_addr = ADDR_UNSET,
1023 .radio_addr = ADDR_UNSET, 1023 .radio_addr = ADDR_UNSET,
1024 .has_radio = 1, 1024 .has_radio = 1,
1025 .audio_hook = avermedia_tvphone_audio, 1025 .audio_mode_gpio= avermedia_tvphone_audio,
1026 }, 1026 },
1027 [BTTV_BOARD_PV951] = { 1027 [BTTV_BOARD_PV951] = {
1028 .name = "ProVideo PV951", /* pic16c54 */ 1028 .name = "ProVideo PV951", /* pic16c54 */
@@ -1154,7 +1154,7 @@ struct tvcard bttv_tvcards[] = {
1154 .tuner_type = TUNER_ALPS_TSHC6_NTSC, 1154 .tuner_type = TUNER_ALPS_TSHC6_NTSC,
1155 .tuner_addr = ADDR_UNSET, 1155 .tuner_addr = ADDR_UNSET,
1156 .radio_addr = ADDR_UNSET, 1156 .radio_addr = ADDR_UNSET,
1157 .audio_hook = gvbctv3pci_audio, 1157 .audio_mode_gpio= gvbctv3pci_audio,
1158 }, 1158 },
1159 [BTTV_BOARD_PXELVWPLTVPAK] = { 1159 [BTTV_BOARD_PXELVWPLTVPAK] = {
1160 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP", 1160 .name = "Prolink PV-BT878P+4E / PixelView PlayTV PAK / Lenco MXTV-9578 CP",
@@ -1459,7 +1459,7 @@ struct tvcard bttv_tvcards[] = {
1459 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */ 1459 /* -dk-???: set mute=0x1800 for tda9874h daughterboard */
1460 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 }, 1460 .gpiomux = { 0x0000,0x0800,0x1000,0x1000 },
1461 .gpiomute = 0x1800, 1461 .gpiomute = 0x1800,
1462 .audio_hook = fv2000s_audio, 1462 .audio_mode_gpio= fv2000s_audio,
1463 .no_msp34xx = 1, 1463 .no_msp34xx = 1,
1464 .no_tda9875 = 1, 1464 .no_tda9875 = 1,
1465 .needs_tvaudio = 1, 1465 .needs_tvaudio = 1,
@@ -1500,7 +1500,7 @@ struct tvcard bttv_tvcards[] = {
1500 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC, 1500 .tuner_type = TUNER_SHARP_2U5JF5540_NTSC,
1501 .tuner_addr = ADDR_UNSET, 1501 .tuner_addr = ADDR_UNSET,
1502 .radio_addr = ADDR_UNSET, 1502 .radio_addr = ADDR_UNSET,
1503 .audio_hook = gvbctv3pci_audio, 1503 .audio_mode_gpio= gvbctv3pci_audio,
1504 }, 1504 },
1505 1505
1506 /* ---- card 0x44 ---------------------------------- */ 1506 /* ---- card 0x44 ---------------------------------- */
@@ -1619,7 +1619,7 @@ struct tvcard bttv_tvcards[] = {
1619 .tuner_type = TUNER_PHILIPS_PAL, 1619 .tuner_type = TUNER_PHILIPS_PAL,
1620 .tuner_addr = ADDR_UNSET, 1620 .tuner_addr = ADDR_UNSET,
1621 .radio_addr = ADDR_UNSET, 1621 .radio_addr = ADDR_UNSET,
1622 .audio_hook = pvbt878p9b_audio, /* Note: not all cards have stereo */ 1622 .audio_mode_gpio= pvbt878p9b_audio, /* Note: not all cards have stereo */
1623 .has_radio = 1, /* Note: not all cards have radio */ 1623 .has_radio = 1, /* Note: not all cards have radio */
1624 .has_remote = 1, 1624 .has_remote = 1,
1625 /* GPIO wiring: 1625 /* GPIO wiring:
@@ -1697,7 +1697,7 @@ struct tvcard bttv_tvcards[] = {
1697 .tuner_type = TUNER_PHILIPS_NTSC, 1697 .tuner_type = TUNER_PHILIPS_NTSC,
1698 .tuner_addr = ADDR_UNSET, 1698 .tuner_addr = ADDR_UNSET,
1699 .radio_addr = ADDR_UNSET, 1699 .radio_addr = ADDR_UNSET,
1700 .audio_hook = windvr_audio, 1700 .audio_mode_gpio= windvr_audio,
1701 }, 1701 },
1702 [BTTV_BOARD_GRANDTEC_MULTI] = { 1702 [BTTV_BOARD_GRANDTEC_MULTI] = {
1703 .name = "GrandTec Multi Capture Card (Bt878)", 1703 .name = "GrandTec Multi Capture Card (Bt878)",
@@ -1794,7 +1794,7 @@ struct tvcard bttv_tvcards[] = {
1794 .tuner_type = TUNER_PHILIPS_NTSC_M, 1794 .tuner_type = TUNER_PHILIPS_NTSC_M,
1795 .tuner_addr = ADDR_UNSET, 1795 .tuner_addr = ADDR_UNSET,
1796 .radio_addr = ADDR_UNSET, 1796 .radio_addr = ADDR_UNSET,
1797 .audio_hook = gvbctv5pci_audio, 1797 .audio_mode_gpio= gvbctv5pci_audio,
1798 .has_radio = 1, 1798 .has_radio = 1,
1799 }, 1799 },
1800 [BTTV_BOARD_OSPREY1x0] = { 1800 [BTTV_BOARD_OSPREY1x0] = {
@@ -2093,7 +2093,7 @@ struct tvcard bttv_tvcards[] = {
2093 .tuner_type = TUNER_PHILIPS_NTSC, 2093 .tuner_type = TUNER_PHILIPS_NTSC,
2094 .tuner_addr = ADDR_UNSET, 2094 .tuner_addr = ADDR_UNSET,
2095 .radio_addr = ADDR_UNSET, 2095 .radio_addr = ADDR_UNSET,
2096 .audio_hook = adtvk503_audio, 2096 .audio_mode_gpio= adtvk503_audio,
2097 }, 2097 },
2098 2098
2099 /* ---- card 0x64 ---------------------------------- */ 2099 /* ---- card 0x64 ---------------------------------- */
@@ -3160,8 +3160,8 @@ static void flyvideo_gpio(struct bttv *btv)
3160 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80 3160 /* LR90 Audio Routing is done by 2 hef4052, so Audio_Mask has 4 bits: 0x001c80
3161 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00 3161 * LR26/LR50 only has 1 hef4052, Audio_Mask 0x000c00
3162 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */ 3162 * Audio options: from tuner, from tda9821/tda9821(mono,stereo,sap), from tda9874, ext., mute */
3163 if(has_tda9820_tda9821) btv->audio_hook = lt9415_audio; 3163 if(has_tda9820_tda9821) btv->audio_mode_gpio = lt9415_audio;
3164 /* todo: if(has_tda9874) btv->audio_hook = fv2000s_audio; */ 3164 /* todo: if(has_tda9874) btv->audio_mode_gpio = fv2000s_audio; */
3165} 3165}
3166 3166
3167static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1, 3167static int miro_tunermap[] = { 0,6,2,3, 4,5,6,0, 3,0,4,5, 5,2,16,1,
@@ -3581,8 +3581,10 @@ void __devinit bttv_init_card2(struct bttv *btv)
3581 btv->has_remote=1; 3581 btv->has_remote=1;
3582 if (!bttv_tvcards[btv->c.type].no_gpioirq) 3582 if (!bttv_tvcards[btv->c.type].no_gpioirq)
3583 btv->gpioirq=1; 3583 btv->gpioirq=1;
3584 if (bttv_tvcards[btv->c.type].audio_hook) 3584 if (bttv_tvcards[btv->c.type].volume_gpio)
3585 btv->audio_hook=bttv_tvcards[btv->c.type].audio_hook; 3585 btv->volume_gpio=bttv_tvcards[btv->c.type].volume_gpio;
3586 if (bttv_tvcards[btv->c.type].audio_mode_gpio)
3587 btv->audio_mode_gpio=bttv_tvcards[btv->c.type].audio_mode_gpio;
3586 3588
3587 if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) { 3589 if (bttv_tvcards[btv->c.type].digital_mode == DIGITAL_MODE_CAMERA) {
3588 /* detect Bt832 chip for quartzsight digital camera */ 3590 /* detect Bt832 chip for quartzsight digital camera */