alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: 'Takashi Iwai' <tiwai@suse.de>
Cc: alsa-devel <alsa-devel@alsa-project.org>
Subject: [PATCH] hda-intel: reorder HDMI audio enabling sequence
Date: Mon, 17 Nov 2008 16:57:33 +0800	[thread overview]
Message-ID: <20081117085733.GA17334@localhost> (raw)

Reorder HDMI audio enabling sequence so that
	1) the sink knows about the coming audio stream
	2) unmute
	3) start transferring audio samples

The theory is that in the path A=>B=>C, we first make C ready, and then
enable B, and lastly allow A to send audio samples.

Signed-off-by: Wu Fengguang <wfg@linux.intel.com>
---
 sound/pci/hda/patch_intelhdmi.c |   12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

--- sound-2.6.orig/sound/pci/hda/patch_intelhdmi.c
+++ sound-2.6/sound/pci/hda/patch_intelhdmi.c
@@ -312,16 +312,16 @@ static void hdmi_write_dip_byte(struct h
 
 static void hdmi_enable_output(struct hda_codec *codec)
 {
-	/* Enable pin out and unmute */
-	snd_hda_sequence_write(codec, pinout_enable_verb);
-	if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP)
-		snd_hda_codec_write(codec, PIN_NID, 0,
-				AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
-
 	/* Enable Audio InfoFrame Transmission */
 	hdmi_set_dip_index(codec, PIN_NID, 0x0, 0x0);
 	snd_hda_codec_write(codec, PIN_NID, 0, AC_VERB_SET_HDMI_DIP_XMIT,
 						AC_DIPXMIT_BEST);
+	/* Unmute */
+	if (get_wcaps(codec, PIN_NID) & AC_WCAP_OUT_AMP)
+		snd_hda_codec_write(codec, PIN_NID, 0,
+				AC_VERB_SET_AMP_GAIN_MUTE, AMP_OUT_UNMUTE);
+	/* Enable pin out */
+	snd_hda_sequence_write(codec, pinout_enable_verb);
 }
 
 static void hdmi_disable_output(struct hda_codec *codec)

             reply	other threads:[~2008-11-17  8:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-17  8:57 Wu Fengguang [this message]
2008-11-17  9:05 ` [PATCH] hda-intel: reorder HDMI audio enabling sequence Takashi Iwai
2008-11-17  9:22   ` Wu Fengguang

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=20081117085733.GA17334@localhost \
    --to=fengguang.wu@intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /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;
as well as URLs for NNTP newsgroup(s).