Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: mengdong.lin@intel.com
To: alsa-devel@alsa-project.org, tiwai@suse.de
Cc: Mengdong Lin <mengdong.lin@intel.com>
Subject: [PATCH v2 2/3] ALSA: hda - remove controller dependency on i915 power well for Baytrail/Braswell
Date: Tue, 28 Apr 2015 20:43:10 +0800	[thread overview]
Message-ID: <1430224990-22229-1-git-send-email-mengdong.lin@intel.com> (raw)
In-Reply-To: <4530387c0b63ccfafb5dbb3399a39b4093651c48.1429880424.git.mengdong.lin@intel.com>

From: Mengdong Lin <mengdong.lin@intel.com>

For Baytrail (Valleyview) and Braswell (Cherryview), not the HD-A controller
but only the display codec is in the shared power well with gfx.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>

diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 1b688ba..e73dc34 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1903,8 +1903,9 @@ static int azx_probe_continue(struct azx *chip)
 	 * display codec needs the power and it can be released after probe.
 	 */
 	if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
-		/* Assume the controller needs the power by default */
-		chip->need_i915_power = 1;
+		/* Baytral/Braswell controllers don't need this power */
+		if (pci->device != 0x0f04 && pci->device != 0x2284)
+			chip->need_i915_power = 1;
 
 #ifdef CONFIG_SND_HDA_I915
 		err = hda_i915_init(hda);
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index 5f44f60..7b2744c 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -2335,6 +2335,14 @@ static int patch_generic_hdmi(struct hda_codec *codec)
 		intel_haswell_fixup_enable_dp12(codec);
 	}
 
+	/* For Valleyview/Cherryview, the codec is in the display power well.
+	 * For Haswell/Broadwell, the controller is also in the power well and
+	 * can cover codec power request, and so need not set this flag.
+	 * For previous platforms, there is no such power well feature.
+	 */
+	if (is_valleyview_plus(codec))
+		codec->core.need_i915_power = 1;
+
 	if (is_haswell_plus(codec) || is_valleyview_plus(codec))
 		codec->depop_delay = 0;
 
-- 
1.9.1

  parent reply	other threads:[~2015-04-28 12:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 13:01 [RFC PATCH 1/2] ALSA: hda - divide controller and codec dependency on i915 gfx power well mengdong.lin
2015-04-24 13:02 ` [RFC PATCH 2/2] ALSA: hda - remove controller dependency on i915 power well for Baytrail/Braswell mengdong.lin
2015-04-24 13:53 ` [RFC PATCH 1/2] ALSA: hda - divide controller and codec dependency on i915 gfx power well Takashi Iwai
2015-04-27  7:20   ` Lin, Mengdong
2015-04-28 12:43 ` [PATCH v2 1/3] " mengdong.lin
2015-04-28 12:59   ` Takashi Iwai
2015-04-28 15:03     ` Lin, Mengdong
2015-04-28 12:43 ` mengdong.lin [this message]
2015-04-28 12:43 ` [PATCH v2 3/3] ALSA: hda - implement a refcount for i915 power well switch mengdong.lin
2015-04-28 13:01   ` Takashi Iwai
2015-04-28 15:09     ` Lin, Mengdong

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=1430224990-22229-1-git-send-email-mengdong.lin@intel.com \
    --to=mengdong.lin@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