ALSA: hda - Fix leftover codec->power_transition
authorTakashi Iwai <tiwai@suse.de>
Mon, 20 Aug 2012 19:25:22 +0000 (21:25 +0200)
committerTakashi Iwai <tiwai@suse.de>
Mon, 20 Aug 2012 19:25:22 +0000 (21:25 +0200)
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.

Cc: <stable@vger.kernel.org> [v3.5+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c

index c3077d5dec6e4ec80f08cb9208463c3523515ca8..f560051a949e943e10efb844364d5a978a587fcd 100644 (file)
@@ -4454,6 +4454,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;
        }