[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221005142734.2724537-2-clca@bang-olufsen.dk>
Date: Wed, 5 Oct 2022 14:27:40 +0000
From: Claudio Cabral <CLCA@...g-olufsen.dk>
To: Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Jaroslav Kysela <perex@...ex.cz>,
Takashi Iwai <tiwai@...e.com>,
Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
CC: Claudio Cabral <CLCA@...g-olufsen.dk>,
Alvin Šipraga <ALSI@...g-olufsen.dk>,
"alsa-devel@...a-project.org" <alsa-devel@...a-project.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 2/2] ASoC: audio-graph-card2: parse pin-switches property
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@...g-olufsen.dk>
Signed-off-by: Alvin Šipraga <alsi@...g-olufsen.dk>
Signed-off-by: Claudio Cabral <clca@...g-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
Powered by blists - more mailing lists