summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/hdac_hdmi.c
diff options
context:
space:
mode:
authorBrent Lu <brent.lu@intel.com>2020-07-15 21:01:50 +0800
committerMark Brown <broonie@kernel.org>2020-10-02 21:05:27 +0100
commitcec6e41ce094affad3b5f9f5e5aa1f81c66ce682 (patch)
tree2bea885e21d06eee0ca4c2376d44723d2b48fe80 /sound/soc/codecs/hdac_hdmi.c
parent1a4c450e57d2d7030f64379e3e80966a4ea71eb7 (diff)
ASoC: hdac_hdmi: remove cancel_work_sync in runtime suspend
A deadlock is identified when there are three contexts running at the same time: - a HDMI jack work which is calling snd_soc_dapm_sync(). - user space is calling snd_pcm_release() to close pcm device. - pm is calling runtime suspend function of HDMI codec driver. By removing the clear_dapm_works() invocation in the hdac_hdmi_runtime_suspend() function, the snd_pcm_release() could always returns from dapm_power_widgets() function call without blocking the hdac_hdmi_jack_dapm_work() work thread or being blocked by the hdac_hdmi_runtime_suspend() function. The purpose of the jack work is to enable/disable the dapm jack pin so it's not necessary to cancel the work in runtime suspend function which is usually called when pcm device is closed. Signed-off-by: Brent Lu <brent.lu@intel.com> Link: https://lore.kernel.org/r/1594818110-786-1-git-send-email-brent.lu@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/hdac_hdmi.c')
-rw-r--r--sound/soc/codecs/hdac_hdmi.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index c61cce53f513..2c1305bf0572 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -2235,8 +2235,6 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
if (!bus)
return 0;
- clear_dapm_works(hdev);
-
/*
* Power down afg.
* codec_read is preferred over codec_write to set the power state.