Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4658828rwb; Tue, 17 Jan 2023 03:59:28 -0800 (PST) X-Google-Smtp-Source: AMrXdXt6OQjiU295sv10s/xEvJuSSbxu0Q4SQZarcV6q4clS4y/B6cQfmM7mcLWdE0GurZjElK3e X-Received: by 2002:aa7:cfd6:0:b0:461:b8bf:ce1b with SMTP id r22-20020aa7cfd6000000b00461b8bfce1bmr16017427edy.34.1673956768418; Tue, 17 Jan 2023 03:59:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1673956768; cv=pass; d=google.com; s=arc-20160816; b=v+uVJMDk3xSZ5FPyjJRK68aLyFtjPWkB6uVZd4v2G1iTWURO/hXyr2EsDl1vN+OIO+ sxmUR7zbf4y7XWCcwXw4UKNThlbJSN/ihzSP68WmxdzISDVROUsdB8L75oiKQ+jociOc nzZAFxvvypIWHjS/uyGd//CLEfKSMBxfVMzSTXplgwqFxK0EcI4BpEmPqgRu5JAoC770 lRlO3yg9JNlD7Uq1fWYoFfMtrfwSRkpGutt5QjtCw5jLZUkvAKJ19A1MXTWxAv4p9ud3 AQU1MLC5tCsUMhFTVIReDXSL5AluWoLly9L/HmkNKjRoZzS4twYTZZCEaFG9Ym/vUq/I 2EEA== 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=g//r7USCUb8XxQapyRZKTUsy0+eDGkZcDpRqU0xvvZM=; b=PVEFCpMev+NJaxFPO2va7PuQbomwt8JcC5QMrsZ1cFbXAN7znp7DEcTXvlmL0UCdcC sJ/hf53scTnjjpg9whBwsmOedz4HSsHQ5ppoJpL4yt9DUnOyaQCbLSXum/ZpfJl38fLO 2w6o1JG+yKBH/cHOaRP7Bl0X1SMYot5p22ZfLaqgfuFZ5WiGS8nINyrpdJNRO0gSoJ+u nNFUJwx9O7MyQDi9Qvt2NDQN9wp61IzT2XL0fBovGaUsQWmw8mCELLWLOrwGUIwgGtay c+QNCXjNDnpfUdT3QW/hTZUXei/dNXspKrAgUcmBqTdIY7l+p6Wrihcb0Ic4KXN3fa3K KaWg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=pYaybpTo; 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 w8-20020a056402268800b0049e34ecef4asi2187263edd.5.2023.01.17.03.59.16; Tue, 17 Jan 2023 03:59:28 -0800 (PST) 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=pYaybpTo; 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 S236804AbjAQLaM (ORCPT + 48 others); Tue, 17 Jan 2023 06:30:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46780 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236738AbjAQLaC (ORCPT ); Tue, 17 Jan 2023 06:30:02 -0500 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DB8B6586 for ; Tue, 17 Jan 2023 03:30:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nra2Aecn+LSt78jE4wPrPplHv31Inh68YH97FwzuPhj2QLkdJ+8D8Qnt9jVRc/63+3Es894E46sKdP/qPERWyxfrkYMZc2Rpb5/MsfQVlr/eoBAbwmbiHSLptTz5+pVeTe9YO1UdtwuKx9oFbFOfN/qQSSbY+QNArxUm1u1N75/PcPBt8x/W4Kq0D7gc7wkAv0SNc9//xiEZZnRIShfSXmNzWccgoAXsJTrxuBtAiu8ZKCIPrC8aBfkt4xiCNfUZ10IC3QxJYztgYBz2aOaMBcLwtZf2H9H3Z3GExlVbtopRd3nnJFbDRYciWzmoDnz+JwgIJLWI3KutXJkulkeGTQ== 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=g//r7USCUb8XxQapyRZKTUsy0+eDGkZcDpRqU0xvvZM=; b=CWLb6hLji+un+DjY6DQVhDskJXOQpO2rNadBlieRx3TfBpjGjOLberyuKwz67StG7Nmyy2++TesCNcjCJ+h2LYTvSEwhxq2vmq6IoGyjQpwIAce3GWSXLaQstqTmgM3UDJYuGmFOPMtlL8QAweYNDvePz3UW/c7NMQxu+/Y1G8OYJ2JVSc2DU5G4GXxOI2zeAHgrUzjHokGPDrqgqEPmwaIp3faLciiLr1IYaZ9YPX/o0T/fR0WrJnTuJYwuGIMsLSBhUaFhY0ifZ1ecUiHDrtFcEAGJESjnlgrSEQHF53qqiNkp1FX4b5ttdVZnlaSMuajN9gKRmy1i/QlTzG0pfA== 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=g//r7USCUb8XxQapyRZKTUsy0+eDGkZcDpRqU0xvvZM=; b=pYaybpTouCCdsU771vlgJ023VsqQCBdcqIbGVBImtu294qYEK5O7dHRr4Syb0oC3YkhvGBTu1527fQhJ9ER5Zn+b1w6CpH8Hb3WOdwxWGirNPWsPwIpyfDj89UZyGLadV4oLkbbLPU85c8QHFX+wuCOWeUxvvy6l9usU/qbvTn8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from DM6PR12MB4123.namprd12.prod.outlook.com (2603:10b6:5:21f::23) by MN0PR12MB6080.namprd12.prod.outlook.com (2603:10b6:208:3c8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5986.18; Tue, 17 Jan 2023 11:29:59 +0000 Received: from DM6PR12MB4123.namprd12.prod.outlook.com ([fe80::fc88:7080:445e:6866]) by DM6PR12MB4123.namprd12.prod.outlook.com ([fe80::fc88:7080:445e:6866%7]) with mapi id 15.20.5986.023; Tue, 17 Jan 2023 11:29:58 +0000 Message-ID: Date: Tue, 17 Jan 2023 17:03:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH 19/19] ASoC: amd: ps: increase runtime suspend delay Content-Language: en-US To: Pierre-Louis Bossart , Mark Brown Cc: "Limonciello, Mario" , vkoul@kernel.org, alsa-devel@alsa-project.org, Mastan.Katragadda@amd.com, Sunil-kumar.Dommati@amd.com, Basavaraj.Hiregoudar@amd.com, Takashi Iwai , Liam Girdwood , open list , Syed Saba Kareem , arungopal.kondaveeti@amd.com References: <20230111090222.2016499-1-Vijendar.Mukunda@amd.com> <20230111090222.2016499-20-Vijendar.Mukunda@amd.com> <0aaf3fa5-bcf1-ec06-8f78-c61e8809398e@amd.com> <5a34e6f7-eaf1-8128-81e4-81f65541d9a8@linux.intel.com> <1a14e117-4216-b98d-f972-c9a02cf79d1e@amd.com> <90782037-109b-b197-ca17-b7d199931f7d@amd.com> <62272f17-bb97-aa10-d5d9-0914595e5431@linux.intel.com> From: "Mukunda,Vijendar" In-Reply-To: <62272f17-bb97-aa10-d5d9-0914595e5431@linux.intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: PN3PR01CA0027.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:97::11) To DM6PR12MB4123.namprd12.prod.outlook.com (2603:10b6:5:21f::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6PR12MB4123:EE_|MN0PR12MB6080:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a0772d1-bf17-4b06-6309-08daf87e2a3d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: RXiSrFzbqLYICOubLJOxSyNnxxpCneDMp55D10Qz2B2XdQ5/crlwuuZ5Aex6VFf853TiunpNY67Cei6yB7WWVUdtB+aNFLXZqiLsRI5GH2iuqLhVj6geypqOkhV3mjBg7ovTT9nrurMEeJfoLxkc//o7iafsqwi7d1OK+YVhCtRJrTeC3PJF8PKMBBt1oY9sCh120vtU0LVb4KNY98p+xwRDowpI4Pt9gkcEDSZqMqkPe+gG/aLrE9tAs/PoksjpvisBqjfeZDM/T8J5mtIW8geU9e7DjtQpSpEFNLbfdoWVEY9gQI+QQEYKa2F79i3kRhRDnauY6IQQNO/DTdQGaYNooLTnloEmrBmw6uweJbYD41hViB7SiygqedbztHXKwxj2JtgDgaVWWcLHzIboB3XjrCuazoFozY6uNWN2uQ9o/IyP9O0+9rGbeOLy1cpTIxO4dnTLNnwfVOnqUGfJ3d9yVn+s3At0pcjTH5okGX13Parpiz+N+p+BYnjefuZi3bGTbMpqjti7ysk6tHSzCmfK85Bd55Uilyw0rnu5oXnL6C5WFX7VdqDmV17pRhGA1+4ZmCiQOLZIXQ0rp0bemBLrE5hLqM/gc5his/S1nkmqES3D7TZ5Aw0i0iq0+P+zAb3ycgNcmLJvhj8MjiHxvgfSs7zDQc4SKGaImcutG+sI5om+45AMM6EtF70yMzWb/Y9mX6HvgcqIRUieNIU+w2OJdWzImtwKtaUIoIHlU/V9d/lXx6mzs7oAZeIoUEcoznLV99Uw3HQH53mO9sSvenEw9uwdlAVoi1BidKVuHMI= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM6PR12MB4123.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(39860400002)(376002)(366004)(396003)(451199015)(6506007)(966005)(31686004)(2906002)(66476007)(66946007)(15650500001)(4326008)(8676002)(31696002)(26005)(41300700001)(66556008)(8936002)(38100700002)(36756003)(6512007)(110136005)(186003)(54906003)(6666004)(6486002)(478600001)(86362001)(5660300002)(53546011)(316002)(83380400001)(2616005)(10126625003)(45980500001)(43740500002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Y3FtNllYNjIzbFd4NVBNdXp5SVc3SnNQdFVuakU5M2Q3a0FTa1pxSWRCTElx?= =?utf-8?B?UnNjbmh3YmExVHp6VHpHa0JSNGhNclBOMmMwQ3BZUWszZVg2QUpnVkVJLy9v?= =?utf-8?B?bWpFMWJQZWdPQ05INXpyZS9jSmdYME5pUkJialBraHF4RndSTXhUZjA1aGg3?= =?utf-8?B?VEJBbzNZbW5XUGpzUHBY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NEdvYjllSTBYK0Np?= =?utf-8?B?UHRlaG82eSsxdnZBMzlwY1F3d2d1Y0taSld0bWxYMi8zaXM3bzlVZXNkRG1G?= =?utf-8?B?eTFnTWtjd0x5T0FURGdHUW5GQ2VCeU5xa0FCQzRnNW5LNmFCWFpvamJpS1Qy?= =?utf-8?Q?QUoP8Z8+pECJjhfy1SyUfUoyj?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a0772d1-bf17-4b06-6309-08daf87e2a3d X-MS-Exchange-CrossTenant-AuthSource: DM6PR12MB4123.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jan 2023 11:29:58.8798 (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: rSB1OEFoEO9bLdw4ZDrJfxT7g9nJjttvwIeMrCTfaZjHvW1vjCbMcGXr6BVQA9gGRs98R4e9JPgEocBnFaJUOw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6080 X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham 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 16/01/23 20:32, Pierre-Louis Bossart wrote: > > On 1/16/23 02:35, Mukunda,Vijendar wrote: >> On 14/01/23 01:27, Mark Brown wrote: >>> On Fri, Jan 13, 2023 at 11:33:09AM -0600, Pierre-Louis Bossart wrote: >>> >>>> I do recall some issues with the codec jacks, where if the card >>>> registration happens too late the codec might have suspended. But we >>>> added pm_runtime_resume_and_get in the set_jack_detect callbacks, so >>>> that was solved. >>> Right, I would expect that whatever needs the device to be powered on >>> would be explicitly ensuring that this is done rather than tweaking >>> timeouts - the timeouts should be more of a performance thing to avoid >>> bouncing power too much, not a correctness thing. >> Machine driver probe is executed in parallel with Manager driver >> probe sequence. Because of it, before completion of all peripherals >> enumeration across the multiple links, if card registration is >> completed, codec register writes will fail as Codec device numbers >> are not assigned. >> >> If we understood correctly, as per your suggestion, We shouldn't use any >> time bounds in machine driver probe sequence and before registering the >> sound card, need to traverses through all peripheral initialization completion >> status for all the managers. > What's not clear in your reply is this: > > What codec registers are accessed as a result of the machine driver > probe and card registration, and in what part of the card registration? > > Are we talking about SoundWire 'standard' registers for device/port > management, about vendor specific ones that are exposed to userspace, or > vendor-specific ones entirely configured by the driver/regmap. > > You've got to give us more data or understanding of the sequence to > help. Saying there's a race condition doesn't really help if there's > nothing that explains what codec registers are accessed and when. We have come across a race condition, where sound card registration is successful before codec enumerations across all the links gets completed and our manager instance going into bad state. Please refer below link for error logs. https://pastebin.com/ZYEN928S