Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 339876d7 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Clear the power-saving states properly at reset



Some power-saving states have been left unchanged in
snd_hda_codec_reset(), and this is a potential danger because the
function may be called in various situations including the continuous
operation after that call.

Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 7f30830b
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2265,6 +2265,9 @@ int snd_hda_codec_reset(struct hda_codec *codec)

#ifdef CONFIG_SND_HDA_POWER_SAVE
	cancel_delayed_work(&codec->power_work);
	codec->power_on = 0;
	codec->power_transition = 0;
	codec->power_jiffies = jiffies;
	flush_workqueue(codec->bus->workq);
#endif
	snd_hda_ctls_clear(codec);