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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>

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@xxxxxxxxxxx>
---
 .../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@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@0 {
+			port@0 { multi_00_ep: endpoint { remote-endpoint = <&cpu4_ep>; }; };
+			port@1 { multi_01_ep: endpoint { remote-endpoint = <&cpu5_ep>; }; };
+		};
+		multi_codec: ports@1 {
+			port@0 { multi_10_ep: endpoint { remote-endpoint = <&codec3_ep>; }; };
+			port@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@1 { cpu1_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
 			      port@2 { cpu2_ep: endpoint { remote-endpoint = <&mix_fe0_ep>; }; };
 			      port@3 { cpu3_ep: endpoint { remote-endpoint = <&mix_fe1_ep>; }; };
+			      port@4 { cpu4_ep: endpoint { remote-endpoint = <&multi_00_ep>; }; };
+			      port@5 { cpu5_ep: endpoint { remote-endpoint = <&multi_01_ep>; }; };
 		};
 	};
 
@@ -91,6 +116,8 @@ ports {
 			port@0 { codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; };
 			port@1 { codec1_ep: endpoint { remote-endpoint = <&cpu1_ep>; }; };
 			port@2 { codec2_ep: endpoint { remote-endpoint = <&mix_be0_ep>; }; };
+			port@3 { codec3_ep: endpoint { remote-endpoint = <&multi_10_ep>; }; };
+			port@4 { codec4_ep: endpoint { remote-endpoint = <&multi_11_ep>; }; };
 		};
 	};
 };
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux