Skip to content

Commit fb60131

Browse files
hcodinabroonie
authored andcommitted
dt-bindings: sound: fsl,qmc-audio: Add support for multiple QMC channels per DAI
The QMC audio uses one QMC channel per DAI and uses this QMC channel to transmit interleaved audio channel samples. In order to work in non-interleave mode, a QMC audio DAI needs to use multiple QMC channels. In that case, the DAI maps each QMC channel to exactly one audio channel. Allow QMC audio DAIs with multiple QMC channels attached. Signed-off-by: Herve Codina <[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 af8432b commit fb60131

File tree

1 file changed

+35
-6
lines changed

1 file changed

+35
-6
lines changed

Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml

Lines changed: 35 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ maintainers:
1212
description: |
1313
The QMC audio is an ASoC component which uses QMC (QUICC Multichannel
1414
Controller) channels to transfer the audio data.
15-
It provides as many DAI as the number of QMC channel used.
15+
It provides several DAIs. For each DAI, the DAI is working in interleaved mode
16+
if only one QMC channel is used by the DAI or it is working in non-interleaved
17+
mode if several QMC channels are used by the DAI.
1618
1719
allOf:
1820
- $ref: dai-common.yaml#
@@ -45,12 +47,19 @@ patternProperties:
4547
fsl,qmc-chan:
4648
$ref: /schemas/types.yaml#/definitions/phandle-array
4749
items:
48-
- items:
49-
- description: phandle to QMC node
50-
- description: Channel number
50+
items:
51+
- description: phandle to QMC node
52+
- description: Channel number
53+
minItems: 1
5154
description:
52-
Should be a phandle/number pair. The phandle to QMC node and the QMC
53-
channel to use for this DAI.
55+
Should be a phandle/number pair list. The list of phandle to QMC node
56+
and the QMC channel pair to use for this DAI.
57+
If only one phandle/number pair is provided, this DAI works in
58+
interleaved mode, i.e. audio channels for this DAI are interleaved in
59+
the QMC channel. If more than one pair is provided, this DAI works
60+
in non-interleave mode. In that case the first audio channel uses the
61+
the first QMC channel, the second audio channel uses the second QMC
62+
channel, etc...
5463

5564
required:
5665
- reg
@@ -79,6 +88,11 @@ examples:
7988
reg = <17>;
8089
fsl,qmc-chan = <&qmc 17>;
8190
};
91+
dai@18 {
92+
reg = <18>;
93+
/* Non-interleaved mode */
94+
fsl,qmc-chan = <&qmc 18>, <&qmc 19>;
95+
};
8296
};
8397
8498
sound {
@@ -115,4 +129,19 @@ examples:
115129
dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>;
116130
};
117131
};
132+
simple-audio-card,dai-link@2 {
133+
reg = <2>;
134+
format = "dsp_b";
135+
cpu {
136+
sound-dai = <&audio_controller 18>;
137+
};
138+
codec {
139+
sound-dai = <&codec3>;
140+
dai-tdm-slot-num = <2>;
141+
dai-tdm-slot-width = <8>;
142+
/* TS 9, 10 */
143+
dai-tdm-slot-tx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
144+
dai-tdm-slot-rx-mask = <0 0 0 0 0 0 0 0 0 1 1>;
145+
};
146+
};
118147
};

0 commit comments

Comments
 (0)