summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l@cerqueira.org>2007-09-30 13:02:49 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-01-25 19:03:48 -0200
commit7b27d45bb50498c86aa87e7ef174b2a0f5b6f361 (patch)
tree5518bfbfa0320a4529de0ce0265952dd441ccf17 /drivers/media/video/cx88/cx88-video.c
parent4423a9a3395ef652d80d848161444b417f1f78c0 (diff)
downloadtalos-op-linux-7b27d45bb50498c86aa87e7ef174b2a0f5b6f361.tar.gz
talos-op-linux-7b27d45bb50498c86aa87e7ef174b2a0f5b6f361.zip
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)
if (core->board.mpeg & CX88_MPEG_BLACKBIRD) {
/* sets sound input from external adc */
- if (INPUT(input).extadc)
+ if (INPUT(input).audioroute) {
+ /* The wm8775 module has the "2" route hardwired into
+ the initialization. Some boards may use different
+ routes for different inputs. HVR-1300 surely does */
+ if (core->board.audio_chip &&
+ core->board.audio_chip == AUDIO_CHIP_WM8775) {
+ struct v4l2_routing route;
+
+ route.input = INPUT(input).audioroute;
+ cx88_call_i2c_clients(core,
+ VIDIOC_INT_S_AUDIO_ROUTING,&route);
+ }
+
cx_set(AUD_CTL, EN_I2SIN_ENABLE);
- else
+ } else
cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
}
return 0;
OpenPOWER on IntegriCloud