All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Refactor Audio Graph schema
@ 2020-11-11 12:26 ` Sameer Pujar
  0 siblings, 0 replies; 14+ messages in thread
From: Sameer Pujar @ 2020-11-11 12:26 UTC (permalink / raw)
  To: robh+dt, broonie
  Cc: kuninori.morimoto.gx, alsa-devel, devicetree, linux-kernel, Sameer Pujar

There can be custom sound cards reusing most of the audio-graph
implementation. To allow this refactor the audio-graph-card schema into
following files.
 * audio-graph.yaml       : defines all common bindings
 * audio-graph-card.yaml  : define compatible property

Custom sound cards can just reference 'audio-graph.yaml' and define its
own compatible and specific properties.

This depends on following series:
http://patchwork.ozlabs.org/project/devicetree-bindings/patch/20201102203656.220187-2-robh@kernel.org/

Sameer Pujar (2):
  ASoC: audio-graph-card: Refactor schema
  ASoC: renesas,rsnd: Update audio graph references

 .../bindings/sound/audio-graph-card.yaml           | 102 +-------------------
 .../devicetree/bindings/sound/audio-graph.yaml     | 107 +++++++++++++++++++++
 .../devicetree/bindings/sound/renesas,rsnd.yaml    |   6 +-
 3 files changed, 112 insertions(+), 103 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml

-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 0/2] Refactor Audio Graph schema
@ 2020-11-11 12:26 ` Sameer Pujar
  0 siblings, 0 replies; 14+ messages in thread
From: Sameer Pujar @ 2020-11-11 12:26 UTC (permalink / raw)
  To: robh+dt, broonie
  Cc: Sameer Pujar, devicetree, alsa-devel, linux-kernel, kuninori.morimoto.gx

There can be custom sound cards reusing most of the audio-graph
implementation. To allow this refactor the audio-graph-card schema into
following files.
 * audio-graph.yaml       : defines all common bindings
 * audio-graph-card.yaml  : define compatible property

Custom sound cards can just reference 'audio-graph.yaml' and define its
own compatible and specific properties.

This depends on following series:
http://patchwork.ozlabs.org/project/devicetree-bindings/patch/20201102203656.220187-2-robh@kernel.org/

Sameer Pujar (2):
  ASoC: audio-graph-card: Refactor schema
  ASoC: renesas,rsnd: Update audio graph references

 .../bindings/sound/audio-graph-card.yaml           | 102 +-------------------
 .../devicetree/bindings/sound/audio-graph.yaml     | 107 +++++++++++++++++++++
 .../devicetree/bindings/sound/renesas,rsnd.yaml    |   6 +-
 3 files changed, 112 insertions(+), 103 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml

-- 
2.7.4


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/2] ASoC: audio-graph-card: Refactor schema
  2020-11-11 12:26 ` Sameer Pujar
@ 2020-11-11 12:26   ` Sameer Pujar
  -1 siblings, 0 replies; 14+ messages in thread
From: Sameer Pujar @ 2020-11-11 12:26 UTC (permalink / raw)
  To: robh+dt, broonie
  Cc: kuninori.morimoto.gx, alsa-devel, devicetree, linux-kernel, Sameer Pujar

There can be customized sound cards which are based on generic audio
graph. In such cases most of the stuff is reused from generic audio
graph. To facilitate this, refactor audio graph schema into multiple
files and the base schema can be reused for specific sound cards.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../bindings/sound/audio-graph-card.yaml           | 102 +-------------------
 .../devicetree/bindings/sound/audio-graph.yaml     | 107 +++++++++++++++++++++
 2 files changed, 110 insertions(+), 99 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
index 2329aeb..e047d7d 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
@@ -9,113 +9,17 @@ title: Audio Graph Card Driver Device Tree Bindings
 maintainers:
   - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
 
+allOf:
+  - $ref: /schemas/sound/audio-graph.yaml#
+
 properties:
   compatible:
     enum:
       - audio-graph-card
       - audio-graph-scu-card
 
-  dais:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
-  label:
-    maxItems: 1
-  prefix:
-    description: "device name prefix"
-    $ref: /schemas/types.yaml#/definitions/string
-  routing:
-    description: |
-      A list of the connections between audio components.
-      Each entry is a pair of strings, the first being the
-      connection's sink, the second being the connection's source.
-    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
-  widgets:
-    description: User specified audio sound widgets.
-    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
-  convert-rate:
-    description: CPU to Codec rate convert.
-    $ref: /schemas/types.yaml#/definitions/uint32
-  convert-channels:
-    description: CPU to Codec rate channels.
-    $ref: /schemas/types.yaml#/definitions/uint32
-  pa-gpios:
-    maxItems: 1
-  hp-det-gpio:
-    maxItems: 1
-  mic-det-gpio:
-    maxItems: 1
-
-  port:
-    description: single OF-Graph subnode
-    type: object
-    properties:
-      reg:
-        maxItems: 1
-      prefix:
-        description: "device name prefix"
-        $ref: /schemas/types.yaml#/definitions/string
-      convert-rate:
-        description: CPU to Codec rate convert.
-        $ref: /schemas/types.yaml#/definitions/uint32
-      convert-channels:
-        description: CPU to Codec rate channels.
-        $ref: /schemas/types.yaml#/definitions/uint32
-    patternProperties:
-      "^endpoint(@[0-9a-f]+)?":
-        type: object
-        properties:
-          remote-endpoint:
-            maxItems: 1
-          mclk-fs:
-            description: |
-              Multiplication factor between stream rate and codec mclk.
-              When defined, mclk-fs property defined in dai-link sub nodes are ignored.
-            $ref: /schemas/types.yaml#/definitions/uint32
-          frame-inversion:
-            description: dai-link uses frame clock inversion
-            $ref: /schemas/types.yaml#/definitions/flag
-          bitclock-inversion:
-            description: dai-link uses bit clock inversion
-            $ref: /schemas/types.yaml#/definitions/flag
-          frame-master:
-            description: Indicates dai-link frame master.
-            $ref: /schemas/types.yaml#/definitions/phandle-array
-            maxItems: 1
-          bitclock-master:
-            description: Indicates dai-link bit clock master
-            $ref: /schemas/types.yaml#/definitions/phandle-array
-            maxItems: 1
-          dai-format:
-            description: audio format.
-            items:
-              enum:
-                - i2s
-                - right_j
-                - left_j
-                - dsp_a
-                - dsp_b
-                - ac97
-                - pdm
-                - msb
-                - lsb
-          convert-rate:
-            description: CPU to Codec rate convert.
-            $ref: /schemas/types.yaml#/definitions/uint32
-          convert-channels:
-            description: CPU to Codec rate channels.
-            $ref: /schemas/types.yaml#/definitions/uint32
-        required:
-          - remote-endpoint
-
-  ports:
-    description: multi OF-Graph subnode
-    type: object
-    patternProperties:
-      "^port(@[0-9a-f]+)?":
-        $ref: "#/properties/port"
-
 required:
   - compatible
-  - dais
 
 additionalProperties: false
 
diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml
new file mode 100644
index 0000000..1e338d6
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/audio-graph.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Audio Graph Card Driver Device Tree Bindings
+
+maintainers:
+  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+allOf:
+  - $ref: /schemas/graph.yaml#
+
+select: false
+
+properties:
+  dais:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+  label:
+    maxItems: 1
+  prefix:
+    description: "device name prefix"
+    $ref: /schemas/types.yaml#/definitions/string
+  routing:
+    description: |
+      A list of the connections between audio components.
+      Each entry is a pair of strings, the first being the
+      connection's sink, the second being the connection's source.
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+  widgets:
+    description: User specified audio sound widgets.
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+  convert-rate:
+    description: CPU to Codec rate convert.
+    $ref: /schemas/types.yaml#/definitions/uint32
+  convert-channels:
+    description: CPU to Codec rate channels.
+    $ref: /schemas/types.yaml#/definitions/uint32
+  pa-gpios:
+    maxItems: 1
+  hp-det-gpio:
+    maxItems: 1
+  mic-det-gpio:
+    maxItems: 1
+
+  port:
+    description: single OF-Graph subnode
+    type: object
+    properties:
+      prefix:
+        description: "device name prefix"
+        $ref: /schemas/types.yaml#/definitions/string
+      convert-rate:
+        description: CPU to Codec rate convert.
+        $ref: /schemas/types.yaml#/definitions/uint32
+      convert-channels:
+        description: CPU to Codec rate channels.
+        $ref: /schemas/types.yaml#/definitions/uint32
+    patternProperties:
+      "^endpoint(@[0-9a-f]+)?":
+        type: object
+        properties:
+          mclk-fs:
+            description: |
+              Multiplication factor between stream rate and codec mclk.
+              When defined, mclk-fs property defined in dai-link sub nodes are
+              ignored.
+            $ref: /schemas/types.yaml#/definitions/uint32
+          frame-inversion:
+            description: dai-link uses frame clock inversion
+            $ref: /schemas/types.yaml#/definitions/flag
+          bitclock-inversion:
+            description: dai-link uses bit clock inversion
+            $ref: /schemas/types.yaml#/definitions/flag
+          frame-master:
+            description: Indicates dai-link frame master.
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+            maxItems: 1
+          bitclock-master:
+            description: Indicates dai-link bit clock master
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+            maxItems: 1
+          dai-format:
+            description: audio format.
+            items:
+              enum:
+                - i2s
+                - right_j
+                - left_j
+                - dsp_a
+                - dsp_b
+                - ac97
+                - pdm
+                - msb
+                - lsb
+          convert-rate:
+            description: CPU to Codec rate convert.
+            $ref: /schemas/types.yaml#/definitions/uint32
+          convert-channels:
+            description: CPU to Codec rate channels.
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - dais
+
+additionalProperties: true
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 1/2] ASoC: audio-graph-card: Refactor schema
@ 2020-11-11 12:26   ` Sameer Pujar
  0 siblings, 0 replies; 14+ messages in thread
From: Sameer Pujar @ 2020-11-11 12:26 UTC (permalink / raw)
  To: robh+dt, broonie
  Cc: Sameer Pujar, devicetree, alsa-devel, linux-kernel, kuninori.morimoto.gx

There can be customized sound cards which are based on generic audio
graph. In such cases most of the stuff is reused from generic audio
graph. To facilitate this, refactor audio graph schema into multiple
files and the base schema can be reused for specific sound cards.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 .../bindings/sound/audio-graph-card.yaml           | 102 +-------------------
 .../devicetree/bindings/sound/audio-graph.yaml     | 107 +++++++++++++++++++++
 2 files changed, 110 insertions(+), 99 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml

diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
index 2329aeb..e047d7d 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
@@ -9,113 +9,17 @@ title: Audio Graph Card Driver Device Tree Bindings
 maintainers:
   - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
 
+allOf:
+  - $ref: /schemas/sound/audio-graph.yaml#
+
 properties:
   compatible:
     enum:
       - audio-graph-card
       - audio-graph-scu-card
 
-  dais:
-    $ref: /schemas/types.yaml#/definitions/phandle-array
-  label:
-    maxItems: 1
-  prefix:
-    description: "device name prefix"
-    $ref: /schemas/types.yaml#/definitions/string
-  routing:
-    description: |
-      A list of the connections between audio components.
-      Each entry is a pair of strings, the first being the
-      connection's sink, the second being the connection's source.
-    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
-  widgets:
-    description: User specified audio sound widgets.
-    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
-  convert-rate:
-    description: CPU to Codec rate convert.
-    $ref: /schemas/types.yaml#/definitions/uint32
-  convert-channels:
-    description: CPU to Codec rate channels.
-    $ref: /schemas/types.yaml#/definitions/uint32
-  pa-gpios:
-    maxItems: 1
-  hp-det-gpio:
-    maxItems: 1
-  mic-det-gpio:
-    maxItems: 1
-
-  port:
-    description: single OF-Graph subnode
-    type: object
-    properties:
-      reg:
-        maxItems: 1
-      prefix:
-        description: "device name prefix"
-        $ref: /schemas/types.yaml#/definitions/string
-      convert-rate:
-        description: CPU to Codec rate convert.
-        $ref: /schemas/types.yaml#/definitions/uint32
-      convert-channels:
-        description: CPU to Codec rate channels.
-        $ref: /schemas/types.yaml#/definitions/uint32
-    patternProperties:
-      "^endpoint(@[0-9a-f]+)?":
-        type: object
-        properties:
-          remote-endpoint:
-            maxItems: 1
-          mclk-fs:
-            description: |
-              Multiplication factor between stream rate and codec mclk.
-              When defined, mclk-fs property defined in dai-link sub nodes are ignored.
-            $ref: /schemas/types.yaml#/definitions/uint32
-          frame-inversion:
-            description: dai-link uses frame clock inversion
-            $ref: /schemas/types.yaml#/definitions/flag
-          bitclock-inversion:
-            description: dai-link uses bit clock inversion
-            $ref: /schemas/types.yaml#/definitions/flag
-          frame-master:
-            description: Indicates dai-link frame master.
-            $ref: /schemas/types.yaml#/definitions/phandle-array
-            maxItems: 1
-          bitclock-master:
-            description: Indicates dai-link bit clock master
-            $ref: /schemas/types.yaml#/definitions/phandle-array
-            maxItems: 1
-          dai-format:
-            description: audio format.
-            items:
-              enum:
-                - i2s
-                - right_j
-                - left_j
-                - dsp_a
-                - dsp_b
-                - ac97
-                - pdm
-                - msb
-                - lsb
-          convert-rate:
-            description: CPU to Codec rate convert.
-            $ref: /schemas/types.yaml#/definitions/uint32
-          convert-channels:
-            description: CPU to Codec rate channels.
-            $ref: /schemas/types.yaml#/definitions/uint32
-        required:
-          - remote-endpoint
-
-  ports:
-    description: multi OF-Graph subnode
-    type: object
-    patternProperties:
-      "^port(@[0-9a-f]+)?":
-        $ref: "#/properties/port"
-
 required:
   - compatible
-  - dais
 
 additionalProperties: false
 
diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml
new file mode 100644
index 0000000..1e338d6
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml
@@ -0,0 +1,107 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/sound/audio-graph.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Audio Graph Card Driver Device Tree Bindings
+
+maintainers:
+  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
+
+allOf:
+  - $ref: /schemas/graph.yaml#
+
+select: false
+
+properties:
+  dais:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+  label:
+    maxItems: 1
+  prefix:
+    description: "device name prefix"
+    $ref: /schemas/types.yaml#/definitions/string
+  routing:
+    description: |
+      A list of the connections between audio components.
+      Each entry is a pair of strings, the first being the
+      connection's sink, the second being the connection's source.
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+  widgets:
+    description: User specified audio sound widgets.
+    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
+  convert-rate:
+    description: CPU to Codec rate convert.
+    $ref: /schemas/types.yaml#/definitions/uint32
+  convert-channels:
+    description: CPU to Codec rate channels.
+    $ref: /schemas/types.yaml#/definitions/uint32
+  pa-gpios:
+    maxItems: 1
+  hp-det-gpio:
+    maxItems: 1
+  mic-det-gpio:
+    maxItems: 1
+
+  port:
+    description: single OF-Graph subnode
+    type: object
+    properties:
+      prefix:
+        description: "device name prefix"
+        $ref: /schemas/types.yaml#/definitions/string
+      convert-rate:
+        description: CPU to Codec rate convert.
+        $ref: /schemas/types.yaml#/definitions/uint32
+      convert-channels:
+        description: CPU to Codec rate channels.
+        $ref: /schemas/types.yaml#/definitions/uint32
+    patternProperties:
+      "^endpoint(@[0-9a-f]+)?":
+        type: object
+        properties:
+          mclk-fs:
+            description: |
+              Multiplication factor between stream rate and codec mclk.
+              When defined, mclk-fs property defined in dai-link sub nodes are
+              ignored.
+            $ref: /schemas/types.yaml#/definitions/uint32
+          frame-inversion:
+            description: dai-link uses frame clock inversion
+            $ref: /schemas/types.yaml#/definitions/flag
+          bitclock-inversion:
+            description: dai-link uses bit clock inversion
+            $ref: /schemas/types.yaml#/definitions/flag
+          frame-master:
+            description: Indicates dai-link frame master.
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+            maxItems: 1
+          bitclock-master:
+            description: Indicates dai-link bit clock master
+            $ref: /schemas/types.yaml#/definitions/phandle-array
+            maxItems: 1
+          dai-format:
+            description: audio format.
+            items:
+              enum:
+                - i2s
+                - right_j
+                - left_j
+                - dsp_a
+                - dsp_b
+                - ac97
+                - pdm
+                - msb
+                - lsb
+          convert-rate:
+            description: CPU to Codec rate convert.
+            $ref: /schemas/types.yaml#/definitions/uint32
+          convert-channels:
+            description: CPU to Codec rate channels.
+            $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+  - dais
+
+additionalProperties: true
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] ASoC: renesas,rsnd: Update audio graph references
  2020-11-11 12:26 ` Sameer Pujar
@ 2020-11-11 12:26   ` Sameer Pujar
  -1 siblings, 0 replies; 14+ messages in thread
From: Sameer Pujar @ 2020-11-11 12:26 UTC (permalink / raw)
  To: robh+dt, broonie
  Cc: kuninori.morimoto.gx, alsa-devel, devicetree, linux-kernel, Sameer Pujar

Since audio graph schema is refactored now update the related
references here.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 51f4dca..fc2ae22 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -112,12 +112,10 @@ properties:
         - pattern: '^clk_(a|b|c|i)$'
 
   port:
-    description: OF-Graph subnode
-    $ref: "audio-graph-card.yaml#/properties/port"
+    $ref: /schemas/sound/audio-graph.yaml#/properties/port
 
   ports:
-    description: multi OF-Graph subnode
-    $ref: "audio-graph-card.yaml#/properties/ports"
+    $ref: /schemas/graph.yaml#/properties/ports
 
 # use patternProperties to avoid naming "xxx,yyy" issue
 patternProperties:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] ASoC: renesas,rsnd: Update audio graph references
@ 2020-11-11 12:26   ` Sameer Pujar
  0 siblings, 0 replies; 14+ messages in thread
From: Sameer Pujar @ 2020-11-11 12:26 UTC (permalink / raw)
  To: robh+dt, broonie
  Cc: Sameer Pujar, devicetree, alsa-devel, linux-kernel, kuninori.morimoto.gx

Since audio graph schema is refactored now update the related
references here.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
index 51f4dca..fc2ae22 100644
--- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
@@ -112,12 +112,10 @@ properties:
         - pattern: '^clk_(a|b|c|i)$'
 
   port:
-    description: OF-Graph subnode
-    $ref: "audio-graph-card.yaml#/properties/port"
+    $ref: /schemas/sound/audio-graph.yaml#/properties/port
 
   ports:
-    description: multi OF-Graph subnode
-    $ref: "audio-graph-card.yaml#/properties/ports"
+    $ref: /schemas/graph.yaml#/properties/ports
 
 # use patternProperties to avoid naming "xxx,yyy" issue
 patternProperties:
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/2] Refactor Audio Graph schema
  2020-11-11 12:26 ` Sameer Pujar
@ 2020-11-11 23:24   ` Kuninori Morimoto
  -1 siblings, 0 replies; 14+ messages in thread
From: Kuninori Morimoto @ 2020-11-11 23:24 UTC (permalink / raw)
  To: Sameer Pujar; +Cc: robh+dt, broonie, alsa-devel, devicetree, linux-kernel


Hi Sameer

> There can be custom sound cards reusing most of the audio-graph
> implementation. To allow this refactor the audio-graph-card schema into
> following files.
>  * audio-graph.yaml       : defines all common bindings
>  * audio-graph-card.yaml  : define compatible property
> 
> Custom sound cards can just reference 'audio-graph.yaml' and define its
> own compatible and specific properties.

Thank you for your patches.
I'm not expert of Json-schema, but for audio-graph-card Doc customizing

	Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 0/2] Refactor Audio Graph schema
@ 2020-11-11 23:24   ` Kuninori Morimoto
  0 siblings, 0 replies; 14+ messages in thread
From: Kuninori Morimoto @ 2020-11-11 23:24 UTC (permalink / raw)
  To: Sameer Pujar; +Cc: devicetree, broonie, robh+dt, alsa-devel, linux-kernel


Hi Sameer

> There can be custom sound cards reusing most of the audio-graph
> implementation. To allow this refactor the audio-graph-card schema into
> following files.
>  * audio-graph.yaml       : defines all common bindings
>  * audio-graph-card.yaml  : define compatible property
> 
> Custom sound cards can just reference 'audio-graph.yaml' and define its
> own compatible and specific properties.

Thank you for your patches.
I'm not expert of Json-schema, but for audio-graph-card Doc customizing

	Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] ASoC: audio-graph-card: Refactor schema
  2020-11-11 12:26   ` Sameer Pujar
@ 2020-11-12 16:06     ` Rob Herring
  -1 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2020-11-12 16:06 UTC (permalink / raw)
  To: Sameer Pujar
  Cc: broonie, kuninori.morimoto.gx, alsa-devel, devicetree, linux-kernel

On Wed, Nov 11, 2020 at 05:56:52PM +0530, Sameer Pujar wrote:
> There can be customized sound cards which are based on generic audio
> graph. In such cases most of the stuff is reused from generic audio
> graph. To facilitate this, refactor audio graph schema into multiple
> files and the base schema can be reused for specific sound cards.

I did ack it, but it's not great that this was just applied and now it's 
being changed. If the submitter doesn't have time to work on it more 
then the maintainers shouldn't really have time to apply it.

> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../bindings/sound/audio-graph-card.yaml           | 102 +-------------------
>  .../devicetree/bindings/sound/audio-graph.yaml     | 107 +++++++++++++++++++++
>  2 files changed, 110 insertions(+), 99 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> index 2329aeb..e047d7d 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> @@ -9,113 +9,17 @@ title: Audio Graph Card Driver Device Tree Bindings
>  maintainers:
>    - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>  
> +allOf:
> +  - $ref: /schemas/sound/audio-graph.yaml#
> +
>  properties:
>    compatible:
>      enum:
>        - audio-graph-card
>        - audio-graph-scu-card
>  
> -  dais:
> -    $ref: /schemas/types.yaml#/definitions/phandle-array
> -  label:
> -    maxItems: 1
> -  prefix:
> -    description: "device name prefix"
> -    $ref: /schemas/types.yaml#/definitions/string
> -  routing:
> -    description: |
> -      A list of the connections between audio components.
> -      Each entry is a pair of strings, the first being the
> -      connection's sink, the second being the connection's source.
> -    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> -  widgets:
> -    description: User specified audio sound widgets.
> -    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> -  convert-rate:
> -    description: CPU to Codec rate convert.
> -    $ref: /schemas/types.yaml#/definitions/uint32
> -  convert-channels:
> -    description: CPU to Codec rate channels.
> -    $ref: /schemas/types.yaml#/definitions/uint32
> -  pa-gpios:
> -    maxItems: 1
> -  hp-det-gpio:
> -    maxItems: 1
> -  mic-det-gpio:
> -    maxItems: 1
> -
> -  port:
> -    description: single OF-Graph subnode
> -    type: object
> -    properties:
> -      reg:
> -        maxItems: 1
> -      prefix:
> -        description: "device name prefix"
> -        $ref: /schemas/types.yaml#/definitions/string
> -      convert-rate:
> -        description: CPU to Codec rate convert.
> -        $ref: /schemas/types.yaml#/definitions/uint32
> -      convert-channels:
> -        description: CPU to Codec rate channels.
> -        $ref: /schemas/types.yaml#/definitions/uint32
> -    patternProperties:
> -      "^endpoint(@[0-9a-f]+)?":
> -        type: object
> -        properties:
> -          remote-endpoint:
> -            maxItems: 1
> -          mclk-fs:
> -            description: |
> -              Multiplication factor between stream rate and codec mclk.
> -              When defined, mclk-fs property defined in dai-link sub nodes are ignored.
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -          frame-inversion:
> -            description: dai-link uses frame clock inversion
> -            $ref: /schemas/types.yaml#/definitions/flag
> -          bitclock-inversion:
> -            description: dai-link uses bit clock inversion
> -            $ref: /schemas/types.yaml#/definitions/flag
> -          frame-master:
> -            description: Indicates dai-link frame master.
> -            $ref: /schemas/types.yaml#/definitions/phandle-array
> -            maxItems: 1
> -          bitclock-master:
> -            description: Indicates dai-link bit clock master
> -            $ref: /schemas/types.yaml#/definitions/phandle-array
> -            maxItems: 1
> -          dai-format:
> -            description: audio format.
> -            items:
> -              enum:
> -                - i2s
> -                - right_j
> -                - left_j
> -                - dsp_a
> -                - dsp_b
> -                - ac97
> -                - pdm
> -                - msb
> -                - lsb
> -          convert-rate:
> -            description: CPU to Codec rate convert.
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -          convert-channels:
> -            description: CPU to Codec rate channels.
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -        required:
> -          - remote-endpoint
> -
> -  ports:
> -    description: multi OF-Graph subnode
> -    type: object
> -    patternProperties:
> -      "^port(@[0-9a-f]+)?":
> -        $ref: "#/properties/port"
> -
>  required:
>    - compatible
> -  - dais
>  
>  additionalProperties: false

This is not going to work with all the properties moved. 
'additionalProperties' can't 'see' into the reference. This needs to be 
unevaluatedProperties instead which solves that problem.

>  
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> new file mode 100644
> index 0000000..1e338d6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> @@ -0,0 +1,107 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/audio-graph.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Audio Graph Card Driver Device Tree Bindings
> +
> +maintainers:
> +  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> +
> +allOf:
> +  - $ref: /schemas/graph.yaml#
> +
> +select: false
> +
> +properties:
> +  dais:
> +    $ref: /schemas/types.yaml#/definitions/phandle-array
> +  label:
> +    maxItems: 1
> +  prefix:
> +    description: "device name prefix"
> +    $ref: /schemas/types.yaml#/definitions/string
> +  routing:
> +    description: |
> +      A list of the connections between audio components.
> +      Each entry is a pair of strings, the first being the
> +      connection's sink, the second being the connection's source.
> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> +  widgets:
> +    description: User specified audio sound widgets.
> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> +  convert-rate:
> +    description: CPU to Codec rate convert.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +  convert-channels:
> +    description: CPU to Codec rate channels.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +  pa-gpios:
> +    maxItems: 1
> +  hp-det-gpio:
> +    maxItems: 1
> +  mic-det-gpio:
> +    maxItems: 1
> +
> +  port:
> +    description: single OF-Graph subnode
> +    type: object
> +    properties:
> +      prefix:
> +        description: "device name prefix"
> +        $ref: /schemas/types.yaml#/definitions/string
> +      convert-rate:
> +        description: CPU to Codec rate convert.
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +      convert-channels:
> +        description: CPU to Codec rate channels.
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +    patternProperties:
> +      "^endpoint(@[0-9a-f]+)?":
> +        type: object
> +        properties:
> +          mclk-fs:
> +            description: |
> +              Multiplication factor between stream rate and codec mclk.
> +              When defined, mclk-fs property defined in dai-link sub nodes are
> +              ignored.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +          frame-inversion:
> +            description: dai-link uses frame clock inversion
> +            $ref: /schemas/types.yaml#/definitions/flag
> +          bitclock-inversion:
> +            description: dai-link uses bit clock inversion
> +            $ref: /schemas/types.yaml#/definitions/flag
> +          frame-master:
> +            description: Indicates dai-link frame master.
> +            $ref: /schemas/types.yaml#/definitions/phandle-array
> +            maxItems: 1
> +          bitclock-master:
> +            description: Indicates dai-link bit clock master
> +            $ref: /schemas/types.yaml#/definitions/phandle-array
> +            maxItems: 1
> +          dai-format:
> +            description: audio format.
> +            items:
> +              enum:
> +                - i2s
> +                - right_j
> +                - left_j
> +                - dsp_a
> +                - dsp_b
> +                - ac97
> +                - pdm
> +                - msb
> +                - lsb
> +          convert-rate:
> +            description: CPU to Codec rate convert.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +          convert-channels:
> +            description: CPU to Codec rate channels.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +
> +required:
> +  - dais
> +
> +additionalProperties: true
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] ASoC: audio-graph-card: Refactor schema
@ 2020-11-12 16:06     ` Rob Herring
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2020-11-12 16:06 UTC (permalink / raw)
  To: Sameer Pujar
  Cc: devicetree, alsa-devel, broonie, linux-kernel, kuninori.morimoto.gx

On Wed, Nov 11, 2020 at 05:56:52PM +0530, Sameer Pujar wrote:
> There can be customized sound cards which are based on generic audio
> graph. In such cases most of the stuff is reused from generic audio
> graph. To facilitate this, refactor audio graph schema into multiple
> files and the base schema can be reused for specific sound cards.

I did ack it, but it's not great that this was just applied and now it's 
being changed. If the submitter doesn't have time to work on it more 
then the maintainers shouldn't really have time to apply it.

> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  .../bindings/sound/audio-graph-card.yaml           | 102 +-------------------
>  .../devicetree/bindings/sound/audio-graph.yaml     | 107 +++++++++++++++++++++
>  2 files changed, 110 insertions(+), 99 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/sound/audio-graph.yaml
> 
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> index 2329aeb..e047d7d 100644
> --- a/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> +++ b/Documentation/devicetree/bindings/sound/audio-graph-card.yaml
> @@ -9,113 +9,17 @@ title: Audio Graph Card Driver Device Tree Bindings
>  maintainers:
>    - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>  
> +allOf:
> +  - $ref: /schemas/sound/audio-graph.yaml#
> +
>  properties:
>    compatible:
>      enum:
>        - audio-graph-card
>        - audio-graph-scu-card
>  
> -  dais:
> -    $ref: /schemas/types.yaml#/definitions/phandle-array
> -  label:
> -    maxItems: 1
> -  prefix:
> -    description: "device name prefix"
> -    $ref: /schemas/types.yaml#/definitions/string
> -  routing:
> -    description: |
> -      A list of the connections between audio components.
> -      Each entry is a pair of strings, the first being the
> -      connection's sink, the second being the connection's source.
> -    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> -  widgets:
> -    description: User specified audio sound widgets.
> -    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> -  convert-rate:
> -    description: CPU to Codec rate convert.
> -    $ref: /schemas/types.yaml#/definitions/uint32
> -  convert-channels:
> -    description: CPU to Codec rate channels.
> -    $ref: /schemas/types.yaml#/definitions/uint32
> -  pa-gpios:
> -    maxItems: 1
> -  hp-det-gpio:
> -    maxItems: 1
> -  mic-det-gpio:
> -    maxItems: 1
> -
> -  port:
> -    description: single OF-Graph subnode
> -    type: object
> -    properties:
> -      reg:
> -        maxItems: 1
> -      prefix:
> -        description: "device name prefix"
> -        $ref: /schemas/types.yaml#/definitions/string
> -      convert-rate:
> -        description: CPU to Codec rate convert.
> -        $ref: /schemas/types.yaml#/definitions/uint32
> -      convert-channels:
> -        description: CPU to Codec rate channels.
> -        $ref: /schemas/types.yaml#/definitions/uint32
> -    patternProperties:
> -      "^endpoint(@[0-9a-f]+)?":
> -        type: object
> -        properties:
> -          remote-endpoint:
> -            maxItems: 1
> -          mclk-fs:
> -            description: |
> -              Multiplication factor between stream rate and codec mclk.
> -              When defined, mclk-fs property defined in dai-link sub nodes are ignored.
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -          frame-inversion:
> -            description: dai-link uses frame clock inversion
> -            $ref: /schemas/types.yaml#/definitions/flag
> -          bitclock-inversion:
> -            description: dai-link uses bit clock inversion
> -            $ref: /schemas/types.yaml#/definitions/flag
> -          frame-master:
> -            description: Indicates dai-link frame master.
> -            $ref: /schemas/types.yaml#/definitions/phandle-array
> -            maxItems: 1
> -          bitclock-master:
> -            description: Indicates dai-link bit clock master
> -            $ref: /schemas/types.yaml#/definitions/phandle-array
> -            maxItems: 1
> -          dai-format:
> -            description: audio format.
> -            items:
> -              enum:
> -                - i2s
> -                - right_j
> -                - left_j
> -                - dsp_a
> -                - dsp_b
> -                - ac97
> -                - pdm
> -                - msb
> -                - lsb
> -          convert-rate:
> -            description: CPU to Codec rate convert.
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -          convert-channels:
> -            description: CPU to Codec rate channels.
> -            $ref: /schemas/types.yaml#/definitions/uint32
> -        required:
> -          - remote-endpoint
> -
> -  ports:
> -    description: multi OF-Graph subnode
> -    type: object
> -    patternProperties:
> -      "^port(@[0-9a-f]+)?":
> -        $ref: "#/properties/port"
> -
>  required:
>    - compatible
> -  - dais
>  
>  additionalProperties: false

This is not going to work with all the properties moved. 
'additionalProperties' can't 'see' into the reference. This needs to be 
unevaluatedProperties instead which solves that problem.

>  
> diff --git a/Documentation/devicetree/bindings/sound/audio-graph.yaml b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> new file mode 100644
> index 0000000..1e338d6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/audio-graph.yaml
> @@ -0,0 +1,107 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/sound/audio-graph.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Audio Graph Card Driver Device Tree Bindings
> +
> +maintainers:
> +  - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> +
> +allOf:
> +  - $ref: /schemas/graph.yaml#
> +
> +select: false
> +
> +properties:
> +  dais:
> +    $ref: /schemas/types.yaml#/definitions/phandle-array
> +  label:
> +    maxItems: 1
> +  prefix:
> +    description: "device name prefix"
> +    $ref: /schemas/types.yaml#/definitions/string
> +  routing:
> +    description: |
> +      A list of the connections between audio components.
> +      Each entry is a pair of strings, the first being the
> +      connection's sink, the second being the connection's source.
> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> +  widgets:
> +    description: User specified audio sound widgets.
> +    $ref: /schemas/types.yaml#/definitions/non-unique-string-array
> +  convert-rate:
> +    description: CPU to Codec rate convert.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +  convert-channels:
> +    description: CPU to Codec rate channels.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +  pa-gpios:
> +    maxItems: 1
> +  hp-det-gpio:
> +    maxItems: 1
> +  mic-det-gpio:
> +    maxItems: 1
> +
> +  port:
> +    description: single OF-Graph subnode
> +    type: object
> +    properties:
> +      prefix:
> +        description: "device name prefix"
> +        $ref: /schemas/types.yaml#/definitions/string
> +      convert-rate:
> +        description: CPU to Codec rate convert.
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +      convert-channels:
> +        description: CPU to Codec rate channels.
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +    patternProperties:
> +      "^endpoint(@[0-9a-f]+)?":
> +        type: object
> +        properties:
> +          mclk-fs:
> +            description: |
> +              Multiplication factor between stream rate and codec mclk.
> +              When defined, mclk-fs property defined in dai-link sub nodes are
> +              ignored.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +          frame-inversion:
> +            description: dai-link uses frame clock inversion
> +            $ref: /schemas/types.yaml#/definitions/flag
> +          bitclock-inversion:
> +            description: dai-link uses bit clock inversion
> +            $ref: /schemas/types.yaml#/definitions/flag
> +          frame-master:
> +            description: Indicates dai-link frame master.
> +            $ref: /schemas/types.yaml#/definitions/phandle-array
> +            maxItems: 1
> +          bitclock-master:
> +            description: Indicates dai-link bit clock master
> +            $ref: /schemas/types.yaml#/definitions/phandle-array
> +            maxItems: 1
> +          dai-format:
> +            description: audio format.
> +            items:
> +              enum:
> +                - i2s
> +                - right_j
> +                - left_j
> +                - dsp_a
> +                - dsp_b
> +                - ac97
> +                - pdm
> +                - msb
> +                - lsb
> +          convert-rate:
> +            description: CPU to Codec rate convert.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +          convert-channels:
> +            description: CPU to Codec rate channels.
> +            $ref: /schemas/types.yaml#/definitions/uint32
> +
> +required:
> +  - dais
> +
> +additionalProperties: true
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ASoC: renesas,rsnd: Update audio graph references
  2020-11-11 12:26   ` Sameer Pujar
@ 2020-11-12 16:07     ` Rob Herring
  -1 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2020-11-12 16:07 UTC (permalink / raw)
  To: Sameer Pujar
  Cc: broonie, kuninori.morimoto.gx, alsa-devel, devicetree, linux-kernel

On Wed, Nov 11, 2020 at 05:56:53PM +0530, Sameer Pujar wrote:
> Since audio graph schema is refactored now update the related
> references here.
> 
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

This should be part of the first patch. Things break in between.

> 
> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> index 51f4dca..fc2ae22 100644
> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> @@ -112,12 +112,10 @@ properties:
>          - pattern: '^clk_(a|b|c|i)$'
>  
>    port:
> -    description: OF-Graph subnode
> -    $ref: "audio-graph-card.yaml#/properties/port"
> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
>  
>    ports:
> -    description: multi OF-Graph subnode
> -    $ref: "audio-graph-card.yaml#/properties/ports"
> +    $ref: /schemas/graph.yaml#/properties/ports
>  
>  # use patternProperties to avoid naming "xxx,yyy" issue
>  patternProperties:
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ASoC: renesas,rsnd: Update audio graph references
@ 2020-11-12 16:07     ` Rob Herring
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2020-11-12 16:07 UTC (permalink / raw)
  To: Sameer Pujar
  Cc: devicetree, alsa-devel, broonie, linux-kernel, kuninori.morimoto.gx

On Wed, Nov 11, 2020 at 05:56:53PM +0530, Sameer Pujar wrote:
> Since audio graph schema is refactored now update the related
> references here.
> 
> Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)

This should be part of the first patch. Things break in between.

> 
> diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> index 51f4dca..fc2ae22 100644
> --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> @@ -112,12 +112,10 @@ properties:
>          - pattern: '^clk_(a|b|c|i)$'
>  
>    port:
> -    description: OF-Graph subnode
> -    $ref: "audio-graph-card.yaml#/properties/port"
> +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
>  
>    ports:
> -    description: multi OF-Graph subnode
> -    $ref: "audio-graph-card.yaml#/properties/ports"
> +    $ref: /schemas/graph.yaml#/properties/ports
>  
>  # use patternProperties to avoid naming "xxx,yyy" issue
>  patternProperties:
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ASoC: renesas,rsnd: Update audio graph references
  2020-11-12 16:07     ` Rob Herring
@ 2020-11-12 16:15       ` Rob Herring
  -1 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2020-11-12 16:15 UTC (permalink / raw)
  To: Sameer Pujar
  Cc: Mark Brown, Kuninori Morimoto, Linux-ALSA, devicetree, linux-kernel

On Thu, Nov 12, 2020 at 10:07 AM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Nov 11, 2020 at 05:56:53PM +0530, Sameer Pujar wrote:
> > Since audio graph schema is refactored now update the related
> > references here.
> >
> > Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> > Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
>
> This should be part of the first patch. Things break in between.
>
> >
> > diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > index 51f4dca..fc2ae22 100644
> > --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > @@ -112,12 +112,10 @@ properties:
> >          - pattern: '^clk_(a|b|c|i)$'
> >
> >    port:
> > -    description: OF-Graph subnode
> > -    $ref: "audio-graph-card.yaml#/properties/port"
> > +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
> >
> >    ports:
> > -    description: multi OF-Graph subnode
> > -    $ref: "audio-graph-card.yaml#/properties/ports"
> > +    $ref: /schemas/graph.yaml#/properties/ports

Actually, with the graph.yaml dependency that doesn't work either. I
think this probably needs to be a ref to just audio-graph.yaml at the
top level and that should pick up port and ports schemas.

Rob

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/2] ASoC: renesas,rsnd: Update audio graph references
@ 2020-11-12 16:15       ` Rob Herring
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring @ 2020-11-12 16:15 UTC (permalink / raw)
  To: Sameer Pujar
  Cc: devicetree, Linux-ALSA, Mark Brown, linux-kernel, Kuninori Morimoto

On Thu, Nov 12, 2020 at 10:07 AM Rob Herring <robh@kernel.org> wrote:
>
> On Wed, Nov 11, 2020 at 05:56:53PM +0530, Sameer Pujar wrote:
> > Since audio graph schema is refactored now update the related
> > references here.
> >
> > Signed-off-by: Sameer Pujar <spujar@nvidia.com>
> > Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  Documentation/devicetree/bindings/sound/renesas,rsnd.yaml | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
>
> This should be part of the first patch. Things break in between.
>
> >
> > diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > index 51f4dca..fc2ae22 100644
> > --- a/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > +++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.yaml
> > @@ -112,12 +112,10 @@ properties:
> >          - pattern: '^clk_(a|b|c|i)$'
> >
> >    port:
> > -    description: OF-Graph subnode
> > -    $ref: "audio-graph-card.yaml#/properties/port"
> > +    $ref: /schemas/sound/audio-graph.yaml#/properties/port
> >
> >    ports:
> > -    description: multi OF-Graph subnode
> > -    $ref: "audio-graph-card.yaml#/properties/ports"
> > +    $ref: /schemas/graph.yaml#/properties/ports

Actually, with the graph.yaml dependency that doesn't work either. I
think this probably needs to be a ref to just audio-graph.yaml at the
top level and that should pick up port and ports schemas.

Rob

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2020-11-12 16:16 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-11 12:26 [PATCH 0/2] Refactor Audio Graph schema Sameer Pujar
2020-11-11 12:26 ` Sameer Pujar
2020-11-11 12:26 ` [PATCH 1/2] ASoC: audio-graph-card: Refactor schema Sameer Pujar
2020-11-11 12:26   ` Sameer Pujar
2020-11-12 16:06   ` Rob Herring
2020-11-12 16:06     ` Rob Herring
2020-11-11 12:26 ` [PATCH 2/2] ASoC: renesas,rsnd: Update audio graph references Sameer Pujar
2020-11-11 12:26   ` Sameer Pujar
2020-11-12 16:07   ` Rob Herring
2020-11-12 16:07     ` Rob Herring
2020-11-12 16:15     ` Rob Herring
2020-11-12 16:15       ` Rob Herring
2020-11-11 23:24 ` [PATCH 0/2] Refactor Audio Graph schema Kuninori Morimoto
2020-11-11 23:24   ` Kuninori Morimoto

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.