]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/cx88/cx88-cards.c
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[linux-2.6-omap-h63xx.git] / drivers / media / video / cx88 / cx88-cards.c
index 6986844e33c84369e115ef4c184bcbb057c67676..5bcbb4cc7c2a53e0656d56be53441ad085fb0874 100644 (file)
@@ -1270,7 +1270,6 @@ static const struct cx88_board cx88_boards[] = {
                .mpeg           = CX88_MPEG_DVB,
        },
        [CX88_BOARD_HAUPPAUGE_HVR3000] = {
-               /* FIXME: Add dvb & radio support */
                .name           = "Hauppauge WinTV-HVR3000 TriMode Analog/DVB-S/DVB-T",
                .tuner_type     = TUNER_PHILIPS_FMD1216ME_MK3,
                .radio_type     = UNSET,
@@ -1282,18 +1281,27 @@ static const struct cx88_board cx88_boards[] = {
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
                        .gpio0  = 0x84bf,
+                       /* 1: TV Audio / FM Mono */
                        .audioroute = 1,
                },{
                        .type   = CX88_VMUX_COMPOSITE1,
                        .vmux   = 1,
                        .gpio0  = 0x84bf,
+                       /* 2: Line-In */
                        .audioroute = 2,
                },{
                        .type   = CX88_VMUX_SVIDEO,
                        .vmux   = 2,
                        .gpio0  = 0x84bf,
+                       /* 2: Line-In */
                        .audioroute = 2,
                }},
+               .radio = {
+                       .type   = CX88_RADIO,
+                       .gpio0  = 0x84bf,
+                       /* 4: FM Stereo (untested) */
+                       .audioroute = 8,
+               },
                .mpeg           = CX88_MPEG_DVB,
                .num_frontends  = 2,
        },
@@ -1361,23 +1369,27 @@ static const struct cx88_board cx88_boards[] = {
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
                        .gpio0  = 0xef88,
+                       /* 1: TV Audio / FM Mono */
                        .audioroute = 1,
                },{
                        .type   = CX88_VMUX_COMPOSITE1,
                        .vmux   = 1,
                        .gpio0  = 0xef88,
+                       /* 2: Line-In */
                        .audioroute = 2,
                },{
                        .type   = CX88_VMUX_SVIDEO,
                        .vmux   = 2,
                        .gpio0  = 0xef88,
+                       /* 2: Line-In */
                        .audioroute = 2,
                }},
-               /* fixme: Add radio support */
                .mpeg           = CX88_MPEG_DVB | CX88_MPEG_BLACKBIRD,
                .radio = {
                        .type   = CX88_RADIO,
                        .gpio0  = 0xef88,
+                       /* 4: FM Stereo (untested) */
+                       .audioroute = 8,
                },
        },
        [CX88_BOARD_ADSTECH_PTV_390] = {
@@ -1735,7 +1747,7 @@ static const struct cx88_board cx88_boards[] = {
                 * BIT  VALUE   FUNCTION GP{x}_IO
                 * 0    1       I:?
                 * 1    1       I:?
-                * 2    1       O:DVB-T DEMOD ENABLE LOW/ANALOG DEMOD ENABLE HIGH
+                * 2    1       O:MPEG PORT 0=DVB-T 1=DVB-S
                 * 3    1       I:?
                 * 4    1       I:?
                 * 5    1       I:?
@@ -1751,24 +1763,39 @@ static const struct cx88_board cx88_boards[] = {
                 * d    0       I
                 * e    1       O
                 * f    1       O
+                *
+                * WM8775 ADC
+                *
+                * 1: TV Audio / FM Mono
+                * 2: Line-In
+                * 3: Line-In Expansion
+                * 4: FM Stereo
                 */
                .input          = {{
                        .type   = CX88_VMUX_TELEVISION,
                        .vmux   = 0,
                        .gpio0  = 0xc4bf,
+                       /* 1: TV Audio / FM Mono */
                        .audioroute = 1,
                }, {
                        .type   = CX88_VMUX_COMPOSITE1,
                        .vmux   = 1,
                        .gpio0  = 0xc4bf,
+                       /* 2: Line-In */
                        .audioroute = 2,
                }, {
                        .type   = CX88_VMUX_SVIDEO,
                        .vmux   = 2,
                        .gpio0  = 0xc4bf,
+                       /* 2: Line-In */
                        .audioroute = 2,
                } },
-               /* fixme: Add radio support */
+               .radio = {
+                       .type   = CX88_RADIO,
+                       .gpio0  = 0xc4bf,
+                       /* 4: FM Stereo */
+                       .audioroute = 8,
+               },
                .mpeg           = CX88_MPEG_DVB,
                .num_frontends  = 2,
        },
@@ -3017,8 +3044,8 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
 
        memcpy(&core->board, &cx88_boards[core->boardnr], sizeof(core->board));
 
-       if (!core->board.num_frontends)
-               core->board.num_frontends=1;
+       if (!core->board.num_frontends && (core->board.mpeg & CX88_MPEG_DVB))
+               core->board.num_frontends = 1;
 
        info_printk(core, "subsystem: %04x:%04x, board: %s [card=%d,%s], frontend(s): %d\n",
                pci->subsystem_vendor, pci->subsystem_device, core->board.name,