alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: alsa-devel@alsa-project.org
Cc: libin.yang@linux.intel.com
Subject: [PATCH 2/7] ALSA: hda - Apply AMP fix in hdmi_setup_audio_infoframe() generically
Date: Tue, 22 Mar 2016 12:29:28 +0100	[thread overview]
Message-ID: <1458646173-14520-3-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1458646173-14520-1-git-send-email-tiwai@suse.de>

The need for reprogramming the AMP mute bit at each audio info frame
setup isn't always specific to Intel chips.  It's safer to set it
generically for all codecs with the amp bit, as this verb execution
itself isn't too much load.  This eliminates one usage of
is_haswell_plus() macro, after all.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
 sound/pci/hda/patch_hdmi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 48c63fea7018..fcd207d3ce7d 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -683,7 +683,8 @@ static void hdmi_setup_audio_infoframe(struct hda_codec *codec,
 	if (!channels)
 		return;
 
-	if (is_haswell_plus(codec))
+	/* some HW (e.g. HSW+) needs reprogramming the amp at each time */
+	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);
-- 
2.7.4

  parent reply	other threads:[~2016-03-22 11:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-22 11:29 [PATCH 0/7] Intel HD-audio HDMI codec driver rewrites Takashi Iwai
2016-03-22 11:29 ` [PATCH 1/7] ALSA: hda - Split out Intel-specific codes from patch_generic_hdmi() Takashi Iwai
2016-03-22 11:29 ` Takashi Iwai [this message]
2016-03-22 11:29 ` [PATCH 3/7] ALSA: hda - Override HDMI setup_stream ops for Intel HSW+ Takashi Iwai
2016-03-22 11:29 ` [PATCH 4/7] ALSA: hda - Introduce pin_cvt_fixup() ops to hdmi parser Takashi Iwai
2016-03-22 11:29 ` [PATCH 5/7] ALSA: hda - Use eld notifier for Intel SandyBridge and IvyBridge HDMI/DP Takashi Iwai
2016-03-22 11:29 ` [PATCH 6/7] ALSA: hda - Add the pin / port mapping on Intel ILK and VLV Takashi Iwai
2016-03-22 11:29 ` [PATCH 7/7] ALSA: hda - Enable i915 ELD notifier for Intel IronLake and Baytrail 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=1458646173-14520-3-git-send-email-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=libin.yang@linux.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;
as well as URLs for NNTP newsgroup(s).