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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux