diff mbox series

[v2] ASoC: simple-card: add triggers parsing from DT node support

Message ID 20230715083046.108674-4-fido_max@inbox.ru (mailing list archive)
State New, archived
Headers show
Series [v2] ASoC: simple-card: add triggers parsing from DT node support | expand

Commit Message

Maxim Kochetkov July 15, 2023, 8:30 a.m. UTC
It may be useful to specify trigger-start/stop for some DMA-based
simple audio card. So add this "trigger-start/stop" device tree
entry parser.

Signed-off-by: Maxim Kochetkov <fido_max@inbox.ru>
---
 sound/soc/generic/simple-card.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index a78babf44f38..f934534d5c94 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -181,6 +181,10 @@  static int simple_link_init(struct asoc_simple_priv *priv,
 	struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link);
 	int ret;
 
+	ret = asoc_simple_parse_triggers(node, prefix, dai_link);
+	if (ret)
+		return ret;
+
 	ret = asoc_simple_parse_daifmt(dev, node, codec,
 				       prefix, &dai_link->dai_fmt);
 	if (ret < 0)