summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorRamesh Babu2016-02-17 17:04:01 +0100
committerMark Brown2016-02-19 16:56:53 +0100
commitaeaccef0bc0d364792ecc9455cb13d007fd7a371 (patch)
tree02aa6b0ec992f4c84a9caf3a297c661f5ebdbd0e /sound/soc/codecs
parentASoC: hdac_hdmi: Don't fail in dai startup to make userland happy (diff)
downloadkernel-qcow2-linux-aeaccef0bc0d364792ecc9455cb13d007fd7a371.tar.gz
kernel-qcow2-linux-aeaccef0bc0d364792ecc9455cb13d007fd7a371.tar.xz
kernel-qcow2-linux-aeaccef0bc0d364792ecc9455cb13d007fd7a371.zip
ASoC: hdac_hdmi: Fix to keep codec power active during enumeration.
The codec power is turned OFF in the first explicit call to pm_runtime_suspend to keep the i915 refcount balanced. During regular operation, 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> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/hdac_hdmi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index f12af62a2084..57ab212b279b 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -1426,6 +1426,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,