[PATCH 2/2] ASoC: meson: aiu-formatter: remove pipeline reset from prepare
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Thu Jul 2 04:14:20 PDT 2026
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Removing the pipeline reset from `aiu_formatter_i2s_prepare()` breaks dynamic DAPM routing (DPCM), potentially leaving the I2S formatter with an un-updated or corrupted state when attached to an already-running stream.
--
commit 7dba2169385903a506465200e005128765741cfe
Author: Valerio Setti <vsetti at baylibre.com>
ASoC: meson: aiu-formatter: remove pipeline reset from prepare
This commit removes the pipeline reset from aiu_formatter_i2s_prepare(). The
commit message claims this is redundant because it is already handled by
aiu_fifo_i2s_trigger() during trigger time.
> 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: High]
Does removing this reset break dynamic DAPM routing (DPCM)?
When a backend is dynamically connected to an already-running frontend via
DPCM, the frontend's trigger() callback is not invoked again.
For example, if the I2S FIFO frontend is started (e.g., routed to the SPDIF
backend) and then the I2S backend is dynamically connected while the stream is
running, the "I2S Formatter" DAPM widget powers up and calls
aiu_formatter_i2s_prepare().
Without the reset pulse here, will the hardware fail to latch new
configurations (like AIU_I2S_SOURCE_DESC), potentially resulting in corrupted
or no audio output from the I2S backend?
>
> switch (ts->physical_width) {
> case 16: /* Nothing to do */
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260702-fix-24-bit-i2s-playback-v1-0-bcd3a43fe32a@baylibre.com?part=2
More information about the linux-amlogic
mailing list