At Tue, 26 Mar 2013 14:12:52 -0400, mengdong.lin@intel.com wrote:
From: Mengdong Lin mengdong.lin@intel.com
In system resume, Haswell codec cannot be programmed to D0 before Gfx driver initializes the display pipeline and audio, which will trigger an unsol event on the pin with HDMI/DP cable connected. Otherwise, the connected pin will stay in D3 with right channel muted and thus no sound can be heard.
This patch
- adds a codec flag to delay resuming a codec. System resume will skip the codecs if this flag is set, and these codecs will be resumed on later codec access.
- adds a set_power_state ops for Haswell HDMI codec. In a delayed resume, this ops will enable and wait for the unsol event, and then resume the codec. A 300ms timeout is set in case unsol event is lost.
Signed-off-by: Mengdong Lin mengdong.lin@intel.com
I tried the patch on my HSW test machine, but this doesn't seem to work well. The machine shows the dead codec communication after S3. And I hoped that the problem could be fixed by this, but it wasn't.
It seems that the graphics doesn't give any unsol event after S3. And it doesn't power up correctly as well. So still something is wrong around graphics, maybe some initialization bits are missing.
FWIW, I tested the patch on vanilla 3.9-rc5+, with and without my for-linus/for-next branch merges, and also with Daniel's drm-intel-next branch.
Which machine did you test it?
I don't mind to merge the revised patch, though, since it doesn't break things (it's already broken), though.
thanks,
Takashi