ALSA: hda - Fix lost sound due to stream_pm ops cleanup
authorTakashi Iwai <tiwai@suse.de>
Fri, 29 May 2015 07:43:29 +0000 (09:43 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 29 May 2015 07:49:01 +0000 (09:49 +0200)
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>
sound/pci/hda/patch_realtek.c
sound/pci/hda/patch_via.c

index ea3af38eee588b1a12597d489a8b617f74d6446e..4641684264653c5ef265e6f61f6ef8c26bfa5f86 100644 (file)
@@ -5729,6 +5729,7 @@ static int patch_alc269(struct hda_codec *codec)
                set_beep_amp(spec, spec->gen.mixer_nid, 0x04, HDA_INPUT);
 
        codec->patch_ops = alc_patch_ops;
+       codec->patch_ops.stream_pm = snd_hda_gen_stream_pm;
 #ifdef CONFIG_PM
        codec->patch_ops.suspend = alc269_suspend;
        codec->patch_ops.resume = alc269_resume;
index 742087ef378fd52d41ade661de996a14222b9dba..31a95cca015d4d1c34a1facff2e226b6821a5203 100644 (file)
@@ -472,6 +472,7 @@ static const struct hda_codec_ops via_patch_ops = {
        .init = via_init,
        .free = via_free,
        .unsol_event = snd_hda_jack_unsol_event,
+       .stream_pm = snd_hda_gen_stream_pm,
 #ifdef CONFIG_PM
        .suspend = via_suspend,
        .check_power_status = via_check_power_status,