summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-core.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-01-12 21:50:52 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-29 08:35:39 -0200
commit8866f9cf8d85f3614855a49b9d9056f265d0cd33 (patch)
treec855dbd6ae345a05cdffb4f974d3161aaa122bc4 /drivers/media/video/em28xx/em28xx-core.c
parentfc96ab730268b8b652ae2494088e8bd4572f58aa (diff)
downloadop-kernel-dev-8866f9cf8d85f3614855a49b9d9056f265d0cd33.zip
op-kernel-dev-8866f9cf8d85f3614855a49b9d9056f265d0cd33.tar.gz
V4L/DVB (10228): em28xx: fix audio output PCM IN selection
Some em28xx devices use the PCM IN AC 97 PIN for digital audio. However, currently, the PCM IN selection is not set by the driver. This patch allows specifying the PCM IN expected output, via board description table. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-core.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-core.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-core.c b/drivers/media/video/em28xx/em28xx-core.c
index eb5fb05..69ce788 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -454,6 +454,15 @@ int em28xx_audio_analog_set(struct em28xx *dev)
em28xx_warn("couldn't setup AC97 register %d\n",
outputs[i].reg);
}
+
+ if (dev->ctl_aoutput & EM28XX_AOUT_PCM_IN) {
+ int sel = ac97_return_record_select(dev->ctl_aoutput);
+
+ /* Use the same input for both left and right channels */
+ sel |= (sel << 8);
+
+ em28xx_write_ac97(dev, AC97_RECORD_SELECT, sel);
+ }
}
return ret;
OpenPOWER on IntegriCloud