Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Kai Vehmanen <kai.vehmanen@linux.intel.com>
To: broonie@kernel.org
Cc: tiwai@suse.de, libin.yang@intel.com, alsa-devel@alsa-project.org,
	pierre-louis.bossart@linux.intel.com,
	kai.vehmanen@linux.intel.com
Subject: [PATCH v2 resend 1/3] ASoC: hdac_hdmi: report codec link up/down status to bus
Date: Tue,  2 Jul 2019 16:24:26 +0300	[thread overview]
Message-ID: <20190702132428.13129-2-kai.vehmanen@linux.intel.com> (raw)
In-Reply-To: <20190702132428.13129-1-kai.vehmanen@linux.intel.com>

Report codec power status to the HDA codec bus from runtime pm
suspend and resume callbacks. This is required to implement
runtime idle logic that relies on 'codec_powered' field of hdac_bus
to be maintained for all codecs.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
---
 sound/soc/codecs/hdac_hdmi.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 660e0587f3999..01ab7aed315cb 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -2090,6 +2090,7 @@ static int hdac_hdmi_runtime_suspend(struct device *dev)
 		return -EIO;
 	}
 
+	snd_hdac_codec_link_down(hdev);
 	snd_hdac_ext_bus_link_put(bus, hlink);
 
 	snd_hdac_display_power(bus, hdev->addr, false);
@@ -2116,6 +2117,7 @@ static int hdac_hdmi_runtime_resume(struct device *dev)
 	}
 
 	snd_hdac_ext_bus_link_get(bus, hlink);
+	snd_hdac_codec_link_up(hdev);
 
 	snd_hdac_display_power(bus, hdev->addr, true);
 
-- 
2.17.1

  reply	other threads:[~2019-07-02 13:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-02 13:24 [PATCH v2 resend 0/3] ASoC: SOF: fix suspend ordering with runtime idle Kai Vehmanen
2019-07-02 13:24 ` Kai Vehmanen [this message]
2019-07-06 11:24   ` Applied "ASoC: hdac_hdmi: report codec link up/down status to bus" to the asoc tree Mark Brown
2019-07-02 13:24 ` [PATCH v2 2/3] ASoC: SOF: add runtime idle callback Kai Vehmanen
2019-07-06 11:24   ` Applied "ASoC: SOF: add runtime idle callback" to the asoc tree Mark Brown
2019-07-02 13:24 ` [PATCH v2 resend 3/3] ASoC: SOF: Intel: implement runtime idle for CNL/APL Kai Vehmanen
2019-07-06 11:24   ` Applied "ASoC: SOF: Intel: implement runtime idle for CNL/APL" to the asoc tree Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190702132428.13129-2-kai.vehmanen@linux.intel.com \
    --to=kai.vehmanen@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=libin.yang@intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox