* [PATCH v1 RFC] ASoC: dt-bindings: Define '#sound-dai-cells' only in the dai-common schema
@ 2026-10-24 8:43 Svyatoslav Ryhel
0 siblings, 0 replies; only message in thread
From: Svyatoslav Ryhel @ 2026-10-24 8:43 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Svyatoslav Ryhel
Cc: linux-sound, devicetree, linux-kernel
Define the '#sound-dai-cells' property only in the dai-common schema with
an enum of commonly used values and a description on how to use them. Drop
all trivial uses of '#sound-dai-cells' across devices with DAI support,
replacing them with a reference to the dai-common schema.
This should resolve any issues with codecs having multiple DAI cells, no
DAI cells at all, or incorrectly configured sound-dai-cells properties.
Simply include the common schema and switch additionalProperties to
unevaluatedProperties.
Non-trivial '#sound-dai-cells' usages can still be overridden in dedicated
device schemas.
Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
NOTE: This is currently just a concept. The actual patch will be very large,
as it touches nearly every codec binding. Therefore, I am sending this RFC
to ask if this change would be acceptable in principle, and if so, how it
should best be structured and split. Thanks.
---
Documentation/devicetree/bindings/sound/dai-common.yaml | 6 +++++-
Documentation/devicetree/bindings/sound/linux,bt-sco.yaml | 7 -------
Documentation/devicetree/bindings/sound/linux,spdif.yaml | 5 +----
3 files changed, 6 insertions(+), 12 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/dai-common.yaml b/Documentation/devicetree/bindings/sound/dai-common.yaml
index 1aed2f0f17756..152f319d8f382 100644
--- a/Documentation/devicetree/bindings/sound/dai-common.yaml
+++ b/Documentation/devicetree/bindings/sound/dai-common.yaml
@@ -13,6 +13,10 @@ allOf:
- $ref: component-common.yaml#
properties:
- '#sound-dai-cells': true
+ '#sound-dai-cells':
+ description:
+ Use 0 if only a single DAI cell is available, or 1 if there are multiple
+ DAI cells. For special cases, check the device schema.
+ enum: [0, 1]
additionalProperties: true
diff --git a/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml b/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml
index a67b79cbe006b..f30aea4b545c9 100644
--- a/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml
+++ b/Documentation/devicetree/bindings/sound/linux,bt-sco.yaml
@@ -13,13 +13,6 @@ allOf:
- $ref: dai-common.yaml#
properties:
- '#sound-dai-cells':
- enum:
- - 0
-
- # For Wideband PCM
- - 1
-
compatible:
enum:
- delta,dfbmcs320
diff --git a/Documentation/devicetree/bindings/sound/linux,spdif.yaml b/Documentation/devicetree/bindings/sound/linux,spdif.yaml
index aea6230db54c8..62c035b739d38 100644
--- a/Documentation/devicetree/bindings/sound/linux,spdif.yaml
+++ b/Documentation/devicetree/bindings/sound/linux,spdif.yaml
@@ -18,9 +18,6 @@ properties:
- linux,spdif-dit
- linux,spdif-dir
- "#sound-dai-cells":
- const: 0
-
sound-name-prefix: true
port:
@@ -30,7 +27,7 @@ required:
- "#sound-dai-cells"
- compatible
-additionalProperties: false
+unevaluatedProperties: false
examples:
- |
--
2.53.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-24 8:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-24 8:43 [PATCH v1 RFC] ASoC: dt-bindings: Define '#sound-dai-cells' only in the dai-common schema Svyatoslav Ryhel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®