• Mengdong Lin's avatar
    ALSA: hda - divide controller and codec dependency on i915 gfx power well · 795614dd
    Mengdong Lin authored
    This patch can improve power saving for Intel platforms on which only the
    display audio codec is in the shared i915 power well:
    
    - Add a flag "need_i915_power" to indicate whether the controller needs the
      i915 power well.
    
    - The driver will always request the i915 power when probing the controller
      and codecs if AZX_DCAPS_I915_POWERWELL is set (either the controller or a
      codec needs this power).
    
    - If the controller needs the i915 power, the power will be held after probe
      until the controller is runtime suspended or S3. If the controller doesn't
      need the power, the power will be released the after probe, and a codec
      that needs the power can request/release the power via bus link_power ops.
    
    Background:
    - For Haswell/Broadwell, which has a separate HD-A controller for display audio,
      both the controller and the display codec are in the i915 power well.
    
    - For Baytrail/Braswell, the display and analog audio share the same HDA
      controller and link, and only the display codec is in the i915 power well.
    
    - For Skylake, the display and analog audio share the same HDA controller but
      use separate links. Only the display codec is in the i915 power well. And in
      legacy mode we take the two links as one. So it can follow Baytrail/Braswell.
    Signed-off-by: default avatarMengdong Lin <mengdong.lin@intel.com>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    795614dd
hda_intel.c 60.5 KB