* [PATCH v2] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state
2018-01-11 11:34 [PATCH] ASoC: hdac_hdmi: " abhijeet.kumar
@ 2018-01-12 8:27 ` abhijeet.kumar
0 siblings, 0 replies; 3+ messages in thread
From: abhijeet.kumar @ 2018-01-12 8:27 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Jeeja KP, Vinod Koul, Subhransu S. Prusty, Guneshwor Singh,
Sandeep Tayal, alsa-devel, linux-kernel
Cc: abhijeet.kumar
From: Abhijeet Kumar <abhijeet.kumar@intel.com>
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. Optimzing the way we set the power could
mitigate the issue. With this changes the verb is sent to set the power
state and response is received. Thus ensuring power state is set.
Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
---
Changes in v2:
- update commit message
sound/soc/codecs/hdac_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index f3b4f4dfae6a..e24caecf0a4f 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -718,7 +718,7 @@ static void hdac_hdmi_set_power_state(struct hdac_ext_device *edev,
{
if (get_wcaps(&edev->hdac, nid) & AC_WCAP_POWER) {
if (!snd_hdac_check_power_state(&edev->hdac, nid, pwr_state))
- snd_hdac_codec_write(&edev->hdac, nid, 0,
+ snd_hdac_codec_read(&edev->hdac, nid, 0,
AC_VERB_SET_POWER_STATE, pwr_state);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state
[not found] <1515670468-9198-1>
@ 2018-01-12 8:32 ` abhijeet.kumar
0 siblings, 0 replies; 3+ messages in thread
From: abhijeet.kumar @ 2018-01-12 8:32 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Jeeja KP, Vinod Koul, Subhransu S. Prusty, Guneshwor Singh,
Sandeep Tayal, alsa-devel, linux-kernel
Cc: abhijeet.kumar
From: Abhijeet Kumar <abhijeet.kumar@intel.com>
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. Optimzing the way we set the power could
mitigate the issue. With this changes the verb is sent to set the power
state and response is received. Thus ensuring power state is set.
Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
---
Changes in v2:
- update commit message
sound/soc/codecs/hdac_hdmi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/hdac_hdmi.c b/sound/soc/codecs/hdac_hdmi.c
index f3b4f4dfae6a..e24caecf0a4f 100644
--- a/sound/soc/codecs/hdac_hdmi.c
+++ b/sound/soc/codecs/hdac_hdmi.c
@@ -718,7 +718,7 @@ static void hdac_hdmi_set_power_state(struct hdac_ext_device *edev,
{
if (get_wcaps(&edev->hdac, nid) & AC_WCAP_POWER) {
if (!snd_hdac_check_power_state(&edev->hdac, nid, pwr_state))
- snd_hdac_codec_write(&edev->hdac, nid, 0,
+ snd_hdac_codec_read(&edev->hdac, nid, 0,
AC_VERB_SET_POWER_STATE, pwr_state);
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH v2] ASoC: hdac_hdmi : Ensuring proper setting of output widget power state
2018-02-15 8:35 [PATCH] ASoC: hdac_hdmi : " abhijeet.kumar
@ 2018-02-15 16:56 ` abhijeet.kumar
0 siblings, 0 replies; 3+ messages in thread
From: abhijeet.kumar @ 2018-02-15 16:56 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Vinod Koul, Jeeja KP, Guneshwor Singh, Subhransu S. Prusty,
Ughreja, Rakesh A, Puneeth Prabhu, alsa-devel, linux-kernel
Cc: fengguang.wu, abhijeet.kumar
From: Abhijeet Kumar <abhijeet.kumar@intel.com>
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>
---
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 dba6f4c5074a..97fcd55205e6 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->hdev, nid, pwr_state)) {
+ for (count = 0; count < 10; count++) {
+ snd_hdac_codec_read(&edev->hdev, nid, 0,
+ AC_VERB_SET_POWER_STATE,
+ pwr_state);
+ state = snd_hdac_sync_power_state(&edev->hdev,
+ nid, pwr_state);
+ if (!(state & AC_PWRST_ERROR))
+ break;
+ }
+ }
+
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-15 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1515670468-9198-1>
2018-01-12 8:32 ` [PATCH v2] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state abhijeet.kumar
2018-02-15 8:35 [PATCH] ASoC: hdac_hdmi : " abhijeet.kumar
2018-02-15 16:56 ` [PATCH v2] " abhijeet.kumar
-- strict thread matches above, loose matches on Subject: below --
2018-01-11 11:34 [PATCH] ASoC: hdac_hdmi: " abhijeet.kumar
2018-01-12 8:27 ` [PATCH v2] " abhijeet.kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).