Skip to content

Commit 4359caa

Browse files
Revaliolibroonie
authored andcommitted
ASoC: dt-bindings: update fsl-asoc-card bindings after imx-spdif merge
The S/PDIF audio card support with compatible "fsl,imx-audio-spdif" was merged from imx-spdif into the fsl-asoc-card driver. It makes possible to use an S/PDIF with an ASRC. This merge introduces new DT bindings to use with compatible "fsl,imx-audio-spdif" to follow the way fsl-asoc-card works: * the "spdif-controller" property from imx-spdif is named "audio-cpu" in fsl-asoc-card. * fsl-asoc-card uses codecs explicitly declared in DT with "audio-codec". With an SPDIF, codec drivers spdif_transmitter and spdif_receiver should be used. Driver imx-spdif used instead the dummy codec and a pair of boolean properties, "spdif-in" and "spdif-out". In an upcoming commit, in-tree DTs will be modified to follow these new properties: * Property "spdif-controller" will be renamed "audio-cpu". * spdif_transmitter and spdif_receiver nodes will be declared and linked to the fsl-asoc-card node with the property "audio-codec". To keep backward compatibility with other DTs, support for "spdif-controller", "spdif-in" and "spdif-out" properties is kept. However, it is recommended to use the new properties if possible. It is better to declare transmitter and/or receiver in DT than using the dummy codec. DTs using compatible "fsl,imx-audio-spdif" are still supported, and fsl-asoc-card will behave the same as imx-spdif for these DTs. Signed-off-by: Elinor Montmasson <[email protected]> Reviewed-by: Rob Herring (Arm) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 6d174cc commit 4359caa

File tree

2 files changed

+49
-70
lines changed

2 files changed

+49
-70
lines changed

Documentation/devicetree/bindings/sound/fsl,imx-audio-spdif.yaml

Lines changed: 0 additions & 66 deletions
This file was deleted.

Documentation/devicetree/bindings/sound/fsl-asoc-card.yaml

Lines changed: 49 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ properties:
6565
- fsl,imx-audio-sgtl5000
6666
- fsl,imx-audio-wm8960
6767
- fsl,imx-audio-wm8962
68+
- items:
69+
- enum:
70+
- fsl,imx-sabreauto-spdif
71+
- fsl,imx6sx-sdb-spdif
72+
- const: fsl,imx-audio-spdif
6873
- items:
6974
- enum:
7075
- fsl,imx-audio-ac97
@@ -81,6 +86,7 @@ properties:
8186
- fsl,imx-audio-wm8960
8287
- fsl,imx-audio-wm8962
8388
- fsl,imx-audio-wm8958
89+
- fsl,imx-audio-spdif
8490

8591
model:
8692
$ref: /schemas/types.yaml#/definitions/string
@@ -93,8 +99,15 @@ properties:
9399
need to add ASRC support via DPCM.
94100

95101
audio-codec:
96-
$ref: /schemas/types.yaml#/definitions/phandle
97-
description: The phandle of an audio codec
102+
$ref: /schemas/types.yaml#/definitions/phandle-array
103+
description: |
104+
The phandle of an audio codec.
105+
With "fsl,imx-audio-spdif", either SPDIF audio codec spdif_transmitter,
106+
spdif_receiver or both.
107+
minItems: 1
108+
maxItems: 2
109+
items:
110+
maxItems: 1
98111

99112
audio-cpu:
100113
$ref: /schemas/types.yaml#/definitions/phandle
@@ -150,8 +163,10 @@ properties:
150163
description: dai-link uses bit clock inversion.
151164

152165
mclk-id:
153-
$ref: /schemas/types.yaml#/definitions/uint32
154-
description: main clock id, specific for each card configuration.
166+
$ref: /schemas/types.yaml#/definitions/uint32-array
167+
description: Main clock id for each codec, specific for each card configuration.
168+
minItems: 1
169+
maxItems: 2
155170

156171
mux-int-port:
157172
$ref: /schemas/types.yaml#/definitions/uint32
@@ -167,6 +182,27 @@ properties:
167182
$ref: /schemas/types.yaml#/definitions/phandle
168183
description: The phandle of an CPU DAI controller
169184

185+
spdif-controller:
186+
$ref: /schemas/types.yaml#/definitions/phandle
187+
deprecated: true
188+
description: The phandle of an S/PDIF CPU DAI controller.
189+
190+
spdif-out:
191+
type: boolean
192+
deprecated: true
193+
description: |
194+
If present, the transmitting function of S/PDIF will be enabled,
195+
indicating there's a physical S/PDIF out connector or jack on the
196+
board or it's connecting to some other IP block, such as an HDMI
197+
encoder or display-controller.
198+
199+
spdif-in:
200+
type: boolean
201+
deprecated: true
202+
description: |
203+
If present, the receiving function of S/PDIF will be enabled,
204+
indicating there is a physical S/PDIF in connector/jack on the board.
205+
170206
required:
171207
- compatible
172208
- model
@@ -195,3 +231,12 @@ examples:
195231
"AIN2L", "Line In Jack",
196232
"AIN2R", "Line In Jack";
197233
};
234+
235+
- |
236+
sound-spdif-asrc {
237+
compatible = "fsl,imx-audio-spdif";
238+
model = "spdif-asrc-audio";
239+
audio-cpu = <&spdif>;
240+
audio-asrc = <&easrc>;
241+
audio-codec = <&spdifdit>, <&spdifdir>;
242+
};

0 commit comments

Comments
 (0)