From: sashiko-bot@kernel.org
To: "Valerio Setti" <vsetti@baylibre.com>
Cc: linux-amlogic@lists.infradead.org, neil.armstrong@linaro.org
Subject: Re: [PATCH v2] ASoC: meson: aiu-formatter-i2s: remove pipeline reset from prepare
Date: Thu, 02 Jul 2026 21:42:39 +0000 [thread overview]
Message-ID: <20260702214240.1229B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260702-fix-24-bit-i2s-playback-v2-1-9c008ff0b211@baylibre.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [Medium] The formatter is configured in the ALSA `.trigger` callback rather than `.prepare`, causing it to be updated after the FIFO has already been enabled and is actively streaming data.
--
commit 8c488e8a8134ef43be2df030518f521b015aa61c
Author: Valerio Setti <vsetti@baylibre.com>
ASoC: meson: aiu-formatter-i2s: remove pipeline reset from prepare
This commit removes a pipeline reset from the AIU I2S formatter prepare
callback. The reset is already handled by the DAI frontend during trigger,
and duplicating it here corrupts playback in 24-bit mode since the FIFO
has already been started.
> diff --git a/sound/soc/meson/aiu-formatter-i2s.c b/sound/soc/meson/aiu-formatter-i2s.c
> index b4604734fe88d..cb554c2e7ce4a 100644
> --- a/sound/soc/meson/aiu-formatter-i2s.c
> +++ b/sound/soc/meson/aiu-formatter-i2s.c
[ ... ]
> @@ -55,11 +54,11 @@ static int aiu_formatter_i2s_prepare(struct regmap *map,
> {
> /* Always operate in split (classic interleaved) mode */
> unsigned int desc = 0;
> - unsigned int tmp;
>
> - /* Reset required to update the pipeline */
> - regmap_write(map, AIU_RST_SOFT, AIU_RST_SOFT_I2S_FAST);
> - regmap_read(map, AIU_I2S_SYNC, &tmp);
> + /*
> + * Pipeline reset is already implemented in aiu_fifo_i2s_trigger() at
> + * trigger time.
> + */
[Severity: Medium]
This is a pre-existing issue, but does the formatter configuration happen too
late in the sequence?
The commit notes that the frontend starts the FIFO before this formatter
gets configured. Looking at the call chain, aiu_formatter_i2s_prepare() in
sound/soc/meson/aiu-formatter-i2s.c is executed during the ALSA trigger
phase instead of the prepare phase:
sound/soc/meson/aiu-encoder-i2s.c:aiu_encoder_i2s_trigger()
ret = gx_stream_start(ts);
sound/soc/meson/gx-formatter.c:gx_formatter_enable()
ret = formatter->drv->ops->prepare(formatter->map,
formatter->drv->quirks,
formatter->stream);
Modifying hardware data path configuration like bit width and channel count
while the DMA FIFO is already feeding data to it can cause audio glitches,
dropped samples, or corruption at the start of playback.
Could the formatter configuration be moved to the actual ALSA prepare
callback rather than being deferred to the trigger callback?
>
> switch (ts->physical_width) {
> case 16: /* Nothing to do */
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702-fix-24-bit-i2s-playback-v2-1-9c008ff0b211@baylibre.com?part=1
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
prev parent reply other threads:[~2026-07-02 21:42 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-02 21:31 [PATCH v2] ASoC: meson: aiu-formatter-i2s: remove pipeline reset from prepare Valerio Setti
2026-07-02 21:42 ` sashiko-bot [this message]
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=20260702214240.1229B1F000E9@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=neil.armstrong@linaro.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=vsetti@baylibre.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