From: Takashi Iwai <tiwai@suse.de>
To: Wang Xingchao <xingchao.wang@intel.com>
Cc: alsa-devel@alsa-project.org, daniel.vetter@ffwll.ch,
intel-gfx@lists.freedesktop.org, yakui.zhao@intel.com,
michael.fu@intel.com, fengguang.wu@intel.com
Subject: Re: [PATCH v2] drm/i915: HDMI - Clear Audio Enable bit for Hot Plug unconditionally
Date: Thu, 13 Sep 2012 08:51:22 +0200 [thread overview]
Message-ID: <s5hipbie7px.wl%tiwai@suse.de> (raw)
In-Reply-To: <1347506340-2683-1-git-send-email-xingchao.wang@intel.com>
At Thu, 13 Sep 2012 11:19:00 +0800,
Wang Xingchao wrote:
>
> Clear Audio Enable bit to trigger unsolicated event to notify Audio
> Driver part the HDMI hot plug change. The patch fixed the bug when
> remove HDMI cable the bit was not cleared correctly.
>
> In intel_enable_hdmi(), if intel_hdmi->has_audio been true, the "Audio enable bit" will
> be set to trigger unsolicated event to notify Alsa driver the change.
>
> intel_hdmi->has_audio will be reset to false from intel_hdmi_detect() after
> remove the hdmi cable, here's debug log:
>
> [ 187.494153] [drm:output_poll_execute], [CONNECTOR:17:HDMI-A-1] status updated from 1 to 2
> [ 187.525349] [drm:intel_hdmi_detect], HDMI: has_audio = 0
>
> so when comes back to intel_disable_hdmi(), the "Audio enable bit" will not be cleared. And this
> cause the eld infomation and pin presence doesnot update accordingly in alsa driver side.
>
> This patch will also trigger unsolicated event to alsa driver to notify the hot plug event:
>
> [ 187.853159] ALSA sound/pci/hda/patch_hdmi.c:772 HDMI hot plug event: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=1
> [ 187.853268] ALSA sound/pci/hda/patch_hdmi.c:990 HDMI status: Codec=3 Pin=5 Presence_Detect=0 ELD_Valid=0
>
> Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
We need the same fix for stable kernels, too, but unfortunately this
can't be applied to 3.6 or earlier.
Greg prefers still having a Cc to stable even in such a case, and then
send a separate patch applicable to the existing kernels.
http://lwn.net/Articles/515528/
So better to have a Cc to stable in the patch.
thanks,
Takashi
> ---
> drivers/gpu/drm/i915/intel_hdmi.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
> index 5d02aad..229897f 100644
> --- a/drivers/gpu/drm/i915/intel_hdmi.c
> +++ b/drivers/gpu/drm/i915/intel_hdmi.c
> @@ -674,10 +674,7 @@ static void intel_disable_hdmi(struct intel_encoder *encoder)
> struct drm_i915_private *dev_priv = dev->dev_private;
> struct intel_hdmi *intel_hdmi = enc_to_intel_hdmi(&encoder->base);
> u32 temp;
> - u32 enable_bits = SDVO_ENABLE;
> -
> - if (intel_hdmi->has_audio)
> - enable_bits |= SDVO_AUDIO_ENABLE;
> + u32 enable_bits = SDVO_ENABLE | SDVO_AUDIO_ENABLE;
>
> temp = I915_READ(intel_hdmi->sdvox_reg);
>
> --
> 1.7.9.5
>
> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
>
next prev parent reply other threads:[~2012-09-13 6:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-13 3:19 [PATCH v2] drm/i915: HDMI - Clear Audio Enable bit for Hot Plug unconditionally Wang Xingchao
2012-09-13 6:51 ` Takashi Iwai [this message]
2012-09-13 13:53 ` Wang Xingchao
2012-09-13 14:00 ` Takashi Iwai
2012-09-13 14:18 ` [alsa-devel] " Daniel Vetter
2012-09-13 14:31 ` Takashi Iwai
2012-09-17 7:58 ` [alsa-devel] " Daniel Vetter
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=s5hipbie7px.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=alsa-devel@alsa-project.org \
--cc=daniel.vetter@ffwll.ch \
--cc=fengguang.wu@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=michael.fu@intel.com \
--cc=xingchao.wang@intel.com \
--cc=yakui.zhao@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox