Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: generic-dmaengine-pcm: Set BATCH flag when residue reporting is not supported

For dmaengine drivers which do not support transfer residue reporting we update
the PCM pointer with period granularity. Set the SNDRV_PCM_INFO_BATCH flag in
this case to let userspace know about this.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>

authored by

Lars-Peter Clausen and committed by
Mark Brown
a22f33b0 21585ee8

+3
+3
sound/soc/soc-generic-dmaengine-pcm.c
··· 137 137 hw.buffer_bytes_max = SIZE_MAX; 138 138 hw.fifo_size = dma_data->fifo_size; 139 139 140 + if (pcm->flags & SND_DMAENGINE_PCM_FLAG_NO_RESIDUE) 141 + hw.info |= SNDRV_PCM_INFO_BATCH; 142 + 140 143 ret = dma_get_slave_caps(chan, &dma_caps); 141 144 if (ret == 0) { 142 145 if (dma_caps.cmd_pause)