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 07306C32772 for ; Tue, 23 Aug 2022 11:57:15 +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 1F4AA886; Tue, 23 Aug 2022 13:56:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1F4AA886 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1661255833; bh=1CWfrtx/cLFcbTDMsWTllAc/6tmzSILjWX/Dk8YiwGE=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=o4NMLubISj+kOpHiUIflSqcMFzJsJyKTij+nKg9ebcl2G3SlXXq7a0+Zbh+latho3 9G0wfGdq7X4OA0YJ7ufrZ7CVzlMZ/QEiKeWUZbUT08QA+seC3sMNwGNnWnma3hMzJT H2g7ckUDhFdRh9TCQXEG+yM2oNomB09BMpoQulfI= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C0A07F80152; Tue, 23 Aug 2022 13:56:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4E8C6F8020D; Tue, 23 Aug 2022 13:56: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 2815CF800A7 for ; Tue, 23 Aug 2022 13:56:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2815CF800A7 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="ZDyfq6fy"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="70zZFJQK" 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 884D41F86C; Tue, 23 Aug 2022 11:56:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1661255775; 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=/PmAyIZgNZbRq1Qey9izx6mMxuTw1W5ecJXvQePMIow=; b=ZDyfq6fyCEDiOWSR25dXFCPSsL2bMG3b9VsaNcV5qLaOcIVq07OkuVY1jbKNlcG3r2tP8g TOy/LpEIE0ReWglR4pKHfAa0oCWoOQ0C+Yq5VrecU5/e5U3LqQIE9zolrR7qxG1IUD1nVV PJ8PJ5BGfLrEAcXRliyNwgwgaAFeVq8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1661255775; 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=/PmAyIZgNZbRq1Qey9izx6mMxuTw1W5ecJXvQePMIow=; b=70zZFJQKsFOqPaVswxCh61bOhK75qjwpGDrCPus4jWS50C7XR0Tp3GGCltIUa40lO4sOCK JNb+xmBWUu1jssCg== 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 558D813AB7; Tue, 23 Aug 2022 11:56:15 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id hhTkE1/ABGNFOAAAMHmgww (envelope-from ); Tue, 23 Aug 2022 11:56:15 +0000 Date: Tue, 23 Aug 2022 13:56:14 +0200 Message-ID: <87fshnqild.wl-tiwai@suse.de> From: Takashi Iwai To: Subject: Re: Buffers used in ASoC Intel Atom SST driver In-Reply-To: <87zgg17d4s.wl-tiwai@suse.de> References: <874jy98snd.wl-tiwai@suse.de> <87zgg17d4s.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: Cezary Rojewski , 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 18:03:15 +0200, Takashi Iwai wrote: > > 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. I guess we can merge and go forward. The changes are very likely safe, judging from the code, as there is no evidence of DMA address restriction there. So I'm going to submit the full patchset for cleanups. thanks, Takashi > > > 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 > >