[pulseaudio-tickets] [Bug 87002] Headphones selected on first run while unplugged and other ports are available

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Dec 5 05:32:11 PST 2014


https://bugs.freedesktop.org/show_bug.cgi?id=87002

--- Comment #18 from David Henningsson <david.henningsson at canonical.com> ---
Rough outline of new suggested startup order:

 1) Above the add_profiles call in module-alsa-card.c, we should first start
listening to mixer events (in order not to get a race condition).
 2) Update availability of all jacks. This might require some refactoring of
code as the jacks do not have associated ports at that point.

 3) add_profiles ends up calling alsa-mixer.c:device_port_alsa_init. Here, add
a call to pa_device_port_new_data_set_available() and fill it in accordingly.
This will also require refactoring the jack availability to port availability
logic into a separate function in alsa-mixer.c.

 4) We add a new hook in module-switch-on-port-available that listens to
pa_card_new. From this hook, we switch the suggested profile in case the
current profile has no available ports (and we find another profile that has).

Does that make sense? Anything (or all) of the above that you'd like to write
yourself?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/pulseaudio-bugs/attachments/20141205/c027fb5d/attachment.html>


More information about the pulseaudio-bugs mailing list