Commit f600bddb authored by Shenghao Ding's avatar Shenghao Ding Committed by Takashi Iwai
Browse files

ALSA: hda/tas2781: Fix EFI name for calibration beginning with 1 instead of 0



A bug reported by one of my customers that EFI name beginning with 0
instead of 1.

Fixes: 4fe23851 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")
Signed-off-by: default avatarShenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20250827043404.644-1-shenghao-ding@ti.com


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 2c3ca8cc
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -327,8 +327,8 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
		data[offset] = i;
		offset++;
		for (j = 0; j < TASDEV_CALIB_N; ++j) {
			ret = snprintf(var8, sizeof(var8), vars[j], i);

			/* EFI name for calibration started with 1, not 0 */
			ret = snprintf(var8, sizeof(var8), vars[j], i + 1);
			if (ret < 0 || ret >= sizeof(var8) - 1) {
				dev_err(p->dev, "%s: Read %s failed\n",
					__func__, var8);