]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
ASoC: tas2781: Use correct calibration data for SINEGAIN2 register
authorwangdicheng <wangdicheng@kylinos.cn>
Mon, 20 Jul 2026 08:16:16 +0000 (16:16 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 27 Jul 2026 17:48:21 +0000 (18:48 +0100)
The SINEGAIN2_REG case in cali_reg_update() references t->sin_gn[]
rather than t->sin_gn2[], causing the second pilot tone gain
calibration to be programmed with the wrong register address.

These are distinct fields in struct fct_param_address and are
populated from separate firmware parameters by the parser in
tas2781-fmwlib.c.

Fixes: 84d6a465f211 ("ASoC: tas2781: Support dsp firmware Alpha and Beta seaies")
Signed-off-by: wangdicheng <wangdicheng@kylinos.cn>
Link: https://patch.msgid.link/20260720081616.631413-1-wangdich9700@163.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/tas2781-i2c.c

index 9e6f0ad5f05dc9d187bdbb87855e52722f4f928f..209067e98e1fdf1fcc8c3ca7d7e3aa408fd75d32 100644 (file)
@@ -1310,8 +1310,8 @@ static void cali_reg_update(struct bulk_reg_val *p,
                                t->sin_gn[2]);
                        break;
                case TAS2781_PRM_SINEGAIN2_REG:
-                       reg = TASDEVICE_REG(t->sin_gn[0], t->sin_gn[1],
-                               t->sin_gn[2]);
+                       reg = TASDEVICE_REG(t->sin_gn2[0], t->sin_gn2[1],
+                               t->sin_gn2[2]);
                        break;
                default:
                        reg = 0;