diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2013-10-08 09:07:59 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-10-19 16:26:06 -0400 |
commit | c0de42bf595238e9dd593405ebc2992cc8470732 (patch) | |
tree | 310c4d89773307ce86f6df8f377c3e56f423bc38 /include/sound | |
parent | 61e6cfa80de5760bbe406f4e815b7739205754d2 (diff) |
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>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/dmaengine_pcm.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index f11c35cd5532..83b2c3e95a1a 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h | |||
@@ -61,6 +61,7 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream) | |||
61 | * @slave_id: Slave requester id for the DMA channel. | 61 | * @slave_id: Slave requester id for the DMA channel. |
62 | * @filter_data: Custom DMA channel filter data, this will usually be used when | 62 | * @filter_data: Custom DMA channel filter data, this will usually be used when |
63 | * requesting the DMA channel. | 63 | * requesting the DMA channel. |
64 | * @fifo_size: FIFO size of the DAI controller in bytes | ||
64 | */ | 65 | */ |
65 | struct snd_dmaengine_dai_dma_data { | 66 | struct snd_dmaengine_dai_dma_data { |
66 | dma_addr_t addr; | 67 | dma_addr_t addr; |
@@ -68,6 +69,7 @@ struct snd_dmaengine_dai_dma_data { | |||
68 | u32 maxburst; | 69 | u32 maxburst; |
69 | unsigned int slave_id; | 70 | unsigned int slave_id; |
70 | void *filter_data; | 71 | void *filter_data; |
72 | unsigned int fifo_size; | ||
71 | }; | 73 | }; |
72 | 74 | ||
73 | void snd_dmaengine_pcm_set_config_from_dai_data( | 75 | void snd_dmaengine_pcm_set_config_from_dai_data( |