[pulseaudio-discuss] [PATCH v2 2/2] switch-on-port-available: deactivate direction when the no ports are available for that direction

Tanu Kaskinen tanuk at iki.fi
Sat Dec 30 12:55:19 UTC 2017


On Sat, 2017-12-30 at 13:09 +0100, Georg Chini wrote:
> On 29.12.2017 21:28, Georg Chini wrote:
> > On 29.12.2017 13:49, Tanu Kaskinen wrote:
> > > There's still the problem that once the HDMI sink is available again,
> > > streams won't be moved there automatically (unless module-switch-on-
> > > connect is loaded), but I think that's a lesser problem than keeping
> > > streams connected to a silent sink.
> 
> Would not using a hook and let module-rescue-stream handle the
> suspend/unsuspend solve that problem as well? You would then also
> have to modify the default sink selection to take the suspend state
> into account.

What logic would module-rescue-stream use in the unsuspend case? It's
not obvious to me how it should determine when to move streams to an
unsuspended sink and which streams to move.

I don't think the default sink selection logic needs any changes. Sinks
whose active port is unavailable are already avoided, and when the
active port becomes available again, the default sink selection is re-
evaluated, so the HDMI sink will likely become the default sink again
if it was the default sink previously.

For what it's worth, I think the real fix is to make it more explicit
when streams are "default-routed" and when their routing has been
overridden by the user. Then all default-routed streams could be easily
moved whenever the default sink changes. I think this needs UI changes
as well, because otherwise it will be confusing. UIs that provide per-
stream routing control should show when a stream has been manually
routed, and it should be possible to return the stream to the "default-
routed" group. I don't expect to work on this any time soon, so this
only slightly relevant to the present discussion.

-- 
Tanu

https://www.patreon.com/tanuk


More information about the pulseaudio-discuss mailing list