[alsa-devel] [PATCH] ASoC: mxs: Remove SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag
Since commit 7b11304 ("dma: mxs-dma: Report correct residue for cyclic DMA") the mxs dmaengine driver has support for residue reporting. So there is no need to specify the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag anymore. This allows a finer grained resolution for 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 compiled tested. But I assume that residue reporting was added to the driver for exactly this. --- sound/soc/mxs/mxs-pcm.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/sound/soc/mxs/mxs-pcm.c b/sound/soc/mxs/mxs-pcm.c index 04a6b0d..c05c057 100644 --- a/sound/soc/mxs/mxs-pcm.c +++ b/sound/soc/mxs/mxs-pcm.c @@ -57,7 +57,6 @@ static const struct snd_dmaengine_pcm_config mxs_dmaengine_pcm_config = { int mxs_pcm_platform_register(struct device *dev) { return devm_snd_dmaengine_pcm_register(dev, &mxs_dmaengine_pcm_config, - SND_DMAENGINE_PCM_FLAG_NO_RESIDUE | SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX); } EXPORT_SYMBOL_GPL(mxs_pcm_platform_register);
On Mon, Jan 06, 2014 at 05:19:22PM +0100, Lars-Peter Clausen wrote:
Since commit 7b11304 ("dma: mxs-dma: Report correct residue for cyclic DMA") the mxs dmaengine driver has support for residue reporting. So there is no need to specify the SND_DMAENGINE_PCM_FLAG_NO_RESIDUE flag anymore. This allows a finer grained resolution for 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 compiled tested. But I assume that residue reporting was added to the driver for exactly this.
Tested-by: Shawn Guo shawn.guo@linaro.org
participants (3)
-
Lars-Peter Clausen
-
Mark Brown
-
Shawn Guo