[alsa-devel] [PATCH 03/17] ASoC: Add a generic dmaengine_pcm driver

Stephen Warren swarren at wwwdotorg.org
Tue Apr 16 01:15:30 CEST 2013


On 04/15/2013 11:19 AM, Lars-Peter Clausen wrote:
> This patch adds a generic dmaengine PCM driver. It builds on top of the
> dmaengine PCM library and adds the missing pieces like DMA channel management,
> buffer management and channel configuration. It will be able to replace the
> majority of the existing platform specific dmaengine based PCM drivers.

> Devicetree is used to map the DMA channels to the PCM device.
...
> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
...
> +static const char * const dmaengine_pcm_dma_channel_names[] = {
> +	[SNDRV_PCM_STREAM_PLAYBACK] = "tx",
> +	[SNDRV_PCM_STREAM_CAPTURE] = "rx",
> +};
...
> +int snd_dmaengine_pcm_register(struct device *dev,
> +	const struct snd_dmaengine_pcm_config *config, unsigned int flags)
...
> +	for (i = SNDRV_PCM_STREAM_PLAYBACK; i <= SNDRV_PCM_STREAM_CAPTURE; i++) {
> +		pcm->chan[i] = of_dma_request_slave_channel(dev->of_node,
> +					dmaengine_pcm_dma_channel_names[i]);

That all means that the Tegra patch won't work yet. Tegra currently uses
a custom DT binding for DMA since we haven't fully converted everything
over the very new DT DMA bindings. So, the patches for Tegra may well be
fine /if/ staged in the correct order with some .dts file changes too.

I wonder if all the other platforms this series modifies already have
the appropriate DMA properties set up? A very quick look implies that
(at least some) imx and omap do, but I'm not sure about spear, ep93xx,
ux500?

Perhaps Laxman can provide appropriate DT fixes for Tegra while I'm on
vacation, and test out this series, if I don't get to it in the next 2
days before my vacation.


More information about the Alsa-devel mailing list