All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org,
	perex@perex.cz, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	bgoswami@codeaurora.org,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH v3 07/20] ASoC: dt-bindings: replace q6asm with q6dsp audio stream bindings
Date: Tue,  3 Aug 2021 13:53:58 +0100	[thread overview]
Message-ID: <20210803125411.28066-8-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20210803125411.28066-1-srinivas.kandagatla@linaro.org>

DSP Audio Strem bindings have been documented with DSP services bindings
which makes it difficult to reuse them, so pull them out in to a dedicated
bindings.
Also as part of this change convert them into yaml format.

This patch also removes q6asm bindings as dsp services are now documented in
apr bindings.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../devicetree/bindings/sound/qcom,q6asm.txt  | 70 --------------
 .../sound/qcom,q6dsp-audio-stream.yaml        | 94 +++++++++++++++++++
 2 files changed, 94 insertions(+), 70 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
deleted file mode 100644
index 8c4883becae9..000000000000
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-Qualcomm Audio Stream Manager (Q6ASM) binding
-
-Q6ASM is one of the APR audio service on Q6DSP.
-Please refer to qcom,apr.txt for details of the common apr service bindings
-used by the apr service device.
-
-- but must contain the following property:
-
-- compatible:
-	Usage: required
-	Value type: <stringlist>
-	Definition: must be "qcom,q6asm-v<MAJOR-NUMBER>.<MINOR-NUMBER>".
-		    Or "qcom,q6asm" where the version number can be queried
-		    from DSP.
-		    example "qcom,q6asm-v2.0"
-
-= ASM DAIs (Digial Audio Interface)
-"dais" subnode of the ASM node represents dai specific configuration
-
-- compatible:
-	Usage: required
-	Value type: <stringlist>
-	Definition: must be "qcom,q6asm-dais".
-
-- #sound-dai-cells
-	Usage: required
-	Value type: <u32>
-	Definition: Must be 1
-
-== ASM DAI is subnode of "dais" and represent a dai, it includes board specific
-configuration of each dai. Must contain the following properties.
-
-- reg
-	Usage: required
-	Value type: <u32>
-	Definition: Must be dai id
-
-- direction:
-	Usage: Required for Compress offload dais
-	Value type: <u32>
-	Definition: Specifies the direction of the dai stream
-			Q6ASM_DAI_TX_RX (0) for both tx and rx
-			Q6ASM_DAI_TX (1) for only tx (Capture/Encode)
-			Q6ASM_DAI_RX (2) for only rx (Playback/Decode)
-
-- is-compress-dai:
-	Usage: Required for Compress offload dais
-	Value type: <boolean>
-	Definition: present for Compress offload dais
-
-
-= EXAMPLE
-#include <dt-bindings/sound/qcom,q6asm.h>
-
-apr-service@7 {
-	compatible = "qcom,q6asm";
-	reg = <APR_SVC_ASM>;
-	q6asmdai: dais {
-		compatible = "qcom,q6asm-dais";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		#sound-dai-cells = <1>;
-
-		dai@0 {
-			reg = <0>;
-			direction = <Q6ASM_DAI_RX>;
-			is-compress-dai;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml
new file mode 100644
index 000000000000..0e70b486b51a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/sound/qcom,q6dsp-audio-stream.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm DSP Audio Stream binding
+
+maintainers:
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+  This binding describes the Qualcomm DSP Audio stream
+
+properties:
+  compatible:
+    const: qcom,q6asm-dais
+
+  reg:
+    maxItems: 1
+
+  '#sound-dai-cells':
+    const: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+#Digital Audio Interfaces
+patternProperties:
+  '^dai@[0-9]+$':
+    type: object
+    description:
+      Q6DSP Audio Stream Digital Audio Interfaces.
+
+    properties:
+      reg:
+        description:
+          Digital Audio Interface ID
+
+      direction:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [0, 1, 2]
+        description:
+          Compress DAI direction
+            0 = bi-directional
+            1 = tx only
+            2 = rx only
+
+      is-compress-dai:
+        type: boolean
+        description:
+          Indicate if DAI is for compress offload
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - "#sound-dai-cells"
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/soc/qcom,apr.h>
+    apr {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        apr-service@7 {
+            reg = <APR_SVC_ASM>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+            q6asmdai@1 {
+              compatible = "qcom,q6asm-dais";
+              reg = <1>;
+              #address-cells = <1>;
+              #size-cells = <0>;
+              #sound-dai-cells = <1>;
+
+              dai@1 {
+                reg = <1>;
+                is-compress-dai;
+              };
+            };
+        };
+      };
-- 
2.21.0


WARNING: multiple messages have this Message-ID (diff)
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	bgoswami@codeaurora.org, tiwai@suse.de, plai@codeaurora.org,
	lgirdwood@gmail.com
Subject: [PATCH v3 07/20] ASoC: dt-bindings: replace q6asm with q6dsp audio stream bindings
Date: Tue,  3 Aug 2021 13:53:58 +0100	[thread overview]
Message-ID: <20210803125411.28066-8-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20210803125411.28066-1-srinivas.kandagatla@linaro.org>

DSP Audio Strem bindings have been documented with DSP services bindings
which makes it difficult to reuse them, so pull them out in to a dedicated
bindings.
Also as part of this change convert them into yaml format.

This patch also removes q6asm bindings as dsp services are now documented in
apr bindings.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 .../devicetree/bindings/sound/qcom,q6asm.txt  | 70 --------------
 .../sound/qcom,q6dsp-audio-stream.yaml        | 94 +++++++++++++++++++
 2 files changed, 94 insertions(+), 70 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.txt
 create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml

diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt b/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
deleted file mode 100644
index 8c4883becae9..000000000000
--- a/Documentation/devicetree/bindings/sound/qcom,q6asm.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-Qualcomm Audio Stream Manager (Q6ASM) binding
-
-Q6ASM is one of the APR audio service on Q6DSP.
-Please refer to qcom,apr.txt for details of the common apr service bindings
-used by the apr service device.
-
-- but must contain the following property:
-
-- compatible:
-	Usage: required
-	Value type: <stringlist>
-	Definition: must be "qcom,q6asm-v<MAJOR-NUMBER>.<MINOR-NUMBER>".
-		    Or "qcom,q6asm" where the version number can be queried
-		    from DSP.
-		    example "qcom,q6asm-v2.0"
-
-= ASM DAIs (Digial Audio Interface)
-"dais" subnode of the ASM node represents dai specific configuration
-
-- compatible:
-	Usage: required
-	Value type: <stringlist>
-	Definition: must be "qcom,q6asm-dais".
-
-- #sound-dai-cells
-	Usage: required
-	Value type: <u32>
-	Definition: Must be 1
-
-== ASM DAI is subnode of "dais" and represent a dai, it includes board specific
-configuration of each dai. Must contain the following properties.
-
-- reg
-	Usage: required
-	Value type: <u32>
-	Definition: Must be dai id
-
-- direction:
-	Usage: Required for Compress offload dais
-	Value type: <u32>
-	Definition: Specifies the direction of the dai stream
-			Q6ASM_DAI_TX_RX (0) for both tx and rx
-			Q6ASM_DAI_TX (1) for only tx (Capture/Encode)
-			Q6ASM_DAI_RX (2) for only rx (Playback/Decode)
-
-- is-compress-dai:
-	Usage: Required for Compress offload dais
-	Value type: <boolean>
-	Definition: present for Compress offload dais
-
-
-= EXAMPLE
-#include <dt-bindings/sound/qcom,q6asm.h>
-
-apr-service@7 {
-	compatible = "qcom,q6asm";
-	reg = <APR_SVC_ASM>;
-	q6asmdai: dais {
-		compatible = "qcom,q6asm-dais";
-		#address-cells = <1>;
-		#size-cells = <0>;
-		#sound-dai-cells = <1>;
-
-		dai@0 {
-			reg = <0>;
-			direction = <Q6ASM_DAI_RX>;
-			is-compress-dai;
-		};
-	};
-};
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml
new file mode 100644
index 000000000000..0e70b486b51a
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-audio-stream.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/sound/qcom,q6dsp-audio-stream.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Qualcomm DSP Audio Stream binding
+
+maintainers:
+  - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
+
+description: |
+  This binding describes the Qualcomm DSP Audio stream
+
+properties:
+  compatible:
+    const: qcom,q6asm-dais
+
+  reg:
+    maxItems: 1
+
+  '#sound-dai-cells':
+    const: 1
+
+  '#address-cells':
+    const: 1
+
+  '#size-cells':
+    const: 0
+
+#Digital Audio Interfaces
+patternProperties:
+  '^dai@[0-9]+$':
+    type: object
+    description:
+      Q6DSP Audio Stream Digital Audio Interfaces.
+
+    properties:
+      reg:
+        description:
+          Digital Audio Interface ID
+
+      direction:
+        $ref: /schemas/types.yaml#/definitions/uint32
+        enum: [0, 1, 2]
+        description:
+          Compress DAI direction
+            0 = bi-directional
+            1 = tx only
+            2 = rx only
+
+      is-compress-dai:
+        type: boolean
+        description:
+          Indicate if DAI is for compress offload
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+  - "#sound-dai-cells"
+  - "#address-cells"
+  - "#size-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/soc/qcom,apr.h>
+    apr {
+        #address-cells = <1>;
+        #size-cells = <0>;
+        apr-service@7 {
+            reg = <APR_SVC_ASM>;
+            #address-cells = <1>;
+            #size-cells = <0>;
+            q6asmdai@1 {
+              compatible = "qcom,q6asm-dais";
+              reg = <1>;
+              #address-cells = <1>;
+              #size-cells = <0>;
+              #sound-dai-cells = <1>;
+
+              dai@1 {
+                reg = <1>;
+                is-compress-dai;
+              };
+            };
+        };
+      };
-- 
2.21.0


  parent reply	other threads:[~2021-08-03 12:54 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-03 12:53 [PATCH v3 00/20] ASoC: qcom: Add AudioReach support Srinivas Kandagatla
2021-08-03 12:53 ` Srinivas Kandagatla
2021-08-03 12:53 ` [PATCH v3 01/20] soc: dt-bindings: qcom: apr: convert to yaml Srinivas Kandagatla
2021-08-03 12:53   ` Srinivas Kandagatla
2021-08-03 12:53 ` [PATCH v3 02/20] soc: qcom: apr: make code more reuseable Srinivas Kandagatla
2021-08-03 12:53   ` Srinivas Kandagatla
2021-08-03 12:53 ` [PATCH v3 03/20] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
2021-08-03 12:53   ` Srinivas Kandagatla
2021-08-03 12:53 ` [PATCH v3 04/20] soc: qcom: apr: Add GPR support Srinivas Kandagatla
2021-08-03 12:53   ` Srinivas Kandagatla
2021-08-03 12:53 ` [PATCH v3 05/20] ASoC: dt-bindings: replace q6afe bindings with q6dsp-audio-ports Srinivas Kandagatla
2021-08-03 12:53   ` Srinivas Kandagatla
2021-08-04 17:53   ` Mark Brown
2021-08-04 17:53     ` Mark Brown
2021-08-05  9:16     ` Srinivas Kandagatla
2021-08-05  9:16       ` Srinivas Kandagatla
2021-08-11 18:19       ` Rob Herring
2021-08-11 18:19         ` Rob Herring
2021-08-03 12:53 ` [PATCH v3 06/20] ASoC: dt-bindings: replace q6afe-clk with q6dsp audio clk bindings Srinivas Kandagatla
2021-08-03 12:53   ` Srinivas Kandagatla
2021-08-11 18:24   ` Rob Herring
2021-08-11 18:24     ` Rob Herring
2021-08-03 12:53 ` Srinivas Kandagatla [this message]
2021-08-03 12:53   ` [PATCH v3 07/20] ASoC: dt-bindings: replace q6asm with q6dsp audio stream bindings Srinivas Kandagatla
2021-08-03 12:53 ` [PATCH v3 08/20] ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file Srinivas Kandagatla
2021-08-03 12:53   ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 09/20] ASoC: qdsp6: q6afe-clocks: move audio-clocks " Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 10/20] ASoC: dt-bindings: q6dsp: add q6apm-dai compatible Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-04 18:01   ` Mark Brown
2021-08-04 18:01     ` Mark Brown
2021-08-05  9:16     ` Srinivas Kandagatla
2021-08-05  9:16       ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 11/20] ASoC: dt-bindings: q6dsp: add q6apm-bedai compatible Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-04 18:01   ` Mark Brown
2021-08-04 18:01     ` Mark Brown
2021-08-05  9:16     ` Srinivas Kandagatla
2021-08-05  9:16       ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 12/20] ASoC: dt-bindings: q6dsp-clocks: add q6prm clocks compatible Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-04 18:02   ` Mark Brown
2021-08-04 18:02     ` Mark Brown
2021-08-05  9:17     ` Srinivas Kandagatla
2021-08-05  9:17       ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 13/20] ASoC: qdsp6: audioreach: add basic pkt alloc support Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 14:19   ` Amadeusz Sławiński
2021-08-03 14:39     ` Srinivas Kandagatla
2021-08-04 18:09   ` Mark Brown
2021-08-04 18:09     ` Mark Brown
2021-08-05  9:17     ` Srinivas Kandagatla
2021-08-05  9:17       ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 14/20] ASoC: qdsp6: audioreach: add q6apm support Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 14:20   ` Amadeusz Sławiński
2021-08-03 14:48     ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 15/20] ASoC: qdsp6: audioreach: add module configuration command helpers Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 16/20] ASoC: qdsp6: audioreach: add topology support Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 14:21   ` Amadeusz Sławiński
2021-08-03 14:47     ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 17/20] ASoC: qdsp6: audioreach: add q6apm-dai support Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 18/20] ASoC: qdsp6: audioreach: add bedai support Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 19/20] ASoC: qdsp6: audioreach: add q6prm support Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 12:54 ` [PATCH v3 20/20] ASoC: qdsp6: audioreach: add support for q6prm-clocks Srinivas Kandagatla
2021-08-03 12:54   ` Srinivas Kandagatla
2021-08-03 15:00 ` [PATCH v3 00/20] ASoC: qcom: Add AudioReach support Pierre-Louis Bossart
2021-08-03 15:03   ` Srinivas Kandagatla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210803125411.28066-8-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=plai@codeaurora.org \
    --cc=robh@kernel.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.