]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
ALSA: hda: Explicitly permit using autosuspend if runtime PM is supported
authorRoy Spliet <nouveau@spliet.org>
Mon, 13 Apr 2020 08:20:34 +0000 (10:20 +0200)
committerStefan Bader <stefan.bader@canonical.com>
Thu, 14 May 2020 08:54:29 +0000 (10:54 +0200)
BugLink: https://bugs.launchpad.net/bugs/1878256
[ Upstream commit 3ba21113bd33d49f3c300a23fc08cf114c434995 ]

This fixes runtime PM not working after a suspend-to-RAM cycle at least for
the codec-less HDA device found on NVIDIA GPUs.

BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=207043
Signed-off-by: Roy Spliet <nouveau@spliet.org>
Link: https://lore.kernel.org/r/20200413082034.25166-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sasha Levin <sashal@kernel.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 dddfb8f7314dcb8b9f9351a530b64e4aba7e7dcc..72c714bf49f36a2d8fab3d4949034b47f686912c 100644 (file)
@@ -2417,8 +2417,10 @@ static int azx_probe_continue(struct azx *chip)
        }
 #endif /* CONFIG_PM */
        snd_hda_set_power_save(&chip->bus, val * 1000);
-       if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo)
+       if (azx_has_pm_runtime(chip) || hda->use_vga_switcheroo) {
+               pm_runtime_use_autosuspend(&pci->dev);
                pm_runtime_put_autosuspend(&pci->dev);
+       }
 
 out_free:
        if ((chip->driver_caps & AZX_DCAPS_I915_POWERWELL)