All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Henningsson <david.henningsson@canonical.com>
To: Wang Xingchao <xingchao.wang@intel.com>
Cc: tiwai@suse.de, alsa-devel@alsa-project.org, wangxingchao2011@gmail.com
Subject: Re: [PATCH 2/2] ALSA: hda - reduce msleep time if EPSS power states supported
Date: Thu, 07 Jun 2012 09:15:11 +0200	[thread overview]
Message-ID: <4FD054FF.1090907@canonical.com> (raw)
In-Reply-To: <1338991369-31656-2-git-send-email-xingchao.wang@intel.com>

On 06/06/2012 04:02 PM, Wang Xingchao wrote:
> if EPSS supported, transition from D3 state to D0 state in less
> than 10ms
>
> Signed-off-by: Wang Xingchao<xingchao.wang@intel.com>
> ---
>   sound/pci/hda/hda_codec.c |    6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
> index b89c8ec..5298ba1 100644
> --- a/sound/pci/hda/hda_codec.c
> +++ b/sound/pci/hda/hda_codec.c
> @@ -3526,14 +3526,18 @@ static bool snd_hda_codec_get_supported_ps(struct hda_codec *codec, hda_nid_t fg
>   static void hda_set_power_state(struct hda_codec *codec, hda_nid_t fg,
>   				unsigned int power_state)
>   {
> +	bool epss;
>   	if (codec->patch_ops.set_power_state) {
>   		codec->patch_ops.set_power_state(codec, fg, power_state);
>   		return;
>   	}
>
> +	epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS);
>   	/* this delay seems necessary to avoid click noise at power-down */
> -	if (power_state == AC_PWRST_D3)
> +	if ((power_state == AC_PWRST_D3)&&  !epss)
>   		msleep(100);
> +	else
> +		msleep(10);

Hi Wang,

You seem to have increased the delay from 0 to 10 ms on all cases when 
power_state != AC_PWRST_D3, is this intentional?

Or did you mean to write like this:

	if (power_state == AC_PWRST_D3) {
		bool epss = snd_hda_codec_get_supported_ps(codec, fg, AC_PWRST_EPSS);
		msleep(epss ? 10 : 100);
	}


-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic

  reply	other threads:[~2012-06-07  7:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-06 14:02 [PATCH 1/2] ALSA: hda - check supported power states Wang Xingchao
2012-06-06 14:02 ` [PATCH 2/2] ALSA: hda - reduce msleep time if EPSS power states supported Wang Xingchao
2012-06-07  7:15   ` David Henningsson [this message]
2012-06-07  7:26     ` Wang Xingchao
2012-06-07  9:42 ` [PATCH 1/2] ALSA: hda - check supported power states Takashi Iwai

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=4FD054FF.1090907@canonical.com \
    --to=david.henningsson@canonical.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    --cc=wangxingchao2011@gmail.com \
    --cc=xingchao.wang@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.