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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A9624C4332F for ; Sat, 12 Nov 2022 09:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234827AbiKLJko (ORCPT ); Sat, 12 Nov 2022 04:40:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234562AbiKLJkm (ORCPT ); Sat, 12 Nov 2022 04:40:42 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 262C81CB12 for ; Sat, 12 Nov 2022 01:40:42 -0800 (PST) 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-out1.suse.de (Postfix) with ESMTPS id BDEA7223DA; Sat, 12 Nov 2022 09:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668246040; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=/BWXYsst6CG60Vua3UiXW7Egp2Sa9g+jro6UwBGvb1k=; b=Hz7m+0l4aMz9kOpdhbSF62ecamLj+2KnFyKQTcFKuuk8oi3mJK2jmKvWLH+aLLIsXUZmfy Bl7qwSaP2T5S1HEgVOIq/0xa+prUUr9hkhwGh636+aj+vVBjuYDFkMu9gd/db7BppdVJDB m5ccPRKuonYWHe4xccIH6g53xfZ3RRo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668246040; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type; bh=/BWXYsst6CG60Vua3UiXW7Egp2Sa9g+jro6UwBGvb1k=; b=hkVQtHnOLmVSBACKMzB41kQfjr8ETu4dGsYrvNjLf4QdI9K22rLeZ4HAnUKBsB7Ung8oTv Jpa5PB9qtFUskeAA== 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 A353E13A08; Sat, 12 Nov 2022 09:40:40 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id LCApJxhqb2MyNwAAMHmgww (envelope-from ); Sat, 12 Nov 2022 09:40:40 +0000 Date: Sat, 12 Nov 2022 10:40:40 +0100 Message-ID: <87sfio33zb.wl-tiwai@suse.de> From: Takashi Iwai To: Linus Torvalds Cc: Linux Kernel Mailing List Subject: [GIT PULL] Another sound fix for 6.1-rc5 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Linus, please pull sound fix for v6.1-rc5 from: git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-fix-6.1-rc5 The topmost commit is 9d8e536d36e75e76614fe09ffab9a1df95b8b666 ---------------------------------------------------------------- Additional sound fix for 6.1-rc5 This contains a regression fix for the latest memalloc helper change. ---------------------------------------------------------------- Takashi Iwai (1): ALSA: memalloc: Try dma_alloc_noncontiguous() at first --- sound/core/memalloc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sound/core/memalloc.c b/sound/core/memalloc.c index 6a81aaab25ab..ba095558b6d1 100644 --- a/sound/core/memalloc.c +++ b/sound/core/memalloc.c @@ -542,8 +542,10 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size) struct sg_table *sgt; void *p; + sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir, + DEFAULT_GFP, 0); #ifdef CONFIG_SND_DMA_SGBUF - if (!get_dma_ops(dmab->dev.dev)) { + if (!sgt && !get_dma_ops(dmab->dev.dev)) { if (dmab->dev.type == SNDRV_DMA_TYPE_DEV_WC_SG) dmab->dev.type = SNDRV_DMA_TYPE_DEV_WC_SG_FALLBACK; else @@ -551,9 +553,6 @@ static void *snd_dma_noncontig_alloc(struct snd_dma_buffer *dmab, size_t size) return snd_dma_sg_fallback_alloc(dmab, size); } #endif - - sgt = dma_alloc_noncontiguous(dmab->dev.dev, size, dmab->dev.dir, - DEFAULT_GFP, 0); if (!sgt) return NULL;