public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: " Kumar, Abhijeet " <abhijeet.kumar@intel.com>
Cc: "Vinod Koul" <vinod.koul@intel.com>,
	<alsa-devel@alsa-project.org>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Guneshwor Singh" <guneshwor.o.singh@intel.com>,
	"Jeeja KP" <jeeja.kp@intel.com>,
	"Sandeep Tayal" <sandeepx.tayal@intel.com>,
	"Subhransu S. Prusty" <subhransu.s.prusty@intel.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: hdac_hdmi: Ensuring proper setting of output widget power state
Date: Fri, 12 Jan 2018 10:26:09 +0100	[thread overview]
Message-ID: <s5hefmvpgwe.wl-tiwai@suse.de> (raw)
In-Reply-To: <d84bdde7-2eda-ab2b-adce-b689b4222838@intel.com>

On Fri, 12 Jan 2018 09:25:54 +0100,
 Kumar, Abhijeet  wrote:
> 
> 
> 
> On 1/12/2018 11:16 AM, Vinod Koul wrote:
> > On Thu, Jan 11, 2018 at 05:04:27PM +0530, abhijeet.kumar@intel.com wrote:
> >> From: Abhijeet Kumar <abhijeet.kumar@intel.com>
> >>
> >> When we change the resolution of DP pannel or hot plug-unplug it while
> >> playing an audio clip,sometimes we observe a silent playback(no audio).
> > can you rephrase this please
> done please review v2!
> >> 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
> > space after .
> >
> >> state and response is received. Thus ensuring power state is set.
> > am not sure I fully understood the problem here
> 
> This appears to be an timing issue, while performing a stress test, we
> found out that sometimes either pin or converters are not powered
> up. Thus ensuring it that the power state is set correctly.
> 
> >
> >> Signed-off-by: Abhijeet Kumar <abhijeet.kumar@intel.com>
> >> ---
> >>   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,
> > how does read help instead of write?
> 
> Indeed i'm making use of read instead of write to send the set command.
> 
> But unlike codec_write, codec_read send the verb synchronously. Maybe
> if you read the comment while powering up and down in
> hdmi_codec_prepare and hdmi_codec_complete you would understand
> better.
> 
> "codec_read is preferred over codec_write to set the power state.
> 
> This way verb is send to set the power state and response is
> received. So setting power state is ensured without using loop to read
> the state."

It's better, but doesn't guarantee that the node reached the given
power state.  codec_read assures that the verb is sent and the codec
gives the response.  But it means only the target state gets updated,
and doesn't mean that the actual state reached.


thanks,

Takashi

  parent reply	other threads:[~2018-01-12  9:26 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 [this message]
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       ` Applied "ASoC: hdac_hdmi : Ensuring proper setting of output widget power state" to the asoc tree Mark Brown
2018-02-15 16:56       ` [PATCH v2] ASoC: hdac_hdmi : Ensuring proper setting of output widget power state 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=s5hefmvpgwe.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=abhijeet.kumar@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.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=sandeepx.tayal@intel.com \
    --cc=subhransu.s.prusty@intel.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