ASoC: rsnd: enable multi Component support for Audio Graph Card/Card2
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 24 Jul 2023 00:21:39 +0000 (00:21 +0000)
committerMark Brown <broonie@kernel.org>
Mon, 31 Jul 2023 11:44:49 +0000 (12:44 +0100)
commit547b02f74e4ac1e7d295a6266d5bc93a647cd4ac
tree978f4320ce6ea82797624a42b924e9996fd2a842
parent6328489c135b60380b9e12b4d23854433e96a8b0
ASoC: rsnd: enable multi Component support for Audio Graph Card/Card2

+-- Basic Board ---------+
|+--------+      +------+|
|| CPU ch0| <--> |CodecA||
||     ch1| <-+  +------+|
|+--------+   |          |
+-------------|----------+
+-- expansion board -----+
|             |  +------+|
|             +->|CodecB||
|                +------+|
+------------------------+

In above HW connection case, we intuitively think we want to handle these
as "2 Sound Cards".

card0,0: CPU-ch0 - CodecA
card1,0: CPU-ch1 - CodecB

But, we needed to handle it as "1 big Sound Card", because of
Component vs Card limitation.

card0,0: CPU-ch0 - CodecA
card0,1: CPU-ch1 - CodecB

This patch enables multi Component to handle multi Cards.
To support it, it needs

- Fill dai_args for each DAI on snd_soc_dai_driver
- Parse DT for each Component (Simple Card/Audio Graph Card)

Ex) Simple Card

rcar_sound {
...

/* Component0 */
rcar_sound,dai@0 {
...
};

/* Component1 */
rcar_sound,dai@1 {
...
};
};

Ex) Audio Graph Card/Card2

rcar_sound {
/* Component0 */
ports@0 {
...
};

/* Component1 */
ports@1 {
...
};
};

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87tttub1m4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/rsnd.h