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: NKai Vehmanen <kai.vehmanen@linux.intel.com> Co-developed-by: NJaska Uimonen <jaska.uimonen@linux.intel.com> Signed-off-by: NHui Wang <hui.wang@canonical.com> Signed-off-by: NKai Vehmanen <kai.vehmanen@linux.intel.com> Signed-off-by: NJaska Uimonen <jaska.uimonen@linux.intel.com> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRanjani Sridharan <ranjani.sridharan@linux.intel.com> Reviewed-by: NClarex Zhou <clarex.zhou@intel.com> Link: https://lore.kernel.org/r/20200409185827.16255-3-pierre-louis.bossart@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录