]> git.baikalelectronics.ru Git - kernel.git/commitdiff
ASoC: dt-bindings: Add sample format conversion
authorSameer Pujar <spujar@nvidia.com>
Mon, 8 Aug 2022 05:27:31 +0000 (10:57 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 15 Aug 2022 00:19:54 +0000 (01:19 +0100)
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 audio-graph-card based bindings.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/1659936452-2254-3-git-send-email-spujar@nvidia.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Documentation/devicetree/bindings/sound/audio-graph-port.yaml
Documentation/devicetree/bindings/sound/audio-graph.yaml
Documentation/devicetree/bindings/sound/dai-params.yaml

index fa3931be38d69120ed71a4d1bbbf513961e3cc16..7ff7a4a104fae34e2b3c03639535f2240b9594b1 100644 (file)
@@ -22,6 +22,8 @@ properties:
     $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
   convert-channels:
     $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
+  convert-sample-format:
+    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
 
 patternProperties:
   "^endpoint(@[0-9a-f]+)?":
@@ -67,6 +69,8 @@ patternProperties:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
       convert-channels:
         $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
+      convert-sample-format:
+        $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
 
       dai-tdm-slot-width-map:
         description: Mapping of sample widths to slot widths. For hardware
index ffee5c9e2a6cba05205db785696dd7968b3094b6..aaa99c2deda08c6d70fb8da3ca01cec8bfaad845 100644 (file)
@@ -30,6 +30,8 @@ properties:
     $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-rate"
   convert-channels:
     $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-channels"
+  convert-sample-format:
+    $ref: "/schemas/sound/dai-params.yaml#/$defs/dai-sample-format"
 
   pa-gpios:
     maxItems: 1
index f1421a0798c44f7f8213137f713ea980e875fa01..f5fb71f9b603f1e9e8c16a5e65111000fb21c64a 100644 (file)
@@ -19,6 +19,16 @@ $defs:
     minimum: 1
     maximum: 32
 
+  dai-sample-format:
+    description: Audio sample format used by DAI
+    $ref: /schemas/types.yaml#/definitions/string
+    enum:
+      - s8
+      - s16_le
+      - s24_le
+      - s24_3le
+      - s32_le
+
   dai-sample-rate:
     description: Audio sample rate used by DAI
     $ref: /schemas/types.yaml#/definitions/uint32