ASoC: atmel-pcm-dma: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
PATCH 1/1 ASoC: atmel-pcm-dma: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
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.
---
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(-)
sound/soc/atmel/atmel-pcm-dma.c +1 -2
@@ -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);
Signature · 1 line
1.8.0
Hi Lars,
Quoted 7 lines · Lars-Peter Clausen
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 theSND_DMAENGINE_PCM_FLAG_NO_RESIDUEflag. 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.
Quoted 8 lines
Signed-off-by Lars-Peter Clausen <[email protected]>---
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?
Quoted 6 lines
sound/soc/atmel/atmel-pcm-dma.c +0
-0
sound/soc/atmel/atmel-pcm-dma.c static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = { · line 135
Quoted 9 lines
sound/soc/atmel/atmel-pcm-dma.c +1
-2@@ -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
Quoted 22 lines · Bo Shen
Hi Lars,
Quoted 11 lines · Lars-Peter Clausen
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 theSND_DMAENGINE_PCM_FLAG_NO_RESIDUEflag. 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 <[email protected]>Quoted 7 lines
---
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(-)
Quoted 6 lines
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?
If the residue reporting in the dmaengine driver doesn't work properly yet we have to wait.
- Lars