From patchwork Thu Mar 25 03:35:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Lee X-Patchwork-Id: 409576 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CD148C433C1 for ; Thu, 25 Mar 2021 03:38:07 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F84B61A1E for ; Thu, 25 Mar 2021 03:38:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F84B61A1E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=maximintegrated.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A41031655; Thu, 25 Mar 2021 04:37:13 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A41031655 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1616643483; bh=QmLq1Apj2fnps+TZlQvLdeKxlOjWy1hLtvRNTE9ARio=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=kRh83RQVfnknxF98Ok0uEN1LuWC+rSnbRKBJALTnFlc9qSqwJ9E+RoklwdyxKDYCM iXLuUpqZ7WTCUxk5w33u/3EXtnfQLfDw9WaTOeXyVYy4NBRJfsYUQWitWcvDpgR0TA uI73n/wK9JnlQa+CqwTeCd2XPA+Pj6Rko8cu+j8E= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1D7B8F80257; Thu, 25 Mar 2021 04:37:13 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 22A25F8026D; Thu, 25 Mar 2021 04:37:07 +0100 (CET) Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-co1nam04on070f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4d::70f]) (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 67894F80103 for ; Thu, 25 Mar 2021 04:36:56 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 67894F80103 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=maximintegrated.onmicrosoft.com header.i=@maximintegrated.onmicrosoft.com header.b="YeT9qLgz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gxvqn/Mv0vpDgvPY8RFu4LUp/AiBJZX23HgeXn+OhcvY71OBfPDg08b2aHomwFmv5LCxAklU2bDjc8htCJ5y48cQ8tJhwKMS8Vi9YuvtEE2OPK6eHuXJvKaV3MdK1KY/rRNzmuZP+sWjWWTOcS95jHLSaTeqnOoBZNgjE80updy8oAi4T4t/lISvr+2mqvqpmkjFCQSMbTwGAHsscLH2I+sXs3JAlxO52ZY480X73u5L94kQ+GLnW8S4gtko5Gq8Joz+g0u6H0K4FNl2suFHjXfOxlen5lYi/XihDjDZ343y2q4OLB3CbMDd7Hyq4QHXlWwZbLw6D8nMOMrSiMzImQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D1N1bLfntiyv0Dz7c/VGfeIsYpZDEd5Lw66+H1uF/v0=; b=VQoMzmQEjyW1ZBycoOmaqNbUpa2OUiAISK6GQlQVC9GLCx5joOk9D0co8cEvW4KGwoK0DRy9+fgF9gnU4PgqFoGFRN+BYmw8G7hhyz5TXYclVsLwy0w45GADaUM0lrdxEvQBirtfaabGo1B/7lHCs2aAdBzxvGUvjE5+sg2XKbjFec6jIfvvWolu5Ha6Z3e5zJznIIx3RNronWTf4ROAlbr8R6+1GXVxxMEENa4jBeQDfUwSHXMfWu23mPXPejeA0Sw6uI5gqUXBa/+ygHwgQId+8CRZf+gfBy6UJavms8tmPs1AS/bJVsGf2bebnUItTzMT8HDbO9fS41oCbR7Fig== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=maximintegrated.com; dmarc=pass action=none header.from=maximintegrated.com; dkim=pass header.d=maximintegrated.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maximintegrated.onmicrosoft.com; s=selector2-maximintegrated-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=D1N1bLfntiyv0Dz7c/VGfeIsYpZDEd5Lw66+H1uF/v0=; b=YeT9qLgzWH9iWfADpD4Td95JwXzdENTvGgl9rWzGvHqgBEoYOwUnwuSL6FvmRGGfjqjlJxaGf3Hys157boze8VdzLLDy17aOz3t3ExV4EQRC4tWhpOQoFBKglf/AmI1rhqUFDTqgO7o7pvNOePHiWFrQntU/1SNN9D993q/iPkg= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=maximintegrated.com; Received: from BYAPR11MB3382.namprd11.prod.outlook.com (2603:10b6:a03:7f::15) by SJ0PR11MB4798.namprd11.prod.outlook.com (2603:10b6:a03:2d5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Thu, 25 Mar 2021 03:36:35 +0000 Received: from BYAPR11MB3382.namprd11.prod.outlook.com ([fe80::cce5:1aa1:302f:a956]) by BYAPR11MB3382.namprd11.prod.outlook.com ([fe80::cce5:1aa1:302f:a956%5]) with mapi id 15.20.3977.025; Thu, 25 Mar 2021 03:36:35 +0000 From: Ryan Lee To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, rander.wang@linux.intel.com, ryans.lee@maximintegrated.com, guennadi.liakhovetski@linux.intel.com, vkoul@kernel.org, yong.zhi@intel.com, judyhsiao@google.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] ASoC:codec:max98373: Changed amp shutdown register as volatile Date: Wed, 24 Mar 2021 20:35:53 -0700 Message-Id: <20210325033555.29377-1-ryans.lee@maximintegrated.com> X-Mailer: git-send-email 2.17.1 X-Originating-IP: [73.189.52.211] X-ClientProxiedBy: BY5PR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:1d0::11) To BYAPR11MB3382.namprd11.prod.outlook.com (2603:10b6:a03:7f::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (73.189.52.211) by BY5PR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:1d0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Thu, 25 Mar 2021 03:36:34 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: e763d465-6eb6-4bfb-7e54-08d8ef3f304c X-MS-TrafficTypeDiagnostic: SJ0PR11MB4798: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:7219; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qdsDGkXNF1fMRFea5hSbyJ9dAAOv6mVoVnyCS2I+OOSlmmFPXWi8YJo7/vNuOgMtX9UFdmBomoqLpDT4NBU60ohiygXVUNNEUb85Kdj3D2fQaH+QGPfM96kaSI6bB1tCute7IhIgStz1MAXqDbgOdOp0QuqGyFygxcXlY/IwNxrGi1apkQs9wZi+iibmRO2ZTdzL4IH39DDR9dYmifQpSERzYGiV8z7H4WoSDsmE6gjjItMyUoi4ZrsFEke26Hn6jgVZp+8O9QlIvm1ubcyJSxvTd3WRCTKL83kMSsQOZ0KYm2PGYIp9/dX6g+WMYQ6wjqwTCBTnPsGnobO9yMEkg+dCzPdMx4kwf2uzEabVO0dqIrcsr/FRgcn2nsnLlY9da7MxWmMlOpeaCLs132IWEmOzK7o0BYPVi9J0zMiKE1Ijpq4U9xRJ+OYtDTs6mceOQhrbiZTK9+pZ9t5LSWqqcZ2rEROHynOQCEScq4NJZ51kuNSX6wgbnUxj3KzsudT8HUJdNuSU8U+AKdt5GykgoP80+62KkU1yENKkPL6bOJ0g/quHtNR5V/zkZ4YMALfRvGdQnFPXFgzwE4TNW0Rs5254uYBoKplGYWE1RpD3Xwu/LRgmXb8qIpZ7jylvR47ERD86teB9t0Sudym6RcJFp/8SPRZEqqCSIfKSOJfpgq/VYbp8O5NKvsaM3dnAkEmWzaEbZikqFMJ0vfu/dfO9zA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3382.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(376002)(136003)(396003)(346002)(921005)(478600001)(52116002)(6486002)(4326008)(6666004)(7416002)(186003)(69590400012)(26005)(2906002)(6506007)(16526019)(6512007)(316002)(8676002)(2616005)(66476007)(1076003)(36756003)(66556008)(5660300002)(66946007)(86362001)(38100700001)(956004)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: petIvoBotv8fUya4cWFqEVAn/xLAAC3GESGZKN8s7ooOGohJR2jUhiM+dXZVNeF+58AcPcUGNXBnEfnInD/DVqJC+7a4M3Lya0shgIfL/lfIj+euiVAqHxBpwMlhOcAdaFGOR+N87PBfin5uZy6Uk1J306SyZ4E7qgvRdTuG+SbMY/BXVS0Yjk1Iu9DeSVU988AZMoNbxyiZOtPdr5JB6SKoVax86taOExsPRuOmDCYahKaRO1Zo3hPipqLnk3OyQXkS8G9SI5WH9Eya4IDaWu0vZeiz3XzBu7hVTngaGtHfv+bLr34J4CYtFLLt6ESweq8YkTFZkrv2FYO0ksRucW9rTqEcrKslwHygPydAf6A4PbIJTRhyvw3YZcFpSLitNn/piwyGLZ5/Va65SjzfdCpmyRfecYg+shxiv7iCJ4oLj4Ffg59xsCEiAv3lwl12SSboiL4vAir0EtBPp0jclfxOsxwFkkqSwJbMEdVuWuaCn1F/dFyN6a2whAXODLRzFMwFrX0eWRBwRIyQcQbGyTl+I7bV5cOP6TYaE5RExZHAgbXCj9gy4GXS5uK8fNWBBTfFRvX+/4CcuUhHjxGS5p5vogMR88/Auep9zJeZ7jkkzvJswALRAp/db2clOiIVq5ddjYU7/FAdXHXzYpNIEXjhVHqa87b9kte+Iqq+E8QLRXTUTOoQPgkFQU/di0mBTyo4xMnYXsSDS97GWCYcsMk1PgQz7JYkppbnKWUu3R54Lp2IshjajegYrDZnmS9kvJfwga1gvSL493zwvkg3C1Dnv2jv/fWpkbME71wSY1sZZnCuMSM9RXRj25a3AMdlbci3nqFic8G1kKS8bbT8iO3Ws5NWze/7hLGpXS2siTBbQrmSuIQNVlo94StnTDYoFCJMy3I2t7HV7KVHoDRxJYnYVqST7SXte83yVsJpyVWNm4cCZhbzyeGviNmJFoMiq/0y46OifHXvBMeb+s1bI35mCz3btDcy++a58JMfscoeQGBarSCexAwZ/+sCPrabDACRAwn/1OQvrQpiiDuqn6OST6KiaZyDaxascQazLqlZeQ+lCPfrwSoDKCOyFvA57oJGtS3DmrsKBhZtC0E5e2Ojc5yY3Yfp6SE/MSmHQ8hf4r/zZc2JjGm0+wGdigwpmzxomUrIu7GS0BldB9oI4smnlMWjr1pOGrrC8lDSBKyxgf/kxXzbRQfUApGe5gMVOhOkFiWhhaPLbZDvpa6qoPVphKE2+i9nwHUgp/T275nfEBI2kfNo9+KE3I26hUiAVgBpKS9/j0npPRjSjE5EFt3KExmwgjtcf+Z0mnVz5jiiIi7GOfR7xitB/0Qd4YC4 X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-Network-Message-Id: e763d465-6eb6-4bfb-7e54-08d8ef3f304c X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3382.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2021 03:36:34.9180 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fbd909df-ea69-4788-a554-f24b7854ad03 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MIS5gcr1AdFc7EJDwKsu+frR8HxwbAkFq5ihl6SSN2jjWuGPPhLcMl5IDLHiw3CZ2dj8okdhZZbdcuUTGXvxpygslW1yolIyvINNZ5DU79g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4798 Cc: ryan.lee.maxim@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 0x20FF(amp global enable) register was defined as non-volatile, but it is not. Overheating, overcurrent can cause amp shutdown in hardware. 'regmap_write' compare register readback value before writing to avoid same value writing. 'regmap_read' just read cache not actual hardware value for the non-volatile register. When amp is internally shutdown by some reason, next 'AMP ON' command can be ignored because regmap think amp is already ON. Signed-off-by: Ryan Lee --- sound/soc/codecs/max98373-i2c.c | 1 + sound/soc/codecs/max98373-sdw.c | 1 + 2 files changed, 2 insertions(+) diff --git a/sound/soc/codecs/max98373-i2c.c b/sound/soc/codecs/max98373-i2c.c index 85f6865019d4..ddb6436835d7 100644 --- a/sound/soc/codecs/max98373-i2c.c +++ b/sound/soc/codecs/max98373-i2c.c @@ -446,6 +446,7 @@ static bool max98373_volatile_reg(struct device *dev, unsigned int reg) case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK: case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK: case MAX98373_R20B6_BDE_CUR_STATE_READBACK: + case MAX98373_R20FF_GLOBAL_SHDN: case MAX98373_R21FF_REV_ID: return true; default: diff --git a/sound/soc/codecs/max98373-sdw.c b/sound/soc/codecs/max98373-sdw.c index d8c47667a9ea..f3a12205cd48 100644 --- a/sound/soc/codecs/max98373-sdw.c +++ b/sound/soc/codecs/max98373-sdw.c @@ -220,6 +220,7 @@ static bool max98373_volatile_reg(struct device *dev, unsigned int reg) case MAX98373_R2054_MEAS_ADC_PVDD_CH_READBACK: case MAX98373_R2055_MEAS_ADC_THERM_CH_READBACK: case MAX98373_R20B6_BDE_CUR_STATE_READBACK: + case MAX98373_R20FF_GLOBAL_SHDN: case MAX98373_R21FF_REV_ID: /* SoundWire Control Port Registers */ case MAX98373_R0040_SCP_INIT_STAT_1 ... MAX98373_R0070_SCP_FRAME_CTLR: From patchwork Thu Mar 25 03:35:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Lee X-Patchwork-Id: 408862 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7EFB8C433DB for ; Thu, 25 Mar 2021 03:38:57 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A02C619FF for ; Thu, 25 Mar 2021 03:38:56 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A02C619FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=maximintegrated.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 80379166D; Thu, 25 Mar 2021 04:38:04 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 80379166D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1616643534; bh=b+oZHLzB0Fj5zF6s/SIQcyszgVNelhdRAueclegtJh0=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=j5J+P7yBQRhgp49980zN+UdOx5eyZAyVxxM255OYfqyaCPSDxbyaj1gQ8UqLuIl/f zyw/MstpGvbqahm5RLnoQGkeYD3i2bXCbrWhO7A9+cRDT9yyC0xw5Jz0FEWg4CFUgd 9OnboGqV1rcWMtNdPkRBtoDfy/aYDBLs8EX/7/5c= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id A20A4F8026D; Thu, 25 Mar 2021 04:37:29 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1166CF80268; Thu, 25 Mar 2021 04:37:08 +0100 (CET) Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-co1nam04on070f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4d::70f]) (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 3CBFFF800FF for ; Thu, 25 Mar 2021 04:37:01 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3CBFFF800FF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=maximintegrated.onmicrosoft.com header.i=@maximintegrated.onmicrosoft.com header.b="F07wYJzK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DRsuUG/yYmM7N7dlO+xZU09PP2wzH4S3NXNEIJhmzYmjWTO4/Aryz5mxYveIZTDPBGBF6CUMvEmEQSXE+GudoVSvM7/NCaNRsgInXhiAkssDalYCXGSKoHKlV5QOvmBJrEVPoWR6EJ4tYaD7ACV/ck1fv6ZnpPrj4Bwfj25R1FiXNTDV/1v0tRJC6AVn56EnbhL1VxSqz/qgARlk7sGUgiZEuMNm/DWLuSdnRbVsQKjyLhYNoEbc1Gm8VRK0YA+dZiEW2BTgmzENsGo7netil8aVEsvGSHJGxZVXS356yahcS9MZayRIshzisZnUUn0u3IuHjkoNXm1CYw9a1ZHrBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q3vv0O8XxBApWRhjYEe41jRjY+ih20wKd7MLzaVEtVo=; b=KGPaE5I1qmTmJOal0i/xYP+LSM4UVpJ16iB9eEXLBXbsk9B+nEx7RkNrKvfuTwEuKVZFZFfaywfgXDtj0w0THWWvjmBtroKH0GllboHBsnCiP0WpZ1Ebi/IL+52n6/r5itTjk/sYFvcE85eRJiRJv/G02zsFfhwu5s6qdLP1OV2AzQ6NkyrEnB4beRvvo4XJ4yf9EUlQk15sgJHEI3xTVRpRk5tAVp3IoIyibULJSkPYZhy6fIYSFQ0pQt8TU9fPYNcPD0ALJNt6y5XaMd+dauX17sCdezcOFMH/ACoZGR+QvRLUyB3azvz3HH9ySALv12BVkagGtFOlaG4/pjMvAA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=maximintegrated.com; dmarc=pass action=none header.from=maximintegrated.com; dkim=pass header.d=maximintegrated.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maximintegrated.onmicrosoft.com; s=selector2-maximintegrated-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=q3vv0O8XxBApWRhjYEe41jRjY+ih20wKd7MLzaVEtVo=; b=F07wYJzKPuMmC8Gl1jR3Q5LxevqAgNzlxQJSZpNBYxQH1hw4u6Hg8wm/FrnuV+EZjkOKwMgiCxQVHu4ExBAKpRoexKCeIXOdp9S1duLNDkVsq5GDu0gU77R6/KzSxQwt+9UvAN2nNDk35zmKFNFlnxfD4/MMeDqY9iiu9jMbciA= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=maximintegrated.com; Received: from BYAPR11MB3382.namprd11.prod.outlook.com (2603:10b6:a03:7f::15) by SJ0PR11MB4798.namprd11.prod.outlook.com (2603:10b6:a03:2d5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Thu, 25 Mar 2021 03:36:37 +0000 Received: from BYAPR11MB3382.namprd11.prod.outlook.com ([fe80::cce5:1aa1:302f:a956]) by BYAPR11MB3382.namprd11.prod.outlook.com ([fe80::cce5:1aa1:302f:a956%5]) with mapi id 15.20.3977.025; Thu, 25 Mar 2021 03:36:36 +0000 From: Ryan Lee To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, rander.wang@linux.intel.com, ryans.lee@maximintegrated.com, guennadi.liakhovetski@linux.intel.com, vkoul@kernel.org, yong.zhi@intel.com, judyhsiao@google.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] ASoC:codec:max98373: Added 30ms turn on/off time delay Date: Wed, 24 Mar 2021 20:35:54 -0700 Message-Id: <20210325033555.29377-2-ryans.lee@maximintegrated.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210325033555.29377-1-ryans.lee@maximintegrated.com> References: <20210325033555.29377-1-ryans.lee@maximintegrated.com> X-Originating-IP: [73.189.52.211] X-ClientProxiedBy: BY5PR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:1d0::11) To BYAPR11MB3382.namprd11.prod.outlook.com (2603:10b6:a03:7f::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (73.189.52.211) by BY5PR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:1d0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Thu, 25 Mar 2021 03:36:35 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 4b80dd6a-5444-4e40-b702-08d8ef3f3141 X-MS-TrafficTypeDiagnostic: SJ0PR11MB4798: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:580; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nAUD56j47zI5tmRpmKhj2W5fvQcvUMjicP8gGx2PIPtOlBKeUBfomDbI7AXQF2Ns67Kusgk0VYglYWkcGuBeMSniLUgyXRvvzRsnWLJWkKTUgTeQ5qofLpq8hO0o73VJZqQt0FVhn/JoRkj1hU9yyAPbf/sTlWH9DqQ2MMHWVZkrbQot2woBElxADp9YheWap4V26s7/7EmPAHkmGAK2Tr1kqwea5w7wHj12+s1Vlr/LqC3Ot1f5IYdxfm45vcLkV/LZ/OmAlAN7a43heZXDJwpgrmi89OO4tBT1Uf2IViqpybkRQwZKZ/hzTw1EU5HikIYPl9F5ql0Uheoi7URsn4/OKZ08A4DesoArmTw7fjxCkI4LdEt7PoEUCABJPwS28taBTn9PemlNwTVBWGJy8bBeYGtVQE85Rm3nkAaffdVKMCcTbdcauwF3cxFaKlDkaJxbSEGjDIz/enPiKzgQ7oknd8SQjPK9OwQnN/Yzr4uSJIxjsCqOVT6FimqWjEtOODX+PQHyJD3Lgm4nNWE5r7WFrbbu50wKCNBIKeFR6PFQuy9CaRolABlKieeUJYfI7jSJnrKgjoYRo7pgJnoSrR0L6rMyHBLZoJfFA+mvnmxOCFtAi1yOtvjo6Reux3f9kg4NmwSxqRh/XokgTi1CMvLv6LaXJZ48KUfWIhzxIGB/BrQvUIfGdYGpTbZ/M1Q8gwnsdCNS1EIbyvZydcl48g== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3382.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(376002)(136003)(396003)(346002)(921005)(478600001)(52116002)(6486002)(4326008)(6666004)(7416002)(186003)(69590400012)(26005)(2906002)(6506007)(16526019)(6512007)(316002)(4744005)(8676002)(2616005)(83380400001)(66476007)(1076003)(36756003)(66556008)(5660300002)(66946007)(86362001)(38100700001)(956004)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: N1QcTYMOe1iMMTxBqpMo3MNZWWLQ+J2k13SteSu+ZMmEv6U9c/WrgVOU6cQcFOxcGY++p1dOdw+HlEh1ntNcj2CTrPAmH33owmgquy/GSAbICRBGsWve11O7IFoK5Mg0bz3/zvFYsAn+PdZkDSQgdI7F5fHNHO8AIOg5pzylqRAnsSXTsoiWc4blpR7Jar/ttC+jyq44kBwP/wnoYRlK4qTdJWspSd94VMEcB4+fRHnEygTfP9gf+13x5j+Gu9sje1ioFhLfGpraYXaGr5nq6x6yXYvV2/MfWXLVgFx/OO/pCO4uwaUzYD/a54BQ3r/3tTdDVqD4Q8zz3kpO869awC2ykT910LN3pugVQ2ChKQXHxi+LD37NbBpJGsi2dYgP+wq2F8ZYhpg0+SJ+6/svAinrsIZgev/rG+7UAj8v9xr0rtIhzKU0mu2W2VMrTyVXNSJaTDAkjx6qucGCEtB/XwAUhH0umNFhioiV/UUG+wDM/BV4Cushi78GjqKOERsMQPokDGtahXdWXkw0H6SiOcjf0tFPEpJHvxRgcrF9Vwv3N/25arlyNJuVilsSLO5fyguMydM0Y4XEjTD/iQkLXgg1imLYptIjTJ5QizSijFpzuM7CSDZ052ErLfBjGu/RPlgZVipKb6Rz5P4TzrKh2xhYXkoz54zVAA8URBJsOts+2nsLsBRCKDv0rxvpstZ4Sjq3pyofS6jomU+iHx9PG6RvS49V2MYzKXPpsv9+I/j0o17pkGwFaYuIFdv4g5tUiukP3CoZp9V5+xtxYjV33Es93ia2nY9G6SB5ecLbnMUAsMJwJHwJ50QhCLUKj3HuPh1vFDUOMu5CJE+/BHd4bdmDUNsv/TAocKSCq/xWFcGXfJvlu/RSQc2PfCF1esDLGFCBf9hrFXa4RV14RMEzVlbUYKm96A0VI3MWe/MethtqoxljgQ4ZNF8LV4yPL9IovmCjVFWp3zaiFK0Ap5Jw4RMQeDqpH3A4CRLHLnj5Jx2Env5eIiNyxEqHU0PMYy/z6HVQfEgMo7H/h7yoHjg60vcpNjVe8Z+U8xmsSQb/bNDTiY+4vOLpCO7ZUXSyJbjBqBDlYjfdwbrbVABidotRW1cN5ob5OjbDw9uFl/JbEn8J1vcNsR4s2dUBYhAWFCQ/otoYhtmFXK0ZYKpeylaz/bnPUyEATdaO1Dp3yI4hqovHhSwgiAI9a93rSNtchwX8js6s8odG+bBCCOo18IvdVOM7ZsgwZ2EnkTZb+LEXeK5WMTTmdumLkLK0Kjy1tl3Y6a6ns6vL8nHriUVDAdjaZE/Q4tAy+Ka08xZp3aTcaavhLekyPnQoonXmBdYH9JlG X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b80dd6a-5444-4e40-b702-08d8ef3f3141 X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3382.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2021 03:36:36.7110 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fbd909df-ea69-4788-a554-f24b7854ad03 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: KpFaBGdWiou/ltCmEqQGVLcUK3kyV4Xoldu3r5m/3XagZRZ0b40/jscg/n4zedmusqFXCH96RdxuxfIDcrT33OjDbqL/y4/6+VFhpio9iQU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4798 Cc: ryan.lee.maxim@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Amp requires 10 ~ 30ms for the power ON and OFF. Added 30ms delay for stability. Signed-off-by: Ryan Lee --- sound/soc/codecs/max98373.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c index 746c829312b8..1346a98ce8a1 100644 --- a/sound/soc/codecs/max98373.c +++ b/sound/soc/codecs/max98373.c @@ -28,11 +28,13 @@ static int max98373_dac_event(struct snd_soc_dapm_widget *w, regmap_update_bits(max98373->regmap, MAX98373_R20FF_GLOBAL_SHDN, MAX98373_GLOBAL_EN_MASK, 1); + usleep_range(30000, 31000); break; case SND_SOC_DAPM_POST_PMD: regmap_update_bits(max98373->regmap, MAX98373_R20FF_GLOBAL_SHDN, MAX98373_GLOBAL_EN_MASK, 0); + usleep_range(30000, 31000); max98373->tdm_mode = false; break; default: From patchwork Thu Mar 25 03:35:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Lee X-Patchwork-Id: 409575 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, MSGID_FROM_MTA_HEADER, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EC433C433C1 for ; Thu, 25 Mar 2021 03:39:01 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF868619AE for ; Thu, 25 Mar 2021 03:39:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF868619AE Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=maximintegrated.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 83057166B; Thu, 25 Mar 2021 04:38:09 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 83057166B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1616643539; bh=cACkLRo1YFmy0P3kbuDdbyKrGp8sMYWU0C2dUW/VKSk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=aW51NDaPUXXCyBfEO/Hh5yYXGr8NncdHkOTL9e1EdxeNeDsRFenhE6Pk82AmN95tv aCtcU+PStcIO+MWdCPcILaeMit5fVVRGx9Dk05tLlZlVBoEcy+ABXKwwd6rD/0uN1j 8pC+YP/UEyVO2vG9JzyPYdFyGcnSO8t1nicM8HHY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0ADC9F80290; Thu, 25 Mar 2021 04:37:32 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 57E7CF80257; Thu, 25 Mar 2021 04:37:12 +0100 (CET) Received: from NAM04-CO1-obe.outbound.protection.outlook.com (mail-co1nam04on070f.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe4d::70f]) (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 E95B8F8025F for ; Thu, 25 Mar 2021 04:37:02 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E95B8F8025F Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=maximintegrated.onmicrosoft.com header.i=@maximintegrated.onmicrosoft.com header.b="J2APmxxY" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=czrIyGroAzIqfMwJWLekKe4ysVHmU3W2Zvn0sHgyF230l9jaSgcw73XEmDOhBKfN8bN+5H0+hRNL5RUzThugMKl83x2RWIxTftif2Q1zvv7AkBrUyn4plcJdabhh7wELmxqr8qf8N2dwTM1uzZqFDVAzWL9N68tGT5O36n02xLH28wXib43XouoN38fLPSqd1oeDtsM4uZrwpRveSnqHV+xz/GnFx5EyT1vlSfjl7LGUcMF1oQ13Bi51bhcfpYEv4TiIQNKQDbqljT3YrzamR3l0b6O6I6V13O5dHi6nADJINecxhi+pC1drCvQZ87VNbK/8jPhqCx1Jdrxhbgo9SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+wDd7n5cgXIcltEj8IDCLemSRUOR5/Ppb2B5PRam3yo=; b=PA7JeROCSKPimThY/o0QUkJs9h70b/JLhQOUZ1ytq8Ii501sqYxzlT723r5vnjtxL2NR+7QaJNqG60FrxPxSX53xdfNkP3XJcALwa9rhd7ay5MC/up9mcG/siao1ghFb7xadS+fAqAGvX5dWrFpKFNbllmw6JabGMz8nc39KBiR9VdA7Yx3Va0ECmsIgeZtFr474c0GxroBuiV36PxUwKlwkkh2H+XAk1MhBFVqkYFJ0sJihV5ZF13OgZ2RjyvzdPbXFjt+sVTqlgp2peuMgbD/ODzI1af6aRP0Xgob8Cz5mW/wT7S31yA7oYjeGSIeZqax/vclZHihTM1GNfymfoQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=maximintegrated.com; dmarc=pass action=none header.from=maximintegrated.com; dkim=pass header.d=maximintegrated.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maximintegrated.onmicrosoft.com; s=selector2-maximintegrated-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=+wDd7n5cgXIcltEj8IDCLemSRUOR5/Ppb2B5PRam3yo=; b=J2APmxxYal1Jn8Lhem0RGi0eclC328mZbfD+XzIXdmbIL4oZ/K3QjqtxdxuouOKj61fVWRgixnEAVttFO2LftsLUb/aNpbmCCSwxKctiMSIPc/LAPLM2ZYKTxN8IACKB9n/YA6byVMJ9ShaXPUES0x0q44vT4nsSLTsCNHh1BpA= Authentication-Results: gmail.com; dkim=none (message not signed) header.d=none;gmail.com; dmarc=none action=none header.from=maximintegrated.com; Received: from BYAPR11MB3382.namprd11.prod.outlook.com (2603:10b6:a03:7f::15) by SJ0PR11MB4798.namprd11.prod.outlook.com (2603:10b6:a03:2d5::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.25; Thu, 25 Mar 2021 03:36:39 +0000 Received: from BYAPR11MB3382.namprd11.prod.outlook.com ([fe80::cce5:1aa1:302f:a956]) by BYAPR11MB3382.namprd11.prod.outlook.com ([fe80::cce5:1aa1:302f:a956%5]) with mapi id 15.20.3977.025; Thu, 25 Mar 2021 03:36:39 +0000 From: Ryan Lee To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, pierre-louis.bossart@linux.intel.com, kai.vehmanen@linux.intel.com, yung-chuan.liao@linux.intel.com, rander.wang@linux.intel.com, ryans.lee@maximintegrated.com, guennadi.liakhovetski@linux.intel.com, vkoul@kernel.org, yong.zhi@intel.com, judyhsiao@google.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] ASoC:codec:max98373: Added controls for autorestart config Date: Wed, 24 Mar 2021 20:35:55 -0700 Message-Id: <20210325033555.29377-3-ryans.lee@maximintegrated.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210325033555.29377-1-ryans.lee@maximintegrated.com> References: <20210325033555.29377-1-ryans.lee@maximintegrated.com> X-Originating-IP: [73.189.52.211] X-ClientProxiedBy: BY5PR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:1d0::11) To BYAPR11MB3382.namprd11.prod.outlook.com (2603:10b6:a03:7f::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from localhost.localdomain (73.189.52.211) by BY5PR04CA0001.namprd04.prod.outlook.com (2603:10b6:a03:1d0::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3977.24 via Frontend Transport; Thu, 25 Mar 2021 03:36:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 075c2253-ac2e-41b1-1d13-08d8ef3f321a X-MS-TrafficTypeDiagnostic: SJ0PR11MB4798: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:327; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: DGaaZwVfZxeMRqYrqJjyYbWEE2NdYWRIdhR38zJw+7tD4Gu5b76hfGiRYO5o5dW+zjcxh+dd8fU4VxLmIWAbfOkvfrZoXiDhozTIACIDlhlcdvX/ffEFqoSUgv/B/v58YsT2OqBPbWkEN+eMrXQ4+nZbav7c0RRQjbL8iznu9WZxiacW+V1ibCMo8B8fkWjz0VOr1O3hBWeWg3Qm46V39C1xsN1q/jbIV9uif0UufTm+W1pEWICLdSX4M7MwQPZDZQWWcDIVyoM3itKd03niAz5kuP6ClPYjsxeDLGuT5Qw0ONbsSdBmfVSkit18iyH70LkpmoG1GufyyM9Xk0I3v/cl6QqGa85vj/6uHqQiOJiETXlekJIAebsXUN37fT17H8J5DaT7znB4fbutuvCMyxgV2wxsMSX6K4IMD1d5k8PLS2aKN7CDUPOvbcLbB3zn19gOBo670ga9b2g/ZuOsmW/viGM9PJDw2XnBdN2hLS60y4tQ+GQPvF++ucsrA92tVo4YFWA8fNQuXUW/p9SmmtX7H1cboaOTjidA5pW6uE1UOvadeobBami1emKUo1FI6zAkIg4iEKTn2TI7V/ppw/oNWNva3zsg7mXhWQOfq1rC9R8k7Qe5a41qPV6qs+FPJTu38aU5uOJQof8lMdac8qFgdilstWRC1SJKSf2yVWkANouhceEQwjOksPoR0qrpEMnieAJztbmU7pw5lzQtkg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR11MB3382.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(39860400002)(376002)(136003)(396003)(346002)(921005)(478600001)(52116002)(6486002)(4326008)(6666004)(7416002)(186003)(69590400012)(26005)(2906002)(6506007)(16526019)(6512007)(316002)(8676002)(2616005)(83380400001)(66476007)(1076003)(36756003)(66556008)(5660300002)(66946007)(86362001)(38100700001)(956004)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: taFvgZS9P2jsiijG4g+f4TpAM0iUuY/xAbWv33f0opHlXk8RkGuP0zD2vQMepAjSm83PWk+ygFUaDkUvGwXGOMZp/7VkuLGsXQF6Lyf736LKkpf4CLcrri51OupE35JU1PAKwmQf0abcHcWdbJ6jWAGGj7Z8q20CgJetnaFOZePzVGh7qowDLKgBo6UmPmtWV0frp9cTRF7QpKcfH/6tbV4ETGGh/HkN98B1pu1yW9S/g1KxGbOgLr53ADqhRz6ZEWe1vjr9t0HiU496UPYkSJSfxJLTubMsSmiDydC6v4y8u2G66y6k9+sH2Lm2M9whbvrk7MPjHN8HqYqOYwl+Plm4zyOcR5+I5feg6hD3waT5pBhohJzVP0RR+HyX/I5QQbvEhHL0gG2qOaRpztmc2RuTPzGLr3Wf70HUHRR0LTAl9+TD5ghSnzujFz2g3HiOZ7x1whOvVH/8Lb4I2E8+mONTPJBJbGyigtE5dDNi2M4DbPVWOodNoCadGn36SMDtlW0Rq9GJuV70Z0NTyNEIrQLTJLkGTYkYqxyqLOxHtYpyJtaUc7LkxLUzI9Zcj2ioFkOxk+8gqw9R15qzZYK28qM9VktyCKq+53G1f4MDdN4L23arzRWGTuAoKzp2PfP1G+uCRoKBvi+YxIeiGhYBeNUhFKjRRLO69DW7Quw0z+3TNTtKL4ccRtQJp2sUH79BbhHqXtcoH6kUbcJgc0UyZ5PIVKDHoyw4Qr2/teb9UeUJ1x0fbgNSICH5XyJbghaCDZcza9uTglgYLn0QVKMcRpr8xNClcbPCT168ixyP/c7rJ7jqBK7p3FQtlrxd3gvNCkacCfP9DnVtTg2HTPPTg0AP+FM7xLPNhCEstnQ4y+sqeZ2tFG8eUZaRNE+kjkndGchlBNaCQaVRy2f/5rv6JXEMry2pcW9WXeQ6d/YTV7qDEl+H+SM0NMgdBDifB5PMQMQItETIlKiF2PYEC2toglhJzVabAu2iG9GkmDcSohGt9uaX9at5SgzKxXXjUzzaxEvp+DMIapeZ5bAORdcvlJfDllYv8GVRm2kO9n/lOG/FE5eWEPJev0kC2bDhHFq64olIwGjfqK8Oby3ZtCa0DLowCz8bctJpGob3v+gVFQo3HlLlLKrF5kMVJR57BXrdUfRtTKL2eiNma/ligZshBmim7tJW1Q9qqTdPFf62myuXDvXx/hU/Fc7xfzrCzvsHibkogD2KAKmg4i6g6dtmId+Yef7S0wLmI8SGpPUD4BrSDj72tX8668g9kxA0QJtGSg9/jja1765xx6FGzw+MKENyz+o+FD0khaySU4IQF+/6mFL0X4FaTn8NIdIRsZXV X-OriginatorOrg: maximintegrated.com X-MS-Exchange-CrossTenant-Network-Message-Id: 075c2253-ac2e-41b1-1d13-08d8ef3f321a X-MS-Exchange-CrossTenant-AuthSource: BYAPR11MB3382.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Mar 2021 03:36:38.7168 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: fbd909df-ea69-4788-a554-f24b7854ad03 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 0BoOj3FFX98oUJjoYulgb3ocflQI8y9hR2mDS0ZkV5lW5xH1C6nFOvG4u8zEI7f8pzC5TFNb5/lEltNqX8g8/3tOZJ0Q1MC/vIPPNHFOu6Q= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB4798 Cc: ryan.lee.maxim@gmail.com X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" 3 new controls are added. "OVC Autorestart Switch" : controls whether or not the speaker amplifier automatically re-enables after an overcurrent fault condition. "THERM Autorestart Switch" : controls whether or not the device automatically resumes playback when the die temperature recovers from thermal shutdown. "CMON Autorestart Switch" : controls whether or not the device automatically resumes playback when the clock returns after stopping. Above Auto Restart functions are enabled by default. Signed-off-by: Ryan Lee --- sound/soc/codecs/max98373.c | 14 ++++++++++++++ sound/soc/codecs/max98373.h | 3 +++ 2 files changed, 17 insertions(+) diff --git a/sound/soc/codecs/max98373.c b/sound/soc/codecs/max98373.c index 1346a98ce8a1..e14fe98349a5 100644 --- a/sound/soc/codecs/max98373.c +++ b/sound/soc/codecs/max98373.c @@ -204,6 +204,15 @@ SOC_SINGLE("Ramp Up Switch", MAX98373_R203F_AMP_DSP_CFG, MAX98373_AMP_DSP_CFG_RMP_UP_SHIFT, 1, 0), SOC_SINGLE("Ramp Down Switch", MAX98373_R203F_AMP_DSP_CFG, MAX98373_AMP_DSP_CFG_RMP_DN_SHIFT, 1, 0), +/* Speaker Amplifier Overcurrent Automatic Restart Enable */ +SOC_SINGLE("OVC Autorestart Switch", MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG, + MAX98373_OVC_AUTORESTART_SHIFT, 1, 0), +/* Thermal Shutdown Automatic Restart Enable */ +SOC_SINGLE("THERM Autorestart Switch", MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG, + MAX98373_THERM_AUTORESTART_SHIFT, 1, 0), +/* Clock Monitor Automatic Restart Enable */ +SOC_SINGLE("CMON Autorestart Switch", MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG, + MAX98373_CMON_AUTORESTART_SHIFT, 1, 0), SOC_SINGLE("CLK Monitor Switch", MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG, MAX98373_CLOCK_MON_SHIFT, 1, 0), SOC_SINGLE("Dither Switch", MAX98373_R203F_AMP_DSP_CFG, @@ -392,6 +401,11 @@ static int max98373_probe(struct snd_soc_component *component) MAX98373_R2021_PCM_TX_HIZ_EN_2, 1 << (max98373->i_slot - 8), 0); + /* enable auto restart function by default */ + regmap_write(max98373->regmap, + MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG, + 0xF); + /* speaker feedback slot configuration */ regmap_write(max98373->regmap, MAX98373_R2023_PCM_TX_SRC_2, diff --git a/sound/soc/codecs/max98373.h b/sound/soc/codecs/max98373.h index 71f5a5228f34..73a2cf69d84a 100644 --- a/sound/soc/codecs/max98373.h +++ b/sound/soc/codecs/max98373.h @@ -195,6 +195,9 @@ #define MAX98373_LIMITER_EN_SHIFT (0) /* MAX98373_R20FE_DEVICE_AUTO_RESTART_CFG */ +#define MAX98373_OVC_AUTORESTART_SHIFT (3) +#define MAX98373_THERM_AUTORESTART_SHIFT (2) +#define MAX98373_CMON_AUTORESTART_SHIFT (1) #define MAX98373_CLOCK_MON_SHIFT (0) /* MAX98373_R20FF_GLOBAL_SHDN */