Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0b7a2e9cefd7614e68520127751f76583498df6c
Commit:     0b7a2e9cefd7614e68520127751f76583498df6c
Parent:     9d99f312629802f4c45306ee07618ee4978b4adc
Author:     Takashi Iwai <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 14 15:18:26 2007 +0200
Committer:  Jaroslav Kysela <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 15:58:55 2007 +0200

    [ALSA] hda-intel - Don't do suspend if already powered down
    
    In the power-saving mode, the suspend is done dynamically at power-down.
    So we don't have to call suspend stuff explicitly if it's already
    powered down.
    
    Signed-off-by: Takashi Iwai <[EMAIL PROTECTED]>
    Signed-off-by: Jaroslav Kysela <[EMAIL PROTECTED]>
---
 sound/pci/hda/hda_codec.c |    4 ++++
 sound/pci/hda/hda_intel.c |    3 ++-
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index fc1ddf4..0e923f3 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -2771,6 +2771,10 @@ int snd_hda_suspend(struct hda_bus *bus, pm_message_t 
state)
        struct hda_codec *codec;
 
        list_for_each_entry(codec, &bus->codec_list, list) {
+#ifdef CONFIG_SND_HDA_POWER_SAVE
+               if (!codec->power_on)
+                       continue;
+#endif
                hda_call_codec_suspend(codec);
        }
        return 0;
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e20629a..ab69833 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1550,7 +1550,8 @@ static int azx_suspend(struct pci_dev *pci, pm_message_t 
state)
        snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
        for (i = 0; i < chip->pcm_devs; i++)
                snd_pcm_suspend_all(chip->pcm[i]);
-       snd_hda_suspend(chip->bus, state);
+       if (chip->initialized)
+               snd_hda_suspend(chip->bus, state);
        azx_stop_chip(chip);
        if (chip->irq >= 0) {
                synchronize_irq(chip->irq);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to