Merge remote-tracking branch 'sound-asoc/for-next'
[deliverable/linux.git] / Documentation / devicetree / bindings / sound / simple-scu-card.txt
1 ASoC simple SCU Sound Card
2
3 Simple-Card specifies audio DAI connections of SoC <-> codec.
4
5 Required properties:
6
7 - compatible : "simple-scu-audio-card"
8 "renesas,rsrc-card"
9
10 Optional properties:
11
12 - simple-audio-card,name : User specified audio sound card name, one string
13 property.
14 - simple-audio-card,cpu : CPU sub-node
15 - simple-audio-card,codec : CODEC sub-node
16
17 Optional subnode properties:
18
19 - simple-audio-card,format : CPU/CODEC common audio format.
20 "i2s", "right_j", "left_j" , "dsp_a"
21 "dsp_b", "ac97", "pdm", "msb", "lsb"
22 - simple-audio-card,frame-master : Indicates dai-link frame master.
23 phandle to a cpu or codec subnode.
24 - simple-audio-card,bitclock-master : Indicates dai-link bit clock master.
25 phandle to a cpu or codec subnode.
26 - simple-audio-card,bitclock-inversion : bool property. Add this if the
27 dai-link uses bit clock inversion.
28 - simple-audio-card,frame-inversion : bool property. Add this if the
29 dai-link uses frame clock inversion.
30 - simple-audio-card,convert-rate : platform specified sampling rate convert
31 - simple-audio-card,convert-channels : platform specified converted channel size (2 - 8 ch)
32 - simple-audio-card,prefix : see audio-routing
33 - simple-audio-card,routing : A list of the connections between audio components.
34 Each entry is a pair of strings, the first being the connection's sink,
35 the second being the connection's source. Valid names for sources.
36 use audio-prefix if some components is using same sink/sources naming.
37 it can be used if compatible was "renesas,rsrc-card";
38
39 Required CPU/CODEC subnodes properties:
40
41 - sound-dai : phandle and port of CPU/CODEC
42
43 Optional CPU/CODEC subnodes properties:
44
45 - clocks / system-clock-frequency : specify subnode's clock if needed.
46 it can be specified via "clocks" if system has
47 clock node (= common clock), or "system-clock-frequency"
48 (if system doens't support common clock)
49 If a clock is specified, it is
50 enabled with clk_prepare_enable()
51 in dai startup() and disabled with
52 clk_disable_unprepare() in dai
53 shutdown().
54
55 Example 1. Sampling Rate Covert
56
57 sound {
58 compatible = "simple-scu-audio-card";
59
60 simple-audio-card,name = "rsnd-ak4643";
61 simple-audio-card,format = "left_j";
62 simple-audio-card,format = "left_j";
63 simple-audio-card,bitclock-master = <&sndcodec>;
64 simple-audio-card,frame-master = <&sndcodec>;
65
66 simple-audio-card,convert-rate = <48000>; /* see audio_clk_a */
67
68 simple-audio-card,prefix = "ak4642";
69 simple-audio-card,routing = "ak4642 Playback", "DAI0 Playback",
70 "DAI0 Capture", "ak4642 Capture";
71
72 sndcpu: simple-audio-card,cpu {
73 sound-dai = <&rcar_sound>;
74 };
75
76 sndcodec: simple-audio-card,codec {
77 sound-dai = <&ak4643>;
78 system-clock-frequency = <11289600>;
79 };
80 };
81
82 Example 2. 2 CPU 1 Codec
83
84 sound {
85 compatible = "renesas,rsrc-card";
86
87 card-name = "rsnd-ak4643";
88 format = "left_j";
89 bitclock-master = <&dpcmcpu>;
90 frame-master = <&dpcmcpu>;
91
92 convert-rate = <48000>; /* see audio_clk_a */
93
94 audio-prefix = "ak4642";
95 audio-routing = "ak4642 Playback", "DAI0 Playback",
96 "ak4642 Playback", "DAI1 Playback";
97
98 dpcmcpu: cpu@0 {
99 sound-dai = <&rcar_sound 0>;
100 };
101
102 cpu@1 {
103 sound-dai = <&rcar_sound 1>;
104 };
105
106 codec {
107 sound-dai = <&ak4643>;
108 clocks = <&audio_clock>;
109 };
110 };
This page took 0.033347 seconds and 6 git commands to generate.