ALSA: hda: Fix codec device field initializan
authorCezary Rojewski <cezary.rojewski@intel.com>
Fri, 10 Feb 2023 16:55:41 +0000 (17:55 +0100)
committerTakashi Iwai <tiwai@suse.de>
Sat, 11 Feb 2023 08:36:16 +0000 (09:36 +0100)
commit3af4a4f7a20c94009adba65764fa5a0269d70a82
treefbe8653eb82b0a78e6fb82fae0c8d7e46f2f9aec
parent18d7e16c917a08f08778ecf2b780d63648d5d923
ALSA: hda: Fix codec device field initializan

Commit f2bd1c5ae2cb ("ALSA: hda: Fix page fault in
snd_hda_codec_shutdown()") relocated initialization of several codec
device fields. Due to differences between codec_exec_verb() and
snd_hdac_bus_exec_bus() in how they handle VERB execution - the latter
does not touch PM - assigning ->exec_verb to codec_exec_verb() causes PM
to be engaged before it is configured for the device. Configuration of
PM for the ASoC HDAudio sound card is done with snd_hda_set_power_save()
during skl_hda_audio_probe() whereas the assignment happens early, in
snd_hda_codec_device_init().

Revert to previous behavior to avoid problems caused by too early PM
manipulation.

Suggested-by: Jason Montleon <jmontleo@redhat.com>
Link: https://lore.kernel.org/regressions/CALFERdzKUodLsm6=Ub3g2+PxpNpPtPq3bGBLbff=eZr9_S=YVA@mail.gmail.com
Fixes: f2bd1c5ae2cb ("ALSA: hda: Fix page fault in snd_hda_codec_shutdown()")
Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20230210165541.3543604-1-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c