From: David Henningsson <david.henningsson@canonical.com>
To: "Lin, Mengdong" <mengdong.lin@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>,
"Li, Jocelyn" <jocelyn.li@intel.com>,
"alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
"Wang, Xingchao" <xingchao.wang@intel.com>,
"Girdwood, Liam R" <liam.r.girdwood@intel.com>
Subject: Re: [PATCH] ALSA: hda - delay resume haswell hdmi codec in system resume
Date: Fri, 03 May 2013 09:20:29 +0200 [thread overview]
Message-ID: <5183653D.90003@canonical.com> (raw)
In-Reply-To: <F46914AEC2663F4A9BB62374E5EEF8F839C586@SHSMSX101.ccr.corp.intel.com>
On 05/03/2013 08:56 AM, Lin, Mengdong wrote:
> Hi Takashi and David,
>
>> -----Original Message-----
>> From: Takashi Iwai [mailto:tiwai@suse.de]
>> Sent: Wednesday, April 17, 2013 2:13 PM
>> To: David Henningsson
>> Cc: Lin, Mengdong; alsa-devel@alsa-project.org; Girdwood, Liam R
>> Subject: Re: [alsa-devel] [PATCH] ALSA: hda - delay resume haswell hdmi codec
>> in system resume
>>
>> At Wed, 17 Apr 2013 07:51:47 +0200,
>> David Henningsson wrote:
>>>>> The dependency on the Gfx driver, is it both codec-wide and per
>>>>> pin? It seems to be at least per pin, which means that whenever we
>>>>> plug something in, we need to redo our initialization of that pin
>>>>> after the Gfx driver has finished, is that correct?
>
> It was confirmed that this a per pin dependency, not codec-wide.
>
> For Haswell, every pin is in D3 with amplifier muted by default.
> The audio driver must program the pin to D0 and unmute the pin, after the gfx driver connect the GPU pipe and port, and enable the transcoder
> (The transcoder is the component where audio is mixed with video).
> Otherwise, the pin's default power and mute state will not change, by checking the Gfx side audio register, although audio codec does not report error.
>
> In addition, HDMI/DP cable hot plug will trigger Gfx driver to disconnect/connect the pipeline, and port may be connected to a new transcoder.
> If the transcoder has changed, the pin can return to D3 and muted again. There are 3 pipelines in GPU, a pipe/port connection only affects one pin, not the other pins and convertors.
> So our previous patch to delay powering up the whole codec once is not enough and not suitable.
This makes me a bit worried actually. If the transcoder to port
connection can be changed at runtime, how does this affect the default
pin config on the audio codec pin node?
E g, if the machine only has one physical HDMI output, it would be a
good thing to mark only one of the pin nodes as a "jack" and the other
two as "not connected".
Now, if the transcoder used for this HDMI output is varying, it can be
sometimes not matching the audio codec pin node set to "jack", and then
we have a problem...!
Or is the gfx engine taking the default pin config of the audio codec
into account somehow?
>
> Since audio driver does not and should not have any knowledge how GfX maniplute the display pipeline.
> The unsolicited event can be used to as flag that the pin widget is ready to power up.
>
> And because the unsol event can happen at D3 and it not necessarily to power up the pin at once on the unsol event,
> we prefer to check and fix the pin state when a PCM stream is setting up. This can also avoid race in PM.
>
> We also checked the info frame. Current mechanism to check and refresh audio info frame works well.
>
> So David's patch is a reliable fix to solve the display audio dependency issue. There is no need to write a new patch atm.
>
> Thanks
> Mengdong
>
>>> It looks like this will take some time to implement, and the 3.10
>>> merge window will soon open. It also sounds like the complexity makes
>>> it possible that a full fix can not be applied later during 3.10 rc cycle.
>>>
>>> Takashi, may I ask you to apply the attached workaround in the mean
>>> time? I've confirmed it to resolve the problem on at least two
>>> different machines.
>>
>> Yeah, looking through the development, I'm inclined to postpone the delayed
>> resume scheme for 3.10. As a bandaid fix, I'm going to apply David's patch for
>> now.
>>
>> IMO, the biggest concern in the current delayed resume implementation is that
>> we don't know how reliable the unsol event generation and handling. In other
>> words, if the graphics driver can _always_ sets and/or wakes up for the
>> hardware readiness state, it'd be a much better way to control; it's more
>> deterministic.
>>
>> Then we can implement, e.g. a platform device shared by both graphics and
>> audio drivers and let pm operations sync there, as Liam once suggested. This
>> would work even w/o pm domain implementation (it's a kind of own pm domain
>> implementation, after all).
>
>
>
>
--
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic
next prev parent reply other threads:[~2013-05-03 7: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
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 [this message]
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=5183653D.90003@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=jocelyn.li@intel.com \
--cc=liam.r.girdwood@intel.com \
--cc=mengdong.lin@intel.com \
--cc=tiwai@suse.de \
--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.