[pulseaudio-discuss] [PATCH] Alsa: Correct port availability with multiple jacks
Sjoerd Simons
sjoerd at luon.net
Fri Oct 31 14:17:57 PDT 2014
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.
Ah now I remembered why i didn't do that in the end (i started with two
different path files). It's because with the default setup on the X220
you can't mute/disable the two paths seperately.
So when plugging in the second path, the port switches and restores the
previous volume for that (now available) path. Even though audio is
still output via the first path as well!. Practically this meant when i
was playing audio through the dock out of my rooms amplifier/speakers
and then plugged in my headset on the built-in jack the audio coming out
of the speakers jumped to unpleasant levels. Not a great user
experience...
--
Sjoerd Simons <sjoerd at luon.net>
More information about the pulseaudio-discuss
mailing list