From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2268F35C6A7 for ; Thu, 15 Oct 2026 01:45:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792028734; cv=none; b=d5mXl3Za8x7nhBZR1CXRqW3qMfLcjm36Kw1XUDKDSSaNa88s4418+8NhYPk03f32SuvPf+n1NjeDBsUrPOkRoZKDdJM90HeRT6hcuOC+j/vyLb1Vg/+KoYe2BN3ChiD82mo4toop93WHejfqtTBTBK/OTnhr+7up0GkAxyrExDg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792028734; c=relaxed/simple; bh=42Th3Qj56b43dUmPcGDSjuTLub8jxmLc2kGADA+KV8M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZKxfE3gdCjlTR1+VCs9SeaTdkyTucUsNRMgWcoZ/fvVD3WRdMvBcW5plbHh9BIE5boYCAtuSY6pg3yWJQH662WN/qNdVY4HzRRBLAhqvG38Y+mjDTZqZ5DReKIY+bQCDT+RgrqunMEHIKs5B0ZcGoTVts5gfcaNTTAD4yxlOXgU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=FBvo+iqc; arc=none smtp.client-ip=209.85.214.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FBvo+iqc" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2e82462a3f1so9142605ad.3 for ; Wed, 14 Oct 2026 18:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028732; x=1792633532; darn=lists.linux.dev; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eK8UF2f8kXq1TEqWl9Zyp8tJ5HPyvJ/UCpsqtpYFERs=; b=FBvo+iqcxvQdPsUwkZcihAZUJ8t4doq+AccxpqM8IlbwiNxZxck2E0jpmfrmlMVqF4 OlhKBuZnVVec8J7P2SOYujbmDfV515hDl6U97RRgmUVz0PihaWdgSmV9X1h6j73AHRx6 +5hUT/yJNexhcNWyO0N6K+FdHBgvy3pCDDS193FBllvrZumF8KxIJ1EhEl1MbA9hstMh W8AM5toRFJhtNPiwdvFVdonWYrZ0nFiaKgwUzrrx57mz3PbT1UG3NbTUkUXo1+0nW5al S52Ar3Jwofl9ngZTOF/RgXTmShwXua4+FBFGK4VpnpI/BGhs0Z8poV61jPGwRRb/XJuV Aqtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028732; x=1792633532; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=eK8UF2f8kXq1TEqWl9Zyp8tJ5HPyvJ/UCpsqtpYFERs=; b=bk2Ooc84c7vR0tJMMok90TBMoHFFCkkPWzNXdLtp91o4pIM364ZKdsDHPEBtjRwqJX lEoWlvwYVqE1zyBw8XQsMUEpisayltUA7FWhdxs/60LuW+Rxez8glEH5mc5F+Er5GfeR oknzei3Wz5e1q10uFmcuH8pfURYEoh/mLVU2hC+NV1eMbv/5jJnit5LyFB31xoDWVaHL U83dcAXVu5w8YQmp/KqzvyP4h8BoqlglOqpqeW04Gz0hWoLj1M/1q8sr2Ym1G9AqjThF OV2y49PylIEr0Snj4qURuCe+qlZVSvmJ5pKUz3CTqMth3TOgrJex4ScxAz5gApazEwMM tI9Q== X-Forwarded-Encrypted: i=1; AKwUvBzjczqoiexUCwclm1MwIdk73F3aEjNkvY56fDIMZbLC2t/M18uXHJTTBXl4l8X01Prh7TU=@lists.linux.dev X-Gm-Message-State: AFq9FYKNu3vFzcTZ+Em+1tZBcgwm/yJ38GuZe6S9NjLktJMIqsqWfjFr TbZlm5ICxwKTR4BP8lL2ehyX6+ueM8n0fS2MWQlkjljq8hC2nuDiRqWZ X-Gm-Gg: AYBFou2S06QdkIYUxQ4O33SMcWoAurVQQ9wf5n8TacTws0Q5t+uOxj3RTw+sk3o8+9l VJLttXYiD5LnC/XL9Jz2bB3MNliMJ0y5u9vG0cQfnBArhcoQQkFfJN8nE9SDlTZzD+oH/xyz1IW LPrOUPS0z2EmjGtry8q993PGjhvxrv91wNLfd0K9ROY61yLiu+5D/0jx7zbSdnxBDYPKSdDt6Y4 WnWIFaGBXaiwaTPibtDlmxH+JHyf8oOcLWFe0LSi1PKddim6Z611MimnnumuiKE2DXCMT/66EPt 8H1P8AynLGXoZ/3atA63RBFpalSx7LLU6GlSdbgCSo0Gx5dIIq6i+w4h8YI19EYysBc6W07s/Kb rFVqpxFczlsXGVM/bCFLKxArD//92SjwhKvKgxv9KptHtYv/Oaz2PGkq7kFfJKw0vUDo59gM+uc lFab/ESHNskAJQTZDmugS8vXHo1xoJ3CbocZdqTWjr9FYPAkohgEGjrvErIyeBD6chxxKqUXgBa c5ql1WjGVQT3ynEoatUnz0VqKKDnlhyz6zkPcTeMFOjuxLDlmNMy9QtlQPn0jkHcQHvcQ3qWibj nD1mOoOyiYHdpw== X-Received: by 2002:a17:903:19e8:b0:2e8:79d:15ec with SMTP id d9443c01a7336-2e84280afc4mr161680265ad.6.1792028732357; Wed, 14 Oct 2026 18:45:32 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:45:32 -0700 (PDT) From: phucduc.bui@gmail.com To: Vijendar Mukunda , Venkata Prasad Potturu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , povik+lin@cutebit.org, Claudiu Beznea , Andrei Simion , Nicolas Ferre , Alexandre Belloni , David Rhodes , Richard Fitzgerald , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Cezary Rojewski , Peter Ujfalusi , Bard Liao , Kai Vehmanen , Pierre-Louis Bossart , Kuninori Morimoto , Geert Uytterhoeven , Magnus Damm , Biju Das , Lad Prabhakar , Heiko Stuebner Cc: Kees Cook , Syed Saba Kareem , wangdicheng , Chris Bainbridge , Linus Walleij , Charles Keepax , Neo Chang , Krzysztof Kozlowski , u.kleine-koenig@baylibre.com, Pengpeng Hou , Cristian Ciocaltea , Hemanth Selam , Md Shofiqul Islam , Bjorn Helgaas , Zain Aboobacker , Sang-Heon Jeon , Bo Shen , Vinod Koul , linux-sound@vger.kernel.org, asahi@lists.linux.dev, linux-arm-kernel@lists.infradead.org, patches@opensource.cirrus.com, linuxppc-dev@lists.ozlabs.org, imx@lists.linux.dev, linux-rockchip@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH v2 05/25] ASoC: amd: renoir: Fix acp_pdm_dma_close() being skipped on rollback Date: Thu, 15 Oct 2026 08:43:04 +0700 Message-ID: <20261015014324.5569-6-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261015014324.5569-1-phucduc.bui@gmail.com> References: <20261015014324.5569-1-phucduc.bui@gmail.com> Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp_pdm_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 4a767b1d039a ("ASoC: amd: add acp3x pdm driver dma ops") Reviewed-by: Vijendar Mukunda Signed-off-by: bui duc phuc --- sound/soc/amd/renoir/acp3x-pdm-dma.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index 3f59b753243d..89dc60849c06 100644 --- a/sound/soc/amd/renoir/acp3x-pdm-dma.c +++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c @@ -233,7 +233,13 @@ static int acp_pdm_dma_open(struct snd_soc_component *component, pdm_data->acp_base = adata->acp_base; runtime->private_data = pdm_data; - return ret; + + /* + * ASoC only marks the component as opened when .open() returns 0. + * Since snd_pcm_hw_constraint_integer() may return 1, explicitly + * return 0 to ensure .close() is not skipped on rollback. + */ + return 0; } static int acp_pdm_dma_hw_params(struct snd_soc_component *component, -- 2.43.0 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 015CCCC6B30 for ; Thu, 15 Oct 2026 01:45: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: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=XlMDo+W5aLe6BV5Hb4Qhn+4DNL6rUN0dY/9pjGNlURw=; b=uq7NQlPRy4+rYF R8C3fwrTfEyE5cJLY3HNiQLvCGLMUKT5czXSEti+4CM1njWvPiU5wIncjxW19FHtX2wADAK1cP0FT c6QWoLy25FWLiwAqEf0aQcA/gnCwMAyfSc+gTiH1aUgQWQQFIsuCqZYxIIo1aS5Waz0P3n5kt4Boc qW2kF+7bIqNplI2TdB4cpPV/j7kpP9lPC9n3r7Gy/++3oo4m48vFG30ijad7nMebCfNNhuivG+yJ9 i/l5SUPIqNP4XxhcyZnHjUeDwSI93HRSTkB0WM4LktKYlPKOrNoO3gYwUeMXIw0bYx52vdmmfToDO pVcxaUKM7ZkFNpElQY0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAXG-0000000GbLA-3QG5; Thu, 15 Oct 2026 01:45:34 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.99.1 #2 (Red Hat Linux)) id 1xHAXF-0000000GbKA-06OL for linux-rockchip@lists.infradead.org; Thu, 15 Oct 2026 01:45:34 +0000 Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-2e95b3b52f2so1419885ad.0 for ; Wed, 14 Oct 2026 18:45:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1792028732; x=1792633532; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=eK8UF2f8kXq1TEqWl9Zyp8tJ5HPyvJ/UCpsqtpYFERs=; b=QdMbe+ApLXm59wXPocPCSX0NQNN/FT5Pgdp2e0mW/tgw6/y2R3tyLV2QH051Fn13CP d4bQt5OOvvvwkAWF8IYPTTnDQDnmD9l5EYccOI28dh5cOL6MFrbO75ahrBzUoiMPHaxL 7pEIdtjK2p4PIW0QMQ345z9Y+bSV6TlZSD7dCPEQ9xfxAY4z4ZYdkeZQ+oKEt3wULDyX 4R6UKIePJ7m+TDQNK88eGzX20OoHWaMWULMegAVNSjcYI3HbanuY+vopOg9dcfmIK27i sVtfAQNhZg/UoAohIj6BDx7+azCpH22gRBBeaJYENFAxDXcsVXYnSOXkZ5rr1a/aaqMq 8BQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792028732; x=1792633532; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=eK8UF2f8kXq1TEqWl9Zyp8tJ5HPyvJ/UCpsqtpYFERs=; b=nPBGANeDOCnQ8aEAPlfqbJh6SePtRsOjoiIEJnRTPQ9mchDyPBC679YrXa0CgM0GfG 36AOJy3Tk7HGPfr/hi39niPyi8LIRBytKyLiI2k1OyjfVA7lsmEoJYfNhHSsNEnSfzru NhPA6oPZsU4fOj/vJ2vw4n5KQmTmAw7oYBO72EMqo3IHUA1Pg1drEGd3CUKPBMR3TEFg aIZopP110B9i5GairyDCmy965ouYpKNO2eJEooOxxL/Lslct2JRGAXxltpoSpojJ+g8c Jw5t74nzZR1haBhdmpKo4XkEcGi7aW1PLzern2NGOiKqP7CTMBAm6D11C8vBm7OW9e/j d6eA== X-Forwarded-Encrypted: i=1; AKwUvBzL98iZCaORniKI+F3JlUUHhf8d4/lYBX743wuu9GmxvPJ9ErrKCC2NtRiPm1K5wHRc2yzBBrCz0N+2cbb6Xg==@lists.infradead.org X-Gm-Message-State: AFq9FYKOFCltlQOS4/aG8nyV7a3ZmGi6veCpY9sHIl2FaJgyXrOmHSfY zkL5UUbHrz6h+bBHUAVHRwKBFu883naHanCHF7Oz5fd/WKM7WhKhIsQp X-Gm-Gg: AYBFou1ENxVEDNYLz8cREMlQn6m1/SO2iN1P/nlf33+b78rTn17FV/wI7r7cCMPcWKQ mTWKJePufkx2jAQhTj95VVqTChTFFWkkVUf4eQJArZRQfdJdwISPZcsWEuzetqXyepAs19J2ZI6 qvMdOm2byW6+WycUk79KyqhpeO8v8plphOWfCibtWsSPNyQOMgsYsYcB9ddjF5whXmzukRQypVE vswLHvCP+LUwmb6YfccFXAhcnF/E7OfaclHdljBJ/AIKeRYEg80eZ6Z9S4rNzFz43btVirrUPsm TcWpV1m8t84nzpc2Z6DV0HAnr4w88lSImcsZzNLC1RwX1JBuvTEefd9KovdmtGTFMvqSPch2Xs9 Xm7kY7J1+/Hi2yiZ1zilxiXm7VkI/VEmLQjGZ3/RT2o+L1z0Ow/hksQFK7kgGOF+5WN1G9A3Ecf /Lel0hmeP2mCFxJor4g5eE7qc+7QBkNkGgGFa2ScuteR/RpXHgEWPAjVeiqG+NRDsh9VYEZLBlt lIKDTrssEtJ4EgJrAz6UAM1wLovrjTBGWxibwQNgkfJq7hVh6DACZwNbzIt0kC2CF/ViGXsV7F+ FgOkAMfN3IYjFA== X-Received: by 2002:a17:903:19e8:b0:2e8:79d:15ec with SMTP id d9443c01a7336-2e84280afc4mr161680265ad.6.1792028732357; Wed, 14 Oct 2026 18:45:32 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2e8422b8cc1sm73202995ad.54.2026.10.14.18.45.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Oct 2026 18:45:32 -0700 (PDT) From: phucduc.bui@gmail.com To: Vijendar Mukunda , Venkata Prasad Potturu , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , povik+lin@cutebit.org, Claudiu Beznea , Andrei Simion , Nicolas Ferre , Alexandre Belloni , David Rhodes , Richard Fitzgerald , Shengjiu Wang , Xiubo Li , Fabio Estevam , Nicolin Chen , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Cezary Rojewski , Peter Ujfalusi , Bard Liao , Kai Vehmanen , Pierre-Louis Bossart , Kuninori Morimoto , Geert Uytterhoeven , Magnus Damm , Biju Das , Lad Prabhakar , Heiko Stuebner Subject: [PATCH v2 05/25] ASoC: amd: renoir: Fix acp_pdm_dma_close() being skipped on rollback Date: Thu, 15 Oct 2026 08:43:04 +0700 Message-ID: <20261015014324.5569-6-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261015014324.5569-1-phucduc.bui@gmail.com> References: <20261015014324.5569-1-phucduc.bui@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.9.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20261014_184533_070015_C43C60E9 X-CRM114-Status: GOOD ( 11.94 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: imx@lists.linux.dev, wangdicheng , Kees Cook , Sang-Heon Jeon , Pengpeng Hou , Bo Shen , Neo Chang , linux-rockchip@lists.infradead.org, bui duc phuc , Chris Bainbridge , Charles Keepax , linux-sound@vger.kernel.org, u.kleine-koenig@baylibre.com, Zain Aboobacker , Bjorn Helgaas , Md Shofiqul Islam , linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , patches@opensource.cirrus.com, Linus Walleij , linux-kernel@vger.kernel.org, linux-renesas-soc@vger.kernel.org, Vinod Koul , asahi@lists.linux.dev, Hemanth Selam , linuxppc-dev@lists.ozlabs.org, Syed Saba Kareem Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org From: bui duc phuc snd_pcm_hw_constraint_integer() may return 1, which is then returned from acp_pdm_dma_open(). ASoC only marks the component as opened when .open() returns 0, so .close() can be skipped on rollback. Return 0 explicitly on success. Fixes: 4a767b1d039a ("ASoC: amd: add acp3x pdm driver dma ops") Reviewed-by: Vijendar Mukunda Signed-off-by: bui duc phuc --- sound/soc/amd/renoir/acp3x-pdm-dma.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/renoir/acp3x-pdm-dma.c b/sound/soc/amd/renoir/acp3x-pdm-dma.c index 3f59b753243d..89dc60849c06 100644 --- a/sound/soc/amd/renoir/acp3x-pdm-dma.c +++ b/sound/soc/amd/renoir/acp3x-pdm-dma.c @@ -233,7 +233,13 @@ static int acp_pdm_dma_open(struct snd_soc_component *component, pdm_data->acp_base = adata->acp_base; runtime->private_data = pdm_data; - return ret; + + /* + * ASoC only marks the component as opened when .open() returns 0. + * Since snd_pcm_hw_constraint_integer() may return 1, explicitly + * return 0 to ensure .close() is not skipped on rollback. + */ + return 0; } static int acp_pdm_dma_hw_params(struct snd_soc_component *component, -- 2.43.0 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip