mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-09 00:43:08 -04:00
ASoC: audio-graph-card2-custom-sample: Separate Sample
Merge series from Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>: audio-graph-card2-custom-sample has many sample connections, but because ALSA card has number limition for links, it is impossible to have all samples into 1 ASoC card. This patch-set separate sample DT into 2 parts, and remove original sample. Because of this separation, we can see all sample connection via multi Card. - for normal - for DPCM/Codec2Codec
This commit is contained in:
@@ -1,702 +0,0 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* audio-graph-card2-custom-sample.dtsi
|
||||
*
|
||||
* Copyright (C) 2020 Renesas Electronics Corp.
|
||||
* Copyright (C) 2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
*
|
||||
* This sample indicates how to use audio-graph-card2 and its
|
||||
* custom driver. "audio-graph-card2-custom-sample" is the custome driver
|
||||
* which is using audio-graph-card2.
|
||||
*
|
||||
* You can easily use this sample by adding below line on your DT file,
|
||||
* and add new CONFIG to your .config.
|
||||
*
|
||||
* #include "../../../../../sound/soc/generic/audio-graph-card2-custom-sample.dtsi"
|
||||
*
|
||||
* CONFIG_SND_AUDIO_GRAPH_CARD2
|
||||
* CONFIG_SND_AUDIO_GRAPH_CARD2_CUSTOM_SAMPLE
|
||||
* CONFIG_SND_TEST_COMPONENT
|
||||
*
|
||||
*
|
||||
* You can indicate more detail each device behavior as debug if you modify
|
||||
* "compatible" on each test-component. see below
|
||||
*
|
||||
* test_cpu {
|
||||
* - compatible = "test-cpu";
|
||||
* + compatible = "test-cpu-verbose";
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
* test_codec {
|
||||
* - compatible = "test-codec";
|
||||
* + compatible = "test-codec-verbose";
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
*
|
||||
* Below sample doesn't use "format" property,
|
||||
* because test-component driver (test-cpu/test-codec) is supporting
|
||||
* snd_soc_dai_ops :: .auto_selectable_formats.
|
||||
* see
|
||||
* snd_soc_runtime_get_dai_fmt()
|
||||
* linux/sound/soc/generic/test-component.c :: test_dai_formats
|
||||
*/
|
||||
/ {
|
||||
/*
|
||||
* @ : used at links
|
||||
*
|
||||
* [Normal]
|
||||
* cpu0 <-@-----------------> codec0
|
||||
*
|
||||
* [Semi-Multi]
|
||||
*
|
||||
* CPU:Codec = 1:N
|
||||
*
|
||||
* +-+
|
||||
* cpu7 <-@------->| |-> codec12
|
||||
* | |-> codec13
|
||||
* +-+
|
||||
*
|
||||
* [Multi-CPU/Codec-0]
|
||||
* +-+ +-+
|
||||
* cpu1 <--| |<-@--------->| |-> codec1
|
||||
* cpu2 <--| | | |-> codec2
|
||||
* +-+ +-+
|
||||
*
|
||||
* [Multi-CPU/Codec-1]
|
||||
*
|
||||
* +-+ +-+
|
||||
* | |<-@--------->| |
|
||||
* | | | |
|
||||
* cpu8 <--| |<----------->| |-> codec14
|
||||
* cpu9 <--| |<---+------->| |-> codec15
|
||||
* +-+ \------>| |-> codec16
|
||||
* +-+
|
||||
*
|
||||
* [Multi-CPU/Codec-2]
|
||||
*
|
||||
* +-+ +-+
|
||||
* | |<-@--------->| |
|
||||
* | | | |
|
||||
* cpu10 <-| |<----------->| |-> codec17
|
||||
* cpu11 <-| |<-----+----->| |-> codec18
|
||||
* cpu12 <-| |<----/ +-+
|
||||
* +-+
|
||||
*
|
||||
* [DPCM]
|
||||
*
|
||||
* CPU3/CPU4 are converting rate to 44100
|
||||
*
|
||||
* FE BE
|
||||
* ****
|
||||
* cpu3 <-@--* *--@-> codec3
|
||||
* cpu4 <-@--* * (44.1kHz)
|
||||
* ****
|
||||
*
|
||||
* [DPCM-Multi]
|
||||
*
|
||||
* --NOTE--
|
||||
* Multi-FE is not supported by ASoC.
|
||||
*
|
||||
* FE BE
|
||||
* **** +-+
|
||||
* cpu5 <-@--* *--@-> | | -> codec4
|
||||
* cpu6 <-@--* * | | -> codec5
|
||||
* **** +-+
|
||||
*
|
||||
* [Codec2Codec]
|
||||
* +-@-> codec6
|
||||
* |
|
||||
* +---> codec7
|
||||
*
|
||||
* [Codec2Codec-Multi]
|
||||
*
|
||||
* --NOTE--
|
||||
* Multi connect N:M is not supported by ASoC.
|
||||
*
|
||||
* +-+
|
||||
* +-@->| |-> codec8
|
||||
* | | |-> codec9
|
||||
* | +-+
|
||||
* | +-+
|
||||
* +--->| |-> codec10
|
||||
* | |-> codec11
|
||||
* +-+
|
||||
*/
|
||||
audio-graph-card2-custom-sample {
|
||||
/*
|
||||
* You can use audio-graph-card2 directly by using
|
||||
*
|
||||
* compatible = "audio-graph-card2";
|
||||
*/
|
||||
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",
|
||||
/* for [DPCM-Multi] */
|
||||
/* BE FE */
|
||||
"TC DAI4 Playback", "DAI5 Playback",
|
||||
"TC DAI5 Playback", "DAI5 Playback",
|
||||
"TC DAI4 Playback", "DAI6 Playback",
|
||||
"TC DAI5 Playback", "DAI6 Playback",
|
||||
"DAI5 Capture", "TC DAI4 Capture",
|
||||
"DAI5 Capture", "TC DAI5 Capture",
|
||||
"DAI6 Capture", "TC DAI4 Capture",
|
||||
"DAI6 Capture", "TC DAI5 Capture",
|
||||
/* for [Codec2Codec] */
|
||||
"TC OUT", "TC DAI7 Playback",
|
||||
"TC DAI6 Capture", "TC IN",
|
||||
/* for [Codec2Codec-Multi] */
|
||||
"TC OUT", "TC DAI10 Playback",
|
||||
"TC DAI8 Capture", "TC IN",
|
||||
"TC OUT", "TC DAI11 Playback",
|
||||
"TC DAI9 Capture", "TC IN";
|
||||
|
||||
links = <
|
||||
/*
|
||||
* [Normal]: cpu side only
|
||||
* cpu0/codec0
|
||||
*/
|
||||
&cpu0
|
||||
|
||||
/*
|
||||
* [Semi-Multi]
|
||||
* cpu7/codec12/codec13
|
||||
*/
|
||||
&sm0
|
||||
|
||||
/*
|
||||
* [Multi-CPU/Codec-0]: cpu side only
|
||||
* cpu1/cpu2/codec1/codec2
|
||||
*/
|
||||
&mcpu0
|
||||
|
||||
/*
|
||||
* [Multi-CPU/Codec-1]: cpu side only
|
||||
* cpu8/cpu9/codec14/codec15/codec16
|
||||
*
|
||||
* Because it will reach to the maximum of sound minor number,
|
||||
* disable it so far.
|
||||
* If you want to try it, please disable some other one instead.
|
||||
*/
|
||||
//&mcpu1
|
||||
|
||||
/*
|
||||
* [Multi-CPU/Codec-2]: cpu side only
|
||||
* cpu10/cpu11/cpu12/codec17/codec18
|
||||
*
|
||||
* Because it will reach to the maximum of sound minor number,
|
||||
* disable it so far.
|
||||
* If you want to try it, please disable some other one instead.
|
||||
*/
|
||||
//&mcpu2
|
||||
|
||||
/*
|
||||
* [DPCM]: both FE / BE
|
||||
* cpu3/cpu4/codec3
|
||||
*/
|
||||
&fe00 &fe01 &be0
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]: both FE / BE
|
||||
* cpu5/cpu6/codec4/codec5
|
||||
*/
|
||||
&fe10 &fe11 &be1
|
||||
|
||||
/*
|
||||
* [Codec2Codec]: cpu side only
|
||||
* codec6/codec7
|
||||
*/
|
||||
&c2c
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]: cpu side only
|
||||
* codec8/codec9/codec10/codec11
|
||||
*/
|
||||
&c2c_m
|
||||
>;
|
||||
|
||||
multi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/*
|
||||
* [Multi-CPU-0]
|
||||
*
|
||||
* +---+ +---+
|
||||
* cpu1 <--|A X|<-@------->|x a|-> codec1
|
||||
* cpu2 <--|B | | b|-> codec2
|
||||
* +---+ +---+
|
||||
*/
|
||||
ports@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mcpu0: port@0 { reg = <0>; mcpu00_ep: endpoint { remote-endpoint = <&mcodec00_ep>; };};/* (X) to pair */
|
||||
port@1 { reg = <1>; mcpu01_ep: endpoint { remote-endpoint = <&cpu1_ep>; };};/* (A) Multi Element */
|
||||
port@2 { reg = <2>; mcpu02_ep: endpoint { remote-endpoint = <&cpu2_ep>; };};/* (B) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-Codec-0]
|
||||
*
|
||||
* +---+ +---+
|
||||
* cpu1 <--|A X|<-@------->|x a|-> codec1
|
||||
* cpu2 <--|B | | b|-> codec2
|
||||
* +---+ +---+
|
||||
*/
|
||||
ports@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mcodec00_ep: endpoint { remote-endpoint = <&mcpu00_ep>; };};/* (x) to pair */
|
||||
port@1 { reg = <1>; mcodec01_ep: endpoint { remote-endpoint = <&codec1_ep>; };};/* (a) Multi Element */
|
||||
port@2 { reg = <2>; mcodec02_ep: endpoint { remote-endpoint = <&codec2_ep>; };};/* (b) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]::BE
|
||||
*
|
||||
* FE BE
|
||||
* **** +---+
|
||||
* cpu5 <-@--* *-----@--->|x a|-> codec4
|
||||
* cpu6 <-@--* * | b|-> codec5
|
||||
* **** +---+
|
||||
*/
|
||||
ports@2 {
|
||||
reg = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mbe_ep: endpoint { remote-endpoint = <&be10_ep>; };};/* (x) to pair */
|
||||
port@1 { reg = <1>; mbe1_ep: endpoint { remote-endpoint = <&codec4_ep>; };};/* (a) Multi Element */
|
||||
port@2 { reg = <2>; mbe2_ep: endpoint { remote-endpoint = <&codec5_ep>; };};/* (b) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]::CPU
|
||||
*
|
||||
* +---+
|
||||
* +-@->|X A|-> codec8
|
||||
* | | B|-> codec9
|
||||
* | +---+
|
||||
* | +---+
|
||||
* +--->|x a|-> codec10
|
||||
* | b|-> codec11
|
||||
* +---+
|
||||
*/
|
||||
ports@3 {
|
||||
reg = <3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mc2c0_ep: endpoint { remote-endpoint = <&c2cmf_ep>; };};/* (X) to pair */
|
||||
port@1 { reg = <1>; mc2c00_ep: endpoint { remote-endpoint = <&codec8_ep>; };};/* (A) Multi Element */
|
||||
port@2 { reg = <2>; mc2c01_ep: endpoint { remote-endpoint = <&codec9_ep>; };};/* (B) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]::Codec
|
||||
*
|
||||
* +---+
|
||||
* +-@->|X A|-> codec8
|
||||
* | | B|-> codec9
|
||||
* | +---+
|
||||
* | +---+
|
||||
* +--->|x a|-> codec10
|
||||
* | b|-> codec11
|
||||
* +---+
|
||||
*/
|
||||
ports@4 {
|
||||
reg = <4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mc2c1_ep: endpoint { remote-endpoint = <&c2cmb_ep>; };};/* (x) to pair */
|
||||
port@1 { reg = <1>; mc2c10_ep: endpoint { remote-endpoint = <&codec10_ep>; };};/* (a) Multi Element */
|
||||
port@2 { reg = <2>; mc2c11_ep: endpoint { remote-endpoint = <&codec11_ep>; };};/* (b) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Semi-Multi]
|
||||
*
|
||||
* +---+
|
||||
* cpu7 <-@------->|X A|-> codec12
|
||||
* | B|-> codec13
|
||||
* +---+
|
||||
*/
|
||||
ports@5 {
|
||||
reg = <5>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; smcodec0_ep: endpoint { remote-endpoint = <&cpu7_ep>; };};/* (X) to pair */
|
||||
port@1 { reg = <1>; smcodec1_ep: endpoint { remote-endpoint = <&codec12_ep>; };};/* (A) Multi Element */
|
||||
port@2 { reg = <2>; smcodec2_ep: endpoint { remote-endpoint = <&codec13_ep>; };};/* (B) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-CPU-1]
|
||||
*
|
||||
* +---+ +---+
|
||||
* | X|<-@------->|x |
|
||||
* | | | |
|
||||
* cpu8 <--|A 1|<--------->|3 a|-> codec14
|
||||
* cpu9 <--|B 2|<---+----->|4 b|-> codec15
|
||||
* +---+ \---->|5 c|-> codec16
|
||||
* +---+
|
||||
*/
|
||||
ports@6 {
|
||||
reg = <6>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mcpu1: port@0 { reg = <0>; mcpu10_ep: endpoint { remote-endpoint = <&mcodec10_ep>; };}; /* (X) to pair */
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcpu11_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu8_ep>; }; /* (A) Multi Element */
|
||||
mcpu11_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec11_ep_0>; }; /* (1) connected Codec */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcpu12_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu9_ep>; }; /* (B) Multi Element */
|
||||
mcpu12_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec12_ep_0>; }; /* (2) connected Codec */
|
||||
mcpu12_ep_1: endpoint@2 { reg = <2>; remote-endpoint = <&mcodec13_ep_0>; }; /* (2) connected Codec */
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-Codec-1]
|
||||
*
|
||||
* +---+ +---+
|
||||
* | X|<-@------->|x |
|
||||
* | | | |
|
||||
* cpu8 <--|A 1|<--------->|3 a|-> codec14
|
||||
* cpu9 <--|B 2|<---+----->|4 b|-> codec15
|
||||
* +---+ \---->|5 c|-> codec16
|
||||
* +---+
|
||||
*/
|
||||
ports@7 {
|
||||
reg = <7>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mcodec10_ep: endpoint { remote-endpoint = <&mcpu10_ep>; };}; /* (x) to pair */
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcodec11_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec14_ep>; }; /* (a) Multi Element */
|
||||
mcodec11_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu11_ep_0>; }; /* (3) connected CPU */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcodec12_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec15_ep>; }; /* (b) Multi Element */
|
||||
mcodec12_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu12_ep_0>; }; /* (4) connected CPU */
|
||||
};
|
||||
port@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
mcodec13_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec16_ep>; }; /* (c) Multi Element */
|
||||
mcodec13_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu12_ep_1>; }; /* (5) connected CPU */
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-CPU-2]
|
||||
*
|
||||
* +---+ +---+
|
||||
* | X|<-@------->|x |
|
||||
* | | | |
|
||||
* cpu10 <-|A 1|<--------->|4 a|-> codec17
|
||||
* cpu11 <-|B 2|<-----+--->|5 b|-> codec18
|
||||
* cpu12 <-|C 3|<----/ +---+
|
||||
* +---+
|
||||
*/
|
||||
ports@8 {
|
||||
reg = <8>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mcpu2: port@0 { reg = <0>; mcpu20_ep: endpoint { remote-endpoint = <&mcodec20_ep>; };}; /* (X) to pair */
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcpu21_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu10_ep>; }; /* (A) Multi Element */
|
||||
mcpu21_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec21_ep_0>; }; /* (1) connected Codec */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcpu22_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu11_ep>; }; /* (B) Multi Element */
|
||||
mcpu22_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec22_ep_0>; }; /* (2) connected Codec */
|
||||
};
|
||||
port@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
mcpu23_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu12_ep>; }; /* (C) Multi Element */
|
||||
mcpu23_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec22_ep_1>; }; /* (3) connected Codec */
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-Codec-2]
|
||||
*
|
||||
* +---+ +---+
|
||||
* | X|<-@------->|x |
|
||||
* | | | |
|
||||
* cpu10 <-|A 1|<--------->|4 a|-> codec17
|
||||
* cpu11 <-|B 2|<-----+--->|5 b|-> codec18
|
||||
* cpu12 <-|C 3|<----/ +---+
|
||||
* +---+
|
||||
*/
|
||||
ports@9 {
|
||||
reg = <9>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mcodec20_ep: endpoint { remote-endpoint = <&mcpu20_ep>; };}; /* (x) to pair */
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcodec21_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec17_ep>; }; /* (a) Multi Element */
|
||||
mcodec21_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu21_ep_0>; }; /* (4) connected CPU */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcodec22_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec18_ep>; }; /* (b) Multi Element */
|
||||
mcodec22_ep_0: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu22_ep_0>; }; /* (5) connected CPU */
|
||||
mcodec22_ep_1: endpoint@2 { reg = <2>; remote-endpoint = <&mcpu23_ep_0>; }; /* (5) connected CPU */
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
dpcm {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
ports@0 {
|
||||
reg = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
/*
|
||||
* [DPCM]::FE
|
||||
*
|
||||
* FE BE
|
||||
* ****
|
||||
* cpu3 <-@(fe00)--* *--(be0)@--> codec3
|
||||
* cpu4 <-@(fe01)--* * (44.1kHz)
|
||||
* ****
|
||||
*/
|
||||
fe00: port@0 { reg = <0>; fe00_ep: endpoint { remote-endpoint = <&cpu3_ep>; }; };
|
||||
fe01: port@1 { reg = <1>; fe01_ep: endpoint { remote-endpoint = <&cpu4_ep>; }; };
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]::FE
|
||||
*
|
||||
* FE BE
|
||||
* **** +-+
|
||||
* cpu5 <-@(fe10)--* *---(be1)@-->| |-> codec4
|
||||
* cpu6 <-@(fe11)--* * | |-> codec5
|
||||
* **** +-+
|
||||
*/
|
||||
fe10: port@2 { reg = <2>; fe10_ep: endpoint { remote-endpoint = <&cpu5_ep>; }; };
|
||||
fe11: port@3 { reg = <3>; fe11_ep: endpoint { remote-endpoint = <&cpu6_ep>; }; };
|
||||
};
|
||||
|
||||
ports@1 {
|
||||
reg = <1>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
/*
|
||||
* [DPCM]::BE
|
||||
*
|
||||
* FE BE
|
||||
* ****
|
||||
* cpu3 <-@(fe00)--* *--(be0)@--> codec3
|
||||
* cpu4 <-@(fe01)--* * (44.1kHz)
|
||||
* ****
|
||||
*/
|
||||
be0: port@0 { reg = <0>; be00_ep: endpoint { remote-endpoint = <&codec3_ep>; }; };
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]::BE
|
||||
*
|
||||
* FE BE
|
||||
* **** +-+
|
||||
* cpu5 <-@(fe10)--* *---(be1)@-->| |-> codec4
|
||||
* cpu6 <-@(fe11)--* * | |-> codec5
|
||||
* **** +-+
|
||||
*/
|
||||
be1: port@1 { reg = <1>; be10_ep: endpoint { remote-endpoint = <&mbe_ep>; }; };
|
||||
};
|
||||
};
|
||||
|
||||
codec2codec {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
/*
|
||||
* [Codec2Codec]
|
||||
*
|
||||
* +-@(c2c)-> codec6
|
||||
* |
|
||||
* +--------> codec7
|
||||
*/
|
||||
ports@0 {
|
||||
reg = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* use default settings */
|
||||
c2c: port@0 { reg = <0>; c2cf_ep: endpoint { remote-endpoint = <&codec6_ep>; }; };
|
||||
port@1 { reg = <1>; c2cb_ep: endpoint { remote-endpoint = <&codec7_ep>; }; };
|
||||
};
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]
|
||||
*
|
||||
* +-+
|
||||
* +-@(c2c_m)-->| |-> codec8
|
||||
* | | |-> codec9
|
||||
* | +-+
|
||||
* | +-+
|
||||
* +----------->| |-> codec10
|
||||
* | |-> codec11
|
||||
* +-+
|
||||
*/
|
||||
ports@1 {
|
||||
reg = <1>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* use original settings */
|
||||
rate = <48000>;
|
||||
c2c_m: port@0 { reg = <0>; c2cmf_ep: endpoint { remote-endpoint = <&mc2c0_ep>; }; };
|
||||
port@1 { reg = <1>; c2cmb_ep: endpoint { remote-endpoint = <&mc2c1_ep>; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test_cpu {
|
||||
/*
|
||||
* update compatible to indicate more detail behaviour
|
||||
* if you want. see test-compatible for more detail.
|
||||
*
|
||||
* ex)
|
||||
* - compatible = "test-cpu";
|
||||
* + compatible = "test-cpu-verbose";
|
||||
*/
|
||||
compatible = "test-cpu";
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
bitclock-master;
|
||||
frame-master;
|
||||
/* [Normal] */
|
||||
cpu0: port@0 { reg = <0>; cpu0_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
|
||||
|
||||
/* [Multi-CPU-0] */
|
||||
port@1 { reg = <1>; cpu1_ep: endpoint { remote-endpoint = <&mcpu01_ep>; }; };
|
||||
port@2 { reg = <2>; cpu2_ep: endpoint { remote-endpoint = <&mcpu02_ep>; }; };
|
||||
|
||||
/* [DPCM]::FE */
|
||||
port@3 { reg = <3>; cpu3_ep: endpoint { remote-endpoint = <&fe00_ep>; }; };
|
||||
port@4 { reg = <4>; cpu4_ep: endpoint { remote-endpoint = <&fe01_ep>; }; };
|
||||
|
||||
/* [DPCM-Multi]::FE */
|
||||
port@5 { reg = <5>; cpu5_ep: endpoint { remote-endpoint = <&fe10_ep>; }; };
|
||||
port@6 { reg = <6>; cpu6_ep: endpoint { remote-endpoint = <&fe11_ep>; }; };
|
||||
|
||||
/* [Semi-Multi] */
|
||||
sm0: port@7 { reg = <7>; cpu7_ep: endpoint { remote-endpoint = <&smcodec0_ep>; }; };
|
||||
|
||||
/* [Multi-CPU-1] */
|
||||
port@8 { reg = <8>; cpu8_ep: endpoint { remote-endpoint = <&mcpu11_ep>; }; };
|
||||
port@9 { reg = <9>; cpu9_ep: endpoint { remote-endpoint = <&mcpu12_ep>; }; };
|
||||
/* [Multi-CPU-2] */
|
||||
port@a { reg = <10>; cpu10_ep: endpoint { remote-endpoint = <&mcpu21_ep>; }; };
|
||||
port@b { reg = <11>; cpu11_ep: endpoint { remote-endpoint = <&mcpu22_ep>; }; };
|
||||
port@c { reg = <12>; cpu12_ep: endpoint { remote-endpoint = <&mcpu23_ep>; }; };
|
||||
};
|
||||
};
|
||||
|
||||
test_codec {
|
||||
/*
|
||||
* update compatible to indicate more detail behaviour
|
||||
* if you want. see test-compatible for more detail.
|
||||
*
|
||||
* ex)
|
||||
* - compatible = "test-codec";
|
||||
* + compatible = "test-codec-verbose";
|
||||
*/
|
||||
compatible = "test-codec";
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/*
|
||||
* prefix can be added to *component*,
|
||||
* see audio-graph-card2::routing
|
||||
*/
|
||||
prefix = "TC";
|
||||
|
||||
/* [Normal] */
|
||||
port@0 { reg = <0>; codec0_ep: endpoint { remote-endpoint = <&cpu0_ep>; }; };
|
||||
|
||||
/* [Multi-Codec-0] */
|
||||
port@1 { reg = <1>; codec1_ep: endpoint { remote-endpoint = <&mcodec01_ep>; }; };
|
||||
port@2 { reg = <2>; codec2_ep: endpoint { remote-endpoint = <&mcodec02_ep>; }; };
|
||||
|
||||
/* [DPCM]::BE */
|
||||
port@3 {
|
||||
convert-rate = <44100>;
|
||||
reg = <3>; codec3_ep: endpoint { remote-endpoint = <&be00_ep>; };
|
||||
};
|
||||
|
||||
/* [DPCM-Multi]::BE */
|
||||
port@4 { reg = <4>; codec4_ep: endpoint { remote-endpoint = <&mbe1_ep>; }; };
|
||||
port@5 { reg = <5>; codec5_ep: endpoint { remote-endpoint = <&mbe2_ep>; }; };
|
||||
|
||||
/* [Codec2Codec] */
|
||||
port@6 { bitclock-master;
|
||||
frame-master;
|
||||
reg = <6>; codec6_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; };
|
||||
port@7 { reg = <7>; codec7_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; };
|
||||
|
||||
/* [Codec2Codec-Multi] */
|
||||
port@8 { bitclock-master;
|
||||
frame-master;
|
||||
reg = <8>; codec8_ep: endpoint { remote-endpoint = <&mc2c00_ep>; }; };
|
||||
port@9 { reg = <9>; codec9_ep: endpoint { remote-endpoint = <&mc2c01_ep>; }; };
|
||||
port@a { reg = <10>; codec10_ep: endpoint { remote-endpoint = <&mc2c10_ep>; }; };
|
||||
port@b { reg = <11>; codec11_ep: endpoint { remote-endpoint = <&mc2c11_ep>; }; };
|
||||
|
||||
/* [Semi-Multi] */
|
||||
port@c { reg = <12>; codec12_ep: endpoint { remote-endpoint = <&smcodec1_ep>; }; };
|
||||
port@d { reg = <13>; codec13_ep: endpoint { remote-endpoint = <&smcodec2_ep>; }; };
|
||||
|
||||
/* [Multi-Codec-1] */
|
||||
port@e { reg = <14>; codec14_ep: endpoint { remote-endpoint = <&mcodec11_ep>; }; };
|
||||
port@f { reg = <15>; codec15_ep: endpoint { remote-endpoint = <&mcodec12_ep>; }; };
|
||||
port@10 { reg = <16>; codec16_ep: endpoint { remote-endpoint = <&mcodec13_ep>; }; };
|
||||
/* [Multi-Codec-2] */
|
||||
port@11 { reg = <17>; codec17_ep: endpoint { remote-endpoint = <&mcodec21_ep>; }; };
|
||||
port@12 { reg = <18>; codec18_ep: endpoint { remote-endpoint = <&mcodec22_ep>; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
396
sound/soc/generic/audio-graph-card2-custom-sample1.dtsi
Normal file
396
sound/soc/generic/audio-graph-card2-custom-sample1.dtsi
Normal file
@@ -0,0 +1,396 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* audio-graph-card2-custom-sample1.dtsi
|
||||
*
|
||||
* Copyright (C) 2020 Renesas Electronics Corp.
|
||||
* Copyright (C) 2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
*
|
||||
* This sample indicates how to use audio-graph-card2 and its
|
||||
* custom driver. "audio-graph-card2-custom-sample" is the custome driver
|
||||
* which is using audio-graph-card2.
|
||||
*
|
||||
* You can easily use this sample by adding below line on your DT file,
|
||||
* and add new CONFIG to your .config.
|
||||
*
|
||||
* #include "../../../../../sound/soc/generic/audio-graph-card2-custom-sample1.dtsi"
|
||||
*
|
||||
* CONFIG_SND_AUDIO_GRAPH_CARD2
|
||||
* CONFIG_SND_AUDIO_GRAPH_CARD2_CUSTOM_SAMPLE
|
||||
* CONFIG_SND_TEST_COMPONENT
|
||||
*
|
||||
*
|
||||
* You can indicate more detail each device behavior as debug if you modify
|
||||
* "compatible" on each test-component. see below
|
||||
*
|
||||
* test_cpu {
|
||||
* - compatible = "test-cpu";
|
||||
* + compatible = "test-cpu-verbose";
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
* test_codec {
|
||||
* - compatible = "test-codec";
|
||||
* + compatible = "test-codec-verbose";
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
*
|
||||
* Below sample doesn't use "format" property,
|
||||
* because test-component driver (test-cpu/test-codec) is supporting
|
||||
* snd_soc_dai_ops :: .auto_selectable_formats.
|
||||
* see
|
||||
* snd_soc_runtime_get_dai_fmt()
|
||||
* linux/sound/soc/generic/test-component.c :: test_dai_formats
|
||||
*/
|
||||
/ {
|
||||
audio-graph-card2-custom-sample-1 {
|
||||
/*
|
||||
* You can use audio-graph-card2 directly by using
|
||||
*
|
||||
* compatible = "audio-graph-card2";
|
||||
*/
|
||||
compatible = "audio-graph-card2-custom-sample";
|
||||
label = "card2-custom-sample-1";
|
||||
|
||||
/*
|
||||
* @ : used at links
|
||||
*/
|
||||
links = <
|
||||
/*
|
||||
*
|
||||
* [Normal]
|
||||
*
|
||||
* <cpu1_0>
|
||||
* cpu1_0 <-@-----> codec1_0
|
||||
*/
|
||||
&cpu1_0 /* CPU side only */
|
||||
|
||||
/*
|
||||
* [Semi-Multi]
|
||||
*
|
||||
* CPU:Codec = 1:N
|
||||
*
|
||||
* <sm> +-+
|
||||
* cpu1_1 <--@---->| |-> codec1_1
|
||||
* | |-> codec1_2
|
||||
* +-+
|
||||
*/
|
||||
&sm /* CPU side only */
|
||||
|
||||
/*
|
||||
* [Multi-CPU/Codec-A]
|
||||
*
|
||||
* +-+ <mcpuA> +-+
|
||||
* cpu1_2 <-| |<---@------>| |-> codec1_3
|
||||
* cpu1_3 <-| | | |-> codec1_4
|
||||
* +-+ +-+
|
||||
*/
|
||||
&mcpuA /* CPU side only */
|
||||
|
||||
/*
|
||||
* [Multi-CPU/Codec-B]
|
||||
*
|
||||
* +-+ <mcpuB> +-+
|
||||
* | |<---@------>| |
|
||||
* | | | |
|
||||
* cpu1_4 <-| |<---------->| |-> codec1_5
|
||||
* cpu1_5 <-| |<---+------>| |-> codec1_6
|
||||
* +-+ \----->| |-> codec1_7
|
||||
* +-+
|
||||
*/
|
||||
&mcpuB /* CPU side only */
|
||||
|
||||
/*
|
||||
* [Multi-CPU/Codec-C]
|
||||
*
|
||||
* +-+ <mcpuC> +-+
|
||||
* | |<---@------>| |
|
||||
* | | | |
|
||||
* cpu1_6 <-| |<---------->| |-> codec1_8
|
||||
* cpu1_7 <-| |<-----+---->| |-> codec1_9
|
||||
* cpu1_8 <-| |<----/ +-+
|
||||
* +-+
|
||||
*/
|
||||
&mcpuC /* CPU side only */
|
||||
>;
|
||||
|
||||
multi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/*
|
||||
* [Semi-Multi]
|
||||
*
|
||||
* <sm> +---+
|
||||
* cpu1_1 <---@--->|X A|-> codec1_1
|
||||
* | B|-> codec1_2
|
||||
* +---+
|
||||
*/
|
||||
ports@0 {
|
||||
reg = <0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; smcodec_ep: endpoint { remote-endpoint = <&cpu1_1_ep>; };};/* (X) to pair */
|
||||
port@1 { reg = <1>; smcodec_A_ep: endpoint { remote-endpoint = <&codec1_1_ep>; };};/* (A) Multi Element */
|
||||
port@2 { reg = <2>; smcodec_B_ep: endpoint { remote-endpoint = <&codec1_2_ep>; };};/* (B) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-CPU-A]
|
||||
*
|
||||
* +---+ <mcpuA> +---+
|
||||
* cpu1_2 <-|A X|<---@---->|x a|-> codec1_3
|
||||
* cpu1_3 <-|B | | b|-> codec1_4
|
||||
* +---+ +---+
|
||||
*/
|
||||
ports@1 {
|
||||
reg = <1>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mcpuA: port@0 { reg = <0>; mcpu_A_ep: endpoint { remote-endpoint = <&mcodec_A_ep>; };}; /* (X) to pair */
|
||||
port@1 { reg = <1>; mcpu_AA_ep: endpoint { remote-endpoint = <&cpu1_2_ep>; };}; /* (A) Multi Element */
|
||||
port@2 { reg = <2>; mcpu_AB_ep: endpoint { remote-endpoint = <&cpu1_3_ep>; };}; /* (B) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-Codec-A]
|
||||
*
|
||||
* +---+ <mcpuA> +---+
|
||||
* cpu1_2 <-|A X|<-@------>|x a|-> codec1_3
|
||||
* cpu1_3 <-|B | | b|-> codec1_4
|
||||
* +---+ +---+
|
||||
*/
|
||||
ports@2 {
|
||||
reg = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mcodec_A_ep: endpoint { remote-endpoint = <&mcpu_A_ep>; };}; /* (x) to pair */
|
||||
port@1 { reg = <1>; mcodec_Aa_ep: endpoint { remote-endpoint = <&codec1_3_ep>; };}; /* (a) Multi Element */
|
||||
port@2 { reg = <2>; mcodec_Ab_ep: endpoint { remote-endpoint = <&codec1_4_ep>; };}; /* (b) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-CPU-B]
|
||||
*
|
||||
* +---+ <mcpuB> +---+
|
||||
* | X|<---@---->|x |
|
||||
* | | | |
|
||||
* cpu1_4 <-|A 1|<-------->|3 a|-> codec1_5
|
||||
* cpu1_5 <-|B 2|<---+---->|4 b|-> codec1_6
|
||||
* +---+ \--->|5 c|-> codec1_7
|
||||
* +---+
|
||||
*/
|
||||
ports@3 {
|
||||
reg = <3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mcpuB: port@0 {
|
||||
reg = <0>;
|
||||
mcpu_BX_ep: endpoint { remote-endpoint = <&mcodec_Bx_ep>; }; /* (X) to pair */
|
||||
};
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcpu_BA_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu1_4_ep>; }; /* (A) Multi Element */
|
||||
mcpu_B1_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec_B3_ep>; }; /* (1) connected Codec */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcpu_BB_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu1_5_ep>; }; /* (B) Multi Element */
|
||||
mcpu_B2_0_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec_B4_ep>; }; /* (2) connected Codec */
|
||||
mcpu_B2_1_ep: endpoint@2 { reg = <2>; remote-endpoint = <&mcodec_B5_ep>; }; /* (2) connected Codec */
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-Codec-B]
|
||||
*
|
||||
* +---+ <mcpuB> +---+
|
||||
* | X|<-@------>|x |
|
||||
* | | | |
|
||||
* cpu1_4 <-|A 1|<-------->|3 a|-> codec1_5
|
||||
* cpu1_5 <-|B 2|<---+---->|4 b|-> codec1_6
|
||||
* +---+ \--->|5 c|-> codec1_7
|
||||
* +---+
|
||||
*/
|
||||
ports@4 {
|
||||
reg = <4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
mcodec_Bx_ep: endpoint { remote-endpoint = <&mcpu_BX_ep>; }; /* (x) to pair */
|
||||
};
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcodec_Ba_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec1_5_ep>;}; /* (a) Multi Element */
|
||||
mcodec_B3_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu_B1_ep>; }; /* (3) connected CPU */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcodec_Bb_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec1_6_ep>; }; /* (b) Multi Element */
|
||||
mcodec_B4_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu_B2_0_ep>;}; /* (4) connected CPU */
|
||||
};
|
||||
port@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
mcodec_Bc_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec1_7_ep>; }; /* (c) Multi Element */
|
||||
mcodec_B5_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu_B2_1_ep>;}; /* (5) connected CPU */
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-CPU-C]
|
||||
*
|
||||
* +---+ <mcpuC> +---+
|
||||
* | X|<-@------>|x |
|
||||
* | | | |
|
||||
* cpu1_6 <-|A 1|<-------->|4 a|-> codec1_8
|
||||
* cpu1_7 <-|B 2|<-----+-->|5 b|-> codec1_9
|
||||
* cpu1_8 <-|C 3|<----/ +---+
|
||||
* +---+
|
||||
*/
|
||||
ports@5 {
|
||||
reg = <5>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
mcpuC: port@0 {
|
||||
reg = <0>;
|
||||
mcpu_CX_ep: endpoint { remote-endpoint = <&mcodec_Cx_ep>; }; /* (X) to pair */
|
||||
};
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcpu_CA_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu1_6_ep>; }; /* (A) Multi Element */
|
||||
mcpu_C1_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec_C4_ep>; }; /* (1) connected Codec */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcpu_CB_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu1_7_ep>; }; /* (B) Multi Element */
|
||||
mcpu_C2_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec_C5_0_ep>; }; /* (2) connected Codec */
|
||||
};
|
||||
port@3 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <3>;
|
||||
mcpu_CC_ep: endpoint@0 { reg = <0>; remote-endpoint = <&cpu1_8_ep>; }; /* (C) Multi Element */
|
||||
mcpu_C3_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcodec_C5_1_ep>; }; /* (3) connected Codec */
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
* [Multi-Codec-C]
|
||||
*
|
||||
* +---+ <mcpuC> +---+
|
||||
* | X|<-@------>|x |
|
||||
* | | | |
|
||||
* cpu1_6 <-|A 1|<-------->|4 a|-> codec1_8
|
||||
* cpu1_7 <-|B 2|<-----+-->|5 b|-> codec1_9
|
||||
* cpu1_8 <-|C 3|<----/ +---+
|
||||
* +---+
|
||||
*/
|
||||
ports@6 {
|
||||
reg = <6>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
mcodec_Cx_ep: endpoint { remote-endpoint = <&mcpu_CX_ep>; }; /* (x) to pair */
|
||||
};
|
||||
port@1 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <1>;
|
||||
mcodec_Ca_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec1_8_ep>;}; /* (a) Multi Element */
|
||||
mcodec_C4_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu_C1_ep>; }; /* (4) connected CPU */
|
||||
};
|
||||
port@2 {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
reg = <2>;
|
||||
mcodec_Cb_ep: endpoint@0 { reg = <0>; remote-endpoint = <&codec1_9_ep>;}; /* (b) Multi Element */
|
||||
mcodec_C5_0_ep: endpoint@1 { reg = <1>; remote-endpoint = <&mcpu_C2_ep>; }; /* (5) connected CPU */
|
||||
mcodec_C5_1_ep: endpoint@2 { reg = <2>; remote-endpoint = <&mcpu_C3_ep>; }; /* (5) connected CPU */
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test_cpu_1 {
|
||||
/*
|
||||
* update compatible to indicate more detail behaviour
|
||||
* if you want. see test-compatible for more detail.
|
||||
*
|
||||
* ex)
|
||||
* - compatible = "test-cpu";
|
||||
* + compatible = "test-cpu-verbose";
|
||||
*/
|
||||
compatible = "test-cpu";
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
bitclock-master;
|
||||
frame-master;
|
||||
|
||||
/* [Normal] */
|
||||
cpu1_0: port@0 { reg = <0>; cpu1_0_ep: endpoint { remote-endpoint = <&codec1_0_ep>;}; };
|
||||
/* [Semi-Multi] */
|
||||
sm: port@1 { reg = <1>; cpu1_1_ep: endpoint { remote-endpoint = <&smcodec_ep>; }; };
|
||||
/* [Multi-CPU-A] */
|
||||
port@2 { reg = <2>; cpu1_2_ep: endpoint { remote-endpoint = <&mcpu_AA_ep>; }; };
|
||||
port@3 { reg = <3>; cpu1_3_ep: endpoint { remote-endpoint = <&mcpu_AB_ep>; }; };
|
||||
/* [Multi-CPU-B] */
|
||||
port@4 { reg = <4>; cpu1_4_ep: endpoint { remote-endpoint = <&mcpu_BA_ep>; }; };
|
||||
port@5 { reg = <5>; cpu1_5_ep: endpoint { remote-endpoint = <&mcpu_BB_ep>; }; };
|
||||
/* [Multi-CPU-C] */
|
||||
port@6 { reg = <6>; cpu1_6_ep: endpoint { remote-endpoint = <&mcpu_CA_ep>; }; };
|
||||
port@7 { reg = <7>; cpu1_7_ep: endpoint { remote-endpoint = <&mcpu_CB_ep>; }; };
|
||||
port@8 { reg = <8>; cpu1_8_ep: endpoint { remote-endpoint = <&mcpu_CC_ep>; }; };
|
||||
};
|
||||
};
|
||||
|
||||
test_codec_1 {
|
||||
/*
|
||||
* update compatible to indicate more detail behaviour
|
||||
* if you want. see test-compatible for more detail.
|
||||
*
|
||||
* ex)
|
||||
* - compatible = "test-codec";
|
||||
* + compatible = "test-codec-verbose";
|
||||
*/
|
||||
compatible = "test-codec";
|
||||
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* [Normal] */
|
||||
port@0 { reg = <0>; codec1_0_ep: endpoint { remote-endpoint = <&cpu1_0_ep>; }; };
|
||||
/* [Semi-Multi] */
|
||||
port@1 { reg = <1>; codec1_1_ep: endpoint { remote-endpoint = <&smcodec_A_ep>; }; };
|
||||
port@2 { reg = <2>; codec1_2_ep: endpoint { remote-endpoint = <&smcodec_B_ep>; }; };
|
||||
/* [Multi-Codec-0] */
|
||||
port@3 { reg = <3>; codec1_3_ep: endpoint { remote-endpoint = <&mcodec_Aa_ep>; }; };
|
||||
port@4 { reg = <4>; codec1_4_ep: endpoint { remote-endpoint = <&mcodec_Ab_ep>; }; };
|
||||
/* [Multi-Codec-1] */
|
||||
port@5 { reg = <5>; codec1_5_ep: endpoint { remote-endpoint = <&mcodec_Ba_ep>; }; };
|
||||
port@6 { reg = <6>; codec1_6_ep: endpoint { remote-endpoint = <&mcodec_Bb_ep>; }; };
|
||||
port@7 { reg = <7>; codec1_7_ep: endpoint { remote-endpoint = <&mcodec_Bc_ep>; }; };
|
||||
/* [Multi-Codec-2] */
|
||||
port@8 { reg = <8>; codec1_8_ep: endpoint { remote-endpoint = <&mcodec_Ca_ep>; }; };
|
||||
port@9 { reg = <9>; codec1_9_ep: endpoint { remote-endpoint = <&mcodec_Cb_ep>; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
382
sound/soc/generic/audio-graph-card2-custom-sample2.dtsi
Normal file
382
sound/soc/generic/audio-graph-card2-custom-sample2.dtsi
Normal file
@@ -0,0 +1,382 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
/*
|
||||
* audio-graph-card2-custom-sample2.dtsi
|
||||
*
|
||||
* Copyright (C) 2020 Renesas Electronics Corp.
|
||||
* Copyright (C) 2020 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
|
||||
*
|
||||
* This sample indicates how to use audio-graph-card2 and its
|
||||
* custom driver. "audio-graph-card2-custom-sample" is the custome driver
|
||||
* which is using audio-graph-card2.
|
||||
*
|
||||
* You can easily use this sample by adding below line on your DT file,
|
||||
* and add new CONFIG to your .config.
|
||||
*
|
||||
* #include "../../../../../sound/soc/generic/audio-graph-card2-custom-sample2.dtsi"
|
||||
*
|
||||
* CONFIG_SND_AUDIO_GRAPH_CARD2
|
||||
* CONFIG_SND_AUDIO_GRAPH_CARD2_CUSTOM_SAMPLE
|
||||
* CONFIG_SND_TEST_COMPONENT
|
||||
*
|
||||
*
|
||||
* You can indicate more detail each device behavior as debug if you modify
|
||||
* "compatible" on each test-component. see below
|
||||
*
|
||||
* test_cpu {
|
||||
* - compatible = "test-cpu";
|
||||
* + compatible = "test-cpu-verbose";
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
* test_codec {
|
||||
* - compatible = "test-codec";
|
||||
* + compatible = "test-codec-verbose";
|
||||
* ...
|
||||
* };
|
||||
*
|
||||
*
|
||||
* Below sample doesn't use "format" property,
|
||||
* because test-component driver (test-cpu/test-codec) is supporting
|
||||
* snd_soc_dai_ops :: .auto_selectable_formats.
|
||||
* see
|
||||
* snd_soc_runtime_get_dai_fmt()
|
||||
* linux/sound/soc/generic/test-component.c :: test_dai_formats
|
||||
*/
|
||||
/ {
|
||||
audio-graph-card2-custom-sample-2 {
|
||||
/*
|
||||
* You can use audio-graph-card2 directly by using
|
||||
*
|
||||
* compatible = "audio-graph-card2";
|
||||
*/
|
||||
compatible = "audio-graph-card2-custom-sample";
|
||||
label = "card2-custom-sample-2";
|
||||
|
||||
/* for [DPCM] */
|
||||
/* BE FE */
|
||||
routing = "TC DAI0 Playback", "DAI0 Playback",
|
||||
"TC DAI0 Playback", "DAI1 Playback",
|
||||
"DAI0 Capture", "TC DAI0 Capture",
|
||||
"DAI1 Capture", "TC DAI0 Capture",
|
||||
/* for [DPCM-Multi] */
|
||||
/* BE FE */
|
||||
"TC DAI1 Playback", "DAI2 Playback",
|
||||
"TC DAI2 Playback", "DAI2 Playback",
|
||||
"TC DAI1 Playback", "DAI3 Playback",
|
||||
"TC DAI2 Playback", "DAI3 Playback",
|
||||
"DAI2 Capture", "TC DAI1 Capture",
|
||||
"DAI2 Capture", "TC DAI2 Capture",
|
||||
"DAI3 Capture", "TC DAI1 Capture",
|
||||
"DAI3 Capture", "TC DAI2 Capture",
|
||||
/* for [Codec2Codec] */
|
||||
"TC OUT", "TC DAI4 Playback",
|
||||
"TC DAI3 Capture", "TC IN",
|
||||
/* for [Codec2Codec-Multi] */
|
||||
"TC OUT", "TC DAI7 Playback",
|
||||
"TC DAI5 Capture", "TC IN",
|
||||
"TC OUT", "TC DAI8 Playback",
|
||||
"TC DAI6 Capture", "TC IN";
|
||||
|
||||
/*
|
||||
* @ : used at links
|
||||
*/
|
||||
links = <
|
||||
/*
|
||||
* [DPCM]
|
||||
*
|
||||
* cpu20/cpu21 are converting rate to 44.1kHz
|
||||
*
|
||||
* FE BE
|
||||
* <feA> **** <beA>
|
||||
* cpu2_0 <----@---* *------@---> codec2_0 (44.1kHz)
|
||||
* cpu2_1 <----@---* *
|
||||
* <feB> ****
|
||||
*/
|
||||
&feA &feB &beA /* both FE / BE */
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]
|
||||
*
|
||||
* FE BE
|
||||
* <feC> **** <beB> +-+
|
||||
* cpu2_2 <----@---* *------@---> | | -> codec2_1
|
||||
* cpu2_3 <----@---* * | | -> codec2_2
|
||||
* <feD> **** +-+
|
||||
*/
|
||||
&feC &feD &beB /* both FE / BE*/
|
||||
|
||||
/*
|
||||
* [Codec2Codec]
|
||||
*
|
||||
* <c2c>
|
||||
* +-@-> codec2_3
|
||||
* |
|
||||
* +---> codec2_4
|
||||
*/
|
||||
&c2c /* CPU side only */
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]
|
||||
*
|
||||
* --NOTE--
|
||||
* Multi connect N:M is not supported by ASoC.
|
||||
*
|
||||
* <c2c_m> +-+
|
||||
* +---@-->| |-> codec2_5
|
||||
* | | |-> codec2_6
|
||||
* | +-+
|
||||
* | +-+
|
||||
* +------>| |-> codec2_7
|
||||
* | |-> codec2_8
|
||||
* +-+
|
||||
*/
|
||||
&c2c_m /* CPU side only */
|
||||
>;
|
||||
|
||||
multi {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]::BE
|
||||
*
|
||||
* FE BE
|
||||
* <feC> **** <beB> +---+
|
||||
* cpu2_2 <----@---* *------@---> |x a| -> codec2_1
|
||||
* cpu2_3 <----@---* * | b| -> codec2_2
|
||||
* <feD> **** +---+
|
||||
*/
|
||||
ports@2 {
|
||||
reg = <2>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mbe_x_ep: endpoint { remote-endpoint = <&beB_ep>; };};/* (x) to pair */
|
||||
port@1 { reg = <1>; mbe_a_ep: endpoint { remote-endpoint = <&codec2_1_ep>; };};/* (a) Multi Element */
|
||||
port@2 { reg = <2>; mbe_b_ep: endpoint { remote-endpoint = <&codec2_2_ep>; };};/* (b) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]::CPU
|
||||
*
|
||||
* <c2c_m> c2cmf +---+
|
||||
* +---@---------->|X A|-> codec2_5
|
||||
* | | B|-> codec2_6
|
||||
* | +---+
|
||||
* | c2cmb +---+
|
||||
* +-------------->|x a|-> codec2_7
|
||||
* | b|-> codec2_8
|
||||
* +---+
|
||||
*/
|
||||
ports@3 {
|
||||
reg = <3>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mc2c0X_ep: endpoint { remote-endpoint = <&c2cmf_ep>; };};/* (X) to pair */
|
||||
port@1 { reg = <1>; mc2c0A_ep: endpoint { remote-endpoint = <&codec2_5_ep>; };};/* (A) Multi Element */
|
||||
port@2 { reg = <2>; mc2c0B_ep: endpoint { remote-endpoint = <&codec2_6_ep>; };};/* (B) Multi Element */
|
||||
};
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]::Codec
|
||||
*
|
||||
* <c2c_m> c2cmf +---+
|
||||
* +---@---------->|X A|-> codec2_5
|
||||
* | | B|-> codec2_6
|
||||
* | +---+
|
||||
* | c2cmb +---+
|
||||
* +-------------->|x a|-> codec2_7
|
||||
* | b|-> codec2_8
|
||||
* +---+
|
||||
*/
|
||||
ports@4 {
|
||||
reg = <4>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
port@0 { reg = <0>; mc2c1x_ep: endpoint { remote-endpoint = <&c2cmb_ep>; };};/* (x) to pair */
|
||||
port@1 { reg = <1>; mc2c1a_ep: endpoint { remote-endpoint = <&codec2_7_ep>; };};/* (a) Multi Element */
|
||||
port@2 { reg = <2>; mc2c1b_ep: endpoint { remote-endpoint = <&codec2_8_ep>; };};/* (b) Multi Element */
|
||||
};
|
||||
};
|
||||
|
||||
dpcm {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* FE part */
|
||||
ports@0 {
|
||||
reg = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
/*
|
||||
* [DPCM]::FE
|
||||
*
|
||||
* FE BE
|
||||
* <feA> **** <beA>
|
||||
* cpu2_0 <----@---* *------@---> codec2_0 (44.1kHz)
|
||||
* cpu2_1 <----@---* *
|
||||
* <feB> ****
|
||||
*/
|
||||
feA: port@0 { reg = <0>; feA_ep: endpoint { remote-endpoint = <&cpu2_0_ep>; }; };
|
||||
feB: port@1 { reg = <1>; feB_ep: endpoint { remote-endpoint = <&cpu2_1_ep>; }; };
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]::FE
|
||||
*
|
||||
* FE BE
|
||||
* <feC> **** <beB> +-+
|
||||
* cpu2_2 <----@---* *------@---> | | -> codec2_1
|
||||
* cpu2_3 <----@---* * | | -> codec2_2
|
||||
* <feD> **** +-+
|
||||
*/
|
||||
feC: port@2 { reg = <2>; feC_ep: endpoint { remote-endpoint = <&cpu2_2_ep>; }; };
|
||||
feD: port@3 { reg = <3>; feD_ep: endpoint { remote-endpoint = <&cpu2_3_ep>; }; };
|
||||
};
|
||||
|
||||
/* BE part */
|
||||
ports@1 {
|
||||
reg = <1>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
/*
|
||||
* [DPCM]::BE
|
||||
*
|
||||
* FE BE
|
||||
* <feA> **** <beA>
|
||||
* cpu2_0 <----@---* *------@---> codec2_0 (44.1kHz)
|
||||
* cpu2_1 <----@---* *
|
||||
* <feB> ****
|
||||
*/
|
||||
beA: port@0 { reg = <0>; beA_ep: endpoint { remote-endpoint = <&codec2_0_ep>; }; };
|
||||
|
||||
/*
|
||||
* [DPCM-Multi]::BE
|
||||
*
|
||||
* FE BE
|
||||
* <feC> **** <beB> +-------+
|
||||
* cpu2_2 <----@---* *------@---> |mbe_x | -> codec2_1
|
||||
* cpu2_3 <----@---* * | | -> codec2_2
|
||||
* <feD> **** +-------+
|
||||
*/
|
||||
beB: port@1 { reg = <1>; beB_ep: endpoint { remote-endpoint = <&mbe_x_ep>; }; };
|
||||
};
|
||||
};
|
||||
|
||||
codec2codec {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
/*
|
||||
* [Codec2Codec]
|
||||
*
|
||||
* <c2c>
|
||||
* +-@--> codec2_3
|
||||
* |
|
||||
* +----> codec2_4
|
||||
*/
|
||||
ports@0 {
|
||||
reg = <0>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* use default settings */
|
||||
c2c: port@0 { reg = <0>; c2cf_ep: endpoint { remote-endpoint = <&codec2_3_ep>; }; };
|
||||
port@1 { reg = <1>; c2cb_ep: endpoint { remote-endpoint = <&codec2_4_ep>; }; };
|
||||
};
|
||||
|
||||
/*
|
||||
* [Codec2Codec-Multi]
|
||||
*
|
||||
* <c2c_m> c2cmf +--------+
|
||||
* +---@---------->|mc2c0X |-> codec2_5
|
||||
* | | |-> codec2_6
|
||||
* | +--------+
|
||||
* | c2cmb +--------+
|
||||
* +-------------->|mc2c1x |-> codec2_7
|
||||
* | |-> codec2_8
|
||||
* +--------+
|
||||
*/
|
||||
ports@1 {
|
||||
reg = <1>;
|
||||
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* use original settings */
|
||||
rate = <48000>;
|
||||
c2c_m: port@0 { reg = <0>; c2cmf_ep: endpoint { remote-endpoint = <&mc2c0X_ep>; }; };
|
||||
port@1 { reg = <1>; c2cmb_ep: endpoint { remote-endpoint = <&mc2c1x_ep>; }; };
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
test_cpu_2 {
|
||||
/*
|
||||
* update compatible to indicate more detail behaviour
|
||||
* if you want. see test-compatible for more detail.
|
||||
*
|
||||
* ex)
|
||||
* - compatible = "test-cpu";
|
||||
* + compatible = "test-cpu-verbose";
|
||||
*/
|
||||
compatible = "test-cpu";
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
bitclock-master;
|
||||
frame-master;
|
||||
|
||||
/* [DPCM]::FE */
|
||||
port@0 { reg = <0>; cpu2_0_ep: endpoint { remote-endpoint = <&feA_ep>; };};
|
||||
port@1 { reg = <1>; cpu2_1_ep: endpoint { remote-endpoint = <&feB_ep>; };};
|
||||
/* [DPCM-Multi]::FE */
|
||||
port@2 { reg = <2>; cpu2_2_ep: endpoint { remote-endpoint = <&feC_ep>; };};
|
||||
port@3 { reg = <3>; cpu2_3_ep: endpoint { remote-endpoint = <&feD_ep>; };};
|
||||
};
|
||||
};
|
||||
|
||||
test_codec_2 {
|
||||
/*
|
||||
* update compatible to indicate more detail behaviour
|
||||
* if you want. see test-compatible for more detail.
|
||||
*
|
||||
* ex)
|
||||
* - compatible = "test-codec";
|
||||
* + compatible = "test-codec-verbose";
|
||||
*/
|
||||
compatible = "test-codec";
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/*
|
||||
* prefix can be added to *component*,
|
||||
* see audio-graph-card2::routing
|
||||
*/
|
||||
prefix = "TC";
|
||||
|
||||
/* [DPCM]::BE */
|
||||
port@0 {
|
||||
convert-rate = <44100>;
|
||||
reg = <0>; codec2_0_ep: endpoint { remote-endpoint = <&beA_ep>; };
|
||||
};
|
||||
/* [DPCM-Multi]::BE */
|
||||
port@1 { reg = <1>; codec2_1_ep: endpoint { remote-endpoint = <&mbe_a_ep>; };};
|
||||
port@2 { reg = <2>; codec2_2_ep: endpoint { remote-endpoint = <&mbe_b_ep>; };};
|
||||
/* [Codec2Codec] */
|
||||
port@3 { bitclock-master;
|
||||
frame-master;
|
||||
reg = <3>; codec2_3_ep: endpoint { remote-endpoint = <&c2cf_ep>; };};
|
||||
port@4 { reg = <4>; codec2_4_ep: endpoint { remote-endpoint = <&c2cb_ep>; };};
|
||||
/* [Codec2Codec-Multi] */
|
||||
port@5 { bitclock-master;
|
||||
frame-master;
|
||||
reg = <5>; codec2_5_ep: endpoint { remote-endpoint = <&mc2c0A_ep>; };};
|
||||
port@6 { reg = <6>; codec2_6_ep: endpoint { remote-endpoint = <&mc2c0B_ep>; };};
|
||||
port@7 { reg = <7>; codec2_7_ep: endpoint { remote-endpoint = <&mc2c1a_ep>; };};
|
||||
port@8 { reg = <8>; codec2_8_ep: endpoint { remote-endpoint = <&mc2c1b_ep>; };};
|
||||
};
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user