aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx88
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx88')
-rw-r--r--drivers/media/video/cx88/cx88-video.c46
1 files changed, 31 insertions, 15 deletions
diff --git a/drivers/media/video/cx88/cx88-video.c b/drivers/media/video/cx88/cx88-video.c
index 1b80f0f700e..c8a5cd5eedf 100644
--- a/drivers/media/video/cx88/cx88-video.c
+++ b/drivers/media/video/cx88/cx88-video.c
@@ -392,25 +392,41 @@ int cx88_video_mux(struct cx88_core *core, unsigned int input)
392 break; 392 break;
393 } 393 }
394 394
395 if (core->board.mpeg & CX88_MPEG_BLACKBIRD) { 395 /* if there are audioroutes defined, we have an external
396 /* sets sound input from external adc */ 396 ADC to deal with audio */
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 397
398 if (INPUT(input).audioroute) {
399
400 /* cx2388's C-ADC is connected to the tuner only.
401 When used with S-Video, that ADC is busy dealing with
402 chroma, so an external must be used for baseband audio */
403
404 if (INPUT(input).type != CX88_VMUX_TELEVISION &&
405 INPUT(input).type != CX88_RADIO) {
406 /* "ADC mode" */
407 cx_write(AUD_I2SCNTL, 0x1);
410 cx_set(AUD_CTL, EN_I2SIN_ENABLE); 408 cx_set(AUD_CTL, EN_I2SIN_ENABLE);
411 } else 409 } else {
410 /* Normal mode */
411 cx_write(AUD_I2SCNTL, 0x0);
412 cx_clear(AUD_CTL, EN_I2SIN_ENABLE); 412 cx_clear(AUD_CTL, EN_I2SIN_ENABLE);
413 }
414
415 /* The wm8775 module has the "2" route hardwired into
416 the initialization. Some boards may use different
417 routes for different inputs. HVR-1300 surely does */
418 if (core->board.audio_chip &&
419 core->board.audio_chip == AUDIO_CHIP_WM8775) {
420 struct v4l2_routing route;
421
422 route.input = INPUT(input).audioroute;
423 cx88_call_i2c_clients(core,
424 VIDIOC_INT_S_AUDIO_ROUTING,&route);
425
426 }
427
413 } 428 }
429
414 return 0; 430 return 0;
415} 431}
416EXPORT_SYMBOL(cx88_video_mux); 432EXPORT_SYMBOL(cx88_video_mux);