From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
Yusuke Goda <yusuke.goda.sx@renesas.com>,
Mark Brown <broonie@kernel.org>, Sasha Levin <sashal@kernel.org>,
geert+renesas@glider.be, magnus.damm@gmail.com,
linux-sound@vger.kernel.org, linux-renesas-soc@vger.kernel.org
Subject: [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: set SIFCTR register
Date: Sat, 25 Oct 2025 11:57:14 -0400 [thread overview]
Message-ID: <20251025160905.3857885-203-sashal@kernel.org> (raw)
In-Reply-To: <20251025160905.3857885-1-sashal@kernel.org>
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
[ Upstream commit 130947b4681c515a5e5a7961244b502de2de85ca ]
Because it uses DMAC, we would like to transfer data if there is any data.
Set SIFCTR for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tested-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
Link: https://patch.msgid.link/87bjmzyuub.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
YES.
- `msiof_hw_start()` now programs the FIFO control register so the DMA
engine is serviced as soon as a slot is free/filled
(`sound/soc/renesas/rcar/msiof.c:193`). Before this change the driver
never touched `SIFCTR`, so the block stayed at its reset defaults. Per
the register definition (`include/linux/spi/sh_msiof.h:79`), the
transmit watermark defaults to `SIFCTR_TFWM_64`, i.e. DMA requests
only happen when 64 stages are empty. With the audio engine using DMA
(`snd_dmaengine_pcm_trigger()` just above), the FIFO never asserts
TDREQ until it is completely drained, which produces repeatable
playback underruns/recording stalls on real hardware.
- The fix mirrors the existing SPI driver, which already forces both
watermarks down to one stage when DMA is used (`drivers/spi/spi-sh-
msiof.c:694`), so this corrects an obvious omission in the newly added
ASoC driver.
- The patch is tiny, contained to one function, and uses
`msiof_update()` to touch only the relevant bits so it does not
disturb other ongoing streams. No API/ABI changes and no dependency on
later clean-ups.
Given the driver first shipped in v6.16, every stable tree that includes
it inherits this DMA-handshake bug; backporting this commit is low-risk
and restores correct audio streaming.
sound/soc/renesas/rcar/msiof.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sound/soc/renesas/rcar/msiof.c b/sound/soc/renesas/rcar/msiof.c
index 555fdd4fb2513..ede0211daacba 100644
--- a/sound/soc/renesas/rcar/msiof.c
+++ b/sound/soc/renesas/rcar/msiof.c
@@ -185,6 +185,12 @@ static int msiof_hw_start(struct snd_soc_component *component,
msiof_write(priv, SIRMDR3, val);
}
+ /* SIFCTR */
+ if (is_play)
+ msiof_update(priv, SIFCTR, SIFCTR_TFWM, FIELD_PREP(SIFCTR_TFWM, SIFCTR_TFWM_1));
+ else
+ msiof_update(priv, SIFCTR, SIFCTR_RFWM, FIELD_PREP(SIFCTR_RFWM, SIFCTR_RFWM_1));
+
/* SIIER */
if (is_play)
val = SIIER_TDREQE | SIIER_TDMAE | SISTR_ERR_TX;
--
2.51.0
next prev parent reply other threads:[~2025-10-25 16:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20251025160905.3857885-1-sashal@kernel.org>
2025-10-25 15:54 ` [PATCH AUTOSEL 6.17] ASoC: ops: improve snd_soc_get_volsw Sasha Levin
2025-10-25 15:55 ` [PATCH AUTOSEL 6.17] ASoC: tas2781: Add keyword "init" in profile section Sasha Levin
2025-10-25 15:56 ` [PATCH AUTOSEL 6.17-6.6] ASoC: tlv320aic3x: Fix class-D initialization for tlv320aic3007 Sasha Levin
2025-10-25 15:57 ` Sasha Levin [this message]
2025-10-25 15:57 ` [PATCH AUTOSEL 6.17] ASoC: codecs: wsa883x: Handle shared reset GPIO for WSA883x speakers Sasha Levin
2025-10-25 15:57 ` [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: use reset controller Sasha Levin
2025-10-25 15:58 ` [PATCH AUTOSEL 6.17-6.1] ASoC: qcom: sc8280xp: explicitly set S16LE format in sc8280xp_be_hw_params_fixup() Sasha Levin
2025-10-25 15:59 ` [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: add .symmetric_xxx on snd_soc_dai_driver Sasha Levin
2025-10-25 15:59 ` [PATCH AUTOSEL 6.17] ASoC: renesas: msiof: tidyup DMAC stop timing Sasha Levin
2025-10-25 16:00 ` [PATCH AUTOSEL 6.17-6.6] ASoC: stm32: sai: manage context in set_sysclk callback Sasha Levin
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=20251025160905.3857885-203-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=broonie@kernel.org \
--cc=geert+renesas@glider.be \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=magnus.damm@gmail.com \
--cc=patches@lists.linux.dev \
--cc=stable@vger.kernel.org \
--cc=yusuke.goda.sx@renesas.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox