ASoC: hdac_hdmi: Offload dapm update at jack detection
hdac_hdmi_present_sense() calls the audio component to get ELD update,
then it reports the jack status change and updates DAPM graph
accordingly. This works when it's called from the normal code paths.
However, it may lead to a dead lock when it's called from the audio
component notifier. Namely, the DAPM update involves with the runtime
PM, and it eventually calls again the audio component get_power()
ops. Since i915 driver already takes a mutex around the audio
component ops calls, we'll eventually get the mutex doubly.
As a workaround, in this patch, only the jack state is updated in the
code path from hdac_hdmi_eld_notify_cb(), and the DAPM update is
deferred to a work so that it's processed in another context.
Reported-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20190809151531.24359-1-tiwai@suse.de
Signed-off-by: Mark Brown <broonie@kernel.org>