Hello Morimoto-san
On 12/07/2017 01:45 AM, Kuninori Morimoto wrote:
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 Wangjiada_wang@mentor.com Reviewed-by: Takashi Sakamototakashi.sakamoto@miraclelinux.com
You using playback with PIO mode ? Because this function is no longer used on DMA mode
No, we are using rcar sound in DMA mode, our original patch resolves the issue in core.c for both PIO & DMA mode.
but with your commit a97a06c ("ASoC: rsnd: cleanup pointer related code"), DMA mode no longer has the race condition issue, so I ported our fix patch to only address the issue in PIO mode
Thanks, Jiada
Best regards
Kuninori Morimoto