ALSA: hda/generic - Check power state cap at updating the widget power
authorTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2015 08:18:31 +0000 (10:18 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2015 08:33:16 +0000 (10:33 +0200)
The new widget power-saving tries to apply the power change no matter
whether the node has a power cap or not.  It's bad (although most of
codecs chip just ignore it).  Check the capability properly
beforehand.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_generic.c

index 1f2ca7be146860d015608ad6dea1af8938d3a8a1..afc6b1b0898cabeba1b8eaca292bfd2fd217925c 100644 (file)
@@ -832,6 +832,8 @@ static hda_nid_t path_power_update(struct hda_codec *codec,
 
        for (i = 0; i < path->depth; i++) {
                nid = path->path[i];
+               if (!(get_wcaps(codec, nid) & AC_WCAP_POWER))
+                       continue;
                if (nid == codec->core.afg)
                        continue;
                if (!allow_powerdown || is_active_nid_for_any(codec, nid))