[alsa-devel] [PATCH 09/12] ASoC: dmaengine_pcm: support use of generic DMA helper
Shawn Guo
shawn.guo at linaro.org
Thu Feb 28 09:09:23 CET 2013
On Wed, Feb 27, 2013 at 09:02:40PM +0000, Arnd Bergmann wrote:
> On Wednesday 27 February 2013, Shawn Guo wrote:
> > With generic DMA device tree binding and helper function
> > dma_request_slave_channel() in place, dmaengine_pcm should support
> > that in requesting DMA channel for users that support generic DMA
> > device tree binding.
> >
> > Instead of inventing a new API, it defines the parameters needed by
> > dma_request_slave_channel() into struct snd_dma_channel_params,
> > interprets filter_data into snd_dma_channel_params, and calls the
> > helper in case that dmaengine_pcm users pass in a NULL filter_fn.
> >
> > Then, dmaengine_pcm users can call snd_dmaengine_pcm_open() with NULL
> > filter_fn and snd_dma_channel_params being filter_data to direct the
> > API to request DMA channel using generic DMA helper.
> >
> > Signed-off-by: Shawn Guo <shawn.guo at linaro.org>
> > Cc: Mark Brown <broonie at opensource.wolfsonmicro.com>
> > Cc: alsa-devel at alsa-project.org
>
> I would actually prefer having a new API in the soc-dmaengine-pcm
> module, like
>
> static int dmaengine_pcm_request_slave_channel(struct dmaengine_pcm_runtime_data *prtd,
> struct device *dev, const char *id);
>
> For sound drivers that are fully converted to using DT, it would be
> a more natural interface to use IMHO.
>
Ok, let's do this. While my patch saves a new API, it adds a new
struct anyway, which I'm not happy with.
Shawn
More information about the Alsa-devel
mailing list