summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-02-05 20:29:26 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-02-05 20:29:26 -0200
commit6ed8c3ecd4f0af1020033702ba9e7236984e542e (patch)
treeb9af541a4a3ab2c8031bdcf8cb7498d77b1538f1 /linux
parent4ac1cd8ad088bf6e13b4448feb8806a56c361a17 (diff)
downloadmediapointer-dvb-s2-6ed8c3ecd4f0af1020033702ba9e7236984e542e.tar.gz
mediapointer-dvb-s2-6ed8c3ecd4f0af1020033702ba9e7236984e542e.tar.bz2
Fix em28xx audio initialization
From: Mauro Carvalho Chehab <mchehab@infradead.org> 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>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-cards.c6
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-core.c11
2 files changed, 6 insertions, 11 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-cards.c b/linux/drivers/media/video/em28xx/em28xx-cards.c
index 1a9236e24..db07cbbe3 100644
--- a/linux/drivers/media/video/em28xx/em28xx-cards.c
+++ b/linux/drivers/media/video/em28xx/em28xx-cards.c
@@ -394,15 +394,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,
} },
},
};
diff --git a/linux/drivers/media/video/em28xx/em28xx-core.c b/linux/drivers/media/video/em28xx/em28xx-core.c
index 952755c8e..3af2792a7 100644
--- a/linux/drivers/media/video/em28xx/em28xx-core.c
+++ b/linux/drivers/media/video/em28xx/em28xx-core.c
@@ -325,7 +325,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) {
@@ -345,11 +344,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;
@@ -366,11 +363,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;