diff options
author | Markus Pargmann <mpa@pengutronix.de> | 2013-10-11 12:11:03 +0200 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-14 19:01:50 +0200 |
commit | 88cf632a135188db35b4db412a06b155fa444eb1 (patch) | |
tree | d08df40ce6ac0261ef7f5ab2205e7ee98435cae9 /sound/soc/mxs/mxs-saif.h | |
parent | ASoC: snd_soc_dai_ops trigger function description (diff) | |
download | linux-88cf632a135188db35b4db412a06b155fa444eb1.tar.xz linux-88cf632a135188db35b4db412a06b155fa444eb1.zip |
ASoC: mxs-saif: Store saif state
Trigger commands may be passed multiple times. To avoid errors with
clk_enable/disable, store the saif state and return if saif is already
running/stopped.
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/mxs/mxs-saif.h')
-rw-r--r-- | sound/soc/mxs/mxs-saif.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/mxs/mxs-saif.h b/sound/soc/mxs/mxs-saif.h index 53eaa4bf0e27..fbaf7badfdfb 100644 --- a/sound/soc/mxs/mxs-saif.h +++ b/sound/soc/mxs/mxs-saif.h @@ -124,6 +124,11 @@ struct mxs_saif { u32 fifo_underrun; u32 fifo_overrun; + + enum { + MXS_SAIF_STATE_STOPPED, + MXS_SAIF_STATE_RUNNING, + } state; }; extern int mxs_saif_put_mclk(unsigned int saif_id); |