lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Fri, 29 Jul 2022 09:41:26 +0530
From:   Sameer Pujar <spujar@...dia.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
        broonie@...nel.org, lgirdwood@...il.com, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, perex@...ex.cz, tiwai@...e.com,
        kuninori.morimoto.gx@...esas.com
Cc:     alsa-devel@...a-project.org, devicetree@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] ASoC: dt-bindings: Add sample format conversion


On 28-07-2022 17:52, Krzysztof Kozlowski wrote:
> On 27/07/2022 16:26, Sameer Pujar wrote:
>> Presently "convert-channels" and "convert-rate" DT bindings are available
>> for channel and rate fixups respectively.
>>
>> Similarly add "convert-sample-format" binding to fixup DAI sample format
>> as well. This is added to simple-card and audio-graph based sound cards.
>>
>> Signed-off-by: Sameer Pujar <spujar@...dia.com>
>> Cc: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
>> ---
>>   .../devicetree/bindings/sound/audio-graph-port.yaml | 21 +++++++++++++++++++++
>>   .../devicetree/bindings/sound/audio-graph.yaml      | 11 +++++++++++
>>   .../devicetree/bindings/sound/simple-card.yaml      | 15 +++++++++++++++
>>   3 files changed, 47 insertions(+)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
>> index 5c36867..d7491038 100644
>> --- a/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
>> +++ b/Documentation/devicetree/bindings/sound/audio-graph-port.yaml
>> @@ -24,6 +24,17 @@ properties:
>>     convert-channels:
>>       description: CPU to Codec rate channels.
>>       $ref: /schemas/types.yaml#/definitions/uint32
> Missing blank line.

will fix.

>
>> +  convert-sample-format:
>> +    description: CPU to Codec sample format.
>> +      Value    Format
>> +        0        S8
>> +        2        S16_LE
>> +        6        S24_LE
>> +        10       S32_LE
>> +        32       S24_3LE
> Why some random set of integers? Just use string, must more descriptive
> and you do not embed programming model to DT... unless there is some
> reason for this approach?

I referenced it from similar usage in fsl,easrc.yaml for binding 
"fsl,asrc-format" and driver can directly use it. However agree with 
above and let me use strings here.


[...]


> diff --git a/Documentation/devicetree/bindings/sound/simple-card.yaml b/Documentation/devicetree/bindings/sound/simple-card.yaml
> index b261d49..6decd73 100644
> --- a/Documentation/devicetree/bindings/sound/simple-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/simple-card.yaml
> @@ -77,6 +77,17 @@ definitions:
>       description: CPU to Codec rate channels.
>       $ref: /schemas/types.yaml#/definitions/uint32
>
> +  convert-sample-format:
> +    description: CPU to Codec sample format.
> +      Value    Format
> +        0        S8
> +        2        S16_LE
> +        6        S24_LE
> +        10       S32_LE
> +        32       S24_3LE
> +    $ref: /schemas/types.yaml#/definitions/uint32
> Wait, you now put the same property in four different places. Don't you
> have something which could be shared?
>
There is no shared schema between simple-card.yaml and others. I will 
have to create a new doc to share these definitions.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ