[alsa-devel] RT5640 jack detection

Mark Brown broonie at kernel.org
Wed Sep 23 18:37:46 CEST 2015


On Wed, Sep 23, 2015 at 05:22:38PM +0100, Liam Girdwood wrote:
> + Realtek

And me.

> On Tue, 2015-09-22 at 11:18 +0200, Carlo Caione wrote:

> > The problem is that the jack sensing only works when the codec is
> > actively playing something, that is when the bias set for the codec is
> > not SND_SOC_BIAS_OFF. When the codec is suspended and it is powered
> > off I'm not able to detect anymore the presence of the jack. Because
> > of this issue actively switching the audio from HDMI to HP when the
> > jack is inserted is not working.

> > How this is usually supposed to be working?

> In situations like this it may be best to report jack status as removed
> when no BIAS is available for jack detection (since no one is using the
> codec anyway). The jack status could always be re-detected when BIAS is
> re-enabled.

That can upset userspaces - it means you get things like trying to play
a notification tone, starting, realising that a headphone is there and
trying to switch on the headphone in the middle of the notification
being played back which doesn't tend to work out so well.

What I'd expect the driver to be doing here is enabling whatever it
needs to do detection enabled while detection is enabled.  There's quite
a few examples of this in mainline - look for jack code that has DAPM
calls in it.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20150923/d37c75b1/attachment.sig>


More information about the Alsa-devel mailing list