From mboxrd@z Thu Jan 1 00:00:00 1970 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 73D50C00140 for ; Thu, 18 Aug 2022 16:04:16 +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 3842D166A; Thu, 18 Aug 2022 18:03:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3842D166A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1660838654; bh=T28hPBV+v1k3xF4Y9N/voN/Lc5blsenqdMHzoYx5/Co=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=OZ6/1NSt4eDNOPjxICrPzM6Ruw+nUUUeZG6YclKI8GxWvNLtH7R4LJyMy+0Dk5NFM V2gXYLfvXaCVGuQ96yIyIA4udpcaKvrToOTUzm31TAL6ILPc0SzBHqZwtL61vCYI9E vPDSbzvaMqpL2WSNEUwyNF1RPD9oT6kELEzfM/cg= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id D0971F8013D; Thu, 18 Aug 2022 18:03:23 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E2460F80430; Thu, 18 Aug 2022 18:03:22 +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 C7E21F800E9 for ; Thu, 18 Aug 2022 18:03:16 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C7E21F800E9 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="sPotQO8z"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="nnHWKWVy" 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 E514D5C128; Thu, 18 Aug 2022 16:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1660838595; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9EJOT/mZtpViIbbzTeXZjl/JqhR5oFoXvzvKYSGA5gQ=; b=sPotQO8znDrXIOuB8d0yeHv4Zkj9SDTas6bJOo4qmV1Fujj+VOjFJJIQU734Gg7Fi58oEf AfVr5r3GZcg+QOI7PNcivSl24wm6+LxmhMFqUull4pa1mX+D/ZpJT/9brlKtt5ZqzLT9gi /snTl5wMSAAFKrRupzz+2CjdfPThI6w= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1660838595; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=9EJOT/mZtpViIbbzTeXZjl/JqhR5oFoXvzvKYSGA5gQ=; b=nnHWKWVyLsI9chEG8CW6V3EuVktFirJu6dzs8T5ur76PFlPAlUEjxIJEv7UD/1shqgn6Cu 9nFYTNIDyxM5bdAg== 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 B6426139B7; Thu, 18 Aug 2022 16:03:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 6NyEK8Ni/mLcIwAAMHmgww (envelope-from ); Thu, 18 Aug 2022 16:03:15 +0000 Date: Thu, 18 Aug 2022 18:03:15 +0200 Message-ID: <87zgg17d4s.wl-tiwai@suse.de> From: Takashi Iwai To: Cezary Rojewski Subject: Re: Buffers used in ASoC Intel Atom SST driver In-Reply-To: References: <874jy98snd.wl-tiwai@suse.de> 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") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, Kai Vehmanen , Peter Ujfalusi , Pierre-Louis Bossart , Ranjani Sridharan , Liam Girdwood , Hans de Goede , 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" On Thu, 18 Aug 2022 17:59:36 +0200, Cezary Rojewski wrote: > > On 2022-08-18 5:42 PM, Takashi Iwai wrote: > > 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. > > > Hello, > > Does not hurt to check the change out. I'm not aware of such > limitation for any of Intel's AudioDSP solutions. I cannot test this > change though as ATOM devices are not part of my CI. Pierre, do you > have any devices where this change could be tested? > > Adding Hans as he is the key intel/atom maintainer too and I'm pretty > sure he has few devices on his own. Oh yeah, thanks, Hans might be able to check. FWIW, the patch I asked is like below. Takashi -- 8< -- From: Takashi Iwai Subject: [PATCH] ASoC: Intel: sst: Switch to standard device pages 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; } -- 2.35.3