From patchwork Sat Nov 12 09:40:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 19155 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp1193852wru; Sat, 12 Nov 2022 01:42:50 -0800 (PST) X-Google-Smtp-Source: AA0mqf7nl8hgOc2tjP/Lgqmgdcvf/X3pbeaetlF7qW5NgDOvGyueXMQ62iVqPpKLakvEJ20iEAzT X-Received: by 2002:a17:906:5156:b0:7ad:db82:d071 with SMTP id jr22-20020a170906515600b007addb82d071mr4891411ejc.200.1668246170098; Sat, 12 Nov 2022 01:42:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668246170; cv=none; d=google.com; s=arc-20160816; b=AamXjkwxamd5RRyg5pLPh7KwvwtZQ1rEH/rId86nM+IqoZ2Rfs6UK3A7QPxhCXNiK9 TzxTqq/FwllXJVyybPoCfRPAkpbEg0rtbb2xXsvdCCQEBpSHaYbj6arx456rQE66t0U8 slKUxt7rv55pKE0Y4yNbW3GkC9qCekARP1wB9ACJ98wnGPJD9hznnN7qp8Nl0KepcqQY KSS9z/f7YE/sgWY5HDRnEIc6Bbr83oT1p7o2qkkQ8O4GC2Vcrj4vWp1qimAqCKPkhO28 maCMlO+AHlcS6O5Y0Sn+W7zET7lOd+3aWpDGyHG7ocXX9I06LxjHHwHCAF26Q91LDzoD OjxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:subject:cc:to:from :message-id:date:dkim-signature:dkim-signature; bh=/BWXYsst6CG60Vua3UiXW7Egp2Sa9g+jro6UwBGvb1k=; b=dssCA558CN81LiS6DFXFEVvSc3T4hSGu7UnnvyTIpvm9gqd2PnwtvuIF8wVRsE0ZYj swpZ+KBLGM4OvLKXYwzk+BnPYEji7BXFiAoaQ7wzr8yBS3zPmHkOZCEKW8VaX+5idFo9 /ZZPVwLvwKunvBT9luD45Xf6vEqdMKlnteXa7G8KEy6R97TaphFIRjusBJzSO+xXRmde 1avEWb08IEyc2T1/bfUhHScQ5MNVDbnoLHR3gYtp7TJJWSTWjmrlEnFOCa33LkDcVAo4 yNfOMrtRYmbpErrH7CMfJDrVpouSa4fPrYQkbYi8mtOwemNNnRx5qCMe457UaX6nvLi5 6zbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Hz7m+0l4; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=hkVQtHnO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f24-20020a170906391800b007a6cf813043si3158525eje.692.2022.11.12.01.42.25; Sat, 12 Nov 2022 01:42:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Hz7m+0l4; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519 header.b=hkVQtHnO; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234824AbiKLJko (ORCPT + 99 others); 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") X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749282895659409882?= X-GMAIL-MSGID: =?utf-8?q?1749282895659409882?= 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;