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

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@freescale.com ---
* ! 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);

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@freescale.com
Acked-by: Lars-Peter Clausen lars@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);

On Thu, Nov 07, 2013 at 02:45:16PM +0800, 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.
Acked-by: Mark Brown broonie@linaro.org

At Thu, 7 Nov 2013 11:32:18 +0000, Mark Brown wrote:
On Thu, Nov 07, 2013 at 02:45:16PM +0800, 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.
Acked-by: Mark Brown broonie@linaro.org
It's an ASoC helper, so would you take into your tree? Lars already gave an Ack.
Takashi

On Thu, Nov 07, 2013 at 12:42:50PM +0100, Takashi Iwai wrote:
It's an ASoC helper, so would you take into your tree? Lars already gave an Ack.
I can do but it depends on the IRAM stuff which is only in your tree until the merge window is done - seems better to either just apply there or wait for the merge window to finish rather than have me merge in the changes?

At Thu, 7 Nov 2013 19:56:14 +0000, Mark Brown wrote:
On Thu, Nov 07, 2013 at 12:42:50PM +0100, Takashi Iwai wrote:
It's an ASoC helper, so would you take into your tree? Lars already gave an Ack.
I can do but it depends on the IRAM stuff which is only in your tree until the merge window is done - seems better to either just apply there or wait for the merge window to finish rather than have me merge in the changes?
OK, applied to my tree now.
Takashi
participants (4)
-
Lars-Peter Clausen
-
Mark Brown
-
Nicolin Chen
-
Takashi Iwai