]> git.kernelconcepts.de Git - karo-tx-linux.git/blob - Documentation/devicetree/bindings/sound/audio-graph-card.txt
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi...
[karo-tx-linux.git] / Documentation / devicetree / bindings / sound / audio-graph-card.txt
1 Audio Graph Card:
2
3 Audio Graph Card specifies audio DAI connections of SoC <-> codec.
4 It is based on common bindings for device graphs.
5 see ${LINUX}/Documentation/devicetree/bindings/graph.txt
6
7 Basically, Audio Graph Card property is same as Simple Card.
8 see ${LINUX}/Documentation/devicetree/bindings/sound/simple-card.txt
9
10 Below are same as Simple-Card.
11
12 - label
13 - widgets
14 - routing
15 - dai-format
16 - frame-master
17 - bitclock-master
18 - bitclock-inversion
19 - frame-inversion
20 - dai-tdm-slot-num
21 - dai-tdm-slot-width
22 - clocks / system-clock-frequency
23
24 Required properties:
25
26 - compatible                            : "audio-graph-card";
27 - dais                                  : list of CPU DAI port{s}
28
29 Optional properties:
30 - pa-gpios: GPIO used to control external amplifier.
31
32 Example: Single DAI case
33
34         sound_card {
35                 compatible = "audio-graph-card";
36
37                 dais = <&cpu_port>;
38         };
39
40         dai-controller {
41                 ...
42                 cpu_port: port {
43                         cpu_endpoint: endpoint {
44                                 remote-endpoint = <&codec_endpoint>;
45
46                                 dai-format = "left_j";
47                                 ...
48                         };
49                 };
50         };
51
52         audio-codec {
53                 ...
54                 port {
55                         codec_endpoint: endpoint {
56                                 remote-endpoint = <&cpu_endpoint>;
57                         };
58                 };
59         };
60
61 Example: Multi DAI case
62
63         sound-card {
64                 compatible = "audio-graph-card";
65
66                 label = "sound-card";
67
68                 dais = <&cpu_port0
69                         &cpu_port1
70                         &cpu_port2>;
71         };
72
73         audio-codec@0 {
74                 ...
75                 port {
76                         codec0_endpoint: endpoint {
77                                 remote-endpoint = <&cpu_endpoint0>;
78                         };
79                 };
80         };
81
82         audio-codec@1 {
83                 ...
84                 port {
85                         codec1_endpoint: endpoint {
86                                 remote-endpoint = <&cpu_endpoint1>;
87                         };
88                 };
89         };
90
91         audio-codec@2 {
92                 ...
93                 port {
94                         codec2_endpoint: endpoint {
95                                 remote-endpoint = <&cpu_endpoint2>;
96                         };
97                 };
98         };
99
100         dai-controller {
101                 ...
102                 ports {
103                         cpu_port0: port@0 {
104                                 cpu_endpoint0: endpoint {
105                                         remote-endpoint = <&codec0_endpoint>;
106
107                                         dai-format = "left_j";
108                                         ...
109                                 };
110                         };
111                         cpu_port1: port@1 {
112                                 cpu_endpoint1: endpoint {
113                                         remote-endpoint = <&codec1_endpoint>;
114
115                                         dai-format = "i2s";
116                                         ...
117                                 };
118                         };
119                         cpu_port2: port@2 {
120                                 cpu_endpoint2: endpoint {
121                                         remote-endpoint = <&codec2_endpoint>;
122
123                                         dai-format = "i2s";
124                                         ...
125                                 };
126                         };
127                 };
128         };
129