Thread (7 messages) 7 messages, 3 authors, 2018-08-28
STALE2887d

[PATCH] [sound] hdac-codec runtime suspended at PM:Suspend.

From: Anshuman Gupta <hidden>
Date: 2018-03-12 11:19:08
Also in: alsa-devel, lkml
Subsystem: sound, sound - soc layer / dynamic audio power management (asoc), the rest · Maintainers: Jaroslav Kysela, Takashi Iwai, Liam Girdwood, Mark Brown, Linus Torvalds

Keep hdac-codec to be in runtime suspended while entering to suspend.
If hdac-codec is already in runtime suspend state skip its power down
sequence in prepare, power up sequence in complete phase.

Avoid resuming hdac controller PCI device 00:1f.3 from runtime suspend
state in case  hdac-codec already in runtime-suspend state, this is
unnecessary and block the direct complete even for hdac controller
PCI device 00:1f.3.

This enabled direct complete path for hdac-codec and PCI device 00:1f.3.

Signed-off-by: Anshuman Gupta <redacted>
---
 sound/soc/codecs/hdac_hdmi.c | 4 ++++
 1 file changed, 4 insertions(+)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index f3b4f4d..810a8a6 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1852,6 +1852,8 @@ static int hdmi_codec_prepare(struct device *dev)
 	struct hdac_ext_device *edev = to_hda_ext_device(dev);
 	struct hdac_device *hdac = &edev->hdac;
 
+	if (pm_runtime_status_suspended(dev))
+		return 1;
 	pm_runtime_get_sync(&edev->hdac.dev);
 
 	/*
@@ -1873,6 +1875,8 @@ static void hdmi_codec_complete(struct device *dev)
 	struct hdac_hdmi_priv *hdmi = edev->private_data;
 	struct hdac_device *hdac = &edev->hdac;
 
+	if (pm_runtime_status_suspended(dev))
+		return;
 	/* Power up afg */
 	snd_hdac_codec_read(hdac, hdac->afg, 0,	AC_VERB_SET_POWER_STATE,
 							AC_PWRST_D0);
-- 
2.7.4
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help