Re: [PATCH] ALSA: hda/intel: Synchronize the module parameter values of the power_save

From: Takashi Iwai

Date: Mon Mar 02 2026 - 03:38:32 EST


On Mon, 02 Mar 2026 09:12:18 +0100,
songxiebing wrote:
>
> In set_default_power_save, if val is 0 and is not assigned to
> power_save, it leads to incorrect reading of the sys node, resulting in
> misjudgment, so modify it here.
>
> Signed-off-by: songxiebing <songxiebing@xxxxxxxxxx>

I'm afraid that this can break things in a subtle way, e.g. when there
are multiple HD-audio controllers, and only one of them is
blacklisted.

The power_save option is provided as a single knob for simplicity, in
the case if user wants to change intentionally. And this doesn't
guaranteed to be the actual power-saving timeout value that could be
adjusted also via sysfs.


thanks,

Takashi

> ---
> sound/hda/controllers/intel.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/hda/controllers/intel.c b/sound/hda/controllers/intel.c
> index 3f434994c18d..6c6564396637 100644
> --- a/sound/hda/controllers/intel.c
> +++ b/sound/hda/controllers/intel.c
> @@ -2306,6 +2306,7 @@ static void set_default_power_save(struct azx *chip)
> dev_info(chip->card->dev, "Forcing power_save to 0 via option\n");
> val = 0;
> }
> + power_save = val;
> snd_hda_set_power_save(&chip->bus, val * 1000);
> }
>
> --
> 2.25.1
>