From patchwork Wed Feb 22 11:39:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13149036 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 00C94C636D6 for ; Wed, 22 Feb 2023 11:41:57 +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 C2468EA6; Wed, 22 Feb 2023 12:41:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C2468EA6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677066114; bh=8TBDZH/6wMLqrhlL7era0XAZQ2zslsi9WKEBbl/XLt4=; h=From:To:Subject:Date:CC:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=okCzO89GEkWHzR/dfLVaTVBgj5zf1m3talZVrselkgfwts/RoCnm9lp4c1fT7o7r/ 5HTHBzj4q8IR01Hv34m40FzsO2fCAOmWH4jrcAOp9yniN0Fjq4I1DyZ+gPibucCRLN 4G45p8RmkYBhm+ht4aSX3kaEAPX1WeLd6LlDeQEc= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 29956F804B0; Wed, 22 Feb 2023 12:40:14 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 40BC2F80266; Wed, 22 Feb 2023 12:40:10 +0100 (CET) Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on20625.outbound.protection.outlook.com [IPv6:2a01:111:f400:7d00::625]) (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 0D6D1F80125 for ; Wed, 22 Feb 2023 12:40:07 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0D6D1F80125 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=LhTjORy4 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CIemaKe77Wsu2C+fMWQr20pmswIN+nIpOnkDBuWoTQde2b4jdEGA2eo78hmq2wVxFjitFYh67FduchFScyC9G/CdQLg747eDVVKfI76pwfPLpcM4KkjVAfXFIMVnO7fOPfcB61gMoTnS1GsHpjT/ecfeBZS2+PkUSl/ApkcuDtm8s629r7+O/s0BkKbjAQ5f4K6bNsRp7SwqVQTt6AChMZE6fvvvxeTJogdb0PR6f/VDGPhl3neIJMaPbR6e6EuWeeRlZObjj9JlU4h906RBiwC3cSPFhrmNbx7PDTGTelXLJ/+NVJ5hH6SjDMIls7amYSvMDpohlPF0ofLZOMnEkQ== 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=qtcZAwk5EysrhwhqzECWflI0n27MoP9/dUC5dmt/jSM=; b=AumPljQC2HAscvpoFbr0Wd0Rwu3cJwoDoH3Vjh3iR7TL5siSwuofNYV6+9g8VzNWeOkr8MMLYWFtV6UZd3Ujyj+yOg1CyW+peRbT/IQ1pE9MJLWVAzzbXWerfKMXjXxdN2eJ1bZo8NqxkPsdeqBHeoV7jYUGDxASGbfe3e7Yd2OKwHlup3V7SNd1rm08BlGUkZcqVKXqcgOsKlU6kAEUAB7Im8V1XcyooydAbwzTip1x1/+TuL6YO/jXffr8UsH7dJKb/PtLOPIXMbFmtFYo/mDrEH+tSu2j4HagKk1p4GK+evaal41xW96l2T6BpffqagcjmVGfwZ8F19jTBjC2Ag== 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=qtcZAwk5EysrhwhqzECWflI0n27MoP9/dUC5dmt/jSM=; b=LhTjORy4x5v9RG6cfR80eN6yXO4HQaz9MpvJCqxFHHB0g6MrxzeDPPUNQIV34oqDmuTRHN2TcUdHYfQ4KBUQRSjn8qRe3U3MgzJEM7eWfebJeaBVQRcq5b5H8u+DKUNn8Cg0PU9tbVlPGrHRs6ZTdeae9C9H2RdpDZ51OOJKFmQ= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.19; Wed, 22 Feb 2023 11:40:05 +0000 Received: from VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610]) by VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610%7]) with mapi id 15.20.6134.019; Wed, 22 Feb 2023 11:40:05 +0000 From: Chancel Liu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, ckeepax@opensource.cirrus.com, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 1/4] ASoC: dt-bindings: wlf,wm8524: Convert to json-schema Date: Wed, 22 Feb 2023 19:39:42 +0800 Message-Id: <20230222113945.3390672-1-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 X-ClientProxiedBy: SI2PR01CA0033.apcprd01.prod.exchangelabs.com (2603:1096:4:192::23) To VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4222:EE_|DBBPR04MB7930:EE_ X-MS-Office365-Filtering-Correlation-Id: 3a3f02d3-9691-4f2a-fbbe-08db14c98ae7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: w7c9aZzcVFPieFFapaKPPPxmzgVmRhAR5YUjAY3sCHucOUxX1/8JTNAyiE7WYWWJh4bH0tjwZ1Aa+L/9aLBFNfswCwWrr5cbcKT5JEcdxPpgLM/pgZKfm+3K5rWm69A1pegzt7JyORu0acniLrCDrM1v0medHUJclwk9ii7RvIYmL8O42zFK7Appj5pcYSPdb5HPYEkcSc/zwBrjzqCQ2eATICyW7/sN/r53eSxAc4btBRjtOe9QGEjViN9y7En030+2N8p8by03E7x/boHGu4YFYWMbHbLGKsmxq/oSBOhjiuokLoSCRRRKfeS/Jhikw8bL6nuno6UrmaJPv3StzyBTFTmeSaVnanBbnJL7CGoKtD+0JWMEAfVCS9w5Da1HiZ6N/E8mwaDpsKqUaNvYtLZpxSIrcgGt3J8QsauehAUDby3qN1gan0pUcnLUd6uqjNhoJK0W7NPXazhYQhBlwGa7JTjd+7mxdzP7w+rnB3TYWNK+0Y52JuD3DrsjQHV7OE/oMViZVbSl1sHaCRJ9m1ZoMtEB88aGRrYnZygFySIqQIdC4KQCijfZH8zSRSpNy333nl3YdemV5InFHNqL1Q+RNY7Zhz+QR4FZRAfClSWitCCaIDFnnnMmM2GGeHat5RO2FeXgU6IvWdfLVHPwG9wAo6Yn33PPUItHpEYhu04ufyv8tSJiQUz1hk0bRYPyPyrpMbGso/T0SryezcNhjaHXBIoA/Fh01AJ+kkzwtGQ5YHyKsmtW1/Sn/zoMkGSc X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4222.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(39860400002)(136003)(376002)(396003)(346002)(451199018)(83380400001)(44832011)(36756003)(2906002)(5660300002)(7416002)(1076003)(6486002)(86362001)(6666004)(6512007)(478600001)(966005)(8936002)(41300700001)(52116002)(38350700002)(38100700002)(2616005)(26005)(186003)(921005)(6506007)(66476007)(316002)(8676002)(66556008)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: p3UKDDqHnBaOEKQ/8KX+JDPJHnjRw/8tmA5Hy3XnNw5AKJ9P70/Be6ftpJzMkZWUyt4IscrBfxX873ea/SMqbOd5m8UGzDZtPkefHnBiqpHjfpXXj38BUn1KHvWgPixlp4eXTsJyxSWJr+LZkyPreTg+KQDP0idK8/yKu3kLB00xne3ZaE/dvluKawfYErQHlqIeFGU55BvniUZd1amkax60UlsnWAyYfoFO/AS74WfHDhkfdMPhzWgWasaHlZ/UG43kTJ3+3MXBw2GQIqFxPZH/YqNv/Z38+EAl3cwVzWE8Jvv1KWR03JKpAw7/oGrrDl8pV+FE7Gg2Q7KzIrDntdjtzbhtpit9Py1/435D8fpxlPAehhJe7v+2OIHLBJb2W36aftNmrbZSXj8LtlgMF7RcHgAivLuQtDtzgKSEEqARzz4DyCzVPwg7OzLMFOIttJ/TjpbqEaIKzuQ8TL5JRf3KpQXSPChH3glnvVVUPiTd/HxdVdhn2IKZp18p75FWzAcMN8TsmhRMlpvL+eYjthaEo5eqfMz2/A/hLSX4ZbCWRnc/Zmjq80HEAUTy3Hms+3e2gii7+L8JJ6nqIlxGv6zmrTlVInND7Y5tIZFiUeefzMWqUc69pp0219zA42wLjOY0Jb4KI40vk/buK2gm8Y54phHTF2cnBr+61C6m+CLaPXYY7f01e5Fs2eW7uh3/7UfwSFiqG9Vq8vFRjqV2wxS2qWP8pAFDxzSQFI33IWA6FPoVx06DJbLFMFZd1XTrn+9k4IXWuGwgCKtC6leVRyDCwfeTvZZpptWZ3zqMezXk0ZI7cRqFF8t5smn8jWnZahKzIv9Px9Aj/IAwqplG3yxbrYEvvLqh3+dZXbsE7YpaVWd6aZmj7Gkm1opl1cHdFvELDnu3o8wbH4KsZPtPuYY/xvSR+7mwzjpZSpRcoSOHpu6eMUBgg1E+2vNu6Tshjs7K5/tryUyNf0DZZcMWCOT9On5DmJQbI0gwKxxN+cjtYf5t0sQAa98eNyCm10phGqs3K5i2UnSR16lEzwBXsj5Sv8v/iXhMLFkHO2dldOpgWDM3QMp9Ohpx4l/Hm7x/qh95Ofk+1rHhQ2Rs8p7knH/FlIQe+e7pTu4hI4keNs1aZk4ouhVP59ihydhvbzTgIaW0HGpJII1aIemahResF7LkfWl7WUq3m0HiGt/EcDAyb1gBKmqk72Rw+Rn9bU4AxXFf06eviMoQgcTIRzNJlyltVN9uTYaFeq0SdRlI2c9Wz/aMLJEJu1qca34SHmaCOyk3TN0lPKJwcACL6jMnv8eZOZmZdeuK7wz+4TiLejHZTRJxNPP5qEoac9RlUlzmrlXDl7XGCBaGOL66gEJpt370VW7ewkXnA3lwUs41a6/H4YW3mSmIWaNhUV1kNvpD5aKwK2WyUttxTG1vNLLMa9ySt4CjcuyyMuoq7BrSsMDXgOi1YQ5JAorAqZibV9RTHqG6P1KZtHA3AespWjHVIUBzw0WURHtrWCo7MihpeFVSFKWqT4VcKg5nTk3sPUe3HrYnv5zqIucHQyTpqKhV1VocVlgcWhRoPon6MruZL+S1HoaKy65bw0ECcvaIX6jP X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a3f02d3-9691-4f2a-fbbe-08db14c98ae7 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4222.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2023 11:40:05.7622 (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: G+GsdpMfEp10WWEBiojEsfzxyZKITkQNpvHov0JMC1YhRau7pC/uiKaQX7InREdjLokGIB0VMuqaLLrzTEsyHQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 Message-ID-Hash: 7R5YZJC5SI3IJDYO7LZKVCLZ5KXVUY4L X-Message-ID-Hash: 7R5YZJC5SI3IJDYO7LZKVCLZ5KXVUY4L 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 CC: Chancel Liu 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: Convert the Wolfson WM8524 24-bit 192KHz Stereo DAC device tree binding documentation to json-schema. Signed-off-by: Chancel Liu --- .../devicetree/bindings/sound/wlf,wm8524.yaml | 37 +++++++++++++++++++ .../devicetree/bindings/sound/wm8524.txt | 16 -------- 2 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/wlf,wm8524.yaml delete mode 100644 Documentation/devicetree/bindings/sound/wm8524.txt diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8524.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8524.yaml new file mode 100644 index 000000000000..09c54cc7de95 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/wlf,wm8524.yaml @@ -0,0 +1,37 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/wlf,wm8524.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Wolfson WM8524 24-bit 192KHz Stereo DAC + +maintainers: + - patches@opensource.cirrus.com + +properties: + compatible: + const: wlf,wm8524 + + "#sound-dai-cells": + const: 0 + + wlf,mute-gpios: + maxItems: 1 + description: + a GPIO spec for the MUTE pin. + +required: + - compatible + - wlf,mute-gpios + +additionalProperties: false + +examples: + - | + #include + + wm8524: codec { + compatible = "wlf,wm8524"; + wlf,mute-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + }; diff --git a/Documentation/devicetree/bindings/sound/wm8524.txt b/Documentation/devicetree/bindings/sound/wm8524.txt deleted file mode 100644 index f6c0c263b135..000000000000 --- a/Documentation/devicetree/bindings/sound/wm8524.txt +++ /dev/null @@ -1,16 +0,0 @@ -WM8524 audio CODEC - -This device does not use I2C or SPI but a simple Hardware Control Interface. - -Required properties: - - - compatible : "wlf,wm8524" - - - wlf,mute-gpios: a GPIO spec for the MUTE pin. - -Example: - -wm8524: codec { - compatible = "wlf,wm8524"; - wlf,mute-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; -}; From patchwork Wed Feb 22 11:39:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13149037 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 DCDAEC6379F for ; Wed, 22 Feb 2023 11:42:15 +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 77D1CE86; Wed, 22 Feb 2023 12:41:23 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 77D1CE86 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677066133; bh=R0u1eIbn+ltVYR2EDVivsPHtxBD/3HpDDSaw5qrhk9g=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=bZb3BU142yqu3xkOZPfQodQCmNUQ1qVmWk/d0W4xcHckiP61I/z5kD/89l/KxgeUw IRC3EgYkRzeOOdUIjYUURZl0GV8lyo041pBQihleQPI2Q0n3u2Huq+GxERWWFcZH03 WOoowXsuj247cysu+WLL08mYnqyd+g0xc+4tMmYY= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 92591F804FC; Wed, 22 Feb 2023 12:40:22 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9C2D3F80527; Wed, 22 Feb 2023 12:40:18 +0100 (CET) Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2061b.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe16::61b]) (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 61835F804FC for ; Wed, 22 Feb 2023 12:40:12 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 61835F804FC 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=EMrQyyZp ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ipu/BJynVblk+mg8O4GQ4NOZPjtn6f1H7PYZJm55nhxRO1hqTXl2rrrFWMrC5ATIAsRJFHefbuAyHwZHhD+jci2Y9RnH+XPJfvwbWzMk68icL03kCrKLukJqRcvBo6z+mzhzo4feRj9vIdxTZLmFJNSZM+ry6uSaU/Q6/lVkn62yPzY+bZn8RztlAaTmt2MxahirfFYcUp+nD0ZqKpES152jcXTyghxcHBwDKWiyd9IcKg9d+soyfcsmM0WnJ1uhH1Ji5MHaHXDbIJeBae8ml2hVGv5n1og09iWNptWeGeEzxyU5h/0pBw4TMHSblvYttXjWtEY69D/PjqRL56nvWQ== 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=16gx14VMElIdQbEwI64FhXCGTS9xRY4+XPbRhlGeT7M=; b=bdcxpF1guzGN3gfMf2FGUVaKGVoc2nxXrlSmHoeqwy/YAfv8kHiY1R4lBQA2srNqJMZ+mIp0fkxt9iSFDx4d5jG37ac1xZ047/y4Mg91J89krr/SH6mIXHdCRKgTjUmwJ7x1U6dbK7GtXPrA6OTvXTn2ogvUknwF7vitqoYMgf3nW4RSa20vsCT5POirOeQas/IhRabDL2fHosdvr1YXl5NL4BT23P81uPjy4hPcrmKWGSSIG+uHa//+Gzb03gRYwNYP9T96d3hERVEvTuwp8pBaQBURtUjZUWF1cu68eh+x44lN3iZcBjvenGWJu4R+UpLdG78Tjptafqh/6WEXQg== 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=16gx14VMElIdQbEwI64FhXCGTS9xRY4+XPbRhlGeT7M=; b=EMrQyyZpVOl7lRYv9mC2pDIBGXGFOA6aWTMXfjs25+8eyWI5Koq9+Ct4l1auP9VuA+t0VXv58MBeVdPKCmGWhFSV9NL+XKGvJ5yIRUQ8SmLn2OBd4+wQ+N90edA43TNm9QwmpVn9foz/BYuntkkibPzPfmqqDqMq9oukgFG8Tdk= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) by DBBPR04MB7930.eurprd04.prod.outlook.com (2603:10a6:10:1ea::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.19; Wed, 22 Feb 2023 11:40:10 +0000 Received: from VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610]) by VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610%7]) with mapi id 15.20.6134.019; Wed, 22 Feb 2023 11:40:10 +0000 From: Chancel Liu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, ckeepax@opensource.cirrus.com, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 2/4] ASoC: dt-bindings: wlf,wm8524: Add a property to specify power up sequency time Date: Wed, 22 Feb 2023 19:39:43 +0800 Message-Id: <20230222113945.3390672-2-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230222113945.3390672-1-chancel.liu@nxp.com> References: <20230222113945.3390672-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2PR01CA0033.apcprd01.prod.exchangelabs.com (2603:1096:4:192::23) To VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4222:EE_|DBBPR04MB7930:EE_ X-MS-Office365-Filtering-Correlation-Id: fe21a4c0-040e-40bb-80e6-08db14c98d83 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: f+IO61UdYVZHdIVKk/zgjm0vYW/4+S9QQl54D6XC7OeBr7TiHm3UDe2Vo9fJpHtBvg7jwY/v00DpBfQmKvQMRcd7GLuggL93SbIokKHLSCc+y1O4orDwlcy7qlzSnqudh6uDuzXAGoIP8rJWwgLjaW7IH6G87V8wZqX0SKf0agBMIY518jGpkQSpinJU2YrSfw5ozFSI+XiNRsKuO8eZoGWFJIIx9gEgkYltjjtSRzlTuJZj17KNaaVGsEI8huqddQItbYySLO5Rcbvj2mYtTPOwcH+H1h25ss6nzJeuxGN3up7ZCBHI243LWpvwGvZPVd/wDdxZfXHGcp0aaI2u156++BuTKN8UNWmQw3A57QCIlXiXkjEsGacwiwmVi/84jrL2eUBY4JHDxIqcQX4LpMRrq6a6f1UqnOMlxxIlihOdPXTYEqiY+BPdv8HS9qlvWA8b5Tpqv/f19skYHjxo8Pj2W+LjnZKss7kemQR9zEQWWsB1u9xJkIx2DKBeZxrhxSejODGIOWDzXbeK8fwlCR7J8w1T9cu4E/N9VO9vKjug+zIpj3LRsSLJLxgpKfqrA1ePmC53DLE6X+WoG9iuYx53VPwWaQEluvH4qzuG8mBBgNYMoOz1iRzwFC2KF9RWQjElXr4Lrsm3KrTNeogQnba9nmMTOes4QppVyVrLuoZofWkWZ7kbQVYG+2GlolEbw8xGCt3cJIjhfq9UdwwZYQ== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4222.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(366004)(39860400002)(136003)(376002)(396003)(346002)(451199018)(44832011)(36756003)(2906002)(5660300002)(7416002)(1076003)(6486002)(86362001)(6666004)(6512007)(478600001)(966005)(8936002)(41300700001)(52116002)(38350700002)(38100700002)(2616005)(26005)(186003)(921005)(6506007)(66476007)(316002)(8676002)(66556008)(66946007)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 9TABfv2TOfbvMyKltvIrijbsw/6zicFml/Y24aJqWt9Uq7JUl7gEgZoKWHneF6C9A1O5j+H7WS56mbVlguTGAVRv26yXxWE2H1XNNRGX1labfexqDq0Xznp+IDPNco8unBCYxYi8f1088FP+HvWiUyVTpZuZg8vNLgrGBHLQ+hpvDZTVLofSm1B5XTiapfQZ6QJFbKqCgX2hha5MInVTZYQVrhFN5AOJemaODTkFa2Qs/vo+4YvD9KExz00XBO/FuSK+sNE/NJ6qyHnA7BaJxD3E5aPrI7T9vRG+UXdmyACTkUORjSdtRfzGNusBBsf+LBg7UpQHouEBx+rO9lMAwl3zTdMTo95zLt8os2/ZhAswK3ow3xS63ettdk3iK98euN4cCqHRoVFKqxvX321tEWIkK2DXytCiC4mO7vjmqtKiyDO3ii6Vk5JnpHgK+raHQKHONJMbjhyYOwiCznpEbuWgCm9x82UDVkHYuVBYHfV8cH3wv+kzoq6CjpyTOPTFmc3SvVraOwNNs7NglRSN+VDwgZnMkAjZYIvMsvD6xDuiRAv8smohQs2AM9sWh8Dpm17Wos2lHLf8bcdzTlBG+sw+UbOfh0gsgVjrHUPDG2yK+JbUR682vfo4isy+uKNNey1q8IFPcFir45yIoNiVCAEfhVxutKssBd9CpbatNVkpReL0agWDLDoBUx1GtIYXyayDTRPgDcxEGHDbY1W9mMdTdIaWkGU9FO80WVJcW5xyltp3SicZFv5yjQXCdkrFLJBeOmxBPG47FrIWB6Zp7hPbsnj/US8/izPxncS/evDpv3c/pmi1++ZDe1ocvSZLwp+zoWYi4ClBjBtdJEbdVi2hdpGiE6pS/ZQcPA2DusPt4/TTguw/GzqmKwzZsg1zBCGe1yGgNkRuEke111sE29Ui/ggn7lwcB5IULtB38qc1hWIST68wJvm1PtuC6SZeJPW27z5S78NJNwDC6mdO4rR7THRqL4yRWpIwgP5NjMDYwSZdJyaWqAdt7WbrWRdmXpJeewIohUt6nifJzNPEN6sB142VhYpaLNlsH8vxr2Uga2msHWU0HpJjNn/Fzt8T2zIJ/KZYfPlxmxBnNeoX1IJehTCFQML4AP3iAvN5D7HckO4F/Q+itUo8YsZqy2IwSWaKdxTjl7uvrLohg5T0MOXCUFp4iop6xDFKvsRevfqoARcO6sHCd3D+NuuAt49jACKiXW/C1FziiJu52AFWdJe+sxin17JWHdzFeFtOpeFulpl0ZF7zRcOE6pQRLx/TgrZRS3sl6ANAedtOEyZESpXz97El+te0KQnXC2C2GLbP1ZM50nn4iRlKi+g5ZRjo0SqFwRs6sRqF2iQxVvSsEX/3KtEWbzxf5nfr27EQkQW6V7ilNC0KHCElxApewip3F1Mob+1G6ypwgoc6dsHKp2tNKWr8sqop36bV8K4HP4RrREesBOvlb6YqL8bDrE6pwbCLxvU3Zcgx/JLc1ZJnzVKAmv59o3kSAsAwcCjRxdZfzglJMSbeiWxtFQzMrSLCjysyqvVnif3HyXwUJCyqz/T0E9mOB3Knsk5W/htzZhrWgCLbpnbS068HlTIxQIFj X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fe21a4c0-040e-40bb-80e6-08db14c98d83 X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4222.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2023 11:40:10.0744 (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: XqU1rth1RrXjF3zajrgjpTpTr5dtGyMbyPrYEBOuX1SdQatgpBdFoStcf6CqaX1fovw89+LeiRUPDwug86ZFzg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR04MB7930 Message-ID-Hash: RUNS2K5H7QNTYXVELXGB2QI2MGOF5HZD X-Message-ID-Hash: RUNS2K5H7QNTYXVELXGB2QI2MGOF5HZD 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 CC: Chancel Liu 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: This property specifies power up to audio out time. It's necessary beacause this device has to wait some time before ready to output audio after MCLK, BCLK and MUTE=1 are enabled. For more details about the timing constraints, please refer to WTN0302 on https://www.cirrus.com/products/wm8524/ Signed-off-by: Chancel Liu --- .../devicetree/bindings/sound/wlf,wm8524.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/wlf,wm8524.yaml b/Documentation/devicetree/bindings/sound/wlf,wm8524.yaml index 09c54cc7de95..54b4da5470e4 100644 --- a/Documentation/devicetree/bindings/sound/wlf,wm8524.yaml +++ b/Documentation/devicetree/bindings/sound/wlf,wm8524.yaml @@ -21,6 +21,15 @@ properties: description: a GPIO spec for the MUTE pin. + wlf,power-up-delay-ms: + maximum: 1500 + default: 100 + description: + Power up sequency delay time in millisecond. It specifies power up to + audio out time. For more details about the timing constraints of this + device, please refer to WTN0302 on + https://www.cirrus.com/products/wm8524/. + required: - compatible - wlf,mute-gpios @@ -34,4 +43,5 @@ examples: wm8524: codec { compatible = "wlf,wm8524"; wlf,mute-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + wlf,power-up-delay-ms = <300>; }; From patchwork Wed Feb 22 11:39:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13149039 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 284E4C61DA4 for ; Wed, 22 Feb 2023 11:42: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 1C8A783B; Wed, 22 Feb 2023 12:41:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1C8A783B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677066166; bh=fd4NLfrMGNEkqv45c80hz3iconNusGtYl98kMXe+1uw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=hhwcWHv5BpfLt760RE0/mQkllhD+VI99Rn6FSspdah4/faUyEO/wC7JdIzKb2N2Dk ATGQlgKB1DcVXMjefDwuJLtP6C+Tawlao5/TB+pIVmuTSPdqJg8tLYTr48IzzfNnME IidZOxR7Hc8WsUJmVrK8VnRHgSLqfD2TanamLSFs= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id F2BD0F80552; Wed, 22 Feb 2023 12:40:27 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CF080F80533; Wed, 22 Feb 2023 12:40:22 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2060e.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::60e]) (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 17701F80525 for ; Wed, 22 Feb 2023 12:40:15 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 17701F80525 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=Nx1YcikV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HS+/PHOM8thu6o9MtFjO5w1ZW92ZooOxqgjfPNjn/i2jcBYea4qNvxBwfOdY9SMqzVY4f+AY9BluNrAG+XULYUT2AEaQR6d95AboCzkHKDqrY4Rok8VvjxBMl/p8HokgXzl2Ek00LM1JdqlVNmM3KIlKwkbPIN3NbHnmACOCRFeUPFU3G5ziVKoNE48fY7GjKphAaflH+e0lRxyjNyc9qqDyu7hvc0xaKokR/HEpAEh86yvHnQatE3vDR8aflQvjy3+muYwJq4qwsylEibiQ7hXH5JOIowf+ivRKVWhDHOP8V8PZfiy7EIskx2R18CVim2VnPwEg47wLXCaZwT/Ndg== 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=++ejmGwQkUiwS651NWE/u4IbMYLd3/yUmOuJsIWglRI=; b=E5Wvk5azMT8mB3v65I3cORUZrsC0QUlFoYgwDMcMuKmhet0DuggCHlgnMQCx3jqnvSeOWPq5YrtyLpKDpfm1zRQp6m2oj0L8Ve/j1O6QczRnWkK+7/0xauXaDxw2xPlXLWrzjCHy/bXTSIySUU8b1U4s9bPvKPnw9zE1fnToe70Oi53OzEdSFVF90khDlHAs5SZkzb+PjhEJS6U0UZuenZK0q0waIt/4z388WlJHdx6JLwzbTn1j8N90ksFW0PULLFdrXs3uSwNTfS1bKUp5K1u4DeTNKN331MSaMr/0ipQcBOolo19H4cRcAZCHsGJGowVlWq/7os6D5PdCEi9qtA== 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=++ejmGwQkUiwS651NWE/u4IbMYLd3/yUmOuJsIWglRI=; b=Nx1YcikVw2KfbE9Cq9pkaFZ3tEsNeyOFDPN/G5oDEiwMMv35EdaeDHFjCvgA4RRy6MtAI0N0WCBHyZaOWEQyTsM79o3r0AFUz7LZd0aU7i9rwyaQFxcJGMrpiBree3uMsexZLx24IzXoaIv4jvTexvmr6R4v73YCPu2GNcICvzI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) by PAXPR04MB8653.eurprd04.prod.outlook.com (2603:10a6:102:21c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.18; Wed, 22 Feb 2023 11:40:14 +0000 Received: from VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610]) by VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610%7]) with mapi id 15.20.6134.019; Wed, 22 Feb 2023 11:40:14 +0000 From: Chancel Liu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, ckeepax@opensource.cirrus.com, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 3/4] ASoC: wm8524: Correct the MUTE setting while power up/down Date: Wed, 22 Feb 2023 19:39:44 +0800 Message-Id: <20230222113945.3390672-3-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230222113945.3390672-1-chancel.liu@nxp.com> References: <20230222113945.3390672-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2PR01CA0033.apcprd01.prod.exchangelabs.com (2603:1096:4:192::23) To VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4222:EE_|PAXPR04MB8653:EE_ X-MS-Office365-Filtering-Correlation-Id: ba95e6ef-5e3c-437b-9576-08db14c98fcb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: spkZslXkZxPdQBU4nKzQA0BPpk9bPBlNy0o6ViE4ZTq1b8fFiTWD8SkCWN5FxRT6wSbI1EopOmtHs21bdtBt8QLllww7K7fXWKgsLRure6rgpCmWesT8MuXEonrBHPJqUuxckeutOWE/MzjrwfzEwQy6JBqEour9FzxidZ7Zv8rjdfuvpCAg6xrwGNGe4bq//+GXrosXzUBJVCAxsLeXQF/sDuJly9YYXnSZABc73Bl/WIbC9qxru5ad/Vus4OhkDKFet/FXLADlFQUlH7jOmrv0sEU89pZ/c9LYEdD0gaO7WRL8POpHDpDvgbg3ERtqEDdp6na4DRKai/NKMJ8XU4LFPGyzToZ+G0jKQKkCK98NJb7NwRyF4YFuaUEgmz9r5pUJ53WzDjuNvJDJJL/FIOWtD8zWnN8nAbrRduLxM/RFM4ATu2YgRfF2wlHiQn1YE+v46h1kurCdx+326DOaYKySssQbBrR1L5dIqyvA/B1vZ4uJe5/E9vBo3EoSf5J7+m1U4ETwimMThF11sOiMUibLTLMHBfF4oQ04qofqJ0/1yHM/VXnjJmhg46BZ4xDbhadIrHHg85dCwQHXaL8K5anxmVufZGzB68shIap8RWEEM2J6z7Ov2CeoM80HbCCKBM+0PVGrUA+CCRUubnz98xO8f78VxqIKavHgJeXPlAQfDM6QQHRqQSY4jXkagI4iXc13QHGBc3zeDiQ+rYCAOFSiTuD3WFE5QHvsao3ogdg= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4222.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(346002)(396003)(39860400002)(366004)(376002)(451199018)(478600001)(86362001)(4744005)(38100700002)(38350700002)(2906002)(44832011)(921005)(316002)(41300700001)(36756003)(7416002)(5660300002)(8936002)(83380400001)(4326008)(66476007)(66946007)(8676002)(66556008)(186003)(26005)(6486002)(1076003)(6506007)(6512007)(2616005)(6666004)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bd0WTVFPJ57SIkXu9EFaxgfHlAPc3ksHqmDYpHocuQunRfLFX3BOgTVQkmzSd3+shf7k0CoWB9fkb2uto+S6fMwqGoRRXAXtyoT+3QA3E//lbNqmyBmLiirOxm2oKDTsgrcBG268Bx4O8V9kAUwRYR3aJmb3LVKOFSw6odLz4yEZfua3AC02hUdYOReC1HQ342fQt/+daUrSrhHmYvwtnVpBpkfqWKhBTyqA59ZFdtt16PClV8XvOUMX1iBi0C5dddBDvKLGEzxpEANDdfh/U+j4mj5JLhg3aEK1dWlBzn87M6KUi/a9pCNp/bwngAobbPVdAVtp5Kd89BqOP+B9UzGoKpgQmY7k8JV9CjuXK4Vo3gwbag8yiORCWH93N2QuaPivfUGRqqzABNNhxHjOD3TXLxENBbD8ORgdilbu//SCS8sMm4sSQUupR0r7/+cO9WCMx+G/V7IIG7HVz3fyDjJrhbz+DheuuZ4fRzdeBpz+91NbWuHAjZeatdoDFV9H/qMYwNnl8sisy3kFsworOefpcnLmeWUn7EaaFpMQgM2/8bkPWTdjD1l/pRCDgx0kHsazodCgzddAvlJGvWlXNajLQ/Ul0nkjsidxIU7Ejal+xUh621lz+eEYkWffFGkxXBbwAUZf9z+yJ1FWOVnN+LbUxzZGiUNLdx5F0tHK8PmEamsbw///s2XyTMz7FJx/YSk3LLMEgewkegCFq0BhxDSi+CoA4zM7GNeInTyBZngbWC+upWopoCWepUV2EX5t195azkVC+Ngv6m0ZRhN/NF6Zg1wYUAdQ7wHNb9qIp685EgRzt6/coUAkQlQRBwRm4r0H1K+jAkz/3HuUwQvkjrKHXuRn4nex0zDgV1mR1lLYHczH+Z3I/eqvdj7tomeLy40JwviYCUnByAkAC/fnKIcYDhohGdNSCj9eUvo22iGdRu5nnDebGjQFNBoJBJK14VsnyiFA6XO8MptJDdA9Oh4ZCD5qyltyRNS8idt0mo6nGjq8GvornqhLnpKcULSxUvvy0/gYKwhmBU5dY5y3cPKnoXFaV94EOR3AbVXiWO1P62LqCsfh7WXgYpNNOVONPknzpaTgjidKiJ05PVRNPjIWDCZEs50hT4ZZTXwNqsCRQFuAWtCBjb06T5A4ST50UceAp72O+q7B22e9LO3e39DA5oDLLF/OEVBWi3dT+7C4WlUT3nIMjY1r+MmGLWjEkfy5NERrfNKhCDb1DTjOcj6gHXMSUA8wskn8115H7tSNLSFQDzbLVJKUp5xQG1yLe4WkRxClXESJE/2jXsRAGKuRawDaDhjxbJZEcMN95IbJ2HUcgMPCVfX0OQcNIisPc7aBsyiidlqK5vpw79YwGE8HLszwx/mskFXxf6k2MLVdRNyOgjdFZcAhDDkhGOs1UratSY+qbNgXipXrd7leDPYjpEFdFMVHWFJZzFb3/3ZzBPEZC8xkcJbNX1VnfdBUHFwjTxOf716czr52GcbbX9vuiGu0WQ1Yupdj35wFjbWtXKsUxjsZ6p9xta3H64ldCb+EMQ7Dg9UzoIfX6fsjgK36hoTpvJF+6DrFlyyIqBYNuE0b8b+5SF3lHAPf7tbG X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ba95e6ef-5e3c-437b-9576-08db14c98fcb X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4222.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2023 11:40:14.0272 (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: 85xhjDM1OnR54n7tV3UC5bmadYqHQ6SxYon1MWiPKxp/X8Lp00jzra6O51gKL18AHxnKmsON9t4Z2wCSeV4dzQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8653 Message-ID-Hash: KNMVXCNOKRS7WB3IKPGB7EQALYK4KB47 X-Message-ID-Hash: KNMVXCNOKRS7WB3IKPGB7EQALYK4KB47 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 CC: Chancel Liu 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: wm8524 should be set to unmute while power up and set to mute while power off. Signed-off-by: Chancel Liu --- sound/soc/codecs/wm8524.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/wm8524.c b/sound/soc/codecs/wm8524.c index b56dcac60244..8f2130e05b32 100644 --- a/sound/soc/codecs/wm8524.c +++ b/sound/soc/codecs/wm8524.c @@ -75,7 +75,7 @@ static int wm8524_startup(struct snd_pcm_substream *substream, SNDRV_PCM_HW_PARAM_RATE, &wm8524->rate_constraint); - gpiod_set_value_cansleep(wm8524->mute, 1); + gpiod_set_value_cansleep(wm8524->mute, 0); return 0; } @@ -86,7 +86,7 @@ static void wm8524_shutdown(struct snd_pcm_substream *substream, struct snd_soc_component *component = dai->component; struct wm8524_priv *wm8524 = snd_soc_component_get_drvdata(component); - gpiod_set_value_cansleep(wm8524->mute, 0); + gpiod_set_value_cansleep(wm8524->mute, 1); } static int wm8524_set_dai_sysclk(struct snd_soc_dai *codec_dai, From patchwork Wed Feb 22 11:39:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chancel Liu X-Patchwork-Id: 13149038 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 D28B2C61DA4 for ; Wed, 22 Feb 2023 11:42:22 +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 6ED78EC0; Wed, 22 Feb 2023 12:41:30 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6ED78EC0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1677066140; bh=WRcZP8TDXSmWSgac+1ln+Ko0r5VNqftPTqy29hM22qw=; h=From:To:Subject:Date:In-Reply-To:References:CC:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=h08RksNpzarOzkj0B87Czp8nn1Xaihkodm8Lm5kUCLjmwePjXGCcN2nm7nu9MJlCP iCObKjr+vfQFuE/2f7oCRyeCTKxtMSMsGTIVwIsNh6Zt9Ku+GviWWAMqOauvJFJhuC U40EnNdJY5+jV2HEvWIcSlxS901IDac4F7m6s16g= Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 79ED2F80544; Wed, 22 Feb 2023 12:40:26 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 702A0F804FC; Wed, 22 Feb 2023 12:40:22 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2061d.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e1a::61d]) (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 BF66BF804FC for ; Wed, 22 Feb 2023 12:40:20 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BF66BF804FC 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=jMzIg925 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=b5LdaaEr4tKFLLvgfDNi2bHGslgUfZum87olRM6wOfGw05GjPCbriIsm722ZCMJUCU7TG6BrRa0TLO8dLhK72BQwWIihC8ea7C9O57FTpI+oDPzcufUJeTBCIsL0wkDChX6H/21n3rbHzzUwrE2h0JmIwAsdKg2BH417jPAZsv/z28oeHUqHVweUKH9bt41pR/Pdemhvbq9JfvIZsbabbzUUnjF+V4r1iC5BW/vyP0gyXfPZFQtmqDXbApX6iYUODzQ3+CC6uLdyPpr0WA9+Zo6zEMyWZqN7rGkyXd5kfTHIrLEbeOC3+BRFWtzM4b+MTnNg7Vm1NzzbNWMxi+pYIw== 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=H492h3zy+zQgFK4gbKLUlUZchyTJd7Y7VmAgomkPmho=; b=cTCwY72yTXWPrJLi+E2j/aAsSXa3+mZ7f9HNSBUvSIoDpXN4H5JysgkSf51FerAd8nOGlb1IcLBaP8X97Zc8jIo8P/V+g6UlFFtOiNhGddhoY5ZT1zSJLt6WCWEic3ILXzarvL7GzLXFe1LKLNWrsGRhyXGJjqbiWUp1timwrsjDx0Q3+LcfeBZGXn4QGCUXqQXfdXkyENLNT55wsAT/P64eCObOCH4d8mhvT1DlUQW1LR6QA7o7iZ9JpQsFLQzZDJxu1TKuJB4yypA9UBOARkoyDB+oPIOQRAr+pKDzBMqdIa5gQBvNivfwJRZipt0mmpBaTsvcrjrDeqs9BNMNxA== 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=H492h3zy+zQgFK4gbKLUlUZchyTJd7Y7VmAgomkPmho=; b=jMzIg9259ks2Gl5wDTU89K4UhrUYXmMqHghs3JWk2aWXc6COK9t5Pfykl67o0RO8xPA1xwXFFzDa81lUddVkDg2lrLgijotBbDKn3pY1ax+T4QV/RotVVrZtsNYwxUDGHujLINyQ1R8q1nc/uSq6NGlzMGQ35nQN8vCnD9eoEgI= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) by PAXPR04MB8653.eurprd04.prod.outlook.com (2603:10a6:102:21c::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6134.18; Wed, 22 Feb 2023 11:40:17 +0000 Received: from VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610]) by VI1PR04MB4222.eurprd04.prod.outlook.com ([fe80::8562:affc:e0c:c610%7]) with mapi id 15.20.6134.019; Wed, 22 Feb 2023 11:40:17 +0000 From: Chancel Liu To: lgirdwood@gmail.com, broonie@kernel.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, perex@perex.cz, tiwai@suse.com, ckeepax@opensource.cirrus.com, patches@opensource.cirrus.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH 4/4] ASoC: wm8524: Delay some time to follow power up sequency Date: Wed, 22 Feb 2023 19:39:45 +0800 Message-Id: <20230222113945.3390672-4-chancel.liu@nxp.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230222113945.3390672-1-chancel.liu@nxp.com> References: <20230222113945.3390672-1-chancel.liu@nxp.com> X-ClientProxiedBy: SI2PR01CA0033.apcprd01.prod.exchangelabs.com (2603:1096:4:192::23) To VI1PR04MB4222.eurprd04.prod.outlook.com (2603:10a6:803:46::19) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VI1PR04MB4222:EE_|PAXPR04MB8653:EE_ X-MS-Office365-Filtering-Correlation-Id: f3413fb6-69d0-416d-95a1-08db14c9921f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: JYGOqS/TqkefrFnIgjIQq35lgPYF8yP3QtnP/6tV5jraXljyqCyVh/TYm+rVpC1/79kg2DB41NDObYR9UCyZDr9lKvw6iht0ED5WTi5UmA2Rm8p6jpknVjfgqQSA2amFuC0tUh+8f5Sd4hj4UaAmjP4wOApCrQP3Cvk2SqbqXUy9MhJSQK+KddQROsuoQ7xKlagHqAbldx6VnaldECw3cj2HZsUWgWpEQ2dU0eCWKcdCs1RhCFfQv3LM9MBU3GOdlyRWkkZPo9PIIug9dBUCpl8daDGszLtREOwt0ZvwpCxXmPq2uj6DIddgzfy0wL1CCeETTkNwGiGpe9yyj0Ao+0qSE1VHAYaLFt4IRuYh+ITcNnYwzuJd7vSZ2Gk8VNmhfpnnvDVPmIsVLKS/S/ve8OKMEeOtMgS6iEyBMsF+x1OhmPOJn4znScRtOXcUEyFK9Lmum8W//eyQgzCXhJnFs8HDJZt4BKBLMajPuqEfhfIw457EH3uvR2giMR2WDF8fcn9+9xGz1qarymm/O2HUxfvP8dGz51FpdE/0krISAjIJMiKAKxQ+qkf4zNy2hQ86rDV/wBiLWKrrUpmkMo6gC4R4Sst9PlQPcModPSRQ0S1zLVLSDZ97BWCsPysKqJLbkG0VhHJwQjmZhem8VwKJvnMMmNNHx7cE6qbGToSJYQG+P8tEcyVE3MYDoI3+eLn0 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB4222.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230025)(4636009)(136003)(346002)(396003)(39860400002)(366004)(376002)(451199018)(478600001)(86362001)(38100700002)(38350700002)(2906002)(44832011)(921005)(316002)(41300700001)(36756003)(7416002)(5660300002)(8936002)(83380400001)(4326008)(66476007)(66946007)(8676002)(66556008)(966005)(186003)(26005)(6486002)(1076003)(6506007)(6512007)(2616005)(6666004)(52116002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 2Ia/wQRpp6kWkccXPVI4IWDRGP+WGzaEqWmP7GcRvQ1Iz6UFMC0bATYZfXsj1QXJs14WFpGwklHtlPZ6AtRV3cDuJ4WqjFR6dEufUY8rghRm4sYZ3nBskGBq7wDZFuq2M0zrslEWNzcnCCpwAMbgND26oJ+aHopIx85PIUJiQrKHtfAa8Q/cORDllR7m68e2jYOv8+Vh7Gx/ywgWlvKkW5v7XX/ctextwhrF8ssL8MWVPJqAjhaJoYmzhPLFWnnVQi4sU3h4gwu69Xewht5CkpccZcb7P3RSZ9e1sT8oCqQNkre7wt4uJYWYg4zX7Zu5Wg1wXxGbH47Y56U+76trq5TgWh+QGFwKwAz9qeW9JYZStGVlBKmnJhi2v1/e/Nf2LJUHGGdtVfWSScJp6j8olVnR778zQrYu5GtFd+E7Ybhq2nE84daWW5EdpWMVBE9Bbveg+skb/7wkZdEkSdPRC5MjZcYMgaClc4HL7qflx4OiQjMWQVgpIyjixqb1KX5PM6ZlzQfm4N57phLFIRIG/QBnG6toxHKB8vGANYfUXP4iOMER9MLxP1+PHBicp4iXvkpiHXgwFrvUfDTj4Agx4aPwAZVYD2iVlnOHzWZ+j885N0QVTzStNsvNhKZ3LeDTDb9OPgPiRHzBJZ8tm/mPvdsqrpLbAdRSHWCYdwwBNBGbSIZguKufiHdZYPbc3zN3YQpI2al/YDLZUuvESOZudEkuMJTjMp+jm+iZN3g6nlprbBnF6GsxKI/1qViVdcIAG5nuUNF8Zoq64rGkQ55AA06iAS34g1dNEu/Vubk0wQJUvk2imOwOZ5Y/Pa7pdmW283268RajjE1OrfvxTWr5LJQtVZtnSrJuS8WP9holnERcVJh6ABP569cbqnYUTX1No2uESwp9/cJOuAaqSMEBb9iKgX5KukCEuyyUNYZtyLa8F5s7Aka2dO2xAMMpwMiYRH48hr6GB92Iggg/YgLQHBLrsBYQyeKYkONIS000AXZxkX9a7LwIoxx0wliKu9zqVrwrmyWpQg69rRllC7EDN2ZPn53zNMfcGS4gpY1KxPDa9Qr3D4WxwMMHl2COlH19Ye3CeYGzLlECwV952WbJPjqaBhK/glAfjCoeHv7jqlEM8CvPZnrvpEPA7BpNI1E5v9Hk8FV8fsghdigawP7SiyDKWHL45tS64GFkcPGqATLVnyAK25ZSHSlX6RwA/61PXzHbmKgKUl4Gz2RbX1pRHOkcATrILbwtMHFiZ28xbmreK3wfy3ybnoUOpjd+DayfhfftNPnnHWOuTM0kZ8rmfoOvMAWiplyhcUs2yBdSVbUYaBgHpkCOOjVThaf0UPXm6y/xyk2/050ZjkRz7Y7/eXPOI8ftsIJyHN7HAlbFhY36YccURA7za3vHY/d5L+Au5w62AJyiOyhNxZ6QNhYr689mWp/uwx/VzZLtlnaUHcxHmUVMt9sbjJRZnjDYqhHWJblIREx7uSXkK9PchtmWDZM4rKGS2XKBjJVq88L1pdvOFHg9ZDQBVinZk0Yn3KurRTG3on2Fi65YzawAAblAzCrAnbXQl2byvgHPmGr2uX/nwnGNXJFI29fZTpNQxXHp X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3413fb6-69d0-416d-95a1-08db14c9921f X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB4222.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Feb 2023 11:40:17.7613 (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: NuMNIp2xjQKVdZZjxMHBB9bvggRyh8cO0/S9oyQ197VQ23wpz/5hArDdJG0sAmjNtysW6HpI+m32r9ycmDSWYg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB8653 Message-ID-Hash: EGPOZTXELBZVND2PN7N2GBZQG6TWUD37 X-Message-ID-Hash: EGPOZTXELBZVND2PN7N2GBZQG6TWUD37 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 CC: Chancel Liu 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: The recommended power sequence needs to be followed to ensure the best performance. After MCLK, BCLK and MUTE=1 are ready, this device has to wait some time before ready to output audio. Otherwise the beginning data may be lost. For more details about the timing constraints, please refer to WTN0302 on https://www.cirrus.com/products/wm8524/ Signed-off-by: Chancel Liu --- sound/soc/codecs/wm8524.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sound/soc/codecs/wm8524.c b/sound/soc/codecs/wm8524.c index 8f2130e05b32..f61967b66c3b 100644 --- a/sound/soc/codecs/wm8524.c +++ b/sound/soc/codecs/wm8524.c @@ -21,6 +21,7 @@ #include #include +#define WM8524_POWER_UP_DELAY_MS 100 #define WM8524_NUM_RATES 7 /* codec private data */ @@ -29,6 +30,7 @@ struct wm8524_priv { unsigned int sysclk; unsigned int rate_constraint_list[WM8524_NUM_RATES]; struct snd_pcm_hw_constraint_list rate_constraint; + unsigned int power_up_delay; }; @@ -157,6 +159,28 @@ static int wm8524_mute_stream(struct snd_soc_dai *dai, int mute, int stream) return 0; } +static int wm8524_trigger(struct snd_pcm_substream *substream, int cmd, + struct snd_soc_dai *dai) +{ + struct wm8524_priv *wm8524 = snd_soc_dai_get_drvdata(dai); + + switch (cmd) { + case SNDRV_PCM_TRIGGER_START: + case SNDRV_PCM_TRIGGER_RESUME: + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: + mdelay(wm8524->power_up_delay); + break; + case SNDRV_PCM_TRIGGER_STOP: + case SNDRV_PCM_TRIGGER_SUSPEND: + case SNDRV_PCM_TRIGGER_PAUSE_PUSH: + break; + default: + return -EINVAL; + } + + return 0; +}; + #define WM8524_RATES SNDRV_PCM_RATE_8000_192000 #define WM8524_FORMATS (SNDRV_PCM_FMTBIT_S16_LE |\ @@ -169,6 +193,7 @@ static const struct snd_soc_dai_ops wm8524_dai_ops = { .set_sysclk = wm8524_set_dai_sysclk, .set_fmt = wm8524_set_fmt, .mute_stream = wm8524_mute_stream, + .trigger = wm8524_trigger, }; static struct snd_soc_dai_driver wm8524_dai = { @@ -213,6 +238,7 @@ MODULE_DEVICE_TABLE(of, wm8524_of_match); static int wm8524_codec_probe(struct platform_device *pdev) { + struct device_node *np = pdev->dev.of_node; struct wm8524_priv *wm8524; int ret; @@ -230,6 +256,9 @@ static int wm8524_codec_probe(struct platform_device *pdev) return ret; } + wm8524->power_up_delay = WM8524_POWER_UP_DELAY_MS; + of_property_read_u32(np, "wlf,power-up-delay-ms", &wm8524->power_up_delay); + ret = devm_snd_soc_register_component(&pdev->dev, &soc_component_dev_wm8524, &wm8524_dai, 1); if (ret < 0)