[alsa-devel] [PATCH] ALSA: hda - Re-setup HDMI pin and audio infoframe on stream switches

Lin, Mengdong mengdong.lin at intel.com
Wed Sep 4 03:29:52 CEST 2013

Hi David and Takashi,

> -----Original Message-----
> From: alsa-devel-bounces at alsa-project.org
> [mailto:alsa-devel-bounces at alsa-project.org] On Behalf Of David Henningsson
> Sent: Tuesday, September 03, 2013 8:36 PM

> >> Also, this looks a bit like the workaround I added a while back
> >> (83f26ad2c909083fa6 - ALSA: hda - fixup D3 pin and right channel mute
> >> on Haswell HDMI audio) is there a possibility we need to fix up D3 as
> >> well here? I e, call haswell_verify_pin_D0 rather than just setting the mute?
> >> Or perhaps move the call to haswell_verify_pin_D0 from
> >> hdmi_setup_stream to hdme_setup_audio_infoframe ?
> >
> > The power state is fine in this case, but just to reset the amp state
> > by some reason.  It's not enough to update the info frame, as far as I
> > tested.
> Ok - maybe Mengdong can comment more on this, if it's the same scenario as I
> was working around earlier (right channel muted and pin in D3), or if this is
> something different.

They're same in nature, although the pin power state can be affected or not.
S3, hot-plug and Gfx mode switch can all make Gfx reconnect the port, maybe to the same or a different transcoder.
During this process , audio will be disabled and re-enabled again in Gfx driver side. 
As a result, pin mute status, inforframe transmission, power state need to be re-setup.

Till now, we only observed pin in D3 after boot. But considering Gfx is implement runtime PM, it would be better to always check/fix pin power state.
Since the ELD valid unsolicited response is a signal to indicate Gfx driver has finished audio re-enabling, the audio driver could fix things in hdmi_present_sense() triggered by the HDMI intrinsic event handler.
> If it's the same issue, I was thinking that we could
>  1) skip the extra snd_hda_codec_write here, and
>  2) move the call to haswell_verify_pin_D0 from hdmi_setup_stream to
> hdmi_setup_audio_infoframe?
> Also, if the pin amp is always unmuted, we could speed up
> haswell_verify_pin_D0 to always unmute instead of read-then-write.

I'll try to merge the Haswell fixing into hdmi_present_sense() and verify it today.

BTW, I've asked Canonical test engineers through Lauchpad to verify current patch.


More information about the Alsa-devel mailing list