ASoC: generic-dmaengine-pcm: Check DMA residue granularity
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 11 Jan 2014 13:02:19 +0000 (14:02 +0100)
committerMark Brown <broonie@linaro.org>
Tue, 14 Jan 2014 21:28:39 +0000 (21:28 +0000)
commit478028e088d6a94666d8a776be2cd2291faf3bbd
tree8bebc11e20820e4a61b1ccbe8dd7ab9881571a15
parent93b943edfc5e439f7b843535e0bb0f7d2371f67f
ASoC: generic-dmaengine-pcm: Check DMA residue granularity

The dmaengine framework now exposes the granularity with which it is able to
report the transfer residue for a certain DMA channel. Check the granularity in
the generic dmaengine PCM driver and
a) Set the SNDRV_PCM_INFO_BATCH if the granularity is per period or worse.
b) Fallback to the (race condition prone) period counting if the driver does
not support any residue reporting.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
sound/soc/soc-generic-dmaengine-pcm.c