public inbox for linux-amlogic@lists.infradead.org
 help / color / mirror / Atom feed
From: Valerio Setti <vsetti@baylibre.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, linux-amlogic@lists.infradead.org
Subject: Re: [PATCH RFC v2 05/11] ASoC: dt-bindings: amlogic: add schema for audin-formatter and audin-toddr
Date: Thu, 16 Apr 2026 23:51:57 +0200	[thread overview]
Message-ID: <71d2d8ab-21e2-4800-ad54-ba40ef2e136a@baylibre.com> (raw)
In-Reply-To: <7d4ec08c-a67c-434c-a1cd-c3ef5b7e3336@kernel.org>

Hi,

thanks for your review and the feedbacks.

>> +examples:
>> +  - |
>> +    audio-controller@a040 {
>> +      compatible = "amlogic,meson-gxbb-audin-decoder-i2s",
>> +                   "amlogic,meson-gx-audin-decoder-i2s";
>> +      #sound-dai-cells = <0>;
>> +      sound-name-prefix = "AUDIN I2S Decoder";
>> +      reg = <0xa040 0x4>;
> 
> One register-wide block? I have doubts this is a separate device

I understand that this might look as weird configuration, so please let 
me explain what's going on here.

In this SoC the audio part is split into 2 blocks: AIU for the audio 
output (already supported in the kernel) and AUDIN for the input (which 
is what I'm trying to add with this patch series). Unfortunately from 
the clock management point of view the two of them are not indipendent 
and interface clocks are in AIU register range. Moreover the two systems 
are not in a continguous memory range, so creating a single audio 
component that implements both is not feasible (unless we want to add 
some dirty tricks with multiple regmaps, etc).
This is where the AXG design comes into play: we use the backend DAI 
provided from AIU for both playback and capture and then we attach 
formatters (i.e. the audin-decoder-i2s we're discussing about) to 
properly format the data.
This explains why this is a relatively simple device with very few (1) 
register. To be noted that for example also similar component on the AXG 
platform (axg-tdmin.c) claims to have a larger register range, but in 
fact is almost entirely using the 1st register with only 2 occurences 
for the 2nd and 3rd. IMHO this is not that different from what I'm 
trying to achieve in this series for the GX platform.
Also looking at the implementation of "audin-decoder-i2s.c", even though 
it uses a single register, it really provides functionalities i.e. it's 
not a useless device and it can also be expanded in the future to 
support 24-bit sample format.

Then the question might be: why not merging this together with 
audin-fifo? Becuase these are 3 indipendent instances from the interface 
and each of which can receive data from the interface. Each of them has 
its own registers range (and optionally also an interrupt - which is not 
implemented due the documented limitations in the driver) so the most 
natural solution here is to implement them as 3 different devices. Of 
course then none of these should own the data formatter exclusively.

I apologize for the lengthy reply, but I tried to provide you a the full 
picture to answer your question.

Best regards,

-- 
Valerio


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

  reply	other threads:[~2026-04-16 21:52 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-11 14:57 [PATCH RFC v2 00/11] Add support for AUDIN driver in Amlogic GXBB Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 01/11] ASoC: meson: gx: add gx-formatter and gx-interface Valerio Setti
2026-04-14 16:21   ` Mark Brown
2026-04-11 14:57 ` [PATCH RFC v2 02/11] ASoC: meson: aiu-encoder-i2s: use gx_iface and gx_stream structures Valerio Setti
2026-04-14 16:13   ` Mark Brown
2026-04-15 14:28     ` Jerome Brunet
2026-04-15 16:26       ` Mark Brown
2026-04-11 14:57 ` [PATCH RFC v2 03/11] ASoC: meson: aiu: introduce I2S output formatter Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 04/11] ASoC: meson: aiu: use aiu-formatter-i2s to format I2S output data Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 05/11] ASoC: dt-bindings: amlogic: add schema for audin-formatter and audin-toddr Valerio Setti
2026-04-11 20:30   ` Krzysztof Kozlowski
2026-04-16 21:51     ` Valerio Setti [this message]
2026-04-11 14:57 ` [PATCH RFC v2 06/11] ASoC: meson: gx: add AUDIN I2S Decoder driver Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 07/11] ASoC: meson: gx: add AUDIN FIFO driver Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 08/11] ASoC: meson: aiu: add I2S Capture DAI Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 09/11] ASoC: meson: gx-card: add support for AUDIN FIFO Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 10/11] arm64: dts: amlogic: gx: add nodes for AUDIN decoder and FIFO Valerio Setti
2026-04-11 14:57 ` [PATCH RFC v2 11/11] arm64: dts: amlogic: odroid-c2: add support for I2S audio input Valerio Setti
2026-04-15 14:49 ` [PATCH RFC v2 00/11] Add support for AUDIN driver in Amlogic GXBB Jerome Brunet
2026-04-15 15:53   ` Krzysztof Kozlowski

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=71d2d8ab-21e2-4800-ad54-ba40ef2e136a@baylibre.com \
    --to=vsetti@baylibre.com \
    --cc=krzk@kernel.org \
    --cc=linux-amlogic@lists.infradead.org \
    /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