[PATCH RFC 14/15] ASoC: audio-graph-card2-sample.dtsi: add Multi CPU/Codec sample

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Jun 22 03:15:38 CEST 2021


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

This patch adds Multi CPU/Codec sample to audio-graph-card2-sample.dtsi.
Because ASoC doesn't support "N CPUs to M Codecs", this sample
uses "2 CPUs to 2 Codecs".

	       +---+
	CPU4 --|   |-- Codec3
	CPU5 --|   |-- Codec4
	       +---+

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 .../soc/generic/audio-graph-card2-sample.dtsi | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)

diff --git a/sound/soc/generic/audio-graph-card2-sample.dtsi b/sound/soc/generic/audio-graph-card2-sample.dtsi
index 9aab6be176e5..1d18aba22011 100644
--- a/sound/soc/generic/audio-graph-card2-sample.dtsi
+++ b/sound/soc/generic/audio-graph-card2-sample.dtsi
@@ -22,6 +22,8 @@ / {
 	 * cpu1 <--> codec1	// Normal
 	 * cpu2 <--> codec2	// DPCM
 	 * cpu3 <-/		// DPCM
+	 * cpu4 <==> codec3	// Multi (*1)
+	 * cpu5 <==> codec4	// Multi (*1)
 	 */
 	card2 {
 		/*
@@ -39,6 +41,7 @@ card2 {
 
 		links = <&cpu0 &cpu1			/* normal: cpu side only  */
 			 &mix_fe0 &mix_fe1 &mix_be0	/* dsp   : both fe/be     */
+			 &multi_cpu			/* multi : cpu side only  */
 		>;
 	};
 
@@ -53,6 +56,26 @@ DSP_BE: ports at 1 {
 		};
 	};
 
+	multi {
+		compatible = "audio-graph-card2-multi";
+
+		/*
+		 * (*1)
+		 *
+		 * This uses 2 CPUs x 2 Codecs as Multi connection,
+		 * Because ASoC doesn't support N cpus to M codecs
+		 */
+
+		multi_cpu: ports at 0 {
+			port at 0 { multi_00_ep: endpoint { remote-endpoint = <&cpu4_ep>; }; };
+			port at 1 { multi_01_ep: endpoint { remote-endpoint = <&cpu5_ep>; }; };
+		};
+		multi_codec: ports at 1 {
+			port at 0 { multi_10_ep: endpoint { remote-endpoint = <&codec3_ep>; }; };
+			port at 1 { multi_11_ep: endpoint { remote-endpoint = <&codec4_ep>; }; };
+		};
+	};
+
 	test_cpu {
 		/*
 		 * update compatible to indicate more detail behaviour
@@ -69,6 +92,8 @@ ports {
 			cpu1: port at 1 { cpu1_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
 			      port at 2 { cpu2_ep: endpoint { remote-endpoint = <&mix_fe0_ep>; }; };
 			      port at 3 { cpu3_ep: endpoint { remote-endpoint = <&mix_fe1_ep>; }; };
+			      port at 4 { cpu4_ep: endpoint { remote-endpoint = <&multi_00_ep>; }; };
+			      port at 5 { cpu5_ep: endpoint { remote-endpoint = <&multi_01_ep>; }; };
 		};
 	};
 
@@ -91,6 +116,8 @@ ports {
 			port at 0 { codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; };
 			port at 1 { codec1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; };
 			port at 2 { codec2_ep: endpoint { remote-endpoint = <&mix_be0_ep>; }; };
+			port at 3 { codec3_ep: endpoint { remote-endpoint = <&multi_10_ep>; }; };
+			port at 4 { codec4_ep: endpoint { remote-endpoint = <&multi_11_ep>; }; };
 		};
 	};
 };
-- 
2.25.1



More information about the Alsa-devel mailing list