]> Pileus Git - ~andy/linux/commitdiff
ASoC: snd_soc_dai_ops trigger function description
authorMarkus Pargmann <mpa@pengutronix.de>
Fri, 11 Oct 2013 10:11:02 +0000 (12:11 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 14 Oct 2013 17:01:50 +0000 (18:01 +0100)
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>
Signed-off-by: Mark Brown <broonie@linaro.org>
include/sound/soc-dai.h

index ae9a227d35d3538c233b2b1cb777afcbcb4e639d..0f2e5daa1451eb4a317a1d1074844a177ad5c8e4 100644 (file)
@@ -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,