[PATCH v2 0/2] ASoC: meson: gx-formatter: change stream lock from mutex to spinlock

From: Valerio Setti

Date: Wed Nov 11 2026 - 05:17:30 EST


Patch 1 fixes a pre-existing bugs, present since v7.3, reported by
Sashiko [1] while reviewing the series adding I2S input support for
Amlogic GX SoCs [2].
[2] depends on patch 1 to address Sashiko's comment.

Patch 2 adds a hardening check suggested by Martin while reviewing v1.

[1] https://lore.kernel.org/all/sashiko-outbox-176054@xxxxxxxxxx/
[2] https://lore.kernel.org/all/20261018-audin-v5-0-4b8cc13a1b22@xxxxxxxxxxxx/

Signed-off-by: Valerio Setti <vsetti@xxxxxxxxxxxx>
---
Changes in v2:
- Moved 'gx_formatter_disable()' under the spinlock guard in
'gx_formatter_detach'. [Martin]
- Added a new commit to introduce the 'lockdep_assert_held' check before
calling formatter's prepare/enable/disable callbacks. [Martin]
- Link to v1: https://patch.msgid.link/20261021-gx-formatter-use-spinlock-v1-1-71ebc9224c03@xxxxxxxxxxxx

To: Jerome Brunet <jbrunet@xxxxxxxxxxxx>
To: Liam Girdwood <lgirdwood@xxxxxxxxx>
To: Mark Brown <broonie@xxxxxxxxxx>
To: Jaroslav Kysela <perex@xxxxxxxx>
To: Takashi Iwai <tiwai@xxxxxxxx>
To: Neil Armstrong <neil.armstrong@xxxxxxxxxx>
To: Kevin Hilman <khilman@xxxxxxxxxxxx>
To: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
To: Valerio Setti <vsetti@xxxxxxxxxxxx>
Cc: linux-sound@xxxxxxxxxxxxxxx
Cc: linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
Cc: linux-amlogic@xxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx

---
Valerio Setti (2):
ASoC: meson: gx-formatter: change stream lock from mutex to spinlock
ASoC: meson: gx-formatter: add lockdep_assert_held check

sound/soc/meson/gx-formatter.c | 26 +++++++++++++++-----------
sound/soc/meson/gx-formatter.h | 4 ++++
sound/soc/meson/gx-interface.h | 3 ++-
3 files changed, 21 insertions(+), 12 deletions(-)
---
base-commit: c03c1a14507dfaf8b856c2608f9ac216021fc222
change-id: 20261021-gx-formatter-use-spinlock-289b3e2e46df

Best regards,
--
Valerio Setti <vsetti@xxxxxxxxxxxx>