[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 <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
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 @@
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;