Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0b7a2e9c authored by Takashi Iwai's avatar Takashi Iwai Committed by Jaroslav Kysela
Browse files

[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: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarJaroslav Kysela <perex@suse.cz>
parent 9d99f312
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;
+2 −1
Original line number Diff line number Diff line
@@ -1550,6 +1550,7 @@ 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]);
	if (chip->initialized)
		snd_hda_suspend(chip->bus, state);
	azx_stop_chip(chip);
	if (chip->irq >= 0) {