Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <herve.codina@bootlin.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20240701113038.55144-10-herve.codina@bootlin.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Herve Codina and committed by
Mark Brown
fb601316 af8432b2

+35 -6
+35 -6
Documentation/devicetree/bindings/sound/fsl,qmc-audio.yaml
··· 12 12 description: | 13 13 The QMC audio is an ASoC component which uses QMC (QUICC Multichannel 14 14 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. 16 18 17 19 allOf: 18 20 - $ref: dai-common.yaml# ··· 47 45 fsl,qmc-chan: 48 46 $ref: /schemas/types.yaml#/definitions/phandle-array 49 47 items: 50 - - items: 51 - - description: phandle to QMC node 52 - - description: Channel number 48 + items: 49 + - description: phandle to QMC node 50 + - description: Channel number 51 + minItems: 1 53 52 description: 54 - Should be a phandle/number pair. The phandle to QMC node and the QMC 55 - channel to use for this DAI. 53 + Should be a phandle/number pair list. The list of phandle to QMC node 54 + and the QMC channel pair to use for this DAI. 55 + If only one phandle/number pair is provided, this DAI works in 56 + interleaved mode, i.e. audio channels for this DAI are interleaved in 57 + the QMC channel. If more than one pair is provided, this DAI works 58 + in non-interleave mode. In that case the first audio channel uses the 59 + the first QMC channel, the second audio channel uses the second QMC 60 + channel, etc... 56 61 57 62 required: 58 63 - reg ··· 87 78 dai@17 { 88 79 reg = <17>; 89 80 fsl,qmc-chan = <&qmc 17>; 81 + }; 82 + dai@18 { 83 + reg = <18>; 84 + /* Non-interleaved mode */ 85 + fsl,qmc-chan = <&qmc 18>, <&qmc 19>; 90 86 }; 91 87 }; 92 88 ··· 127 113 /* TS 2, 4, 6, 8 */ 128 114 dai-tdm-slot-tx-mask = <0 0 1 0 1 0 1 0 1>; 129 115 dai-tdm-slot-rx-mask = <0 0 1 0 1 0 1 0 1>; 116 + }; 117 + }; 118 + simple-audio-card,dai-link@2 { 119 + reg = <2>; 120 + format = "dsp_b"; 121 + cpu { 122 + sound-dai = <&audio_controller 18>; 123 + }; 124 + codec { 125 + sound-dai = <&codec3>; 126 + dai-tdm-slot-num = <2>; 127 + dai-tdm-slot-width = <8>; 128 + /* TS 9, 10 */ 129 + dai-tdm-slot-tx-mask = <0 0 0 0 0 0 0 0 0 1 1>; 130 + dai-tdm-slot-rx-mask = <0 0 0 0 0 0 0 0 0 1 1>; 130 131 }; 131 132 }; 132 133 };