[alsa-devel] [PATCH v1 1/2] ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_update

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Dec 7 10:45:45 CET 2017


Hi Jiada

Thank you for your patch

> 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: Jiada Wang <jiada_wang at mentor.com>
> Reviewed-by: Takashi Sakamoto <takashi.sakamoto at miraclelinux.com>
> ---

You using playback with PIO mode ?
Because this function is no longer used on DMA mode

Best regards
---
Kuninori Morimoto


More information about the Alsa-devel mailing list