From patchwork Mon Oct 23 02:07:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13432276 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 AEC29C07545 for ; Mon, 23 Oct 2023 02:11:48 +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 E7378850; Mon, 23 Oct 2023 04:10:55 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E7378850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698027106; bh=UpV7uTFFbmSFjalSoDCeqG/PkvfiMjLVw0pwzgEcFnM=; h=From:To:Cc:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=KRuhKSPavJsZ29cPThZ/c+yrIjsvqyqKYLyukysycv7hWI1Brw7kIQ6ZuklNwFdOb 3Xtns4H3NM21/tC0cVPrpO4LjrQQP6rQq+veGOOocBgxCXbacJ/mRy6grKF1FIdkMi 69/u+U4b78P7Dsi4goBsoDqZ1paXJ/0TPFj+O4zE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 73829F8055B; Mon, 23 Oct 2023 04:10:32 +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 791E5F80053; Mon, 23 Oct 2023 04:10:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DB739F80527; Mon, 23 Oct 2023 04:07:57 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2062f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1a::62f]) (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 0F662F80053 for ; Mon, 23 Oct 2023 04:07:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0F662F80053 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=Aeus8U0c ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AzN7aKzCk+BDfNogfjJ5OuluEnhc79327g1uqRlLu2NIINPB4O47eOEqI9pgpy2AyTaJF2d2CFNoZR0TcZPwBkJfFVa+PzRH5ATD2i9ZInV5Vi/wO9v6iWc1uBYtfZE7SWdV+Z8NnYrF1hTmM/VXYR+qhNEQ+zWgsYWc+mfjGmt9EJEuKFxQScpTm9bCHskg7NTWLUJ2xehDZj6yKecD2efGRUmWAiufQASlTamKKciA16wwwPFwEgMCWXx5H4+peMuXV40WGtUUFJNV72PJ5t05R81zrVJMbHzFh+oHukkn4Ynl3ukruLjHkRtvgBfvR/aF3x/u3qfQ2R9Q/7UFMw== 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=f++g2rGtSQ4fZrJwJVrEOL5nHfAM9mVl1V7lXB+m2eg=; b=fAMTzJbckaOM80kRiY1GCv5cjnGOuFRU1Xly3naV93y8STf8mRsjSd6+iwyveak/fXeAo4aCAR0NVm0Amv47JVcHPuQWD9ABiEsUKxGgnattFoGkUHDzXEryVgwz4FJpRJZrxXpyAW6TvFoh0yyOlXlf3uqWc3vU8BezThMd1ioQ6xbOA4ARXErpZw6FXIzHk0R9W+tyvPWsm1caTAbaCdy4Rc2VmZYYVGy+LV7Ye0v1ProrceeRJBXDTgbRsMIJoDCNiNE7NEmOuEpbJ3ykm29At6eksFRHEa+4gZ97jTy1XtSWLiYrZBictDZJc+ReJyYTkxDorhf0DODukr8Lsg== 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=f++g2rGtSQ4fZrJwJVrEOL5nHfAM9mVl1V7lXB+m2eg=; b=Aeus8U0cwnlk/d79eLKlgbjmwCLbyT670m+g6RUEggYibyNreZVpi/+++77fPAAXv85zEodSGcXGj/OXjYu12jh8mgZ9FDU/20n4z+gxDpAfZFP9EkKmja4/YdHnLFJdn+X7RI04hVcxpQUcefLUdT0BiK7xywl8Oog8YKEn++8= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS1PR04MB9504.eurprd04.prod.outlook.com (2603:10a6:20b:4c6::19) by PAWPR04MB9837.eurprd04.prod.outlook.com (2603:10a6:102:385::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.22; Mon, 23 Oct 2023 02:07:46 +0000 Received: from AS1PR04MB9504.eurprd04.prod.outlook.com ([fe80::ddf9:e4b4:367d:bc06]) by AS1PR04MB9504.eurprd04.prod.outlook.com ([fe80::ddf9:e4b4:367d:bc06%6]) with mapi id 15.20.6933.011; Mon, 23 Oct 2023 02:07:46 +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 v4 1/2] ASoC: dt-bindings: sound-card-common: List sound widgets ignoring system suspend Date: Mon, 23 Oct 2023 10:07:17 +0800 Message-Id: <20231023020718.1276000-1-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SG2PR02CA0084.apcprd02.prod.outlook.com (2603:1096:4:90::24) To AS1PR04MB9504.eurprd04.prod.outlook.com (2603:10a6:20b:4c6::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS1PR04MB9504:EE_|PAWPR04MB9837:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f1c6f3b-d8e6-4656-fd1e-08dbd36cd98a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: UvSp8dQQrrb/bpmiRt3iflsef2hNGNaxnH1f1Vm2k0VHneXkLLtipP7aGdcFvGsOkYN/kXPa50p3RSKDCxi8Vk4OFT1401ll6lZ0cqcveFPlekMA110Q9vdCSxa51DEdE1yeEK9AfAXhBYUN4i4mTw/InUSxEmX+VFrVKqFVdfzBHu/G1IXg/kEvdmV/++TxUkcsY/bXTYrKGT4PJtlFEgfvgoezAdigXMWpkEgzKdU2nfNJLcAKWHVbPRUrKn19zLUJrfSl71B8HdjZCVEuJtfHa/Q292xJB4Z0bwYPXvaA04tryeMZ6ECaouOEKC2AYOhDZAGIY67ZNdxV+jPRYuApOdFACzoqPcIEZjPyRezmsV3LRtgaR1sW1xQGqpQHjQ46uY6XXJUuZO1M2zCHSxSdnSfiz274ljJCgpmwFtQUMl4en08K8F4qSICs+s0nTBvda3uKYnZ4H4JA7g4sRvd0nyyzDsdjBKkLIZC127EpZ3iRAYbw+xdBGOB7XSeEa4g9MFQT670tZvTt+vJCqdfL9JtTZ9/K18qkVZgVttyO/n5JAjnDANoJ4Ibo8DxZA3M3IggbLUIjK0tDT8f7u1cB3NxvwV5xtpgMJ7JfbUl6yI47ee36dEpDd0lvySPNq46iauTm3GLu87nlxcqGCg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR04MB9504.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(346002)(136003)(39860400002)(396003)(366004)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(15650500001)(2616005)(7416002)(41300700001)(2906002)(36756003)(921008)(86362001)(26005)(38100700002)(38350700005)(83380400001)(66946007)(66556008)(8936002)(316002)(4326008)(8676002)(5660300002)(44832011)(478600001)(1076003)(66476007)(6666004)(6512007)(52116002)(6506007)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nslUgNC66YvASx1H8VH+RAjT84x2+GYG4MQVPflLnZWQsysQndQiyv7H+XLHmcY8IGrLHTCu0d7TRXBDNGmf9p/DgTB2J0hc8P7lfK/rC9NQQYxIMgEyUgpiWYV6rRoEgRPDEtZpeiycvO47nMFA1x0geA9L6PIF3UBRhFR8+8GvHrsirt+75gxlbF3xDFcNOxiIRQMugm8EFcKqA3rYrXFZB6DQehfum2RAdHOs9EsNRzFw8VxrqjOk/Eb9o/d2uqyz19eR3TaMqpchOMWmpx/mS/LpBlYfO39xvhqbMbh5GXmgP+6PENgY1xgHqeeL/aLo8OmoYgMYpPIkmWeFiw0CB0lnbYzNg8teJWD25vxVKZrCXmcp45cFUwUQzNpmKeH3dsCzEpmvnCy31D3DNbR1OClnMDTtI9fhTW2KSNfAAkGLFQ2dIHfGkGRjXpgrs9mBhWvTv5dfbbyYOlb5UUcPSKvtod7plDlV15UfvAV20bR22Thz9z91rR8SArfzRhvKFx9QzjZfwExVPBjSyvJBSqYF+JIUcbUQwackirDbendxCqB3OFJu/EudvUdWF5/EknE67j31xyXaXPDppcBCtOV2//Z65sCDbJTCXuV8FmWbhQ49+gPYaz2n0l5HOE/BJ+SYSNuxtBCJq+feunVm9jigK/y25AGLjaMV0KfH39+RY2drXadyaGlzcZEBuoLToihggmbKbbTO/OfTax2mOaa5ARHMH0qofGn8fWS2wad0H2grPL3aX10bC1GqGsK562cZiaWgKqk2oxnixOxeuVAZid5uYTVq6jUvVPYJ68YrcWZZvcamC2JjNf4rDVE4asISVQeRwSQS+VQZiuuNMEQnwXMEhs+tKHddVYlSODxBvai0U9t4qRgfptDq0/Ycic15NM8EouH2W3DIP7QFetADmxN+nPDZV6Rcqz1e92SC2mnIM+zi/oCfywdu166sqW57/rCXaZ8tBxRkovwVVQkEC4k+X351oheid6hc7+ZHxYJfKrBJ4kgw2M1pldC1zul+iPplYQXrYJaTeT28ZpjljkOnTv1J99sUTUBnyAeTizU5K2I37wXViymXK4YwRBTs1TdHKrexscB1hH/SlCJVktjKox0j/90jLVjTqJIsZQRZvH43wQ/HX1QtjW66BtCvxSd4eJViyhcWCPloXBKRd1zBaY+4U+DZsLcPyEyKTsk0TO5OG52fdrTZL7NZ52gBA72Vu2voa2B3T1gzVVDN7ijy1Gij5xVa0egLhik48VeukcSvSFlR6XgCB/XhSY2kr9jNJmF7YE6N5E7KQjxEP8uon/yZ2CA86WBk1X5aLnpbaJ1EK4AqChCfop6WJUSmpdWrHdOa/EhVL98amb5DGrIryLsCBU1UDo0MZcKRZr0d7TYp81D74j3LOMks3boYf+4Ps/RtByCqg9mfIhvFsMnAeiPEVshLdynjrrdwugbGqHLGdQZvHrW//f/qsyOM+MdPKEBhK94YZgsABuA7CLm4JvEYs3dRmQ3XNAfqOzZa0ifDYtLFhsnzquX+Sr94P+QTfPhGPHENespgZZj+J2VrphdGIs3Y14ha8f03YcBSvzKsI1As+ZX4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2f1c6f3b-d8e6-4656-fd1e-08dbd36cd98a X-MS-Exchange-CrossTenant-AuthSource: AS1PR04MB9504.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2023 02:07:46.5656 (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: GXWoSA0vSbV4lnp388CkcJz8DFvZXnXM7bsPl36Ry6SGSZ+mGr1zjdsI0FQXOqJL2CNj5F1ZXixDSTGkVbtHzA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB9837 Message-ID-Hash: IVNGM67M2O2MKINELDULF4ZPNUHNYGMX X-Message-ID-Hash: IVNGM67M2O2MKINELDULF4ZPNUHNYGMX 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 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 Mon Oct 23 02:07:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13432277 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 A6299C0032E for ; Mon, 23 Oct 2023 02:12:18 +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 76F1E86E; Mon, 23 Oct 2023 04:11:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 76F1E86E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1698027136; bh=U0gegvUPMyTsZ/fTShWDtnF2D61cYwC6WTUCN8UNif0=; 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=DHBvpoXW+ZE4arTcLrrMhcHWrYezNygdTDkna9bL4sGKjPkS3PIm9afI848LNuwJ0 0PjFgBybeGsjv0LBgRhwk5OHoiTPihfqMt5AUl1ULv/DDpRQzG1ZcV1nCuGnIqxlm0 C+tNUOm+VGOFjOYZ4fvWCShJAJ0Hw75xTjW25l7s= Received: by alsa1.perex.cz (Postfix, from userid 50401) id AC40EF80570; Mon, 23 Oct 2023 04:10:33 +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 EC7C3F8055C; Mon, 23 Oct 2023 04:10:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B5A65F804F3; Mon, 23 Oct 2023 04:08:06 +0200 (CEST) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on20619.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe1a::619]) (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 43AC2F8024E for ; Mon, 23 Oct 2023 04:07:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 43AC2F8024E 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=Ug/XwqsS ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T8YFMNzu1AIA0DkU62PuxSezwbVESHx+4v5ct+2ru+siqEW4iCHEA/i8v1EJstk+BRFwZDA0XOi/9GH8xPJ/R+FLVXZ1CRq/4wrihsRlMCX18QWq7PMLQuceU8Nzt4XqyLgUhb+Z2tUmGErUE4U4zNkanarJLHjUgQVV+t4kxIzXZE6bq46Nvlg0+x50hGZ5yk283C/dV1uq41b6EynCMz7q5ihOXf1SuDqSrcDbatOLkwju/5RaLq1MH0zHPemBP5gyb1vpqBRQtRqqcRIBiNTPM6dctaeuaWvr46/5YGKZFLcvzzYqbDYRybOZT2th1a+CeaSpAxNtirKHQVeDTQ== 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=Z5vqGqGWmbk80w1TAHdGYnQK2KuxxtXCJoX8RGwyi80=; b=XRUjmqIXMufs3GMNO9bnD2sk3bfyy/nXDcCRmxrPzlGLhoxYcarEWIYiEg9BoZxmEFDn/1EIwHiKsb+qDGl3dk7V9pg7OZH89lq5Axw2NnY3TbFasHScCO6dhRf2BR6IlKn4X/i+POI8riixbQZ2kaHwmrER5OTF+y67mdJxXI71ED5Y/+6C1VeCrlF9S80otguvoHcQI124wd8gZxYgVpANOnLmowObwamOm51eND3aLsTtfBltwHrgFSTfwy93dm4rpRDwJ3vWdROkgbjP6XP1EISWnjGKqmcwUdrPz3KDrjVxvlEYnTpAjGUCso1SfX91/t1Ervi8YKI9vnwC8g== 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=Z5vqGqGWmbk80w1TAHdGYnQK2KuxxtXCJoX8RGwyi80=; b=Ug/XwqsSFZ0XALdPJVkbvJpn6iuO0M3tr1d4Obdd42CgrJBVjKNQrni1d3jyfUyyYKIiNCxgw36Frj45zEZk/6aZNWk2CYnRz1a2eNTkx3nBlzXYlbdwv36Jd/XWMo60OCH1kQGOFWTrFnT4MdxE3kHFaB7s43ChXdjCoOdHyYM= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AS1PR04MB9504.eurprd04.prod.outlook.com (2603:10a6:20b:4c6::19) by PAWPR04MB9837.eurprd04.prod.outlook.com (2603:10a6:102:385::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.22; Mon, 23 Oct 2023 02:07:52 +0000 Received: from AS1PR04MB9504.eurprd04.prod.outlook.com ([fe80::ddf9:e4b4:367d:bc06]) by AS1PR04MB9504.eurprd04.prod.outlook.com ([fe80::ddf9:e4b4:367d:bc06%6]) with mapi id 15.20.6933.011; Mon, 23 Oct 2023 02:07:52 +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 v4 2/2] ASoC: imx-rpmsg: Force codec power on in low power audio mode Date: Mon, 23 Oct 2023 10:07:18 +0800 Message-Id: <20231023020718.1276000-2-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231023020718.1276000-1-chancel.liu@nxp.com> References: <20231023020718.1276000-1-chancel.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0084.apcprd02.prod.outlook.com (2603:1096:4:90::24) To AS1PR04MB9504.eurprd04.prod.outlook.com (2603:10a6:20b:4c6::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS1PR04MB9504:EE_|PAWPR04MB9837:EE_ X-MS-Office365-Filtering-Correlation-Id: 2abb7609-bdcc-4778-64ee-08dbd36cdcd9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: iFguM+ilEHO4Bkfn5w8QzHdN+GY76nD9xvK4cwEh2esewIxSlPEsJfvJ9UgVlCOIOHA7QOSi0jA/Wh0oLY4qioeG46XdzfhVfC2VmlfeQtq/65rD869/lbqn684RRVrt+yk6U2GkJO/9Ee7E5eYymOPq2muuILoc/tGPMHv0Vi4atO6q+ap0c8v6ws6dCXuL7dHBMtmMlkD+E2oCqDOceNOQrRoeM5PnYrkkBZ26SbH6VFEeI1u1RCZRpVGyJyQnhHjN8LLZifWuUQ+8mSiQ35CfsUBQOo/0jbucjbL5XGZU5tGbV1ARyWN8ljcwddDpL0B5GjHv1IULRI94AgvDxwUpR84K0kPdwnPI6dbEEGTqrPhIkUaGduiO9e21BB9gZjLO4zoC/xj5zaf0LJ9rTXmvJ6ccCWKBk2rEdQjiLp/BVrLl20abpkXW1R7Vzbcjkwbst9PKkfnyXP3E3MzcjT0vYa39qj12oI26Qfx2Wv2+raIuoC742baAX7QSJAg/AuRWLwIWDDva//OAXEFmSxdwwps3aIx5NiPy8K2f/T0CVCggoCjB3AwTj197ngoH4RAGHSmMsxD1vlQbRr717QV1zmwTVgzILNZeBWJOx1NuPKqKK7t7TvjQV2W/3e5GUbqK4Pvw9mCbJcOXVZKFS3jfqLpD6bJM1h9D1HnBels= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AS1PR04MB9504.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(376002)(346002)(136003)(39860400002)(396003)(366004)(230922051799003)(186009)(64100799003)(1800799009)(451199024)(2616005)(7416002)(41300700001)(2906002)(2013699003)(36756003)(921008)(86362001)(26005)(38100700002)(38350700005)(83380400001)(66946007)(66556008)(8936002)(316002)(4326008)(8676002)(5660300002)(44832011)(478600001)(1076003)(66476007)(6666004)(6512007)(52116002)(6506007)(6486002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: unjxIcZVGEXBkBbsN9rd0st8ARUB7XGhwBMKH5hxMJY0dow0E8tP5pALhT2WlZbQ76E/23XE9xCWBZVS81qql5DMI/dvtGJgyKsAfW0Km4/lz7b/jS45zGW92DKABYLZBY9Y4mDZM7POOBEqO/NeiBg6DxgEDDUQ3YZZEmr+TTYa9v/Th8RYYe3pXSR83KvEYuMbyWY8KrP5TniFSPUiTGAPf5TKIBh6fSnbDFK/iglH8fIqneV2Un6hKNxCKtQ2LHGfGhg1H/1QtKhNSiSfC7IDCsVmmgAK/RUrKL6v1Z36a1Wu3x+N+VQk1oIvn/TIR62FwCBdiQyYGWS2O4GX9f67Ns4uhFL25jMLBYZZFCReFB8b7JlBCuyxGvOMrMhoCyQ24U/5NEWzFWbfhJE+WQOODh2rNvPDvfAwlzvylNzZgWIZ71fUHvBXuv2Oyx5Dn6vFXls5OoHDvpsR/d2USw9t6M+PGvi7Tup0e/ET/yKeFc1hYLnzE/awBNehVDbwIleQbv4V3WFaAH8FO9D5Owgz3i4lioivYMvg9rsZaKQF0gVi1FTK5HV0MOts924bcojmJe/GOMuNAXSgJT7/HWm+t0/eTK/bAZpy68M/1rynrVGn2/BJaIJOqhEPKzAYbAqeUbi4mwGklNJKHCyHPHt94bJVWpx6KnP5lohYh2BPfw7IyrbLTemjq6m7QxcoFRyeHw2DM/wKO5TTMau4UhofJgM0o/iglz3yG2PrNlG4dYMBd2zEexpoVRYyNPEmUcnFNGGnQECRPM/C6X/X9wsoJ1j6f/MIGjcxW0Ne5coSVlRMPaCzald34hCm/v1UE5pM3hvH2kwwLQaCFr2ENwvcuC+G/jvjmjncMGEyGwY5ZLIeassYuTb8TFoPdZLKDHRHc/MsTBScXiDA8RoItmeYMomn9466Hx1TYZnX/dM+SFjgiL3pCT60ZM7vjImKhTPsrYJLGGp28INqx2Qh2vSgEfD9TKCVnbw9mSmmma4y06+9Wz+Jt0LNr7SkCQHEWTq3ZahdnfdfMowoQV0uW2z50+ZfHDZqI6uZ8HRB1o2cSlTnOQay0XglvAHSy6wIUoSV/MOR76hYoYRogSQS51ZWe6ocxqacNXvtpqhjNxYS05nuNzCm3UyGyFRaeQrAFqoreiZHlQpWHtjirgk0s4ymnUvMiSK7a055Ho281G6LjzLle6R061w+djmDusgivBI8J9egbTooi3c3UNsWJdqKE67zdCExwNcgKqtWnV8UYl8y66QLXUMkV2WU6xT7IL0FUxW/Y0nVsrpzaBoGTJYUyiuoKpL36DzDuHDRAzJpQgkX1M4H3XNynpZiJg8iFhC+91TF9SOJpwm4en4Hk3ZAk99MYmcdw3mYsFEiwh8CYgKF7oP50TP+5QLSMVoDMjHy8yzzglJR2ekzjznf9PGmD9lixTcrzUXFiBLvubAoDscTzPeNf+SzmK9d2+7MlCsxDZMERJcslbb/n8trJ0WSuNlAMh7bfo2hFZPeNozMJ6CkcwYTigZcuopnr/qspxi3GUshvfgum6WEJFkTqtOc3QxXHiH4bRKjVSaVGlquOPL886Aw0+R9KdUYUcGk X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2abb7609-bdcc-4778-64ee-08dbd36cdcd9 X-MS-Exchange-CrossTenant-AuthSource: AS1PR04MB9504.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Oct 2023 02:07:52.0095 (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: Q/dzk7ioM7mrFW8RL4jefvYkQQhjDWKHBqOzy923EqwPf8jsEJhSjBFg41Uph9Q/Zre2dq+OZEYo0W/dP09pCg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAWPR04MB9837 Message-ID-Hash: SFHKPVGNALJHWVJMQB657QHJPY6MC4Y6 X-Message-ID-Hash: SFHKPVGNALJHWVJMQB657QHJPY6MC4Y6 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 "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 | 58 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/sound/soc/fsl/imx-rpmsg.c b/sound/soc/fsl/imx-rpmsg.c index a9324712e3fa..e5bd63dab10c 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, + "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; @@ -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;