devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Kochetkov <fido_max@inbox.ru>
To: alsa-devel@alsa-project.org
Cc: Maxim Kochetkov <fido_max@inbox.ru>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Mark Brown <broonie@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Jaroslav Kysela <perex@perex.cz>, Takashi Iwai <tiwai@suse.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Sameer Pujar <spujar@nvidia.com>,
	Astrid Rost <astrid.rost@axis.com>,
	Robert Hancock <robert.hancock@calian.com>,
	Aidan MacDonald <aidanmacdonald.0x0@gmail.com>,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Herve Codina <herve.codina@bootlin.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2] ASoC: simple-card: add triggers parsing from DT node support
Date: Sat, 15 Jul 2023 11:30:44 +0300	[thread overview]
Message-ID: <20230715083046.108674-4-fido_max@inbox.ru> (raw)
In-Reply-To: <20230715083046.108674-1-fido_max@inbox.ru>

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 --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)
-- 
2.40.1


      parent reply	other threads:[~2023-07-15  8:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-15  8:30 [PATCH v2] Add support for trigger-start/stop for simple audio card Maxim Kochetkov
2023-07-15  8:30 ` [PATCH v2] ASoC: simple-card-utils: introduce asoc_simple_parse_triggers() Maxim Kochetkov
2023-07-15  8:30 ` [PATCH v2] ASoC: dt-bindings: simple-card: add triggers properties Maxim Kochetkov
2023-07-18 22:08   ` Rob Herring
2023-07-19  7:13     ` Maxim Kochetkov
2023-07-15  8:30 ` Maxim Kochetkov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230715083046.108674-4-fido_max@inbox.ru \
    --to=fido_max@inbox.ru \
    --cc=aidanmacdonald.0x0@gmail.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=astrid.rost@axis.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=herve.codina@bootlin.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=robert.hancock@calian.com \
    --cc=robh+dt@kernel.org \
    --cc=spujar@nvidia.com \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).