Commit 7463dda2 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

V4L/DVB (7158): Fix em28xx audio initialization

AC97 register initialization seem to always be needed. This patch fixes audio
for Prolink/Pixelview USB2 board.
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 1685a6fe
...@@ -393,15 +393,15 @@ struct em28xx_board em28xx_boards[] = { ...@@ -393,15 +393,15 @@ struct em28xx_board em28xx_boards[] = {
.input = { { .input = { {
.type = EM28XX_VMUX_TELEVISION, .type = EM28XX_VMUX_TELEVISION,
.vmux = SAA7115_COMPOSITE2, .vmux = SAA7115_COMPOSITE2,
.amux = 1, .amux = EM28XX_AMUX_LINE_IN,
}, { }, {
.type = EM28XX_VMUX_COMPOSITE1, .type = EM28XX_VMUX_COMPOSITE1,
.vmux = SAA7115_COMPOSITE0, .vmux = SAA7115_COMPOSITE0,
.amux = 1, .amux = EM28XX_AMUX_LINE_IN,
}, { }, {
.type = EM28XX_VMUX_SVIDEO, .type = EM28XX_VMUX_SVIDEO,
.vmux = SAA7115_SVIDEO3, .vmux = SAA7115_SVIDEO3,
.amux = 1, .amux = EM28XX_AMUX_LINE_IN,
} }, } },
}, },
}; };
......
...@@ -274,7 +274,6 @@ int em28xx_set_audio_source(struct em28xx *dev) ...@@ -274,7 +274,6 @@ int em28xx_set_audio_source(struct em28xx *dev)
static char *disable = "\x08\x88"; static char *disable = "\x08\x88";
char *video = enable, *line = disable; char *video = enable, *line = disable;
int ret; int ret;
int no_ac97 = 0;
u8 input; u8 input;
if (dev->is_em2800) { if (dev->is_em2800) {
...@@ -294,11 +293,9 @@ int em28xx_set_audio_source(struct em28xx *dev) ...@@ -294,11 +293,9 @@ int em28xx_set_audio_source(struct em28xx *dev)
switch (dev->ctl_ainput) { switch (dev->ctl_ainput) {
case EM28XX_AMUX_VIDEO: case EM28XX_AMUX_VIDEO:
input = EM28XX_AUDIO_SRC_TUNER; input = EM28XX_AUDIO_SRC_TUNER;
no_ac97 = 1;
break; break;
case EM28XX_AMUX_LINE_IN: case EM28XX_AMUX_LINE_IN:
input = EM28XX_AUDIO_SRC_LINE; input = EM28XX_AUDIO_SRC_LINE;
no_ac97 = 1;
break; break;
case EM28XX_AMUX_AC97_VIDEO: case EM28XX_AMUX_AC97_VIDEO:
input = EM28XX_AUDIO_SRC_LINE; input = EM28XX_AUDIO_SRC_LINE;
...@@ -315,11 +312,9 @@ int em28xx_set_audio_source(struct em28xx *dev) ...@@ -315,11 +312,9 @@ int em28xx_set_audio_source(struct em28xx *dev)
if (ret < 0) if (ret < 0)
return ret; return ret;
if (no_ac97) /* Sets AC97 mixer registers
return 0; This is seems to be needed, even for non-ac97 configs
*/
/* Sets AC97 mixer registers */
ret = em28xx_write_ac97(dev, VIDEO_AC97, video); ret = em28xx_write_ac97(dev, VIDEO_AC97, video);
if (ret < 0) if (ret < 0)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment