]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: fsl_audmix: Add spin lock to protect tdms
authorShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 11 Nov 2019 07:50:48 +0000 (15:50 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 11 Nov 2019 13:01:37 +0000 (13:01 +0000)
commit2598b2160c806b18a6f0c8712183d8d0fb04f964
tree8098e8b2695332501b7f0d19569f4e195e786865
parent89c87c1c3e21c6558adbbfea94c175086201450a
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: 7e7d8b965eff ("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>
sound/soc/fsl/fsl_audmix.c
sound/soc/fsl/fsl_audmix.h