Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: x86: intel_hdmi_audio: enable pm_runtime and set autosuspend delay

The existing code uses pm_runtime_get_sync/put_autosuspend, but
pm_runtime was not explicitly enabled. The autosuspend delay was not
set either, the value is set to 5s since HDMI is rather painful to
resume.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20220616222910.136854-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>

authored by

Pierre-Louis Bossart and committed by
Takashi Iwai
e87c65ae 6376ab02

+5
+5
sound/x86/intel_hdmi_audio.c
··· 33 33 #include <drm/intel_lpe_audio.h> 34 34 #include "intel_hdmi_audio.h" 35 35 36 + #define INTEL_HDMI_AUDIO_SUSPEND_DELAY_MS 5000 37 + 36 38 #define for_each_pipe(card_ctx, pipe) \ 37 39 for ((pipe) = 0; (pipe) < (card_ctx)->num_pipes; (pipe)++) 38 40 #define for_each_port(card_ctx, port) \ ··· 1804 1802 pdata->notify_audio_lpe = notify_audio_lpe; 1805 1803 spin_unlock_irq(&pdata->lpe_audio_slock); 1806 1804 1805 + pm_runtime_set_autosuspend_delay(&pdev->dev, INTEL_HDMI_AUDIO_SUSPEND_DELAY_MS); 1807 1806 pm_runtime_use_autosuspend(&pdev->dev); 1807 + pm_runtime_enable(&pdev->dev); 1808 1808 pm_runtime_mark_last_busy(&pdev->dev); 1809 + pm_runtime_idle(&pdev->dev); 1809 1810 1810 1811 dev_dbg(&pdev->dev, "%s: handle pending notification\n", __func__); 1811 1812 for_each_port(card_ctx, port) {