ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_update
Currently there is race condition between set of byte_pos and wrap it around when new buffer starts. If .pointer is called in-between it will result in inconsistent pointer position be returned from .pointer callback. This patch increments buffer pointer atomically to avoid this issue. Signed-off-by: NJiada Wang <jiada_wang@mentor.com> Reviewed-by: NTakashi Sakamoto <takashi.sakamoto@miraclelinux.com> Acked-by: NKuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: NMark Brown <broonie@kernel.org>
Showing
想要评论请 注册 或 登录