ALSA: hda/generic - Don't override power_filter when power_save_node is set
authorTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2015 08:28:15 +0000 (10:28 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 9 Apr 2015 08:34:00 +0000 (10:34 +0200)
Currently the generic parser sets codec->power_filter when
power_save_node flag is set.  But this overrides the existing filter
that has been already set by the codec driver, thus it looses some
features.  Instead, set the default power_filter only when it's not
set yet.

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

index f0475a19fad747b41edcf200235b1a3e38ab779a..3d2597b7037bbc9c5a74faeeae035f5c5bd70f76 100644 (file)
@@ -4918,7 +4918,8 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec,
        parse_digital(codec);
 
        if (spec->power_down_unused || codec->power_save_node)
-               codec->power_filter = snd_hda_gen_path_power_filter;
+               if (!codec->power_filter)
+                       codec->power_filter = snd_hda_gen_path_power_filter;
 
        if (!spec->no_analog && spec->beep_nid) {
                err = snd_hda_attach_beep_device(codec, spec->beep_nid);