[alsa-devel] [PATCH 03/17] ASoC: Add a generic dmaengine_pcm driver
Lee Jones
lee.jones at linaro.org
Tue Apr 16 16:35:18 CEST 2013
> > +/**
> > + * snd_dmaengine_pcm_register - Register a dmaengine based PCM device
> > + * @dev: The parent device for the PCM device
> > + * @config: Platform specific PCM configuration
> > + * @flags: Platform specific quirks
> > + */
> > +int snd_dmaengine_pcm_register(struct device *dev,
> > + const struct snd_dmaengine_pcm_config *config, unsigned int flags)
> > +{
> > + struct dmaengine_pcm *pcm;
> > + unsigned int i;
> > +
> > + if (!dev->of_node)
> > + return -EINVAL;
Why is this call Device Tree only?
Are devices which use platform data still supported?
> > + pcm = kzalloc(sizeof(*pcm), GFP_KERNEL);
> > + if (!pcm)
> > + return -ENOMEM;
> > +
> > + pcm->config = config;
> > +
> > + 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]);
> > + }
>
> Perhaps you should use dma_request_slave_channel here? Then you could
> also drop the of_dma.h include.
Then how would Device Tree be supported?
--
Lee Jones
Linaro ST-Ericsson Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
More information about the Alsa-devel
mailing list