From: Mauro Carvalho Chehab <mchehab@infradead.org>
To: Stas Sergeev <stsp@list.ru>
Cc: linux-media@vger.kernel.org,
"Nickolay V. Shmyrev" <nshmyrev@yandex.ru>,
Devin Heitmueller <dheitmueller@kernellabs.com>
Subject: Re: [patch][saa7134] do not change mute state for capturing audio
Date: Wed, 13 Jul 2011 19:00:17 -0300 [thread overview]
Message-ID: <4E1E1571.6010400@infradead.org> (raw)
In-Reply-To: <4E1E0A1D.6000604@list.ru>
Em 13-07-2011 18:11, Stas Sergeev escreveu:
> 14.07.2011 00:53, Mauro Carvalho Chehab wrote:
>>> 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. :)
>> Nack. We shouldn't patch a kernel driver due to an userspace bad behavior.
> But I really think that the driver behaves badly here.
> Suppose we had 2 separate mute switches: the input
> mute, that mutes the signal as it just enters the saa
> chip, and the output mute, that mutes only the output
> of the tuner card, that is connected to the sound card's
> line input.
> With that configuration, we'd allow the alsa driver to
> unmute only the input switch, so that it can record, but
> leave the output switch still muted, so that the sound
> not to come to the sound card directly.
Well, on such configuration, there are, in fact, 4 mutes:
the two ones you've mentioned, plus the sound card LINE IN
mute and the sound card master output.
The media drivers should control the input that belongs to
saa7134. The userspace applications like pulseaudio should
control the sound card volume/mute, but the driver should
control the saa7134 mute/audio switch.
> Now that we don't have the output mute switch, we
> allow the alsa driver to unmute not only the recording
> that it may need, but also the sound output that goes
> to the sound card! IMHO, this is the entirely unwanted
> side effect, so I blame the saa driver, and not the pulseaudio.
Why this is unwanted? You shouldn't expect that the poor
users to control each mute control. They just need to control
one: the sound card outut.
> There are also other things to consider:
> 1. You can't record anything (except for the white noise)
> before some xawtv sets up everything. So what is the
> use-case of the current (mis)behaveur?
If you're getting a white noise, then there's a bug either
at xawtv, at the driver or both. It is likely board-specific,
as, at least the last time I tested, saa7134 audio were working
properly.
> 2. The alsa driver, trying to manage the mute state on
> its own, badly interwinds with the mute state of the
> (xawtv) program. 2 programs cannot control the same
> mute state for good, and of course the xawtv must have
> the preference, as the alsa driver have no slightest
> idea about the card's state.
There's no sense on keeping the device unmuted after
stop streaming.
> 3. The problem is very severe. Hearing the loud white
> noise on every startup is not something the human can
> easily tolerate. So deferring it for the unknown period
> is simply not very productive.
As I said before, the white noise bug should be fixed.
With what xawtv versions are you noticing problems? Are you using
xawtv 3.101? If so, xawtv 3.101 assumes that you're using digital
streams. Maybe your board entry is broken for digital streams.
>
> Can you please name a few downsides of the approach
> I proposed?
next prev parent reply other threads:[~2011-07-13 22:00 UTC|newest]
Thread overview: 85+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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-17 12:24 ` Stas Sergeev
2011-07-18 23:16 ` Lennart Poettering
2011-07-19 6:31 ` Stas Sergeev
2011-07-19 12:25 ` Lennart Poettering
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 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:48 ` Mauro Carvalho Chehab
2011-07-20 10:55 ` Stas Sergeev
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
[not found] ` <4E2C6638.2040707@infrade ad.org>
2011-07-24 18:36 ` Mauro Carvalho Chehab
2011-07-24 18:36 ` Mauro Carvalho Chehab
2011-07-24 19:00 ` Stas Sergeev
2011-07-24 19:00 ` Stas Sergeev
2011-07-25 11:15 ` Stas Sergeev
2011-07-25 11:15 ` Stas Sergeev
2011-09-18 15:18 ` Stas Sergeev
2011-09-18 15:18 ` Stas Sergeev
2011-09-24 10:57 ` Mauro Carvalho Chehab
2011-09-24 10:57 ` Mauro Carvalho Chehab
2011-09-24 11:12 ` Stas Sergeev
2011-09-24 11:12 ` Stas Sergeev
2011-09-24 12:12 ` Mauro Carvalho Chehab
2011-09-24 12:12 ` Mauro Carvalho Chehab
2011-09-24 12:36 ` Stas Sergeev
2011-09-24 12:36 ` Stas Sergeev
2011-09-24 12:48 ` Mauro Carvalho Chehab
2011-09-24 12:48 ` Mauro Carvalho Chehab
2011-09-24 13:20 ` Stas Sergeev
2011-09-24 13:20 ` Stas Sergeev
2011-09-24 15:09 ` Mauro Carvalho Chehab
2011-09-24 15:09 ` Mauro Carvalho Chehab
2011-09-24 15:51 ` Stas Sergeev
2011-09-24 15:51 ` Stas Sergeev
2011-12-03 20:40 ` 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:05 ` Mauro Carvalho Chehab
2011-09-24 12:33 ` Stas Sergeev
2011-09-24 12:33 ` Stas Sergeev
2011-09-24 12:46 ` Mauro Carvalho Chehab
2011-09-24 12:46 ` Mauro Carvalho Chehab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E1E1571.6010400@infradead.org \
--to=mchehab@infradead.org \
--cc=dheitmueller@kernellabs.com \
--cc=linux-media@vger.kernel.org \
--cc=nshmyrev@yandex.ru \
--cc=stsp@list.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.