Merge tag 'drm-intel-fixes-2014-04-11' of git://anongit.freedesktop.org/drm-intel...
[deliverable/linux.git] / Documentation / devicetree / bindings / sound / simple-card.txt
1 Simple-Card:
2
3 Simple-Card specifies audio DAI connection 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,format : CPU/CODEC common audio format.
14 "i2s", "right_j", "left_j" , "dsp_a"
15 "dsp_b", "ac97", "pdm", "msb", "lsb"
16 - simple-audio-card,widgets : Please refer to widgets.txt.
17 - simple-audio-card,routing : A list of the connections between audio components.
18 Each entry is a pair of strings, the first being the
19 connection's sink, the second being the connection's
20 source.
21 - dai-tdm-slot-num : Please refer to tdm-slot.txt.
22 - dai-tdm-slot-width : Please refer to tdm-slot.txt.
23
24 Required subnodes:
25
26 - simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes
27 This container may be omitted when the
28 card has only one DAI link.
29 See the examples.
30
31 - simple-audio-card,cpu : CPU sub-node
32 - simple-audio-card,codec : CODEC sub-node
33
34 Required CPU/CODEC subnodes properties:
35
36 - sound-dai : phandle and port of CPU/CODEC
37
38 Optional CPU/CODEC subnodes properties:
39
40 - format : CPU/CODEC specific audio format if needed.
41 see simple-audio-card,format
42 - frame-master : bool property. add this if subnode is frame master
43 - bitclock-master : bool property. add this if subnode is bitclock master
44 - bitclock-inversion : bool property. add this if subnode has clock inversion
45 - frame-inversion : bool property. add this if subnode has frame inversion
46 - clocks / system-clock-frequency : specify subnode's clock if needed.
47 it can be specified via "clocks" if system has
48 clock node (= common clock), or "system-clock-frequency"
49 (if system doens't support common clock)
50
51 Note:
52 * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and
53 'frame-inversion', the simple card will use the settings of CODEC for both
54 CPU and CODEC sides as we need to keep the settings identical for both ends
55 of the link.
56
57 Example 1 - single DAI link:
58
59 sound {
60 compatible = "simple-audio-card";
61 simple-audio-card,name = "VF610-Tower-Sound-Card";
62 simple-audio-card,format = "left_j";
63 simple-audio-card,widgets =
64 "Microphone", "Microphone Jack",
65 "Headphone", "Headphone Jack",
66 "Speaker", "External Speaker";
67 simple-audio-card,routing =
68 "MIC_IN", "Microphone Jack",
69 "Headphone Jack", "HP_OUT",
70 "External Speaker", "LINE_OUT";
71
72 dai-tdm-slot-num = <2>;
73 dai-tdm-slot-width = <8>;
74
75 simple-audio-card,cpu {
76 sound-dai = <&sh_fsi2 0>;
77 };
78
79 simple-audio-card,codec {
80 sound-dai = <&ak4648>;
81 bitclock-master;
82 frame-master;
83 clocks = <&osc>;
84 };
85 };
86
87 &i2c0 {
88 ak4648: ak4648@12 {
89 #sound-dai-cells = <0>;
90 compatible = "asahi-kasei,ak4648";
91 reg = <0x12>;
92 };
93 };
94
95 sh_fsi2: sh_fsi2@ec230000 {
96 #sound-dai-cells = <1>;
97 compatible = "renesas,sh_fsi2";
98 reg = <0xec230000 0x400>;
99 interrupt-parent = <&gic>;
100 interrupts = <0 146 0x4>;
101 };
102
103 Example 2 - many DAI links:
104
105 sound {
106 compatible = "simple-audio-card";
107 simple-audio-card,name = "Cubox Audio";
108 simple-audio-card,format = "i2s";
109
110 simple-audio-card,dai-link@0 { /* I2S - HDMI */
111 simple-audio-card,cpu {
112 sound-dai = <&audio1 0>;
113 };
114 simple-audio-card,codec {
115 sound-dai = <&tda998x 0>;
116 };
117 };
118
119 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
120 simple-audio-card,cpu {
121 sound-dai = <&audio1 1>;
122 };
123 simple-audio-card,codec {
124 sound-dai = <&tda998x 1>;
125 };
126 };
127
128 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
129 simple-audio-card,cpu {
130 sound-dai = <&audio1 1>;
131 };
132 simple-audio-card,codec {
133 sound-dai = <&spdif_codec>;
134 };
135 };
136 };
This page took 0.130842 seconds and 5 git commands to generate.