Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Bo Shen <voice.shen@atmel.com>
To: Lars-Peter Clausen <lars@metafoo.de>
Cc: Elen Song <elen.song@atmel.com>, Mark Brown <broonie@kernel.org>,
	Nicolas Ferre <nicolas.ferre@atmel.com>,
	Liam Girdwood <lgirdwood@gmail.com>,
	alsa-devel@alsa-project.org
Subject: Re: [PATCH] ASoC: atmel-pcm-dma: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
Date: Tue, 7 Jan 2014 17:05:29 +0800	[thread overview]
Message-ID: <52CBC359.7010906@atmel.com> (raw)
In-Reply-To: <1389018629-11513-1-git-send-email-lars@metafoo.de>

Hi Lars,

On 01/06/2014 10:30 PM, Lars-Peter Clausen wrote:
> Since commit d48de6f1a ("DMA: AT91: Get residual bytes in dma buffer") the
> at91-dma driver has support for residue reporting. So there is no need to
> specify the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag. This allows for a finer
> grained resolution of the PCM pointer as well as avoids the race condition that
> can occur with the period counting that is used when the dmaengine driver does
> not support residue reporting.
>
> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
>
> ---
> I don't have the hardware, so only compile tested. It should work though if the
> residue calculation in the dma driver is implemented correctly.
> ---
>   sound/soc/atmel/atmel-pcm-dma.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)

Thanks for your patch.

For the dma get residue code, we are improving it. So, I think we'd 
better waiting the improvement done and after let this patch go into 
mainline.

What do you think?

> diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
> index 06082e5..ba1366a 100644
> --- a/sound/soc/atmel/atmel-pcm-dma.c
> +++ b/sound/soc/atmel/atmel-pcm-dma.c
> @@ -129,8 +129,7 @@ static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = {
>
>   int atmel_pcm_dma_platform_register(struct device *dev)
>   {
> -	return snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config,
> -			SND_DMAENGINE_PCM_FLAG_NO_RESIDUE);
> +	return snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config, 0);
>   }
>   EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
>
>

Best Regards,
Bo Shen

  reply	other threads:[~2014-01-07  9:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 14:30 [PATCH] ASoC: atmel-pcm-dma: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag Lars-Peter Clausen
2014-01-07  9:05 ` Bo Shen [this message]
2014-01-07  9:15   ` Lars-Peter Clausen

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=52CBC359.7010906@atmel.com \
    --to=voice.shen@atmel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=elen.song@atmel.com \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=nicolas.ferre@atmel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox