]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ALSA: hda: Re-add dropped snd_poewr_change_state() calls
authorTakashi Iwai <tiwai@suse.de>
Mon, 29 Mar 2021 11:30:58 +0000 (13:30 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 23 Apr 2021 09:58:35 +0000 (11:58 +0200)
BugLink: https://bugs.launchpad.net/bugs/1923869
commit c8f79808cd8eb5bc8d14de129bd6d586d3fce0aa upstream.

The card power state change via snd_power_change_state() at the system
suspend/resume seems dropped mistakenly during the PM code rewrite.
The card power state doesn't play much role nowadays but it's still
referred in a few places such as the HDMI codec driver.

This patch restores them, but in a more appropriate place now in the
prepare and complete callbacks.

Fixes: f5dac54d9d93 ("ALSA: hda: Separate runtime and system suspend")
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20210329113059.25035-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
sound/pci/hda/hda_intel.c

index e2e1c1c6c758ecf7d75be21a2e6cdc1bdc518081..5fa844266ea80bd85c23cc9de0cee98ca3b30f7f 100644 (file)
@@ -1026,6 +1026,7 @@ static int azx_prepare(struct device *dev)
 
        chip = card->private_data;
        chip->pm_prepared = 1;
+       snd_power_change_state(card, SNDRV_CTL_POWER_D3hot);
 
        flush_work(&azx_bus(chip)->unsol_work);
 
@@ -1041,6 +1042,7 @@ static void azx_complete(struct device *dev)
        struct azx *chip;
 
        chip = card->private_data;
+       snd_power_change_state(card, SNDRV_CTL_POWER_D0);
        chip->pm_prepared = 0;
 }