[PATCH 00/12] ASoC: dt-bindings: Add sound-card-common.yaml
Hi,
Almost every board machine / sound cards has "audio-routing" and "model" properties, so we can make things simpler by introducing one common binding. It is also expected that given property has only one definition.
If the patchset looks good, then the next steps will be: 1. Convert more vendor audio-routing properties to audio-routing, 2. Add dai-links children to common binding.
Best regards, Krzysztof
Krzysztof Kozlowski (12): ASoC: dt-bindings: amlogic,gx-sound-card: correct maxItems constraints ASoC: dt-bindings: Add common sound card properties ASoC: dt-bindings: mediatek,mt8188-mt6359: use common sound card ASoC: dt-bindings: samsung,aries-wm8994: use common sound card ASoC: dt-bindings: samsung,midas-audio: use common sound card ASoC: dt-bindings: samsung,odroid: use common sound card ASoC: dt-bindings: samsung,tm2: use common sound card ASoC: samsung: odroid: use of_property_present to check for property ASoC: samsung: aries_wm8994: parse audio-routing ASoC: samsung: midas_wm1811: parse audio-routing ASoC: samsung: odroid: parse audio-routing ASoC: samsung: tm2_wm5110: parse audio-routing
.../sound/amlogic,axg-sound-card.yaml | 15 +++-------- .../bindings/sound/amlogic,gx-sound-card.yaml | 16 +++++------ .../devicetree/bindings/sound/fsl,rpmsg.yaml | 17 +++--------- .../bindings/sound/google,sc7180-trogdor.yaml | 17 +++--------- .../sound/google,sc7280-herobrine.yaml | 17 +++--------- .../bindings/sound/imx-audio-card.yaml | 18 +++---------- .../sound/mediatek,mt8188-mt6359.yaml | 17 +++++------- .../bindings/sound/samsung,aries-wm8994.yaml | 16 +++++------ .../bindings/sound/samsung,midas-audio.yaml | 16 +++++------ .../bindings/sound/samsung,odroid.yaml | 14 +++++----- .../bindings/sound/samsung,tm2.yaml | 16 +++++------ .../bindings/sound/sound-card-common.yaml | 27 +++++++++++++++++++ sound/soc/samsung/aries_wm8994.c | 10 ++++--- sound/soc/samsung/midas_wm1811.c | 10 ++++--- sound/soc/samsung/odroid.c | 15 ++++++----- sound/soc/samsung/tm2_wm5110.c | 10 ++++--- 16 files changed, 119 insertions(+), 132 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sound-card-common.yaml
minItems without maxItems implies upper limit, so add some high maxItems to fix dtbs_check warnings like:
meson-gxm-s912-libretech-pc.dtb: sound: audio-routing: ['AU2 INL', 'ACODEC LOLN', 'AU2 INR', 'ACODEC LORN', '7J4-14 LEFT', 'AU2 OUTL', '7J4-11 RIGHT', 'AU2 OUTR'] is too long
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../devicetree/bindings/sound/amlogic,gx-sound-card.yaml | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml index b358fd601ed3..45d6202d9730 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml +++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml @@ -21,6 +21,7 @@ properties: audio-routing: $ref: /schemas/types.yaml#/definitions/non-unique-string-array minItems: 2 + maxItems: 32 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 @@ -29,6 +30,7 @@ properties: audio-widgets: $ref: /schemas/types.yaml#/definitions/non-unique-string-array minItems: 2 + maxItems: 8 description: |- A list off component DAPM widget. Each entry is a pair of strings, the first being the widget type, the second being the widget name
On Mon 31 Jul 2023 at 11:42, Krzysztof Kozlowski krzysztof.kozlowski@linaro.org wrote:
minItems without maxItems implies upper limit, so add some high maxItems to fix dtbs_check warnings like:
meson-gxm-s912-libretech-pc.dtb: sound: audio-routing: ['AU2 INL', 'ACODEC LOLN', 'AU2 INR', 'ACODEC LORN', '7J4-14 LEFT', 'AU2 OUTL', '7J4-11 RIGHT', 'AU2 OUTR'] is too long
The only contraints is that values come in pair and there is no upper limit to the number of routes a device (using this driver) may have.
The upper limit of 8 might work now but is very likely to be wrong for the next device to come.
Is there way to correctly describe this "pair" contraint with DT schema ?
If not, then I guess the most adequate solution is to drop minItems and give no bound, like simple-card is doing for the same type of properties.
Same goes for the audio-widgets property
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../devicetree/bindings/sound/amlogic,gx-sound-card.yaml | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml index b358fd601ed3..45d6202d9730 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml +++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml @@ -21,6 +21,7 @@ properties: audio-routing: $ref: /schemas/types.yaml#/definitions/non-unique-string-array minItems: 2
- maxItems: 32 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
@@ -29,6 +30,7 @@ properties: audio-widgets: $ref: /schemas/types.yaml#/definitions/non-unique-string-array minItems: 2
- maxItems: 8 description: |- A list off component DAPM widget. Each entry is a pair of strings, the first being the widget type, the second being the widget name
On Mon, Jul 31, 2023 at 11:52:53AM +0200, Jerome Brunet wrote:
The upper limit of 8 might work now but is very likely to be wrong for the next device to come.
Is there way to correctly describe this "pair" contraint with DT schema ?
If not, then I guess the most adequate solution is to drop minItems and give no bound, like simple-card is doing for the same type of properties.
Same goes for the audio-widgets property
Right, dropping minItems seems better than pulling a maxItems out of thin air.
On 31/07/2023 16:46, Mark Brown wrote:
The upper limit of 8 might work now but is very likely to be wrong for the next device to come.
Is there way to correctly describe this "pair" contraint with DT schema ?
If not, then I guess the most adequate solution is to drop minItems and give no bound, like simple-card is doing for the same type of properties.
Same goes for the audio-widgets property
Right, dropping minItems seems better than pulling a maxItems out of thin air.
OK, I will drop the min/maxItems and send v2.
Best regards, Krzysztof
Almost every board machine / sound cards has "audio-routing" and "model" properties, so move them to common schema to have only one definition of these properties.
For amlogic,gx-sound-card, leave the "audio-routing" constraints in the original binding.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../sound/amlogic,axg-sound-card.yaml | 15 +++-------- .../bindings/sound/amlogic,gx-sound-card.yaml | 14 +++------- .../devicetree/bindings/sound/fsl,rpmsg.yaml | 17 +++--------- .../bindings/sound/google,sc7180-trogdor.yaml | 17 +++--------- .../sound/google,sc7280-herobrine.yaml | 17 +++--------- .../bindings/sound/imx-audio-card.yaml | 18 +++---------- .../bindings/sound/sound-card-common.yaml | 27 +++++++++++++++++++ 7 files changed, 50 insertions(+), 75 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sound-card-common.yaml
diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml index bf1234550343..5db718e4d0e7 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml @@ -9,6 +9,9 @@ title: Amlogic AXG sound card maintainers: - Jerome Brunet jbrunet@baylibre.com
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: const: amlogic,axg-sound-card @@ -17,23 +20,12 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle-array description: list of auxiliary devices
- audio-routing: - $ref: /schemas/types.yaml#/definitions/non-unique-string-array - 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. - audio-widgets: $ref: /schemas/types.yaml#/definitions/non-unique-string-array description: A list off component DAPM widget. Each entry is a pair of strings, the first being the widget type, the second being the widget name
- model: - $ref: /schemas/types.yaml#/definitions/string - description: User specified audio sound card name - patternProperties: "^dai-link-[0-9]+$": type: object @@ -108,7 +100,6 @@ patternProperties: - sound-dai
required: - - model - dai-link-0
unevaluatedProperties: false diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml index 45d6202d9730..9c6c4c0fab88 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml +++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml @@ -9,6 +9,9 @@ title: Amlogic GX sound card maintainers: - Jerome Brunet jbrunet@baylibre.com
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: items: @@ -19,13 +22,8 @@ properties: description: list of auxiliary devices
audio-routing: - $ref: /schemas/types.yaml#/definitions/non-unique-string-array minItems: 2 maxItems: 32 - 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.
audio-widgets: $ref: /schemas/types.yaml#/definitions/non-unique-string-array @@ -35,10 +33,6 @@ properties: A list off component DAPM widget. Each entry is a pair of strings, the first being the widget type, the second being the widget name
- model: - $ref: /schemas/types.yaml#/definitions/string - description: User specified audio sound card name - patternProperties: "^dai-link-[0-9]+$": type: object @@ -88,7 +82,7 @@ required: - model - dai-link-0
-additionalProperties: false +unevaluatedProperties: false
examples: - | diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml index 6df0e03a1d4b..188f38baddec 100644 --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml @@ -17,6 +17,9 @@ description: | such as SAI, MICFIL, .etc through building rpmsg channels between Cortex-A and Cortex-M.
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: enum: @@ -27,10 +30,6 @@ properties: - fsl,imx8ulp-rpmsg-audio - fsl,imx93-rpmsg-audio
- model: - $ref: /schemas/types.yaml#/definitions/string - description: User specified audio sound card name - clocks: items: - description: Peripheral clock for register access @@ -66,13 +65,6 @@ properties: $ref: /schemas/types.yaml#/definitions/phandle description: The phandle to a node of audio codec
- audio-routing: - $ref: /schemas/types.yaml#/definitions/non-unique-string-array - 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. - fsl,enable-lpa: $ref: /schemas/types.yaml#/definitions/flag description: enable low power audio path. @@ -101,9 +93,8 @@ properties:
required: - compatible - - model
-additionalProperties: false +unevaluatedProperties: false
examples: - | diff --git a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml index ba5b7728cf33..bac940553965 100644 --- a/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml +++ b/Documentation/devicetree/bindings/sound/google,sc7180-trogdor.yaml @@ -13,23 +13,15 @@ maintainers: description: This binding describes the SC7180 sound card which uses LPASS for audio.
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: enum: - google,sc7180-trogdor - google,sc7180-coachz
- audio-routing: - $ref: /schemas/types.yaml#/definitions/non-unique-string-array - 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. - - model: - $ref: /schemas/types.yaml#/definitions/string - description: User specified audio sound card name - "#address-cells": const: 1
@@ -86,11 +78,10 @@ patternProperties:
required: - compatible - - model - "#address-cells" - "#size-cells"
-additionalProperties: false +unevaluatedProperties: false
examples:
diff --git a/Documentation/devicetree/bindings/sound/google,sc7280-herobrine.yaml b/Documentation/devicetree/bindings/sound/google,sc7280-herobrine.yaml index 0b1a01a4c14e..ec4b6e547ca6 100644 --- a/Documentation/devicetree/bindings/sound/google,sc7280-herobrine.yaml +++ b/Documentation/devicetree/bindings/sound/google,sc7280-herobrine.yaml @@ -13,22 +13,14 @@ maintainers: description: This binding describes the SC7280 sound card which uses LPASS for audio.
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: enum: - google,sc7280-herobrine
- audio-routing: - $ref: /schemas/types.yaml#/definitions/non-unique-string-array - 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. - - model: - $ref: /schemas/types.yaml#/definitions/string - description: User specified audio sound card name - "#address-cells": const: 1
@@ -97,11 +89,10 @@ patternProperties:
required: - compatible - - model - "#address-cells" - "#size-cells"
-additionalProperties: false +unevaluatedProperties: false
examples:
diff --git a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml index b6f5d486600e..f7ad5ea2491e 100644 --- a/Documentation/devicetree/bindings/sound/imx-audio-card.yaml +++ b/Documentation/devicetree/bindings/sound/imx-audio-card.yaml @@ -9,23 +9,14 @@ title: NXP i.MX audio sound card. maintainers: - Shengjiu Wang shengjiu.wang@nxp.com
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: enum: - fsl,imx-audio-card
- model: - $ref: /schemas/types.yaml#/definitions/string - description: User specified audio sound card name - - audio-routing: - $ref: /schemas/types.yaml#/definitions/non-unique-string-array - 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. Valid names could be power supplies, - MicBias of codec and the jacks on the board. - patternProperties: ".*-dai-link$": description: @@ -84,9 +75,8 @@ patternProperties:
required: - compatible - - model
-additionalProperties: false +unevaluatedProperties: false
examples: - | diff --git a/Documentation/devicetree/bindings/sound/sound-card-common.yaml b/Documentation/devicetree/bindings/sound/sound-card-common.yaml new file mode 100644 index 000000000000..3a941177f684 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/sound-card-common.yaml @@ -0,0 +1,27 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/sound-card-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Board Sound Card Common Properties + +maintainers: + - Mark Brown broonie@kernel.org + +properties: + audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + 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. + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + +required: + - model + +additionalProperties: true
Il 31/07/23 11:42, Krzysztof Kozlowski ha scritto:
Almost every board machine / sound cards has "audio-routing" and "model" properties, so move them to common schema to have only one definition of these properties.
For amlogic,gx-sound-card, leave the "audio-routing" constraints in the original binding.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Reviewed-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com
On Mon, Jul 31, 2023 at 11:42:53AM +0200, Krzysztof Kozlowski wrote:
Almost every board machine / sound cards has "audio-routing" and "model" properties, so move them to common schema to have only one definition of these properties.
For amlogic,gx-sound-card, leave the "audio-routing" constraints in the original binding.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../sound/amlogic,axg-sound-card.yaml | 15 +++-------- .../bindings/sound/amlogic,gx-sound-card.yaml | 14 +++------- .../devicetree/bindings/sound/fsl,rpmsg.yaml | 17 +++--------- .../bindings/sound/google,sc7180-trogdor.yaml | 17 +++--------- .../sound/google,sc7280-herobrine.yaml | 17 +++--------- .../bindings/sound/imx-audio-card.yaml | 18 +++---------- .../bindings/sound/sound-card-common.yaml | 27 +++++++++++++++++++ 7 files changed, 50 insertions(+), 75 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/sound-card-common.yaml
Reviewed-by: Rob Herring robh@kernel.org
The mediatek,mt8188-mt6359 Linux sound machine driver requires the "model" property, so binding was incomplete. Reference the common sound card properties to fix that which also allows to remove duplicated property definitions. Leave the relevant parts of "audio-routing" description.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/mediatek,mt8188-mt6359.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml b/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml index 05e532b5d50a..43b3b67bdf3b 100644 --- a/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml +++ b/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml @@ -9,23 +9,19 @@ title: MediaTek MT8188 ASoC sound card maintainers: - Trevor Wu trevor.wu@mediatek.com
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: enum: - mediatek,mt8188-mt6359-evb - mediatek,mt8188-nau8825
- model: - $ref: /schemas/types.yaml#/definitions/string - description: User specified audio sound card name - audio-routing: - $ref: /schemas/types.yaml#/definitions/non-unique-string-array description: - A list of the connections between audio components. Each entry is a - sink/source pair of strings. Valid names could be the input or output - widgets of audio components, power supplies, MicBias of codec and the - software switch. + Valid names could be the input or output widgets of audio components, + power supplies, MicBias of codec and the software switch.
mediatek,platform: $ref: /schemas/types.yaml#/definitions/phandle @@ -86,7 +82,7 @@ patternProperties: required: - link-name
-additionalProperties: false +unevaluatedProperties: false
required: - compatible @@ -96,6 +92,7 @@ examples: - | sound { compatible = "mediatek,mt8188-mt6359-evb"; + model = "MT6359-EVB"; mediatek,platform = <&afe>; pinctrl-names = "default"; pinctrl-0 = <&aud_pins_default>;
Il 31/07/23 11:42, Krzysztof Kozlowski ha scritto:
The mediatek,mt8188-mt6359 Linux sound machine driver requires the "model" property, so binding was incomplete. Reference the common sound card properties to fix that which also allows to remove duplicated property definitions. Leave the relevant parts of "audio-routing" description.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
Reviewed-by: AngeloGioacchino Del Regno angelogioacchino.delregno@collabora.com
On Mon, 31 Jul 2023 11:42:54 +0200, Krzysztof Kozlowski wrote:
The mediatek,mt8188-mt6359 Linux sound machine driver requires the "model" property, so binding was incomplete. Reference the common sound card properties to fix that which also allows to remove duplicated property definitions. Leave the relevant parts of "audio-routing" description.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/sound/mediatek,mt8188-mt6359.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml: Error in referenced schema matching $id: http://devicetree.org/schemas/sound/sound-card-common.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.example.dtb: sound: False schema does not allow {'compatible': ['mediatek,mt8188-mt6359-evb'], 'model': ['MT6359-EVB'], 'mediatek,platform': [[4294967295]], 'pinctrl-names': ['default'], 'pinctrl-0': [[4294967295]], 'audio-routing': ['Headphone', 'Headphone L', 'Headphone', 'Headphone R', 'AIN1', 'Headset Mic'], 'dai-link-0': {'link-name': ['ETDM3_OUT_BE'], 'dai-format': ['i2s'], 'mediatek,clk-provider': ['cpu'], 'codec': {'sound-dai': [[4294967295]]}}, '$nodename': ['sound']} from schema $id: http://devicetree.org/schemas/sound/mediatek,mt8188-mt6359.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.example.dtb: sound: Unevaluated properties are not allowed ('model' was unexpected) from schema $id: http://devicetree.org/schemas/sound/mediatek,mt8188-mt6359.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/2023073109430...
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Mon, Jul 31, 2023 at 04:51:46AM -0600, Rob Herring wrote:
On Mon, 31 Jul 2023 11:42:54 +0200, Krzysztof Kozlowski wrote:
The mediatek,mt8188-mt6359 Linux sound machine driver requires the "model" property, so binding was incomplete. Reference the common sound card properties to fix that which also allows to remove duplicated property definitions. Leave the relevant parts of "audio-routing" description.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/sound/mediatek,mt8188-mt6359.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.yaml: Error in referenced schema matching $id: http://devicetree.org/schemas/sound/sound-card-common.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.example.dtb: sound: False schema does not allow {'compatible': ['mediatek,mt8188-mt6359-evb'], 'model': ['MT6359-EVB'], 'mediatek,platform': [[4294967295]], 'pinctrl-names': ['default'], 'pinctrl-0': [[4294967295]], 'audio-routing': ['Headphone', 'Headphone L', 'Headphone', 'Headphone R', 'AIN1', 'Headset Mic'], 'dai-link-0': {'link-name': ['ETDM3_OUT_BE'], 'dai-format': ['i2s'], 'mediatek,clk-provider': ['cpu'], 'codec': {'sound-dai': [[4294967295]]}}, '$nodename': ['sound']} from schema $id: http://devicetree.org/schemas/sound/mediatek,mt8188-mt6359.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/mediatek,mt8188-mt6359.example.dtb: sound: Unevaluated properties are not allowed ('model' was unexpected) from schema $id: http://devicetree.org/schemas/sound/mediatek,mt8188-mt6359.yaml#
Looks like patch 2 could not be applied causing this.
Rob
On Mon, 31 Jul 2023 11:42:54 +0200, Krzysztof Kozlowski wrote:
The mediatek,mt8188-mt6359 Linux sound machine driver requires the "model" property, so binding was incomplete. Reference the common sound card properties to fix that which also allows to remove duplicated property definitions. Leave the relevant parts of "audio-routing" description.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/sound/mediatek,mt8188-mt6359.yaml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
Reviewed-by: Rob Herring robh@kernel.org
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/samsung,aries-wm8994.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml index 447e013f6e17..5ea0819a261a 100644 --- a/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml +++ b/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml @@ -9,6 +9,9 @@ title: Samsung Aries audio complex with WM8994 codec maintainers: - Jonathan Bakker xc-racer2@live.ca
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: enum: @@ -17,10 +20,6 @@ properties: # Without FM radio and modem slave - samsung,fascinate4g-wm8994
- model: - $ref: /schemas/types.yaml#/definitions/string - description: The user-visible name of this sound complex. - cpu: type: object additionalProperties: false @@ -46,6 +45,7 @@ properties:
samsung,audio-routing: $ref: /schemas/types.yaml#/definitions/non-unique-string-array + deprecated: true description: | List of the connections between audio components; each entry is a pair of strings, the first being the @@ -56,6 +56,7 @@ properties: or FM In For samsung,fascinate4g-wm8994: HP, SPK, RCV, LINE, Main Mic, or HeadsetMic + Deprecated, use audio-routing.
extcon: description: Extcon phandle for dock detection @@ -87,10 +88,9 @@ properties:
required: - compatible - - model - cpu - codec - - samsung,audio-routing + - audio-routing - extcon - main-micbias-supply - headset-micbias-supply @@ -98,7 +98,7 @@ required: - headset-detect-gpios - headset-key-gpios
-additionalProperties: false +unevaluatedProperties: false
examples: - | @@ -121,7 +121,7 @@ examples: headset-detect-gpios = <&gph0 6 GPIO_ACTIVE_HIGH>; headset-key-gpios = <&gph3 6 GPIO_ACTIVE_HIGH>;
- samsung,audio-routing = + audio-routing = "HP", "HPOUT1L", "HP", "HPOUT1R",
On Mon, 31 Jul 2023 11:42:55 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/sound/samsung,aries-wm8994.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.yaml: Error in referenced schema matching $id: http://devicetree.org/schemas/sound/sound-card-common.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.example.dtb: sound: False schema does not allow {'compatible': ['samsung,fascinate4g-wm8994'], 'model': ['Fascinate4G'], 'extcon': [[4294967295]], 'main-micbias-supply': [[4294967295]], 'headset-micbias-supply': [[4294967295]], 'earpath-sel-gpios': [[4294967295, 6, 0]], 'io-channels': [[4294967295, 3]], 'io-channel-names': ['headset-detect'], 'headset-detect-gpios': [[4294967295, 6, 0]], 'headset-key-gpios': [[4294967295, 6, 0]], 'audio-routing': ['HP', 'HPOUT1L', 'HP', 'HPOUT1R', 'SPK', 'SPKOUTLN', 'SPK', 'SPKOUTLP', 'RCV', 'HPOUT2N', 'RCV', 'HPOUT2P', 'LINE', 'LINEOUT2N', 'LINE', 'LINEOUT2P', 'IN1LP', 'Main Mic', 'IN1LN', 'Main Mic', 'IN1RP', 'Headset Mic', 'IN1RN', 'Headset Mic'], 'pinctrl-names': ['default'], 'pinctrl-0': [[4294967295, 4294967295]], 'cpu': {'sound-dai': [[4294967295], [4294967295]]}, 'codec': {'sound-dai': [[4294967295]]}, '$nodename': ['sound']} from schema $id: http://devicetree.org/schemas/sound/samsung,aries-wm8994.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,aries-wm8994.example.dtb: sound: Unevaluated properties are not allowed ('audio-routing', 'model' were unexpected) from schema $id: http://devicetree.org/schemas/sound/samsung,aries-wm8994.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/2023073109430...
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Mon, 31 Jul 2023 11:42:55 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/sound/samsung,aries-wm8994.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Rob Herring robh@kernel.org
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/samsung,midas-audio.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml index 31095913e330..6ec80f529d84 100644 --- a/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml +++ b/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml @@ -9,14 +9,13 @@ title: Samsung Midas audio complex with WM1811 codec maintainers: - Sylwester Nawrocki s.nawrocki@samsung.com
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: const: samsung,midas-audio
- model: - $ref: /schemas/types.yaml#/definitions/string - description: The user-visible name of this sound complex. - cpu: type: object additionalProperties: false @@ -38,6 +37,7 @@ properties: - sound-dai
samsung,audio-routing: + deprecated: true $ref: /schemas/types.yaml#/definitions/non-unique-string-array description: | List of the connections between audio components; each entry is @@ -45,6 +45,7 @@ properties: being the connection's source; valid names for sources and sinks are the WM1811's pins (as documented in its binding), and the jacks on the board: HP, SPK, Main Mic, Sub Mic, Headset Mic. + Deprecated, use audio-routing.
mic-bias-supply: description: Supply for the micbias on the Main microphone @@ -62,14 +63,13 @@ properties:
required: - compatible - - model - cpu - codec - - samsung,audio-routing + - audio-routing - mic-bias-supply - submic-bias-supply
-additionalProperties: false +unevaluatedProperties: false
examples: - | @@ -84,7 +84,7 @@ examples: mic-bias-supply = <&mic_bias_reg>; submic-bias-supply = <&submic_bias_reg>;
- samsung,audio-routing = + audio-routing = "HP", "HPOUT1L", "HP", "HPOUT1R",
On Mon, 31 Jul 2023 11:42:56 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/sound/samsung,midas-audio.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,midas-audio.yaml: Error in referenced schema matching $id: http://devicetree.org/schemas/sound/sound-card-common.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,midas-audio.example.dtb: sound: False schema does not allow {'compatible': ['samsung,midas-audio'], 'model': ['Midas'], 'fm-sel-gpios': [[4294967295, 3, 0]], 'mic-bias-supply': [[4294967295]], 'submic-bias-supply': [[4294967295]], 'audio-routing': ['HP', 'HPOUT1L', 'HP', 'HPOUT1R', 'SPK', 'SPKOUTLN', 'SPK', 'SPKOUTLP', 'SPK', 'SPKOUTRN', 'SPK', 'SPKOUTRP', 'RCV', 'HPOUT2N', 'RCV', 'HPOUT2P', 'IN1LP', 'Main Mic', 'IN1LN', 'Main Mic', 'IN1RP', 'Sub Mic', 'IN1LP', 'Sub Mic'], 'cpu': {'sound-dai': [[4294967295]]}, 'codec': {'sound-dai': [[4294967295]]}, '$nodename': ['sound']} from schema $id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,midas-audio.example.dtb: sound: Unevaluated properties are not allowed ('audio-routing', 'model' were unexpected) from schema $id: http://devicetree.org/schemas/sound/samsung,midas-audio.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/2023073109430...
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Mon, 31 Jul 2023 11:42:56 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/sound/samsung,midas-audio.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Rob Herring robh@kernel.org
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../devicetree/bindings/sound/samsung,odroid.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml index c6751c40e63f..b77284e3e26a 100644 --- a/Documentation/devicetree/bindings/sound/samsung,odroid.yaml +++ b/Documentation/devicetree/bindings/sound/samsung,odroid.yaml @@ -10,6 +10,9 @@ maintainers: - Krzysztof Kozlowski krzk@kernel.org - Sylwester Nawrocki s.nawrocki@samsung.com
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: oneOf: @@ -24,10 +27,6 @@ properties: - const: samsung,odroid-xu4-audio deprecated: true
- model: - $ref: /schemas/types.yaml#/definitions/string - description: The user-visible name of this sound complex. - assigned-clock-parents: true assigned-clock-rates: true assigned-clocks: true @@ -52,6 +51,7 @@ properties:
samsung,audio-routing: $ref: /schemas/types.yaml#/definitions/non-unique-string-array + deprecated: true description: | List of the connections between audio components; each entry is a pair of strings, the first being the @@ -61,6 +61,7 @@ properties: For Odroid X2: "Headphone Jack", "Mic Jack", "DMIC" For Odroid U3, XU3: "Headphone Jack", "Speakers" For Odroid XU4: no entries + Deprecated, use audio-routing.
samsung,audio-widgets: $ref: /schemas/types.yaml#/definitions/non-unique-string-array @@ -70,18 +71,17 @@ properties:
required: - compatible - - model - cpu - codec
-additionalProperties: false +unevaluatedProperties: false
examples: - | sound { compatible = "hardkernel,odroid-xu3-audio"; model = "Odroid-XU3"; - samsung,audio-routing = + audio-routing = "Headphone Jack", "HPL", "Headphone Jack", "HPR", "IN1", "Mic Jack",
On Mon, 31 Jul 2023 11:42:57 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../devicetree/bindings/sound/samsung,odroid.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,odroid.yaml: Error in referenced schema matching $id: http://devicetree.org/schemas/sound/sound-card-common.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,odroid.example.dtb: sound: False schema does not allow {'compatible': ['hardkernel,odroid-xu3-audio'], 'model': ['Odroid-XU3'], 'audio-routing': ['Headphone Jack', 'HPL', 'Headphone Jack', 'HPR', 'IN1', 'Mic Jack', 'Mic Jack', 'MICBIAS'], 'cpu': {'sound-dai': [[4294967295, 0]]}, 'codec': {'sound-dai': [[4294967295], [4294967295]]}, '$nodename': ['sound']} from schema $id: http://devicetree.org/schemas/sound/samsung,odroid.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,odroid.example.dtb: sound: Unevaluated properties are not allowed ('audio-routing', 'model' were unexpected) from schema $id: http://devicetree.org/schemas/sound/samsung,odroid.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/2023073109430...
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Mon, 31 Jul 2023 11:42:57 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../devicetree/bindings/sound/samsung,odroid.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
Reviewed-by: Rob Herring robh@kernel.org
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../devicetree/bindings/sound/samsung,tm2.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/samsung,tm2.yaml b/Documentation/devicetree/bindings/sound/samsung,tm2.yaml index 491e08019c04..760592599143 100644 --- a/Documentation/devicetree/bindings/sound/samsung,tm2.yaml +++ b/Documentation/devicetree/bindings/sound/samsung,tm2.yaml @@ -10,6 +10,9 @@ maintainers: - Krzysztof Kozlowski krzk@kernel.org - Sylwester Nawrocki s.nawrocki@samsung.com
+allOf: + - $ref: sound-card-common.yaml# + properties: compatible: const: samsung,tm2-audio @@ -32,6 +35,8 @@ properties: being the connection's source; valid names for sources and sinks are the WM5110's and MAX98504's pins and the jacks on the board: HP, SPK, Main Mic, Sub Mic, Third Mic, Headset Mic. + Deprecated, use audio-routing. + deprecated: true $ref: /schemas/types.yaml#/definitions/non-unique-string-array
i2s-controller: @@ -44,20 +49,15 @@ properties: mic-bias-gpios: description: GPIO pin that enables the Main Mic bias regulator.
- model: - description: The user-visible name of this sound complex. - $ref: /schemas/types.yaml#/definitions/string - required: - compatible - audio-amplifier - audio-codec - - samsung,audio-routing + - audio-routing - i2s-controller - mic-bias-gpios - - model
-additionalProperties: false +unevaluatedProperties: false
examples: - | @@ -70,7 +70,7 @@ examples: audio-amplifier = <&max98504>; mic-bias-gpios = <&gpr3 2 GPIO_ACTIVE_HIGH>; model = "wm5110"; - samsung,audio-routing = "HP", "HPOUT1L", + audio-routing = "HP", "HPOUT1L", "HP", "HPOUT1R", "SPK", "SPKOUT", "SPKOUT", "HPOUT2L",
On Mon, 31 Jul 2023 11:42:58 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../devicetree/bindings/sound/samsung,tm2.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,tm2.yaml: Error in referenced schema matching $id: http://devicetree.org/schemas/sound/sound-card-common.yaml /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,tm2.example.dtb: sound: False schema does not allow {'compatible': ['samsung,tm2-audio'], 'audio-codec': [[4294967295], [4294967295]], 'i2s-controller': [[4294967295, 0], [4294967295, 0]], 'audio-amplifier': [[4294967295]], 'mic-bias-gpios': [[4294967295, 2, 0]], 'model': ['wm5110'], 'audio-routing': ['HP', 'HPOUT1L', 'HP', 'HPOUT1R', 'SPK', 'SPKOUT', 'SPKOUT', 'HPOUT2L', 'SPKOUT', 'HPOUT2R', 'RCV', 'HPOUT3L', 'RCV', 'HPOUT3R'], '$nodename': ['sound']} from schema $id: http://devicetree.org/schemas/sound/samsung,tm2.yaml# /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/samsung,tm2.example.dtb: sound: Unevaluated properties are not allowed ('audio-routing', 'model' were unexpected) from schema $id: http://devicetree.org/schemas/sound/samsung,tm2.yaml#
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/2023073109430...
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.
On Mon, 31 Jul 2023 11:42:58 +0200, Krzysztof Kozlowski wrote:
Reference the common sound card properties and deprecate the custom "samsung,audio-routing" in favor of generic one. This allows to remove "model" property and make the binding closer to other sounds cards.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../devicetree/bindings/sound/samsung,tm2.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
Reviewed-by: Rob Herring robh@kernel.org
"samsung,audio-widgets" and "samsung,audio-routing" are not boolean properties, thus more appropriate is to use of_property_present() to check if they are present.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- sound/soc/samsung/odroid.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index a5442592bde4..1743bd55ba1a 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -223,14 +223,14 @@ static int odroid_audio_probe(struct platform_device *pdev) if (ret < 0) return ret;
- if (of_property_read_bool(dev->of_node, "samsung,audio-widgets")) { + if (of_property_present(dev->of_node, "samsung,audio-widgets")) { ret = snd_soc_of_parse_audio_simple_widgets(card, "samsung,audio-widgets"); if (ret < 0) return ret; }
- if (of_property_read_bool(dev->of_node, "samsung,audio-routing")) { + if (of_property_present(dev->of_node, "samsung,audio-routing")) { ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); if (ret < 0)
Parse generic sound card "audio-routing" property and fallback to "samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- sound/soc/samsung/aries_wm8994.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sound/soc/samsung/aries_wm8994.c b/sound/soc/samsung/aries_wm8994.c index 7492bb41456c..dd3cd2c9644a 100644 --- a/sound/soc/samsung/aries_wm8994.c +++ b/sound/soc/samsung/aries_wm8994.c @@ -620,10 +620,14 @@ static int aries_audio_probe(struct platform_device *pdev) /* Update card-name if provided through DT, else use default name */ snd_soc_of_parse_card_name(card, "model");
- ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); + ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); if (ret < 0) { - dev_err(dev, "Audio routing invalid/unspecified\n"); - return ret; + /* Backwards compatible way */ + ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); + if (ret < 0) { + dev_err(dev, "Audio routing invalid/unspecified\n"); + return ret; + } }
aries_dai[1].dai_fmt = priv->variant->modem_dai_fmt;
Parse generic sound card "audio-routing" property and fallback to "samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- sound/soc/samsung/midas_wm1811.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sound/soc/samsung/midas_wm1811.c b/sound/soc/samsung/midas_wm1811.c index 6931b9a45b3e..9e83ed071f39 100644 --- a/sound/soc/samsung/midas_wm1811.c +++ b/sound/soc/samsung/midas_wm1811.c @@ -462,10 +462,14 @@ static int midas_probe(struct platform_device *pdev) return ret; }
- ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); + ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); if (ret < 0) { - dev_err(dev, "Audio routing invalid/unspecified\n"); - return ret; + /* Backwards compatible way */ + ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); + if (ret < 0) { + dev_err(dev, "Audio routing invalid/unspecified\n"); + return ret; + } }
cpu = of_get_child_by_name(dev->of_node, "cpu");
Parse generic sound card "audio-routing" property and fallback to "samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- sound/soc/samsung/odroid.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c index 1743bd55ba1a..c93cb5a86426 100644 --- a/sound/soc/samsung/odroid.c +++ b/sound/soc/samsung/odroid.c @@ -230,12 +230,13 @@ static int odroid_audio_probe(struct platform_device *pdev) return ret; }
- if (of_property_present(dev->of_node, "samsung,audio-routing")) { - ret = snd_soc_of_parse_audio_routing(card, - "samsung,audio-routing"); - if (ret < 0) - return ret; - } + ret = 0; + if (of_property_present(dev->of_node, "audio-routing")) + ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); + else if (of_property_present(dev->of_node, "samsung,audio-routing")) + ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); + if (ret < 0) + return ret;
card->dai_link = odroid_card_dais; card->num_links = ARRAY_SIZE(odroid_card_dais);
Parse generic sound card "audio-routing" property and fallback to "samsung,audio-routing" if it is missing.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- sound/soc/samsung/tm2_wm5110.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/sound/soc/samsung/tm2_wm5110.c b/sound/soc/samsung/tm2_wm5110.c index d611ec9e5325..5ebf17f3de1e 100644 --- a/sound/soc/samsung/tm2_wm5110.c +++ b/sound/soc/samsung/tm2_wm5110.c @@ -523,10 +523,14 @@ static int tm2_probe(struct platform_device *pdev) return ret; }
- ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); + ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); if (ret < 0) { - dev_err(dev, "Audio routing is not specified or invalid\n"); - return ret; + /* Backwards compatible way */ + ret = snd_soc_of_parse_audio_routing(card, "samsung,audio-routing"); + if (ret < 0) { + dev_err(dev, "Audio routing is not specified or invalid\n"); + return ret; + } }
card->aux_dev[0].dlc.of_node = of_parse_phandle(dev->of_node,
On Mon, 31 Jul 2023 11:42:51 +0200, Krzysztof Kozlowski wrote:
Almost every board machine / sound cards has "audio-routing" and "model" properties, so we can make things simpler by introducing one common binding. It is also expected that given property has only one definition.
If the patchset looks good, then the next steps will be:
- Convert more vendor audio-routing properties to audio-routing,
- Add dai-links children to common binding.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[02/12] ASoC: dt-bindings: Add common sound card properties commit: a06ce12efb63bad77bd4a6cedc180f181a651920 [03/12] ASoC: dt-bindings: mediatek,mt8188-mt6359: use common sound card commit: 34e7bf1acc33da5b45ded94f459a6e30d4c6acdc [04/12] ASoC: dt-bindings: samsung,aries-wm8994: use common sound card commit: d63cff2ba4d6cb9eed12508469bf8c1b207be4f1 [05/12] ASoC: dt-bindings: samsung,midas-audio: use common sound card commit: e1d776441d7e19cd98d74bb204713940eb6951be [06/12] ASoC: dt-bindings: samsung,odroid: use common sound card commit: 5ddff831f064ee300351ffdd92bfde1e17c88861 [07/12] ASoC: dt-bindings: samsung,tm2: use common sound card commit: 631e9d4b1f3241008bc6f1c62ec0d19d745d02be [08/12] ASoC: samsung: odroid: use of_property_present to check for property commit: ebba2fd5adc2d79afa10c00255a60c79665c091a [09/12] ASoC: samsung: aries_wm8994: parse audio-routing commit: 55ebfafbc32db54259d91383faf65a5bc6bef382 [10/12] ASoC: samsung: midas_wm1811: parse audio-routing commit: c91e67145bc6d03f94416f7fbe566c6f6751cd47 [11/12] ASoC: samsung: odroid: parse audio-routing commit: 2dc8c0366599cb4dfd939e6eafd94010f3aff233 [12/12] ASoC: samsung: tm2_wm5110: parse audio-routing commit: 17b9f4387ebabb19b871bbe2d06562e48e4e7130
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
participants (5)
-
AngeloGioacchino Del Regno
-
Jerome Brunet
-
Krzysztof Kozlowski
-
Mark Brown
-
Rob Herring