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

Alexander E. Patrakov patrakov at gmail.com
Sat Jan 30 06:06:12 PST 2016


30.01.2016 18:53, Tanu Kaskinen wrote:
> 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.
>

You are right. Sorry for the confusion!

-- 
Alexander E. Patrakov


More information about the pulseaudio-discuss mailing list