Skip to contentSkip to conversation

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

PATCH In review Shenghao Ding 2 participants 2 messages Aug 27, 2025

Subsystems (2)
lore
Share & tools
lore

Shenghao Ding

author maintainer
#0 lore raw

PATCH v3 1/1 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 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")

---
v3:
- remove unrelated change
v1:
- Fix EFI name beginning with 1 instead of 0
- Add extra comments on EFI name for calibration

---
 sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c +2 -2
index ed7771ab9475..dbd71e173119 100644
@@ -340,8 +340,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);
Signature · 1 line
2.43.0
#1 lore raw
Quoted 6 lines · Shenghao Ding

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

Fixes 4fe238513407 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib")

Applied now. Thanks.

Takashi