lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221208084200.2136311-1-judyhsiao@chromium.org>
Date:   Thu,  8 Dec 2022 08:42:00 +0000
From:   Judy Hsiao <judyhsiao@...omium.org>
To:     srinivas.kandagatla@...aro.org, bgoswami@...eaurora.org,
        lgirdwood@...il.com, broonie@...nel.org
Cc:     alsa-devel@...a-project.org, tiwai@...e.com,
        linux-kernel@...r.kernel.org, Judy Hsiao <judyhsiao@...omium.org>,
        Banajit Goswami <bgoswami@...cinc.com>,
        Jaroslav Kysela <perex@...ex.cz>
Subject: [PATCH v1] 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@...omium.org>

---

 sound/soc/qcom/lpass-platform.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/lpass-platform.c b/sound/soc/qcom/lpass-platform.c
index b41ab7a321ae..ef5cb40b2d9b 100644
--- a/sound/soc/qcom/lpass-platform.c
+++ b/sound/soc/qcom/lpass-platform.c
@@ -1181,7 +1181,7 @@ static int lpass_platform_pcm_new(struct snd_soc_component *component,
 	if (is_cdc_dma_port(dai_id))
 		return lpass_platform_prealloc_cdc_dma_buffer(component, pcm, dai_id);
 
-	return snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
+	return snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_NONCOHERENT,
 					    component->dev, size);
 }
 
-- 
2.39.0.rc0.267.gcb52ba06e7-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ