* [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml
@ 2022-10-05 14:27 Claudio Cabral
2022-10-05 14:27 ` [PATCH 2/2] ASoC: audio-graph-card2: parse pin-switches property Claudio Cabral
2022-10-05 16:06 ` [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml Krzysztof Kozlowski
0 siblings, 2 replies; 4+ messages in thread
From: Claudio Cabral @ 2022-10-05 14:27 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto
Cc: Claudio Cabral, Alvin Šipraga, alsa-devel, devicetree, linux-kernel
Document support for pin-switches in audio-graph-card2
this devicetree property behaves the same way as its homonym in
simple-card
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Claudio Cabral <clca@bang-olufsen.dk>
---
Documentation/devicetree/bindings/sound/audio-graph-card2.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
index 7416067c945e..ab2cc83d6b4b 100644
--- a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
+++ b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml
@@ -32,6 +32,9 @@ properties:
codec2codec:
type: object
description: Codec to Codec node
+ pin-switches:
+ description: the widget names for which pin switches must be created.
+ $ref: /schemas/types.yaml#/definitions/string-array
required:
- compatible
--
2.37.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] ASoC: audio-graph-card2: parse pin-switches property
2022-10-05 14:27 [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml Claudio Cabral
@ 2022-10-05 14:27 ` Claudio Cabral
2022-10-05 16:06 ` [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml Krzysztof Kozlowski
1 sibling, 0 replies; 4+ messages in thread
From: Claudio Cabral @ 2022-10-05 14:27 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Rob Herring, Krzysztof Kozlowski,
Jaroslav Kysela, Takashi Iwai, Kuninori Morimoto
Cc: Claudio Cabral, Alvin Šipraga, alsa-devel, devicetree, linux-kernel
Add asoc_simple_parse_pin_switches to audio_graph2_parse_of.
This replicates the functionality of simple-audio-card, which allows
the creation of ALSA controls to be associated with DAPM nodes through the
device tree
Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Signed-off-by: Claudio Cabral <clca@bang-olufsen.dk>
---
sound/soc/generic/audio-graph-card2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c
index 8ac6df645ee6..aa086a3ebf9c 100644
--- a/sound/soc/generic/audio-graph-card2.c
+++ b/sound/soc/generic/audio-graph-card2.c
@@ -1245,6 +1245,10 @@ int audio_graph2_parse_of(struct asoc_simple_priv *priv, struct device *dev,
if (ret < 0)
goto err;
+ ret = asoc_simple_parse_pin_switches(card, NULL);
+ if (ret < 0)
+ return ret;
+
memset(li, 0, sizeof(*li));
ret = graph_for_each_link(priv, hooks, li, graph_link);
if (ret < 0)
--
2.37.3
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml
2022-10-05 14:27 [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml Claudio Cabral
2022-10-05 14:27 ` [PATCH 2/2] ASoC: audio-graph-card2: parse pin-switches property Claudio Cabral
@ 2022-10-05 16:06 ` Krzysztof Kozlowski
2022-10-06 10:22 ` Alvin Šipraga
1 sibling, 1 reply; 4+ messages in thread
From: Krzysztof Kozlowski @ 2022-10-05 16:06 UTC (permalink / raw)
To: Claudio Cabral, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai,
Kuninori Morimoto
Cc: Alvin Šipraga, alsa-devel, devicetree, linux-kernel
On 05/10/2022 16:27, Claudio Cabral wrote:
> Document support for pin-switches in audio-graph-card2
Full stop?
> this devicetree property behaves the same way as its homonym in
> simple-card
Missing capital letter and full stop?
Instead please describe why do you need pin-switches in this binding...
>
> Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Authorship or contributions (SoB) usually means someone reviewed it and
there is no need for both tags. The combination of both tags above is a
bit surprising.
> Signed-off-by: Claudio Cabral <clca@bang-olufsen.dk>
> ---
> Documentation/devicetree/bindings/sound/audio-graph-card2.yaml | 3 +++
> 1 file changed, 3 insertions(+)
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml
2022-10-05 16:06 ` [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml Krzysztof Kozlowski
@ 2022-10-06 10:22 ` Alvin Šipraga
0 siblings, 0 replies; 4+ messages in thread
From: Alvin Šipraga @ 2022-10-06 10:22 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Claudio Cabral, Liam Girdwood, Mark Brown, Rob Herring,
Krzysztof Kozlowski, Jaroslav Kysela, Takashi Iwai,
Kuninori Morimoto, alsa-devel, devicetree, linux-kernel
On Wed, Oct 05, 2022 at 06:06:13PM +0200, Krzysztof Kozlowski wrote:
> On 05/10/2022 16:27, Claudio Cabral wrote:
> > Reviewed-by: Alvin Šipraga <alsi@bang-olufsen.dk>
> > Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
>
> Authorship or contributions (SoB) usually means someone reviewed it and
> there is no need for both tags. The combination of both tags above is a
> bit surprising.
Thanks for clarifying. In that case the S-o-b ought to be dropped, since
it is Claudio's patch. I just reviewed it. Thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-10-06 10:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-05 14:27 [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml Claudio Cabral
2022-10-05 14:27 ` [PATCH 2/2] ASoC: audio-graph-card2: parse pin-switches property Claudio Cabral
2022-10-05 16:06 ` [PATCH 1/2] ASoC: dt-bindings: add pin-switches to audio-graph-card2.yaml Krzysztof Kozlowski
2022-10-06 10:22 ` Alvin Šipraga
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).