Skip to content

Commit 3af4a4f

Browse files
crojewsk-inteltiwai
authored andcommitted
ALSA: hda: Fix codec device field initializan
Commit f2bd1c5 ("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 <[email protected]> Link: https://lore.kernel.org/regressions/CALFERdzKUodLsm6=Ub3g2+PxpNpPtPq3bGBLbff=eZr9_S=YVA@mail.gmail.com Fixes: f2bd1c5 ("ALSA: hda: Fix page fault in snd_hda_codec_shutdown()") Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 18d7e16 commit 3af4a4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sound/pci/hda/hda_codec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -927,7 +927,6 @@ snd_hda_codec_device_init(struct hda_bus *bus, unsigned int codec_addr,
927927
codec->depop_delay = -1;
928928
codec->fixup_id = HDA_FIXUP_ID_NOT_SET;
929929
codec->core.dev.release = snd_hda_codec_dev_release;
930-
codec->core.exec_verb = codec_exec_verb;
931930
codec->core.type = HDA_DEV_LEGACY;
932931

933932
mutex_init(&codec->spdif_mutex);
@@ -998,6 +997,7 @@ int snd_hda_codec_device_new(struct hda_bus *bus, struct snd_card *card,
998997
if (snd_BUG_ON(codec_addr > HDA_MAX_CODEC_ADDRESS))
999998
return -EINVAL;
1000999

1000+
codec->core.exec_verb = codec_exec_verb;
10011001
codec->card = card;
10021002
codec->addr = codec_addr;
10031003

0 commit comments

Comments
 (0)