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 - system-clock-direction-out : specifies clock direction as 'out' on
90 initialization. It is useful for some aCPUs with
93 Example 1 - single DAI link:
96 compatible = "simple-audio-card";
97 simple-audio-card,name = "VF610-Tower-Sound-Card";
98 simple-audio-card,format = "left_j";
99 simple-audio-card,bitclock-master = <&dailink0_master>;
100 simple-audio-card,frame-master = <&dailink0_master>;
101 simple-audio-card,widgets =
102 "Microphone", "Microphone Jack",
103 "Headphone", "Headphone Jack",
104 "Speaker", "External Speaker";
105 simple-audio-card,routing =
106 "MIC_IN", "Microphone Jack",
107 "Headphone Jack", "HP_OUT",
108 "External Speaker", "LINE_OUT";
110 simple-audio-card,cpu {
111 sound-dai = <&sh_fsi2 0>;
114 dailink0_master: simple-audio-card,codec {
115 sound-dai = <&ak4648>;
122 #sound-dai-cells = <0>;
123 compatible = "asahi-kasei,ak4648";
128 sh_fsi2: sh_fsi2@ec230000 {
129 #sound-dai-cells = <1>;
130 compatible = "renesas,sh_fsi2";
131 reg = <0xec230000 0x400>;
132 interrupt-parent = <&gic>;
133 interrupts = <0 146 0x4>;
136 Example 2 - many DAI links:
139 compatible = "simple-audio-card";
140 simple-audio-card,name = "Cubox Audio";
142 simple-audio-card,dai-link@0 { /* I2S - HDMI */
146 sound-dai = <&audio1 0>;
149 sound-dai = <&tda998x 0>;
153 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
156 sound-dai = <&audio1 1>;
159 sound-dai = <&tda998x 1>;
163 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
166 sound-dai = <&audio1 1>;
169 sound-dai = <&spdif_codec>;
174 Example 3 - route audio from IMX6 SSI2 through TLV320DAC3100 codec
175 through TPA6130A2 amplifier to headphones:
178 codec: tlv320dac3100@18 {
179 compatible = "ti,tlv320dac3100";
184 compatible = "ti,tpa6130a2";
190 compatible = "simple-audio-card";
192 simple-audio-card,widgets =
193 "Headphone", "Headphone Jack";
194 simple-audio-card,routing =
195 "Headphone Jack", "HPLEFT",
196 "Headphone Jack", "HPRIGHT",
199 simple-audio-card,aux-devs = <&>;
200 simple-audio-card,cpu {
203 simple-audio-card,codec {
204 sound-dai = <&codec>;