aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-02-05 20:29:26 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-02-18 09:15:14 -0500
commit7463dda2ae868d3e0a6c98f65d6331481fc73ca3 (patch)
treeaf31fbb1dfddf4edc74d7629d24ecf682d31429d /drivers/media
parent1685a6fed210b110ac8abeff24e2ffd1713cb3fb (diff)
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: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/em28xx/em28xx-cards.c6
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c11
2 files changed, 6 insertions, 11 deletions
diff --git a/drivers/media/video/em28xx/em28xx-cards.c b/drivers/media/video/em28xx/em28xx-cards.c
index fc160772930c..aae7753fef11 100644
--- a/drivers/media/video/em28xx/em28xx-cards.c
+++ b/drivers/media/video/em28xx/em28xx-cards.c
@@ -393,15 +393,15 @@ struct em28xx_board em28xx_boards[] = {
393 .input = { { 393 .input = { {
394 .type = EM28XX_VMUX_TELEVISION, 394 .type = EM28XX_VMUX_TELEVISION,
395 .vmux = SAA7115_COMPOSITE2, 395 .vmux = SAA7115_COMPOSITE2,
396 .amux = 1, 396 .amux = EM28XX_AMUX_LINE_IN,
397 }, { 397 }, {
398 .type = EM28XX_VMUX_COMPOSITE1, 398 .type = EM28XX_VMUX_COMPOSITE1,
399 .vmux = SAA7115_COMPOSITE0, 399 .vmux = SAA7115_COMPOSITE0,
400 .amux = 1, 400 .amux = EM28XX_AMUX_LINE_IN,
401 }, { 401 }, {
402 .type = EM28XX_VMUX_SVIDEO, 402 .type = EM28XX_VMUX_SVIDEO,
403 .vmux = SAA7115_SVIDEO3, 403 .vmux = SAA7115_SVIDEO3,
404 .amux = 1, 404 .amux = EM28XX_AMUX_LINE_IN,
405 } }, 405 } },
406 }, 406 },
407}; 407};
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index 33d323cbce7a..4ffb8d0bc52a 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -274,7 +274,6 @@ int em28xx_set_audio_source(struct em28xx *dev)
274 static char *disable = "\x08\x88"; 274 static char *disable = "\x08\x88";
275 char *video = enable, *line = disable; 275 char *video = enable, *line = disable;
276 int ret; 276 int ret;
277 int no_ac97 = 0;
278 u8 input; 277 u8 input;
279 278
280 if (dev->is_em2800) { 279 if (dev->is_em2800) {
@@ -294,11 +293,9 @@ int em28xx_set_audio_source(struct em28xx *dev)
294 switch (dev->ctl_ainput) { 293 switch (dev->ctl_ainput) {
295 case EM28XX_AMUX_VIDEO: 294 case EM28XX_AMUX_VIDEO:
296 input = EM28XX_AUDIO_SRC_TUNER; 295 input = EM28XX_AUDIO_SRC_TUNER;
297 no_ac97 = 1;
298 break; 296 break;
299 case EM28XX_AMUX_LINE_IN: 297 case EM28XX_AMUX_LINE_IN:
300 input = EM28XX_AUDIO_SRC_LINE; 298 input = EM28XX_AUDIO_SRC_LINE;
301 no_ac97 = 1;
302 break; 299 break;
303 case EM28XX_AMUX_AC97_VIDEO: 300 case EM28XX_AMUX_AC97_VIDEO:
304 input = EM28XX_AUDIO_SRC_LINE; 301 input = EM28XX_AUDIO_SRC_LINE;
@@ -315,11 +312,9 @@ int em28xx_set_audio_source(struct em28xx *dev)
315 if (ret < 0) 312 if (ret < 0)
316 return ret; 313 return ret;
317 314
318 if (no_ac97) 315 /* Sets AC97 mixer registers
319 return 0; 316 This is seems to be needed, even for non-ac97 configs
320 317 */
321 /* Sets AC97 mixer registers */
322
323 ret = em28xx_write_ac97(dev, VIDEO_AC97, video); 318 ret = em28xx_write_ac97(dev, VIDEO_AC97, video);
324 if (ret < 0) 319 if (ret < 0)
325 return ret; 320 return ret;