From: Takashi Iwai Date: Tue, 8 May 2012 14:57:12 +0000 (+0200) Subject: ALSA: hda - Clear the power-saving states properly at reset X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=339876d70a5794c0d5fe09d37827c63148d5017a;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Takashi Iwai --- diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c index e134e7212cd9..8bd34320ef91 100644 --- a/sound/pci/hda/hda_codec.c +++ b/sound/pci/hda/hda_codec.c @@ -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);