diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-05-27 02:37:19 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-05-27 02:39:27 -0400 |
commit | 49fb18972581a781658a4637de76e6069ed5964e (patch) | |
tree | 0b46b3199c7ed5bdc5374ce10b2d3c7ae28d2421 /sound | |
parent | 823245026ead28a244cb9df5ae79b511da128606 (diff) |
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')
-rw-r--r-- | sound/pci/hda/hda_generic.c | 5 | ||||
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_sigmatel.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 1 |
4 files changed, 4 insertions, 4 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 1c8678775f40..ac0db1679f09 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, | |||
4926 | dig_only: | 4926 | dig_only: |
4927 | parse_digital(codec); | 4927 | parse_digital(codec); |
4928 | 4928 | ||
4929 | if (spec->power_down_unused || codec->power_save_node) | 4929 | if (spec->power_down_unused || codec->power_save_node) { |
4930 | if (!codec->power_filter) | 4930 | if (!codec->power_filter) |
4931 | codec->power_filter = snd_hda_gen_path_power_filter; | 4931 | codec->power_filter = snd_hda_gen_path_power_filter; |
4932 | if (!codec->patch_ops.stream_pm) | ||
4933 | codec->patch_ops.stream_pm = snd_hda_gen_stream_pm; | ||
4934 | } | ||
4932 | 4935 | ||
4933 | if (!spec->no_analog && spec->beep_nid) { | 4936 | if (!spec->no_analog && spec->beep_nid) { |
4934 | err = snd_hda_attach_beep_device(codec, spec->beep_nid); | 4937 | err = snd_hda_attach_beep_device(codec, spec->beep_nid); |
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index fc0ccc78bdc7..e3bf72bb278c 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5724,7 +5724,6 @@ static int patch_alc269(struct hda_codec *codec) | |||
5724 | set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); | 5724 | set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); |
5725 | 5725 | ||
5726 | codec->patch_ops = alc_patch_ops; | 5726 | codec->patch_ops = alc_patch_ops; |
5727 | codec->patch_ops.stream_pm = snd_hda_gen_stream_pm; | ||
5728 | #ifdef CONFIG_PM | 5727 | #ifdef CONFIG_PM |
5729 | codec->patch_ops.suspend = alc269_suspend; | 5728 | codec->patch_ops.suspend = alc269_suspend; |
5730 | codec->patch_ops.resume = alc269_resume; | 5729 | codec->patch_ops.resume = alc269_resume; |
diff --git a/sound/pci/hda/patch_sigmatel.c b/sound/pci/hda/patch_sigmatel.c index 43c99ce4a520..0de0fd95144a 100644 --- a/sound/pci/hda/patch_sigmatel.c +++ b/sound/pci/hda/patch_sigmatel.c | |||
@@ -4403,7 +4403,6 @@ static const struct hda_codec_ops stac_patch_ops = { | |||
4403 | #ifdef CONFIG_PM | 4403 | #ifdef CONFIG_PM |
4404 | .suspend = stac_suspend, | 4404 | .suspend = stac_suspend, |
4405 | #endif | 4405 | #endif |
4406 | .stream_pm = snd_hda_gen_stream_pm, | ||
4407 | .reboot_notify = stac_shutup, | 4406 | .reboot_notify = stac_shutup, |
4408 | }; | 4407 | }; |
4409 | 4408 | ||
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 31a95cca015d..742087ef378f 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -472,7 +472,6 @@ static const struct hda_codec_ops via_patch_ops = { | |||
472 | .init = via_init, | 472 | .init = via_init, |
473 | .free = via_free, | 473 | .free = via_free, |
474 | .unsol_event = snd_hda_jack_unsol_event, | 474 | .unsol_event = snd_hda_jack_unsol_event, |
475 | .stream_pm = snd_hda_gen_stream_pm, | ||
476 | #ifdef CONFIG_PM | 475 | #ifdef CONFIG_PM |
477 | .suspend = via_suspend, | 476 | .suspend = via_suspend, |
478 | .check_power_status = via_check_power_status, | 477 | .check_power_status = via_check_power_status, |