[pulseaudio-discuss] [PATCH] switch-on-port-available: Switch from HDMI to analog; but not the other way around

Tanu Kaskinen tanuk at iki.fi
Sat Jan 30 05:53:16 PST 2016


On Sat, 2016-01-30 at 12:07 +0500, Alexander E. Patrakov wrote:
> 30.01.2016 00:33, David Henningsson wrote:
> > If you have headphones plugged in and plug in HDMI; you want sound
> > to stay on headphones.
> > If you have HDMI plugged in and you plug in headphones; you want sound
> > to switch to headphones.
> > 
> > Hence we need to take priority into account as well when determining
> > whether to switch to a new profile or not.
> 
> 
> > -        if (sink->active_port->available != PA_AVAILABLE_NO)
> > +        if ((sink->active_port->available != PA_AVAILABLE_NO) && (sink->active_port->priority >= prio))
> 
> You are comparing profile priority and port priority here.

You seem to be misreading something. prio is the priority of the port
being activated.

-- 
Tanu


More information about the pulseaudio-discuss mailing list