summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-video.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-11-20 17:39:39 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-29 20:53:37 +0100
commite879b8ebb000298f8124fc8fae570afc9eb37cbb (patch)
treebab36de8b6415335809fe01350423e97c541b48e /drivers/media/video/em28xx/em28xx-video.c
parentV4L/DVB (9671): em28xx: Add detection of Sigmatel Stac97xx series of AC97 dev... (diff)
downloadlinux-e879b8ebb000298f8124fc8fae570afc9eb37cbb.tar.xz
linux-e879b8ebb000298f8124fc8fae570afc9eb37cbb.zip
V4L/DVB (9672): Allow opening more than one output at the same time
Some devices use more than one AC97 outputs. This patch allows such devices to properly work. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index bea74fd9a520..b262091415bb 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -568,6 +568,9 @@ static void video_mux(struct em28xx *dev, int index)
dev->ctl_ainput = INPUT(index)->amux;
dev->ctl_aoutput = INPUT(index)->aout;
+ if (!dev->ctl_aoutput)
+ dev->ctl_aoutput = EM28XX_AOUT_MASTER;
+
em28xx_i2c_call_clients(dev, VIDIOC_INT_S_VIDEO_ROUTING, &route);
if (dev->has_msp34xx) {
@@ -972,6 +975,9 @@ static int vidioc_s_audio(struct file *file, void *priv, struct v4l2_audio *a)
dev->ctl_ainput = INPUT(a->index)->amux;
dev->ctl_aoutput = INPUT(a->index)->aout;
+
+ if (!dev->ctl_aoutput)
+ dev->ctl_aoutput = EM28XX_AOUT_MASTER;
return 0;
}