From 0b7a2e9cefd7614e68520127751f76583498df6c Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 14 Aug 2007 15:18:26 +0200 Subject: [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 Signed-off-by: Jaroslav Kysela --- sound/pci/hda/hda_intel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/pci/hda/hda_intel.c') diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index e20629a2d7d..ab698336563 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); -- cgit v1.2.3