[ALSA] hda-intel - Fix resume with power save
authorTakashi Iwai <tiwai@suse.de>
Mon, 13 Aug 2007 13:29:04 +0000 (15:29 +0200)
committerJaroslav Kysela <perex@perex.cz>
Tue, 16 Oct 2007 13:58:49 +0000 (15:58 +0200)
The controller power wasn't turned on properly at resume due to the
power-saving patch.  Now fixed.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_intel.c

index 9a3b72824f87c093519ac09b5924f8fb3d9cd1ec..efd56a3396bda0946bfcac2b8e2c4c18b273ea51 100644 (file)
@@ -1662,6 +1662,7 @@ static void hda_call_codec_suspend(struct hda_codec *codec)
                            AC_PWRST_D3);
 #ifdef CONFIG_SND_HDA_POWER_SAVE
        cancel_delayed_work(&codec->power_work);
+       codec->power_on = 0;
 #endif
 }
 
@@ -2195,7 +2196,6 @@ static void hda_power_work(struct work_struct *work)
                return;
 
        hda_call_codec_suspend(codec);
-       codec->power_on = 0;
        if (codec->bus->ops.pm_notify)
                codec->bus->ops.pm_notify(codec);
 }
index 7be3a9b55330bcc25e3e217304610b7d4e5ce4cc..f9c7c2e4f922ce8aed8ab33d6ad707dc22dd8566 100644 (file)
@@ -1500,7 +1500,7 @@ static int azx_acquire_irq(struct azx *chip, int do_disconnect)
 
 static void azx_stop_chip(struct azx *chip)
 {
-       if (chip->initialized)
+       if (!chip->initialized)
                return;
 
        /* disable interrupts */