]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
ASoC: intel/skl/hda - set autosuspend timeout for hda codecs
authorHui Wang <hui.wang@canonical.com>
Thu, 9 Apr 2020 18:58:16 +0000 (13:58 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 14 Apr 2020 13:34:02 +0000 (14:34 +0100)
commit3a24f135e6cc58c2dc042dde44031ec31b706ce5
tree34083158602b4542ffa027d2ff78b1e0f1ac376f
parenta8bb72f160020db5d7f81824b2dba6c8e29ef67a
ASoC: intel/skl/hda - set autosuspend timeout for hda codecs

On some Lenovo and HP laptops, if both codec driver and SOF driver
are in runtime suspend mode, we plug a headset to the audio jack,
the headphone could be detected but Mic couldn't.

That is because when plugging, the headphone triggers a unsol event
first, and about 0.7s later (on the Lenovo X1 Carbon 7th), the Mic
triggers a unsol event. But if the codec driver enters runtime suspend
within 0.7s, the Mic can't trigger the unsol event.

If we don't set autosuspend_delay to a non-zero value for the hda codec
driver, it will enter runtime suspend immediately after the headphone
triggers the unsol event.

Follow the sequence of legacy hda driver and set a autosuspend delay
of 1sec after card registration (refer to pci/hda/hda_intel.c and
pci/hda/hda_codec.c).

Co-developed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Co-developed-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Clarex Zhou <clarex.zhou@intel.com>
Link: https://lore.kernel.org/r/20200409185827.16255-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/boards/skl_hda_dsp_generic.c