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

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

 



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

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@xxxxxxxxxxx>
---
 .../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@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>; }; };
 		};
 	};
 };
-- 
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