[pulseaudio-discuss] [PATCH 0/3] New alsa path option: mute-during-activation

David Henningsson david.henningsson at canonical.com
Thu Mar 22 06:33:38 PDT 2012


2012-03-22 10:29, Tanu Kaskinen skrev:
> At least on Nokia N9 this patch helps reducing pops when
> changing ports. Some earlier discussion:
> http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-September/011402.html
>
> An earlier version of the first patch was submitted in
> October, but it wasn't merged, and it didn't get any
> comments either:
> http://lists.freedesktop.org/archives/pulseaudio-discuss/2011-October/011803.html
>
> Jarkko Nikula (2):
>    alsa: move pa_alsa_setting_select close to pa_alsa_path_select
>    alsa: Merge pa_alsa_setting_select with pa_alsa_path_select
>
> Tanu Kaskinen (1):
>    alsa-mixer: Implement a new path option: "mute-during-activation".
>
>   src/modules/alsa/alsa-mixer.c                      |   34 ++++++++++++++++++-
>   src/modules/alsa/alsa-mixer.h                      |    4 +-
>   src/modules/alsa/alsa-sink.c                       |   14 ++------
>   src/modules/alsa/alsa-source.c                     |   15 ++-------
>   .../alsa/mixer/paths/analog-output.conf.common     |    3 ++
>   5 files changed, 43 insertions(+), 27 deletions(-)
>

Ok, I have had a look at these patches. I like Jarkko's patches about 
consolidating path_select and setting_select.

You're also starting to put the actual mute state into this function, 
which is also a step towards what I've been thinking about, but not all 
the way.

Ideally, I would like an algorithm that on path_select, took the new 
mute and volume state into account, and did the following:

1) Calculated which alsa-kcontrols that needed to change, taking into 
account the new mute as well as volume state.

2) For every kcontrol that needs to mute, mute it.
3) For every kcontrol that needs its volume lowered, lower it.
4) For every kcontrol that needs its volume raised, raise it.
5) For every kcontrol that needs to unmute, unmute it.

Note that the order of 2 - 5 is specifically meant to avoid volume bumps.

I was loosely thinking (i e, this is not a promise!) to do something 
like this for PulseAudio 3.0. If I get around to do that, would such an 
algorithm also remove your N9 clicking problem, without the need for a 
mute-during-activation option?

-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list