devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: dt-bindings: qcom,wsa883x: Add sound-name-prefix
@ 2022-11-11  9:17 Krzysztof Kozlowski
  2022-11-11 12:06 ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-11  9:17 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Mark Brown, Rob Herring,
	Krzysztof Kozlowski, linux-arm-msm, alsa-devel, devicetree,
	linux-kernel
  Cc: Krzysztof Kozlowski

For multiple speakers attached, it's useful to give them some name.
Sound core already supports this, so reference name-prefix.yaml.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
index 99f9c10bbc83..f3fb1de93ba2 100644
--- a/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
+++ b/Documentation/devicetree/bindings/sound/qcom,wsa883x.yaml
@@ -15,6 +15,9 @@ description: |
   Their primary operating mode uses a SoundWire digital audio
   interface. This binding is for SoundWire interface.
 
+allOf:
+  - $ref: name-prefix.yaml#
+
 properties:
   compatible:
     const: sdw10217020200
@@ -35,6 +38,8 @@ properties:
   '#sound-dai-cells':
     const: 0
 
+  sound-name-prefix: true
+
 required:
   - compatible
   - reg
@@ -61,6 +66,7 @@ examples:
             vdd-supply = <&vreg_s10b_1p8>;
             #thermal-sensor-cells = <0>;
             #sound-dai-cells = <0>;
+            sound-name-prefix = "SpkrLeft";
         };
 
         speaker@0,2 {
@@ -70,6 +76,7 @@ examples:
             vdd-supply = <&vreg_s10b_1p8>;
             #thermal-sensor-cells = <0>;
             #sound-dai-cells = <0>;
+            sound-name-prefix = "SpkrRight";
         };
     };
 
-- 
2.34.1


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

* Re: [PATCH] ASoC: dt-bindings: qcom,wsa883x: Add sound-name-prefix
  2022-11-11  9:17 [PATCH] ASoC: dt-bindings: qcom,wsa883x: Add sound-name-prefix Krzysztof Kozlowski
@ 2022-11-11 12:06 ` Mark Brown
  2022-11-11 14:33   ` Krzysztof Kozlowski
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Brown @ 2022-11-11 12:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, alsa-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 313 bytes --]

On Fri, Nov 11, 2022 at 10:17:38AM +0100, Krzysztof Kozlowski wrote:

> For multiple speakers attached, it's useful to give them some name.
> Sound core already supports this, so reference name-prefix.yaml.

If we need to manually extend the schema like this it should probably be
done for all the CODEC devices.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] ASoC: dt-bindings: qcom,wsa883x: Add sound-name-prefix
  2022-11-11 12:06 ` Mark Brown
@ 2022-11-11 14:33   ` Krzysztof Kozlowski
  2022-11-11 16:32     ` Mark Brown
  0 siblings, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-11-11 14:33 UTC (permalink / raw)
  To: Mark Brown
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, alsa-devel, devicetree, linux-kernel

On 11/11/2022 13:06, Mark Brown wrote:
> On Fri, Nov 11, 2022 at 10:17:38AM +0100, Krzysztof Kozlowski wrote:
> 
>> For multiple speakers attached, it's useful to give them some name.
>> Sound core already supports this, so reference name-prefix.yaml.
> 
> If we need to manually extend the schema like this it should probably be
> done for all the CODEC devices.

Several files already do it:

  git grep name-prefix.yaml

The trouble for me would be here to identify which devices qualify from
bindings/sound.... everything having #sound-dai-cells?

Best regards,
Krzysztof


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

* Re: [PATCH] ASoC: dt-bindings: qcom,wsa883x: Add sound-name-prefix
  2022-11-11 14:33   ` Krzysztof Kozlowski
@ 2022-11-11 16:32     ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2022-11-11 16:32 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio, Srinivas Kandagatla,
	Banajit Goswami, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
	linux-arm-msm, alsa-devel, devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 834 bytes --]

On Fri, Nov 11, 2022 at 03:33:10PM +0100, Krzysztof Kozlowski wrote:
> On 11/11/2022 13:06, Mark Brown wrote:
> > On Fri, Nov 11, 2022 at 10:17:38AM +0100, Krzysztof Kozlowski wrote:

> >> For multiple speakers attached, it's useful to give them some name.
> >> Sound core already supports this, so reference name-prefix.yaml.

> > If we need to manually extend the schema like this it should probably be
> > done for all the CODEC devices.

> Several files already do it:

>   git grep name-prefix.yaml

> The trouble for me would be here to identify which devices qualify from
> bindings/sound.... everything having #sound-dai-cells?

Pretty much anything could potentially do it, it's a system level thing
for when the same device gets instantiated multiple times.  It's most
relevant when something creates user visible controls.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

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

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-11  9:17 [PATCH] ASoC: dt-bindings: qcom,wsa883x: Add sound-name-prefix Krzysztof Kozlowski
2022-11-11 12:06 ` Mark Brown
2022-11-11 14:33   ` Krzysztof Kozlowski
2022-11-11 16:32     ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).