sound/hda/controllers/intel.c | 1 + 1 file changed, 1 insertion(+)
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@kylinos.cn>
---
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
Hi songxiebing,
kernel test robot noticed the following build errors:
[auto build test ERROR on tiwai-sound/for-next]
[also build test ERROR on tiwai-sound/for-linus linus/master v7.0-rc2 next-20260304]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/songxiebing/ALSA-hda-intel-Synchronize-the-module-parameter-values-of-the-power_save/20260302-161555
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
patch link: https://lore.kernel.org/r/20260302081218.771520-1-songxiebing%40kylinos.cn
patch subject: [PATCH] ALSA: hda/intel: Synchronize the module parameter values of the power_save
config: parisc-allyesconfig (https://download.01.org/0day-ci/archive/20260305/202603052231.cdetWcMJ-lkp@intel.com/config)
compiler: hppa-linux-gcc (GCC) 15.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260305/202603052231.cdetWcMJ-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603052231.cdetWcMJ-lkp@intel.com/
All errors (new ones prefixed by >>):
sound/hda/controllers/intel.c: In function 'set_default_power_save':
>> sound/hda/controllers/intel.c:2309:20: error: lvalue required as left operand of assignment
2309 | power_save = val;
| ^
vim +2309 sound/hda/controllers/intel.c
2289
2290 static void set_default_power_save(struct azx *chip)
2291 {
2292 struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
2293 int val = power_save;
2294
2295 if (pm_blacklist < 0) {
2296 const struct snd_pci_quirk *q;
2297
2298 q = snd_pci_quirk_lookup(chip->pci, power_save_denylist);
2299 if (q && val) {
2300 dev_info(chip->card->dev, "device %04x:%04x is on the power_save denylist, forcing power_save to 0\n",
2301 q->subvendor, q->subdevice);
2302 val = 0;
2303 hda->runtime_pm_disabled = 1;
2304 }
2305 } else if (pm_blacklist > 0) {
2306 dev_info(chip->card->dev, "Forcing power_save to 0 via option\n");
2307 val = 0;
2308 }
> 2309 power_save = val;
2310 snd_hda_set_power_save(&chip->bus, val * 1000);
2311 }
2312
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi songxiebing,
kernel test robot noticed the following build errors:
[auto build test ERROR on tiwai-sound/for-next]
[also build test ERROR on tiwai-sound/for-linus linus/master v7.0-rc2 next-20260304]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/songxiebing/ALSA-hda-intel-Synchronize-the-module-parameter-values-of-the-power_save/20260302-161555
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git for-next
patch link: https://lore.kernel.org/r/20260302081218.771520-1-songxiebing%40kylinos.cn
patch subject: [PATCH] ALSA: hda/intel: Synchronize the module parameter values of the power_save
config: s390-allmodconfig (https://download.01.org/0day-ci/archive/20260305/202603051210.99ca99nW-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260305/202603051210.99ca99nW-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202603051210.99ca99nW-lkp@intel.com/
All errors (new ones prefixed by >>):
>> sound/hda/controllers/intel.c:2309:13: error: expression is not assignable
2309 | power_save = val;
| ~~~~~~~~~~ ^
1 error generated.
vim +2309 sound/hda/controllers/intel.c
2289
2290 static void set_default_power_save(struct azx *chip)
2291 {
2292 struct hda_intel *hda = container_of(chip, struct hda_intel, chip);
2293 int val = power_save;
2294
2295 if (pm_blacklist < 0) {
2296 const struct snd_pci_quirk *q;
2297
2298 q = snd_pci_quirk_lookup(chip->pci, power_save_denylist);
2299 if (q && val) {
2300 dev_info(chip->card->dev, "device %04x:%04x is on the power_save denylist, forcing power_save to 0\n",
2301 q->subvendor, q->subdevice);
2302 val = 0;
2303 hda->runtime_pm_disabled = 1;
2304 }
2305 } else if (pm_blacklist > 0) {
2306 dev_info(chip->card->dev, "Forcing power_save to 0 via option\n");
2307 val = 0;
2308 }
> 2309 power_save = val;
2310 snd_hda_set_power_save(&chip->bus, val * 1000);
2311 }
2312
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Hi Takashi, Thanks for your reply, i understand. On Mon, 02 Mar 2026 16:38:00 +0900, Takashi Iwai <tiwai@suse.com> wrote: >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@kylinos.cn> > >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
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@kylinos.cn> 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 >
© 2016 - 2026 Red Hat, Inc.