[patch][saa7134] do not change mute state for capturing audio
- Subject: [patch][saa7134] do not change mute state for capturing audio
- From: Stas Sergeev <stsp@xxxxxxx>
- Date: Sun, 10 Jul 2011 20:27:35 +0400
- Cc: "Nickolay V. Shmyrev" <nshmyrev@xxxxxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxxxxx>
- User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.17) Gecko/20110428 Fedora/3.1.10-1.fc15 Thunderbird/3.1.10
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@xxxxxxx>
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)
[Linux Input]
[Video for Linux]
[Mplayer Users]
[Linux USB Devel]
[Linux Audio Users]
[Photos]
[Yosemite Photos]
[Linux Kernel]
[Linux SCSI]
[XFree86]
[Devices]
[Yosemite Backpacking]