]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
ALSA: hda/cs35l56: Set cal_index to the amp index
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Tue, 21 Oct 2025 10:50:21 +0000 (11:50 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 27 Oct 2025 14:07:50 +0000 (14:07 +0000)
Set cs35l56_base->cal_index to the (zero-based) amp index derived
from cirrus,dev-index property.

This is so that factory calibration data will be written to the UEFI
array in the slot equal to the amp index, for compatibility with the
Windows driver.

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20251021105022.1013685-11-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/hda/codecs/side-codecs/cs35l56_hda.c

index 03f565312459726a3d9b8565756345cf2f9e0e47..f7ba92e119578a123516a10d32fddbc02623015a 100644 (file)
@@ -1154,7 +1154,7 @@ int cs35l56_hda_common_probe(struct cs35l56_hda *cs35l56, int hid, int id)
        }
 
        cs35l56->base.type = hid & 0xff;
-       cs35l56->base.cal_index = -1;
+       cs35l56->base.cal_index = cs35l56->index;
 
        cs35l56_init_cs_dsp(&cs35l56->base, &cs35l56->cs_dsp);
        cs35l56->cs_dsp.client_ops = &cs35l56_hda_client_ops;