Skip to content

Commit f600bdd

Browse files
Shenghao-Dingtiwai
authored andcommitted
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: 4fe2385 ("ALSA: hda/tas2781: Move and unified the calibrated-data getting function for SPI and I2C into the tas2781_hda lib") Signed-off-by: Shenghao Ding <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Takashi Iwai <[email protected]>
1 parent 2c3ca8c commit f600bdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sound/hda/codecs/side-codecs/tas2781_hda_i2c.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
327327
data[offset] = i;
328328
offset++;
329329
for (j = 0; j < TASDEV_CALIB_N; ++j) {
330-
ret = snprintf(var8, sizeof(var8), vars[j], i);
331-
330+
/* EFI name for calibration started with 1, not 0 */
331+
ret = snprintf(var8, sizeof(var8), vars[j], i + 1);
332332
if (ret < 0 || ret >= sizeof(var8) - 1) {
333333
dev_err(p->dev, "%s: Read %s failed\n",
334334
__func__, var8);

0 commit comments

Comments
 (0)