Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: qcom: lpass-platform: Use SNDRV_DMA_TYPE_NONCOHERENT page allocation

Replace SNDRV_DMA_TYPE_DEV by SNDRV_DMA_TYPE_NONCOHERENT for pcm
buffer allocation. We measured about 18x performance improvement
when accessing the snd_pcm_mmap() buffer from userspace.

Eg: aarch64 with internal speaker
==
SNDRV_DMA_TYPE_DEV
frames_per_second=66.4557M/s
max_time_per_4096_frames=106.094u
time_per_4096_frames=61.6351us

SNDRV_DMA_TYPE_NONCOHERENT
frames_per_second=1028.58M/s
max_time_per_4096_frames=20.312u
time_per_4096_frames=3.98221us

Signed-off-by: Judy Hsiao <judyhsiao@chromium.org>
Link: https://lore.kernel.org/r/20221208084200.2136311-1-judyhsiao@chromium.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Judy Hsiao and committed by
Mark Brown
01270f90 3a14adc5

+1 -1
+1 -1
sound/soc/qcom/lpass-platform.c
··· 1181 1181 if (is_cdc_dma_port(dai_id)) 1182 1182 return lpass_platform_prealloc_cdc_dma_buffer(component, pcm, dai_id); 1183 1183 1184 - return snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, 1184 + return snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_NONCOHERENT, 1185 1185 component->dev, size); 1186 1186 } 1187 1187