diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-05-29 03:43:29 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-05-29 03:49:01 -0400 |
commit | b47eee2e0a7de623c24dbcaf303c3bf2b5155455 (patch) | |
tree | 6f3da42b1bf85d4e20223d342b1bf77e23029ea3 | |
parent | b40eda6408e94ee286cb5720cd3f409f70e01778 (diff) |
ALSA: hda - Fix lost sound due to stream_pm ops cleanup
The commit [49fb18972581: ALSA: hda - Set stream_pm ops automatically
by generic parser] resulted in regressions on some Realtek and VIA
codecs because these drivers set patch_ops after calling the generic
parser, thus stream_pm got cleared to NULL again. I haven't noticed
since I tested with IDT codec.
Restore (partial revert) the stream_pm ops for them to fix the
regression.
Fixes: 49fb18972581 ('ALSA: hda - Set stream_pm ops automatically by generic parser')
Reported-by: Jeremiah Mahler <jmmahler@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
-rw-r--r-- | sound/pci/hda/patch_realtek.c | 1 | ||||
-rw-r--r-- | sound/pci/hda/patch_via.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index ea3af38eee58..464168426465 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c | |||
@@ -5729,6 +5729,7 @@ static int patch_alc269(struct hda_codec *codec) | |||
5729 | set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); | 5729 | set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT); |
5730 | 5730 | ||
5731 | codec->patch_ops = alc_patch_ops; | 5731 | codec->patch_ops = alc_patch_ops; |
5732 | codec->patch_ops.stream_pm = snd_hda_gen_stream_pm; | ||
5732 | #ifdef CONFIG_PM | 5733 | #ifdef CONFIG_PM |
5733 | codec->patch_ops.suspend = alc269_suspend; | 5734 | codec->patch_ops.suspend = alc269_suspend; |
5734 | codec->patch_ops.resume = alc269_resume; | 5735 | codec->patch_ops.resume = alc269_resume; |
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c index 742087ef378f..31a95cca015d 100644 --- a/sound/pci/hda/patch_via.c +++ b/sound/pci/hda/patch_via.c | |||
@@ -472,6 +472,7 @@ 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, | ||
475 | #ifdef CONFIG_PM | 476 | #ifdef CONFIG_PM |
476 | .suspend = via_suspend, | 477 | .suspend = via_suspend, |
477 | .check_power_status = via_check_power_status, | 478 | .check_power_status = via_check_power_status, |