From: Mark Brown <broonie@kernel.org>
To: Abhijeet Kumar <abhijeet.kumar@intel.com>
Cc: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>, Vinod Koul <vinod.koul@intel.com>,
Jeeja KP <jeeja.kp@intel.com>,
Guneshwor Singh <guneshwor.o.singh@intel.com>,
"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
"Ughreja, Rakesh A" <rakesh.a.ughreja@intel.com>,
Puneeth Prabhu <puneethx.prabhu@intel.com>,
alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
abhijeet.kumar@intel.com, alsa-devel@alsa-project.org
Subject: Applied "ASoC: hdac_hdmi : Ensuring proper setting of output widget power state" to the asoc tree
Date: Thu, 15 Feb 2018 15:34:24 +0000 [thread overview]
Message-ID: <E1emLYG-0007Ln-Qd@debutante> (raw)
In-Reply-To: <1518683739-4448-1-git-send-email-abhijeet.kumar@intel.com>
The patch
ASoC: hdac_hdmi : Ensuring proper setting of output widget power state
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 753597fbb7031ff147d4f2862426699e4ad8efca Mon Sep 17 00:00:00 2001
From: Abhijeet Kumar <abhijeet.kumar@intel.com>
Date: Thu, 15 Feb 2018 14:05:38 +0530
Subject: [PATCH] ASoC: hdac_hdmi : Ensuring proper setting of output widget
power state
In usecases like hot plug-unplug DP panel or modeset during a playback,
sometimes we observe no audio after codec resets. During no audio
condition, we have noticed that the power state of the pin or the
connector is D3. Optimizing the way we set the power mitigates the
issue. With this changes the verb is sent to set the power state and
waits until actual state reaches target state. Thus ensuring power
state is set.
Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/hdac_hdmi.c | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index 0758927d1e06..60bea9d69fc0 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -718,10 +718,22 @@ static struct hdac_hdmi_pcm *hdac_hdmi_get_pcm(struct hdac_ext_device *edev,
static void hdac_hdmi_set_power_state(struct hdac_ext_device *edev,
hda_nid_t nid, unsigned int pwr_state)
{
+ int count;
+ unsigned int state;
+
if (get_wcaps(&edev->hdev, nid) & AC_WCAP_POWER) {
- if (!snd_hdac_check_power_state(&edev->hdev, nid, pwr_state))
- snd_hdac_codec_write(&edev->hdev, nid, 0,
- AC_VERB_SET_POWER_STATE, pwr_state);
+ if (!snd_hdac_check_power_state(&edev->hdac, nid, pwr_state)) {
+ for (count = 0; count < 10; count++) {
+ snd_hdac_codec_read(&edev->hdac, nid, 0,
+ AC_VERB_SET_POWER_STATE,
+ pwr_state);
+ state = snd_hdac_sync_power_state(&edev->hdac,
+ nid, pwr_state);
+ if (!(state & AC_PWRST_ERROR))
+ break;
+ }
+ }
+
}
}
--
2.16.1
next prev parent reply other threads:[~2018-02-15 15:34 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-11 11:34 [PATCH] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state abhijeet.kumar
2018-01-12 5:46 ` Vinod Koul
2018-01-12 8:36 ` Kumar, Abhijeet
[not found] ` <d84bdde7-2eda-ab2b-adce-b689b4222838@intel.com>
2018-01-12 9:26 ` Takashi Iwai
2018-01-12 10:37 ` Kumar, Abhijeet
2018-01-12 11:09 ` Takashi Iwai
2018-01-12 8:27 ` [PATCH v2] " abhijeet.kumar
2018-01-12 21:08 ` Applied "ASoC: hdac_hdmi: Ensuring proper setting of output widget power state" to the asoc tree Mark Brown
2018-01-12 21:20 ` Mark Brown
2018-01-13 4:49 ` Kumar, Abhijeet
2018-01-15 6:12 ` Vinod Koul
2018-01-15 10:30 ` Mark Brown
2018-01-15 10:41 ` Vinod Koul
2018-01-25 13:13 ` Kumar, Abhijeet
2018-01-23 17:30 ` [PATCH 1/3] ALSA: hda: Copying sync power state helper to core abhijeet.kumar
2018-01-23 17:30 ` [PATCH 2/3] ALSA: hda: Make use of core codec functions to sync power state abhijeet.kumar
2018-01-23 17:30 ` [PATCH 3/3] ASoC: hdac_hdmi : Ensuring proper setting of output widget " abhijeet.kumar
2018-02-12 13:04 ` Takashi Iwai
2018-02-14 16:20 ` Mark Brown
2018-02-15 8:30 ` Kumar, Abhijeet
2018-02-15 8:35 ` [PATCH] " abhijeet.kumar
2018-02-15 15:34 ` Mark Brown [this message]
2018-02-15 16:56 ` [PATCH v2] " abhijeet.kumar
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=E1emLYG-0007Ln-Qd@debutante \
--to=broonie@kernel.org \
--cc=abhijeet.kumar@intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=guneshwor.o.singh@intel.com \
--cc=jeeja.kp@intel.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=puneethx.prabhu@intel.com \
--cc=rakesh.a.ughreja@intel.com \
--cc=subhransu.s.prusty@intel.com \
--cc=tiwai@suse.com \
--cc=vinod.koul@intel.com \
/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