ASoC: tas2781: Optimize calibration to avoid full device reboot after calibration

Some clients have specified a new requirement: complete device restarts
should be avoided after calibration. Only a hot boot of the Smart Audio
Amplifier is required.

Signed-off-by: Shenghao Ding <shenghao-ding@ti.com>
Link: https://patch.msgid.link/20260724102543.2067-1-shenghao-ding@ti.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Shenghao Ding 2026-07-24 18:25:43 +08:00 committed by Mark Brown
parent 088c4404b3
commit df3bdb5533
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -617,6 +617,7 @@ static int tasdev_calib_stop_put(struct snd_kcontrol *kcontrol,
{
struct snd_soc_component *comp = snd_kcontrol_chip(kcontrol);
struct tasdevice_priv *priv = snd_soc_component_get_drvdata(comp);
int i;
guard(mutex)(&priv->codec_lock);
if (priv->chip_id == TAS2563)
@ -624,6 +625,14 @@ static int tasdev_calib_stop_put(struct snd_kcontrol *kcontrol,
else
tas2781_calib_stop_put(priv);
/*
* Set reloading-firmware flag after calibration, the flag will work
* during next playback, then set to the program id after reloading
* firmware.
*/
for (i = 0; i < priv->ndev; i++)
priv->tasdevice[i].cur_prog = -1;
return 1;
}