public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Wang Xingchao <xingchao.wang@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: paulo.r.zanoni@intel.com
Subject: [PATCH V2 4/4] ALSA HDA: Force HDMI pins enabled
Date: Tue, 31 Jul 2012 10:47:05 +0800	[thread overview]
Message-ID: <1343702825-15439-5-git-send-email-xingchao.wang@intel.com> (raw)
In-Reply-To: <1343702825-15439-1-git-send-email-xingchao.wang@intel.com>

There's one issue for HDMI pins, even the related pin will be enabled
when the stream is active but the GPU registers show the PIN is not in
active state, so we force all pins in active state and donot close it
when the stream is closed.

Signed-off-by: Wang Xingchao <xingchao.wang@intel.com>
---
 sound/pci/hda/patch_hdmi.c |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index ad319d4..64cc9e0 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -421,13 +421,17 @@ static void hdmi_write_dip_byte(struct hda_codec *codec, hda_nid_t pin_nid,
 
 static void hdmi_init_pin(struct hda_codec *codec, hda_nid_t pin_nid)
 {
+	/* Force all output Pins enabled */
+	snd_printk(KERN_DEBUG "HDMI: enable all output\n");
+	snd_hda_codec_write(codec, pin_nid, 0,
+			    AC_VERB_SET_PIN_WIDGET_CONTROL, 0x40);
+
 	/* Unmute */
-	if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP)
+	if (get_wcaps(codec, pin_nid) & AC_WCAP_OUT_AMP) {
+		snd_printk(KERN_DEBUG "HDMI: unmute pin %d\n", pin_nid);
 		snd_hda_codec_write(codec, pin_nid, 0,
 				AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
-	/* Disable pin out until stream is active*/
-	snd_hda_codec_write(codec, pin_nid, 0,
-			    AC_VERB_SET_PIN_WIDGET_CONTROL, 0);
+	}
 }
 
 static int hdmi_get_channel_count(struct hda_codec *codec, hda_nid_t cvt_nid)
@@ -1190,9 +1194,6 @@ static int generic_hdmi_playback_pcm_cleanup(struct hda_pcm_stream *hinfo,
 
 		pinctl = snd_hda_codec_read(codec, per_pin->pin_nid, 0,
 					    AC_VERB_GET_PIN_WIDGET_CONTROL, 0);
-		snd_hda_codec_write(codec, per_pin->pin_nid, 0,
-				    AC_VERB_SET_PIN_WIDGET_CONTROL,
-				    pinctl & ~PIN_OUT);
 		snd_hda_spdif_ctls_unassign(codec, pin_idx);
 	}
 
-- 
1.7.9.5

  parent reply	other threads:[~2012-07-31  2:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-31  2:47 [PATCH v2 0/4] Haswell HDMI/DP audio enable Wang Xingchao
2012-07-31  2:47 ` [PATCH V2 1/4] drm/i915: HSW audio registers definition Wang Xingchao
2012-07-31  2:47 ` [PATCH V2 2/4] drm/i915: write eld info for HDMI audio Wang Xingchao
2012-07-31  2:47 ` [PATCH V2 3/4] drm/i915: Haswell HDMI audio enable Wang Xingchao
2012-08-02  2:12   ` Paulo Zanoni
2012-08-06  7:07     ` Daniel Vetter
2012-08-06 10:10       ` Wang, Xingchao
2012-07-31  2:47 ` Wang Xingchao [this message]
2012-07-31 11:18   ` [PATCH V2 4/4] ALSA HDA: Force HDMI pins enabled Takashi Iwai
2012-08-01  0:27     ` Wang, Xingchao
2012-08-01  5:55       ` 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=1343702825-15439-5-git-send-email-xingchao.wang@intel.com \
    --to=xingchao.wang@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@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