[PATCH RFC 13/15] ASoC: audio-graph-card2-sample.dtsi: add DPCM sample

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


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

This patch adds DPCM sample to audio-graph-card2-sample.dtsi.
This sample is assuming MIXer connection.

	CPU2 --\
	        +-- Codec2
	CPU3 --/

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

diff --git a/sound/soc/generic/audio-graph-card2-sample.dtsi b/sound/soc/generic/audio-graph-card2-sample.dtsi
index 5e83bfed1781..9aab6be176e5 100644
--- a/sound/soc/generic/audio-graph-card2-sample.dtsi
+++ b/sound/soc/generic/audio-graph-card2-sample.dtsi
@@ -20,6 +20,8 @@ / {
 	/*
 	 * cpu0 <--> codec0	// Normal
 	 * cpu1 <--> codec1	// Normal
+	 * cpu2 <--> codec2	// DPCM
+	 * cpu3 <-/		// DPCM
 	 */
 	card2 {
 		/*
@@ -30,10 +32,27 @@ card2 {
 		 */
 		compatible = "sample-custom-card";
 
+		routing = "TC DAI2 Playback", "DAI2 Playback",
+			  "TC DAI2 Playback", "DAI3 Playback",
+			  "DAI2 Capture", "TC DAI2 Capture",
+			  "DAI3 Capture", "TC DAI2 Capture";
+
 		links = <&cpu0 &cpu1			/* normal: cpu side only  */
+			 &mix_fe0 &mix_fe1 &mix_be0	/* dsp   : both fe/be     */
 		>;
 	};
 
+	mix {
+		compatible = "audio-graph-card2-dsp";
+		DSP_FE: ports at 0 {
+			mix_fe0: port at 0 { mix_fe0_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; };
+			mix_fe1: port at 1 { mix_fe1_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
+		};
+		DSP_BE: ports at 1 {
+			mix_be0: port   { mix_be0_ep: endpoint { remote-endpoint = <&codec2_ep>; }; };
+		};
+	};
+
 	test_cpu {
 		/*
 		 * update compatible to indicate more detail behaviour
@@ -48,6 +67,8 @@ ports {
 			frame-master;
 			cpu0: port at 0 { cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
 			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>; }; };
 		};
 	};
 
@@ -61,8 +82,15 @@ test_codec {
 		 */
 		compatible = "test-codec";
 		ports {
+			/*
+			 * prefix can be added to *component*,
+			 * see card2::routing
+			 */
+			prefix = "TC";
+
 			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>; }; };
 		};
 	};
 };
-- 
2.25.1



More information about the Alsa-devel mailing list