From: Markus Pargmann <mpa@pengutronix.de>
To: Mark Brown <broonie@kernel.org>
Cc: kernel@pengutronix.de, Markus Pargmann <mpa@pengutronix.de>,
alsa-devel@alsa-project.org, Liam Girdwood <lgirdwood@gmail.com>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] ASoC: snd_soc_dai_ops trigger function description
Date: Fri, 11 Oct 2013 12:11:02 +0200 [thread overview]
Message-ID: <1381486264-1672-2-git-send-email-mpa@pengutronix.de> (raw)
In-Reply-To: <1381486264-1672-1-git-send-email-mpa@pengutronix.de>
Add a comment to the trigger function in snd_soc_dai_ops struct about
possible command sequences.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
---
include/sound/soc-dai.h | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index ae9a227..0f2e5da 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -166,6 +166,13 @@ struct snd_soc_dai_ops {
struct snd_soc_dai *);
int (*prepare)(struct snd_pcm_substream *,
struct snd_soc_dai *);
+ /*
+ * NOTE: Commands passed to the trigger function are not necessarily
+ * compatible with the current state of the dai. For example this
+ * sequence of commands is possible: START STOP STOP.
+ * So do not unconditionally use refcounting functions in the trigger
+ * function, e.g. clk_enable/disable.
+ */
int (*trigger)(struct snd_pcm_substream *, int,
struct snd_soc_dai *);
int (*bespoke_trigger)(struct snd_pcm_substream *, int,
--
1.8.4.rc3
next prev parent reply other threads:[~2013-10-11 10:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 10:11 [PATCH 0/3] ASoC: mxs-saif error handling Markus Pargmann
2013-10-11 10:11 ` Markus Pargmann [this message]
2013-10-11 10:11 ` [PATCH 2/3] ASoC: mxs-saif: Store saif state Markus Pargmann
2013-10-11 10:31 ` Lothar Waßmann
2013-10-11 10:46 ` Markus Pargmann
2013-10-11 10:11 ` [PATCH 3/3] ASoC: mxs-saif: Handle errors in trigger function Markus Pargmann
2013-10-14 17:02 ` [PATCH 0/3] ASoC: mxs-saif error handling Mark Brown
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=1381486264-1672-2-git-send-email-mpa@pengutronix.de \
--to=mpa@pengutronix.de \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=kernel@pengutronix.de \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/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).