[PATCH v5 5/7] ASoC: meson: aiu: add I2S Capture DAI

From: Valerio Setti

Date: Sun Oct 18 2026 - 06:20:59 EST


Add capture stream to CPU_I2S_ENCODER making it able to handle both
playback and capture streams. Captured data is formatted from
"audin-formatter-i2s" widget, buffered from "audin-fifo" into an internal
FIFO and then bulk transmitted into RAM when the FIFO is full.

As for the naming of the stream "I2S Encoder" is kept as base following
the same pattern used for the playback stream and with the goal to minimize
changes.

Supported format for capture is currently limited to S16_LE because it's
the only one that has been tested. According to the manual also S24_LE
should be supported, but this is kept as follow-up.

Reviewed-by: Jerome Brunet <jbrunet@xxxxxxxxxxxx>
Signed-off-by: Valerio Setti <vsetti@xxxxxxxxxxxx>
---
sound/soc/meson/aiu.c | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/sound/soc/meson/aiu.c b/sound/soc/meson/aiu.c
index 535fbf7c1639..14d0e20a4bd6 100644
--- a/sound/soc/meson/aiu.c
+++ b/sound/soc/meson/aiu.c
@@ -153,6 +153,13 @@ static struct snd_soc_dai_driver aiu_cpu_dai_drv[] = {
.rates = SNDRV_PCM_RATE_8000_192000,
.formats = AIU_FORMATS,
},
+ .capture = {
+ .stream_name = "I2S Encoder Capture",
+ .channels_min = 2,
+ .channels_max = 2,
+ .rates = SNDRV_PCM_RATE_8000_192000,
+ .formats = SNDRV_PCM_FMTBIT_S16_LE,
+ },
.ops = &aiu_encoder_i2s_dai_ops,
.symmetric_rate = 1,
},

--
2.47.3