From patchwork Tue Nov 21 05:25:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 746069 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 646FCC54FB9 for ; Tue, 21 Nov 2023 05:49:04 +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 7B4B0DF6; Tue, 21 Nov 2023 06:48:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7B4B0DF6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700545741; bh=8OifkbIvwB/v81M4k+v/OrnyyqucnEn8gLaOo7Gq7iw=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=pu7NgtOeio/oQQnvoewLd7MCK7cwJSzlK+/cBz55WCOgeERkUX1TM19VH0RDnqewg nrQ+4J9fYbFIdgeBckgPci4L+PmTB9EsEzTyCgF/yi4c73gpfmJ+gbMqvcaswz3gVG xlOg0maRsSDmYnEe7+KcFhpKR3K4vH3F40yvPFOw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3E653F805C2; Tue, 21 Nov 2023 06:48:29 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B2B92F80588; Tue, 21 Nov 2023 06:48:28 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 503BDF802E8; Tue, 21 Nov 2023 06:47:35 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on0627.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::627]) (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 02C32F80166 for ; Tue, 21 Nov 2023 06:47:27 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 02C32F80166 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=W3U1NYMX ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lT6k3yIG9uhzIVyJXhHWSEwj+6RiNGi1PZuLQoehLMAe3lBsFEwCkxqKVS9yf44ty+99iE+TjXosSnzMsMcdf/r/HWstOFvTSslrPdmYjNEXHF5FMIdBJQvPv3U0tWwZysXS0J9eYRiLCbFbrMnSO8KDyqyxmZ1Xzs0RpwxRcymYdjh+16PECB+BghwEBXO5rAWxtOdOZIissCdbQ/JLUEqy6oj2fU0kTryADqm4CgiwL8bJrt9juaoCailftYbt/N786gIRalUpaf9ziP9Dw8ZZ5TMK8WMPcKTiCiDyA/P4ALPZ8Sda1Y08HUOSSjViKcqBOMbDY8Zb8DyMDMyPOw== 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=oBxzKScwpsOqEpewethyKY1noRZAj5cDJaCj7/Qjc+g=; b=HUsMBncYKC+tFEvJK07B0uClGCCaRKniLzaT4H+Nodzs04gUPnvL1gUWYsl4c7C8i+3v2Lz4z7e7RU3RWzV5HSeqpOCQrG2m5fs3HlumnwC1KOajqA4DO07uPHn8SVeWDJchosfQggEMtkIIJ6EeOk6cJZNZRHCmRHRu5t6JmswmtUba8aXllEo4Mjf85C9yfCBYAQTWo5PIHzr70uV9PRsDy24yiA5bPGBqYhJbMs5n2IRxr5+hMJLMVunhlSzXPxgnMRH3eNUqfsssK23DeA1AXGHX0OrDo4Dj8PFqk8MQO7FTAH70bRqu7z5OUiqqFHEQ6JrWi6qzAzouPbT4Yg== 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=oBxzKScwpsOqEpewethyKY1noRZAj5cDJaCj7/Qjc+g=; b=W3U1NYMXKQ4cxccbk2U1OFQOtr93jkutSUV8PNsK3fdUkbHSvz42QCSsqfO1BQD9kTWs70f4vmXJWIC+5ZQdBbV1o/ClYWsRyejAeuhJwJMQVW6xh8eDrIXhC6dTYfntxCntdG2vaXq/GM+L9YsBY8zhG41vEqiq+0OzMKfeOcY= 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 AM7PR04MB6885.eurprd04.prod.outlook.com (2603:10a6:20b:10d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.17; Tue, 21 Nov 2023 05:47:25 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::dffc:1d:4398:7768]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::dffc:1d:4398:7768%6]) with mapi id 15.20.7025.015; Tue, 21 Nov 2023 05:47:24 +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 v5 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend Date: Tue, 21 Nov 2023 13:25:11 +0800 Message-Id: <20231121052512.20235-1-chancel.liu@nxp.com> X-Mailer: git-send-email 2.17.1 X-ClientProxiedBy: AM0P190CA0018.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::28) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|AM7PR04MB6885:EE_ X-MS-Office365-Filtering-Correlation-Id: 31d868bd-7698-4647-264b-08dbea555650 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: B2zN5h7j1W2A7qjGRSArje5qKL9qwsET+wlseqX0YBM3u71i0bXWcNuxByE62zM9dil1ER0+Ol25MGgbQkF+7t1rCStQmKZJdHjV7/GAjq2VWVlLRlsNQvzSomyj8q5T1BpeI1QZWyNmLmXHsdz6357ecjvrsZSfiOauePoUaL27V/VkntYE7MyhJ9mw9XKEH/Aie0ONOT7H+Cvt0iPJlUb7R1kCcMRu0jc0M38bno5d5iHl3w63xYlrgr60nj+NOeHmqBKjbGFkamSmbQQ331M9YV3UrotXjatYAy72AeLet9ENpt4ULb5qhpFjMz+gcXamQGA7r3RNTsx8494vCaz3ADG+r5Z3rOAaCjH4Axt2g8dDWGK5bf4tM1OzM1zRewbcjP3JH5RWuQPQa1XYr6OotEQomofzpmaeZo2gx3D68D0ePwkPn3Vms32PTp5GSqCu7/SqNDuJps8Fd+KrMgqKStitrYMCp+ui/1RNthyKQN/mY75X94CiHFyiirL63hhA5L7ogt+MCmMB+TqKKTbyGjghz9rd2zZMzpdbnYUzlwPEbFhyuuDHqWMVTVhjveD2FiMpsXmKlJvdgt/L2CkXE/6z+N2AH9isDft+MO/NfbbNVbU33S2gvS1Gi74mdaaNIXz4WR5D9XEeaSKycw== 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)(366004)(136003)(39860400002)(396003)(376002)(346002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(316002)(66946007)(66476007)(66556008)(6506007)(52116002)(36756003)(6512007)(6666004)(478600001)(2616005)(26005)(1076003)(6486002)(38350700005)(921008)(38100700002)(83380400001)(86362001)(44832011)(2906002)(15650500001)(5660300002)(7416002)(8936002)(41300700001)(4326008)(8676002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Bf8CpCisnhkTYA+gr15i9TBvTfEz1V1CYS25bln0awEZlXvo0KFFhfHwygYIcupB89V/ieO3VO0jrMnnQXXr2cjdCo+dK198ahMNUEuGWbj7wLBhXjOnW/NoadpSWHD9FKuhXfz/IASKvRRrHpxKwHs6fUR4HvvZcq2FU+mw600cJ14CBLTNBb5MpCZx7zXilEK9dpQEO/P0M+Us5WUmflVLEKiF63iDVDgyejRUQrYafv/0htjJiTC6cnhVPnYOUaJILJWGoCcvQnwsCLtpib7BJPIaDO6LUIS0nNZV2uXPnmEcjmrK68pNDom/mDC1uiEK6d6sara9lBlQaThJvixt/hW/HHOy6GX/uWL63QuB5DD2E6OXkqE30WAZloplfUmjRM9HuRKuBtfY5k9obwSt10xPSUyUMgCPrIxB+f0u8cJBus05vNXVUCeGvMjFs3IzBPMLNc8ISCiRVDi+gL9Td1anmsVLlZxLANBNYZjyjrrj1MQ/Z9X+v1rxvcyWkggE5rpo4Lq2tBOeUwxn1zvttyKcRafUsgwKsgUB3G4ifpe2dTEzip2r+J7zFXqDTZG6wshW6yT7OlAOqv+KMs4+uatB77/JhV0DY7YaiGArHFVLFcczQVpEfgnqIaT+JFqUKZ9i/4taIn0E7HLwSFTXNNdrf1XLwiJa1J0YYbdZCroAVYgEE8x8JkteEHtodNowO46tNy4pxfmGGJMEVhTTj9bumDXJSuXtr/zYVdDc3JgK5bZE70LEegDlw3S25NMDeSF5voAwWxPZAq8/oXkQes0KkdeF6o0zw83kRECUG/iCvcBZf0ID5QUXslqE/NdxwTJI5gBnyYAZZjDqvXJ7pruIyFm0m/+eJBNa0C9aoQspZgLsTJBR+ofzNQmYWFVj8LkeMCjGcUG/KpbE5UDkOspsaegeeBllIoBEhIm52GsYo18VRLH59Krx941k5dpViquBMEyp0OJXyP9UlGMsmFWCZmYSOCzq2ynmFq6yCL0US5WIbG/o+yDUF2NaC6J8ziIIOg0yxlq67fEibAIFg2+lS1OvhPLv8n/w7Wa5DyX8ax52DJBWChMThdmnRcRkk9beFS9a7AVpjtecX1FeZxJCpTvLNRMQRg+pLTmhnJ8X+hq/LHTZVXaZP5svPo3O47XhgBYO+PpkqiZqzS3JDMnr9k1MnqZluuAGI7CpZtVpreF8zlhhy7EAYm5QNZ+Jw9Mq14B+PQeRwGTit8HGCyXarLeId8hSjLRPEIJDGAOuvIXueOYcpJQ4wlcFARQMkESnaQrbITaDwJrPLQuXA/7MoCq+HCf4joHKxbrRq+TWDo68GemKtmJ6GjRcWmzhdR+QidJS2jRWY7ff4mlDZSDiBPi/e3TDbcfuvvL1a4gzdFN8s1sIfh84XfVeIvtGiNIDmNyWf/ZPX00JI0XphUWRfOsetaqi8gtzSPvIw5A5GQE+YjudOcN4gRfrF2amWY2fIh4nJJYziVBxOnIvOYcT2lIZtTq2P1qL7Vdta+jI/kPWZDzYwekGNk6CpJKvqKOan4HLAXmSlIYgSf1Wi1byF//bqdr/yd47iENAiMultr8KYvQYPcSlUpO4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 31d868bd-7698-4647-264b-08dbea555650 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2023 05:47:24.9002 (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: 7oZFEkkm/FgAgevC/qpdsNG8GpfUkYqC+dVM2pZMQenv4OehKjNTOLVp2CpDJNuhWZXBzZFkZ1H8s8+zSwZBdQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6885 Message-ID-Hash: VXHCNWCZXZRSH7Y2GDOSR6YCMB5MVZQ5 X-Message-ID-Hash: VXHCNWCZXZRSH7Y2GDOSR6YCMB5MVZQ5 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.9 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 audio sound widgets which are marked ignoring system suspend. Paths between these endpoints are still active over suspend of the main application processor that the current operating system is running. Signed-off-by: Chancel Liu --- .../devicetree/bindings/sound/sound-card-common.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/sound-card-common.yaml b/Documentation/devicetree/bindings/sound/sound-card-common.yaml index 3a941177f684..721950f65748 100644 --- a/Documentation/devicetree/bindings/sound/sound-card-common.yaml +++ b/Documentation/devicetree/bindings/sound/sound-card-common.yaml @@ -17,6 +17,13 @@ properties: pair of strings, the first being the connection's sink, the second being the connection's source. + ignore-suspend-widgets: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: | + A list of audio sound widgets which are marked ignoring system suspend. + Paths between these endpoints are still active over suspend of the main + application processor that the current operating system is running. + model: $ref: /schemas/types.yaml#/definitions/string description: User specified audio sound card name From patchwork Tue Nov 21 05:25:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 745737 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 CF6EBC5ACB3 for ; Tue, 21 Nov 2023 05:49:14 +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 151E3DED; Tue, 21 Nov 2023 06:49:03 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 151E3DED DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1700545753; bh=LxOMVZ8yaHqrbl7TyIZLDjk7p61CEtDxc/POWZCbvrE=; 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=iqbg4KdZwSsuZB28gUqf4T/bH2X5ZrRgYF/she4Vl6/vBy3Xi9DxYpSllzBXph0VN nGPUmCKO+8AbgzVvrH22igULpvVsxVlDmt6z9Y6p4DINmVoyoLwqEHkVnlAa+YVDyz /pdZlfLFFP6z6Ujb/SMNPBJXlKD3EkD3t8IzDjIY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id DA65FF805C1; Tue, 21 Nov 2023 06:48:32 +0100 (CET) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D4FDBF805C6; Tue, 21 Nov 2023 06:48:31 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 6C74DF80310; Tue, 21 Nov 2023 06:47:41 +0100 (CET) Received: from EUR01-VE1-obe.outbound.protection.outlook.com (mail-ve1eur01on061c.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1f::61c]) (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 86895F80246 for ; Tue, 21 Nov 2023 06:47:39 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 86895F80246 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=roS91s+X ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eW4DbDK/fk6UIN1u5dafg/2DSovJKGp8xcVNdb+bXOIF8bM0gD8QPGakqnAt0thvGY7abbue5k0bt8WwLjvWjqBOaFkevn0+MP6CtpSArBE7tCL7ka+ttuXPXGyZUi8q8x//rJ9NcmKcobcuRjoDthv6qKRxK8UT+RaIAPkqEvIDu59SYyyJS2k7BhU/cL9Ic6bh7mYtedgoCDLjeWZ557mVL9W8bxYWUCLlUzNzv4qPagGCaaosXS7NBRRaoNTKD4F/xmUDr/s6411FX8Chl7tZjUTIhl8FIA8R4hOIVMsnBFRJT8NDQHxErTGnspg0oe03d3IpERfz1QEZNq0a8A== 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=AvwdRZBZwFSH2Kq2WT0Bk4fl8JUFhpKoqGheMfEKxnc=; b=WbaFCg8bj9CjICJOPTDqsUe6NnRX9AyKORTjzA4tk3skPDaxZbcHevE74um8KlaNfQaW9r04Xy45VVMj8M2QIR7qjjgl/tpSFMkrdLZvb0TxdskdOkNy6l/bHzCfJXtMZTUbLWkR0Vsb7gCPDSl4pKbDz+1pbIzZfwCus7kkaSPsOO2N/rukyxp0PP7G1Uvsr9o3c2t1Ilk7ihOMsWDgOqdM6LRIoWpvJ4Eaefrkqv1/hekDrdzPSVZHNWPVUjlvcbIsxMW2CrYyIytkbRtg+NDjvzYrf6KVJ3doxYcaSln3qC0eycbUiZb6ng1rYHGfeAuoz3xIc12FKO/YgN6EcA== 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=AvwdRZBZwFSH2Kq2WT0Bk4fl8JUFhpKoqGheMfEKxnc=; b=roS91s+Xkg01BnVFl9BnSunZo6KLqYaXavSH32PVM8ZI+WlILZ2PCMgIQRMY7i/ODR6XhY32+1+yyB+CTQzmSXNzGORkaiujOOE/WoKwhgIGQ8JF9clQaUS9UG1OOtzmaZlvlN/HTThpBwrynrcjWA32XoZYhS8kfsQMB00pzOM= 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 DBAPR04MB7270.eurprd04.prod.outlook.com (2603:10a6:10:1af::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7025.17; Tue, 21 Nov 2023 05:47:36 +0000 Received: from DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::dffc:1d:4398:7768]) by DB9PR04MB9498.eurprd04.prod.outlook.com ([fe80::dffc:1d:4398:7768%6]) with mapi id 15.20.7025.015; Tue, 21 Nov 2023 05:47:36 +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 v5 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode Date: Tue, 21 Nov 2023 13:25:12 +0800 Message-Id: <20231121052512.20235-2-chancel.liu@nxp.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231121052512.20235-1-chancel.liu@nxp.com> References: <20231121052512.20235-1-chancel.liu@nxp.com> X-ClientProxiedBy: AM0P190CA0018.EURP190.PROD.OUTLOOK.COM (2603:10a6:208:190::28) To DB9PR04MB9498.eurprd04.prod.outlook.com (2603:10a6:10:360::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DB9PR04MB9498:EE_|DBAPR04MB7270:EE_ X-MS-Office365-Filtering-Correlation-Id: ca0b9148-b1b3-4a34-791f-08dbea555d53 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: McUzxK5EFg/K0n5QUoLG7Cp6mlNTl5nlO8Ktf/XlrMjsYW2Uhf/D9I1w4Dz+eNHvyCrTK5NRKpjFJ7Q8yMEiY6xWP5v4MOyIx8YYkMfKQNxYMFPvUt/xjWGz+6J5qIh3jXqKfjnlTL2iGkdakwD5+2smLUwQLBlrH40ywY9B7qEzLyHWfAgKgDr3eMaVCI9CN2RwHNuxubIyTm0fzSAflJVWyI/akXY3gLtRfI8x7po/UrBRVV8CcfedoqFQ5lPoWHI2nGxkAtOxXf9mqBsWVMoRbab+ulqVwUnd9WRFdOFKp1GrathPh54bUmqvxPwl8MNE9bQMJtpZrjMEhkEKmgrfiHuRGEGNz9gayd9I4rd6vYPGXsnbKISEAVNHjseEFPCimklrR16JTBUNN27OdjxY9xjVdcxgVYSk8AWfbdRWQgCOaarmvKHqzIH7LqhelEa9KDPV3rOteiY1zKUX6K5F56/kMwVDXcfqkh2S3hsgGEwea/Wn54UiT5OlIDUM3uUnxMTVsE3vax/1HtQwDPJKw7ABnI5SIMQM03KIy87JcKUPcPNpujIRgpKlAuBkBX9tOoh25SjKCQPtBCuFn/wVbSIzaiR72AwHNW3+RcJJIZuk/P2EES+u38yPoLiNKgjQFosNix9Gd53MUhVUFPJXc4tEDqi6gPXipwNyhOk= 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)(136003)(396003)(346002)(39860400002)(366004)(376002)(230922051799003)(451199024)(1800799012)(186009)(64100799003)(2906002)(5660300002)(7416002)(44832011)(2013699003)(41300700001)(8936002)(4326008)(8676002)(316002)(66476007)(66556008)(86362001)(1076003)(26005)(6486002)(478600001)(6512007)(6666004)(36756003)(52116002)(6506007)(2616005)(83380400001)(66946007)(38100700002)(38350700005)(921008); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ACU7mDF+K8/AH3wWT8K/MOxx2JLqqMCElIuedtpRM0r3UkR6MsX89y/5fPaJusaU1NN8kJ5Ugu2PfyOruJan6nLTi4Zci1rNiWXA9UD84euoOjBuxuDmXnpkfPOQsp4GTxq0uxwbdBP5C3XnW0hYRg05V6lHJnepXVRYTaq+yOwSQBoyh8YwvaYPdUgU35HpMyEsbqlID2jBCs/l1xX98l8afBVyxz3r51YIalqT+0Mb0WamAd9WhAhlypL8E9XxvMrI1qdjYYOywJULJa6A0RYcIGbWreFR6Ke18Cx7+sXSu19KRmeQiBEP0mo5nBAiarZzbshBVcXr6NcmEU6h5RS3wXqj5dLda94jlxMPNi/MyecRN/THAcg3unQLeaFm6rbOjywBgstJ0S53AFiqwERlNg1zuZF8qA9jlcA9xeeaarKGK0PDkzGG6mK1atTEBhE7mVBH3CPE71/9IOJBcl5orypvqWsn180eZFCaL3iwlSGigKPT90D4yE+pwGs0VrAMdTPGcw/jE0FXhpQURH0HuJ67K8BJmn3eyCBqVzz/U0VZ50L9y5lSZDNDflp+d6yl3CZI8+NQ/sI43PgcVy0xZ2iunphFAqCMWcFX87hqbaK8Cvq161/TtWNB82/+jusfFKNQVnL+mGAC8gPVv9oERsZ2vljWkLq/NrP0LGwP5sCay0tpngFZGUJyb41hq5c8msv+LObs/n1vaiZYGaopRlm+m7N0OxUc95kXz8E8MyInkdxJNStYnydvNXVE4VjBgVR7Qed3eV4YND2FeffdZb3lWooLO5GIkgOB4GELT2tb5bvWr9yRyKuLZRwv5qwSeopRvpXlpiSchgYHj/TP/AMHOyqkhI+8i9ZCV2Ua00NCFKGWgUaFArvD10FB9nR7IqQyAUwRz0JAACMHNzZIp0ulSvSHFpy9dWB8Mf5S9fCnwQzreeqff1pjVKUtbpOy13xSf1/NdmyUxSZHzUc/qsGwL1iSB+ONqlDwljgruxxzWi1tqxjpgcgRXzn6/xssBH/Lj5scU/g5X+9fDkdZRoyYXTwte45yYtTWWtf3PKo22rcsTNw/ztTiv+Edv/pGb3/PwI/rrgOKJBT8J8xw3MHIWJZyNUmtq4+mCp7i1h8ea7dbRwaATmPIo3Wsi5xDK0HO2ZUfwgPe2/UM6VbGDTGahzcAteczGehnl0Lj6QeL9eR9Lpf+R3yoZ/9atsyXFerNIDFt/KdYnckpJtRwHK31M2uKjCYaw9K/5tuy/ighgG9caILmsbC++4I3zGSuRLTlnJ2IUw0qPa6qUePk9VnOYWEZN28dxp7pm0weuQhRdCBBJRi5FN2fE5+O/vqcLjvAW14DzPRJtLTA12dbCG8lbLfp5ZKjTOrkFmRV5BFZGPuyVtHiVzApEnPBD48WwR+8hpMASMzHd4Y4agKQdQ2Yxv4XeDjG8s7yu3LDSC+GK4HjOwF7F3Duji3AJGSQJDZaPBjs4XPJCxckgyDwFG+hLmyLQpvKu2n6ukMX7DMEWImwx2bakblcdC+kQIpInms+e58JADFfPRJwd+b0mXBec5cw1asRaDRf9C2oZgSuVgzCiCbLORRa7qwz X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca0b9148-b1b3-4a34-791f-08dbea555d53 X-MS-Exchange-CrossTenant-AuthSource: DB9PR04MB9498.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Nov 2023 05:47:36.6876 (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: VOSh7/GLFUjSOzzWue1oUm26fGVcGrXcVYTHuw9QPUwW+WlNn58oN6ub9A06qO3pypR1+QvWOt9/IK/U8ZbGww== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7270 Message-ID-Hash: ZCZ7TV4UZGUILC7BBFOX3W6KVOXR6UXQ X-Message-ID-Hash: ZCZ7TV4UZGUILC7BBFOX3W6KVOXR6UXQ 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.9 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 "ignore-suspend-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 | 61 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 2 deletions(-) diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index a0c5c35817dd..e5bd63dab10c 100644 --- a/sound/soc/fsl/imx-rpmsg.c +++ b/sound/soc/fsl/imx-rpmsg.c @@ -2,9 +2,8 @@ // Copyright 2017-2020 NXP #include -#include +#include #include -#include #include #include #include @@ -21,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), @@ -39,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, + "ignore-suspend-widgets"); + for (i = 0; i < num_widgets; i++) { + of_property_read_string_index(data->card.dev->of_node, + "ignore-suspend-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; @@ -138,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;