Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: meson: aiu: fix playback issue for 24-bit mode
@ 2026-07-02 10:56 Valerio Setti
  2026-07-02 10:56 ` [PATCH 1/2] ASoC: meson: gx-formatter: prepare on attach Valerio Setti
  2026-07-02 10:56 ` [PATCH 2/2] ASoC: meson: aiu-formatter: remove pipeline reset from prepare Valerio Setti
  0 siblings, 2 replies; 9+ messages in thread
From: Valerio Setti @ 2026-07-02 10:56 UTC (permalink / raw)
  To: Jerome Brunet, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Neil Armstrong, Kevin Hilman, Martin Blumenstingl
  Cc: linux-sound, linux-arm-kernel, linux-amlogic, linux-kernel,
	Valerio Setti

A patch series has recently been merged in c7852d2dcf66
("ASoC: meson: aiu: align I2S design to the AXG one") which unfortunately
introduces a bug in 24 bit mode playback which this new series resolves.

Among other things the previous series moved the content of what was once
called 'aiu_encoder_i2s_setup_desc' from 'aiu-encoder-i2s' to
'aiu-formatter-i2s'.
'aiu_encoder_i2s_setup_desc' was basically accomplishing two tasks:
- reset the i2s pipeline.
- configure number of channels and physical samples width.
Before being moved 'aiu_encoder_i2s_setup_desc' was called in the encoder
DAI 'hw_params()', whereas after the move it is called at trigger time
('aiu_encoder_i2s_trigger'->'gx_stream_start' -> 'gx_formatter_enable' ->
'aiu_formatter_i2s_prepare').

In parallel 'aiu-fifo-i2s' (DAI FE) already performs the very same reset
of the pipeline at trigger time in 'aiu_fifo_i2s_trigger' and then it
triggers the playback.

Since the DAI triggering order is the default one (FE before BE) this
means that the pipeline reset happens when the BE already did it and
started the playback. This cause the 24-bit playback mode to be
corrupted.

This series:
- re-orders operations so that 'aiu_formatter_i2s_prepare' is called after
  DAIs' prepare, but before triggering them.
- removes pipeline reset from 'aiu_formatter_i2s_prepare' because the
  very same operation is done by 'aiu-fifo-i2s' on trigger.

This series depends on c7852d2dcf66 ("ASoC: meson: aiu: align I2S design
to the AXG one") which exists in 'broonie/sound.git#for-7.3', but which
has not been mainlined yet.

Please apologize for the inconvenience.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
---
Valerio Setti (2):
      ASoC: meson: gx-formatter: prepare on attach
      ASoC: meson: aiu-formatter: remove pipeline reset from prepare

 sound/soc/meson/aiu-formatter-i2s.c |  9 ++++-----
 sound/soc/meson/gx-formatter.c      | 33 +++++++++++++++++++++++++--------
 2 files changed, 29 insertions(+), 13 deletions(-)
---
base-commit: bff7fad1010eea6f183fb110b54171cf8700ef8e
change-id: 20260702-fix-24-bit-i2s-playback-6444174c7cd7

Best regards,
--  
Valerio Setti <vsetti@baylibre.com>


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2026-07-03  7:59 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02 10:56 [PATCH 0/2] ASoC: meson: aiu: fix playback issue for 24-bit mode Valerio Setti
2026-07-02 10:56 ` [PATCH 1/2] ASoC: meson: gx-formatter: prepare on attach Valerio Setti
2026-07-02 11:10   ` sashiko-bot
2026-07-02 20:34     ` Valerio Setti
2026-07-03  7:34       ` Jerome Brunet
2026-07-02 10:56 ` [PATCH 2/2] ASoC: meson: aiu-formatter: remove pipeline reset from prepare Valerio Setti
2026-07-02 11:14   ` sashiko-bot
2026-07-02 20:44     ` Valerio Setti
2026-07-03  7:58   ` Jerome Brunet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox