3 Simple-Card specifies audio DAI connections of SoC <-> codec.
7 - compatible : "simple-audio-card"
11 - simple-audio-card,name : User specified audio sound card name, one string
13 - simple-audio-card,widgets : Please refer to widgets.txt.
14 - simple-audio-card,routing : A list of the connections between audio components.
15 Each entry is a pair of strings, the first being the
16 connection's sink, the second being the connection's
18 - simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
19 mclk. When defined, mclk-fs property defined in
20 dai-link sub nodes are ignored.
21 - simple-audio-card,hp-det-gpio : Reference to GPIO that signals when
22 headphones are attached.
23 - simple-audio-card,mic-det-gpio : Reference to GPIO that signals when
24 a microphone is attached.
25 - simple-audio-card,aux-devs : List of phandles pointing to auxiliary devices, such
26 as amplifiers, to be added to the sound card.
27 - simple-audio-card,pin-switches : List of strings containing the widget names for
28 which pin switches must be created.
32 - simple-audio-card,dai-link : Container for dai-link level
33 properties and the CPU and CODEC
34 sub-nodes. This container may be
35 omitted when the card has only one
36 DAI link. See the examples and the
39 Dai-link subnode properties and subnodes:
41 If dai-link subnode is omitted and the subnode properties are directly
42 under "sound"-node the subnode property and subnode names have to be
43 prefixed with "simple-audio-card,"-prefix.
45 Required dai-link subnodes:
48 - codec : CODEC sub-node
50 Optional dai-link subnode properties:
52 - format : CPU/CODEC common audio format.
53 "i2s", "right_j", "left_j" , "dsp_a"
54 "dsp_b", "ac97", "pdm", "msb", "lsb"
55 - frame-master : Indicates dai-link frame master.
56 phandle to a cpu or codec subnode.
57 - bitclock-master : Indicates dai-link bit clock master.
58 phandle to a cpu or codec subnode.
59 - bitclock-inversion : bool property. Add this if the
60 dai-link uses bit clock inversion.
61 - frame-inversion : bool property. Add this if the
62 dai-link uses frame clock inversion.
63 - mclk-fs : Multiplication factor between stream
64 rate and codec mclk, applied only for
67 For backward compatibility the frame-master and bitclock-master
68 properties can be used as booleans in codec subnode to indicate if the
69 codec is the dai-link frame or bit clock master. In this case there
70 should be no dai-link node, the same properties should not be present
71 at sound-node level, and the bitclock-inversion and frame-inversion
72 properties should also be placed in the codec node if needed.
74 Required CPU/CODEC subnodes properties:
76 - sound-dai : phandle and port of CPU/CODEC
78 Optional CPU/CODEC subnodes properties:
80 - dai-tdm-slot-num : Please refer to tdm-slot.txt.
81 - dai-tdm-slot-width : Please refer to tdm-slot.txt.
82 - clocks / system-clock-frequency : specify subnode's clock if needed.
83 it can be specified via "clocks" if system has
84 clock node (= common clock), or "system-clock-frequency"
85 (if system doens't support common clock)
86 If a clock is specified, it is
87 enabled with clk_prepare_enable()
88 in dai startup() and disabled with
89 clk_disable_unprepare() in dai
91 If a clock is specified and a
92 multiplication factor is given with
93 mclk-fs, the clock will be set to the
94 calculated mclk frequency when the
96 - system-clock-direction-out : specifies clock direction as 'out' on
97 initialization. It is useful for some aCPUs with
100 -------------------------------------------
101 Example 1 - single DAI link:
102 -------------------------------------------
105 compatible = "simple-audio-card";
106 simple-audio-card,name = "VF610-Tower-Sound-Card";
107 simple-audio-card,format = "left_j";
108 simple-audio-card,bitclock-master = <&dailink0_master>;
109 simple-audio-card,frame-master = <&dailink0_master>;
110 simple-audio-card,widgets =
111 "Microphone", "Microphone Jack",
112 "Headphone", "Headphone Jack",
113 "Speaker", "External Speaker";
114 simple-audio-card,routing =
115 "MIC_IN", "Microphone Jack",
116 "Headphone Jack", "HP_OUT",
117 "External Speaker", "LINE_OUT";
119 simple-audio-card,cpu {
120 sound-dai = <&sh_fsi2 0>;
123 dailink0_master: simple-audio-card,codec {
124 sound-dai = <&ak4648>;
131 #sound-dai-cells = <0>;
132 compatible = "asahi-kasei,ak4648";
137 sh_fsi2: sh_fsi2@ec230000 {
138 #sound-dai-cells = <1>;
139 compatible = "renesas,sh_fsi2";
140 reg = <0xec230000 0x400>;
141 interrupt-parent = <&gic>;
142 interrupts = <0 146 0x4>;
145 -------------------------------------------
146 Example 2 - many DAI links:
147 -------------------------------------------
150 compatible = "simple-audio-card";
151 simple-audio-card,name = "Cubox Audio";
153 simple-audio-card,dai-link@0 { /* I2S - HDMI */
157 sound-dai = <&audio1 0>;
160 sound-dai = <&tda998x 0>;
164 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
167 sound-dai = <&audio1 1>;
170 sound-dai = <&tda998x 1>;
174 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
177 sound-dai = <&audio1 1>;
180 sound-dai = <&spdif_codec>;
185 -------------------------------------------
186 Example 3 - route audio from IMX6 SSI2 through TLV320DAC3100 codec
187 through TPA6130A2 amplifier to headphones:
188 -------------------------------------------
191 codec: tlv320dac3100@18 {
192 compatible = "ti,tlv320dac3100";
197 compatible = "ti,tpa6130a2";
203 compatible = "simple-audio-card";
205 simple-audio-card,widgets =
206 "Headphone", "Headphone Jack";
207 simple-audio-card,routing =
208 "Headphone Jack", "HPLEFT",
209 "Headphone Jack", "HPRIGHT",
212 simple-audio-card,aux-devs = <&>;
213 simple-audio-card,cpu {
216 simple-audio-card,codec {
217 sound-dai = <&codec>;
222 -------------------------------------------
223 Example 4. Sampling Rate Conversion
224 -------------------------------------------
227 compatible = "simple-audio-card";
229 simple-audio-card,name = "rsnd-ak4643";
230 simple-audio-card,format = "left_j";
231 simple-audio-card,bitclock-master = <&sndcodec>;
232 simple-audio-card,frame-master = <&sndcodec>;
234 simple-audio-card,convert-rate = <48000>;
236 simple-audio-card,prefix = "ak4642";
237 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
238 "DAI0 Capture", "ak4642 Capture";
240 sndcpu: simple-audio-card,cpu {
241 sound-dai = <&rcar_sound>;
244 sndcodec: simple-audio-card,codec {
245 sound-dai = <&ak4643>;
246 system-clock-frequency = <11289600>;
250 -------------------------------------------
251 Example 5. 2 CPU 1 Codec (Mixing)
252 -------------------------------------------
254 compatible = "simple-audio-card";
256 simple-audio-card,name = "rsnd-ak4643";
257 simple-audio-card,format = "left_j";
258 simple-audio-card,bitclock-master = <&dpcmcpu>;
259 simple-audio-card,frame-master = <&dpcmcpu>;
261 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
262 "ak4642 Playback", "DAI1 Playback";
265 sound-dai = <&rcar_sound 0>;
269 sound-dai = <&rcar_sound 1>;
274 sound-dai = <&ak4643>;
275 clocks = <&audio_clock>;
279 -------------------------------------------
280 Example 6 - many DAI links with DPCM:
281 -------------------------------------------
284 CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */
285 CPU2 --/ /* DPCM 3ch/4ch */
286 CPU3 --/ /* DPCM 5ch/6ch */
287 CPU4 --/ /* DPCM 7ch/8ch */
288 CPU5 ------ PCM3168A-c
291 compatible = "simple-audio-card";
293 simple-audio-card,routing =
294 "pcm3168a Playback", "DAI1 Playback",
295 "pcm3168a Playback", "DAI2 Playback",
296 "pcm3168a Playback", "DAI3 Playback",
297 "pcm3168a Playback", "DAI4 Playback";
299 simple-audio-card,dai-link@0 {
301 bitclock-master = <&sndcpu0>;
302 frame-master = <&sndcpu0>;
305 sound-dai = <&rcar_sound 0>;
308 sound-dai = <&ak4613>;
311 simple-audio-card,dai-link@1 {
313 bitclock-master = <&sndcpu1>;
314 frame-master = <&sndcpu1>;
316 convert-channels = <8>; /* TDM Split */
319 sound-dai = <&rcar_sound 1>;
322 sound-dai = <&rcar_sound 2>;
325 sound-dai = <&rcar_sound 3>;
328 sound-dai = <&rcar_sound 4>;
333 dai-tdm-slot-num = <8>;
334 sound-dai = <&pcm3168a 0>;
337 simple-audio-card,dai-link@2 {
339 bitclock-master = <&sndcpu2>;
340 frame-master = <&sndcpu2>;
343 sound-dai = <&rcar_sound 5>;
348 sound-dai = <&pcm3168a 1>;