diff options
Diffstat (limited to 'include/sound/dmaengine_pcm.h')
| -rw-r--r-- | include/sound/dmaengine_pcm.h | 18 | 
1 files changed, 18 insertions, 0 deletions
diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index f11c35cd553..eb73a3a39ec 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -61,6 +61,8 @@ struct dma_chan *snd_dmaengine_pcm_get_chan(struct snd_pcm_substream *substream)   * @slave_id: Slave requester id for the DMA channel.   * @filter_data: Custom DMA channel filter data, this will usually be used when   * requesting the DMA channel. + * @chan_name: Custom channel name to use when requesting DMA channel. + * @fifo_size: FIFO size of the DAI controller in bytes   */  struct snd_dmaengine_dai_dma_data {  	dma_addr_t addr; @@ -68,6 +70,8 @@ struct snd_dmaengine_dai_dma_data {  	u32 maxburst;  	unsigned int slave_id;  	void *filter_data; +	const char *chan_name; +	unsigned int fifo_size;  };  void snd_dmaengine_pcm_set_config_from_dai_data( @@ -96,6 +100,10 @@ void snd_dmaengine_pcm_set_config_from_dai_data(   * playback.   */  #define SND_DMAENGINE_PCM_FLAG_HALF_DUPLEX BIT(3) +/* + * The PCM streams have custom channel names specified. + */ +#define SND_DMAENGINE_PCM_FLAG_CUSTOM_CHANNEL_NAME BIT(4)  /**   * struct snd_dmaengine_pcm_config - Configuration data for dmaengine based PCM @@ -106,6 +114,10 @@ void snd_dmaengine_pcm_set_config_from_dai_data(   * @compat_filter_fn: Will be used as the filter function when requesting a   *  channel for platforms which do not use devicetree. The filter parameter   *  will be the DAI's DMA data. + * @dma_dev: If set, request DMA channel on this device rather than the DAI + *  device. + * @chan_names: If set, these custom DMA channel names will be requested at + *  registration time.   * @pcm_hardware: snd_pcm_hardware struct to be used for the PCM.   * @prealloc_buffer_size: Size of the preallocated audio buffer.   * @@ -122,6 +134,8 @@ struct snd_dmaengine_pcm_config {  			struct snd_soc_pcm_runtime *rtd,  			struct snd_pcm_substream *substream);  	dma_filter_fn compat_filter_fn; +	struct device *dma_dev; +	const char *chan_names[SNDRV_PCM_STREAM_LAST + 1];  	const struct snd_pcm_hardware *pcm_hardware;  	unsigned int prealloc_buffer_size; @@ -132,6 +146,10 @@ int snd_dmaengine_pcm_register(struct device *dev,  	unsigned int flags);  void snd_dmaengine_pcm_unregister(struct device *dev); +int devm_snd_dmaengine_pcm_register(struct device *dev, +	const struct snd_dmaengine_pcm_config *config, +	unsigned int flags); +  int snd_dmaengine_pcm_prepare_slave_config(struct snd_pcm_substream *substream,  	struct snd_pcm_hw_params *params,  	struct dma_slave_config *slave_config);  | 
