diff options
author | Takashi Iwai <tiwai@suse.de> | 2012-05-08 10:57:12 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2012-05-08 12:01:01 -0400 |
commit | 339876d70a5794c0d5fe09d37827c63148d5017a (patch) | |
tree | 4893c4506f0a0279a36629349c3b8f08be605232 /sound/pci/hda/hda_codec.c | |
parent | 7f30830b7b82e5225c38a48b387e44f3defe40e2 (diff) |
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/hda/hda_codec.c')
-rw-r--r-- | sound/pci/hda/hda_codec.c | 3 |
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) | |||
2265 | 2265 | ||
2266 | #ifdef CONFIG_SND_HDA_POWER_SAVE | 2266 | #ifdef CONFIG_SND_HDA_POWER_SAVE |
2267 | cancel_delayed_work(&codec->power_work); | 2267 | cancel_delayed_work(&codec->power_work); |
2268 | codec->power_on = 0; | ||
2269 | codec->power_transition = 0; | ||
2270 | codec->power_jiffies = jiffies; | ||
2268 | flush_workqueue(codec->bus->workq); | 2271 | flush_workqueue(codec->bus->workq); |
2269 | #endif | 2272 | #endif |
2270 | snd_hda_ctls_clear(codec); | 2273 | snd_hda_ctls_clear(codec); |