ASoC: tas2552: Support TI TAS2552 Amplifier
[deliverable/linux.git] / Documentation / devicetree / bindings / sound / simple-card.txt
1 Simple-Card:
2
3 Simple-Card specifies audio DAI connections of SoC <-> codec.
4
5 Required properties:
6
7 - compatible : "simple-audio-card"
8
9 Optional properties:
10
11 - simple-audio-card,name : User specified audio sound card name, one string
12 property.
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
17 source.
18 - simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
19 mclk.
20
21 Optional subnodes:
22
23 - simple-audio-card,dai-link : Container for dai-link level
24 properties and the CPU and CODEC
25 sub-nodes. This container may be
26 omitted when the card has only one
27 DAI link. See the examples and the
28 section bellow.
29
30 Dai-link subnode properties and subnodes:
31
32 If dai-link subnode is omitted and the subnode properties are directly
33 under "sound"-node the subnode property and subnode names have to be
34 prefixed with "simple-audio-card,"-prefix.
35
36 Required dai-link subnodes:
37
38 - cpu : CPU sub-node
39 - codec : CODEC sub-node
40
41 Optional dai-link subnode properties:
42
43 - format : CPU/CODEC common audio format.
44 "i2s", "right_j", "left_j" , "dsp_a"
45 "dsp_b", "ac97", "pdm", "msb", "lsb"
46 - frame-master : Indicates dai-link frame master.
47 phandle to a cpu or codec subnode.
48 - bitclock-master : Indicates dai-link bit clock master.
49 phandle to a cpu or codec subnode.
50 - bitclock-inversion : bool property. Add this if the
51 dai-link uses bit clock inversion.
52 - frame-inversion : bool property. Add this if the
53 dai-link uses frame clock inversion.
54
55 For backward compatibility the frame-master and bitclock-master
56 properties can be used as booleans in codec subnode to indicate if the
57 codec is the dai-link frame or bit clock master. In this case there
58 should be no dai-link node, the same properties should not be present
59 at sound-node level, and the bitclock-inversion and frame-inversion
60 properties should also be placed in the codec node if needed.
61
62 Required CPU/CODEC subnodes properties:
63
64 - sound-dai : phandle and port of CPU/CODEC
65
66 Optional CPU/CODEC subnodes properties:
67
68 - dai-tdm-slot-num : Please refer to tdm-slot.txt.
69 - dai-tdm-slot-width : Please refer to tdm-slot.txt.
70 - clocks / system-clock-frequency : specify subnode's clock if needed.
71 it can be specified via "clocks" if system has
72 clock node (= common clock), or "system-clock-frequency"
73 (if system doens't support common clock)
74
75 Example 1 - single DAI link:
76
77 sound {
78 compatible = "simple-audio-card";
79 simple-audio-card,name = "VF610-Tower-Sound-Card";
80 simple-audio-card,format = "left_j";
81 simple-audio-card,bitclock-master = <&dailink0_master>;
82 simple-audio-card,frame-master = <&dailink0_master>;
83 simple-audio-card,widgets =
84 "Microphone", "Microphone Jack",
85 "Headphone", "Headphone Jack",
86 "Speaker", "External Speaker";
87 simple-audio-card,routing =
88 "MIC_IN", "Microphone Jack",
89 "Headphone Jack", "HP_OUT",
90 "External Speaker", "LINE_OUT";
91
92 simple-audio-card,cpu {
93 sound-dai = <&sh_fsi2 0>;
94 };
95
96 dailink0_master: simple-audio-card,codec {
97 sound-dai = <&ak4648>;
98 clocks = <&osc>;
99 };
100 };
101
102 &i2c0 {
103 ak4648: ak4648@12 {
104 #sound-dai-cells = <0>;
105 compatible = "asahi-kasei,ak4648";
106 reg = <0x12>;
107 };
108 };
109
110 sh_fsi2: sh_fsi2@ec230000 {
111 #sound-dai-cells = <1>;
112 compatible = "renesas,sh_fsi2";
113 reg = <0xec230000 0x400>;
114 interrupt-parent = <&gic>;
115 interrupts = <0 146 0x4>;
116 };
117
118 Example 2 - many DAI links:
119
120 sound {
121 compatible = "simple-audio-card";
122 simple-audio-card,name = "Cubox Audio";
123
124 simple-audio-card,dai-link@0 { /* I2S - HDMI */
125 format = "i2s";
126 cpu {
127 sound-dai = <&audio1 0>;
128 };
129 codec {
130 sound-dai = <&tda998x 0>;
131 };
132 };
133
134 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
135 cpu {
136 sound-dai = <&audio1 1>;
137 };
138 codec {
139 sound-dai = <&tda998x 1>;
140 };
141 };
142
143 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
144 cpu {
145 sound-dai = <&audio1 1>;
146 };
147 codec {
148 sound-dai = <&spdif_codec>;
149 };
150 };
151 };
This page took 0.067385 seconds and 5 git commands to generate.