From 78648092ef46255e6dc6685202164199c86cf930 Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Mon, 19 Feb 2018 16:00:36 +0100 Subject: ASoC: dmaengine_pcm: add processing support Allow dmaengine client to optionally register a processing callback. This callback is intended to apply processing on samples in buffer copied from/to user space, before/after DMA transfer. Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown --- include/sound/dmaengine_pcm.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/sound') diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 8a5a8404966e..47ef486852ed 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -140,6 +140,9 @@ struct snd_dmaengine_pcm_config { struct dma_chan *(*compat_request_channel)( struct snd_soc_pcm_runtime *rtd, struct snd_pcm_substream *substream); + int (*process)(struct snd_pcm_substream *substream, + int channel, unsigned long hwoff, + void *buf, unsigned long bytes); dma_filter_fn compat_filter_fn; struct device *dma_dev; const char *chan_names[SNDRV_PCM_STREAM_LAST + 1]; -- cgit v1.2.3 From 2e78a5562ebc2e4bbdfd7f7729385b3acc94c36e Mon Sep 17 00:00:00 2001 From: Olivier Moysan Date: Tue, 13 Mar 2018 17:27:08 +0100 Subject: ASoC: dmaengine_pcm: document process callback Add missing description of process callback. Fixes: 78648092ef46 ("ASoC: dmaengine_pcm: add processing support") Signed-off-by: Olivier Moysan Signed-off-by: Mark Brown --- include/sound/dmaengine_pcm.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/sound') diff --git a/include/sound/dmaengine_pcm.h b/include/sound/dmaengine_pcm.h index 47ef486852ed..e3481eebdd98 100644 --- a/include/sound/dmaengine_pcm.h +++ b/include/sound/dmaengine_pcm.h @@ -118,6 +118,8 @@ void snd_dmaengine_pcm_set_config_from_dai_data( * PCM substream. Will be called from the PCM drivers hwparams callback. * @compat_request_channel: Callback to request a DMA channel for platforms * which do not use devicetree. + * @process: Callback used to apply processing on samples transferred from/to + * user space. * @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. -- cgit v1.2.3