aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7134/saa7134-alsa.c
diff options
context:
space:
mode:
authorRicardo Cerqueira <v4l@cerqueira.org>2006-09-06 05:25:38 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2006-09-26 11:30:35 -0400
commitdafcaaf86a77c086ed663eb25da1ca42800e171c (patch)
treebfbeb9a1dd3a449c8fbe723b5fae56b71f1bc38f /drivers/media/video/saa7134/saa7134-alsa.c
parentc8cd2ad3bb499ad684799b55ca10e260a9e2fd84 (diff)
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/saa7134-alsa.c')
-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)
590 590
591static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) 591static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream)
592{ 592{
593 snd_card_saa7134_t *saa7134 = snd_pcm_substream_chip(substream);
594 struct saa7134_dev *dev = saa7134->dev;
595
596 dev->ctl_mute = 1;
597 saa7134_tvaudio_setmute(dev);
593 return 0; 598 return 0;
594} 599}
595 600
@@ -631,6 +636,9 @@ static int snd_card_saa7134_capture_open(struct snd_pcm_substream * substream)
631 runtime->private_free = snd_card_saa7134_runtime_free; 636 runtime->private_free = snd_card_saa7134_runtime_free;
632 runtime->hw = snd_card_saa7134_capture; 637 runtime->hw = snd_card_saa7134_capture;
633 638
639 dev->ctl_mute = 0;
640 saa7134_tvaudio_setmute(dev);
641
634 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) 642 if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0)
635 return err; 643 return err;
636 644