diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-05-27 08:37:19 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-05-27 08:39:27 +0200 |
commit | 49fb18972581a781658a4637de76e6069ed5964e (patch) | |
tree | 0b46b3199c7ed5bdc5374ce10b2d3c7ae28d2421 /sound/pci/hda/hda_generic.c | |
parent | 823245026ead28a244cb9df5ae79b511da128606 (diff) | |
download | op-kernel-dev-49fb18972581a781658a4637de76e6069ed5964e.zip op-kernel-dev-49fb18972581a781658a4637de76e6069ed5964e.tar.gz |
ALSA: hda - Set stream_pm ops automatically by generic parser
This allows user to test power_save_node feature via sysfs or patch
firmware even on the codecs that don't specify it. It'll also save a
few lines.
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.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 1c86787..ac0db16 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -4926,9 +4926,12 @@ int snd_hda_gen_parse_auto_config(struct hda_codec *codec, dig_only: parse_digital(codec); - if (spec->power_down_unused || codec->power_save_node) + if (spec->power_down_unused || codec->power_save_node) { if (!codec->power_filter) codec->power_filter = snd_hda_gen_path_power_filter; + if (!codec->patch_ops.stream_pm) + codec->patch_ops.stream_pm = snd_hda_gen_stream_pm; + } if (!spec->no_analog && spec->beep_nid) { err = snd_hda_attach_beep_device(codec, spec->beep_nid); |