[PATCH v2] ASoC: dt-bindings: Document audio OF graph dai-tdm-slot-num dai-tdm-slot-width props

Marek Vasut marex at denx.de
Thu Oct 27 22:25:28 CEST 2022


On 10/14/22 01:34, Krzysztof Kozlowski wrote:
> On 27/09/2022 14:53, Marek Vasut wrote:
>> Document dai-tdm-slot-num and dai-tdm-slot-width props as those are
>> parsed by simple graph card and may therefore appear in audio OF graph
>> node.
>>
>> Signed-off-by: Marek Vasut <marex at denx.de>
>> ---
>> Cc: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
>> Cc: Liam Girdwood <lgirdwood at gmail.com>
>> Cc: Mark Brown <broonie at kernel.org>
>> Cc: Rob Herring <robh+dt at kernel.org>
>> Cc: devicetree at vger.kernel.org
>> Cc: alsa-devel at alsa-project.org
>> To: linux-arm-kernel at lists.infradead.org
>> ---
>> V2: Drop the definition refs and just fill in type and description
>> ---
>>   .../devicetree/bindings/sound/audio-graph-port.yaml         | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
>> index bc46a95ed8400..64654ceef2089 100644
>> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
>> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
>> @@ -74,6 +74,12 @@ patternProperties:
>>         convert-sample-format:
>>           $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
>>   
>> +      dai-tdm-slot-num:
>> +        description: Number of slots in use.
>> +        $ref: /schemas/types.yaml#/definitions/uint32
>> +      dai-tdm-slot-width:
>> +        description: Width in bits for each slot.
>> +        $ref: /schemas/types.yaml#/definitions/uint32
> 
> Isn't the slot width already part of dai-tdm-slot-width-map? Number of
> slots maybe as well can be deducted from number of tuples in
> dai-tdm-slot-width-map?

It seems to me per commit:
26e5366dd3056 ("ASoC: dt-bindings: audio-graph-port: Add 
dai-tdm-slot-width-map")
that "dai-tdm-slot-width-map" was meant to address some sort of hardware 
special case, or rather limitation, where the hardware was unable to be 
configured in arbitrary manner, hence the list of available usable 
configurations.

However, there seem to be no users of such a list in tree:
next$ git grep -l dai-tdm-slot-width-map
Documentation/devicetree/bindings/sound/audio-graph-port.yaml
sound/soc/generic/simple-card-utils.c

There are users of the dai-tdm-slot-width however:
next$ git grep -l dai-tdm-slot-width arch
arch/arm/boot/dts/stm32mp15xx-dkx.dtsi
arch/arm64/boot/dts/allwinner/sun50i-a64-pinephone.dtsi
arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi
arch/arm64/boot/dts/freescale/imx8mn-evk.dtsi
arch/arm64/boot/dts/freescale/imx8mq-evk.dts

As far as I can tell, the dai-tdm-slot-width describes generic hardware 
without limitations, which can be configured in an arbitrary manner, so 
this is the preferred DT property (over the map one).

Also, sorry for the late reply.

>>         dai-tdm-slot-width-map:
>>           description: Mapping of sample widths to slot widths. For hardware
>>             that cannot support a fixed slot width or a slot width always
[...]



More information about the Alsa-devel mailing list