]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7158): Fix em28xx audio initialization
authorMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 6 Feb 2008 01:29:26 +0000 (22:29 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 18 Feb 2008 14:15:14 +0000 (11:15 -0300)
AC97 register initialization seem to always be needed. This patch fixes audio
for Prolink/Pixelview USB2 board.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/em28xx/em28xx-cards.c
drivers/media/video/em28xx/em28xx-core.c

index fc160772930c5529caade7886655eb42e5375ce7..aae7753fef117d1c7b12f0bcc30a83a1f018c19e 100644 (file)
@@ -393,15 +393,15 @@ struct em28xx_board em28xx_boards[] = {
                .input          = { {
                        .type     = EM28XX_VMUX_TELEVISION,
                        .vmux     = SAA7115_COMPOSITE2,
-                       .amux     = 1,
+                       .amux     = EM28XX_AMUX_LINE_IN,
                }, {
                        .type     = EM28XX_VMUX_COMPOSITE1,
                        .vmux     = SAA7115_COMPOSITE0,
-                       .amux     = 1,
+                       .amux     = EM28XX_AMUX_LINE_IN,
                }, {
                        .type     = EM28XX_VMUX_SVIDEO,
                        .vmux     = SAA7115_SVIDEO3,
-                       .amux     = 1,
+                       .amux     = EM28XX_AMUX_LINE_IN,
                } },
        },
 };
index 33d323cbce7a08570f4f05e21026f97f75103ee8..4ffb8d0bc52a6e8e849795a52ac60ba5f5016095 100644 (file)
@@ -274,7 +274,6 @@ int em28xx_set_audio_source(struct em28xx *dev)
        static char *disable = "\x08\x88";
        char *video = enable, *line = disable;
        int ret;
-       int no_ac97 = 0;
        u8 input;
 
        if (dev->is_em2800) {
@@ -294,11 +293,9 @@ int em28xx_set_audio_source(struct em28xx *dev)
                switch (dev->ctl_ainput) {
                case EM28XX_AMUX_VIDEO:
                        input = EM28XX_AUDIO_SRC_TUNER;
-                       no_ac97 = 1;
                        break;
                case EM28XX_AMUX_LINE_IN:
                        input = EM28XX_AUDIO_SRC_LINE;
-                       no_ac97 = 1;
                        break;
                case EM28XX_AMUX_AC97_VIDEO:
                        input = EM28XX_AUDIO_SRC_LINE;
@@ -315,11 +312,9 @@ int em28xx_set_audio_source(struct em28xx *dev)
        if (ret < 0)
                return ret;
 
-       if (no_ac97)
-               return 0;
-
-       /* Sets AC97 mixer registers */
-
+       /* Sets AC97 mixer registers
+          This is seems to be needed, even for non-ac97 configs
+        */
        ret = em28xx_write_ac97(dev, VIDEO_AC97, video);
        if (ret < 0)
                return ret;