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.