]> git.hungrycats.org Git - linux/commitdiff
ALSA: hda - Fix leftover codec->power_transition
authorTakashi Iwai <tiwai@suse.de>
Mon, 20 Aug 2012 19:25:22 +0000 (21:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Sep 2012 16:59:24 +0000 (09:59 -0700)
commit 535b6c51fe8293c88ce919cdfc4390c67a1cb6d1 upstream.

When the codec turn-on operation is canceled by the immediate
power-on, the driver left the power_transition flag as is.
This caused the persistent avoidance of power-save behavior.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
sound/pci/hda/hda_codec.c

index 4e17033fd2345e3fa294eb2b0edff5919a863b88..c0fa6293c4991172c586d64ad5bf285bc185ec8c 100644 (file)
@@ -4422,6 +4422,8 @@ static void __snd_hda_power_up(struct hda_codec *codec, bool wait_power_down)
         * then there is no need to go through power up here.
         */
        if (codec->power_on) {
+               if (codec->power_transition < 0)
+                       codec->power_transition = 0;
                spin_unlock(&codec->power_lock);
                return;
        }