From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796380818; b=jqvjC+skcndIHbs7H5zxxnCudiy/2ms52gItyCvo72yVBt6Lh/Pztn88imtl2e8G3+po cPpbFQDvEJgJSVDheebol3ikyuTq5rohZnTtXPgXJvxbWH59bg1umlpKoCXiGoYosgRyP 56H4dMfv8g4X4OIdsDeDLn/6GzkZW7/+L7LLOjW+pGiPbnmL+lCsncuE+vXjzpGpp38+f UJHPVpKRaYrbeKPBFdwdmLAW78mvvAffiIvmzYhHW7dK4mnFrK/VISJzSbdawMvohQZdS w3Bs/j+Vz87+VNIu14OjBHCWdI0oh9f6A2yM8eZVaee88LXW85OZ1I+0bqc7+rdSxHQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796380818; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=HAGmdNSAGwTpItRYidBTArfS9UL/fZo/EFrgF02vAmQ=; b=qpJEHsanE+dhUw2ecEmuu/9wyxzqcZrw3+JSdnHMw/hv3OgsbVFhbW/gmoEmGnS5cb/G Gask50aDEZAXP42rdSThtGXj+8iugnf+JRmXMLhBDwpxac0kbV6rvYspE9i0qN5nXm2cG qPgnTC2f/gmz8Z0VSxqe9qatkdgg0mfvtM75T84CL+7CDLo291ncLm3pGUsQ9cnguTDvE h8qLDeWn1Bq5eJopdBSoxRATC2uUrbsDBVmH8UhDAnoXq/gd3YI84xqPWtFsTvuzq4ijf +wU4Vo89UdN82cflgDU6x/am7P1gUS7fJb0Q3qcLgyXl2PnSTJYyvjg9GyJcs1yHoZg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=TzBLumGu; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 17A60606A32C; Fri, 4 Dec 2026 10:40:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=TzBLumGu Received: by smtp.kernel.org (Postfix) with ESMTPSA id 86A9E1F00A05; Fri, 4 Dec 2026 10:40:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796380817; bh=HAGmdNSAGwTpItRYidBTArfS9UL/fZo/EFrgF02vAmQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=TzBLumGuf61xc18LNYBYQjWq4pbkAM8xUd/uHW2gk+eutdUeU7Ax3g7jvmUUy2VjG B/ey1JdEZin5ZmmefJwWuFzsS0GgN7KJfscA5JOJJTg2nn9Pv2IA+WQG+GkmB7W7kg YiFUUiJDqu2LLlhlu5K1i49pzBg8SXzQC4L7Gv6c= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Nicholas E. Andrade" , Mark Brown Subject: [PATCH 7.3 435/742] ASoC: amd: acp: fix PDM ring buffer address on ACP7.x resume Date: Fri, 4 Dec 2026 19:04:59 +0900 Message-ID: <20261204100646.662109458@linuxfoundation.org> X-Mailer: git-send-email 2.56.1 In-Reply-To: <20261204100635.034361255@linuxfoundation.org> References: <20261204100635.034361255@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 7.3-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nicholas E. Andrade commit a3d8527ed469a31aeeb02c5e52ed89de410e46e6 upstream. On ACP7.x the DMIC ring buffer lives at ACP7x_DMIC_MEM_WINDOW_START, and acp_dmic_prepare() programs ACP_WOV_RX_RINGBUFADDR accordingly. The system resume path (acp70_pcm_resume() -> restore_acp_pdm_params() -> set_acp_pdm_ring_buffer()) however still uses the pre-ACP7.x calculation, stream->reg_offset + MEM_WINDOW_START (0x6080000). That window is not backed by the PTEs config_acp_dma() writes for the DMIC stream (scratch offset 0x6000, i.e. window 0x4C00000), so after resume the ATU translates DMIC DMA through uninitialised SRAM and the ACP writes to random IOVAs. With the IOMMU enabled, a capture stream held open across s2idle produces a continuous stream of faults until it is closed, and captures nothing useful: snd_acp_pci 0000:c4:00.5: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x0018 address=0x1ddeee9942398e20 flags=0x0030] Commit 3ee257aba1d5 ("ASoC: amd: acp: Audio is not resuming after s0ix") fixed the same problem for the I2S restore path in set_acp_i2s_dma_fifo() but left the PDM path unchanged. Select the ACP7.x window there too, matching acp_dmic_prepare(). Tested on a Lenovo ThinkPad P14s Gen 6 AMD (ACP rev 0x71, kernel 7.3.1) by holding arecord -D hw:CARD=acppdmmach,DEV=0 -f S32_LE -r 48000 -c 2 open across s2idle: before the fix, IO_PAGE_FAULTs after every resume and no audio; after, no faults and audio captured correctly after resume. The bug was diagnosed and the fix drafted with the help of an AI coding assistant (Claude); the analysis, change and testing were reviewed and verified by the submitter on the hardware above. Fixes: f6f7d25b1103 ("ASoC: amd: acp: Add pte configuration for ACP7.0 platform") Cc: stable@vger.kernel.org Signed-off-by: Nicholas E. Andrade Link: https://patch.msgid.link/20261109-for-next-v1-1-54a06f391bda@gmail.com Signed-off-by: Mark Brown Signed-off-by: Greg Kroah-Hartman --- sound/soc/amd/acp/acp-legacy-common.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) --- a/sound/soc/amd/acp/acp-legacy-common.c +++ b/sound/soc/amd/acp/acp-legacy-common.c @@ -154,7 +154,10 @@ static void set_acp_pdm_ring_buffer(stru period_bytes = frames_to_bytes(runtime, runtime->period_size); pdm_size = frames_to_bytes(runtime, runtime->buffer_size); - physical_addr = stream->reg_offset + MEM_WINDOW_START; + if (chip->acp_rev >= ACP70_PCI_ID) + physical_addr = ACP7x_DMIC_MEM_WINDOW_START; + else + physical_addr = stream->reg_offset + MEM_WINDOW_START; /* Init ACP PDM Ring buffer */ writel(physical_addr, chip->base + ACP_WOV_RX_RINGBUFADDR);