ASoC: qcom: q6apm-dai: fix race condition while updating the position pointer
It is noticed that the position pointer value seems to get a get corrupted
due to missing locking between updating and reading.
Fix this by adding a spinlock around the position pointer.
Fixes:
9b4fe0f1cd79 ("ASoC: qdsp6: audioreach: add q6apm-dai support")
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20230209122806.18923-3-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>