summaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2012-05-08 16:57:12 +0200
committerTakashi Iwai <tiwai@suse.de>2012-05-08 18:01:01 +0200
commit339876d70a5794c0d5fe09d37827c63148d5017a (patch)
tree4893c4506f0a0279a36629349c3b8f08be605232 /sound/pci
parent7f30830b7b82e5225c38a48b387e44f3defe40e2 (diff)
downloadlinux-339876d70a5794c0d5fe09d37827c63148d5017a.tar.gz
linux-339876d70a5794c0d5fe09d37827c63148d5017a.tar.xz
linux-339876d70a5794c0d5fe09d37827c63148d5017a.zip
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 <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c3
1 files changed, 3 insertions, 0 deletions
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);