Skip to contentSkip to conversation

ASoC: rt1320: avoid re-initialize in advanced mode

PATCH In review [email protected] 3 participants 3 messages Sep 9 – Sep 10

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: rt1320: avoid re-initialize in advanced mode

From: Shuming Fan <[email protected]>

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")
---
 sound/soc/codecs/rt1320-sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt1320-sdw.c +1 -1
index 72af413306fa..444a91755be9 100644
@@ -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)
Signature · 1 line
2.54.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · On 9/9/26 11:18, [email protected] wrote:

From: Shuming Fan <[email protected]>

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.

Quoted 2 lines
Fixes 9b30521074f0 ("ASoC: rt1320: run the initialisation preset on the first hardware init")

LGTM

this should also be done for all existing SDCA devices, no?

Quoted 17 lines
---
 sound/soc/codecs/rt1320-sdw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/codecs/rt1320-sdw.c +1 -1
index 72af413306fa..444a91755be9 100644
@@ -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)
maintainer
#2 lore raw
In reply to [email protected]
Quoted 1 line · On Wed, 09 Sep 2026 17:18:06 +0800, [email protected] wrote:

ASoC: rt1320: avoid re-initialize in advanced mode

Applied to

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.4

Thanks!

[1/1] ASoC: rt1320: avoid re-initialize in advanced mode

      https://git.kernel.org/broonie/sound/c/04c3ee0f5d15

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark