aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l@cerqueira.org>2006-09-06 06:25:38 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 12:30:35 -0300
commitdafcaaf86a77c086ed663eb25da1ca42800e171c (patch)
treebfbeb9a1dd3a449c8fbe723b5fae56b71f1bc38f /drivers/media/video/saa7134
parentV4L/DVB (4611): Add module-init-tools version comment. (diff)
downloadlinux-dev-dafcaaf86a77c086ed663eb25da1ca42800e171c.tar.xz
linux-dev-dafcaaf86a77c086ed663eb25da1ca42800e171c.zip
V4L/DVB (4613): Unmute/mute saa7134 when opening/closing the audio capture device.
This patch should enable unmuting the audio device when opening it (and posterior muting when closing it), doing away with the need for unmute ioctls or v4lctl usage. Signed-off-by: Ricardo Cerqueira <v4l@cerqueira.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r--drivers/media/video/saa7134/saa7134-alsa.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index d73cff1970ae..a39e0136ce3b 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -590,6 +590,11 @@ static int snd_card_saa7134_hw_free(struct snd_pcm_substream * substream)
static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream)
{
+ snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
+ struct saa7134_dev *dev = saa7134->dev;
+
+ dev->ctl_mute = 1;
+ saa7134_tvaudio_setmute(dev);
return 0;
}
@@ -631,6 +636,9 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
runtime->private_free = snd_card_saa7134_runtime_free;
runtime->hw = snd_card_saa7134_capture;
+ dev->ctl_mute = 0;
+ saa7134_tvaudio_setmute(dev);
+
if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
return err;