From patchwork Mon Sep 25 02:48:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 726056 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 51440CE7A8B for ; Mon, 25 Sep 2023 02:53:24 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CFC7EA4C; Mon, 25 Sep 2023 04:52:31 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CFC7EA4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1695610401; bh=jeVUNKhSpJMRgtXk4eBsbRajs+iK708KfeG2ulE99f4=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=U4GCk/7/BVrFQEzyjid/r2vfotetTJDEQf5qTSWhPdKVqnxfdn/gFAoXi9XDsSK9p b1Q6BlTWsTuW630ndnViN4V6KTmGZ5hvfedZbzFBxNEA6x0Z2T1SDy2vpTlU1MzsRx wW80KMqlSs+NvWTGVAIe7GOJ7onbrsHT3mjk5jkw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 84B70F80558; Mon, 25 Sep 2023 04:52:02 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 00CF0F8016A; Mon, 25 Sep 2023 04:52:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8CB20F8016A; Mon, 25 Sep 2023 04:49:37 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2062b.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaf::62b]) (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 67F0DF800AA for ; Mon, 25 Sep 2023 04:49:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 67F0DF800AA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=eoaSR7gV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jQkp+qIpI4bGHnxvxodeSqlXE8QUEHO1iFcAeK8OfakvUfwCxvULPhC7fXjyWgcfhWjpfooJUydP91DmgiCOLOop6v/igq8guqax0aCh2NVo+VSNrl3j1SD20Gc+APcSv4qZNa+xz1T9dk7gh5so8NQpJF8OvAZWmjZFBM2EZsHwvBdzVND9H15OeWFH/KLeiw48agoSFV/KHgBIziVB8KRCYJmsZgx6uz1qmoNgqT0BiQHXJEv2ywBNzS1BY/li2Mn154hf39QvSrtJt3j9ITuqIUbXb6oe4o100ZyaAV8fg/PTVXoAPp+pOshtoiGnP5Kdb9rt/sCtWpV5DVpvZw== 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=Atu2yeOUMSdGg0Bv9GuZJULBgLbhni+7Y8Yt8KV6bw8=; b=YVmOzs25AFqnjCC936rXdKI6ZYNWWg9TwKDCKSuYwlr7cawWIPLWvkNa7yvIovFb8tjEYR78mIyB/L1RVZ8FlHwE52wmo4Ndgnk3pspQ66ICjUzj2OjCVeZNz29o5yKwwgy3oKs9Ddix+UgiwBthDBKeqg6ml7cghJywhyog6c9KKP8z5Czd0mG+76SkUd9dQ4Mqg9pSamg0w3HsvBh7dCVo0CjtwG/chjPinwOjUmbuQt8v06+XQ1zOs3TxqmxMli2WxZXfA43xt8pdgUPWcgQnDrtxQt963deaZEKtd8z6OZuD2jgX+c8NkuwnjJl6HJcltzQ0aAYhrXjXLOllsg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Atu2yeOUMSdGg0Bv9GuZJULBgLbhni+7Y8Yt8KV6bw8=; b=eoaSR7gVGBNd/0jHri4De5OKTx2c/+ZLoxcfOmtI+EBazQ+BSODDPLsKt0G/Q8yWVL7/eTPXo86tcR0M4CJI/ioDcdNTFrldnx6plCf2eecv3NU9qKjZ8y7RUzFBiFcPfe4sOJM3n5hO3i0X1Q5v+db+xo6Aa6d45qcPos8DiGs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by AS8PR04MB8232.eurprd04.prod.outlook.com (2603:10a6:20b:3b2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 02:49:28 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::51f9:b8d2:7ddd:c74f]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::51f9:b8d2:7ddd:c74f%6]) with mapi id 15.20.6813.027; Mon, 25 Sep 2023 02:49:28 +0000 From: Chancel Liu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Chancel Liu Subject: [PATCH 1/2] ASoC: dt-bindings: fsl_rpmsg: List DAPM endpoints ignoring suspend Date: Mon, 25 Sep 2023 10:48:46 +0800 Message-Id: <20230925024847.2971421-1-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SGXP274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::36) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|AS8PR04MB8232:EE_ X-MS-Office365-Filtering-Correlation-Id: 08cc7204-79b1-4f6e-a40f-08dbbd72094f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: i7JIQbjns09NJq/hZlGPCrmHr0oobaQiAWxDPbMKALdyTvnp2z4jjKU2+4KFsSp6pMualjzuBSMs+Zpv0H2grB/qVfYSnzbtgde0fIfRCQfQ+47EcrFRZrAfulhAiM7v6zyyw31fXtY/idxrmCLmon8uOnlyUCLi/LraGykyZmFA6GjNfyRlRAEV1fC7K3HV3Q30eo6RylSnhpORQCsg2eN8mf6bdILxluV7ZVV0HVP6mJtc3fnulBrXAqCi1kSzQmTx9cM3K3g30WPlIkVk5VOeamGA3X/pPhwwtqjruDnFjF2qC3OeaHinLLfsJ6Xni9llxdw6XasKUV5iyzoFFp0/gF7YwoHx8F30KYHdMK+dahg6HQGOWgEuX2iZkiQyt5NRra1N7Zqm1QBA2vovlig9m34EIBx2fDQ2FI06/teV75w8nlDPpmTPbblNneaFXpJgJTWRU7t59Q71zPgwCkKKdHTpS4gBvrrG+0n71F8PMstHeyr4qs1Ft+I4GnAanMGSkwBlLewsqlirbuiwjKNeFQh1SF5yfAA20mOyNk1qzdB3GTPqnLO7MRCgfCkjxX5of6M3CDADzsxoJzO0UcbYrPxpIuNy73XdbC/JP8AHGgyJLtE83XMc/6S8fRo3rk/dIze/ldaU6H2sMuI9qw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR04MB9498.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(39860400002)(136003)(366004)(346002)(376002)(230922051799003)(1800799009)(451199024)(186009)(478600001)(6512007)(6666004)(52116002)(41300700001)(38350700002)(921005)(38100700002)(316002)(26005)(1076003)(2616005)(44832011)(83380400001)(5660300002)(66946007)(66476007)(66556008)(6506007)(6486002)(8676002)(8936002)(4326008)(15650500001)(2906002)(4744005)(7416002)(86362001)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 4eZoP03Pm6sd57TIlBDgsrAt93febvjPfyxmtOYaCmB+V4ZvZWW0c2uWaJMHgvgO7Ee84gQgfcbSIQFUOO6Z1+jW43dvGCqxGz4Y8UKR2UX5l8TZx+M11VGf+AihQO8ofZRhIOpjIxjWxdv0668V/HPl9D5aYuZLr0j+mtj9qdBetAlFEuHNp0hjnJiscLrHeYVaFwWNH5KWE97eUtwoA1bMepUyzVPHXqFMJs7QikPVO4Pn0dArzHCM3zOJgMFuj2MMdCpvcuufTR9kRrgkTp41DbdBqesVFoo2wDro/kR8uyF8uOgjVeWJArpaxY/mZJt8VkPln3fmUTgvm5O9tlhOic/HLNSnPVeSB+5dQITsDeJNTLvuTyfTLHeDwVul6S5NjqnHV12caX4+FqaKVWQaoxwpX6SJVp3tEbyqeLUXyVQqHXmMT+lk8T/PNsQ01gCBENug4S/R6gXBfW2gBYFZt22eJOK86iC2quopopeR9jAIz+x+ksKVc2uZqu2qQDrCHp81LjEff2fGAzdR5W/8zMKvSUMp9QwhvJq1oTT528i61x2kZaIlTTj+zZO60aROF8oVIkedTHsAqnzRGoH/BLfDHndK0pqXZzvDpfxN9yzx0g0N/huAXo7lOwzDxdietSuFZsRXEAfpwQY/sYXG3x0W2MBG69iZe3gqcNlF3KX5zFYgf8YrT1UGVwUoQfnY7Hm+lAfPSsa6p0wOIBmxNW2LlqCmL5F4YeefxsnLv9KTPuyxa7tl6SIU1eUnuhesF665HkUdc+nI5lf1Nskw/ziIZCeeB1aWELAjlcZY3CR6+xqU4zpebxGBIfKcdKgnNCC3maz5KVoFFDUhzkzvolvZn8Di64G/de/ssOds84JHzbpFVcbLterm58QomycVY9Q+4iCdJVVPuZZDvl1OCTDRSJBqiFHgQ6zdzgIOEiy0pxgUsFwVLI8zjJe8qmHBMGWbVDogoJTGKHve2xY7kl4Re3uSuoU9Str0G0sZcF0kz/gbFfa6hhFV4oE8bmahPoU4qe4QXwvy8FXELdsEM0GoJXRDgw0J2cjt2hKSOul3DbUii7xOc13IfGy1DcL9IcoUo6eSNuaKMI9QWofktYYkptKaB9s2BJEeokh9a1nXRlGNOTAwPwwOjVt1/BIDN/zrRgZvdHSzR77x2ov9JtHnWFvnTsLvL9vGycRJFvnX0vra+SZWpoo+sx+vIoGreV3PlOgNXI9hqSnxkEelR5H84EZreW0U3gE67K8378XIAcZCdBN6jW8LrzRdIbxYT+R7Q5vCHxL1YUP+loQDGZScMDyX6X45PdY7ZTGsp5wx+RUN7bg1fvH2hKGnHwD3wD45dxYm3GwgaUuz6J8D2ivEC50CWsHDdFNEI2AEJRDCBsNvcatoNqC0K5SQqznvphJe3NcK/Hcoutp5CNJckgoOZRb26Kl6QaUnqovC5IDQDtCERVxYGjsuHT9qZkWHK3OX44hZJUGgaVZUFtgT7rNn9K0sd828GxGf03uMaoTUkUO9wicjEcV0g4jOXTwgDytQla+3PAP1WrZG5zwfQ/OQ6nQ3BRRBtfO0Xla/KQTq3BGJWA4ZffoM02uY X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 08cc7204-79b1-4f6e-a40f-08dbbd72094f X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 02:49:28.6031 (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: aTR/TjFBi3pWElb2xjIW1hY162F1/IC0hGMdODv2KuNLKEozymoBxeBc8AxRqo5LUMXURzKeNMoYCZKEfsm6iA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8232 Message-ID-Hash: TSYREYB3JH376X3RAHBDZH5B4UFUJG7Q X-Message-ID-Hash: TSYREYB3JH376X3RAHBDZH5B4UFUJG7Q X-MailFrom: chancel.liu@nxp.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add a property to list DAPM endpoints which mark paths between these endpoints ignoring suspend. These DAPM paths can still be power on when system enters into suspend. Signed-off-by: Chancel Liu --- Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml index 188f38baddec..ec6e09eab427 100644 --- a/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml +++ b/Documentation/devicetree/bindings/sound/fsl,rpmsg.yaml @@ -91,6 +91,12 @@ properties: - rpmsg-audio-channel - rpmsg-micfil-channel + fsl,lpa-widgets: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: | + A list of DAPM endpoints which mark paths between these endpoints + ignoring suspend. + required: - compatible From patchwork Mon Sep 25 02:48:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 728206 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 0F0DECE7A8B for ; Mon, 25 Sep 2023 02:53:46 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C5014DF2; Mon, 25 Sep 2023 04:52:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C5014DF2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1695610423; bh=DbBdekLsCbV9eNOM31pil4GLI02g0zIHqGp72KndrJw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=YM/TEf186idFRrX0wdyPsG0v6Gt336kCqBpDef1l+8Jt2gDGkWJy83HxnWk7zzxtg MXQAeRNTPTRrDFfZtPW3Oh45JETSid/+Tk0qNnVo7+LkPJqNZgAqIyIieAmG4VQZgK BYWe0V8BIopnZTD/dCtjBBX00Pj0ie9Kbgq+hou4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 08191F8055C; Mon, 25 Sep 2023 04:52:03 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 6B22DF8055C; Mon, 25 Sep 2023 04:52:03 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DAFEFF8016A; Mon, 25 Sep 2023 04:49:46 +0200 (CEST) Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2060f.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaf::60f]) (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 36507F800AE for ; Mon, 25 Sep 2023 04:49:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 36507F800AE Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=nxp.com header.i=@nxp.com header.a=rsa-sha256 header.s=selector2 header.b=cuu2YzNB ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HJvDcwgggC5mXY7iSwvC6qBmr/ffqkJU+nCE8fgbHRsnFNFhPfk9T6RYMZvdQLM/FKNbaB2kZHkLLylHCEGZp9IvKtXEy7PG+E5+PX51jADKaQDGDmVP3IcroLE4BKqTsmlan2HBwop2cTJHlE/CzPQQ8mCFnbyBNjZkONctRvk+ElghSN1n5dK7rns9ozWT5ICW0QmPSCaTvQf0sZzPww4jaHIBuUVca7dvHGhc9Mip+hY55wApcYlDHrmYS4OfIee1kgK4IQaYEoNJedQjVeBvznT+h/+c154ToKsWJgDjNUYuXyhrZ4iuXwkcsle02BxA5wiG+WQszoAxvdC9xQ== 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=L815y72ZKLd8Q6n13OC96EtIhZ75mN/FqznbXbkA6rg=; b=kXmAJlliFstQxP4YfGvMzDc3av2B0rpYrzYS8xykfJdyj6KOHGm4/9Lu1OcMQ46yTzwZwE+dt9LYBUK5z0MpIzGvS+M9S10w3JA1oSq7fIuCCTlBmWRsNK5YnR7XqVPQryIJhmoSSlDWk4id1LhW4Hs2Th17EPJ4Xd4YdfrY7LGFXZArl2k1ojtjF9iZjrYxrvJEANhSCJZEmw5JnWn2zsmU8LhQwQlbj6SGDm5e6G36wBhqSWzFC6OIP/Tg5Ogla9v/dBzwbsigt0AJ2vyopS9D31PoxRiAsleiX1lL3BZHd64avy6H4E22SIjAWWIqYr5UIZyD0JRld0WI5AoNDQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=L815y72ZKLd8Q6n13OC96EtIhZ75mN/FqznbXbkA6rg=; b=cuu2YzNB6GW51cMAAlF/rXB3zhwTrqy3It79FOT+SCGMVzITxxqQbTwDhbZhkV6a3zaqpaTC/4l7ZjUiwJuuvLLg4sedyUEtlcaWCDSD2WJ4+MdjcznzfsQzfjflLWbwjk/yHHrqfgEL/6ZowIFqh+v9W1mQOUFzZaBgshAdtKQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) by AS8PR04MB8232.eurprd04.prod.outlook.com (2603:10a6:20b:3b2::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6813.28; Mon, 25 Sep 2023 02:49:43 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::51f9:b8d2:7ddd:c74f]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::51f9:b8d2:7ddd:c74f%6]) with mapi id 15.20.6813.027; Mon, 25 Sep 2023 02:49:43 +0000 From: Chancel Liu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, perex@perex.cz, tiwai@suse.com, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Chancel Liu Subject: [PATCH 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode Date: Mon, 25 Sep 2023 10:48:47 +0800 Message-Id: <20230925024847.2971421-2-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230925024847.2971421-1-chancel.liu@nxp.com> References: <20230925024847.2971421-1-chancel.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::36) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|AS8PR04MB8232:EE_ X-MS-Office365-Filtering-Correlation-Id: d245b4e4-e2d9-4e9e-ab46-08dbbd72123d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: A93I2m3XNfqNq2imK78yIWNa0cKcy0xQ9R022nA1LuS7dlheaY2sVtmb2ZLxMQUAnVN/HP7LnuzOu6DMCrlHavKmj1zexpuUNRyPSXqpz2hODZXtqIK/WBqpExEwpEjrXyHavABtZDrDC/xjo/u4I0GSE45gErrfHFOMl2h9UUq9f/hwkZcQBEh9PPrT1auDk9Vs7R5qL3bj9eofGNytveqjTBQHZIKD001kP4As8Zgp9DEQtIuL5EEYJCto53lM3nGTDjdeeZH7Ow10edmNUb7gD6Me/y6IbJUNWAJt9JHITrniBNPDp7CSoriWDTbjC/jCreEMEH+6nYhHJIgZLno/ejcnkUCRZKjdnREDl1amgMGXSOVxatH4KDaRRADAU19g79eUIcRTzFx3OrAK1+ly02lUcJrxHQYUF6MjKoRvz3ido1HRZYToH2eDkHWpnifuZmL5aauOgLDhjdQ3MaSUYjMadkMFNrZXpz0VfldEuwCstZo9/g2kyb6xsHZvE41XkAdGVUKMq3VoHe7ezc+dY8Fn2vb5xVDfAx8WHrTuZZyYG0itm6ChxIi466JVm5j6ANPBtCJatVyGkZnK8rnzT+IRm+xqnSlmxmc1twFgOV73s0j5AtPlnMsVgk97v1HVpoXBXEmK9Wlwa2LFKuMk8MnvNxS0csrEYslE2x8= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB9PR04MB9498.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(396003)(39860400002)(136003)(366004)(346002)(376002)(230922051799003)(1800799009)(451199024)(186009)(478600001)(6512007)(52116002)(41300700001)(38350700002)(921005)(38100700002)(316002)(2013699003)(26005)(1076003)(2616005)(44832011)(83380400001)(5660300002)(66946007)(66476007)(66556008)(6506007)(6486002)(8676002)(8936002)(4326008)(2906002)(7416002)(86362001)(36756003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: oJyj8wOp0l9pHCMb0PuZjDe68pKVBQBjeU7XNjpkPtb4a3pHYQhVW7YBzDgWoAOQ8jIGeyQ9Fqj8yN5c5OqNDptuRV954V6MwmItDhOMim7Db4EqU/bzQDKGd4+0EURkHHquUH2Ok0efUEVs4d0Q6eiKPvjBZiAbXfXVnbVT1QMjl0cj03rTehJtKE+xjrLKqk4HcXXGCxp/v+0c8UVAY+PGaWEvvBs+IqFvU/s07qHEeqKoxNcIW3yVwAhIW3Om8MjBpkKIruO/J++Kzd2RS2dr2btlnIiNcGJZMmyt0sEbjp6YpTbSG9NFkJyBWQ4zlOsiVxJ5TaFLf6JF31O66PQcRj/82z3qC2RM3bDfPUIcxYDL+d02Y1eAVRR+XfxwA1bEq2R5uz/vnpSzxDkd1DZBHBV5v4oCTDut0QMbYtEmZr589HZMK2XfGCDx7sAVcieTbwBwvHZdlVAT7zNkSipci6KAFiZ8uvCglBo7JYd2GZk0gsqvB4QvSvNMomPnI7UWsx6MNtDmwxG2mkhom6IKqkj0KGvxZS+JOZ5QLEYYrtIUxdjcAJWMyJXz6caw2ExAe2CGeGvzHpYLTkx5gj7AC1fJsbyQH/IUhQxlkQdvWWgE/D4iTT2uIPgG4xocwKDgmXBT9Io52HKtAycQqZMmAiIw6q3xwl/3whcJvbeDb89Z5Jd0Jd2A4GB0RCtFBJ43sSXUaR2wxf0pY/60unDvN/5/O+EJlnMuq1t1AIyeZf6a71fjgp8E3cT9OhNIJCmFzlO6KdgulsbAmkuDhSJz6XJN3tEw8Z7ARa22CLUkmT46t5dfXnIrQ2f3s9hWfNdw2sn0Cbhr4QsJjG1Z4Ai7NAzTKeD/FK+TK4P00DzQi4jIDsBegOWiKsdLd1E12DDQLrFYZhqf8Ija6FAS3kvJhwLeNze8S4NvOIsQzefwM2qopgIJJTPZH2ZrDSWnrCHSO+bzZpuziYcmrsynNncJoBc3bBsfghVSD4pwlREKF7mIDsC/TojcKkY8AXuYXYGV0fYN5upMm5rJta2s985puwigO3wGqUpn0VIqtgeRMQ1DwpXQBiGfgJRCFIU5r9OTK+YW3fIcHzBx8J/xcmL2YIeHJkWfradW7ZJd6hRhd1lp+nmhAHF2mnbwJTILx48DdR6gH+/mdnwPtMjWh09n6GAWxtlYZtQI49CS1vz4vJsrhhqRJeBeEzdP7mTcnGn0OjWhIB4RdH/tW9LKaBgAz66UInQ2qOml4nRAkJvgOSChNe1UDd1hXNXi1jtQqWlNLr+TEgJqMIwAiq9GMnkR0KAYOjCSYzp2ldnQjWSpGYCOYjMeR1Qidysr/o1Y8HrIu9L7YmkKSg8bh+r/LG5dnuuh2uRQhErlqH6Ddy+XjI6IDeYo9UN/MC9qVS36YJToyAh0Yba7ggUK6WfSiJfF8vcPS4IVdfqnLjSn7CgZSV7uLZezWSvvqJX1gnzmE7Pbyx2MHSCk/m5R7f5OwEV8+m1lvxRxWsWH1Kuw9TIwBn4TNrH41ALIxVI08S/LdA9PGqTYgf25QyBMkgHk2R1UA6VysJVtrPPqzv26mVfsoiUuQ2zDNdQq+0o70gSb X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d245b4e4-e2d9-4e9e-ab46-08dbbd72123d X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2023 02:49:43.4517 (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: OMqaidMqB5DSOkwlW5ATRr2J9mYZu4tgZ3Ptxmmm7A9syRxJoCjlijzmwaXHlFh77gGjvyXEZiVQxNH/I7rWWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8232 Message-ID-Hash: QZE73JPNBRMCJAXUHJFGFRWOYY6XBQN5 X-Message-ID-Hash: QZE73JPNBRMCJAXUHJFGFRWOYY6XBQN5 X-MailFrom: chancel.liu@nxp.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Low power audio mode requires binding codec still power on while Acore enters into suspend so Mcore can continue playback music. ASoC machine driver acquires DAPM endpoints through reading "fsl,lpa-widgets" property from DT and then forces the path between these endpoints ignoring suspend. If the rpmsg sound card is in low power audio mode, the suspend/resume callback of binding codec is overridden to disable the suspend/resume. Signed-off-by: Chancel Liu --- sound/soc/fsl/imx-rpmsg.c | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index b578f9a32d7f..0568a3420aae 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -20,8 +20,11 @@ struct imx_rpmsg { struct snd_soc_dai_link dai; struct snd_soc_card card; unsigned long sysclk; + bool lpa; }; +static struct dev_pm_ops lpa_pm; + static const struct snd_soc_dapm_widget imx_rpmsg_dapm_widgets[] = { SND_SOC_DAPM_HP("Headphone Jack", NULL), SND_SOC_DAPM_SPK("Ext Spk", NULL), @@ -38,6 +41,58 @@ static int imx_rpmsg_late_probe(struct snd_soc_card *card) struct device *dev = card->dev; int ret; + if (data->lpa) { + struct snd_soc_component *codec_comp; + struct device_node *codec_np; + struct device_driver *codec_drv; + struct device *codec_dev = NULL; + + codec_np = data->dai.codecs->of_node; + if (codec_np) { + struct platform_device *codec_pdev; + struct i2c_client *codec_i2c; + + codec_i2c = of_find_i2c_device_by_node(codec_np); + if (codec_i2c) + codec_dev = &codec_i2c->dev; + if (!codec_dev) { + codec_pdev = of_find_device_by_node(codec_np); + if (codec_pdev) + codec_dev = &codec_pdev->dev; + } + } + if (codec_dev) { + codec_comp = snd_soc_lookup_component_nolocked(codec_dev, NULL); + if (codec_comp) { + int i, num_widgets; + const char *widgets; + struct snd_soc_dapm_context *dapm; + + num_widgets = of_property_count_strings(data->card.dev->of_node, + "fsl,lpa-widgets"); + for (i = 0; i < num_widgets; i++) { + of_property_read_string_index(data->card.dev->of_node, + "fsl,lpa-widgets", + i, &widgets); + dapm = snd_soc_component_get_dapm(codec_comp); + snd_soc_dapm_ignore_suspend(dapm, widgets); + } + } + codec_drv = codec_dev->driver; + if (codec_drv->pm) { + memcpy(&lpa_pm, codec_drv->pm, sizeof(lpa_pm)); + lpa_pm.suspend = NULL; + lpa_pm.resume = NULL; + lpa_pm.freeze = NULL; + lpa_pm.thaw = NULL; + lpa_pm.poweroff = NULL; + lpa_pm.restore = NULL; + codec_drv->pm = &lpa_pm; + } + put_device(codec_dev); + } + } + if (!data->sysclk) return 0; @@ -137,6 +192,9 @@ static int imx_rpmsg_probe(struct platform_device *pdev) goto fail; } + if (of_property_read_bool(np, "fsl,enable-lpa")) + data->lpa = true; + data->card.dev = &pdev->dev; data->card.owner = THIS_MODULE; data->card.dapm_widgets = imx_rpmsg_dapm_widgets;