From: <jack.yu@realtek.com>
To: <broonie@kernel.org>, <lgirdwood@gmail.com>
Cc: <alsa-devel@alsa-project.org>, <lars@metafoo.de>,
<flove@realtek.com>, <oder_chiou@realtek.com>,
<shumingf@realtek.com>, <derek.fang@realtek.com>,
Jack Yu <jack.yu@realtek.com>
Subject: [PATCH] ASoC: rt1320: make SRAM registers readable to stop being cached
Date: Mon, 21 Sep 2026 15:28:47 +0800 [thread overview]
Message-ID: <20260921072847.2929865-1-jack.yu@realtek.com> (raw)
From: Jack Yu <jack.yu@realtek.com>
rt1320_volatile_register() lists the SRAM ranges 0x10000000-0x10008fff
and 0x1000c000-0x1000dfff as volatile, so they should never be cached.
But regmap only honors the volatile 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.
Add the two ranges to rt1320_readable_register() so the volatile flag
takes effect and the SRAM is no longer cached or replayed.
The removed lines are already covered by the
new 0x1000c000-0x1000dfff range, so no register loses readability.
Signed-off-by: Jack Yu <jack.yu@realtek.com>
---
sound/soc/codecs/rt1320-sdw.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/rt1320-sdw.c b/sound/soc/codecs/rt1320-sdw.c
index b13622e54ae0..6863c5ec9428 100644
--- a/sound/soc/codecs/rt1320-sdw.c
+++ b/sound/soc/codecs/rt1320-sdw.c
@@ -890,8 +890,8 @@ 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 ... 0x1000dfff:
case 0x1000f008:
case 0x1000f021:
case 0x20003000 ... 0x2000300f:
--
2.54.0
next reply other threads:[~2026-09-21 7:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 7:28 jack.yu [this message]
2026-09-21 9:10 ` [PATCH] ASoC: rt1320: make SRAM registers readable to stop being cached Mark Brown
2026-09-24 1:42 ` Jack Yu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260921072847.2929865-1-jack.yu@realtek.com \
--to=jack.yu@realtek.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=derek.fang@realtek.com \
--cc=flove@realtek.com \
--cc=lars@metafoo.de \
--cc=lgirdwood@gmail.com \
--cc=oder_chiou@realtek.com \
--cc=shumingf@realtek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.