Debian Codegraph @

Documentation/devicetree/bindings/sound/imx-audio-card.yaml

raw
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/sound/imx-audio-card.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: NXP i.MX audio sound card.
8
9 maintainers:
10 - Shengjiu Wang <[email protected]>
11
12 allOf:
13 - $ref: sound-card-common.yaml#
14
15 properties:
16 compatible:
17 enum:
18 - fsl,imx-audio-card
19
20 patternProperties:
21 ".*-dai-link$":
22 description:
23 Each subnode represents a dai link. Subnodes of each dai links would be
24 cpu/codec dais.
25
26 type: object
27
28 properties:
29 link-name:
30 description: Indicates dai-link name and PCM stream name.
31 $ref: /schemas/types.yaml#/definitions/string
32 maxItems: 1
33
34 format:
35 description: audio format.
36 items:
37 enum:
38 - i2s
39 - dsp_b
40
41 dai-tdm-slot-num:
42 description: see tdm-slot.txt.
43 $ref: /schemas/types.yaml#/definitions/uint32
44
45 dai-tdm-slot-width:
46 description: see tdm-slot.txt.
47 $ref: /schemas/types.yaml#/definitions/uint32
48
49 playback-only:
50 description: link is used only for playback
51 $ref: /schemas/types.yaml#/definitions/flag
52
53 capture-only:
54 description: link is used only for capture
55 $ref: /schemas/types.yaml#/definitions/flag
56
57 cpu:
58 description: Holds subnode which indicates cpu dai.
59 type: object
60 additionalProperties: false
61 properties:
62 sound-dai:
63 maxItems: 1
64
65 codec:
66 description: Holds subnode which indicates codec dai.
67 type: object
68 additionalProperties: false
69 properties:
70 sound-dai:
71 minItems: 1
72 maxItems: 2
73
74 fsl,mclk-equal-bclk:
75 description: Indicates mclk can be equal to bclk, especially for sai interface
76 $ref: /schemas/types.yaml#/definitions/flag
77
78 required:
79 - link-name
80 - cpu
81
82 allOf:
83 - not:
84 required:
85 - playback-only
86 - capture-only
87
88 additionalProperties: false
89
90 required:
91 - compatible
92
93 unevaluatedProperties: false
94
95 examples:
96 - |
97 sound-ak4458 {
98 compatible = "fsl,imx-audio-card";
99 model = "ak4458-audio";
100 pri-dai-link {
101 link-name = "akcodec";
102 format = "i2s";
103 fsl,mclk-equal-bclk;
104 cpu {
105 sound-dai = <&sai1>;
106 };
107 codec {
108 sound-dai = <&ak4458_1>, <&ak4458_2>;
109 };
110 };
111 fe-dai-link {
112 link-name = "HiFi-ASRC-FE";
113 format = "i2s";
114 cpu {
115 sound-dai = <&easrc>;
116 };
117 };
118 be-dai-link {
119 link-name = "HiFi-ASRC-BE";
120 format = "dsp_b";
121 dai-tdm-slot-num = <8>;
122 dai-tdm-slot-width = <32>;
123 fsl,mclk-equal-bclk;
124 cpu {
125 sound-dai = <&sai1>;
126 };
127 codec {
128 sound-dai = <&ak4458_1>, <&ak4458_2>;
129 };
130 };
131 };