All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: atmel-pcm-dma: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
@ 2014-01-06 14:30 Lars-Peter Clausen
  2014-01-07  9:05 ` Bo Shen
  0 siblings, 1 reply; 3+ messages in thread
From: Lars-Peter Clausen @ 2014-01-06 14:30 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood
  Cc: Elen Song, Lars-Peter Clausen, Nicolas Ferre, alsa-devel, Bo Shen

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(-)

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);
 
-- 
1.8.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-01-07  9:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2014-01-07  9:15   ` Lars-Peter Clausen

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.