On Tue, 2014-10-28 at 12:10 +0200, Tanu Kaskinen wrote: > On Tue, 2014-10-28 at 05:30 +0100, David Henningsson wrote: > > > > On 2014-10-24 22:33, Sjoerd Simons wrote: > > > In case there are two independent jacks for one port (e.g. Dock > > > Headphone Jack and Headphone Jack), the availability ends up being > > > incorrect for one of the first was _NO (not plugged) and the second gets > > > _YES (plugged). Also pulse complains about the state being inconsistent > > > which isn't true. > > > > > > Fix this by preferring higher states (_YES > _NO > _UNKNOWN) > > > > Thanks, I agree with this conclusion. I didn't really know what to do > > with one jack being yes and another being no, but the above reasoning > > makes sense. > > > > I'm not sure I'm happy with just a simple ">" comparison - in case we > > add more jack states in the future, they might not fit with the ">" > > scheme. But maybe we should deal with that when the problem comes and > > just take your patch as-is now. What do other people think? > > I'd prefer replacing the ">" comparison with something else too. > > The use case that this patch is made for seems such that there shouldn't > be any jack state conflict to worry about in the first place, though. To > me "dock headphone" and "built-in headphone" seem like obviously > separate paths, so I think we should reflect that in our configuration > by creating a new path file. Correct. This is specifically for cases where a path has multiple potential equivalent output jacks. My personal use-case is Dock headphone jack vs. built-in headphone jack, but in principle the same could happen with Front headphone jack vs headphone jack (dunno if those can exist in practise). -- Sjoerd Simons <sjoerd at luon.net>