aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_generic.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-04-09 04:25:03 -0400
committerTakashi Iwai <tiwai@suse.de>2015-04-09 04:33:53 -0400
commitb6c09b3c7b54743cbc58af8c27bbae8299c4f8cc (patch)
tree7e181550419c398fa9e8964c0a0c436f2a88e34e /sound/pci/hda/hda_generic.c
parentd5ac0100a9027bdf488cf20247b1041f26f796f3 (diff)
ALSA: hda/generic - Make snd_hda_gen_path_power_filter() always applicable
Add the check of power_save_node flag at the beginning of the function so that it skips the rest if the flag isn't set. In this way, we can call this function safely no matter whether the widget power-saving is really used or not. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r--sound/pci/hda/hda_generic.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index 46b559832d2c..f0475a19fad7 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -4703,6 +4703,10 @@ unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec,
4703 hda_nid_t nid, 4703 hda_nid_t nid,
4704 unsigned int power_state) 4704 unsigned int power_state)
4705{ 4705{
4706 struct hda_gen_spec *spec = codec->spec;
4707
4708 if (!spec->power_down_unused && !codec->power_save_node)
4709 return power_state;
4706 if (power_state != AC_PWRST_D0 || nid == codec->core.afg) 4710 if (power_state != AC_PWRST_D0 || nid == codec->core.afg)
4707 return power_state; 4711 return power_state;
4708 if (get_wcaps_type(get_wcaps(codec, nid)) >= AC_WID_POWER) 4712 if (get_wcaps_type(get_wcaps(codec, nid)) >= AC_WID_POWER)