MLK-22340-4: ASoC: fsl_rpmsg_i2s: add lock to protect the resource
authorShengjiu Wang <shengjiu.wang@nxp.com>
Mon, 29 Jul 2019 06:50:20 +0000 (14:50 +0800)
committerShengjiu Wang <shengjiu.wang@nxp.com>
Fri, 16 Aug 2019 05:45:06 +0000 (13:45 +0800)
commitc5c41138d5c8d0c961a7a3f3acd3e185189646d6
treeb3990cac0fa9da6506e31a82ddc24389c1a26b47
parentadb4b596d2bac9795c77ded44ee4b01ae4f44458
MLK-22340-4: ASoC: fsl_rpmsg_i2s: add lock to protect the resource

Use the spin lock to protect the work_write_index and work_read_index,
Use the spin lock to protect the period_done_msg_enabled flag
That is to avoid the read and write flag confliction.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
(cherry picked from commit 6de0ce94dd9fe0010f71c508cd0b73bb8f0a51b0)
sound/soc/fsl/fsl_rpmsg_i2s.c
sound/soc/fsl/fsl_rpmsg_i2s.h
sound/soc/fsl/imx-pcm-rpmsg.c