From 37d57dd3b3ac7045d7fd044127e2299f55fc22b2 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Wed, 6 Sep 2006 10:25:38 +0100 Subject: Unmute/mute saa7134 when opening/closing the audio capture device. From: Ricardo Cerqueira 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 --- linux/drivers/media/video/saa7134/saa7134-alsa.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c index d2a1ca7ce..64fba2d36 100644 --- a/linux/drivers/media/video/saa7134/saa7134-alsa.c +++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c @@ -658,6 +658,11 @@ static int snd_card_saa7134_capture_close(snd_pcm_substream_t * substream) static int snd_card_saa7134_capture_close(struct snd_pcm_substream * substream) #endif { + 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; } @@ -707,6 +712,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; -- cgit v1.2.3 From 1944dbf8ab52a04e7c918d6177e2a76e5fa28469 Mon Sep 17 00:00:00 2001 From: Ricardo Cerqueira Date: Sat, 9 Sep 2006 16:24:08 +0100 Subject: export symbol saa7134_tvaudio_setmute from saa7134 for saa7134-alsa From: Ricardo Cerqueira saa7134-alsa now unmutes/mutes the line when opening/closing the capture device, and needs this symbol Signed-off-by: Ricardo Cerqueira --- linux/drivers/media/video/saa7134/saa7134-tvaudio.c | 1 + 1 file changed, 1 insertion(+) (limited to 'linux/drivers/media') diff --git a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c index f0d037475..af7ded81c 100644 --- a/linux/drivers/media/video/saa7134/saa7134-tvaudio.c +++ b/linux/drivers/media/video/saa7134/saa7134-tvaudio.c @@ -1098,6 +1098,7 @@ int saa7134_tvaudio_do_scan(struct saa7134_dev *dev) } EXPORT_SYMBOL(saa_dsp_writel); +EXPORT_SYMBOL(saa7134_tvaudio_setmute); /* ----------------------------------------------------------- */ /* -- cgit v1.2.3