* [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* Re: [PATCH] ASoC: rt1320: avoid re-initialize in advanced mode
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
1 sibling, 0 replies; 3+ messages in thread
From: Pierre-Louis Bossart @ 2026-09-09 11:27 UTC (permalink / raw)
To: shumingf, broonie, lgirdwood
Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang
On 9/9/26 11:18, shumingf@realtek.com wrote:
> 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>
LGTM
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>
this should also be done for all existing SDCA devices, no?
> ---
> 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)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] ASoC: rt1320: avoid re-initialize in advanced mode
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
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2026-09-09 17:54 UTC (permalink / raw)
To: lgirdwood, shumingf
Cc: linux-sound, lars, flove, oder_chiou, jack.yu, derek.fang
On Wed, 09 Sep 2026 17:18:06 +0800, shumingf@realtek.com 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
^ permalink raw reply [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