ASoC: audio-graph-card2-custom-sample.dtsi: add DPCM sample (Single)
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 12 Oct 2021 04:56:23 +0000 (13:56 +0900)
committerMark Brown <broonie@kernel.org>
Fri, 15 Oct 2021 15:10:46 +0000 (16:10 +0100)
This patch adds DPCM link Single-CPU/Codec sample to
audio-graph-card2-custom-sample.dtsi.
This sample is assuming MIXer connection.

FE BE
****
CPU3 -- *  * -- Codec3
CPU4 -- *  *
****

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87r1cqlu2w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/audio-graph-card2-custom-sample.dtsi

index b4f4fa743c2b62c11e27e14eae0f3de4fc2af576..b03dbce504cb474c462200171d32627cb43f4760 100644 (file)
         *      cpu1 <--| |<-@--------->| |-> codec1
         *      cpu2 <--| |             | |-> codec2
         *              +-+             +-+
+        *
+        * [DPCM]
+        *      FE              BE
+        *                ****
+        *      cpu3 <-@--*  *--@-> codec3
+        *      cpu4 <-@--*  *
+        *                ****
         */
        audio-graph-card2-custom-sample {
                /*
                 */
                compatible = "audio-graph-card2-custom-sample";
 
+                       /* for [DPCM]              */
+                       /* BE                   FE */
+               routing = "TC DAI3 Playback",   "DAI3 Playback",
+                         "TC DAI3 Playback",   "DAI4 Playback",
+                         "DAI3 Capture",       "TC DAI3 Capture",
+                         "DAI4 Capture",       "TC DAI3 Capture";
+
                links = <&cpu0                  /* normal: cpu side only */
                         &mcpu0                 /* multi:  cpu side only */
+                        &fe00 &fe01 &be0       /* dpcm:   both FE / BE  */
                >;
 
                multi {
                                port@2 { mcodec2_ep: endpoint { remote-endpoint = <&codec2_ep>; }; };
                        };
                };
+
+               dpcm {
+                       /* FE */
+                       ports@0 {
+                       fe00:   port@0 { fe00_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
+                       fe01:   port@1 { fe01_ep: endpoint { remote-endpoint = <&cpu4_ep>; }; };
+                       };
+                       /* BE */
+                       ports@1 {
+                       be0:    port@0 { be00_ep: endpoint { remote-endpoint = <&codec3_ep>; }; };
+                       };
+               };
        };
 
        test_cpu {
                        cpu0: port@0 { cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
                              port@1 { cpu1_ep: endpoint { remote-endpoint = <&mcpu1_ep>; }; };
                              port@2 { cpu2_ep: endpoint { remote-endpoint = <&mcpu2_ep>; }; };
+                             port@3 { cpu3_ep: endpoint { remote-endpoint = <&fe00_ep>; }; };
+                             port@4 { cpu4_ep: endpoint { remote-endpoint = <&fe01_ep>; }; };
                };
        };
 
                 */
                compatible = "test-codec";
                ports {
+                       /*
+                        * prefix can be added to *component*,
+                        * see audio-graph-card2::routing
+                        */
+                       prefix = "TC";
+
                        port@0  { codec0_ep:  endpoint { remote-endpoint = <&cpu0_ep>; }; };
                        port@1  { codec1_ep:  endpoint { remote-endpoint = <&mcodec1_ep>; }; };
                        port@2  { codec2_ep:  endpoint { remote-endpoint = <&mcodec2_ep>; }; };
+                       port@3  { codec3_ep:  endpoint { remote-endpoint = <&be00_ep>; }; };
                };
        };
 };