]> Pileus Git - ~andy/linux/commit
ASoC: dmaengine-pcm: Add support for querying DMA capabilities
authorLars-Peter Clausen <lars@metafoo.de>
Tue, 8 Oct 2013 13:07:59 +0000 (15:07 +0200)
committerMark Brown <broonie@linaro.org>
Sat, 19 Oct 2013 20:26:06 +0000 (21:26 +0100)
commitc0de42bf595238e9dd593405ebc2992cc8470732
tree310c4d89773307ce86f6df8f377c3e56f423bc38
parent61e6cfa80de5760bbe406f4e815b7739205754d2
ASoC: dmaengine-pcm: Add support for querying DMA capabilities

Currently each platform making use the the generic dmaengine PCM driver still
needs to provide a custom snd_pcm_hardware struct which specifies the
capabilities of the DMA controller, e.g. the maximum period size that can be
supported. This patch adds code which uses the newly introduced
dma_get_slave_caps() API to query this information from the dmaengine driver.
The new code path will only be taken if the 'pcm_hardware' field of the
snd_dmaengine_pcm_config struct is NULL.

The patch also introduces a new 'fifo_size' field to the
snd_dmaengine_dai_dma_data struct which is used to initialize the
snd_pcm_hardware 'fifo_size' field and needs to be set by the DAI driver.

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