Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3634337rwo; Fri, 4 Aug 2023 07:44:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG8kFyCFkE3N5i2gzsBglMUpmhyEHejfgG466V9MwLTxDY35L3z5PoZNYzfYOxa3Gbaw4jo X-Received: by 2002:a05:6a20:431a:b0:11e:7ced:3391 with SMTP id h26-20020a056a20431a00b0011e7ced3391mr1938240pzk.43.1691160272724; Fri, 04 Aug 2023 07:44:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691160272; cv=pass; d=google.com; s=arc-20160816; b=ds0Nk7HNqXx3fGPKqx13tdO93Ek4n4HI3Wul4RvhrmYnDBDdL1YjlQxiRTsLqGL2qc ax9eGpuH/z1vqgcXfB22ZEuPJtFX6niltTzj14LY6ZHg2uHfyVgpozplwjr3OTtNj2Me 4BgRxMUJwq83CiqdyVeCzIT73QzrXVEvdQyDyvZvDjykA3n3OVMVoxiaOqzyVQn2bbVi sXVXxuSppTtluIxOJsfyba8vJKoBPlaTR2c54TQ53LwO2DBfOX17QBpxdBdZS8L3evHX Rg6Fo6axB3HTHJMukjCt1Xz8qK3ImnSm42zt/Vl62O/acGRtxfdvCbCOTIf4OfVGKcdu 1rDw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :in-reply-to:from:references:cc:to:content-language:subject :user-agent:date:message-id:dkim-signature; bh=5yj8TNtfOfcl/chGvarKALxeCcNncU97w11wCfKS7g0=; fh=ZkMkv68Lmok3DKDTk5BI+XBRB6poM4TsVhbxNIeYvbo=; b=ITUorYsXrc9zYfxYY4r/1UW3UKpHaujwPQeEmJxYqN3ogFUnTMWkXawmvISzspflzb ykKg1sdf4E9AkvHRyzwP7dENj+MYMTck8eXzSOhAjxxRkozRlkYCHnTBoNiUZl+sHaS5 p3LqMzkUfXxGVQQmG6XRMr3TkcpysmCaPpygc44GBvE8gumNnnZzSN/N76JI05JtX0BZ IpagQmzMcyspTeBy9W0/ynuawP8M8KcczrZJv0KPlyulx2Uc9n+K5WW/Jt7Mx/oXwo8b Ucv97JeJLRR8PuSGHLReEjwUBUxI9RTYmvDm5PgHihcMxmtIKSMh7+ZNhzoT4zjyE2TG ezKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="R/mePJsp"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bx14-20020a056a00428e00b0068208d19b23si1756164pfb.311.2023.08.04.07.44.09; Fri, 04 Aug 2023 07:44:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b="R/mePJsp"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231584AbjHDOI5 (ORCPT + 99 others); Fri, 4 Aug 2023 10:08:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231382AbjHDOIz (ORCPT ); Fri, 4 Aug 2023 10:08:55 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2078.outbound.protection.outlook.com [40.107.220.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D420139 for ; Fri, 4 Aug 2023 07:08:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mbyE5UhnPMNvxTSg+XiW++el62mCdTVdmZWhm5YOQIEB2mTZodRnTT4HEvzzk7UmSM4UeVvDjJt/iuTmUol1K0DmsxDzUkdoRTeF5A73JsjP9VKeSYvE9bdqWOh97mfCKtEPDs50ih8vLpbF2kYMk+1WLm+uukCUows943Aj5nv14pIG1mGLjvFbyMY6AtH3ETwhRI8qsYBqc6gFtwugALyyr79rEYfOh4GrPUlNENeS6Uv6G0c8PZ4EkHT2zS3bK96rdEon+/gM/2fxx5YiaFLtVbIhDYZBjZynA8QuJRqc5G/HIdBBEimZXjPwWCsT2/IBoKlgI8dmDscYXYcXpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=5yj8TNtfOfcl/chGvarKALxeCcNncU97w11wCfKS7g0=; b=IJBiI5RPdYyaX1ssnTcKU3ETHL0tMsbVkyOi78OCJlCfsYoZAUqR6lTofUUjr1u99yGkd4Y2kQPGgbNGxHyAMESsSHCgdKPscSTuBEFHSj2HGXchu7zO/x+qJtfBMuHznxRyFpTAfDndH+RNxlVlzec9+zwMgce063xeuK00RWI4hrvxXYsG8VtGZS5f9wxsUbbGfmlz2bJHfVtKnxKF2hzu3ROcloE2uOgUmJSCZIF3/EvOT2hsz3pAabtQQlwx9vuZRBvtS+ErQA1C3mzzXPXsw5+jkOTm3NYCOIGMyvj91sxU4dQTQoKqy+WkFIjxDv6ipVCupjpgilnrjrNO5w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=5yj8TNtfOfcl/chGvarKALxeCcNncU97w11wCfKS7g0=; b=R/mePJspPwPUYz0PSnEqMW4IhOB4z0QALBE2KDS50x0ebN2Jr0LxHcOZa4TAbUoYPz7DkY4dFGOuFA9DfBiBHGmWtx0y92tt9bgsv5cFpoR3jHtNAVsYVmO+eeoL3dUwSRrimsfXUm40rpmx4pDr240AKTIXDl0WBp3X34urDhc= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from MN2PR12MB3661.namprd12.prod.outlook.com (2603:10b6:208:169::31) by CH3PR12MB7737.namprd12.prod.outlook.com (2603:10b6:610:14d::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.20; Fri, 4 Aug 2023 14:08:50 +0000 Received: from MN2PR12MB3661.namprd12.prod.outlook.com ([fe80::45a9:7ba6:5c38:d3a]) by MN2PR12MB3661.namprd12.prod.outlook.com ([fe80::45a9:7ba6:5c38:d3a%3]) with mapi id 15.20.6631.046; Fri, 4 Aug 2023 14:08:50 +0000 Message-ID: Date: Fri, 4 Aug 2023 19:38:36 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: Regression apparently caused by commit 088a40980efbc2c449b72f0f2c7ebd82f71d08e2 "ASoC: amd: acp: add pm ops support for acp pci driver" Content-Language: en-US To: Marian Postevca Cc: broonie@kernel.org, alsa-devel@alsa-project.org, Vijendar.Mukunda@amd.com, Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com, Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Yang Yingliang , Venkata Prasad Potturu , V sujith kumar Reddy , ye xingchen , linux-kernel@vger.kernel.org References: <87a5v8szhc.fsf@mutex.one> From: syed saba kareem In-Reply-To: <87a5v8szhc.fsf@mutex.one> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0145.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:c8::23) To MN2PR12MB3661.namprd12.prod.outlook.com (2603:10b6:208:169::31) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN2PR12MB3661:EE_|CH3PR12MB7737:EE_ X-MS-Office365-Filtering-Correlation-Id: 94a3e681-f220-4aed-f13a-08db94f453be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: umFBSorim5YolwQqSxq26Dn7iGOMpAAaTfSr5E4EbR4N5mMCvcmgXspEANI3yCwNG4VbOgQjqMS+iidOWyp1Pv+4beDLJAt4c5WeqSxogPNUI6mklZKyRnHSlHk3I8rlsYACULp2vlzZbh9UhTo3PkDKRc3I0s4q5y9gUXwwp1QVCYKDMe93ZMu54BGKTUnenT+hZjIo5I9oHXXnJIoRPlTb/Zg+YWQFpdjlS845xtenCkIGlOblZjS1ZG/DioA9wUsFYj8hOcbWe0d+FekiLQO4WjiqjZOh675ilf0g0wRQXKh+PHnYKtYssO3FCVRAcwzLggUPgsg/OFzT2UEIfVKr1u+BusJNlB8Vd1daH9nVL9jb046S5Uw0yXkwSX75EMgtvh21zWlYRfjvWCOk0bw4K2vrNlmZqiyXYQ5EorcIq0lV+AYQRzLKbJSYU45su/qeOT70tJhlCRqy9SCsSO4WTl3WePpTDsxmeHl+EFQ1E9NTZjufZTXzq4qgfvS7oTea3V09g63+/R4CsYtjnfaoCHJe4FqxN6UOQpWWiQ9jUjZxWf1xTwP6CLt2lA+xdUzAL5wXm6n71XWEzPa5XCuopBjojVIQgZcizcP/p9+57Qu4PSAJSkKHf03fSmDK+I0611EDF5iK3LzVVkXg+zIm0DQq+Vda8+s0+NeHvFj9RlG3amAdCe1/QQtxrCbd X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MN2PR12MB3661.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(396003)(376002)(39860400002)(346002)(1800799003)(186006)(451199021)(2616005)(53546011)(8676002)(26005)(6506007)(83380400001)(4326008)(2906002)(66476007)(316002)(66946007)(5660300002)(6916009)(66556008)(8936002)(41300700001)(966005)(6666004)(6486002)(6512007)(478600001)(54906003)(38100700002)(31696002)(36756003)(66899021)(31686004)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?czJGV0wwRENoQS8xMWhZY0hhYXZIcGtYODloTHA0aUcvSlNrVUtydE43V2M2?= =?utf-8?B?RzhQbGswbHdtcFhtZkhodXFBQkNldnU0clYrRjhSMWh2bGZJRDBDa2tPd3Bs?= =?utf-8?B?WW9LVnEyaFhDREtRbFd4Y1M5NkRYdmUzNEJUUTEvb1VvaHRKUGoxT1k2ek45?= =?utf-8?B?cG9KYmZad1ZmdVNYamJ2RGVYbWRJMXZERDRFc3ZmMkh0Q09rd0xUNkJlNFZN?= =?utf-8?B?cUlOZ2c1SFR0RGx6ckxLZldFU3dEOXBpRkRZeUVHZ1RUMDdReGUzbFpWRFVp?= =?utf-8?B?Wkh4T01pcWpQRy9UMlJ1L0ZKU09VL0w2WWxaL2lHZkZzQmhTN095clRqdjRP?= =?utf-8?B?UlN6ZlpSVDJxb0xwZEVFTEFldHFnamsrL2pzcWRwbG1YcXBDZVZJYUpXVlpv?= =?ut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4aed-f13a-08db94f453be X-MS-Exchange-CrossTenant-AuthSource: MN2PR12MB3661.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Aug 2023 14:08:50.5628 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HjzXeur0YnAI77EIpfDaM/HNSRrcaoWUCBvPNZfoaMw7FNOi3vXyoHOX9GNdrFSUkxsvcJkZ5dSpAbAine266Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7737 X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,NICE_REPLY_A, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/4/23 00:52, Marian Postevca wrote: > I'm trying to develop a sound machine driver based on the acp legacy driver. > The first version of the driver was sent for review on the alsa mailing list this > spring: https://lore.kernel.org/all/20230320203519.20137-1-posteuca@mutex.one > > I'm trying to fix some of the issues that were brought up during the review back then, > but when I ported the patches to the latest commit on the for-next > branch, I noticed a regression where I couldn't hear any sound at all. > > So I started a bisect session and found that the first bad commit is: > ASoC: amd: acp: add pm ops support for acp pci driver > commit 088a40980efbc2c449b72f0f2c7ebd82f71d08e2 > https://lore.kernel.org/lkml/20230622152406.3709231-11-Syed.SabaKareem@amd.com > > If I revert this commit sound works as expected. So I started tinkering a little bit > with it and I believe that what happens is that the acp pci driver > enters the autosuspend state and never leaves this state at all. > I noticed this because if I increase the autosuspend delay to a much > larger value, then the sound works until that delay passes. > I added traces and I can see that when the delay expires the suspend callback snd_acp_suspend() > gets called, but the resume callback snd_acp_resume() never gets called. > > I'm no expert in runtime power management (though I did read a bit on it), so I don't understand > all the things that happen underneath, but one thing that is not clear to me is who's supposed > to mark activity on this device and keep it from entering autosuspend if the user wants to play > some sound? Shouldn't there be some counterpart that calls pm_runtime_mark_last_busy() ? > I looked through the code and can't find who's calling pm_runtime_mark_last_busy(). > > Some help here would be welcome. Is there something missing in my machine driver code, or > is the runtime pm handling in acp pci driver wrong? We haven't up streamed pm ops for Renoir platform. That is the cause for the issue. Will upstream them in a week.