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 3/7] ALSA: hda - Override HDMI setup_stream ops for Intel HSW+
Date: Tue, 22 Mar 2016 12:29:29 +0100	[thread overview]
Message-ID: <1458646173-14520-4-git-send-email-tiwai@suse.de> (raw)
In-Reply-To: <1458646173-14520-1-git-send-email-tiwai@suse.de>

Instead of checking at each time with is_haswell_plus() macro,
override the setup_stream ops itself for HSW+ chips.

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

diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index fcd207d3ce7d..985518891b99 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -864,9 +864,6 @@ static int hdmi_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
 	struct hdmi_spec *spec = codec->spec;
 	int err;
 
-	if (is_haswell_plus(codec))
-		haswell_verify_D0(codec, cvt_nid, pin_nid);
-
 	err = spec->ops.pin_hbr_setup(codec, pin_nid, is_hbr_format(format));
 
 	if (err) {
@@ -2307,6 +2304,14 @@ static void register_i915_notifier(struct hda_codec *codec)
 	snd_hdac_i915_register_notifier(&spec->i915_audio_ops);
 }
 
+/* setup_stream ops override for HSW+ */
+static int i915_hsw_setup_stream(struct hda_codec *codec, hda_nid_t cvt_nid,
+				 hda_nid_t pin_nid, u32 stream_tag, int format)
+{
+	haswell_verify_D0(codec, cvt_nid, pin_nid);
+	return hdmi_setup_stream(codec, cvt_nid, pin_nid, stream_tag, format);
+}
+
 /* Intel Haswell and onwards; audio component with eld notifier */
 static int patch_i915_hsw_hdmi(struct hda_codec *codec)
 {
@@ -2338,6 +2343,8 @@ static int patch_i915_hsw_hdmi(struct hda_codec *codec)
 	codec->depop_delay = 0;
 	codec->auto_runtime_pm = 1;
 
+	spec->ops.setup_stream = i915_hsw_setup_stream;
+
 	err = hdmi_parse_codec(codec);
 	if (err < 0) {
 		generic_spec_free(codec);
-- 
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 ` [PATCH 2/7] ALSA: hda - Apply AMP fix in hdmi_setup_audio_infoframe() generically Takashi Iwai
2016-03-22 11:29 ` Takashi Iwai [this message]
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-4-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).