[pulseaudio-tickets] [Bug 93946] Changing device profile to HDMI is reset to default after short delay

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 2 02:23:52 PST 2016


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

--- Comment #13 from Tanu Kaskinen <tanuk at iki.fi> ---
(In reply to David Henningsson from comment #12)
> (In reply to Tanu Kaskinen from comment #11)
> > Requiring users to edit the path files doesn't seem like a good solution to
> > me. 
> 
> Correct - the real solution is module-port-manager.
> 
> > I'd rather revert the patch that caused this regression (and I plan to
> > do so in OpenEmbedded).
> 
> It's not a regression. Switching to analog speakers when HDMI is unplugged
> (or turned off) is an improvement.

It's not an improvement for the user who reported this bug. Instead, the change
breaks the user's setup that used to work, and the setup isn't some weird
corner case that doesn't need to be supported.

> > But here's another idea for a solution:
> > 
> > 1) Remember the last profile the user selected for a card.
> 
> Isn't that what module-card-restore already does?

It's only remembered in the card-restore database. The information isn't
available to module-switch-on-port-available currently.

> > 2) When a port becomes available, check if the currently active profile on
> > that card was selected by the user. If not, and the port is part of the last
> > user-selected profile, switch to the user-selected profile.
> 
> Sorry, but there's too much left out in the above sentence to be able to
> tell which scenarios this will break.

Yeah, sorry about the overly terse explanation.

If the user has manually selected a profile on a card, we know that the user
wants to use that profile and some port on it, when that port is available. If
the currently selected profile is different than the user-selected profile, it
means that we have automatically switched the profile. In the default
configuration, such profile switch can only happen if all ports on the
user-selected profile have become unavailable. If a port then becomes available
on the user-selected profile, we should switch to it, since the user wants to
use that profile. Or rather, the user wants to use some port on that profile,
and since we don't necessarily know which port, blindly switching to the
profile can indeed break some use cases.

To increase the safety of my proposal, we can make the change more conservative
while still fixing the problem with HDMI. For some profile changes we know
which port the user wants to use. If the activated profile has only one output
port, we know that the user wants to use that port. So, rather than remembering
the last user-selected profile, we need to remember the last user-selected port
(input and output ports remembered separately). If a profile change is
ambiguous about the desired port, then we don't have enough information, but
when selecting a profile for HDMI output, the information is always sufficient
with the default configuration (custom profiles with HDMI + some other sink are
ambiguous, however).

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


More information about the pulseaudio-bugs mailing list