Browse Source

ALSA: hda - remove controller dependency on i915 power well for Baytrail/Braswell

For Baytrail (Valleyview) and Braswell (Cherryview), only the HDMI codec is
in the display power well while the HD-A controller isn't. So the controller
flag 'need_i915_power' is not set to release the display power after probe,
and the codec flag 'link_power_control" is set to request/release the display
power via bus link_power ops.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Mengdong Lin 10 years ago
parent
commit
2bd1f73f42
2 changed files with 13 additions and 2 deletions
  1. 4 2
      sound/pci/hda/hda_intel.c
  2. 9 0
      sound/pci/hda/patch_hdmi.c

+ 4 - 2
sound/pci/hda/hda_intel.c

@@ -1900,8 +1900,10 @@ static int azx_probe_continue(struct azx *chip)
 	 * display codec needs the power and it can be released after probe.
 	 * display codec needs the power and it can be released after probe.
 	 */
 	 */
 	if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
 	if (chip->driver_caps & AZX_DCAPS_I915_POWERWELL) {
-		/* Assume the controller needs the power by default */
-		hda->need_i915_power = 1;
+		/* Baytral/Braswell controllers don't need this power */
+		if (pci->device != 0x0f04 && pci->device != 0x2284)
+			hda->need_i915_power = 1;
+
 
 
 #ifdef CONFIG_SND_HDA_I915
 #ifdef CONFIG_SND_HDA_I915
 		err = hda_i915_init(hda);
 		err = hda_i915_init(hda);

+ 9 - 0
sound/pci/hda/patch_hdmi.c

@@ -2335,6 +2335,15 @@ static int patch_generic_hdmi(struct hda_codec *codec)
 		intel_haswell_fixup_enable_dp12(codec);
 		intel_haswell_fixup_enable_dp12(codec);
 	}
 	}
 
 
+	/* For Valleyview/Cherryview, only the display codec is in the display
+	 * power well and can use link_power ops to request/release the power.
+	 * For Haswell/Broadwell, the controller is also in the power well and
+	 * can cover the 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.link_power_control = 1;
+
 	if (is_haswell_plus(codec) || is_valleyview_plus(codec))
 	if (is_haswell_plus(codec) || is_valleyview_plus(codec))
 		codec->depop_delay = 0;
 		codec->depop_delay = 0;