diff mbox

[v5,13/14] ASoC: hdac_hdmi: Fix to keep codec power active during enumeration.

Message ID 1454161428-7896-14-git-send-email-subhransu.s.prusty@intel.com (mailing list archive)
State Accepted
Commit aeaccef0bc0d364792ecc9455cb13d007fd7a371
Headers show

Commit Message

Subhransu S. Prusty Jan. 30, 2016, 1:43 p.m. UTC
From: Ramesh Babu <ramesh.babu@intel.com>

Codec power is turned OFF in the first explicit call to
pm_runtime_suspend, thus keeping the refcount balanced. For any
other communication with codec, the power is turned ON/OFF in
runtime PM handlers.

Signed-off-by: Ramesh Babu <ramesh.babu@intel.com>
Signed-off-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
---
 sound/soc/codecs/hdac_hdmi.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)
diff mbox

Patch

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index e1373b9..fc45c95 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1492,6 +1492,18 @@  static int hdac_hdmi_dev_probe(struct hdac_ext_device *edev)
 	INIT_LIST_HEAD(&hdmi_priv->pcm_list);
 	mutex_init(&hdmi_priv->pin_mutex);
 
+	/*
+	 * Turned off in the runtime_suspend during the first explicit
+	 * pm_runtime_suspend call.
+	 */
+	ret = snd_hdac_display_power(edev->hdac.bus, true);
+	if (ret < 0) {
+		dev_err(&edev->hdac.dev,
+			"Cannot turn on display power on i915 err: %d\n",
+			ret);
+		return ret;
+	}
+
 	ret = hdac_hdmi_parse_and_map_nid(edev, &hdmi_dais, &num_dais);
 	if (ret < 0) {
 		dev_err(&codec->dev,