From patchwork Thu Dec 9 17:46:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 522760 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 35E47C433EF for ; Thu, 9 Dec 2021 17:48:30 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 4696C201C; Thu, 9 Dec 2021 18:47:38 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 4696C201C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1639072108; bh=XX7Az4m+vMneNXVh+c8EtxXb8jwoVlfzBM+kRJye7jM=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=Q6pCnbIgQ6WC8HRJK4ijZF5maEqMLrOokKkhQ+WVZQdL1VzmPEmCgTYcUeobdW3CS 1kV+MpAJ0BfM+MAoi2d+LqVn75JjDhX1l6ItwaZ08o5AyuczdiFL+9EDUCEqGkYx41 o9ARSuTOJ5T9Mz602Tmrgr4UGNwdcO3tOeW3yKoY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C8809F80431; Thu, 9 Dec 2021 18:47:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id D67F4F804AE; Thu, 9 Dec 2021 18:47:30 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2063.outbound.protection.outlook.com [40.107.20.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AC38FF8032B for ; Thu, 9 Dec 2021 18:47:21 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AC38FF8032B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="mGwokeEc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=UyEhOO8DLFltZyRPXfsqfjNqEIRGLK7CAEs6h3G3e2bqogrzJFo1bwTC7UCNxXowzkY826i0bcZOGWatoj0KkhRQZtoZkCEFx+FmsNxRkeaVi/AtaQLwHeKSt3J07W40gr9UU60aqsbqgAgcosrdDhlxb8Z+ISXG/PVnT3IZCXneY+OXMA6brbWqcHi7Xhm29AEj2VZedHfwkSN5Y64xOiQBf+GrHgvUSWZFy5SkFhDgiuaea11h9qHpUjsF+Iwq8DDyVPvNmtwsiqVlMBH/BFTObeOeNAsoZtUYaTfs8Pj36v0buo6wpTPjiqmM41A1mqs2tG1Coe6MdOfbOlCt5A== 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=bkglh73YqracFUZm5bF60zZv1dln4i0u4N0aJMzB03I=; b=lb7gD3B+dUsWJbeujy60r+jkFwgR0UOUgfQXex5btoGiWI4964Pss8TsXjBApv9A3LAUp09tALLAb5id/ElOIV9XwNoFqPj09BYnPNc69qpXHmlSf2MPFpthv7609t3bUEhnLHrJQtQaZHgSc17bsqgFlYOWV8CA3PzEL+ECv5yYUN4tAB5P1A3FgYw/xfw1LlMizsdJ1gCWM8Wt+iQCMoHx4ehS3+/iyrY+qufftRmkdNVmpzwzrvckb7hsxw8UYhC6Mz13wOCdLoEfLIwZLPKrzyBi4psIDyJUu36tiBh4bXMXS0iMajWf4hLJ3hO4spUbQdTwBJE7ipIUg+kjWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bkglh73YqracFUZm5bF60zZv1dln4i0u4N0aJMzB03I=; b=mGwokeEcscMjFTppptZxTg3mTrowfmnW2ywB2qP1xTVXpRzhLXpe6/b6lfHxwx7JUbjdPGGAHdsTQm3kKV2+rDai7a5KZHqvDGgOReDmAWFnhIjXLb8wzghDPCf/uJkXR/KzgHhs89EZKCZB9rLQJBUP09nKBfCSkvNTXvg3O1s= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) by VE1PR04MB7263.eurprd04.prod.outlook.com (2603:10a6:800:1af::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4755.21; Thu, 9 Dec 2021 17:47:19 +0000 Received: from VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::3de6:806c:e71:2a2f]) by VI1PR04MB5151.eurprd04.prod.outlook.com ([fe80::3de6:806c:e71:2a2f%5]) with mapi id 15.20.4755.025; Thu, 9 Dec 2021 17:47:18 +0000 From: Daniel Baluta To: broonie@kernel.org Subject: [PATCH] ASoC: SOF: Remove pm_runtime_put_autosuspend() for SOF OF device Date: Thu, 9 Dec 2021 19:46:57 +0200 Message-Id: <20211209174657.141268-1-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.27.0 X-ClientProxiedBy: VI1PR07CA0293.eurprd07.prod.outlook.com (2603:10a6:800:130::21) To VI1PR04MB5151.eurprd04.prod.outlook.com (2603:10a6:803:61::28) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (5.12.254.68) by VI1PR07CA0293.eurprd07.prod.outlook.com (2603:10a6:800:130::21) with Microsoft SMTP Server (version=TLS1_2, cipher=) via Frontend Transport; Thu, 9 Dec 2021 17:47:16 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9d63b28a-51af-4156-1019-08d9bb3bf0ea X-MS-TrafficTypeDiagnostic: VE1PR04MB7263:EE_ X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1002; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: J1YGZbyiQs2phZgR2BlqpTf+/PBOPhbbRHciePye6TM6MNoVm/4eHhxEwhFHs/wUczalXPj0L8uPaXm6NAOZll50cYDuPC8zU1fn9/WVYucTSk8kWlFfrbLsPQHPN3J7X4Or0hB4RQ+855kBwYpUCr/LKnM7AHrrp0ANr6RExXP3KWWKlrPmrr3QDqE3vspWUF98+kcI5wXKYQGW+W84xdP7p5E27N129YbM2re+BslIH2bNptyusenDMRw3PlCRkKYANUvQJjLCdGT1PxDi2WkSb9Zf8O5dpV4Ag+0u6spodsZOFEollTe+UZKWvRIK3uW9Xl8bPFVUUmjyDYI+fQvB1offlsI6OLW4eWzlYqzcxrbp+WQXCGXFwyUk14cGld/daFmcfaZqPDAPFU+PluiOsSBhfxQDzj6uqlq1ZttM1rKhHuCNPec++zoGUSCfAQJzYxLX6HpGc2xoBIS4pxYiigfIBM+GcCaN4PNDZnRVKgBKBwlzGXHXv+KybhYbfZAFfQPut9eTueUsbu8dhFsLzOQRwIpWbNE71PSjesDPUrtGur1CNoKUV33njImEihzIYhLAMsZXrlXS89UOQtvgbAARindmrZUednmvXHt4piqF2xy/O3gR9UJCauFyXgP0e57IxdJ4xNlmBOVJ0BkJCOTgcOJPsrpHvRPQLQsxpU0H9YvT6Ae5aRjqv3vreXE3bXccVwjeIbYaDjw7G/Omuj8pOvZys8JfVMiKiHzZz5PPdFZJkLL9qB0FWM4Eha4vWyOC3BxFdRviEzpRR6yJB61usvN6YHHw6oY6MyI= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR04MB5151.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(44832011)(38350700002)(6666004)(38100700002)(6512007)(6486002)(86362001)(52116002)(4326008)(5660300002)(956004)(2616005)(8676002)(26005)(6916009)(54906003)(6506007)(2906002)(66556008)(508600001)(66476007)(316002)(83380400001)(1076003)(186003)(8936002)(66946007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 38Kph5fzwNG1TLfk/T7Az27ldAKqZV9vm8NxFU506hEnUNPVqtfa/iv7oUP7D1qhwdGWJuLv3Vg6SpYJ8D2Z7D5IDBB1Hin3Ytg+OSWt9fhh84+f6IKjI1HP+LF7q/aKWwsOf1vg0tMlK60I/KBOXXlSluicwcRhoZOxritJ3DwD7fVg94m+CPWXB8G1nb7jrj5PwPGiZGRoFSnI9PJERTr0jH2Sw+I+P8uNgqAfZaGqwKEaMeIP4HbCSaKnquAkpJlfYt4ncvpMyGJZJ3tWUaLByQ9yJXx/gJoeyc8r6m6FNhTJsmevYe3lGNUEBLwqEjpx5V8PYFDLEK94F/5+8xe0dIVYDtyFdsMbdbUbbZ4sdmO+cb4kMHgT788zkN7fcldS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XHQBr8cqce7Ni7vCjngClE18xqWiAKaCw6pPc+0WRjV959sdaD0zTHdKCJ0X+SVWLcyOuxStdUOHu9JGhILRGJ+4vHVxwXMDJOG0fNScvoZP+3JTFlUVD9NTdoH4bbRcfA0o0Pfbg6e5QN5fXhI6P/eWPmDaTkg468z+N92RVNkilUXsGB7tbg= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9d63b28a-51af-4156-1019-08d9bb3bf0ea X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5151.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Dec 2021 17:47:18.8280 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: fT5jwdwVOWe0X0hfut0klceK2927lV83hs0NBhNNTbYSHmXV4ZXo/BeFs+IKRYmAyh0Ojvx03sCmtzmvTDooKg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1PR04MB7263 Cc: pierre-louis.bossart@linux.intel.com, alsa-devel@alsa-project.org, Allen-KH Cheng , kai.vehmanen@linux.intel.com, lgirdwood@gmail.com, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, Paul Olaru , Daniel Baluta X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" From: Allen-KH Cheng In SOF OF device, pm_runtime_put_autosuspend() is not matching any pm_runtime_get_sync(). This is imbalanced for PM runtime. Also, for consistency we call pm_runtime_mark_last_busy() before enabling PM runtime. 1. Remove pm_runtime_put_autosuspend() in probe_complete 2. Reorder PM runtime calls int probe_complete Signed-off-by: Allen-KH Cheng Reviewed-by: Daniel Baluta Reviewed-by: Paul Olaru Reviewed-by: Pierre-Louis Bossart --- sound/soc/sof/sof-of-dev.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index 412cbb824b84..b0089698eecb 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -74,11 +74,9 @@ static void sof_of_probe_complete(struct device *dev) /* allow runtime_pm */ pm_runtime_set_autosuspend_delay(dev, SND_SOF_SUSPEND_DELAY_MS); pm_runtime_use_autosuspend(dev); + pm_runtime_mark_last_busy(dev); pm_runtime_set_active(dev); pm_runtime_enable(dev); - - pm_runtime_mark_last_busy(dev); - pm_runtime_put_autosuspend(dev); } static int sof_of_probe(struct platform_device *pdev)