Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH v1] ASoC: tas2781: Optimize calibration to avoid full device reboot after calibration
@ 2026-07-24 10:25 Shenghao Ding
  2026-07-30 16:40 ` Mark Brown
  2026-07-30 16:41 ` Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Shenghao Ding @ 2026-07-24 10:25 UTC (permalink / raw)
  To: broonie
  Cc: andriy.shevchenko, tiwai, 13916275206, perex, lgirdwood,
	linux-sound, baojun.xu, k-lu, Shenghao Ding

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>
---
 sound/soc/codecs/tas2781-i2c.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/tas2781-i2c.c b/sound/soc/codecs/tas2781-i2c.c
index 9e6f0ad5f05d..8eb9ead2951e 100644
--- a/sound/soc/codecs/tas2781-i2c.c
+++ b/sound/soc/codecs/tas2781-i2c.c
@@ -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;
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-31  0:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 10:25 [PATCH v1] ASoC: tas2781: Optimize calibration to avoid full device reboot after calibration Shenghao Ding
2026-07-30 16:40 ` Mark Brown
2026-07-31  0:34   ` Ding, Shenghao
2026-07-30 16:41 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox