OSDN Git Service

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)
commitfd15f2f5e272145269bcbf834e0e0b560a575891
tree129bed012a0874c577928f58a4f93abfe96dee21
parent6aa232e1ccfcd2b55306b86803dc547c36f8ad15
ASoC: SOF: Intel: hda: Enable jack detection

In commit 7d4f606c50ff ("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