Skip to content

Commit e87c65a

Browse files
plbossarttiwai
authored andcommitted
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 <[email protected]> Reviewed-by: Bard Liao <[email protected]> Reviewed-by: Kai Vehmanen <[email protected]> Reviewed-by: Ranjani Sridharan <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 6376ab0 commit e87c65a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sound/x86/intel_hdmi_audio.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
#include <drm/intel_lpe_audio.h>
3434
#include "intel_hdmi_audio.h"
3535

36+
#define INTEL_HDMI_AUDIO_SUSPEND_DELAY_MS 5000
37+
3638
#define for_each_pipe(card_ctx, pipe) \
3739
for ((pipe) = 0; (pipe) < (card_ctx)->num_pipes; (pipe)++)
3840
#define for_each_port(card_ctx, port) \
@@ -1802,8 +1804,11 @@ static int __hdmi_lpe_audio_probe(struct platform_device *pdev)
18021804
pdata->notify_audio_lpe = notify_audio_lpe;
18031805
spin_unlock_irq(&pdata->lpe_audio_slock);
18041806

1807+
pm_runtime_set_autosuspend_delay(&pdev->dev, INTEL_HDMI_AUDIO_SUSPEND_DELAY_MS);
18051808
pm_runtime_use_autosuspend(&pdev->dev);
1809+
pm_runtime_enable(&pdev->dev);
18061810
pm_runtime_mark_last_busy(&pdev->dev);
1811+
pm_runtime_idle(&pdev->dev);
18071812

18081813
dev_dbg(&pdev->dev, "%s: handle pending notification\n", __func__);
18091814
for_each_port(card_ctx, port) {

0 commit comments

Comments
 (0)