aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorJyri Sarha <jsarha@ti.com>2014-03-24 06:15:25 -0400
committerMark Brown <broonie@linaro.org>2014-04-23 08:14:27 -0400
commitb3ca11ff59bc5842b01f13421a17e6d9a8936784 (patch)
tree5117417d0de1b3ef141ac92abb77c501a828ba09 /Documentation
parent389cb8348cf5ac4a702c71bf13673c4c8bf01e34 (diff)
ASoC: simple-card: Move dai-link level properties away from dai subnodes
The properties like format, bitclock-master, frame-master, bitclock-inversion, and frame-inversion should be common to the dais connected with a dai-link. For bitclock-master and frame-master properties to be unambiguous they need to indicate the mastering dai node with a phandle. Signed-off-by: Jyri Sarha <jsarha@ti.com> Acked-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/devicetree/bindings/sound/simple-card.txt88
1 files changed, 50 insertions, 38 deletions
diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
index 131aa2ad7f1a..9b9df146fd1a 100644
--- a/Documentation/devicetree/bindings/sound/simple-card.txt
+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
@@ -1,6 +1,6 @@
1Simple-Card: 1Simple-Card:
2 2
3Simple-Card specifies audio DAI connection of SoC <-> codec. 3Simple-Card specifies audio DAI connections of SoC <-> codec.
4 4
5Required properties: 5Required properties:
6 6
@@ -10,26 +10,51 @@ Optional properties:
10 10
11- simple-audio-card,name : User specified audio sound card name, one string 11- simple-audio-card,name : User specified audio sound card name, one string
12 property. 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. 13- simple-audio-card,widgets : Please refer to widgets.txt.
17- simple-audio-card,routing : A list of the connections between audio components. 14- simple-audio-card,routing : A list of the connections between audio components.
18 Each entry is a pair of strings, the first being the 15 Each entry is a pair of strings, the first being the
19 connection's sink, the second being the connection's 16 connection's sink, the second being the connection's
20 source. 17 source.
21- dai-tdm-slot-num : Please refer to tdm-slot.txt. 18Optional subnodes:
22- dai-tdm-slot-width : Please refer to tdm-slot.txt. 19
20- simple-audio-card,dai-link : Container for dai-link level
21 properties and the CPU and CODEC
22 sub-nodes. This container may be
23 omitted when the card has only one
24 DAI link. See the examples and the
25 section bellow.
26
27Dai-link subnode properties and subnodes:
28
29If dai-link subnode is omitted and the subnode properties are directly
30under "sound"-node the subnode property and subnode names have to be
31prefixed with "simple-audio-card,"-prefix.
23 32
24Required subnodes: 33Required dai-link subnodes:
25 34
26- simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes 35- cpu : CPU sub-node
27 This container may be omitted when the 36- codec : CODEC sub-node
28 card has only one DAI link.
29 See the examples.
30 37
31- simple-audio-card,cpu : CPU sub-node 38Optional dai-link subnode properties:
32- simple-audio-card,codec : CODEC sub-node 39
40- format : CPU/CODEC common audio format.
41 "i2s", "right_j", "left_j" , "dsp_a"
42 "dsp_b", "ac97", "pdm", "msb", "lsb"
43- frame-master : Indicates dai-link frame master.
44 phandle to a cpu or codec subnode.
45- bitclock-master : Indicates dai-link bit clock master.
46 phandle to a cpu or codec subnode.
47- bitclock-inversion : bool property. Add this if the
48 dai-link uses bit clock inversion.
49- frame-inversion : bool property. Add this if the
50 dai-link uses frame clock inversion.
51
52For backward compatibility the frame-master and bitclock-master
53properties can be used as booleans in codec subnode to indicate if the
54codec is the dai-link frame or bit clock master. In this case there
55should be no dai-link node, the same properties should not be present
56at sound-node level, and the bitclock-inversion and frame-inversion
57properties should also be placed in the codec node if needed.
33 58
34Required CPU/CODEC subnodes properties: 59Required CPU/CODEC subnodes properties:
35 60
@@ -37,29 +62,21 @@ Required CPU/CODEC subnodes properties:
37 62
38Optional CPU/CODEC subnodes properties: 63Optional CPU/CODEC subnodes properties:
39 64
40- format : CPU/CODEC specific audio format if needed. 65- dai-tdm-slot-num : Please refer to tdm-slot.txt.
41 see simple-audio-card,format 66- dai-tdm-slot-width : Please refer to tdm-slot.txt.
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. 67- clocks / system-clock-frequency : specify subnode's clock if needed.
47 it can be specified via "clocks" if system has 68 it can be specified via "clocks" if system has
48 clock node (= common clock), or "system-clock-frequency" 69 clock node (= common clock), or "system-clock-frequency"
49 (if system doens't support common clock) 70 (if system doens't support common clock)
50 71
51Note:
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
57Example 1 - single DAI link: 72Example 1 - single DAI link:
58 73
59sound { 74sound {
60 compatible = "simple-audio-card"; 75 compatible = "simple-audio-card";
61 simple-audio-card,name = "VF610-Tower-Sound-Card"; 76 simple-audio-card,name = "VF610-Tower-Sound-Card";
62 simple-audio-card,format = "left_j"; 77 simple-audio-card,format = "left_j";
78 simple-audio-card,bitclock-master = <&dailink0_master>;
79 simple-audio-card,frame-master = <&dailink0_master>;
63 simple-audio-card,widgets = 80 simple-audio-card,widgets =
64 "Microphone", "Microphone Jack", 81 "Microphone", "Microphone Jack",
65 "Headphone", "Headphone Jack", 82 "Headphone", "Headphone Jack",
@@ -69,17 +86,12 @@ sound {
69 "Headphone Jack", "HP_OUT", 86 "Headphone Jack", "HP_OUT",
70 "External Speaker", "LINE_OUT"; 87 "External Speaker", "LINE_OUT";
71 88
72 dai-tdm-slot-num = <2>;
73 dai-tdm-slot-width = <8>;
74
75 simple-audio-card,cpu { 89 simple-audio-card,cpu {
76 sound-dai = <&sh_fsi2 0>; 90 sound-dai = <&sh_fsi2 0>;
77 }; 91 };
78 92
79 simple-audio-card,codec { 93 dailink0_master: simple-audio-card,codec {
80 sound-dai = <&ak4648>; 94 sound-dai = <&ak4648>;
81 bitclock-master;
82 frame-master;
83 clocks = <&osc>; 95 clocks = <&osc>;
84 }; 96 };
85}; 97};
@@ -105,31 +117,31 @@ Example 2 - many DAI links:
105sound { 117sound {
106 compatible = "simple-audio-card"; 118 compatible = "simple-audio-card";
107 simple-audio-card,name = "Cubox Audio"; 119 simple-audio-card,name = "Cubox Audio";
108 simple-audio-card,format = "i2s";
109 120
110 simple-audio-card,dai-link@0 { /* I2S - HDMI */ 121 simple-audio-card,dai-link@0 { /* I2S - HDMI */
111 simple-audio-card,cpu { 122 format = "i2s";
123 cpu {
112 sound-dai = <&audio1 0>; 124 sound-dai = <&audio1 0>;
113 }; 125 };
114 simple-audio-card,codec { 126 codec {
115 sound-dai = <&tda998x 0>; 127 sound-dai = <&tda998x 0>;
116 }; 128 };
117 }; 129 };
118 130
119 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */ 131 simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
120 simple-audio-card,cpu { 132 cpu {
121 sound-dai = <&audio1 1>; 133 sound-dai = <&audio1 1>;
122 }; 134 };
123 simple-audio-card,codec { 135 codec {
124 sound-dai = <&tda998x 1>; 136 sound-dai = <&tda998x 1>;
125 }; 137 };
126 }; 138 };
127 139
128 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */ 140 simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
129 simple-audio-card,cpu { 141 cpu {
130 sound-dai = <&audio1 1>; 142 sound-dai = <&audio1 1>;
131 }; 143 };
132 simple-audio-card,codec { 144 codec {
133 sound-dai = <&spdif_codec>; 145 sound-dai = <&spdif_codec>;
134 }; 146 };
135 }; 147 };