From patchwork Fri Apr 12 10:35:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WTLI X-Patchwork-Id: 788297 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 D4C4CC4345F for ; Fri, 12 Apr 2024 10:39:09 +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 04E4023D6; Fri, 12 Apr 2024 12:38:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 04E4023D6 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712918348; bh=6S416KwxLfCtEeZ6OyMeopnp0v2WlooLPqk1tgImJgE=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=FYYKeiYJbzCosU1TRTY21vsbb99IDyATs/OHFGpm5BFvYdH50BLzOPZd3lAv2O9ZK NNO+OiKX3fIT4xuT0D2Bfk22zN1euyr1bDi3e1Ut9oEIcWksjbRPIc3WTF7S2ZXBDZ 9+zFalPIqt2LJQUmvQEVQUtiCcn8Us+enK+0+Z0c= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7F33BF805D5; Fri, 12 Apr 2024 12:37:59 +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 EEE57F805F5; Fri, 12 Apr 2024 12:37:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 52B96F80238; Fri, 12 Apr 2024 12:36:28 +0200 (CEST) Received: from APC01-TYZ-obe.outbound.protection.outlook.com (mail-tyzapc01on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2011::600]) (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 5831EF8026D for ; Fri, 12 Apr 2024 12:36:10 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5831EF8026D Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=nuvoton.com header.i=@nuvoton.com header.a=rsa-sha256 header.s=selector1 header.b=f/y3/o+O ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RKImd7XeZh/fBOwxLz5MHI6E1T97lGnWmPvl+OZl6xbBoNKK3qqq2fzr+de7zoKbwR1zWI/cFsSd0OIQjsoN8yXBbWlS6IimD7bQo7bt7cOeWG5rmJVrPBgp1wP14rctqYGEiIVPbQOQ2twoAKzf80SpwyCd8LLCuwkvtTyEgxi0J9Iy9V/KUxSM/t0smu1oOO15olkT5Th2WixnwwY4oSppGkTw0+L9chrwWE7zJ+yKOWHnTNB1Lxzc3MmGiKjvJjdN//zt2OsXHVRNTB+g0OmV4WkO0p9Y6u46MnvGGcDtJtmPvjHSm0gfEfeWeGDF2KvqySpPfzkzJMcGbHL01g== 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=EUvrX9jrmtMjpHmz6D8VLu5LDN7o/EHtoES/dsqqc4o=; b=d+CkUYipw1S/5dmrLsw868rGaWs8yjSMLwR1A6GF/XY9qv5uHM6+ujoHeHtLCExuQDRM/37YJM2woGte3bUNbq5tE0ehnTUuC7N5g20zoHaavNAMaW2UrcdhHJn/8GmJVZVUINkqh4AVprWpHwmEX9Aiw43U83RTEpgjcYePGmIHOTCuw2bUatNDzBBO6UuGOgns2o5IDwxd4mB2XfS5TgxIR4dChrrqeo624pCPoBS2sd0si3J1VONgeLzXQNHkCJrpU9SzDR1pSUUi2zpo2+ziAeTIvs3dkS/sC5hnYfswNh3+AhwOQoiHvGiYFEti2g90S4mNdsBOag8nuqZ9bQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 211.75.126.7) smtp.rcpttodomain=kernel.org smtp.mailfrom=nuvoton.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nuvoton.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuvoton.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EUvrX9jrmtMjpHmz6D8VLu5LDN7o/EHtoES/dsqqc4o=; b=f/y3/o+O6NZqBha72xpiztySIv0B/HIl5kTTMi6Mu7IZUyZc8I9HlQXTf61IPJ1GMCV+ER4OdRWBjeM0h5MMABdfjdXHpajIWF1tLxCR/TiVnSI5yUazVZgwPQt44jY+lZkaqX/eeAoqhOzWDZJxGfCKopF1qnT2EMCfdK3TwmM= Received: from SG2PR02CA0035.apcprd02.prod.outlook.com (2603:1096:3:18::23) by TY0PR03MB6536.apcprd03.prod.outlook.com (2603:1096:400:21c::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 10:36:00 +0000 Received: from SG2PEPF000B66CA.apcprd03.prod.outlook.com (2603:1096:3:18:cafe::57) by SG2PR02CA0035.outlook.office365.com (2603:1096:3:18::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 10:36:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 211.75.126.7) smtp.mailfrom=nuvoton.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nuvoton.com; Received-SPF: Pass (protection.outlook.com: domain of nuvoton.com designates 211.75.126.7 as permitted sender) receiver=protection.outlook.com; client-ip=211.75.126.7; helo=NTHCCAS01.nuvoton.com; pr=C Received: from NTHCCAS01.nuvoton.com (211.75.126.7) by SG2PEPF000B66CA.mail.protection.outlook.com (10.167.240.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 10:36:00 +0000 Received: from NTHCML01B.nuvoton.com (10.1.8.178) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 12 Apr 2024 18:35:55 +0800 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCML01B.nuvoton.com (10.1.8.178) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Fri, 12 Apr 2024 18:35:55 +0800 Received: from localhost.localdomain (10.11.36.27) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 12 Apr 2024 18:35:55 +0800 From: Seven Lee To: CC: , , , , , , , , , , , , , , , , , , , Subject: [PATCH 1/3] ASoC: dt-bindings: nau8821: Add delay control for ADC Date: Fri, 12 Apr 2024 18:35:52 +0800 Message-ID: <20240412103554.3487290-1-wtli@nuvoton.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-NotSetDelaration: True X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PEPF000B66CA:EE_|TY0PR03MB6536:EE_ X-MS-Office365-Filtering-Correlation-Id: a69cfc3b-137e-494e-0841-08dc5adc586a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p6jPcI/C54wRH3dO005Ca9wMFQ91G1IjHTLgq1B1oIKZtUqaPrMLnhJAC/dJuWKYCXCbS25yARR0M6tvbQKzTMrFVzAxXIFLE3mTHgmp2wdAbAQlDtMIYSUf155hRGXpucvTZaVkfJZnwTon5DpuWQjaV5GnrjDdEUtuCKzvm1NQs7RrVoulMKfzCZ7ODcq4Y8Qd7MH0fNEzt574J9ihJ7S+Fd/w2pgRSvayHDaag9TX05NFTm9m2Je1O424YCvZmtr9YwXxU871AKepabRxFw9sbx2dFQ90hN887a2bse0EA3gYYwvOjSTz9HjE5qvnk0Up6tjp8WmbumCfKB8uTXli2j+D/QW5LwSS/0nP7ts44der6lH7HPkpxhr4DW0lpMoTsNjFxGtXsfiYEEBUGPiDhzinZS+vbhRWnNLXvUjpxHDfJWksspXy7kTcFIiv0cAjoOn/T5Mt4qORQDzFTQSjiNEiEcTJLlYc/1DhAHorV5PtCMv8+a90hUprERgwHWFJcJFIHlg47HIMeZMR7VH/GTa6cDzm5chfGsL5jYs3S/1MLFdc3TGn++9wt0Gki5sK4460bpne22AEhK+GMwYrBP83JWFxpJ14NZJ0Bueck67otWBUVJrlqY+A8EwG6nEHOFT/kzghrPneq3QGJzEAqXnp4frTL1G2bBiFQBuG7yVIJf1rC8vmj0q3VdifCYRqb0cIhW/tXSS+Zs4k1ZA/VPGTuYcFUEMFgvaThHjRFtk8A7h5sLr/AvAb5krI X-Forefront-Antispam-Report: CIP:211.75.126.7; CTRY:TW; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:NTHCCAS01.nuvoton.com; PTR:211-75-126-7.hinet-ip.hinet.net; CAT:NONE; SFS:(13230031)(36860700004)(7416005)(82310400014)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: nuvoton.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 10:36:00.1322 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a69cfc3b-137e-494e-0841-08dc5adc586a X-MS-Exchange-CrossTenant-Id: a3f24931-d403-4b4a-94f1-7d83ac638e07 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a3f24931-d403-4b4a-94f1-7d83ac638e07; Ip=[211.75.126.7]; Helo=[NTHCCAS01.nuvoton.com] X-MS-Exchange-CrossTenant-AuthSource: SG2PEPF000B66CA.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: TY0PR03MB6536 Message-ID-Hash: WHEDCPTSJ4FNZLLMUGPEV2G6CLM7U4A4 X-Message-ID-Hash: WHEDCPTSJ4FNZLLMUGPEV2G6CLM7U4A4 X-MailFrom: WTLI@nuvoton.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Change the original fixed delay to the assignment from the property. It will make it more flexible to different platforms to avoid pop noise at the beginning of recording. Signed-off-by: Seven Lee --- .../devicetree/bindings/sound/nuvoton,nau8821.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/nuvoton,nau8821.yaml b/Documentation/devicetree/bindings/sound/nuvoton,nau8821.yaml index 054b53954ac3..a726c5a9b067 100644 --- a/Documentation/devicetree/bindings/sound/nuvoton,nau8821.yaml +++ b/Documentation/devicetree/bindings/sound/nuvoton,nau8821.yaml @@ -103,6 +103,13 @@ properties: just limited to the left adc for design demand. type: boolean + nuvoton,adc-delay-ms: + description: Delay (in ms) to make input path stable and avoid pop noise. + The default value is 125 and range between 125 to 500 ms. + minimum: 125 + maximum: 500 + default: 125 + '#sound-dai-cells': const: 0 @@ -136,6 +143,7 @@ examples: nuvoton,jack-eject-debounce = <0>; nuvoton,dmic-clk-threshold = <3072000>; nuvoton,dmic-slew-rate = <0>; + nuvoton,nuvoton,adc-delay-ms = <125>; #sound-dai-cells = <0>; }; }; From patchwork Fri Apr 12 10:35:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WTLI X-Patchwork-Id: 788298 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 E38B0C4345F for ; Fri, 12 Apr 2024 10:38:40 +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 C75CC2367; Fri, 12 Apr 2024 12:38:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C75CC2367 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712918317; bh=0lGJraeOnhn2LSfbE4L9G1q3vyowZF0x4ziiuiJ7DgI=; 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=rHLq+gCIm7AQFA59iZdiZu2D+VWGkC0wZT9S/EBAPhfrT+LxXtV/ZAUMaZlWPQ2ST l4mOwi227l7xul68bX7+/kQbjMHdrXtmgOXXth6smgmKV+BHIYW0UOvcqHasKR+F+4 XZpABT5mAAxg09/ydU7XpIjJrCuhfFmLV63OTNuM= Received: by alsa1.perex.cz (Postfix, from userid 50401) id C9FA6F805AD; Fri, 12 Apr 2024 12:37:56 +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 416BAF805A9; Fri, 12 Apr 2024 12:37:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5D89DF80423; Fri, 12 Apr 2024 12:36:23 +0200 (CEST) Received: from APC01-SG2-obe.outbound.protection.outlook.com (mail-sgaapc01on20625.outbound.protection.outlook.com [IPv6:2a01:111:f400:feab::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 D86AAF80236 for ; Fri, 12 Apr 2024 12:36:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D86AAF80236 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=nuvoton.com header.i=@nuvoton.com header.a=rsa-sha256 header.s=selector1 header.b=O5AHDJDS ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YXUgfc8WxY16wA02lSCa7Lxgn7cjn2YDhK5khtxPYKt0wOcB76JA7vFfbkZh2WEEDHvm9TeUO88QBV4+M/uxGcPWZVN9fqkdeXZbt3c8gHADZsaPTU/1r6Ae8O4/5pJv39c9OPHUQ3OhHWXw5h1suOFwVxWM7PlqDu6uZ7zpBUAfWhMUjGFcFtPfeU0pFgo+8NLL5IpxYyBgy0ZEXUIH330ruY117mhUGNtPheaSkVPSVayaOqsO+L79xx4KX3eskyQ1LnMkanCDvFvoGzVSHVR+wNSW5HlgvRWPMGAY7YoDZpqJ9qWEi2TmgssEW2ItmVgyY7qXoIkVw6DaVSpolw== 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=PYxW85wyM+TsJ4FqeTwjSl+YqmMB37izNjJ8yOHYDkA=; b=mKbVv4Z3V6zYWznWLaJm3DO4y3XIF0DrxRVJ1CtpzmXdtT0TOKKqDkGNstq1Qrbx7w03qr/ut1zqG5OwYhfen2/AhQ/P5SPe0qTmEj9BhmbRXiivI2XmVsuHXOsutIvF3FNUkTNPNBgVXJozGQ1gUDFD2wafnllTWAqLeR1tAcC4cHoP1QSRGLUgxHuOcpPXAmU3fgyjlMbCUp7nelKtgQJZhdLAedBg28SxotPYSnAIxbwQQoGBqN0I6cte6wPZ+rA79JJSJj9xvfm8omPGlVlhKecLDY6RjxtYOJgtRP39KD9w25F5irNoD4Oa221UXelDXRb0R9HEOW/lIKABQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 211.75.126.7) smtp.rcpttodomain=kernel.org smtp.mailfrom=nuvoton.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nuvoton.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuvoton.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=PYxW85wyM+TsJ4FqeTwjSl+YqmMB37izNjJ8yOHYDkA=; b=O5AHDJDSI635RgWCThEHRqFRAWjAbaBzW/hjHlP/iirLOyeXoBaRF+hqT9Kdjuh09XfpPdhkS0XxEdSaqcerJv/2hOaZpkX9q46KjRl9tumIFrtlEWDubPDrjEAzFRSkFKztGMcMZJe5J1eK8hXUFlJq/nYLXeA69g5N8SSPhgc= Received: from SG2PR02CA0032.apcprd02.prod.outlook.com (2603:1096:3:18::20) by SEZPR03MB7005.apcprd03.prod.outlook.com (2603:1096:101:ac::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 10:36:02 +0000 Received: from SG2PEPF000B66CA.apcprd03.prod.outlook.com (2603:1096:3:18:cafe::d7) by SG2PR02CA0032.outlook.office365.com (2603:1096:3:18::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 10:36:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 211.75.126.7) smtp.mailfrom=nuvoton.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nuvoton.com; Received-SPF: Pass (protection.outlook.com: domain of nuvoton.com designates 211.75.126.7 as permitted sender) receiver=protection.outlook.com; client-ip=211.75.126.7; helo=NTHCCAS01.nuvoton.com; pr=C Received: from NTHCCAS01.nuvoton.com (211.75.126.7) by SG2PEPF000B66CA.mail.protection.outlook.com (10.167.240.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 10:36:02 +0000 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 12 Apr 2024 18:35:56 +0800 Received: from localhost.localdomain (10.11.36.27) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 12 Apr 2024 18:35:56 +0800 From: Seven Lee To: CC: , , , , , , , , , , , , , , , , , , , Subject: [PATCH 2/3] ASoC: nau8821: Add delay control for ADC Date: Fri, 12 Apr 2024 18:35:53 +0800 Message-ID: <20240412103554.3487290-2-wtli@nuvoton.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240412103554.3487290-1-wtli@nuvoton.com> References: <20240412103554.3487290-1-wtli@nuvoton.com> MIME-Version: 1.0 X-NotSetDelaration: True X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PEPF000B66CA:EE_|SEZPR03MB7005:EE_ X-MS-Office365-Filtering-Correlation-Id: 010c9392-7797-45fc-2270-08dc5adc59a7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Yi4kMmjMmJOgoeXzzVH36EpUfX/Z/evJr5Mc4ioBnclM9RNJOex4cwmTZ7A+xttHrKR+78APboby8LVPbDKwxK6bformgzkAVURJl4u89vmw1+CUKUngChKSEMdYZZIU/p22FjgwXIXbuIWE6FVbadlRD51NE9NsjOcrTrTI31KOPYGQQC5Pcb/KJwx382Xx/k1Zz5Rp87zAJQH9emwz0iz4xmmviQbSnMEnHu2ompBOVFDUKhHI6BwPa9WUH2uM308NGZY9F0jsNI5pO8kEI9DLYEYHDCpwP1aV7ib2L3ART7aTlB1npr0Un2d3i7NU22KzTfyawmS9G2ejiX8Kmqg6X+WNccd/QjSYQXTOcy+XiDoXQgVjIAUsgDOWhHQFoLJDZB5HEdx5McXr4HHfQ5FHGrsdFX+fXjPosnifgtupp3DOIpuXlaym3PpjcVl6JyFGq+j6CHvuY1q2CDiXb4bgHU9UGP2Fj2hU6IbFZFAwsWLPiIak/Paso4Mv9J6xt5Gd++e1s7LOyqCu8Eu21mt60te3+pzCTI/CqNCXV4/pk8nDix3Nqf6sQLj2yNg60e2H+trR3/15hkAj8cjOKqQKE2vl/t/ObutQXqnGbIf/ddxzQPzbtGWrxxhPzRZ74qnJQbfV3d3LpMHFhhwqeGPX7ESobeOu0C6oh4R2ZYfuUC5099RB8oRxlspwP2FNA2C6T7PLAfcclfz/PZQzP8a4mON5B7+MvgqUR1QVPO7GFSbJuaObSZA5YB3386Mg X-Forefront-Antispam-Report: CIP:211.75.126.7; CTRY:TW; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:NTHCCAS01.nuvoton.com; PTR:211-75-126-7.hinet-ip.hinet.net; CAT:NONE; SFS:(13230031)(36860700004)(1800799015)(7416005)(376005)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: nuvoton.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 10:36:02.2104 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 010c9392-7797-45fc-2270-08dc5adc59a7 X-MS-Exchange-CrossTenant-Id: a3f24931-d403-4b4a-94f1-7d83ac638e07 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a3f24931-d403-4b4a-94f1-7d83ac638e07; Ip=[211.75.126.7]; Helo=[NTHCCAS01.nuvoton.com] X-MS-Exchange-CrossTenant-AuthSource: SG2PEPF000B66CA.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEZPR03MB7005 Message-ID-Hash: YRZA77BZUL2RPHWD7W5HG2P3TBKE3Q2L X-Message-ID-Hash: YRZA77BZUL2RPHWD7W5HG2P3TBKE3Q2L X-MailFrom: WTLI@nuvoton.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Change the original fixed delay to the assignment from the property. It will make it more flexible to different platforms to avoid pop noise at the beginning of recording. Signed-off-by: Seven Lee --- sound/soc/codecs/nau8821.c | 11 +++++++++-- sound/soc/codecs/nau8821.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index 012e347e6391..fec669e00a10 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -511,7 +511,7 @@ static int nau8821_left_adc_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_POST_PMU: - msleep(125); + msleep(nau8821->adc_delay); regmap_update_bits(nau8821->regmap, NAU8821_R01_ENA_CTRL, NAU8821_EN_ADCL, NAU8821_EN_ADCL); break; @@ -535,7 +535,7 @@ static int nau8821_right_adc_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_POST_PMU: - msleep(125); + msleep(nau8821->adc_delay); regmap_update_bits(nau8821->regmap, NAU8821_R01_ENA_CTRL, NAU8821_EN_ADCR, NAU8821_EN_ADCR); break; @@ -1697,6 +1697,7 @@ static void nau8821_print_device_properties(struct nau8821 *nau8821) dev_dbg(dev, "dmic-clk-threshold: %d\n", nau8821->dmic_clk_threshold); dev_dbg(dev, "key_enable: %d\n", nau8821->key_enable); + dev_dbg(dev, "adc-delay-ms: %d\n", nau8821->adc_delay); } static int nau8821_read_device_properties(struct device *dev, @@ -1742,6 +1743,12 @@ static int nau8821_read_device_properties(struct device *dev, &nau8821->dmic_slew_rate); if (ret) nau8821->dmic_slew_rate = 0; + ret = device_property_read_u32(dev, "nuvoton,adc-delay-ms", + &nau8821->adc_delay); + if (ret) + nau8821->adc_delay = 125; + if (nau8821->adc_delay < 125 || nau8821->adc_delay > 500) + dev_warn(dev, "Please set the suitable delay time!\n"); return 0; } diff --git a/sound/soc/codecs/nau8821.h b/sound/soc/codecs/nau8821.h index 62eaad130b2e..f0935ffafcbe 100644 --- a/sound/soc/codecs/nau8821.h +++ b/sound/soc/codecs/nau8821.h @@ -577,6 +577,7 @@ struct nau8821 { int dmic_clk_threshold; int dmic_slew_rate; int key_enable; + int adc_delay; }; int nau8821_enable_jack_detect(struct snd_soc_component *component, From patchwork Fri Apr 12 10:35:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: WTLI X-Patchwork-Id: 788981 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 A6328C4345F for ; Fri, 12 Apr 2024 10:38:52 +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 DC7462BBF; Fri, 12 Apr 2024 12:38:40 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DC7462BBF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1712918330; bh=NYVDLadom2jXFuQTJlSk5F8KtYuvfxzT0A5slpkBu44=; 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=PF1XdTTre/fhzsBpJxnMTVysI7cGenVJ/qJXoERyLgXjavUjQRd4xFohZbqiGgjvd xVwlPp5HYBZcAfbrQhbUbo1/uh/OLbMyH8L7xgfb8esThKPZZqz/lR+wS23WfO+D8o ZV85lv6Ku9ONivjh+krOsdDffhJ5IJ0OyEKO6MAQ= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5F788F805CB; Fri, 12 Apr 2024 12:37:58 +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 C882EF805C4; Fri, 12 Apr 2024 12:37:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id ACAC8F8028B; Fri, 12 Apr 2024 12:36:24 +0200 (CEST) Received: from APC01-PSA-obe.outbound.protection.outlook.com (mail-psaapc01on2060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:feae::60a]) (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 23A67F80130 for ; Fri, 12 Apr 2024 12:36:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 23A67F80130 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=nuvoton.com header.i=@nuvoton.com header.a=rsa-sha256 header.s=selector1 header.b=QRCE5ujn ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XY8jJWj0DPfhC++bhMyfWxcppAfDNLZePe21fctUHImr6JjKVGARfJ4CpKqb0bnBaHhl2zuoZh9fb+JMe2i+g6TIU9cHKHxx+DTYwKezH29AWvHSKyKTV+orlPx6yj8sc6N7+wUBqxne+exHf4LX4xQItWnK9uWaVoGnyjPo89z5y6KUVriqgkW8IMGG0opOmpyY0vMDKvicJ4yugKM+ygfGeBrrZ9h3b6x9K6ooWfZwEdHpdgLQBQdqOkJbri1g1YCP8GRWV5j86S/gNpDsT9qlyZwu/lvB4nlnGwLbQn4yXJCIxebQoZd4wmc+2WfKHZgPyriVfNc/SOl7juQniw== 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=WxZZI88trLcPkuM5m+bNe4H9s474rVMS+WtUW1uoU9s=; b=A+4SlsGhwm/73LzKw/R+M3pVDVXn3QC6WD1uzvjXHflo2bWjkgJY6mHSawJJO+n7nS2UEZytDYB/hScMrV0r0sIdZXP9lJ9Md77Xt1GVoiZyx5u199nbQWQtxxkEJewzOmxVnzFT74nGvjxpvuZ2pNJV/TJyiLJKWm7o673BXhqyfPiCrO6TOBs2hx+1UrjgvC7XCQcg/y+1z/wP/Mtxs2+KVe0M/D5wl+wG0ng9y1dOkSZIV5AdUStpUAtehk3+Js9BLoutXHttnd3Ilot0Xu3rBxt1+dZp2rZlhyHDTu8mMt7+Lv8b/y3qujfsV5gAKSiQEPm45IDDYlqR4YYApA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 211.75.126.7) smtp.rcpttodomain=kernel.org smtp.mailfrom=nuvoton.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=nuvoton.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuvoton.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=WxZZI88trLcPkuM5m+bNe4H9s474rVMS+WtUW1uoU9s=; b=QRCE5ujnQVQOM7NyYIGbve1f/msAzuNzBLffG6zykSRkjxXfuFyDUe1mIDQnlNGpDxStZ52vYMqT7Hel3SUtZ9YEo2Rwk9mJ+JUP4drJrMW9CyUuLS3Uf+sbea6YJBMf0VDo/3tCBraBWY5G2B3YPpA+MUjSU83vBy5yjVeErOY= Received: from SG2PR02CA0029.apcprd02.prod.outlook.com (2603:1096:3:18::17) by SEYPR03MB7165.apcprd03.prod.outlook.com (2603:1096:101:d4::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7409.46; Fri, 12 Apr 2024 10:36:05 +0000 Received: from SG2PEPF000B66CA.apcprd03.prod.outlook.com (2603:1096:3:18:cafe::29) by SG2PR02CA0029.outlook.office365.com (2603:1096:3:18::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.26 via Frontend Transport; Fri, 12 Apr 2024 10:36:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 211.75.126.7) smtp.mailfrom=nuvoton.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nuvoton.com; Received-SPF: Pass (protection.outlook.com: domain of nuvoton.com designates 211.75.126.7 as permitted sender) receiver=protection.outlook.com; client-ip=211.75.126.7; helo=NTHCCAS01.nuvoton.com; pr=C Received: from NTHCCAS01.nuvoton.com (211.75.126.7) by SG2PEPF000B66CA.mail.protection.outlook.com (10.167.240.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7452.22 via Frontend Transport; Fri, 12 Apr 2024 10:36:04 +0000 Received: from NTHCCAS01.nuvoton.com (10.1.8.28) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Fri, 12 Apr 2024 18:35:56 +0800 Received: from localhost.localdomain (10.11.36.27) by NTHCCAS01.nuvoton.com (10.1.8.28) with Microsoft SMTP Server id 15.1.2375.34 via Frontend Transport; Fri, 12 Apr 2024 18:35:56 +0800 From: Seven Lee To: CC: , , , , , , , , , , , , , , , , , , , Subject: [PATCH 3/3] ASoC: nau8821: Remove redundant ADC controls Date: Fri, 12 Apr 2024 18:35:54 +0800 Message-ID: <20240412103554.3487290-3-wtli@nuvoton.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240412103554.3487290-1-wtli@nuvoton.com> References: <20240412103554.3487290-1-wtli@nuvoton.com> MIME-Version: 1.0 X-NotSetDelaration: True X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SG2PEPF000B66CA:EE_|SEYPR03MB7165:EE_ X-MS-Office365-Filtering-Correlation-Id: 3d05ed57-08af-4290-2476-08dc5adc5b4d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cw0Izuiv39JV6Di3lOv2ifUa1KWfTx4poERtv4sxwz+z74R5IxljBQlqgxCFEE7A8nqGLo7H4LBCX/4JdkpZ7z4fJSZR3dxPLO4VJLp91rWWRPM4HDn4SuQBH8MJWhTn9jrFjOUAZZJZYPcrQwbin5qIQNAgrKqFV5Hlg9jgBECj7tjClx8MZqv6Ht2uSUPpQ9qhWxAp+vykItAAZ1ZLaS19QczuanIXHJTV60HW7SCkWTlh5lVVcQUBntTRkPkljLo2qxurH8nUDvQCtgTfgKOPAnPaHxbpBu3S6j24Uoa7peagr3btB35xNvoDATq36rYsFOgmfaZGjp6iji82GmczJ5NKkg1wG5Qp0fVJhKFOzCt46dYE8ZxVBU+yEL1CIncaPViaqNjRpApf8BEbHOz0892IBy5Vpy3Ge6X1tA5eJmE2tUmdxUNwvHYTNbXsBh7rj6X3eN4Tl+C1ziuKvDBh4MmsoS25Ovl2qWu+CEJEWPD5BTPMemIzfAAMdQZHhYGCwPRrdkQW8ZATh+Gw71TDQip2rW8hmR86BxVRRo5TDcdzTXwt8ZX6EyIUSgK79r/aNfEin3Iw44tq/DshiH+eEXcCrTpj0acgN3DRH5uphXJgOZcjgWz3AUVids1rP7O8FPIcE0CGCmiSjpbkuxgMSllUmH/SY+2OJiyCtZia96/ADeu2m8palqO8cvPYTylq/p4YNciHMJLrJJudWNxHyLYylPH0heISCjm8XN7/dW31jXKS110A3AZgggsI X-Forefront-Antispam-Report: CIP:211.75.126.7; CTRY:TW; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:NTHCCAS01.nuvoton.com; PTR:211-75-126-7.hinet-ip.hinet.net; CAT:NONE; SFS:(13230031)(376005)(82310400014)(1800799015)(7416005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: nuvoton.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2024 10:36:04.9761 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3d05ed57-08af-4290-2476-08dc5adc5b4d X-MS-Exchange-CrossTenant-Id: a3f24931-d403-4b4a-94f1-7d83ac638e07 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=a3f24931-d403-4b4a-94f1-7d83ac638e07; Ip=[211.75.126.7]; Helo=[NTHCCAS01.nuvoton.com] X-MS-Exchange-CrossTenant-AuthSource: SG2PEPF000B66CA.apcprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SEYPR03MB7165 Message-ID-Hash: B3477S4JHU5OP76HJYTEPGZ3UTGAAQCZ X-Message-ID-Hash: B3477S4JHU5OP76HJYTEPGZ3UTGAAQCZ X-MailFrom: WTLI@nuvoton.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Remove redundant left/right adc channel enable controls. Signed-off-by: Seven Lee --- sound/soc/codecs/nau8821.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sound/soc/codecs/nau8821.c b/sound/soc/codecs/nau8821.c index fec669e00a10..6818bbd1d3c7 100644 --- a/sound/soc/codecs/nau8821.c +++ b/sound/soc/codecs/nau8821.c @@ -512,12 +512,8 @@ static int nau8821_left_adc_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_POST_PMU: msleep(nau8821->adc_delay); - regmap_update_bits(nau8821->regmap, NAU8821_R01_ENA_CTRL, - NAU8821_EN_ADCL, NAU8821_EN_ADCL); break; case SND_SOC_DAPM_POST_PMD: - regmap_update_bits(nau8821->regmap, - NAU8821_R01_ENA_CTRL, NAU8821_EN_ADCL, 0); break; default: return -EINVAL; @@ -536,12 +532,8 @@ static int nau8821_right_adc_event(struct snd_soc_dapm_widget *w, switch (event) { case SND_SOC_DAPM_POST_PMU: msleep(nau8821->adc_delay); - regmap_update_bits(nau8821->regmap, NAU8821_R01_ENA_CTRL, - NAU8821_EN_ADCR, NAU8821_EN_ADCR); break; case SND_SOC_DAPM_POST_PMD: - regmap_update_bits(nau8821->regmap, - NAU8821_R01_ENA_CTRL, NAU8821_EN_ADCR, 0); break; default: return -EINVAL;