]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: fsl_esai: Add spin lock to protect reset, stop and start
authorShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 28 Oct 2019 09:11:05 +0000 (17:11 +0800)
committerMark Brown <broonie@kernel.org>
Mon, 28 Oct 2019 13:13:37 +0000 (13:13 +0000)
commit9d0fae00b22dd7e50436472ddd1156f3da8f79b6
treec5639e0c56ad99ebca48d30cf829a3282c225958
parent11751f2ef815a64b7207be918d983752b9b6d805
ASoC: fsl_esai: Add spin lock to protect reset, stop and start

xrun may happen at the end of stream, the
trigger->fsl_esai_trigger_stop maybe called in the middle of
fsl_esai_hw_reset, this may cause esai in wrong state
after stop, and there may be endless xrun interrupt.

This issue may also happen with trigger->fsl_esai_trigger_start.

So Add spin lock to lock those functions.

Fixes: badfb944b976 ("ASoC: fsl_esai: recover the channel swap after xrun")
Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Acked-by: Nicolin Chen <nicoleotsuka@gmail.com>
Link: https://lore.kernel.org/r/52e92c4221a83e39a84a6cd92fc3d5479b44894c.1572252321.git.shengjiu.wang@nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/fsl/fsl_esai.c