linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch][saa7134] do not change mute state for capturing audio
@ 2011-07-10 16:27 Stas Sergeev
  2011-07-13 20:53 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 64+ messages in thread
From: Stas Sergeev @ 2011-07-10 16:27 UTC (permalink / raw)
  To: linux-media; +Cc: Nickolay V. Shmyrev, Mauro Carvalho Chehab

[-- Attachment #1: Type: text/plain, Size: 495 bytes --]

Hi.

When pulseaudio enables the audio capturing, the
driver unmutes the sound. But, if no app have properly
tuned the tuner yet, you get the white noise.
I think the capturing must not touch the mute state,
because, without tuning the tuner first, you can't capture
anything anyway.
Without this patch I am getting the white noise on every
xorg/pulseaudio startup, which made me to always think
that pulseaudio is a joke and will soon be removed. :)

Signed-off-by: Stas Sergeev <stsp@list.ru>

[-- Attachment #2: saa_mute.diff --]
[-- Type: text/plain, Size: 1196 bytes --]

diff --git a/drivers/media/video/saa7134/saa7134-alsa.c b/drivers/media/video/saa7134/saa7134-alsa.c
index 10460fd..d566468 100644
--- a/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/drivers/media/video/saa7134/saa7134-alsa.c
@@ -77,7 +77,6 @@ typedef struct snd_card_saa7134 {
 
 	unsigned long iobase;
 	s16 irq;
-	u16 mute_was_on;
 
 	spinlock_t lock;
 } snd_card_saa7134_t;
@@ -715,13 +714,6 @@ 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;
-
-	if (saa7134->mute_was_on) {
-		dev->ctl_mute = 1;
-		saa7134_tvaudio_setmute(dev);
-	}
 	return 0;
 }
 
@@ -774,12 +766,6 @@ 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;
 
-	if (dev->ctl_mute != 0) {
-		saa7134->mute_was_on = 1;
-		dev->ctl_mute = 0;
-		saa7134_tvaudio_setmute(dev);
-	}
-
 	err = snd_pcm_hw_constraint_integer(runtime,
 						SNDRV_PCM_HW_PARAM_PERIODS);
 	if (err < 0)

^ permalink raw reply related	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2012-01-02 10:13 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-10 16:27 [patch][saa7134] do not change mute state for capturing audio Stas Sergeev
2011-07-13 20:53 ` Mauro Carvalho Chehab
2011-07-13 21:11   ` Stas Sergeev
2011-07-13 22:00     ` Mauro Carvalho Chehab
2011-07-14  5:39       ` Stas Sergeev
2011-07-15  1:38         ` Mauro Carvalho Chehab
2011-07-15  5:40           ` Stas Sergeev
2011-07-15  6:16           ` Stas Sergeev
2011-07-17  9:44           ` Stas Sergeev
2011-07-17 11:51             ` Mauro Carvalho Chehab
2011-07-17 12:24               ` Stas Sergeev
2011-07-18 23:16               ` Lennart Poettering
2011-07-19  6:31                 ` Stas Sergeev
2011-07-19 12:25                   ` [alsa-devel] " Lennart Poettering
2011-07-19 13:00                 ` Mauro Carvalho Chehab
2011-07-19 13:13                   ` [alsa-devel] " Lennart Poettering
2011-07-19 13:49                   ` Stas Sergeev
2011-07-19 14:10                     ` Mauro Carvalho Chehab
2011-07-19 14:56                       ` Stas Sergeev
2011-07-19 15:27                         ` Mauro Carvalho Chehab
2011-07-19 15:50                           ` Stas Sergeev
2011-07-19 18:06                             ` Mauro Carvalho Chehab
2011-07-19 18:38                               ` Stas Sergeev
2011-07-19 19:29                                 ` Mauro Carvalho Chehab
2011-07-19 21:57                                   ` Stas Sergeev
2011-07-20  0:55                                     ` Mauro Carvalho Chehab
2011-07-20  5:28                                       ` Stas Sergeev
2011-07-20 10:32                                         ` Mauro Carvalho Chehab
2011-07-20 10:41                                           ` Mauro Carvalho Chehab
2011-07-20 10:45                                           ` Stas Sergeev
2011-07-20 10:48                                             ` Mauro Carvalho Chehab
2011-07-20 10:55                                               ` Stas Sergeev
2011-07-22  7:51                                               ` Stas Sergeev
2011-07-22 12:28                                                 ` Mauro Carvalho Chehab
2011-07-22 12:39                                                   ` Stas Sergeev
2011-07-22 12:49                                                     ` Mauro Carvalho Chehab
2011-07-22 12:56                                                       ` Stas Sergeev
2011-07-22 13:03                                                         ` Mauro Carvalho Chehab
2011-07-22 20:40                                                           ` Stas Sergeev
2011-07-23  1:28                                                             ` Mauro Carvalho Chehab
2011-07-23  7:44                                                               ` Stas Sergeev
2011-07-23 13:06                                                                 ` Mauro Carvalho Chehab
2011-07-23 13:20                                                                   ` Stas Sergeev
2011-07-23 15:09                                                                     ` Mauro Carvalho Chehab
2011-07-23 15:14                                                                       ` Stas Sergeev
2011-07-23 15:25                                                                       ` Stas Sergeev
2011-07-24 17:45                                                                       ` Stas Sergeev
2011-07-24 18:36                                                                         ` Mauro Carvalho Chehab
2011-07-24 19:00                                                                           ` Stas Sergeev
2011-07-25 11:15                                                                           ` Stas Sergeev
2011-09-18 15:18                                                                           ` Stas Sergeev
2011-09-24 10:57                                                                             ` Mauro Carvalho Chehab
2011-09-24 11:12                                                                               ` Stas Sergeev
2011-09-24 12:12                                                                                 ` Mauro Carvalho Chehab
2011-09-24 12:36                                                                                   ` Stas Sergeev
2011-09-24 12:48                                                                                     ` Mauro Carvalho Chehab
2011-09-24 13:20                                                                                       ` Stas Sergeev
2011-09-24 15:09                                                                                         ` Mauro Carvalho Chehab
2011-09-24 15:51                                                                                           ` Stas Sergeev
2011-12-03 20:40                                                                                       ` Stas Sergeev
2012-01-02 10:12                                                                                       ` [resend][patch][saa7134] fix automute " Stas Sergeev
2011-09-24 12:05                                                                             ` [patch][saa7134] do not change mute state " Mauro Carvalho Chehab
2011-09-24 12:33                                                                               ` Stas Sergeev
2011-09-24 12:46                                                                                 ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).