[PATCH 1/1] ALSA: hda: fix jack detection with Realtek codecs when in D3

Pierre-Louis Bossart pierre-louis.bossart at linux.intel.com
Fri Oct 9 17:00:15 CEST 2020


>> On 10/9/20 9:02 AM, Kai Vehmanen wrote:
>>> In case HDA controller is active, but codec is runtime suspended, jack
>>> detection is not successful and no interrupt is raised. This has been
>>> observed with multiple Realtek codecs and HDA controllers from different
>>> vendors. Bug does not occur if both codec and controller are active,
>>> or both are in suspend. Bug can be easily hit on desktop systems with
>>> no built-in speaker.
>>>
>>> The problem can be fixed by powering up the codec once after every
>>> controller runtime resume. Even if codec goes back to suspend, the jack
>>> detection will now work. Add a flag to 'hda_codec' to describe codecs
>>> that require this flow from the controller driver. Mark all Realtek
>>> codecs with this flag.
>>
>> It does make sense to request the codec to resume when the controller
>> resumes, we did the same for SoundWire IIRC.
>>
>> I am still confused on what happens if e.g. the controller resumes and
>> remains active, e.g. capturing from the DMIC. The codec would become
>> suspended after a while and then we would be back to the same problem,
>> wouldn't we?
>>
>> Or are you saying that this initial resume of the codec is enough?
> 
> When the controller is active and the codec goes to runtime suspend,
> the codec will be woken up via the unsolicited event per jack change.
> So it seems that the problem is only about the wake up from the
> controller's runtime suspend.

Right, I guess the first sentence in commit message could be updated as

"In case HDA controller becomes active, but codec is runtime suspended, 
jack detection is not successful and no interrupt is raised."



More information about the Alsa-devel mailing list