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