aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l@cerqueira.org>2007-09-30 12:02:49 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 16:03:48 -0500
commit7b27d45bb50498c86aa87e7ef174b2a0f5b6f361 (patch)
tree5518bfbfa0320a4529de0ce0265952dd441ccf17 /drivers/media/video/cx88/cx88-video.c
parent4423a9a3395ef652d80d848161444b417f1f78c0 (diff)
V4L/DVB (6831): Audio routes fix for blackbird boards with the wm8775 ADC
Fix lack of audio on the MPEG-2 stream of wm8775 based blackbirds. The wm8775 module initializes the audio input at "route 2", which doesn't hold true for all boards. The HVR-1300, for example, uses route 1 for tuner audio, and route 2 for baseband. So we must route the audio to the proper input depending on what video input is being used. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/cx88/cx88-video.c')
-rw-r--r--drivers/media/video/cx88/cx88-video.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 6d5ea8ce9830..1b80f0f700e6 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -394,9 +394,21 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input)
394 394
395 if (core->board.mpeg & CX88_MPEG_BLACKBIRD) { 395 if (core->board.mpeg & CX88_MPEG_BLACKBIRD) {
396 /* sets sound input from external adc */ 396 /* sets sound input from external adc */
397 if (INPUT(input).extadc) 397 if (INPUT(input).audioroute) {
398 /* The wm8775 module has the "2" route hardwired into
399 the initialization. Some boards may use different
400 routes for different inputs. HVR-1300 surely does */
401 if (core->board.audio_chip &&
402 core->board.audio_chip == AUDIO_CHIP_WM8775) {
403 struct v4l2_routing route;
404
405 route.input = INPUT(input).audioroute;
406 cx88_call_i2c_clients(core,
407 VIDIOC_INT_S_AUDIO_ROUTING,&route);
408 }
409
398 cx_set(AUD_CTL, EN_I2SIN_ENABLE); 410 cx_set(AUD_CTL, EN_I2SIN_ENABLE);
399 else 411 } else
400 cx_clear(AUD_CTL, EN_I2SIN_ENABLE); 412 cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
401 } 413 }
402 return 0; 414 return 0;