From: Valerio Setti <vsetti@baylibre.com>
To: Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>,
Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Jerome Brunet <jbrunet@baylibre.com>
Cc: linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
Valerio Setti <vsetti@baylibre.com>
Subject: [PATCH 0/3] ASoC: meson: aiu-encoder-i2s: improve hw constraints checks
Date: Fri, 10 Jul 2026 23:09:48 +0200 [thread overview]
Message-ID: <20260710-aiu-improve-quirk-check-v1-0-2fdd1b6f8896@baylibre.com> (raw)
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@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@baylibre.com>
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
next reply other threads:[~2026-07-10 21:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-10 21:09 Valerio Setti [this message]
2026-07-10 21:09 ` [PATCH 1/3] ASoC: meson: aiu-encoder-i2s: fix bs quirk incompatibility check Valerio Setti
2026-07-10 21:27 ` sashiko-bot
2026-07-10 21:09 ` [PATCH 2/3] ASoC: meson: aiu-encoder-i2s: reflect bs quirk in hw constraints Valerio Setti
2026-07-10 21:20 ` sashiko-bot
2026-07-10 21:09 ` [PATCH 3/3] ASoC: meson: aiu-encoder-i2s: use the core symmetric_rate handling Valerio Setti
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=20260710-aiu-improve-quirk-check-v1-0-2fdd1b6f8896@baylibre.com \
--to=vsetti@baylibre.com \
--cc=broonie@kernel.org \
--cc=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.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