[alsa-devel] [PATCH v2][RESEND] ASoC: generic-dmaengine-pcm: Use SNDRV_DMA_TYPE_DEV_IRAM as default

Lars-Peter Clausen lars at metafoo.de
Thu Nov 7 07:58:45 CET 2013


On 11/07/2013 07:45 AM, Nicolin Chen wrote:
> When allocating memory space for DMA buffer, use on-chip internal SRAM
> as default choice to save power. Since the core would allocate memory
> from traditional external memory if iram allocation failed, we don't
> need to worry about any side effect.
> 
> Signed-off-by: Nicolin Chen <b42378 at freescale.com>

Acked-by: Lars-Peter Clausen <lars at metafoo.de>

> ---
> 
>  * ! This patch should be applied to a branch containing the patch -- ALSA:
>  *   Add SoC on-chip internal ram support for DMA buffer allocation.
> 
> Changelog
> v1->v2:
>  * Use iram memory space as default
> 
>  sound/soc/soc-generic-dmaengine-pcm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/soc-generic-dmaengine-pcm.c b/sound/soc/soc-generic-dmaengine-pcm.c
> index e29ec3c..e5b61e3 100644
> --- a/sound/soc/soc-generic-dmaengine-pcm.c
> +++ b/sound/soc/soc-generic-dmaengine-pcm.c
> @@ -163,7 +163,7 @@ static int dmaengine_pcm_new(struct snd_soc_pcm_runtime *rtd)
>  		}
>  
>  		ret = snd_pcm_lib_preallocate_pages(substream,
> -				SNDRV_DMA_TYPE_DEV,
> +				SNDRV_DMA_TYPE_DEV_IRAM,
>  				dmaengine_dma_dev(pcm, substream),
>  				config->prealloc_buffer_size,
>  				config->pcm_hardware->buffer_bytes_max);
> 



More information about the Alsa-devel mailing list