From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.180.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796146487; b=iL3E2DHVDmd9RGz8Aygm60B8fbvr9te+63hnfv7WWyD8v4uWXED6KpSaDaevQdGzwntx sXZH0xVmPhvv0kLMQl7W6UJgmmAVWJVq9S4owXVh1Plp6WVjY+RB33hcmKZXv+DmqCDCa GoNtssOahN1TN1gq+9/fFlQDF40R1gFxJi/5Ud9tKC1eDUrIY/fW4X3lDZSx1kaHTKbm1 paCHmL2hVy6bWlyjxuzjrlxkKSqcvXRIl81kJaJXjjpRiwqPg7tiPB37774aB3qPUfsdy mjmxfQrYjEnhoxhYDtxhYZZbNLj1pZHsKyO/lgfHRbv3xRgCr/fuBhvA6GkvfKUwWEQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796146487; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Proofpoint-ORIG-GUID:X-Authority-Analysis: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Spam-Info: X-Proofpoint-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=SH6CKp/eYsQsmxhs6fcVqOtDwR8RlZsN+uD3PWxM+MI=; b=XPnbbfBYBJFsGPCNkYcbK2lcx1fhfsPkng7DxOl7+soupNP82JwIyE+3SLY7TXLEUaDG 6bvKhfK+d9EPSYmBYG2ZnQzAmgjMXWjxIiHbjxBe9tANyeLJBc5UxIzkeLqaRNWPKHQyu q0+oTG8bbbMbS9dDVnAhrQ7Wb/XrxV86ci6Qqmzn4MjqAj/51YJpsSIhlBz9iWeNifzhJ RfuiBjuYTII0wcu49oOPWPvQjZI1YMOT55qjP+wnIq9VREdwzuyb4z2JMkhrVoMpQ4zCa JpNPL8FLDIixAKhNQb8MwlMPvbPIKNvUx8V36xhCfzf6pM3mYeMToBvXLwJwNrK20MQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Fy7oMjzV; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=LYVBsrnd; arc=none smtp.remote-ip=205.220.180.131 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 47829606A320 for ; Tue, 1 Dec 2026 17:34:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 47829606A320 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=Fy7oMjzV; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=LYVBsrnd Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B1F75mL1719331 for ; Tue, 1 Dec 2026 17:34:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= SH6CKp/eYsQsmxhs6fcVqOtDwR8RlZsN+uD3PWxM+MI=; b=Fy7oMjzV/nQbFkOc DJfOOtsEalEEq09mBwhhGa6gbFiy1xGEjuejUrDS6fkqjZplsosgQy3RLhNeKiun mRljfbtaPzq2ICjfTVI5RU0aOpZdSpxO9it9L8102M/kwFSPs2kp7Zea4AdAjURa 5GvSNffnMs0mgmEmRanT+o4Kr5c1EMNRbrh7hKkeeF8gi3X3qyz3OQR/ME4HQs/h F6bLKq/D/ln3XoAK3YVfI65FYm4/7EPuqtO54yyQAGZbEvir7BbdF5eerAmn4yB3 Z9u+Jz0B7sjjjneBEV/m0kbiOK9qeuyAOm+yaY5OeHP2XIeXU+y5VUQy3TrNVCcp 86by5A== Received: from mail-yx1-f70.google.com (mail-yx1-f70.google.com [74.125.224.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j9tvga9wt-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 01 Dec 2026 17:34:46 +0000 (GMT) Received: by mail-yx1-f70.google.com with SMTP id 956f58d0204a3-679f81d5d7bso20353038d50.2 for ; Tue, 01 Dec 2026 09:34:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796146485; x=1796751285; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to:content-type; bh=SH6CKp/eYsQsmxhs6fcVqOtDwR8RlZsN+uD3PWxM+MI=; b=LYVBsrndeZ6NXX/cSZibD4N0kZPmUlO1cHcS99AKcWAxCQj3wd7MBWQkDl3AuXLVNa zz2h5jzwAJj1UZ1OreKptxpztDOx2XZs/wDAtvDVE98tyzNu2ttJwQ2SsiNbVlhRJ9MM kpExPHxTY2LkUpyYDqNgPsbSO7iNKjVRC99MhSlm/u6IKrjid1bQk8HDz9apueh6lHHw f/iLIimURHn1XzAWgxaJfL2vVHYu9zdA4hbbZqiEgI62mFkQCrA30VQnKbe73000wYLz z9p5/epARL7DRXIM05/XaGqqw6bCw7SA9Zn67uCsS14SRj0QdNEvNdXAxe1+BsBkUNAL jf6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796146485; x=1796751285; h=content-transfer-encoding:content-type:in-reply-to:content-language :from:references:cc:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SH6CKp/eYsQsmxhs6fcVqOtDwR8RlZsN+uD3PWxM+MI=; b=z/6oJt2R7AHsNT7OdUuaovvjNQ4Uxi8M0sgJ+WX6L5PuPdmoEaNnNQsT1B2WAuZiEh xfiBQhrWYUAo606KumJG9mxGVXGjYyBixhkYhb4ZSQTFl6dUzcUPECHHScZxqNU1bht0 YucnxqHu2dB6ikK/iYjGC1jn8oqvHdobNbCyIfH0N4pLherQBwvTOR4VLWrZ84eT9xP0 dOFohRI/ORgcO9EFZQIh3KoqjBTgcm0gFxA/fp+WcMlQCTRwQB6NPvkPlV/PEYHFNKyI zuYXkWEbnr77B/UDIXbYEhB8C6mWxshUdHenLBjGaDjXl4yhrVKo5Nv3MN+fpW/pdiDI wk7g== X-Forwarded-Encrypted: i=1; AL+hErGPS+iuyXK7EM4zAaWzvgyu7tl5TgaP61SzlElpT1pqbxG51smdZO/Gi8zm2OBeGrUi4gUx/f9rpND/pks=@vger.kernel.org X-Gm-Message-State: APuU4Z/DPa2MvNGo5e0kt9noJv+6eMtpMQGiNhxLsmaare2OCNYoiWAi rCccXRJVuDxywg3ZDpv45a1opXQQGjDPASkdTyU2CILCB/AsuOsRrXvDV7pIPjau8PcC8fxHIc7 GLqAMgRFrTBbskSVXkx0qmjRLDo4hqCeYNVDJgqRfThZgI/Z11rE5XUKXwaqAU0JXQs0= X-Gm-Gg: AZFdTZexVc6Wj+NolLP45PO6/o+sajaG5O9cSqsFa8SpIP6ZurimIPe4m8L58rwnVQ1 r1phG5zHondWvSvHwkw9hvDB/KbS0ilST7LUgxgo3GBtd2YD+01fvE8/1JdK8K3hXFzqzlmzN77 ZCNoI5/0Z/5bByqOzI/aVEkAKD6AfstIY0ezffSC4b8oJho3yCXI6pDlZKOcRZzkgZzBY9jopAX ALGcjSHaoUVDSYkHy94mxrjinh5MANCfkag0Tk/WF6sckAdpEpUfhLs6kfyW/k4rmt5scfhti+b q6ApjgMZqHu6kh8lipKL7J5MgjTDXQ3b7YL6L0b7u8H8mIdRvzCPBlKAc7q22Y95W9VrTs0S7He x+E/3D8zlcyj58JSsVbEPVYYMGYM7oM6lNyZ9UpfkOxrH5bNhuUanMEQXD1iSpyNg2EwF1h2caK Wa X-Received: by 2002:a05:690e:4806:b0:67d:a01b:c243 with SMTP id 956f58d0204a3-67df43f35ddmr8096583d50.23.1796146485494; Tue, 01 Dec 2026 09:34:45 -0800 (PST) X-Received: by 2002:a05:690e:4806:b0:67d:a01b:c243 with SMTP id 956f58d0204a3-67df43f35ddmr8096561d50.23.1796146484789; Tue, 01 Dec 2026 09:34:44 -0800 (PST) Received: from [192.168.68.120] ([5.133.47.210]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-4ab6bb989eesm71720006f8f.50.2026.12.01.09.34.43 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Dec 2026 09:34:44 -0800 (PST) Message-ID: <52d7d6ab-bb67-48b3-ae13-8805f7ad7442@oss.qualcomm.com> Date: Tue, 1 Dec 2026 17:34:43 +0000 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/3] ASoC: qcom: qdsp6: Fix audio after an ADSP restart To: Shawn Guo , Srinivas Kandagatla , Mark Brown Cc: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Mohit Sharma , Ajay Kumar Nandam , Prasad Kumpatla , linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261130075333.43354-1-shengchao.guo@oss.qualcomm.com> From: Srinivas Kandagatla Content-Language: en-US In-Reply-To: <20261130075333.43354-1-shengchao.guo@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: Z_cwHYotS2C0lh_A4PvqntzmIA0neiVa X-Authority-Analysis: v=2.4 cv=I8nw19gg c=1 sm=1 tr=0 ts=6b0f0536 cx=c_pps a=S/uc88zpIJVNbziUnJ6G4Q==:117 a=ZsC4DHZuhs/kKio7QBcDoQ==:17 a=IkcTkHD0fZMA:10 a=pUM-KoujPXoA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=YRc3SrtEWf1V0F17POcA:9 a=QEXdDO2ut3YA:10 a=nd2WpGr1bMy9NW-iytEl:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDA2OSBTYWx0ZWRfXx9/877aLKJ2H Iq56UPevx0QMtNi32JfYHc15pIa0pg/02T/SLCfO+juEsQT4WuUo4ZzX+OAdIzE3ZdiST9wmZyg sbMT3YKt1QVl8wzqsyZdOgItiN6S9yE9H/f0THs/hcuMgqoxaE0K/M4/ZZqFUYt9ixh8SV4Zewi 9zkzszPFYwr43P35B/WRgieaxNVQgxXaQ7DipTOYivg1lLZ8l/IzNObjKOvpQvSuGrYEnSM5GO0 SSovsz7x6ZLWJLr3HRZrzUVEwpyTq/BENT88b0xnC+zqYph1vvBdhXmhkcRwRmjBpPBWuPNQAiL DdKwXZl2QECInOdDsOtydaIHDB1IRmjbuZUjwGcrLZta5Xd5YWutV+eIKbJk27g2E8PDO2QCax+ 0GfhXvH7xsCnfhzAMcJh0qpytYJrQYPwiMDdNM1tWr3ClwUH/rd5sl74YTAuSMgd2bqyxz8t9/z zI9WIhCA+f8bNCNLb7A== X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDA2OSBTYWx0ZWRfX24z8W6MyR7FV wbnlg1c6NszyfahczDkdYCTFtGPdbnMI3TCyXFcTu76RZLqhAVtdIgZdmPji9U1PYFSS5EDv0// SUUA66mzwWD5mjhQVU0FR2/zWi/XiMI= X-Proofpoint-GUID: Z_cwHYotS2C0lh_A4PvqntzmIA0neiVa X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-01_03,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 priorityscore=1501 clxscore=1015 phishscore=0 spamscore=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010069 On 11/30/26 7:53 AM, Shawn Guo wrote: > On Qualcomm Nord, audio does not come back after an ADSP restart > (echo stop/start > /sys/class/remoteproc/remoteproc0/state). There are > two separate problems: > Thanks Shawn for the patchset, I tried it on my Glymur CRD, i get errors, are you not hitting similar errors? Are you using any other patches along with this series? root@qemuarm64:/sys/class/remoteproc/remoteproc1# echo stop>state [ 71.732839] qcom-sm8650-lpass-lpi-pinctrl 7760000.pinctrl: __pm_clk_enable: failed to enable clk 0000000050f780eb, error -5 [ 71.732862] wcd9378 sdw:3:0:0217:0110:00:3: IRQ sync failed to resume: -16 [ 71.732872] qcom-sm8650-lpass-lpi-pinctrl 7760000.pinctrl: __pm_clk_enable: failed to enable clk 0000000050f780eb, error -5 [ 71.732881] wcd9378 sdw:3:0:0217:0110:00:3: IRQ sync failed to resume: -16 [ 71.845564] remoteproc remoteproc1: stopped remote processor adsp root@qemuarm64:/sys/class/remoteproc/remoteproc1# root@qemuarm64:/sys/class/remoteproc/remoteproc1# root@qemuarm64:/sys/class/remoteproc/remoteproc1# echo start>state [ 78.314896] remoteproc remoteproc1: powering up adsp [ 78.317251] remoteproc remoteproc1: Booting fw image qcom/glymur/adsp.mbn, size 19781592 root@qemuarm64:/sys/class/remoteproc/remoteproc1# [ 78.736970] remoteproc remoteproc1: remote processor adsp is now up [ 78.737837] failed to announce new service [ 78.737843] failed while handling packet from 5:-2 [ 78.758165] qcom,fastrpc 6800000.remoteproc:glink-edge.fastrpcglink-apps-dsp.-1.-1: reserved memory is beyond device's set DMA address range [ 78.758218] qcom,fastrpc 6800000.remoteproc:glink-edge.fastrpcglink-apps-dsp.-1.-1: assigned reserved memory node adsp-rpc-remote-heap [ 78.758405] platform 6800000.remoteproc:glink-edge:fastrpc:compute-cb@3: Adding to iommu group 36 [ 78.759481] platform 6800000.remoteproc:glink-edge:fastrpc:compute-cb@4: Adding to iommu group 37 [ 78.760363] platform 6800000.remoteproc:glink-edge:fastrpc:compute-cb@5: Adding to iommu group 38 [ 78.761047] platform 6800000.remoteproc:glink-edge:fastrpc:compute-cb@6: Adding to iommu group 39 [ 78.761748] platform 6800000.remoteproc:glink-edge:fastrpc:compute-cb@7: Adding to iommu group 40 [ 78.762390] platform 6800000.remoteproc:glink-edge:fastrpc:compute-cb@8: Adding to iommu group 41 [ 78.772502] PDR: Indication received from msm/adsp/audio_pd, state: 0x1fffffff, trans-id: 1 [ 78.772557] qcom,apr 6800000.remoteproc:glink-edge.adsp_apps.-1.-1: Adding APR/GPR dev: gprsvc:service:2:1 root@qemuarm64:/sys/class/remoteproc/remoteproc1# > - The sound card takes 5 seconds to come back. The q6apm GPR service > probes about 0.5 ms after remoteproc reports the DSP up, which is > too early for SPF. SPF drops the command without replying, and > apm_probe() waits out the 5 second command timeout before the card > can bind. If the card binds earlier than that, its shared memory map > times out and the card fails to come up. > > - Once the card is back, playback fails: > > pcm1681 0-004c: Failed to enable sck: -6 > > The q6prm clock controller is a child of the q6prm GPR device, so it > is unregistered when the DSP stops. Its consumers stay bound, and > their clk handles are left pointing at clk_nodrv_ops. In addition, > the DSP forgets every clock request and vote when it stops, so > clocks that consumers held prepared across the restart are no > longer running. > > Patch 1 polls SPF with a short per-command timeout before q6apm > registers its component. > > Patch 2 makes q6dsp-lpass-clocks track prepared clocks, and adds > q6dsp_clock_dsp_down()/q6dsp_clock_dsp_up() so the DSP service driver > can mark them lost and request them again. On its own, it does not > change behaviour. > > Patch 3 makes q6prm keep the clock controller device across DSP > restarts, parented to the remoteproc platform device, and calls the > new helpers from its probe and remove functions. No DT or binding > changes are needed. > > Changes for v2: > - Rebase on next-20261127 > - Patch 3: Explain in the commit message why correcting the fw_devlink > supplier of the clock consumers does not help (Srini) > - Link to v1: https://lore.kernel.org/all/20261115032027.414953-1-shengchao.guo@oss.qualcomm.com/ > > Shawn Guo (3): > ASoC: qcom: q6apm: Wait for SPF to be ready before registering > ASoC: qcom: q6dsp-lpass-clocks: Restore clocks after a DSP restart > ASoC: qcom: q6prm: Keep the clock controller across DSP restarts > > sound/soc/qcom/Kconfig | 1 + > sound/soc/qcom/qdsp6/q6apm.c | 50 +++++- > sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.c | 147 ++++++++++++++--- > sound/soc/qcom/qdsp6/q6dsp-lpass-clocks.h | 2 + > sound/soc/qcom/qdsp6/q6prm.c | 190 ++++++++++++++++++++-- > 5 files changed, 350 insertions(+), 40 deletions(-) >