Linux Sound subsystem development
 help / color / mirror / Atom feed
* [PATCH] ASoC: rt1320: avoid re-initialize in advanced mode
@ 2026-09-09  9:18 shumingf
  2026-09-09 11:27 ` Pierre-Louis Bossart
  2026-09-09 17:54 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: shumingf @ 2026-09-09  9:18 UTC (permalink / raw)
  To: broonie, lgirdwood
  Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang,
	Shuming Fan

From: Shuming Fan <shumingf@realtek.com>

On some machines, speaker protection is enabled.
We call this advanced mode, which loads the DSP firmware and changes settings
based on the basic mode, including blind writes.
The amplifier can retain the advanced mode settings until a POR or power loss occurs.
Therefore, the driver does not need to switch from basic mode to advanced mode
when the system performs a warm reboot.
We only need to check the function_status to determine
whether the system has undergone a cold or warm reboot.

Fixes: 9b30521074f0 ("ASoC: rt1320: run the initialisation preset on the first hardware init")
Signed-off-by: Shuming Fan <shumingf@realtek.com>
---
 sound/soc/codecs/rt1320-sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index 72af413306fa..444a91755be9 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -2470,7 +2470,7 @@ static int rt1320_io_init(struct device *dev, struct sdw_slave *slave)
 	dev_dbg(dev, "%s amp func_status=0x%x\n", __func__, amp_func_status);
 
 	/* initialization write */
-	if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION) || !rt1320->first_hw_init) {
+	if ((amp_func_status & FUNCTION_NEEDS_INITIALIZATION)) {
 		switch (rt1320->dev_id) {
 		case RT1320_DEV_ID:
 			if (rt1320->version_id < RT1320_VC)
-- 
2.54.0


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

end of thread, other threads:[~2026-09-10 19:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09  9:18 [PATCH] ASoC: rt1320: avoid re-initialize in advanced mode shumingf
2026-09-09 11:27 ` Pierre-Louis Bossart
2026-09-09 17:54 ` Mark Brown

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