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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 24047C982FA for ; Tue, 22 Sep 2026 10:12:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=RCczAd6rRCjl+z1bCRL9mHWnCXKdbTyfadA77NuaG/g=; b=K92TgGG9CLyTw9MV/JLsSjYxX+ xIwB+BV9NxQkUh3nzHM507C6AABrE2WJN5myJnujFJNFrVx9Uyl/reFmRQ+rduIXXb5PnJCv0XQgH 4gllKq8DGHZsMGy/HiHzHw7qOF65JAcW4pMfZSX3ficFHRG6QR9lDCdGM3LLIUVKhnh0Bi+IeyTsQ VT5zs4nyF72ElZE7JWARksPIHIPHtm/fwjzRSZTpMtK8xWPxuX/Yvv4eGB6xnWWFOdnEpGXeP2aRz 971e1v4nDS0YsZakZkzw1oK6UhlBLC2SVG1BUlWjmEx+2lHqTSI3HfvHEzik4Tc0FPT2PrBFzK5pF U3u6B7hw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8xUE-000000051FG-2BfW; Tue, 22 Sep 2026 10:12:30 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1x8xUC-000000051Ey-46bN; Tue, 22 Sep 2026 10:12:29 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 79F4343903; Tue, 22 Sep 2026 10:12:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 309971F000FF; Tue, 22 Sep 2026 10:12:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1790071948; bh=RCczAd6rRCjl+z1bCRL9mHWnCXKdbTyfadA77NuaG/g=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=fG+6R961EA4yrEigbIif5vmei3DVEwm80+ODauHnon7uJ1tcU4/BLWyevxnbqN8Er 3yx5z+Dd/GmgfNmm8CKcebMfTZzMXiMH0Imxm1rHZrKnXkpJFDqw5/UsPMEFAHSY2k 8MABgMWnWJmgbtIxw70uBIY0C5PrNWwVbF+SkwVxQG7kF9+bEQ3HMhTVPZmTidEDqu pGfu983jjupSUjJVC0g0lBBoFAdQxU8PDADuQFWhwdF/2W6DCBIkCaATiUYHLIwK8t SdmRF2DXQQp4wm4DNnMGckojCSCMRaOSBmbX+QfjQ0eRi2ntqs6IDBk2sh0XwkxbUq J6GtaEQHbOlhg== Received: by finisterre.sirena.org.uk (Postfix, from userid 1000) id 2934F1AC56BF; Tue, 22 Sep 2026 11:12:25 +0100 (BST) Date: Tue, 22 Sep 2026 12:12:25 +0200 From: Mark Brown To: James Calligeros Cc: Martin =?utf-8?Q?Povi=C5=A1er?= , Liam Girdwood , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sven Peter , Janne Grunau , Neal Gompa , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai , Ulf Hansson , Amit Kucheria , "Rafael J. Wysocki" , Lars-Peter Clausen , Vinod Koul , Matthias Brugger , AngeloGioacchino Del Regno , Shenghao Ding , Kevin Lu , Baojun Xu , Sen Wang , James Schulman , asahi@lists.linux.dev, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, patches@opensource.cirrus.com, Takashi Iwai , linux-mediatek@lists.infradead.org, Hector Martin Subject: Re: [PATCH 06/28] ALSA: dmaengine: Always terminate DMA when a PCM is closed Message-ID: References: <20260920-macaudio-v1-0-741cc20a74e5@gmail.com> <20260920-macaudio-v1-6-741cc20a74e5@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="sT7HIJNNlVwRAJA+" Content-Disposition: inline In-Reply-To: <20260920-macaudio-v1-6-741cc20a74e5@gmail.com> X-Cookie: Too clever is dumb. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --sT7HIJNNlVwRAJA+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Sep 20, 2026 at 02:53:45PM +1000, James Calligeros wrote: > From: Hector Martin >=20 > When a PCM is suspended, we pause the DMA. If the PCM is then closed > while in this state, it does not receive the STOP trigger (as it is not > running). In this case, we fail to properly terminate the DMA, calling > dmaengine_synchronize() nonetheless, which is undefined behavior. >=20 > Make sure we always call dmaengine_terminate_async() on PCM close, > regardless of whether it has been called previously or not in the > trigger callbacks. See 6a7db25aad8ce (ALSA: dmaengine_pcm: terminate dmaengine before synchronize) - we should already be handling anything that's already saying it's paused. --sT7HIJNNlVwRAJA+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmqyVIgACgkQJNaLcl1U h9DhyAf/X6q2AWvRH1MFMzPD/e8912CrW4cklVOfvh51L3pxhjQ/6JFWDI+pyTLs AVff/x4OgIlUuhgxgEk/Y99g122aZRx91ZsDmQeKifSiJGXwxKsk2ZmW4lZb/VNL ncqE5q63FDDYPIUoB/bBfQ6GfuhzZ7p0+oB5+U8Ec+mRaAsicuIIUZPPaeFVx92V +nRFciaP5xg9bFFIDNX0jkO7TdqR8VbuJ3qmomHv7hUi3ZsYrUoPG+qI3o4Gc0vV JRiMoaUgQihkntAo4L92KjTNkNJrcezERaU3xjd0x0q7IPAtr9sHwpaTdS78IV5T dQGbVZsRQq3iRrdFnJqwezyQXWtfUg== =I6pM -----END PGP SIGNATURE----- --sT7HIJNNlVwRAJA+--