[PATCH 2/2] ALSA: hda/tas2781: Skip invalid TAS2563 UEFI calibration data

From: Gergo Koteles

Date: Tue Oct 13 2026 - 06:01:55 EST


Some Lenovo 14ARB7 laptops do not have proper calibration data.

Skip these zero calibration values and fall back to the calibration data
provided by the DSP firmware.

Tested-by: Georg Wenzel <g.wenzel@xxxxxxxxx>
Fixes: c3ca4458cc2f ("ALSA: hda/tas2781: add TAS2563 support for 14ARB7")
Cc: <stable@xxxxxxxxxxxxxxx> # 6.18
Signed-off-by: Gergo Koteles <soyer@xxxxxx>
---
sound/hda/codecs/side-codecs/tas2781_hda_i2c.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
index f1329bb6adcd..53d9c101b421 100644
--- a/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
+++ b/sound/hda/codecs/side-codecs/tas2781_hda_i2c.c
@@ -371,6 +371,11 @@ static int tas2563_save_calibration(struct tas2781_hda *h)
i, j, status);
return -EINVAL;
}
+ if (*(uint32_t *)&data[offset] == 0) {
+ dev_warn(p->dev,
+ "Dev %d: Caldat[%d] is zero\n", i, j);
+ return -EINVAL;
+ }
bedata = cpu_to_be32(*(uint32_t *)&data[offset]);
memcpy(&data[offset], &bedata, sizeof(bedata));
offset += TAS2563_CAL_DATA_SIZE;
--
2.56.0