]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: SOF: Intel: hda: Enable jack detection
authorRander Wang <rander.wang@linux.intel.com>
Mon, 22 Jul 2019 14:13:53 +0000 (09:13 -0500)
committerMark Brown <broonie@kernel.org>
Tue, 23 Jul 2019 11:21:03 +0000 (12:21 +0100)
commiteb223ff06d48105694c9649004ca174ccc48f2a5
tree129bed012a0874c577928f58a4f93abfe96dee21
parent9c6c33a703b9da3c1dab8c0421d7b74f935d22b8
ASoC: SOF: Intel: hda: Enable jack detection

In commit 53ff30058565 ("ALSA: hda - WAKEEN feature enabling for
runtime pm"), legacy HD-A driver sets hda controller in reset mode after
entering runtime-suspend. And when resuming from suspend mode, it checks
hda controller & codec status to detect headphone hotplug event. Now
this patch does the same job in SOF runtime pm functions.

And we need to check all the non-hdmi codecs for some cases like playback
with HDMI or capture with DMIC connected to dsp. In these cases, only
controller is active and codecs are suspended, so codecs can't send
unsolicited event to controller. The jack polling operation will activate
codecs and unsolicited event can work even codecs become suspended later.

Tested on whiskylake with hda codecs.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190722141402.7194-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sof/intel/hda-codec.c
sound/soc/sof/intel/hda-dsp.c
sound/soc/sof/intel/hda.h