* [PATCH v2 02/11] ASoC: dt-bindings: mediatek,mt8188-mt6359: use common sound card
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
[not found] ` <169165201641.3911557.18445521260746432395.robh@kernel.org>
[not found] ` <234edb7c2002106dee41d558481b4baf904208ab.camel@mediatek.com>
2023-08-10 6:32 ` [PATCH v2 03/11] ASoC: dt-bindings: samsung,aries-wm8994: " Krzysztof Kozlowski
` (9 subsequent siblings)
10 siblings, 2 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski, Rob Herring
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.
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
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>;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 03/11] ASoC: dt-bindings: samsung,aries-wm8994: use common sound card
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 02/11] ASoC: dt-bindings: mediatek,mt8188-mt6359: use common sound card Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 04/11] ASoC: dt-bindings: samsung,midas-audio: " Krzysztof Kozlowski
` (8 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski, Rob Herring
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.
Reviewed-by: Rob Herring <robh@kernel.org>
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",
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 04/11] ASoC: dt-bindings: samsung,midas-audio: use common sound card
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 02/11] ASoC: dt-bindings: mediatek,mt8188-mt6359: use common sound card Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 03/11] ASoC: dt-bindings: samsung,aries-wm8994: " Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 05/11] ASoC: dt-bindings: samsung,odroid: " Krzysztof Kozlowski
` (7 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski, Rob Herring
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.
Reviewed-by: Rob Herring <robh@kernel.org>
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",
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 05/11] ASoC: dt-bindings: samsung,odroid: use common sound card
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (2 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 04/11] ASoC: dt-bindings: samsung,midas-audio: " Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 06/11] ASoC: dt-bindings: samsung,tm2: " Krzysztof Kozlowski
` (6 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski, Rob Herring
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.
Reviewed-by: Rob Herring <robh@kernel.org>
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",
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 06/11] ASoC: dt-bindings: samsung,tm2: use common sound card
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (3 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 05/11] ASoC: dt-bindings: samsung,odroid: " Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 07/11] ASoC: samsung: odroid: use of_property_present to check for property Krzysztof Kozlowski
` (5 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski, Rob Herring
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.
Reviewed-by: Rob Herring <robh@kernel.org>
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",
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 07/11] ASoC: samsung: odroid: use of_property_present to check for property
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (4 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 06/11] ASoC: dt-bindings: samsung,tm2: " Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 08/11] ASoC: samsung: aries_wm8994: parse audio-routing Krzysztof Kozlowski
` (4 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski
"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)
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 08/11] ASoC: samsung: aries_wm8994: parse audio-routing
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (5 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 07/11] ASoC: samsung: odroid: use of_property_present to check for property Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 09/11] ASoC: samsung: midas_wm1811: " Krzysztof Kozlowski
` (3 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski
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;
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 09/11] ASoC: samsung: midas_wm1811: parse audio-routing
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (6 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 08/11] ASoC: samsung: aries_wm8994: parse audio-routing Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 10/11] ASoC: samsung: odroid: " Krzysztof Kozlowski
` (2 subsequent siblings)
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski
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");
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 10/11] ASoC: samsung: odroid: parse audio-routing
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (7 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 09/11] ASoC: samsung: midas_wm1811: " Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-10 6:32 ` [PATCH v2 11/11] ASoC: samsung: tm2_wm5110: " Krzysztof Kozlowski
2023-08-17 22:36 ` [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Mark Brown
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski
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);
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* [PATCH v2 11/11] ASoC: samsung: tm2_wm5110: parse audio-routing
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (8 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 10/11] ASoC: samsung: odroid: " Krzysztof Kozlowski
@ 2023-08-10 6:32 ` Krzysztof Kozlowski
2023-08-17 22:36 ` [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Mark Brown
10 siblings, 0 replies; 15+ messages in thread
From: Krzysztof Kozlowski @ 2023-08-10 6:32 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Matthias Brugger, AngeloGioacchino Del Regno, Sylwester Nawrocki,
Jaroslav Kysela, Takashi Iwai, Shengjiu Wang, Rohit kumar,
Cheng-Yi Chiang, Rao Mandadapu, Judy Hsiao, Trevor Wu,
Jonathan Bakker, alsa-devel, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek
Cc: Krzysztof Kozlowski
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,
--
2.34.1
^ permalink raw reply related [flat|nested] 15+ messages in thread* Re: [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties
2023-08-10 6:32 [PATCH v2 01/11] ASoC: dt-bindings: Add common sound card properties Krzysztof Kozlowski
` (9 preceding siblings ...)
2023-08-10 6:32 ` [PATCH v2 11/11] ASoC: samsung: tm2_wm5110: " Krzysztof Kozlowski
@ 2023-08-17 22:36 ` Mark Brown
10 siblings, 0 replies; 15+ messages in thread
From: Mark Brown @ 2023-08-17 22:36 UTC (permalink / raw)
To: Jerome Brunet, Liam Girdwood, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, NXP Linux Team, Matthias Brugger,
AngeloGioacchino Del Regno, Sylwester Nawrocki, Jaroslav Kysela,
Takashi Iwai, Shengjiu Wang, Rohit kumar, Cheng-Yi Chiang,
Judy Hsiao, Trevor Wu, Jonathan Bakker, alsa-devel, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek,
Krzysztof Kozlowski
Cc: Rob Herring
On Thu, 10 Aug 2023 08:32:49 +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, drop the minItems: 2 from the
> "audio-routing", because any limit here - lower or upper- is rather
> meaningless. This will also fix `dtbs_check` warnings like:
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[01/11] ASoC: dt-bindings: Add common sound card properties
commit: a06ce12efb63bad77bd4a6cedc180f181a651920
[02/11] ASoC: dt-bindings: mediatek,mt8188-mt6359: use common sound card
commit: 34e7bf1acc33da5b45ded94f459a6e30d4c6acdc
[03/11] ASoC: dt-bindings: samsung,aries-wm8994: use common sound card
commit: d63cff2ba4d6cb9eed12508469bf8c1b207be4f1
[04/11] ASoC: dt-bindings: samsung,midas-audio: use common sound card
commit: e1d776441d7e19cd98d74bb204713940eb6951be
[05/11] ASoC: dt-bindings: samsung,odroid: use common sound card
commit: 5ddff831f064ee300351ffdd92bfde1e17c88861
[06/11] ASoC: dt-bindings: samsung,tm2: use common sound card
commit: 631e9d4b1f3241008bc6f1c62ec0d19d745d02be
[07/11] ASoC: samsung: odroid: use of_property_present to check for property
commit: ebba2fd5adc2d79afa10c00255a60c79665c091a
[08/11] ASoC: samsung: aries_wm8994: parse audio-routing
commit: 55ebfafbc32db54259d91383faf65a5bc6bef382
[09/11] ASoC: samsung: midas_wm1811: parse audio-routing
commit: c91e67145bc6d03f94416f7fbe566c6f6751cd47
[10/11] ASoC: samsung: odroid: parse audio-routing
commit: 2dc8c0366599cb4dfd939e6eafd94010f3aff233
[11/11] 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
^ permalink raw reply [flat|nested] 15+ messages in thread