Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: audio-graph-card2-custom-sample.dtsi: add Codec2Codec sample (Multi)

This patch adds Codec2Codec-Multi sample to audio-graph-card2-custom-sample.dtsi.
Because it can use very basic connection only for now,
it can use only

- 2channels
- S32_LE format

Test-Component driver has "IN" and "OUT" widget. Thus the route is

+--+ +-+
| | | |- Codec8 <- IN
| | <- | |- Codec9 <- IN
| | +-+
| |
| | +-+
| | -> | |- Codec10 -> OUT
| | | |- Codec11 -> OUT
+--+ +-+

One note here is that it will start works when it boot.
In other words we can't stop it so far.
We need to update driver for it in the future.

...
asoc-audio-graph-card2-custom-sample: multicodec <-> multicpu mapping ok
test-component test_codec: test_dai_startup() : test_codec.9
test-component test_codec: test_dai_startup() : test_codec.8
test-component test_codec: test_dai_startup() : test_codec.11
test-component test_codec: test_dai_startup() : test_codec.10
...

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87mtnelu2k.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Kuninori Morimoto and committed by
Mark Brown
baa274db 349b15ef

+42 -1
+42 -1
sound/soc/generic/audio-graph-card2-custom-sample.dtsi
··· 53 53 * +-@-> codec6 54 54 * | 55 55 * +---> codec7 56 + * 57 + * [Codec2Codec-Multi] 58 + * 59 + * --NOTE-- 60 + * Multi connect N:M is not supported by ASoC. 61 + * 62 + * +-+ 63 + * +-@->| |-> codec8 64 + * | | |-> codec9 65 + * | +-+ 66 + * | +-+ 67 + * +--->| |-> codec10 68 + * | |-> codec11 69 + * +-+ 56 70 */ 57 71 audio-graph-card2-custom-sample { 58 72 /* ··· 94 80 "DAI6 Capture", "TC DAI5 Capture", 95 81 /* for [Codec2Codec] */ 96 82 "TC OUT", "TC DAI7 Playback", 97 - "TC DAI6 Capture", "TC IN"; 83 + "TC DAI6 Capture", "TC IN", 84 + /* for [Codec2Codec-Multi] */ 85 + "TC OUT", "TC DAI10 Playback", 86 + "TC DAI8 Capture", "TC IN", 87 + "TC OUT", "TC DAI11 Playback", 88 + "TC DAI9 Capture", "TC IN"; 98 89 99 90 links = <&cpu0 /* normal: cpu side only */ 100 91 &mcpu0 /* multi: cpu side only */ 101 92 &fe00 &fe01 &be0 /* dpcm: both FE / BE */ 102 93 &fe10 &fe11 &be1 /* dpcm-m: both FE / BE */ 103 94 &c2c /* c2c: cpu side only */ 95 + &c2c_m /* c2c: cpu side only */ 104 96 >; 105 97 106 98 multi { ··· 124 104 port@0 { mbe_ep: endpoint { remote-endpoint = <&be10_ep>; }; }; 125 105 port@1 { mbe1_ep: endpoint { remote-endpoint = <&codec4_ep>; }; }; 126 106 port@2 { mbe2_ep: endpoint { remote-endpoint = <&codec5_ep>; }; }; 107 + }; 108 + ports@3 { 109 + port@0 { mc2c0_ep: endpoint { remote-endpoint = <&c2cmf_ep>; }; }; 110 + port@1 { mc2c00_ep: endpoint { remote-endpoint = <&codec8_ep>; }; }; 111 + port@2 { mc2c01_ep: endpoint { remote-endpoint = <&codec9_ep>; }; }; 112 + }; 113 + ports@4 { 114 + port@0 { mc2c1_ep: endpoint { remote-endpoint = <&c2cmb_ep>; }; }; 115 + port@1 { mc2c10_ep: endpoint { remote-endpoint = <&codec10_ep>; }; }; 116 + port@2 { mc2c11_ep: endpoint { remote-endpoint = <&codec11_ep>; }; }; 127 117 }; 128 118 }; 129 119 ··· 157 127 rate = <48000>; 158 128 c2c: port@0 { c2cf_ep: endpoint { remote-endpoint = <&codec6_ep>; }; }; 159 129 port@1 { c2cb_ep: endpoint { remote-endpoint = <&codec7_ep>; }; }; 130 + }; 131 + ports@1 { 132 + rate = <48000>; 133 + c2c_m: port@0 { c2cmf_ep: endpoint { remote-endpoint = <&mc2c0_ep>; }; }; 134 + port@1 { c2cmb_ep: endpoint { remote-endpoint = <&mc2c1_ep>; }; }; 160 135 }; 161 136 }; 162 137 }; ··· 216 181 frame-master; 217 182 codec6_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; }; 218 183 port@7 { codec7_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; }; 184 + port@8 { bitclock-master; 185 + frame-master; 186 + codec8_ep: endpoint { remote-endpoint = <&mc2c00_ep>; }; }; 187 + port@9 { codec9_ep: endpoint { remote-endpoint = <&mc2c01_ep>; }; }; 188 + port@10 { codec10_ep: endpoint { remote-endpoint = <&mc2c10_ep>; }; }; 189 + port@11 { codec11_ep: endpoint { remote-endpoint = <&mc2c11_ep>; }; }; 219 190 }; 220 191 }; 221 192 };