summaryrefslogtreecommitdiff
path: root/sound/soc/fsl/fsl_audmix.h
diff options
context:
space:
mode:
authorShengjiu Wang <shengjiu.wang@nxp.com>2019-11-11 10:50:48 +0300
committerMark Brown <broonie@kernel.org>2019-11-11 16:01:37 +0300
commitfe965096c9495ddcf78ec163348105e2baf8d185 (patch)
tree8098e8b2695332501b7f0d19569f4e195e786865 /sound/soc/fsl/fsl_audmix.h
parent16299326a0cbbc88d4d6491a8ceebbfca81064c5 (diff)
downloadlinux-fe965096c9495ddcf78ec163348105e2baf8d185.tar.xz
ASoC: fsl_audmix: Add spin lock to protect tdms
Audmix support two substream, When two substream start to run, the trigger function may be called by two substream in same time, that the priv->tdms may be updated wrongly. The expected priv->tdms is 0x3, but sometimes the result is 0x2, or 0x1. Fixes: be1df61cf06e ("ASoC: fsl: Add Audio Mixer CPU DAI driver") Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/1e706afe53fdd1fbbbc79277c48a98f8416ba873.1573458378.git.shengjiu.wang@nxp.com Signed-off-by: Mark Brown <broonie@kernel.org> Cc: <stable@vger.kernel.org>
Diffstat (limited to 'sound/soc/fsl/fsl_audmix.h')
-rw-r--r--sound/soc/fsl/fsl_audmix.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sound/soc/fsl/fsl_audmix.h b/sound/soc/fsl/fsl_audmix.h
index 7812ffec45c5..479f05695d53 100644
--- a/sound/soc/fsl/fsl_audmix.h
+++ b/sound/soc/fsl/fsl_audmix.h
@@ -96,6 +96,7 @@ struct fsl_audmix {
struct platform_device *pdev;
struct regmap *regmap;
struct clk *ipg_clk;
+ spinlock_t lock; /* Protect tdms */
u8 tdms;
};