Skip to contentSkip to conversation

ASoC: rt1320: make SRAM registers readable to stop being cached

PATCH In review [email protected] 2 participants 2 messages Sep 24

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

PATCH v2 1/1 ASoC: rt1320: make SRAM registers readable to stop being cached

From: Jack Yu <[email protected]>

rt1320_volatile_register() marks the SRAM ranges 0x10000000-0x10008fff and 0x1000c000-0x1000dfff as volatile, but regmap only honors that flag for a readable register and these ranges were missing from
rt1320_readable_register(). They were therefore cached at probe and
replayed over SoundWire on every runtime resume, delaying the first PCM open after autosuspend by about a second.

Make the ranges readable so the volatile flag takes effect and the SRAM is no longer cached. Exclude 0x1000d000-0x1000d7ff from both callbacks, since rt1320_rae_load() deliberately caches that tuning-tool window.

---
 sound/soc/codecs/rt1320-sdw.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
sound/soc/codecs/rt1320-sdw.c +5 -3
index b13622e54ae0..fa89db096651 100644
@@ -890,8 +890,9 @@ static bool rt1320_readable_register(struct device *dev, unsigned int reg)
 	case 0xf01e:
 	case 0xf717 ... 0xf719:
 	case 0xf720 ... 0xf723:
-	case 0x1000cd91 ... 0x1000cd96:
-	case RT1321_PATCH_MAIN_VER ... RT1321_PATCH_BETA_VER:
+	case 0x10000000 ... 0x10008fff:
+	case 0x1000c000 ... 0x1000cfff:
+	case 0x1000d800 ... 0x1000dfff:
 	case 0x1000f008:
 	case 0x1000f021:
 	case 0x20003000 ... 0x2000300f:
@@ -996,7 +997,8 @@ static bool rt1320_volatile_register(struct device *dev, unsigned int reg)
 	case 0xf717 ... 0xf719:
 	case 0xf720 ... 0xf723:
 	case 0x10000000 ... 0x10008fff:
-	case 0x1000c000 ... 0x1000dfff:
+	case 0x1000c000 ... 0x1000cfff:
+	case 0x1000d800 ... 0x1000dfff:
 	case 0x1000f008:
 	case 0x1000f021:
 	case 0x2000300e ... 0x2000300f:
Signature · 1 line
2.55.0
maintainer
#1 lore raw
Quoted 1 line · On Thu, 24 Sep 2026 10:05:10 +0800, [email protected] wrote:

ASoC: rt1320: make SRAM registers readable to stop being cached

Applied to

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

Thanks!

[1/1] ASoC: rt1320: make SRAM registers readable to stop being cached

      https://git.kernel.org/broonie/sound/c/eb169cc54b87

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