[alsa-devel] [patch][saa7134] do not change mute state for capturing audio

Mauro Carvalho Chehab mchehab at infradead.org
Sat Sep 24 17:09:30 CEST 2011

Em 24-09-2011 10:20, Stas Sergeev escreveu:
> 24.09.2011 16:48, Mauro Carvalho Chehab wrote:
>> A first scan at driver's init can be removed, IMO.
> OK, that's the great news.
> Will write a new patch then.


>> There's nothing the driver can do if the hardware
>> missdetects a carrier. Dirty tricks to try solving it
>> are not good, as they'll do the wrong thing on some situations.
> Well, if we assume the first scan can be removed,
> then we also assume the previous "dirty trick" is
> harmless, as it affects only the first scan. But I'll
> better remove both the trick and the first scan then,
> as the fewer the hacks, the better the code.


>> If someone is using the board on an environment
>> without udev and pulseaudio, this trick will break the first tuning.
> I feel this somehow contradicts with your suggestion
> to remove the first scan, so could you clarify?

What I meant to say is that both udev and pulseaudio opens the device,
and these might initialize the audio thread. The driver should be able
to work the same way with or without the first open by udev/pulseaudio.

>> Well, if you think that this would solve, then just write a patch
>> exporting the mute control via ALSA. I have no problems with that.
> That would solve all the problems, but only if:
> 1. The mplayer is then moved to the use of that new
> control to not depend on the autounmute hack.
> I can write the patch for that too.

The autounmute is not a hack. It is a logic to suppress audio when the
audio carrier is not detected. It should not be removed.

I'm not sure if it is safe to make mplayer to use the audio mixer. It
is probably a good idea doing that, as it will also work fine with webcams
that provide alsa inputs.

> 2. Make sure all the other apps are fixed the same way
> (I hope there are none though)
> 3. The autounmute hack is then removed. (no
> regressions if steps 1 and 2 are carefully done)
> If you are fine with that plan, then I'll try to find
> the time and do the things that way. Otherwise,
> I'll remove the first scan, and that will do the trick
> in a simpler, though less cleaner way.

More information about the Alsa-devel mailing list