OSDN Git Service

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)
committerTakashi Iwai <tiwai@suse.de>
Mon, 13 Apr 2020 16:03:29 +0000 (18:03 +0200)
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>
sound/pci/hda/hda_intel.c

index 02c6308..8519051 100644 (file)
@@ -2354,8 +2354,10 @@ static int azx_probe_continue(struct azx *chip)
 
        set_default_power_save(chip);
 
-       if (azx_has_pm_runtime(chip))
+       if (azx_has_pm_runtime(chip)) {
+               pm_runtime_use_autosuspend(&pci->dev);
                pm_runtime_put_autosuspend(&pci->dev);
+       }
 
 out_free:
        if (err < 0) {