Skip to contentSkip to conversation

ASoC: generic-dmaengine-pcm: Use SNDRV_DMA_TYPE_DEV_IRAM as default

PATCH RESEND In review Nicolin Chen 4 participants 6 messages Nov 7, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 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.

---

* ! 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(-)
sound/soc/soc-generic-dmaengine-pcm.c +1 -1
index e29ec3c..e5b61e3 100644
@@ -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);
Signature · 1 line
1.8.4
maintainer Acked-by on v2 1/1
#1 lore raw
Quoted 6 lines · Nicolin Chen

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.

Quoted 26 lines

---

* ! 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(-)
sound/soc/soc-generic-dmaengine-pcm.c +1 -1
index e29ec3c..e5b61e3 100644
@@ -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);
maintainer Acked-by on v2 1/1
#2 lore raw
In reply to Nicolin Chen
Quoted 4 lines · Nicolin Chen

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.

#3 lore raw

At Thu, 7 Nov 2013 11:32:18 +0000,

Quoted 8 lines · Mark Brown
Quoted 4 lines · Nicolin Chen

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.

It's an ASoC helper, so would you take into your tree? Lars already gave an Ack.

Takashi

maintainer
#4 lore raw
Quoted 2 lines · Takashi Iwai

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?

#5 lore raw

At Thu, 7 Nov 2013 19:56:14 +0000,

Quoted 10 lines · Mark Brown
Quoted 2 lines · Takashi Iwai

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