[PATCH 0/3] ASoC: meson: aiu-encoder-i2s: improve hw constraints checks
Valerio Setti
vsetti at baylibre.com
Fri Jul 10 14:09:48 PDT 2026
This is a follow-up to the recently merged series reshaping the AIU
driver following the same design as AXG [1]. During the review,
Jerome pointed out that failing in hw_params() when two streams have
incompatible requirements is too late from userspace's point of view [2].
This series addresses that comment:
- Patch 1 fixes the existing bclk quirk check first: it only rejected
one direction of the mismatch, and its interface-wide flag was
cleared too late, making a legal reconfiguration of a single stream
fail. This is a standalone fix and it's preparing for patch 2.
- Patch 2 is the actual answer to the review comment: the quirk
incompatibility is expressed as hw rules on channels and sample
bits, refined against the committed configuration of the opposite
stream, so it becomes visible during parameter refinement. The
hw_params() check is kept as the last backstop in case of concurrent
refinement.
- Patch 3 applies the same philosophy to the interface-wide rate
symmetry. Instead of manually reimplementing the check, take advantage of
the core's 'symmetric_rate' handling.
Jerome's comment also mentioned the error returned when 'bs' is not a
multiple of 2. That one intentionally remains a hw_params() time
error: bs depends on the mclk rate, which the DAI only learns via
set_sysclk() from the machine driver's hw_params(), after parameter
refinement has already run. I don't think that can easily be expressed as
a constraint.
Final note. [1] has not been mainlined yet and it's only present in
'broonie/sound.git#for-7.3'. Therefore this series depends on commit
c7852d2dcf66 ("ASoC: meson: aiu: align I2S design to the AXG one").
[1] https://lore.kernel.org/linux-sound/20260610-reshape-aiu-as-axg-v2-0-cac3663a8b51@baylibre.com/
[2] https://lore.kernel.org/linux-sound/1jik7pebk7.fsf@starbuckisacylon.baylibre.com/
Signed-off-by: Valerio Setti <vsetti at baylibre.com>
---
Valerio Setti (3):
ASoC: meson: aiu-encoder-i2s: fix bs quirk incompatibility check
ASoC: meson: aiu-encoder-i2s: reflect bs quirk in hw constraints
ASoC: meson: aiu-encoder-i2s: use the core symmetric_rate handling
sound/soc/meson/aiu-encoder-i2s.c | 154 +++++++++++++++++++++++++++-----------
sound/soc/meson/aiu.c | 1 +
sound/soc/meson/gx-interface.h | 6 --
3 files changed, 113 insertions(+), 48 deletions(-)
---
base-commit: 8e5a6599a38e5515cd2b5f34fe8a8ac476f8b127
change-id: 20260707-aiu-improve-quirk-check-2b5051119341
Best regards,
--
Valerio Setti <vsetti at baylibre.com>
More information about the linux-amlogic
mailing list