From: David Henningsson <david.henningsson@canonical.com>
To: "Lin, Mengdong" <mengdong.lin@intel.com>
Cc: "tiwai@suse.de" <tiwai@suse.de>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [PATCH] ALSA: hda - delay resume haswell hdmi codec in system resume
Date: Wed, 27 Mar 2013 09:19:29 +0100 [thread overview]
Message-ID: <5152AB91.4050501@canonical.com> (raw)
In-Reply-To: <F46914AEC2663F4A9BB62374E5EEF8F8363D66@SHSMSX101.ccr.corp.intel.com>
On 03/27/2013 03:03 AM, Lin, Mengdong wrote:
>> -----Original Message-----
>> From: alsa-devel-bounces@alsa-project.org
>> [mailto:alsa-devel-bounces@alsa-project.org] On Behalf Of David Henningsson
>> Sent: Tuesday, March 26, 2013 6:58 PM
>
>
>> Just a question: Is there a difference between real system S3 here, and just the
>> normal idle power down? I e, I'm a little unsure myself, but it seems like this 300
>> ms delay would trigger in both cases, causing an
>> (unnecessary?) 300 ms delay every time the codec is idle and you want to start
>> playback. Is this correct, or did I get something wrong?
>
>
> Hi David,
>
> Thanks for your feedback!
> There will not be 300ms delay every time in normal idle power down case.
>
> Only the system resume will delay resuming a codec and cause a waiting on first codec access (eg. 1st playback ) after a system resume. Snd_hda_resume(), called by azx_resume(), will check whether a codec can support delay resume, skip these codecs and set the flag "resume_delayed" on them. Normal idle power down will not touch this flag.
Right.
> The Haswell codec set_power_state ops (intel_haswell_set_power_state) will only wait if this is a delayed resume and clear this flag after waiting. And actually, there is no waiting even in this case. Because when 1st user operation after system resume happens, Gfx already finishes resuming and audio initialization, so as long as intel_haswell_wait_ready_to_resume() enable the unsol event, the unsol event comes and so so waiting finishes. The 300ms time out is set for safety consideration in case unsol event is lost. I've not observed any unsol event lost till now.
As for the timeout, I suggest you use the codec->bus->workq instead of
creating a new workq. I think that will also give us some serialisation,
i e, protection against race conditions if the timeout happen at the
same time as the unsol event.
> BTW, would you please tell us how Ubuntu decides whether to enable the normal idle power down (parameter "power_save")?
> We found this bug on a Haswell mobile machine with "power_save" disabled, which means only system resume will program the codec back to D0. But on a another machine with "power_save" enabled, this bug is not visible because later runtime codec power up can program the codec to D0 and unmute the pin again.
Hmm. I don't think there is any difference between the upstream default
and Ubuntu in this case. I remember we had to turn off power_save for
Pantherpoint once, before keep_power_link_on for PantherPoint was
discovered and upstreamed. But that was quite a while ago.
Then there is of course people playing with powertop and other tools, to
override the defaults.
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
next prev parent reply other threads:[~2013-03-27 8:19 UTC|newest]
Thread overview: 52+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 18:12 [PATCH] ALSA: hda - delay resume haswell hdmi codec in system resume mengdong.lin
2013-03-26 7:02 ` Lin, Mengdong
2013-04-02 9:53 ` Takashi Iwai
2013-04-05 16:58 ` Lin, Mengdong
2013-04-07 7:28 ` Takashi Iwai
2013-03-26 10:58 ` David Henningsson
2013-03-27 2:03 ` Lin, Mengdong
2013-03-27 8:19 ` David Henningsson [this message]
2013-03-27 10:01 ` Lin, Mengdong
2013-04-02 11:53 ` David Henningsson
2013-04-02 12:18 ` Takashi Iwai
2013-04-02 12:49 ` David Henningsson
2013-04-05 13:01 ` Takashi Iwai
2013-04-05 13:08 ` Takashi Iwai
2013-04-05 16:42 ` Lin, Mengdong
2013-04-05 17:04 ` Takashi Iwai
2013-04-07 0:10 ` Lin, Mengdong
2013-04-08 9:49 ` David Henningsson
2013-04-08 10:24 ` Takashi Iwai
2013-04-08 11:06 ` Lin, Mengdong
2013-04-08 11:35 ` David Henningsson
2013-04-08 11:59 ` Takashi Iwai
2013-04-08 12:20 ` David Henningsson
2013-04-08 12:23 ` Takashi Iwai
2013-04-08 13:30 ` David Henningsson
2013-04-08 13:49 ` Takashi Iwai
2013-04-08 15:47 ` Lin, Mengdong
2013-04-09 6:45 ` David Henningsson
2013-04-09 6:53 ` Takashi Iwai
2013-04-09 7:10 ` David Henningsson
2013-04-09 7:42 ` Takashi Iwai
2013-04-09 8:18 ` Lin, Mengdong
2013-04-09 9:15 ` David Henningsson
2013-04-09 9:26 ` Takashi Iwai
2013-04-10 5:29 ` David Henningsson
2013-04-10 5:47 ` Takashi Iwai
2013-04-10 6:02 ` David Henningsson
2013-04-10 6:52 ` Takashi Iwai
2013-04-10 10:38 ` David Henningsson
2013-04-14 13:48 ` Lin, Mengdong
2013-04-15 7:02 ` David Henningsson
2013-04-15 7:48 ` Lin, Mengdong
2013-04-17 5:51 ` David Henningsson
2013-04-17 6:12 ` Takashi Iwai
2013-05-03 6:56 ` Lin, Mengdong
2013-05-03 7:20 ` David Henningsson
2013-05-03 7:30 ` Lin, Mengdong
2013-05-06 6:27 ` Lin, Mengdong
2013-05-06 7:08 ` David Henningsson
2013-05-06 9:48 ` Lin, Mengdong
2013-04-05 13:06 ` Takashi Iwai
2013-04-05 13:12 ` 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=5152AB91.4050501@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=mengdong.lin@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 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.