diff options
author | Takashi Iwai <tiwai@suse.de> | 2024-07-29 16:15:16 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2024-07-30 07:45:49 +0200 |
commit | 8abe0423ddd3ca7b9cea09c0a39249f65e646768 (patch) | |
tree | 1cff2583d27904ac77241242a458c69853e2c002 /sound/pci | |
parent | 0642a3c5cacc0321c755d45ae48f2c84475469a6 (diff) |
ALSA: hda: Keep PM disablement for deny-listed instance
We have a runtime PM deny-list for the devices that show the problems
(typically click noises) at runtime suspend/resume, and when it
matches, the driver disables the default runtime PM. However, we
still allow the runtime PM changed via power_save module option
dynamically, and the desktop system often tweaks it. This ended up
with a re-enablement of the runtime PM that surprises users, suddenly
suffering from the noises.
This patch changes the driver behavior slightly: when the device is
listed in the deny-list, ignore the power_save option change and keep
the original (that is, off) runtime PM state.
Link: https://patch.msgid.link/20240729141519.18398-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r-- | sound/pci/hda/hda_intel.c | 5 | ||||
-rw-r--r-- | sound/pci/hda/hda_intel.h | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index b33602e64d17..440f1b37e071 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -933,7 +933,8 @@ static int __maybe_unused param_set_xint(const char *val, const struct kernel_pa mutex_lock(&card_list_lock); list_for_each_entry(hda, &card_list, list) { chip = &hda->chip; - if (!hda->probe_continued || chip->disabled) + if (!hda->probe_continued || chip->disabled || + hda->runtime_pm_disabled) continue; snd_hda_set_power_save(&chip->bus, power_save * 1000); } @@ -2243,6 +2244,7 @@ static const struct snd_pci_quirk power_save_denylist[] = { static void set_default_power_save(struct azx *chip) { + struct hda_intel *hda = container_of(chip, struct hda_intel, chip); int val = power_save; if (pm_blacklist) { @@ -2253,6 +2255,7 @@ static void set_default_power_save(struct azx *chip) dev_info(chip->card->dev, "device %04x:%04x is on the power_save denylist, forcing power_save to 0\n", q->subvendor, q->subdevice); val = 0; + hda->runtime_pm_disabled = 1; } } snd_hda_set_power_save(&chip->bus, val * 1000); diff --git a/sound/pci/hda/hda_intel.h b/sound/pci/hda/hda_intel.h index 0f39418f9328..2d1725f86ef1 100644 --- a/sound/pci/hda/hda_intel.h +++ b/sound/pci/hda/hda_intel.h @@ -22,6 +22,7 @@ struct hda_intel { /* extra flags */ unsigned int irq_pending_warned:1; unsigned int probe_continued:1; + unsigned int runtime_pm_disabled:1; /* vga_switcheroo setup */ unsigned int use_vga_switcheroo:1; |