From patchwork Thu Aug 18 15:42:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 12947316 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 67E89C00140 for ; Thu, 18 Aug 2022 15:43:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9EC341635; Thu, 18 Aug 2022 17:42:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9EC341635 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660837426; bh=IKNUgda7iIMLv1pfqbiYtyype8DCuf4MgIFrZuSMq1A=; h=Date:From:To:Subject:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=sV3gA8fUyATQ8012q4kGUyaxsTVM4QCyJquBExViTstCeBOsiCc4+P2fLIT9+sy6d MxxGEBlOYXdWFW97iSVGj7YTHL6ZMuQBExX6dSOi217C13eYLCVSCmjIjlKxsGDBou jIHcELdL2ec0m5lgN3eEBkmrnzhP+6bkW2zxnc+k= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 2A42BF8013D; Thu, 18 Aug 2022 17:42:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 89ABAF80430; Thu, 18 Aug 2022 17:42:54 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E287AF800B5 for ; Thu, 18 Aug 2022 17:42:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E287AF800B5 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="P/2iUMj+"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="Pb+PaAfK" Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 2981821026; Thu, 18 Aug 2022 15:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1660837367; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=NoVvpZasYYFdYvnHd7oOICTJ5L94sboDftQl5KinKXw=; b=P/2iUMj+/NiN0n6ScU5Pi1Arqxidu1zsUxMmk6COdES8ajB/MwhWUkY3/ywfKZAAc6MG3S SOwKi5uBvZEVIOTqm/suUXRv1n+9FTiLc2lEsb0QBzFS/29jEZHSBL2RlI0H1A3tGSSrjB GA1K4Nb5CYnVrMIiyYDF8BQK21d5gDg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1660837367; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=NoVvpZasYYFdYvnHd7oOICTJ5L94sboDftQl5KinKXw=; b=Pb+PaAfK2kX9PrO8r7UnPJDH0CHn4jGcSzfSfHVN3cjl2HIXeKqAhg82juGDLVKfu/HnyH q/vlUrMznTVGSyAw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id F2B85133B5; Thu, 18 Aug 2022 15:42:46 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id uM6DOvZd/mLcGwAAMHmgww (envelope-from ); Thu, 18 Aug 2022 15:42:46 +0000 Date: Thu, 18 Aug 2022 17:42:46 +0200 Message-ID: <874jy98snd.wl-tiwai@suse.de> From: Takashi Iwai To: alsa-devel@alsa-project.org Subject: Buffers used in ASoC Intel Atom SST driver User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Cc: Cezary Rojewski , Kai Vehmanen , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Liam Girdwood , Bard Liao X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Hi, while cleaning up / fixing the memory allocation code, I noticed that Intel SST driver is the only driver that currently uses the SNDRV_DMA_TYPE_CONTINUOUS pages for its PCM buffer. Is there any reason not to use the standard device buffer (SNDRV_DMA_TYPE_DEV)? i.e. the change like below. thanks, Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ASoC: Intel: sst: Switch to standard device pages Signed-off-by: Takashi Iwai Signed-off-by: Takashi Iwai --- sound/soc/intel/atom/sst-mfld-platform-pcm.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/soc/intel/atom/sst-mfld-platform-pcm.c b/sound/soc/intel/atom/sst-mfld-platform-pcm.c index a56dd48c045f..c75616a5fd0a 100644 --- a/sound/soc/intel/atom/sst-mfld-platform-pcm.c +++ b/sound/soc/intel/atom/sst-mfld-platform-pcm.c @@ -676,10 +676,9 @@ static int sst_soc_pcm_new(struct snd_soc_component *component, if (dai->driver->playback.channels_min || dai->driver->capture.channels_min) { - snd_pcm_set_managed_buffer_all(pcm, - SNDRV_DMA_TYPE_CONTINUOUS, - snd_dma_continuous_data(GFP_DMA), - SST_MIN_BUFFER, SST_MAX_BUFFER); + snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, + pcm->card->dev, + SST_MIN_BUFFER, SST_MAX_BUFFER); } return 0; }