Commit df69c9be authored by Shenghao Ding's avatar Shenghao Ding Committed by Hubert Mazur
Browse files

UPSTREAM: ASoC: tas2781: Fix calibration issue in stress test



One specific test condition: the default registers of p[j].reg ~
p[j+3].reg are 0, TASDEVICE_REG(0x00, 0x14, 0x38)(PLT_FLAG_REG),
TASDEVICE_REG(0x00, 0x14, 0x40)(SINEGAIN_REG), and
TASDEVICE_REG(0x00, 0x14, 0x44)(SINEGAIN2_REG). After first calibration,
they are freshed to TASDEVICE_REG(0x00, 0x1a, 0x20), TASDEVICE_REG(0x00,
0x16, 0x58)(PLT_FLAG_REG), TASDEVICE_REG(0x00, 0x14, 0x44)(SINEGAIN_REG),
and TASDEVICE_REG(0x00, 0x16, 0x64)(SINEGAIN2_REG) via "Calibration Start"
kcontrol. In second calibration, the p[j].reg ~ p[j+3].reg have already
become tas2781_cali_start_reg. However, p[j+2].reg, TASDEVICE_REG(0x00,
0x14, 0x44)(SINEGAIN_REG), will be freshed to TASDEVICE_REG(0x00, 0x16,
0x64), which is the third register in the input params of the kcontrol.
This is why only first calibration can work, the second-time, third-time
or more-time calibration always failed without reboot. Of course, if no
p[j].reg is in the list of tas2781_cali_start_reg, this stress test can
work well.

Fixes: 49e2e353 ("ASoC: tas2781: Add Calibration Kcontrols for Chromebook")
Signed-off-by: default avatarShenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20241211043859.1328-1-shenghao-ding@ti.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
(cherry picked from commit 2aa13da9)

BUG=b:357753807
TEST=emerge-rauru sys-kernel/chromeos-kernel-6_6

Change-Id: I5d652232df3c9fc20ffb929a5a482fa1d0b5c711
Signed-off-by: default avatarFei Shao <fshao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/6170489


Reviewed-by: default avatarSean Paul <sean@poorly.run>
Commit-Queue: Yu-Che Cheng <giver@chromium.org>
Reviewed-by: default avatarYu-Che Cheng <giver@chromium.org>
Signed-off-by: default avatarHubert Mazur <hmazur@google.com>
parent 0c9b7ccd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment