Skip to content

Commit

Permalink
ALSA: hda/generic - Make snd_hda_gen_path_power_filter() always appli…
Browse files Browse the repository at this point in the history
…cable

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>
  • Loading branch information
Takashi Iwai committed Apr 9, 2015
1 parent d5ac010 commit b6c09b3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sound/pci/hda/hda_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -4703,6 +4703,10 @@ unsigned int snd_hda_gen_path_power_filter(struct hda_codec *codec,
hda_nid_t nid,
unsigned int power_state)
{
struct hda_gen_spec *spec = codec->spec;

if (!spec->power_down_unused && !codec->power_save_node)
return power_state;
if (power_state != AC_PWRST_D0 || nid == codec->core.afg)
return power_state;
if (get_wcaps_type(get_wcaps(codec, nid)) >= AC_WID_POWER)
Expand Down

0 comments on commit b6c09b3

Please sign in to comment.