All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiada Wang <jiada_wang@mentor.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
	tiwai@suse.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/2] ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_update
Date: Thu, 7 Dec 2017 21:35:16 -0800	[thread overview]
Message-ID: <5A2A2494.2080202@mentor.com> (raw)
In-Reply-To: <87y3me7uce.wl%kuninori.morimoto.gx@renesas.com>

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 Wang<jiada_wang@mentor.com>
>> Reviewed-by: Takashi Sakamoto<takashi.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

WARNING: multiple messages have this Message-ID (diff)
From: Jiada Wang <jiada_wang@mentor.com>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: <lgirdwood@gmail.com>, <broonie@kernel.org>, <perex@perex.cz>,
	<tiwai@suse.com>, <alsa-devel@alsa-project.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 1/2] ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_update
Date: Thu, 7 Dec 2017 21:35:16 -0800	[thread overview]
Message-ID: <5A2A2494.2080202@mentor.com> (raw)
In-Reply-To: <87y3me7uce.wl%kuninori.morimoto.gx@renesas.com>

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 Wang<jiada_wang@mentor.com>
>> Reviewed-by: Takashi Sakamoto<takashi.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

  reply	other threads:[~2017-12-08  5:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-07  8:22 [PATCH v1 0/2] fix race condition in rsnd_ssi_pointer_update jiada_wang
2017-12-07  8:22 ` jiada_wang
2017-12-07  8:22 ` [PATCH v1 1/2] ASoC: rsnd: ssi: " jiada_wang
2017-12-07  8:22   ` jiada_wang
2017-12-07  9:45   ` Kuninori Morimoto
2017-12-07  9:45     ` Kuninori Morimoto
2017-12-08  5:35     ` Jiada Wang [this message]
2017-12-08  5:35       ` Jiada Wang
2017-12-08  6:00       ` Kuninori Morimoto
2017-12-08  6:00         ` Kuninori Morimoto
2017-12-08 18:52   ` Applied "ASoC: rsnd: ssi: fix race condition in rsnd_ssi_pointer_update" to the asoc tree Mark Brown
2017-12-08 18:52     ` Mark Brown
2017-12-09  5:22     ` Takashi Sakamoto
2017-12-09  5:22       ` Takashi Sakamoto
2017-12-11 11:38       ` Mark Brown
2017-12-11 11:38         ` Mark Brown
2018-01-09  5:42         ` Jiada Wang
2018-01-09  5:42           ` Jiada Wang
2018-01-09  6:53           ` Takashi Sakamoto
2018-01-09  8:59             ` Jiada Wang
2018-01-09  8:59               ` Jiada Wang
2017-12-07  8:22 ` [PATCH v2 2/2] ASoC: rsnd: ssi: remove unnesessary period_pos jiada_wang
2017-12-07  8:22   ` jiada_wang
2017-12-07  9:58   ` Kuninori Morimoto
2017-12-07  9:58     ` Kuninori Morimoto
2017-12-08  5:43     ` Jiada Wang
2017-12-08  5:43       ` Jiada Wang
2017-12-08  6:07       ` Kuninori Morimoto
2017-12-08  6:07         ` Kuninori Morimoto
2017-12-08 18:55   ` Applied "ASoC: rsnd: ssi: remove unnesessary period_pos" to the asoc tree Mark Brown
2017-12-08 18:55     ` Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A2A2494.2080202@mentor.com \
    --to=jiada_wang@mentor.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=tiwai@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.