• Brent Lu's avatar
    ASoC: hdac_hdmi: remove cancel_work_sync in runtime suspend · cec6e41c
    Brent Lu authored
    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: default avatarBrent Lu <brent.lu@intel.com>
    Link: https://lore.kernel.org/r/1594818110-786-1-git-send-email-brent.lu@intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
    cec6e41c
hdac_hdmi.c 58.4 KB