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>,
Lennart Poettering <lpoetter@redhat.com>,
ALSA devel <alsa-devel@alsa-project.org>
Subject: Re: [patch][saa7134] do not change mute state for capturing audio
Date: Sun, 24 Jul 2011 15:36:40 -0300 [thread overview]
Message-ID: <4E2C6638.2040707@infradead.org> (raw)
In-Reply-To: <4E2C5A35.9030404@list.ru>
Em 24-07-2011 14:45, Stas Sergeev escreveu:
> 23.07.2011 19:09, Mauro Carvalho Chehab wrote:
>> > In this case, it will not be autounmuted after tuning.
>> Hard to tell about your solution without seeing a patch.
> OK, it turns out the automute code is already there,
> but it doesn't work. The driver for some reasons
> starts the scan on initialization, finds the carrier:
> ---
> saa7134[0]/audio: found PAL main sound carrier @ 6.000 MHz [3969/324]
> ---
> and, because of that, disables the automute. If the
> real mute is not enabled at that point, you get the
> white noise right away.
The automute code works fine. Maybe you have a strong interference
at the default tuning frequency, leading into saa7134 miss-detection.
For saa7134 driver:
1) There is an audio carrier;
2) an application wants to listen audio;
3) the device is at automute mode. So, when there's
an audio carrier, it will unmute the audio at
streaming start.
The driver is doing the _right_ thing by letting the audio to flow
to PA, when it starts the capture.
Unfortunately, on your specific device, starting audio
capture also enables audio at the audio output pin. So,
you're noticing a problem.
People with a saa7134 device without alsa stream won't notice
it (old devices). People with alsa stream without anything
connected to the LINE OUT people aren't noticing it, if PA is
not copying the saa7134 PCM IN stream to the sound card PCM out
device (the default, for PA).
So, only people that has saa7134 with alsa stream that opted
to wire the saa7134 device to the sound card, and with a strong
interference at the default tunning frequency (400 MHz) would
notice a problem.
> Since I have no idea why it finds some carrier, I can't
> fix that in any way. Or, maybe, not to call the scan
> on driver init? What will that break?
Analog tuners need to be tuned at the device init on a high frequency
according with their datasheets, otherwise the PLL may fail.
> Anyway, as long as the automute code is broken,
> we should either start fixing it, or fix PA, or fix mplayer...
As I always said, the fix should be at PA, as it makes no sense
to start capturing at saa7134 without first configuring it.
So, or PA should be converted into a V4L2-aware application, in
order to properly init the device (with seems to be the wrong
approach) or it _SHOULD_NOT_ automatically enable capture on those
devices, as this may cause undesired side effects, on the devices
that have the capture pin directly wired to the output pin, witch
seems to be the case of your device.
PS.: it seems that you've removed Lennart/alsa people from the c/c.
I'm re-adding them, as I'm expecting a fix from their side.
> Dunno. I wonder how come so many bugs left unfixed
> for so long, resulting in a white noise to people...
You're the first one that reported it, and the code is there for _years_.
So, this is not a commonly noticed problem at all.
Mauro.
next prev parent reply other threads:[~2011-07-24 18:36 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4E19D2F7.6060803@list.ru>
[not found] ` <4E1E05AC.2070002@infradead.org>
[not found] ` <4E1E0A1D.6000604@list.ru>
[not found] ` <4E1E1571.6010400@infradead.org>
[not found] ` <4E1E8108.3060305@list.ru>
[not found] ` <4E1F9A25.1020208@infradead.org>
2011-07-17 9:44 ` [patch][saa7134] do not change mute state for capturing audio 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 ` 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
[not found] ` <4E292BED.60108@list.ru>
[not found] ` <4E296D00.9040608@infradead.org>
[not found] ` <4E296F6C.9080107@list.ru>
[not found] ` <4E2971D4.1060109@infradead.org>
[not found] ` <4E29738F.7040605@list.ru>
[not found] ` <4E297505.7090307@infradead.org>
[not found] ` <4E29E02A.1020402@list.ru>
[not found] ` <4E29E02A .1020402@list.ru>
[not found] ` <4E2A23C7.3040209@infradead.org>
[not found] ` <4E2A7BF0.8080606@list.ru>
[not found] ` <4E2AC742.8020407@infradead.org>
[not found] ` <4E2ACAAD.4050602@list.ru>
[not found] ` <4E2AE40F.7030108@infradead.org>
[not found] ` <4E2C5A35.9030404@list.ru>
[not found] ` <4E2C6638.2040707@infrade ad.org>
2011-07-24 18:36 ` Mauro Carvalho Chehab [this message]
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
2011-09-24 12:05 ` Mauro Carvalho Chehab
2011-09-24 12:33 ` Stas Sergeev
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=4E2C6638.2040707@infradead.org \
--to=mchehab@infradead.org \
--cc=alsa-devel@alsa-project.org \
--cc=linux-media@vger.kernel.org \
--cc=lpoetter@redhat.com \
--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 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).