From patchwork Thu Sep 24 15:15:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 250895 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A3272C4363D for ; Thu, 24 Sep 2020 15:18:13 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id E698720BED for ; Thu, 24 Sep 2020 15:18:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="TTmmReyO"; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="F0oxZUoU" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E698720BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 7DC0517E9; Thu, 24 Sep 2020 17:17:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7DC0517E9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1600960689; bh=hqMv1tVBOR4bzIMIvLbPKESv81fuDg5ULRzIv7xQFTM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TTmmReyO0Qjpol+0v3IyRjusImRZRKBtMMjEPnXB6eSLt5KZHG9bES1jfO7G8yQbi cJSic4/m5AwvGMLh1z7+dtBY0KuhkwCbu2KbMynHZNBE5DBLQ0MYQdRPvaPx+74S5l B2eN9AHgAmbrM46K2Ehtn3YJY9qTcrIqJb5TyOCc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 38F66F80259; Thu, 24 Sep 2020 17:16:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1CC28F80234; Thu, 24 Sep 2020 17:16:24 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150082.outbound.protection.outlook.com [40.107.15.82]) (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 03043F800DA for ; Thu, 24 Sep 2020 17:16:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 03043F800DA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="F0oxZUoU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fM6s8iAVlbX8gghqCf7JD5KiCXxBRFzhFlrs+mgzay2weDtJFxDMZuknsMIYsbL6cJBjH87VQ7HNCsORi7IwHh4LFyg8I4Uc6ZuWtAgdjZM0ofJw5PZk4g7h0ZIVy3LfPonb0pfxWtziCUDJ5jbWdQHfTTVqIKBlB8Ns+x+YNB4OWyReHpSYqI7Ib3Rccndb/bzQfQZ6XSEObKStBu5jxg1MKYdpbLWofwPnuSZ0eUbjfojFv4sV+EjECbP6eThO3tuRFRQaXahEOOcZzU10pv7WAmdQELdpTvaoGr0S0UTmzSUvOt1R+twModGoXbVrLyem5E8eyFp3uCBGINAokQ== 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-SenderADCheck; bh=F6DejHqzmPLB/44/ftIC2eYPqzSWQXU/L+RnJb2ovgk=; b=liSEn0GRgNygFTqadkF6UH0S4EtEGSOirlIbX4nAEIWeIClDWwak6sYYZKvSIP1U+PcqO78LTGUddWK/tARQ5Kp024n4kQS6V/bI1e3jxWJYo3noVap2CoxePyN/cl5GSX73lX0FJXG2dzqWnMG67OTzGxK62kDxkyg8D7D97Lvz5yRfDArn2hf3UUFo0YTfTOrj7xBvkdPLoZ+gHr/fC+GtTCDIl/0TM/0UtPgq4KvoxBRDvUdplOD6VHQ6wh+80mJJlrdAVVfEZ+UcAE/JzpMuZvgGlUiMgDjXBqS8lNtn0k/LDWQyLdxiIatnPNxkUb3kQs8Opd0N2dw50sbE2A== 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=F6DejHqzmPLB/44/ftIC2eYPqzSWQXU/L+RnJb2ovgk=; b=F0oxZUoUAdlREUPvvM1Qedg1h8JuFJMLxlW//AOIyHDMlUSkRZV/4p5G0H9bIWA17JEyrAEq2rDLT4SwsEtNNrSA1RSQ4Tz+Ow79Sa7xofzrF4qy8eWKO6IkF6KW+AyZMbFWyfR88Ubk6NIU8vpcTfvld3E2+7Pj3bHg+iYA4xs= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0401MB2287.eurprd04.prod.outlook.com (2603:10a6:800:2e::19) by VI1PR04MB3054.eurprd04.prod.outlook.com (2603:10a6:802:3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.24; Thu, 24 Sep 2020 15:16:14 +0000 Received: from VI1PR0401MB2287.eurprd04.prod.outlook.com ([fe80::174:edc4:7d33:9c88]) by VI1PR0401MB2287.eurprd04.prod.outlook.com ([fe80::174:edc4:7d33:9c88%12]) with mapi id 15.20.3412.023; Thu, 24 Sep 2020 15:16:13 +0000 From: Daniel Baluta To: broonie@kernel.org Subject: [PATCH 1/2] ASoC: SOF: Activate runtime PM with SOF OF device Date: Thu, 24 Sep 2020 18:15:17 +0300 Message-Id: <20200924151518.15841-2-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200924151518.15841-1-daniel.baluta@oss.nxp.com> References: <20200924151518.15841-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM0P190CA0024.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::34) To VI1PR0401MB2287.eurprd04.prod.outlook.com (2603:10a6:800:2e::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-103.ro-buh02.nxp.com (83.217.231.2) by AM0P190CA0024.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.22 via Frontend Transport; Thu, 24 Sep 2020 15:16:13 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.217.231.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 65f17ba5-2281-4297-a922-08d8609cc682 X-MS-TrafficTypeDiagnostic: VI1PR04MB3054: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:3173; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 333ZxwyKtUStToeFt3gGgwjaURFMzFUT1mO0dy8tZvvyGDYAKyo44oOJjzFe1wWU8fV6na9I1qPR5tlS/gtgcoqtLmAju4rUgW1XFwIH6s1qsClwIofO01U7fzsnC7oNXm7Rq7iltUwb9BTZV9hmM8nxPvEm/BedSiw49zcPs2NdWBoAPzF6T0E0hysjQnh3mR2qcbOIB9n6v1WoakJTJTGYpkiUuNgILGD3M0h+uiXbcnTmCoUbpqf+bg3xzUUWsDYM++cZupvzHNg7VvngT/6dB5SxDCve6Nd/0ibNQQSYU6IrtIEgQCQQVf6OecBGBkJ7FL0MZwPXfijT4ebnPbtKVp6p/gU428PbGe8QRNJkMdLLnFpAclawRLV8IARo X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0401MB2287.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(366004)(376002)(39860400002)(136003)(16526019)(956004)(66556008)(66476007)(83380400001)(66946007)(8676002)(52116002)(8936002)(1076003)(6506007)(5660300002)(44832011)(2616005)(6486002)(86362001)(478600001)(2906002)(26005)(186003)(316002)(6512007)(4326008)(6916009); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: v6FwLc4w4TiE0SplL1pmEp3XXtBD1JHCYnK3zfJILLKHpfvOVWh+j9qU+yrlOL4aXtJip8Bibjhcrs3PZ1tVjyutnWwxVD4YEgF/meXBLySDgtxlih2MBk1QWfsjlzbb5kKT5OW1xSDFxAxr2wQB/i6MQCawp+PSZSAXDOcjSXdi8os74fsc5gG+NDN73nzNKoPWya0kRJBt6GScaaOAWIr294GoV8Sc5ZYWDG/3Iie95l9KeZASOC80wAs2lA9LiV8A6e8UNyVlkJKAo7dA9MrlH/3aJ6tNUv4ngT3qtwJZ7AUY/XKeYD/WlzdxzgrE5fve2QGWEFncqqrg4g0oz16u7E9AovEfvhe5aAqTut+awDqOt8CC6Bqq8aDJeiayAvSMX9F/yTa7acSxju1gU6slpBpCvP0/U21T2SW6lYQn/j8uIqg0PynMif+n8ajpbSBGz0xexmvXPENZoYmSHKJkfT5uQB4BgZkAWHVrCXv8T9+fC2K3pXiBb8Ifwgxt9ZzuyJMYxKVApenyX/+oRCRAVv/TW1UwPRokcj7NJ3J2CW3DULGMaI6USXfSs3nF+kHHOPZXXlO7wDKrmMkcX4Hg9MuRgVujkuQLX4DKyaNS1Z2qR/q8KyQ9Iw3Fp24wkWlFnwgkboZDsezkY2fj2A== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 65f17ba5-2281-4297-a922-08d8609cc682 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0401MB2287.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2020 15:16:13.7900 (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: Hv1xRYyO3SjkXdZtpTSCQPPcXQRiUiZ1FL6jy3RFEsXzT2V87bw8Fx/6EQYh0SKjO16XKp9GqcSGenQhD0uidw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3054 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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: Daniel Baluta SOF boots the DSP at probe and keeps it up all the time. With this change, after booting if no one is using the DSP the SOF core will turn off the DSP to save power. Reviewed-by: Kai Vehmanen Reviewed-by: Paul Olaru Reviewed-by: Pierre-Louis Bossart Signed-off-by: Daniel Baluta --- sound/soc/sof/sof-of-dev.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index f492c5dfa659..de9acc0e33cb 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -56,7 +56,11 @@ 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_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) From patchwork Thu Sep 24 15:15:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Baluta X-Patchwork-Id: 291576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3EC01C4363D for ; Thu, 24 Sep 2020 15:19:01 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 5CB9120BED for ; Thu, 24 Sep 2020 15:19:00 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="mrMK0AjS"; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="Li7cX8M9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5CB9120BED Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oss.nxp.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org 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 9BD9117FA; Thu, 24 Sep 2020 17:18:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9BD9117FA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1600960738; bh=a+eKwPfYW+BnTIVJhbFwZiYjNNcxR8bcLUvMxLttThM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=mrMK0AjSdeH0oeHjrfZbVhUeBIGnSWfhbT8PVJDGBiiNUuyuwB6AuWdjPmAxFzK5W fOMoh/rVY0JHr+CxbpTRgoDyxcWJvhmsSxsC6UV7GClTiSFl0yDqb+lxr5g0SGIhcL sVMaofZo0nNH52AuZcHHNMOyUtZY5qQ/QEdu6loY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 567ACF802DC; Thu, 24 Sep 2020 17:16:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C65D8F802C3; Thu, 24 Sep 2020 17:16:27 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150082.outbound.protection.outlook.com [40.107.15.82]) (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 445C1F80229 for ; Thu, 24 Sep 2020 17:16:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 445C1F80229 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="Li7cX8M9" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TMvSr+zrSav9dVndrYMKJF8Y2765rfwC4z8PIgZYDp6OCyiFa5yHhTf6H4/DQ9unDDY+vjoy6rVcy+shGI7xMv4WzTvhz003EqLImEf57Cc+ohaHSTWwdBT9R5LSJzhe3AI7ktYKO3ouj2uHFBnVIHdsc1eKgiA8VQ3tNMWjq1MNwo2yD21iBNYZ7flfG+xfA/donsghYOMAg9Kl2J17YTYh5l75VAOXG449u5q8QV3VowGJJeFAWFknrTBdM7rdftnpQN/JNBOeagQjU0Slx/9PbA2pNGkLwJ2cxUzXo9ADTT349wN/OWUCy7/AqPOikCjenJtwlinEbvfHYy+RRg== 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-SenderADCheck; bh=IyuIaMcl3vA/atRAyuqnrUtp/MpKY/7LOwS0i5O7ibo=; b=Oagrpik0EfOeZqsLrIbAZUlIcEtMWI9WSQ5I7CaR58yuQYOW5/gHJ996T5X3hBNkCPLf06nW5LFVrTIUh4KEwuZEwEOlr9R3DkY1QAAp7BJUAqK3RTBLEH4AZOgKCrUJPty/MjNbYUACYxfPkI4muMdh1BLdciaR7s220JmYazbZbrJZyEtRAcx+/CVGOzaZVrzs77htVsec6Llu8MKlCR73z4NEj1GrnWDO8J1yFF/TRUBBAYYjnvaoYE6udgQ7UGc/6Y4tZ3XqX/IP8PUckFDm7W/bqRnI4C/gN/1qdHlNjHY7Efrwq2exNCuctPXS/kBA425SV9hjm+OA0vy+ug== 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=IyuIaMcl3vA/atRAyuqnrUtp/MpKY/7LOwS0i5O7ibo=; b=Li7cX8M9DSMSKWGg6sAmII3u2VTbFiuV5dmxDULp2TEv9T/ErDxkdY9cjzNvy70uch1KB0XHUNxRFjKNXQTlrOVRKVogLZkDab2sdfOkcSRHF3EmxQoNrpoahgkX/WNXf5ncDhi8AunVX4ktloQwTblP30Lx1ze5kP62s0kL0wk= Authentication-Results: kernel.org; dkim=none (message not signed) header.d=none; kernel.org; dmarc=none action=none header.from=oss.nxp.com; Received: from VI1PR0401MB2287.eurprd04.prod.outlook.com (2603:10a6:800:2e::19) by VI1PR04MB3054.eurprd04.prod.outlook.com (2603:10a6:802:3::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3391.24; Thu, 24 Sep 2020 15:16:14 +0000 Received: from VI1PR0401MB2287.eurprd04.prod.outlook.com ([fe80::174:edc4:7d33:9c88]) by VI1PR0401MB2287.eurprd04.prod.outlook.com ([fe80::174:edc4:7d33:9c88%12]) with mapi id 15.20.3412.023; Thu, 24 Sep 2020 15:16:14 +0000 From: Daniel Baluta To: broonie@kernel.org Subject: [PATCH 2/2] ASoC: SOF: Add .prepare/.complete callbacks Date: Thu, 24 Sep 2020 18:15:18 +0300 Message-Id: <20200924151518.15841-3-daniel.baluta@oss.nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200924151518.15841-1-daniel.baluta@oss.nxp.com> References: <20200924151518.15841-1-daniel.baluta@oss.nxp.com> X-ClientProxiedBy: AM0P190CA0024.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::34) To VI1PR0401MB2287.eurprd04.prod.outlook.com (2603:10a6:800:2e::19) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from fsr-ub1864-103.ro-buh02.nxp.com (83.217.231.2) by AM0P190CA0024.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3412.22 via Frontend Transport; Thu, 24 Sep 2020 15:16:13 +0000 X-Mailer: git-send-email 2.17.1 X-Originating-IP: [83.217.231.2] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 84747e33-b4bf-42bb-74cd-08d8609cc704 X-MS-TrafficTypeDiagnostic: VI1PR04MB3054: X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:1227; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nf8CRnzRGc7GuHo4u+gWeurOzJSdiQHAb4fsv5XYWDzrGuH4yUF+CK/o7ZS8Y9yBcGhs8UowKt7bfx3bngr8QvIvfjx4DOMG8SzPWCcX1Lp6HyGnemd9o0c0rjKp+frdZIJ/RLxNXz/UL9NI/XmsL3ou/DGEe0unK+VUehsOBhqboIaVaA7jPTHddoDR5hZVKxM8/pvmLnrLUPfXIK2Jw+jyFjc/EHriHvFrn10p1LY99uJGau4XYYKVmlm44QOZDeJHqAvd7HykSn7UulTVyYvDnbxT22e3r0iaB6X88w/vtqSIGGE12l0Gkh1CXUJQ/XctjhkEF40JpkwhGor8ie3laXf9gXIa0yvS5RaT/AZguV/ERMlGNUHP061eK9jZVA5ut0GNezoOajfMxu1Cgjzn0fatp4z5JIdwNiKueOw= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:VI1PR0401MB2287.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(346002)(366004)(376002)(39860400002)(136003)(16526019)(956004)(66556008)(66476007)(83380400001)(66946007)(8676002)(52116002)(8936002)(1076003)(6506007)(5660300002)(44832011)(2616005)(4744005)(6486002)(86362001)(478600001)(2906002)(26005)(186003)(316002)(6512007)(4326008)(6916009)(142923001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData: 1n1NXHB9jakB1UBmjjv28sI3LSfPfjz527eUfOPfbYMc8RmukQtnv1+/dWyA1cTiO8ozlNnzs3UkZAnbJ6JX40not7MXoWBZA4N/mlOu7sf5qyCbD3ylprXgM2e3dRaQrh4xUlHRzhmuUwook6XqLdv6HDuIZfslRYSiiEhHG7S6w51/Uhzxlm8xjZAyv1wEO0oGOhqkCQBk8/zyWhOWBd42Yy8VIkTJCkbhP9Z60NgkJNFJs58BVWS5bxrtSTMHwMLoFoBQnl1YFVaCnh1nz8xo4wR0AGCBQWB5pgpETqejpSuEDdpWzEZVk4s61sbolAWBY3AWIqGcrzNGmnMNSFL82LbWkt4KXn1mP21FavyNC14YjwBLCIVmgPQuoj1QZ0kuZTUUeWtdlKNMV4W6KuDpOfNS8dNjdr5ZJwjgri2ItH/LlKLcFRq8R6M/XLcvFseablLsgHYBFPQlBqa8UMBJTlvxui7YAFgz7OpNICBOjJ3cl21nGZWHcIse01GROr++MNE524MrDrTyw7ks46xFXQMQXYm7ryLoco35F5P0pWjviZelRxoLrORft63w90eK8XTUhOCsX9ZPV4DhWnZniKWvxuKctXL4vhoeq+fIwbsSpNM5vyEThslIDS/9Tt18EPh3CgMTJqQpmPsnGQ== X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 84747e33-b4bf-42bb-74cd-08d8609cc704 X-MS-Exchange-CrossTenant-AuthSource: VI1PR0401MB2287.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2020 15:16:14.7056 (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: 9C83L4g9b5A5BxlM5RXzu6VJnG4lWlzBXBiUJYrZliBFzEiqNIWrGAAQn8oHPPYx/Ga81h7bBRzWqyyTHqhZHw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR04MB3054 Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org 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: Daniel Baluta Use SOF defined callbacks (snd_sof_prepare/snd_sof_complete) in order to update internal SOF system suspend target. Reviewed-by: Kai Vehmanen Reviewed-by: Paul Olaru Reviewed-by: Pierre-Louis Bossart Signed-off-by: Daniel Baluta --- sound/soc/sof/sof-of-dev.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/sof-of-dev.c b/sound/soc/sof/sof-of-dev.c index de9acc0e33cb..85ff0db88eb7 100644 --- a/sound/soc/sof/sof-of-dev.c +++ b/sound/soc/sof/sof-of-dev.c @@ -46,6 +46,8 @@ static struct sof_dev_desc sof_of_imx8mp_desc = { #endif static const struct dev_pm_ops sof_of_pm = { + .prepare = snd_sof_prepare, + .complete = snd_sof_complete, SET_SYSTEM_SLEEP_PM_OPS(snd_sof_suspend, snd_sof_resume) SET_RUNTIME_PM_OPS(snd_sof_runtime_suspend, snd_sof_runtime_resume, NULL)