From: David Henningsson <david.henningsson@canonical.com>
To: Takashi Iwai <tiwai@suse.de>
Cc: "Lin, Mengdong" <mengdong.lin@intel.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Girdwood, Liam R" <liam.r.girdwood@intel.com>
Subject: Re: [PATCH] ALSA: hda - delay resume haswell hdmi codec in system resume
Date: Mon, 08 Apr 2013 14:20:28 +0200 [thread overview]
Message-ID: <5162B60C.6000509@canonical.com> (raw)
In-Reply-To: <s5hzjx9z10c.wl%tiwai@suse.de>
On 04/08/2013 01:59 PM, Takashi Iwai wrote:
> At Mon, 08 Apr 2013 13:35:25 +0200,
> David Henningsson wrote:
>>
>> On 04/08/2013 01:06 PM, Lin, Mengdong wrote:
>>>> -----Original Message-----
>>>> From: Takashi Iwai [mailto:tiwai@suse.de]
>>>> Sent: Monday, April 08, 2013 6:24 PM
>>>> To: David Henningsson
>>>> Cc: Lin, Mengdong; alsa-devel@alsa-project.org
>>>> Subject: Re: [alsa-devel] [PATCH] ALSA: hda - delay resume haswell hdmi codec
>>>> in system resume
>>>>
>>>> At Mon, 08 Apr 2013 11:49:09 +0200,
>>>> David Henningsson wrote:
>>>>>
>>>>> I'm still not understanding this patch.
>>>>>
>>>>> We of course cannot have a situation where HDMI jack detection is not
>>>>> correctly working after S3, which looks like would be the case here?
>>>>
>>>> No. The patch itself has nothing to do with the HDMI jack detection at all.
>>>> This intrinsic unsol event is (according to Intel) guaranteed to be issued once at
>>>> the audio codec initialization, at least for Haswell.
>>
>> Well, if no process is using the HDMI codec actively, nothing will
>> initialize the resume, and the HDMI codec will not initialized at all, i
>> e, no unsol events enabled in the first place?
>
> No, the intrinsic unsol event that is issued for this seems irrelevant
> from the jack state (i.e. active usage).
>
>> (The counter argument would be; if nobody uses HDMI codec, does it
>> matter that it is not initialized, but I'm unsure if e g "amixer
>> contents" or listeners on legacy /dev/input actually powers up the chip.)
>
> The problem is that the codec resume is always performed no matter
> whether the device is used or not. This was different in the past but
> it's been changed in that way because there are cases where you need
> to initialize the hardware properly once (e.g. mute-LED toggling).
>
>
>>>>> Second, I just saw on a machine we're working on, the symptoms: one of
>>>>> the pins in D3 and the right channel muted. And this was on a clean
>>>>> boot, not after S3 suspend/resume cycle.
>>>>
>>>> Maybe another problem. Maybe not. Does the problem persist if you reload
>>>> the driver (without invocation of alsactl via udev)?
>>>
>>> Hi Takashi and David,
>>>
>>> This is the same dependency issue as after system suspend/resume cycles, with same phenomenon.
>>> I duplicated this error if I boot without an HDMI/DP cable connected and connect the cable later.
>>> Maybe we need to delay codec operations on initialization like in resume case.
>>
>> So it's a problem both on hotplug and S3...
>
> In the case of hotplug, you don't hit the inconsistent power sate
> we're trying to solve. The graphics has been already powered up.
>
>
>>>>> To look at the problem again: If the problem is that something must be
>>>>> done on the graphics driver side first and then on the audio side,
>>>>> wouldn't the solution be for the video driver and audio driver to
>>>>> communicate somehow?
>>>>
>>>> Yes, the pm domain support is necessary sooner or later, as I already discussed
>>>> shortly with Dave Airlie. However...
>>>
>>> Liam will propose Gfx driver team to implement a pm domain.
>>>
>>>>> And resume (and possibly init?) would not complete until first the
>>>>> graphics driver has done its resume, and after that, the audio driver.
>>>>> I e, userspace will remain frozen until both drivers have completed a
>>>>> correct resume.
>>>>
>>>> ... the resume problem can't be fixed only by the usual pm domain serialization.
>>>> The graphics initialization for the audio bit is done asynchronously, thus we
>>>> can't guarantee the audio codec is really ready after the graphics driver returns
>>>> from the resume callback.
>>>> It shows as if it's ready (you can turn it to D0) but actually it doesn't change on
>>>> the hardware. Thus, the serialization with an unsol event wait seems
>>>> mandatory for the time being.
>>>>
>>> It seems so. We have not found better solution now :-(
>>> I've revised the patch for system suspend/resume case. Please review.
>>
>> If this problem can be detected by looking at the pin and finding that
>> it is in D3,
>
> No, you can't see that it's D3. The controller chip _shows_ it's in
> D0 while it's actually in D3. That's the problem.
>
> So, this is actually a hardware design bug. But we need to live with
> that.
Then I'm not sure it's the same problem; because for me I can see the D3
in the codec proc output.
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
next prev parent reply other threads:[~2013-04-08 12:20 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
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 [this message]
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=5162B60C.6000509@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=liam.r.girdwood@intel.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox