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.
30 - simple-audio-card,dai-link : Container for dai-link level
31 properties and the CPU and CODEC
32 sub-nodes. This container may be
33 omitted when the card has only one
34 DAI link. See the examples and the
37 Dai-link subnode properties and subnodes:
39 If dai-link subnode is omitted and the subnode properties are directly
40 under "sound"-node the subnode property and subnode names have to be
41 prefixed with "simple-audio-card,"-prefix.
43 Required dai-link subnodes:
46 - codec : CODEC sub-node
48 Optional dai-link subnode properties:
50 - format : CPU/CODEC common audio format.
51 "i2s", "right_j", "left_j" , "dsp_a"
52 "dsp_b", "ac97", "pdm", "msb", "lsb"
53 - frame-master : Indicates dai-link frame master.
54 phandle to a cpu or codec subnode.
55 - bitclock-master : Indicates dai-link bit clock master.
56 phandle to a cpu or codec subnode.
57 - bitclock-inversion : bool property. Add this if the
58 dai-link uses bit clock inversion.
59 - frame-inversion : bool property. Add this if the
60 dai-link uses frame clock inversion.
61 - mclk-fs : Multiplication factor between stream
62 rate and codec mclk, applied only for
65 For backward compatibility the frame-master and bitclock-master
66 properties can be used as booleans in codec subnode to indicate if the
67 codec is the dai-link frame or bit clock master. In this case there
68 should be no dai-link node, the same properties should not be present
69 at sound-node level, and the bitclock-inversion and frame-inversion
70 properties should also be placed in the codec node if needed.
72 Required CPU/CODEC subnodes properties:
74 - sound-dai : phandle and port of CPU/CODEC
76 Optional CPU/CODEC subnodes properties:
78 - dai-tdm-slot-num : Please refer to tdm-slot.txt.
79 - dai-tdm-slot-width : Please refer to tdm-slot.txt.
80 - clocks / system-clock-frequency : specify subnode's clock if needed.
81 it can be specified via "clocks" if system has
82 clock node (= common clock), or "system-clock-frequency"
83 (if system doens't support common clock)
84 If a clock is specified, it is
85 enabled with clk_prepare_enable()
86 in dai startup() and disabled with
87 clk_disable_unprepare() in dai
89 If a clock is specified and a
90 multiplication factor is given with
91 mclk-fs, the clock will be set to the
92 calculated mclk frequency when the
94 - system-clock-direction-out : specifies clock direction as 'out' on
95 initialization. It is useful for some aCPUs with
98 -------------------------------------------
99 Example 1 - single DAI link:
100 -------------------------------------------
103 compatible = "simple-audio-card";
104 simple-audio-card,name = "VF610-Tower-Sound-Card";
105 simple-audio-card,format = "left_j";
106 simple-audio-card,bitclock-master = <&dailink0_master>;
107 simple-audio-card,frame-master = <&dailink0_master>;
108 simple-audio-card,widgets =
109 "Microphone", "Microphone Jack",
110 "Headphone", "Headphone Jack",
111 "Speaker", "External Speaker";
112 simple-audio-card,routing =
113 "MIC_IN", "Microphone Jack",
114 "Headphone Jack", "HP_OUT",
115 "External Speaker", "LINE_OUT";
117 simple-audio-card,cpu {
118 sound-dai = <&sh_fsi2 0>;
121 dailink0_master: simple-audio-card,codec {
122 sound-dai = <&ak4648>;
129 #sound-dai-cells = <0>;
130 compatible = "asahi-kasei,ak4648";
135 sh_fsi2: sh_fsi2@ec230000 {
136 #sound-dai-cells = <1>;
137 compatible = "renesas,sh_fsi2";
138 reg = <0xec230000 0x400>;
139 interrupt-parent = <&gic>;
140 interrupts = <0 146 0x4>;
143 -------------------------------------------
144 Example 2 - many DAI links:
145 -------------------------------------------
148 compatible = "simple-audio-card";
149 simple-audio-card,name = "Cubox Audio";
151 simple-audio-card,dai-link@0 { /* I2S - HDMI */
155 sound-dai = <&audio1 0>;
158 sound-dai = <&tda998x 0>;
162 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
165 sound-dai = <&audio1 1>;
168 sound-dai = <&tda998x 1>;
172 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
175 sound-dai = <&audio1 1>;
178 sound-dai = <&spdif_codec>;
183 -------------------------------------------
184 Example 3 - route audio from IMX6 SSI2 through TLV320DAC3100 codec
185 through TPA6130A2 amplifier to headphones:
186 -------------------------------------------
189 codec: tlv320dac3100@18 {
190 compatible = "ti,tlv320dac3100";
195 compatible = "ti,tpa6130a2";
201 compatible = "simple-audio-card";
203 simple-audio-card,widgets =
204 "Headphone", "Headphone Jack";
205 simple-audio-card,routing =
206 "Headphone Jack", "HPLEFT",
207 "Headphone Jack", "HPRIGHT",
210 simple-audio-card,aux-devs = <&>;
211 simple-audio-card,cpu {
214 simple-audio-card,codec {
215 sound-dai = <&codec>;
220 -------------------------------------------
221 Example 4. Sampling Rate Conversion
222 -------------------------------------------
225 compatible = "simple-audio-card";
227 simple-audio-card,name = "rsnd-ak4643";
228 simple-audio-card,format = "left_j";
229 simple-audio-card,bitclock-master = <&sndcodec>;
230 simple-audio-card,frame-master = <&sndcodec>;
232 simple-audio-card,convert-rate = <48000>;
234 simple-audio-card,prefix = "ak4642";
235 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
236 "DAI0 Capture", "ak4642 Capture";
238 sndcpu: simple-audio-card,cpu {
239 sound-dai = <&rcar_sound>;
242 sndcodec: simple-audio-card,codec {
243 sound-dai = <&ak4643>;
244 system-clock-frequency = <11289600>;
248 -------------------------------------------
249 Example 5. 2 CPU 1 Codec (Mixing)
250 -------------------------------------------
252 compatible = "simple-audio-card";
254 simple-audio-card,name = "rsnd-ak4643";
255 simple-audio-card,format = "left_j";
256 simple-audio-card,bitclock-master = <&dpcmcpu>;
257 simple-audio-card,frame-master = <&dpcmcpu>;
259 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
260 "ak4642 Playback", "DAI1 Playback";
263 sound-dai = <&rcar_sound 0>;
267 sound-dai = <&rcar_sound 1>;
272 sound-dai = <&ak4643>;
273 clocks = <&audio_clock>;
277 -------------------------------------------
278 Example 6 - many DAI links with DPCM:
279 -------------------------------------------
282 CPU1 ------ PCM3168A-p /* DPCM 1ch/2ch */
283 CPU2 --/ /* DPCM 3ch/4ch */
284 CPU3 --/ /* DPCM 5ch/6ch */
285 CPU4 --/ /* DPCM 7ch/8ch */
286 CPU5 ------ PCM3168A-c
289 compatible = "simple-audio-card";
291 simple-audio-card,routing =
292 "pcm3168a Playback", "DAI1 Playback",
293 "pcm3168a Playback", "DAI2 Playback",
294 "pcm3168a Playback", "DAI3 Playback",
295 "pcm3168a Playback", "DAI4 Playback";
297 simple-audio-card,dai-link@0 {
299 bitclock-master = <&sndcpu0>;
300 frame-master = <&sndcpu0>;
303 sound-dai = <&rcar_sound 0>;
306 sound-dai = <&ak4613>;
309 simple-audio-card,dai-link@1 {
311 bitclock-master = <&sndcpu1>;
312 frame-master = <&sndcpu1>;
314 convert-channels = <8>; /* TDM Split */
317 sound-dai = <&rcar_sound 1>;
320 sound-dai = <&rcar_sound 2>;
323 sound-dai = <&rcar_sound 3>;
326 sound-dai = <&rcar_sound 4>;
331 dai-tdm-slot-num = <8>;
332 sound-dai = <&pcm3168a 0>;
335 simple-audio-card,dai-link@2 {
337 bitclock-master = <&sndcpu2>;
338 frame-master = <&sndcpu2>;
341 sound-dai = <&rcar_sound 5>;
346 sound-dai = <&pcm3168a 1>;