diff mbox series

[v2,12/14] ASoC: audio-graph-card2-sample.dtsi: add DPCM sample

Message ID 87sg09vk1k.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show
Series ASoC: add Audio Graph Card2 driver | expand

Commit Message

Kuninori Morimoto July 20, 2021, 1:41 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@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@renesas.com>
---
 .../soc/generic/audio-graph-card2-sample.dtsi | 28 +++++++++++++++++++
 1 file changed, 28 insertions(+)
diff mbox series

Patch

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@0 {
+			mix_fe0: port@0 { mix_fe0_ep: endpoint { remote-endpoint = <&cpu2_ep>; }; };
+			mix_fe1: port@1 { mix_fe1_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
+		};
+		DSP_BE: ports@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@0 { cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
 			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>; }; };
 		};
 	};
 
@@ -61,8 +82,15 @@  test_codec {
 		 */
 		compatible = "test-codec";
 		ports {
+			/*
+			 * prefix can be added to *component*,
+			 * see card2::routing
+			 */
+			prefix = "TC";
+
 			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>; }; };
 		};
 	};
 };