[pulseaudio-discuss] [PATCH v2 0/6] ucm: Add support for "JackHWMute"
Keyon
yang.jie at linux.intel.com
Sun May 24 21:52:01 PDT 2015
On 2015年05月05日 02:03, Tanu Kaskinen wrote:
> Here's v2 for supporting UCM's JackHWMute. What used to be only one
> patch is now six patches, to make the review experience even more
> pleasant. There are several changes beyond just splitting the
> patch into smaller pieces:
>
> - Instead of creating one jack object per UCM device name, there's
> now one jack object per kcontrol. The reason for this is that I
> gained motivation to refactor the jack handling in the traditional
> mixer code too, and I plan to unify both code bases to use the one
> jack per kcontrol model, which I think is the most conceptually
> clear approach (creating one jack object per physical jack would be
> even better, but Linux doesn't provide the necessary information to
> implement that).
>
> - Removed input and output jack separation. UCM doesn't support
> specifying separate jacks, and pretending otherwise made working
> with the code more difficult than necessary.
>
> - JackHWMute can actually contain more than one device (use-case.h
> documentation patch has been sent to alsa-devel). The code was
> updated to reflect this.
>
> - UCM ports are now initialized with unknown availability to match
> the traditional mixer code. This revealed a couple of bugs, which
> are now fixed:
>
> - When the jack state was changed, the order of updating ordinary
> and hw-mute devices' port availability was "wrong":
> module-switch-on-port-available didn't like the original order.
> Doing the updates in a different order made
> module-switch-on-port-available happy. (There's a wall of text
> comment in the code to explain the details.)
>
> - In v1, I did not take pa_alsa_jack.has_control into account when
> updating port availability. That didn't seem to have much effect
> when ports were initialized with "yes" availability, but with
> "unknown" this bug became visible. Now has_control is always
> considered when updating the port availability.
>
> - Added pa_alsa_jack_new() and pa_alsa_jack_free(). That's a minor
> refactoring that I felt was useful.
>
> Tanu Kaskinen (6):
> alsa: Add pa_alsa_jack_new() and pa_alsa_jack_free()
> ucm: Don't create separate input and output jacks
> alsa: Add associations between jacks, UCM devices and UCM ports
> alsa: Move UCM port availability updating to the mixer code
> ucm: Create only one jack object per kcontrol
> ucm: Add support for "JackHWMute"
>
> src/modules/alsa/alsa-mixer.c | 138 ++++++++++++++++---
> src/modules/alsa/alsa-mixer.h | 10 ++
> src/modules/alsa/alsa-ucm.c | 268 +++++++++++++++++++++++++++++++-----
> src/modules/alsa/alsa-ucm.h | 16 ++-
> src/modules/alsa/module-alsa-card.c | 19 +--
> src/pulsecore/device-port.c | 14 +-
> 6 files changed, 401 insertions(+), 64 deletions(-)
>
Tested-by: Jie Yang <yang.jie at intel.com>
~Keyon
More information about the pulseaudio-discuss
mailing list