From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796027680; b=k/O9U3zv3RtrR8xPsDMls9dCDQfcFTUsANQ72eHToRb14UStNbUqh7YthvDLryZz2rMG s6wHqKBQ1hkydBJhiutEMa/6+MUMEYRCt7iA+CAuxjI5d2vtko/RzDkPtgm4fvn1e94iL S96dXGGB6HbFV7JEBrOPtp9w5Ozfo8D2Xjc1nPZw8w6RdqBVKYdUF6SKdMClZ5H4vi2ER uMqIG7zfqhqFeZHvuLvUzl46Huf/XHcv+BkCxiF+jk8ie33Q0vgONMJX9+Q0QxZZ6niT+ ZEhZoTqjuGKBfsim83hTkqhN/20UUX7eLVeSSEt3u9RoftARFzUISBqq9escAlDjTWA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796027680; 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: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Proofpoint-Spam-Details-Enc: X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:X-Authority-Analysis: X-Proofpoint-Spam-Info:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=4V48ah8iMzWqB7agejiV4psQEFvyu0a7kLzIuTe6ryY=; b=xAAueIMY+EVo8GsDstXmQj2Om28uyjJzaKtOLlRtLqlTq9ARWyuCt0w8DdQxcHpLsqiH xxYmGzsY9yKhW4l0TcvIEJUg2L6t8aq3vXnCiClfwi/s5wImjigDoxMrSkUmchv2x05u/ 2gM2Be/o43OyAQT38NVja2EgKqIJY1zEdcjCZE17W54LgsY9pL5xN2PJCo17gedSrk7Sv OB10zlFP+sVAevAezXg6R+bVJRZwt2Baw+dVSb9KowVL4iSLdyfYBqE7/+KNIdHY98/YO Poz/emPCGufAN6PEH4yW8La7/C/BL9TqAqLhNetFK6DAQkiaFV0rMkk9kB8Ursaa6tA== 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=JVNrvsKf; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b="Fpp/hbSr"; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.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 85C24606A32D for ; Mon, 30 Nov 2026 08:34:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 85C24606A32D 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=JVNrvsKf; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Fpp/hbSr Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU7DgVB265140 for ; Mon, 30 Nov 2026 08:34:38 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= 4V48ah8iMzWqB7agejiV4psQEFvyu0a7kLzIuTe6ryY=; b=JVNrvsKfVwzqnX0a WEvmO0Grzdz+grCStR5f2OuMBbDPbMmHxffuFz+YKdo/+CrI7yarZ5niRJLidR7S TzCz6aMXqSfcHDcXr9rwl5kOJZggVshq4C1qURUHBws7Cf1MNTCUB/vzFo+UU28r OfD7E1aiKxeN+/Xan81Eq+oAmZbkFocPHB3jgMStexyGRW7XnATjyr++paUaqze4 TG6ijGuSv9kDt4Kk7FaNAPPBgDS3w95cjzh0dRqWJY3Wm+QDcJB7gYH5TVetrtPu 3ncaVcsgfVdJ+bmrfyVEBE/syRnsXaXyMe5aspiCD0jEWKOwmR/P7AZiXNkSfCHi kCZLDA== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j94jrg9ef-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 08:34:38 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-94965dfec53so90793185a.1 for ; Mon, 30 Nov 2026 00:34:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796027678; x=1796632478; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to :content-type; bh=4V48ah8iMzWqB7agejiV4psQEFvyu0a7kLzIuTe6ryY=; b=Fpp/hbSr1a5mxeO7AKeBhieJEjRWpWaqoo5M91BWDhdluKIt6kT5H/jnXwoTZiC1t5 K9Eic8QC4pNxn2Lzpi9VqqzwdlnnaXOBcrtyh2Z5Ct0rsG/tWRkmGKHmPv5elth53AS+ rZcxwPpDe9S3Ig7BtkTp4EMNWxa60jPdE8vZHrjfZLNdbN0PpObOpDiqAW8dmsKJB7rC AarCGvBPRVPHNhWv6dfUqLetoi4ZbL9W5LBpUTOq+7cWi9ZkAyPhGmB/cy4NGqVmKytO Do9XyW8ZxJf1CoGknbA2jEp7/hbIYVVKOTUVcMyBCKySn5HG3mqgAOHPvs129OQufSTb peYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796027678; x=1796632478; h=content-transfer-encoding:content-type:in-reply-to:from :content-language: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=4V48ah8iMzWqB7agejiV4psQEFvyu0a7kLzIuTe6ryY=; b=zo4d6zL00Aq1JUhyVQ0y6Xyh+uijoqzTLnl6y+oXqR1Nn1NR3BX8N0JVYh1egMkP/r XcVSasUKQEBXYS5ciDU0Iv2sz1dCGrTo0+w7Z9VdK7BqRT1bhQqqf5Wvlh6egCsOefX3 f/E3FELTL31FAu/TCo9KAwAA24/AIZMp2RtYF96itauOsoeVJiNuFWgpUefq51YVAH6V iEE6ou2tC6Edq9BSGj7WP/o3OAbk+F3la5qm/YsDpY7sUSSNnkeRefRoM4XJ9wiEATYJ G3f0NdBJKI42NeEFG6Z6wtEesx280K7DgY/VbeSTRSu6OxieuVbbJ96FdlAzm8Q+5dvx mvVQ== X-Forwarded-Encrypted: i=1; AL+hErFND5hz6iv+O3ZWIQBePVo54bczxcpK7zqlfCjURvZpDwpgxTByykHgIdX3XL7IiOzyIWjtlVeXquBN+iw=@vger.kernel.org X-Gm-Message-State: APuU4Z/5fAjdFVQzL+Y9WelyAkuE/yyoFmB3Tiq3dRNs2fairJtybGkI L2Ykt5m0gxstf2Y2v8r0V6fGqvItNN+ZauuQgSo6yxVz8hOOF4IgD1jX7lm+YrzesjIBu6ob7ud hTRejMPBkW8N5WJQzI7+YL+JnzdgWBFct+GZvIjF7Xi/FoeADrruI6AXFrjGqSYjxzsA= X-Gm-Gg: AZFdTZcoQRRFOdtlg978RbN738ESlyPUxwHdCZbuFD4EjZJ0DpFEIu4wanrSxSMOzO3 nLAedQflpev9iXH1N1XoqKQVya+CmLDUWHXu+9lP28OPpzUr8GZRqE/GzXUqmZLvy+VTv9RXSYn 8Wp9ivWzckTCGz3mcz6Lv4UtEDcXSIb9T1p0JqN/HnGTcwp5DsK/a1RAR/c90x5tGS3KqpZjora Ce0rt0KQg2OuYzSMLCB3zDHd+BNnwRbwJpqEmSTohqG+qtsorvMYTq52gLfKiLjBTQeT7eh3c7+ v0pOLvoJAK379c59+1ygvlauXdSvtQdb0W9Bi7V3LJhA3RCVSIZhTxBV/I9EFzk1yyHCPw4+3JZ 2UDRErCoa9uybbnMrVP1BFOCWxFOXfZp7lH4KlFQfBaUvVhv1buUe9QKxqgrBJx3+cKSHrxE= X-Received: by 2002:a05:620a:6e93:10b0:949:7fd2:6758 with SMTP id af79cd13be357-949ba68c353mr5511796885a.0.1796027677817; Mon, 30 Nov 2026 00:34:37 -0800 (PST) X-Received: by 2002:a05:620a:6e93:10b0:949:7fd2:6758 with SMTP id af79cd13be357-949ba68c353mr5511793485a.0.1796027677372; Mon, 30 Nov 2026 00:34:37 -0800 (PST) Received: from [192.168.226.72] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-6bb07844211sm7817733a12.6.2026.11.30.00.34.34 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 00:34:36 -0800 (PST) Message-ID: Date: Mon, 30 Nov 2026 09:34:33 +0100 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 2/2] soundwire: qcom: force runtime suspend across system sleep To: Gopi Chandra Sekhar Reddy Kanala , Srinivas Kandagatla , Vinod Koul , Bard Liao , Pierre-Louis Bossart Cc: linux-sound@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20261130-qcom-swr-system-sleep-v2-0-4f65a868813d@oss.qualcomm.com> <20261130-qcom-swr-system-sleep-v2-2-4f65a868813d@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20261130-qcom-swr-system-sleep-v2-2-4f65a868813d@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDAzMyBTYWx0ZWRfXxA/aSaSjGkTR z8ufTgYLj7aAmqM2P2837I4s//nJDWKYaIuW5o6k8Rs+MwPNYEIgRpxz3rdAA0MLXFP26+qwzd9 Rg281sNJTnsGyJMmYVu4H4FsGXJ5PUodzs1lnQn2nq0KfnRLfG+otrGbJylU/lp0uhi7C3TPij/ 1IDM67ZtkpC8sv5KW7jdABs5Vu2iFxYulF4hqR/VLUaLkz0n264Jpo/ymlA/9NElI09ecVs9QRw kdh036W9JLr0iQyXcEXaV1FCLRTa1sAhQE3OAixeWF8OAOtHBxFyrrPl7jtrTY5nS7DHGsGfkOa bZdUd8Uh6Dsj9FhfV2awWqiMywGrQJcEPyBrnmLotET39tY6/uc1je6uJWdMbX8vddtEfK6nkPk IFiUGU66de3VBGWWdTYm4tFmh4dp51NoV5Uoiowth6a3HzJL04IxVmki7IcFJh8vV5T+QGewKO7 CUaKxDzHklsDwTAvXJA== X-Proofpoint-ORIG-GUID: Y_7phsk4ZXXocFOLChIWo1F5vyI3s1jL X-Proofpoint-GUID: Y_7phsk4ZXXocFOLChIWo1F5vyI3s1jL X-Authority-Analysis: v=2.4 cv=NepzRGD4 c=1 sm=1 tr=0 ts=6b0d351e cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=EUspDBNiAAAA:8 a=XvTqUEmhFClUwQV5t9YA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDAzMyBTYWx0ZWRfX6vxzRrK4mf6x 1Qbssa/n4qzyt0DbP+GrF72lutMQIUVHWPkL0BrJWiiTB/oCwZ3XT+2o8CqBMSjxJVIn0jzs4lR 2cALO+HUgbIgDo3WCrP1vTL0KlapVBQ= 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-11-30_02,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 malwarescore=0 phishscore=0 priorityscore=1501 suspectscore=0 clxscore=1015 adultscore=0 spamscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300033 On 11/30/26 8:10 AM, Gopi Chandra Sekhar Reddy Kanala wrote: > The controller only implements runtime PM callbacks and relies on > runtime suspend to stop the bus clock, gate hclk and arm the wake IRQ. > That is not enough across system suspend: from the prepare phase until > the complete phase the PM core holds a runtime PM usage count on every > device, so a controller that is runtime active at that point stays > active until the system resumes. This happens when suspend is entered > within the 3 second autosuspend delay after bus activity, or when a > peripheral driver resumes its device from its own system suspend > callback, as the SDCA class function driver does to quiesce its > interrupts. > > The bus clock then keeps running and hclk stays enabled for the whole > suspend. On Qualcomm platforms the LPASS clock votes behind it are held > as well, which keeps CX and DDR from collapsing in s2idle. > > Add system sleep callbacks that force the controller into runtime > suspend and undo it on resume. Only do this when it is safe to run the > runtime suspend path with the peripherals still attached: > > - The bus supports clock stop. Without it, runtime resume resets the > bus and only re-initializes the peripherals it saw detach, which > peripherals that were never runtime suspended have not done. > > - No stream is set up on the bus. A set up stream stays prepared and > enabled across system sleep, and nothing programs its ports again > on resume. Forcing the suspend during playback left the speakers > silent after resume on Glymur CRD. > > A controller that is already runtime suspended is left alone, so runtime > PM is not disabled for it any earlier than before. > > Signed-off-by: Gopi Chandra Sekhar Reddy Kanala > --- Sashiko has seemingly valid feedback Konrad