From patchwork Thu Jun 22 11:34:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 695312 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 23615EB64DB for ; Thu, 22 Jun 2023 11:36: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 C3E9884D; Thu, 22 Jun 2023 13:35:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C3E9884D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433800; bh=Co+6t32ifwUs0+wNsOFKXTRfff6uqscWL+stBOUqqAY=; 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=HU65hUeLWE5HZIOn6Xr5mvyUi1PAupGxvLCc0SGFcLNutilkQ+Ym9NzsEC0sZkPJm sZUlNQ2rHfrH0jr2i4fVo9R6pKD0nmUNWA/S+QgyThl/zLAAJRPYU9dr4YM/ES/1lT W0qmiNVZAZLPKsEeCZquTFAFMOCbMw0yTwLkRn8o= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E2972F80130; Thu, 22 Jun 2023 13:35:04 +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 07A54F80557; Thu, 22 Jun 2023 13:35:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 44346F80552; Thu, 22 Jun 2023 13:35:00 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20604.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::604]) (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 5090CF80130 for ; Thu, 22 Jun 2023 13:34:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 5090CF80130 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=PD8dEx84 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=niU2U/wVirjqNP60lGC/WklJghK521Nxj65nAgX7jUxvVWyZNJUBLTzJjXdp3VBxxmK55FaeMC44Y7iaq/LYovYImTzETic2XCNTGV3frzK8gILo3v1qNd+gD/KmSJrc99I4XZsa16kcNGPvor1Ep1xBNv7UGfPxXmq7G3eAodk7v1+uWE0g3IodrlasVJSMDGzbFfym7xoedXkyKHjc+zYLKurFqnTUUPtksFT/n22hMU1r300GR+2hNdIsyXUnhEbOSMZGUk/YV/CIF+ah59r6vyDcVyf9IpzZr+bRxUQxXZ9m4PLR+73EU8E+iYFo3tQQ5PlKDr6xA961IQwt6A== 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=CEQsmQLzDILFpD+48COHhMUR9Q9jyAoHdI0QjJXHQyI=; b=gQu7cYVVwrZi65nt/8FdwkgaVik3gsN/8psH11RNMJ/lIKRC4HAVUue3Te1VzsFge9bWZOrAg2bJ1TdTcg4n4asY4dseBMwtuM5HWJ/JEH8McQ/yRe/qQGrVAnI5p5fSsHCZjh5YngWUnQHITpGscpCLRw9sLkyg6asmczB70PUFOEooo2Qm86y86eyj20aIxORi/91TRCF4p9JYbZKgUlmRvP+/87WGPw9IM5h117zl2Qbgi5jFAEuJa9wziHR+MX4a3jIk5z2pJXUZ/pyFLw5p0cvRUuegTQkrnsoPIMDf35E9FkvYAPnhdbIQcDj4rc3azMF6DjkelnUOFMJkgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=CEQsmQLzDILFpD+48COHhMUR9Q9jyAoHdI0QjJXHQyI=; b=PD8dEx84U5pwFIzGpZxeatxDjQ3fplbxfq1asjwg2CDHSZdWFQXHwSI8mS+u/cPwaxbwFgwn9hUvAimW7EGwaUbamW/bXR/5uFT75fE9iIBgblC/6TVFVCBj8s51D8JBGFcYYjnR+yb4hLQgNgcnijx8Z6ML9LknEbnYIT/a1qvPGPRW8jwQp0sA35gKmiYB9/yk9zqasjQHw0HDCVCUpGGoEkCESSspECrL1CoN6qSDYx4TYxeEsSWZJawzCBrCDd6PIyf42eUmE/SLwwcFE2Gx9R/TTbnpBd8Yz8CmsL8Pn5SmPxHU7uwxp+uID/RwxYfrJNGC2egX7cwh0LJLoA== Received: from CY5PR22CA0046.namprd22.prod.outlook.com (2603:10b6:930:1d::28) by CH0PR12MB5267.namprd12.prod.outlook.com (2603:10b6:610:d2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Thu, 22 Jun 2023 11:34:37 +0000 Received: from CY4PEPF0000E9D3.namprd03.prod.outlook.com (2603:10b6:930:1d:cafe::6c) by CY5PR22CA0046.outlook.office365.com (2603:10b6:930:1d::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9D3.mail.protection.outlook.com (10.167.241.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:37 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:34:29 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:29 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:25 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , Subject: [PATCH 1/8] ASoC: tegra: Fix SFC conversion for few rates Date: Thu, 22 Jun 2023 17:04:09 +0530 Message-ID: <1687433656-7892-2-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D3:EE_|CH0PR12MB5267:EE_ X-MS-Office365-Filtering-Correlation-Id: e443e6dc-2704-4ffc-17d1-08db7314a91e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Ur0C9B7ctux0FimLFv0adNJRlZHg+Z8dCoD+TLDoGh5cqeKUcE8EfGQpMR5bjanLbFYup4ZKiqEB73sNYLEYe7sLL5btlwDtE/VNGsKOLaUTzIoEITw/hbiHag7kGgJT0gNifP8doPQtYe10W5s1IqEjeq7Pipb/Pef1BBQgx2e+CxxynGAFdxQcTRKZ4fG5u7PQ5Oon02bexvFRBgnquhyVfu6w8EzmS82aCLqRNjIIi6MQo16FYMetPeg1+famWkscUbiYuM0zITc1kK3IbwpSauAvaB5BSmoViqNy0Ad3yt5ZtZNtY+BvIijhQMhdplkplsgpLFN+D+hWsJVKAzAHinJ0/7FMPsaRNUzyaPHR/c20b/HgV3DFA9wQpOrJ5LA0UhDuf7VdH0AmC2F/zHt/RRuTF7D1gT9fJIbBRirIZYyE8y/E/QBidwbDuGaYHWhOi/FZ/QjYEPRxLklSZ2//xP6WipZariAD5Y7gkNImzDfusPPKFkpKOWVQPbJa4fmMU9EveR+WQeUwgaSW9usxIQ+h8hvJqxTUmcQ2xDA4QlDu+WWPLXdsKI4fx1OZsaEpBEfZJ57i9o5r8cICthQxdVllLUl2MmwsWjYvFm5SEo4TpU7UXw8sQoUQ6xhCFWHBM1MU9ZCQjg9VtJElKFnr9DwVAbIrnkmqUKlYGVwbJ9c7Ydk0Sa+MKwohtddUPFpbxDjmYrkOfu+Awb1aA9kkno0/WoSKQXVdQPlyMtz4PJLgXZiBO+8QmBUwoNAL X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(376002)(39860400002)(396003)(451199021)(36840700001)(46966006)(40470700004)(70206006)(70586007)(4326008)(316002)(8676002)(8936002)(41300700001)(26005)(186003)(2616005)(54906003)(110136005)(40460700003)(6666004)(426003)(336012)(7696005)(82310400005)(2906002)(5660300002)(478600001)(7416002)(40480700001)(356005)(7636003)(82740400003)(47076005)(36860700001)(83380400001)(36756003)(86362001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:34:37.5981 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e443e6dc-2704-4ffc-17d1-08db7314a91e X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5267 Message-ID-Hash: 4XNU5VCKPMCAMD4LSYJWT7T6WTT6NYKO X-Message-ID-Hash: 4XNU5VCKPMCAMD4LSYJWT7T6WTT6NYKO X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sheetal Sample rate conversions for rates greater than 48kHz are found to be failing. It means x->y conversions fail when either x or y is greater than 48kHz. This happens because, tegra210_sfc_rate_to_idx() returns incorrect index for rates greater than 48kHz. This actually depends on the tegra210_sfc_rates[] array and it is not in sync with frequency values of SFC TX/RX register. To be precise, 64kHz entry is missing in above array defined in the driver. Due to this wrong index is returned and this results in incorrect programming of coefficients. To fix this, align the tegra210_sfc_rates[] array with SFC register specification and thus add 64kHz entry to it. Also, the coefficient table is updated to reflect that none of the conversions are supported for 64kHz. Fixes: b2f74ec53a6c ("ASoC: tegra: Add Tegra210 based SFC driver") Cc: stable@vger.kernel.org Signed-off-by: Sheetal Reviewed-by: Mohan Kumar D Reviewed-by: Sameer Pujar --- sound/soc/tegra/tegra210_sfc.c | 31 ++++++++++++++++++++++++++++++- sound/soc/tegra/tegra210_sfc.h | 4 ++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/sound/soc/tegra/tegra210_sfc.c b/sound/soc/tegra/tegra210_sfc.c index e9df1ff..c2240bab 100644 --- a/sound/soc/tegra/tegra210_sfc.c +++ b/sound/soc/tegra/tegra210_sfc.c @@ -2,7 +2,7 @@ // // tegra210_sfc.c - Tegra210 SFC driver // -// Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. +// Copyright (c) 2021-2023 NVIDIA CORPORATION. All rights reserved. #include #include @@ -42,6 +42,7 @@ static const int tegra210_sfc_rates[TEGRA210_SFC_NUM_RATES] = { 32000, 44100, 48000, + 64000, 88200, 96000, 176400, @@ -2857,6 +2858,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_8to32, coef_8to44, coef_8to48, + UNSUPP_CONV, coef_8to88, coef_8to96, UNSUPP_CONV, @@ -2872,6 +2874,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_11to32, coef_11to44, coef_11to48, + UNSUPP_CONV, coef_11to88, coef_11to96, UNSUPP_CONV, @@ -2887,6 +2890,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_16to32, coef_16to44, coef_16to48, + UNSUPP_CONV, coef_16to88, coef_16to96, coef_16to176, @@ -2902,6 +2906,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_22to32, coef_22to44, coef_22to48, + UNSUPP_CONV, coef_22to88, coef_22to96, coef_22to176, @@ -2917,6 +2922,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_24to32, coef_24to44, coef_24to48, + UNSUPP_CONV, coef_24to88, coef_24to96, coef_24to176, @@ -2932,6 +2938,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { BYPASS_CONV, coef_32to44, coef_32to48, + UNSUPP_CONV, coef_32to88, coef_32to96, coef_32to176, @@ -2947,6 +2954,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_44to32, BYPASS_CONV, coef_44to48, + UNSUPP_CONV, coef_44to88, coef_44to96, coef_44to176, @@ -2962,11 +2970,28 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_48to32, coef_48to44, BYPASS_CONV, + UNSUPP_CONV, coef_48to88, coef_48to96, coef_48to176, coef_48to192, }, + /* Convertions from 64 kHz */ + { + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + UNSUPP_CONV, + }, /* Convertions from 88.2 kHz */ { coef_88to8, @@ -2977,6 +3002,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_88to32, coef_88to44, coef_88to48, + UNSUPP_CONV, BYPASS_CONV, coef_88to96, coef_88to176, @@ -2991,6 +3017,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_96to32, coef_96to44, coef_96to48, + UNSUPP_CONV, coef_96to88, BYPASS_CONV, coef_96to176, @@ -3006,6 +3033,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_176to32, coef_176to44, coef_176to48, + UNSUPP_CONV, coef_176to88, coef_176to96, BYPASS_CONV, @@ -3021,6 +3049,7 @@ static s32 *coef_addr_table[TEGRA210_SFC_NUM_RATES][TEGRA210_SFC_NUM_RATES] = { coef_192to32, coef_192to44, coef_192to48, + UNSUPP_CONV, coef_192to88, coef_192to96, coef_192to176, diff --git a/sound/soc/tegra/tegra210_sfc.h b/sound/soc/tegra/tegra210_sfc.h index 5a6b66e..a4c993d7 100644 --- a/sound/soc/tegra/tegra210_sfc.h +++ b/sound/soc/tegra/tegra210_sfc.h @@ -2,7 +2,7 @@ /* * tegra210_sfc.h - Definitions for Tegra210 SFC driver * - * Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2021-2023 NVIDIA CORPORATION. All rights reserved. * */ @@ -47,7 +47,7 @@ #define TEGRA210_SFC_EN_SHIFT 0 #define TEGRA210_SFC_EN (1 << TEGRA210_SFC_EN_SHIFT) -#define TEGRA210_SFC_NUM_RATES 12 +#define TEGRA210_SFC_NUM_RATES 13 /* Fields in TEGRA210_SFC_COEF_RAM */ #define TEGRA210_SFC_COEF_RAM_EN BIT(0) From patchwork Thu Jun 22 11:34:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 694928 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 C003DEB64D8 for ; Thu, 22 Jun 2023 11:36:47 +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 B229584A; Thu, 22 Jun 2023 13:35:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz B229584A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433800; bh=rl5fF2tiOepOQSrOrmicVD2PdIyvDBRTizt03w4DmZQ=; 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=olA67CG5InXEptGQoKcxraiSaUUqwS7jyJy4jkTHqnAaNN3U7548RHHt9JzpHZdDr Mtk1iRzgjOLwlfPqC/UV3sB0SB/Z1RWHSIgzIusX3ZvIrWKOK8WBWUBeHC7DlkXF8I 81Wh9rixs1LJemmXv8OHl36Pu1+TdM8/TEb9UpQ8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8B20AF80579; Thu, 22 Jun 2023 13:35:07 +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 CFE9CF80567; Thu, 22 Jun 2023 13:35:06 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CA987F80552; Thu, 22 Jun 2023 13:35:02 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20608.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::608]) (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 9FEFFF80132 for ; Thu, 22 Jun 2023 13:34:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9FEFFF80132 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=DFqLjsSJ ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SFjhgLoMvpDC7rx64XJfVzBwV4Flwek7cbmwU83p/wbHvKpXiQNiR3QIMxCA0BSlcvhuyusRPUnUhefzvG7SToAioncwnF06rhVgq2RMs6hyhoJ3emcJazuJy3hdgVhYRPMa32djaPYwesFu3w0kF1av90aI3mkpw7MmUasWl2lqBqBYKje81I2XmFB84vr5IMTMQsBX+apnKkHC6J39bpj5OMIqpKJaiXNGEvxxNQdlXDwpl81H01EIqoyT+sAtPGn80V1TARqPh31fzhp4ar54qdeCqaJ8hlQpqGwZN5zJZfPHXKFd6pCxyCuyLE9ZNR8gJgMPy8WMzxEqWr9+aQ== 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=t7ppIOpxkReXH53/Uf+9c4/6ZtALXoxCJd6bx/S32KE=; b=h9i8z8N6cDxWYRonR/JVPeVxe5uw/AGPae92qNlz5e7DPD//K1tRJ/pg7K4cjtXE5CrqoNRopPYvJR+zEW4PEMKq5PDy8+BY3DjhdcGAQgfivkY4VECVIYwQQCTZQgOXr9bnoPRuwi8VfQzi8yccp+gqSgmQuFahc1h34qDCCTQHYtRtyeTtWKY3gCRznMtuaEET6THH19s5oIiP4ED+Jj8NKiMaZHZ39ealLJqDvKG/86v61uehvpaLZGLvZFE89193s1DmtBjRusbl5w1qIKwYgSlebxNyIeuD9VVvYbYlLIiHpSgCNgIkZ6hAPND5QECDC6V1mpM3vvGHteIIxA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=t7ppIOpxkReXH53/Uf+9c4/6ZtALXoxCJd6bx/S32KE=; b=DFqLjsSJ/1aJeMcYKgmdWOcV4G99RoDd6jg8L9gxxNV8JrzDnA4AdGzuHRRYMwIedSN29mdxrufxRVw0Audik3IfkSLMpzXFvPm45v8/l1UsoBcliWwJBD7w/46cwo9YIAzHA+VR6wuX7Fm2EfXe+ifDui7s5iIKQJR4vIfwMBmM6RuXQlLHpdkeTb1+qhgb65njNSFP4mFe3WYSy0WMk6solzIlBnByxgh3fNY90aDO69qDDOl1Zx5ExIveqwjAQBtGJ04vbfvbtWBYvWKJq64FNlRKjOyvexFl/uhXtYZkx954duhltyH0wAysce70yPsqp1IEmoUi2o7613BkNQ== Received: from CY5PR14CA0029.namprd14.prod.outlook.com (2603:10b6:930:2::10) by BL1PR12MB5753.namprd12.prod.outlook.com (2603:10b6:208:390::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Thu, 22 Jun 2023 11:34:43 +0000 Received: from CY4PEPF0000E9CE.namprd03.prod.outlook.com (2603:10b6:930:2:cafe::9d) by CY5PR14CA0029.outlook.office365.com (2603:10b6:930:2::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:43 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9CE.mail.protection.outlook.com (10.167.241.141) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.20 via Frontend Transport; Thu, 22 Jun 2023 11:34:42 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:34:33 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:33 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:29 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , Subject: [PATCH 2/8] ASoC: tegra: Fix AMX byte map Date: Thu, 22 Jun 2023 17:04:10 +0530 Message-ID: <1687433656-7892-3-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9CE:EE_|BL1PR12MB5753:EE_ X-MS-Office365-Filtering-Correlation-Id: cb777f37-3da4-4661-04d4-08db7314ac50 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 2qvgThMGhmD0lTzSeLNUEcLghPSMtDNCBou+5EGbX05a7PyKqBNumAmHhO9KBLOpiJYVDuRSzjIO+4omBR6pAvcqfCx7ZjuXt3uX90kCtSWJCW292ToIXKwTwyAbCrhzp8vis2bcl9PYTC5DXo8jiAIDhtMvP4II6+hjZMV9v1sKNZQ+ywWXJjC6gozhugLyNWtnbixS1NF1fbvpcEiTgg4Eu8ho8PnVG6JbTkih41yJncVzH5FG7E2SlMA1zwN1uy+RTHOGcZxDATAk1XquyIIcI6ECIqJHwSDF0VkxUaKJyOOdboCGEaAjMdWuZvuSlFFjdQw4sxvH7xGbLILRicAwyhHZZXw2JSiHh1h0NaTvG7MIyB60CSM1kBdbSseuIlc/Vi049EBb9mMISSaUxSyqLcE9dbkyTPx4PbgIehq0VQrtBxxcr12N9Spogm8bv9YcBkNPG8kwtGZ0lBopLK6DigDi5Qdu3051vl1avUqpRCC8mHrrvbM8PO7Nfg6mrsGEjjtyn+LL+zwJVbQ37F8owCcm7dvCGpqIvPKyBX+oJ99I54E2i7FnTHf9xM2E2xs+KT3V1PaVNBXhW5AlIuXts64HnFSU+loaH3x6O2uLplzbj8RxKPAwQ0DjpC4OMx5ccw2o53L+I1wEKaRGqOj9PEPNo+9TqU7hiEc4oSKr6n2S28tzJT4tr0fhxUoo5z42JgoluOGXvu5xogV06dw8rx+kB2GI259vb/wtIwQxqgvMAwmG3uDynyG//anZ X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(376002)(346002)(39860400002)(396003)(451199021)(36840700001)(40470700004)(46966006)(40480700001)(8936002)(41300700001)(8676002)(186003)(40460700003)(26005)(2906002)(86362001)(54906003)(36756003)(110136005)(4326008)(70586007)(70206006)(6666004)(316002)(356005)(478600001)(82310400005)(7636003)(82740400003)(7696005)(336012)(426003)(2616005)(36860700001)(83380400001)(47076005)(5660300002)(7416002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:34:42.9428 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cb777f37-3da4-4661-04d4-08db7314ac50 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9CE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL1PR12MB5753 Message-ID-Hash: 5URRPAIX47PJSLWTNOJV4FLWFVIR5MMI X-Message-ID-Hash: 5URRPAIX47PJSLWTNOJV4FLWFVIR5MMI X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sheetal Byte mask for channel-1 of stream-1 is not getting enabled and this causes failures during AMX use cases. The enable bit is not set during put() callback of byte map mixer control. This happens because the byte map value 0 matches the initial state of byte map array and put() callback returns without doing anything. Fix the put() callback by actually looking at the byte mask array to identify if any change is needed and update the fields accordingly. Also update get() callback to return 256 if the byte map is disabled. Fixes: 8db78ace1ba8 ("ASoC: tegra: Fix kcontrol put callback in AMX") Cc: stable@vger.kernel.org Signed-off-by: Sheetal Reviewed-by: Mohan Kumar D Reviewed-by: Sameer Pujar --- sound/soc/tegra/tegra210_amx.c | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/sound/soc/tegra/tegra210_amx.c b/sound/soc/tegra/tegra210_amx.c index 782a141..1410e8b 100644 --- a/sound/soc/tegra/tegra210_amx.c +++ b/sound/soc/tegra/tegra210_amx.c @@ -2,7 +2,7 @@ // // tegra210_amx.c - Tegra210 AMX driver // -// Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. +// Copyright (c) 2021-2023 NVIDIA CORPORATION. All rights reserved. #include #include @@ -206,7 +206,7 @@ static int tegra210_amx_get_byte_map(struct snd_kcontrol *kcontrol, if (enabled) ucontrol->value.integer.value[0] = bytes_map[reg]; else - ucontrol->value.integer.value[0] = 0; + ucontrol->value.integer.value[0] = 256; return 0; } @@ -221,25 +221,19 @@ static int tegra210_amx_put_byte_map(struct snd_kcontrol *kcontrol, unsigned char *bytes_map = (unsigned char *)&amx->map; int reg = mc->reg; int value = ucontrol->value.integer.value[0]; + unsigned int mask_val = amx->byte_mask[reg / 32]; - if (value == bytes_map[reg]) + if (value >= 0 && value <= 255) + mask_val |= (1 << (reg % 32)); + else + mask_val &= ~(1 << (reg % 32)); + + if (mask_val == amx->byte_mask[reg / 32]) return 0; - if (value >= 0 && value <= 255) { - /* Update byte map and enable slot */ - bytes_map[reg] = value; - if (reg > 31) - amx->byte_mask[1] |= (1 << (reg - 32)); - else - amx->byte_mask[0] |= (1 << reg); - } else { - /* Reset byte map and disable slot */ - bytes_map[reg] = 0; - if (reg > 31) - amx->byte_mask[1] &= ~(1 << (reg - 32)); - else - amx->byte_mask[0] &= ~(1 << reg); - } + /* Update byte map and slot */ + bytes_map[reg] = value % 256; + amx->byte_mask[reg / 32] = mask_val; return 1; } From patchwork Thu Jun 22 11:34:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 694927 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 A6CDCEB64D8 for ; Thu, 22 Jun 2023 11:37: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 7796D846; Thu, 22 Jun 2023 13:36:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7796D846 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433827; bh=wB2PKeNE2FSCf+LJnzL4YCJTrxZywmGWy9Wq9UA8lVQ=; 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=pMWSSKI4QCKK0I7g03Fie4UhAawKqyBksTQ8PchhuH+zMSRsGVZ+0A2trLpeNo2LG ExVHemZkGmeYbp1cff8lH3AMjrsxqLzGCWprYQhBaAl22Fhz4vQZeTeNQfF6Vqc4Ai WN1kTQnNbbCI97Yl6xmjtYKH2rHniGyW6hyCewh8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 600A8F8057B; Thu, 22 Jun 2023 13:35:11 +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 96D0FF8055C; Thu, 22 Jun 2023 13:35:10 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2AA27F80124; Thu, 22 Jun 2023 13:35:05 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on20610.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::610]) (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 31124F80124 for ; Thu, 22 Jun 2023 13:34:53 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 31124F80124 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=ZNUt73vI ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EDiv+1+XSkQa9YMcaPxiCI6k8p9SzEbhhK9SrHKyD6Pi1mrLklh3hHG/Ycodrq8Xn5Q7m5ij5MAILBNX+VyqLmC50Fo5jPR4Qq3c1++WckacRi0b5VGN3nIQVkRjVLOKrqATfHq2AiQETwKW1V+dwdRPv6mTW1FFHtY+HYYW6ZJNryB3Vu0RlloUKob0uiP4SlOVrZIGpUkiHXnH78wrKJWcqjCDgawtxNy7KWBOd+En64o2v0aN1Fudfj0sapA+CavJ47qSJg0SkqbsFiHEfv6asl5yFfPres8EhdUzCVn2bzC2oA/AB509A9OeEl1iWp6NlVMe+MMyIWYz9GLHqA== 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=fOOEk07t4kRzna0D9TEOHF5B3wQ4vCIjlzV1k6C6SrE=; b=D0MgwCiTWMj9d1cAYO704v9NkJq6fwpbSpMfYbLPngRsOpWCD+X+y4toKQq6Xyh5pqTR83AeNygtJEGpFUebriNwyy2tS2QH6s1kl6wNeCBXJl8o9V+fv/SC536WCi84j+I6BOmbiL50hNyZgkpQXc/JylRTsxpjpSRRxULqeDQbkq29qj/DbsYu/6E/jDI6/O1qnTAxBLTE5N6L4Yje0hg95PWz7FVgVqTzDkumWFTuQPgjiBZLU15j5fWTjBCvM9NXdRL6kXREum7Iqr8/5pavmwAYn8kzJmmZ3t3NlmnbUP+8w70Pkw8bdK6y1OCp8o2Dz+Ih+FoUT2roqdmxcg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fOOEk07t4kRzna0D9TEOHF5B3wQ4vCIjlzV1k6C6SrE=; b=ZNUt73vI6RSWBIC1TJEu9SLb4A/SsvB1iZeKSU2qBK/Xgh1mv1hM4QdzFhqzF+tTWwZoxVL6atBe5iO+lLI17vWLa1EjEbhq7HRh/cQS0HPQHrbyp+pvg00XMSEDl8teEumosEChYoMuEI59Wzc/RN5GDoVNxzu2kOHDEsBMMYtGj+Z9/59tT8ocln573OEvN+LVU/JoxLbUQBAGJHqla7WW613eOg95Dk7Kmyp/5bCldykLK8aUCHi7AAG5u1xTnevgAnaMbqh+Le/sZDjM5Qfw3sSvPJ02MTsMgMWBrLfLSk49z5oSPkDJVI7VogHbgmsJL2UuSxdowBtlkUySIg== Received: from CY5PR22CA0034.namprd22.prod.outlook.com (2603:10b6:930:1d::10) by PH7PR12MB7354.namprd12.prod.outlook.com (2603:10b6:510:20d::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24; Thu, 22 Jun 2023 11:34:49 +0000 Received: from CY4PEPF0000E9D2.namprd03.prod.outlook.com (2603:10b6:930:1d:cafe::7c) by CY5PR22CA0034.outlook.office365.com (2603:10b6:930:1d::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9D2.mail.protection.outlook.com (10.167.241.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.21 via Frontend Transport; Thu, 22 Jun 2023 11:34:48 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:34:38 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:37 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:34 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , Subject: [PATCH 3/8] ASoC: tegra: Fix ADX byte map Date: Thu, 22 Jun 2023 17:04:11 +0530 Message-ID: <1687433656-7892-4-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D2:EE_|PH7PR12MB7354:EE_ X-MS-Office365-Filtering-Correlation-Id: d94bf0b3-4db9-4ca6-2095-08db7314afca X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cCHUG8nL0Gu6uZP+GhmXo2HUhCHe/pFnHEhaR9DLD0/U7bUkvQvq8TZ9NN+W7xrYMEyWJVZp1qVCgVnJmMnNKUe7ruFlaq/ANQslAlxtU/hDW3U8bpCgDDauEeDjqBUpy2PFngv4GeIpyhDiR5fWB78SQF6LZwFQYFULDeGT4BbAcNB/IArALn7kBx18QVRWqKpMaBAEaaJrpE8GaA83XuRbY26/ElVDZ144rhT0yodvmUgo77fvKOldfgubspFKbq0ixmv8DG0FTerlLhfNvO66zSNfC8pfSekO247D4KdCsdl/Tu2uk+V82Kh0R/YzS9/N6qKHin35ZIYiT1UFJC6OyAncjqgHcm0/TRetN0QvQ4bX8Bgwj9eaXnq0geb4ZNVL8QnHKcCO2KXX5o3Iw9aXebKTQwE6818lrxDPcD13QNUu7HDAaQU+WfBEV2L2l1qI5TEyByIJIjRt8hUwLLKy+bvGGScbBbdRy26b8siUxK3XoDt6G1IiZbnDmcpS7tGSw5LzuRTO1btvbEQ5dJc3DeZ0RgFnrSb05pgp+hCyhzmfWfZrWqK2jA4HCJ60l1ppR+bIKLR4pCSqbYbC610UYx7iZJJSxz3058iwZsVu5f7G3aixStO6ErSbz/Qq3xfQmiOEMV2zBlTq6eGwDNOwSIsOSletASuw4/Hmh/5o0OkzVfXlIaxLq05MzHVivAs9KvJuzVdksM7ptNpSYec8fMM2UAeh3IoHiJdOuu4oPZPCeVKomfJHgbLnT2cJ X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(346002)(396003)(376002)(39860400002)(451199021)(36840700001)(46966006)(40470700004)(186003)(26005)(5660300002)(86362001)(7696005)(6666004)(8936002)(8676002)(7416002)(2906002)(478600001)(40460700003)(110136005)(54906003)(36756003)(36860700001)(4326008)(83380400001)(47076005)(41300700001)(82740400003)(7636003)(356005)(2616005)(336012)(40480700001)(70206006)(426003)(70586007)(82310400005)(316002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:34:48.7919 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d94bf0b3-4db9-4ca6-2095-08db7314afca X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7354 Message-ID-Hash: J2YJU7QOAVBVWF5VINYLI5SHUET3QXT5 X-Message-ID-Hash: J2YJU7QOAVBVWF5VINYLI5SHUET3QXT5 X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sheetal Byte mask for channel-1 of stream-1 is not getting enabled and this causes failures during ADX use cases. The enable bit is not set during put() callback of byte map mixer control. This happens because the byte map value 0 matches the initial state of byte map array and put() callback returns without doing anything. Fix the put() callback by actually looking at the byte mask array to identify if any change is needed and update the fields accordingly. Also update get() callback to return 256 if the byte map is disabled. Fixes: 3c97881b8c8a ("ASoC: tegra: Fix kcontrol put callback in ADX") Cc: stable@vger.kernel.org Signed-off-by: Sheetal Reviewed-by: Mohan Kumar D Reviewed-by: Sameer Pujar --- sound/soc/tegra/tegra210_adx.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sound/soc/tegra/tegra210_adx.c b/sound/soc/tegra/tegra210_adx.c index bd0b10c..6894b11 100644 --- a/sound/soc/tegra/tegra210_adx.c +++ b/sound/soc/tegra/tegra210_adx.c @@ -2,7 +2,7 @@ // // tegra210_adx.c - Tegra210 ADX driver // -// Copyright (c) 2021 NVIDIA CORPORATION. All rights reserved. +// Copyright (c) 2021-2023 NVIDIA CORPORATION. All rights reserved. #include #include @@ -178,7 +178,7 @@ static int tegra210_adx_get_byte_map(struct snd_kcontrol *kcontrol, if (enabled) ucontrol->value.integer.value[0] = bytes_map[mc->reg]; else - ucontrol->value.integer.value[0] = 0; + ucontrol->value.integer.value[0] = 256; return 0; } @@ -192,19 +192,19 @@ static int tegra210_adx_put_byte_map(struct snd_kcontrol *kcontrol, int value = ucontrol->value.integer.value[0]; struct soc_mixer_control *mc = (struct soc_mixer_control *)kcontrol->private_value; + unsigned int mask_val = adx->byte_mask[mc->reg / 32]; - if (value == bytes_map[mc->reg]) + if (value >= 0 && value <= 255) + mask_val |= (1 << (mc->reg % 32)); + else + mask_val &= ~(1 << (mc->reg % 32)); + + if (mask_val == adx->byte_mask[mc->reg / 32]) return 0; - if (value >= 0 && value <= 255) { - /* update byte map and enable slot */ - bytes_map[mc->reg] = value; - adx->byte_mask[mc->reg / 32] |= (1 << (mc->reg % 32)); - } else { - /* reset byte map and disable slot */ - bytes_map[mc->reg] = 0; - adx->byte_mask[mc->reg / 32] &= ~(1 << (mc->reg % 32)); - } + /* Update byte map and slot */ + bytes_map[mc->reg] = value % 256; + adx->byte_mask[mc->reg / 32] = mask_val; return 1; } From patchwork Thu Jun 22 11:34:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 695311 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 5F34BEB64D8 for ; Thu, 22 Jun 2023 11:37:19 +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 5F2CF84C; Thu, 22 Jun 2023 13:36:27 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 5F2CF84C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433837; bh=XHe0OI2k+YnPSmuYyAoFyDfPInNgckuRyVQzMWgoZg4=; 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=jmaYmn50EpHPZWSp/CtwDHy57xCUniZliTatZtDahX3nTs5st8LSAuVhV1gpitRcZ uGjisMXEhznM5j/W/YNPYHCsQxKRky7BAtsYnpTAyw9QQLbHK1xYzS//XbNG3vsEy0 Zx/iNQKayQmnl8YBKfDsaBiWkcurrTEKa4hnexws= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3F45DF8058C; Thu, 22 Jun 2023 13:35:13 +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 741D7F805A0; Thu, 22 Jun 2023 13:35:13 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 9FE9CF8057B; Thu, 22 Jun 2023 13:35:08 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20629.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::629]) (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 894EEF80141 for ; Thu, 22 Jun 2023 13:35:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 894EEF80141 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=bh/2OjXV ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bTy19JQJyr9oIjqf5d+T0G3SuqvaFVI8tv6xdkk4X4fAqAORF3okv6jGJOFieNA1LSk/6yHYK+/Dg6YuN3X7yYs6uui+oUZpiFmjRnjWMSDtCAlHalOV/t1U/duliS5GjOgAqakiRAjw3QkO7P3ycp4d54YRLgK2Q5TU4kkOLNuFVf/OKMR8Fk9IhilgPCMa6Uzj2i+bYd5n5ybEtgfeUnIaQQr8Xd8aip/gkhYrhdMlQfsqe6kJR9L37RqjyS9557NMGExG9dKcDJrtvqlp7p1AZ4YhKdoaMtnVORcKEqDfHYqiLmn8RUjcnbjZT885ZqyeFsrg+Ura4H2eCNUszQ== 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=0AJsKlJH+Dy22u58HUR+dduYwlLJG94ezKMXHoJVwCE=; b=W8C2UzjBFHLR2FrzT4Ps+tGhdIFJyXHwMAleWcFgGIzjHoT6C3JunCVMx8q7OTmAExshaDB9F7L/9c6fmrGBFHhovTPY080n5PCjxDnwA684evQW7mTf6sYf3wEQY5eK1IsTIPUjaL2OZyza4ZkcWly8u0Dbn6xyOszNUXgREaEncIldrtpQfMpyfRo78KECDo1Ot6q0BBDCbcEa+dQeEtMPvE1VFdq5Bdrdt4rg5VjAT9aqHfgodmD5acSWVhJQzvBA9/AaTDtZDSenG/kbjRH+paeVUugA0k0rw+jhLghY2XqiOIdx6zIFTIe2IOohdUbpccOf7D/AEzz4w8kvgw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0AJsKlJH+Dy22u58HUR+dduYwlLJG94ezKMXHoJVwCE=; b=bh/2OjXVl0dUQwgm0XEGCZD8p/bgYpZ0rIjNH9KJZL4M+0m9cI5n5nbuKWoafM/KzZ+kEeTHYTNgEn59znsA12IT5i0KsSP3qZFXKjhNmWXpF8vPrdlaRs7jvjRPTT825Vmb3RKpMxS/GMhA1Bc2M/stOGXoRQ8hGCdUP3gZSvB4YEue1ZG+k0n2vFZIb1f+cQAx/HtxdvKVD6zD+1o0eWZq5mbaXIDymca58KijcGmrP9RGbDaLhv2tOcFB0eeH1JjOMdNKKoIYMWn0scgqoRHHB2uCPJQ9ECsBXvFtGXU8andilNfmd6nisqSpi6/O+iU/TZCUIZyqwR1tU6LWww== Received: from CY5PR18CA0007.namprd18.prod.outlook.com (2603:10b6:930:5::31) by CY8PR12MB8315.namprd12.prod.outlook.com (2603:10b6:930:7e::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Thu, 22 Jun 2023 11:34:55 +0000 Received: from CY4PEPF0000E9CD.namprd03.prod.outlook.com (2603:10b6:930:5:cafe::f2) by CY5PR18CA0007.outlook.office365.com (2603:10b6:930:5::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9CD.mail.protection.outlook.com (10.167.241.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:55 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:34:42 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:42 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:38 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , Sameer Pujar , , Oder Chiou Subject: [PATCH 4/8] ASoC: rt5640: Fix sleep in atomic context Date: Thu, 22 Jun 2023 17:04:12 +0530 Message-ID: <1687433656-7892-5-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9CD:EE_|CY8PR12MB8315:EE_ X-MS-Office365-Filtering-Correlation-Id: f314db9b-fc5d-4a86-4b20-08db7314b3d1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wiKmyIRNphQMVcqitvmFJOc1cbrJbPdv3nR4i2XPolpJOOVI6AWvTODhbFRmIEBQcr2feLZUMRTtaOv7qGCVQuvc2JoDHiMkdv9KvytXn5xwjpd6vasdoYLAQCecTriJIV77x3boLWp0JHHnh9lqKjvPHwrS9ls+zi1fcDBBr4HbBKfVyK7v5I251ODSfUh3pAQV775vSuCrj+/1TcBS/Bmc8Tg7Vtb9yOJLUaQKV92UP3SP+LrTK34TMDicF4n69LbPoblL58Q5s6Y6519xcNXlWIuwX3j43BdT8VbAM3VSOijw/e3CTh0KU2+SBS61GZCfdTb74ECMF5wDL5lxhqzhZSfTNJsAKlkOkskp6NrMdhHUXdUKf+hxnYZouT74noEn/EJu9jzzVfC7ni+v7tsdOj28e6YbDM7GHKTaEJl3vk7eh7tJ1nY2R4U63DGJnmlV1CdqnSpWmFK6Qta68RMNPB0dppJqwwmcM+UA3vvWyT8m2D20Kw1DEw/8eOT/p/YqE+CrIwZMBX8DN6zcmMSFfBphGcUuSWBoEqORYVJqUH3mJYFEuFc/SZjpdP71AGVZyHw3jq7bo1MNXGjExWYsZbNxfwT+Nl3k3zzCEnCBCNGO84tSxRj2ZQwnSRYUjZrk9KsydMB7D7Oosm3RRbZxTE4bCkzT48LHHcH+pu/EE60FbfIdq4z77MaSHH0lo26ZKqEzqnmQamauxqFhi0vt4ZOQ0aahdVWYvg1nwukp5HrmA9gv6qrYmubtxI7i X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(451199021)(46966006)(36840700001)(40470700004)(6666004)(7696005)(83380400001)(82310400005)(186003)(7636003)(356005)(40480700001)(36756003)(336012)(426003)(2616005)(47076005)(36860700001)(40460700003)(316002)(70206006)(4326008)(70586007)(2906002)(7416002)(8936002)(8676002)(26005)(86362001)(5660300002)(41300700001)(54906003)(110136005)(82740400003)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:34:55.5341 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f314db9b-fc5d-4a86-4b20-08db7314b3d1 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9CD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB8315 Message-ID-Hash: EFVOMLASYVML2PRUC72OTLA7TDAQY5X7 X-Message-ID-Hash: EFVOMLASYVML2PRUC72OTLA7TDAQY5X7 X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Following prints are observed while testing audio on Jetson AGX Orin which has onboard RT5640 audio codec: BUG: sleeping function called from invalid context at kernel/workqueue.c:3027 in_atomic(): 1, irqs_disabled(): 128, non_block: 0, pid: 0, name: swapper/0 preempt_count: 10001, expected: 0 RCU nest depth: 0, expected: 0 ------------[ cut here ]------------ WARNING: CPU: 0 PID: 0 at kernel/irq/handle.c:159 __handle_irq_event_percpu+0x1e0/0x270 ---[ end trace ad1c64905aac14a6 ]- The IRQ handler rt5640_irq() runs in interrupt context and can sleep during cancel_delayed_work_sync(). Fix this by running IRQ handler, rt5640_irq(), in thread context. Hence replace request_irq() calls with devm_request_threaded_irq(). Fixes: 051dade34695 ("ASoC: rt5640: Fix the wrong state of JD1 and JD2") Cc: stable@vger.kernel.org Cc: Oder Chiou Signed-off-by: Sameer Pujar --- sound/soc/codecs/rt5640.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/sound/soc/codecs/rt5640.c b/sound/soc/codecs/rt5640.c index c7d2f31..a54d2bd 100644 --- a/sound/soc/codecs/rt5640.c +++ b/sound/soc/codecs/rt5640.c @@ -2552,9 +2552,11 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component, rt5640->jd_gpio = jack_data->jd_gpio; rt5640->jd_gpio_irq = gpiod_to_irq(rt5640->jd_gpio); - ret = request_irq(rt5640->jd_gpio_irq, rt5640_jd_gpio_irq, - IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, - "rt5640-jd-gpio", rt5640); + ret = devm_request_threaded_irq(component->dev, + rt5640->jd_gpio_irq, + NULL, rt5640_jd_gpio_irq, + IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, + "rt5640-jd-gpio", rt5640); if (ret) { dev_warn(component->dev, "Failed to request jd GPIO IRQ %d: %d\n", rt5640->jd_gpio_irq, ret); @@ -2567,9 +2569,10 @@ static void rt5640_enable_jack_detect(struct snd_soc_component *component, if (jack_data && jack_data->use_platform_clock) rt5640->use_platform_clock = jack_data->use_platform_clock; - ret = request_irq(rt5640->irq, rt5640_irq, - IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, - "rt5640", rt5640); + ret = devm_request_threaded_irq(component->dev, rt5640->irq, + NULL, rt5640_irq, + IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING | IRQF_ONESHOT, + "rt5640", rt5640); if (ret) { dev_warn(component->dev, "Failed to reguest IRQ %d: %d\n", rt5640->irq, ret); rt5640_disable_jack_detect(component); @@ -2622,8 +2625,9 @@ static void rt5640_enable_hda_jack_detect( rt5640->jack = jack; - ret = request_irq(rt5640->irq, rt5640_irq, - IRQF_TRIGGER_RISING | IRQF_ONESHOT, "rt5640", rt5640); + ret = devm_request_threaded_irq(component->dev, rt5640->irq, + NULL, rt5640_irq, IRQF_TRIGGER_RISING | IRQF_ONESHOT, + "rt5640", rt5640); if (ret) { dev_warn(component->dev, "Failed to reguest IRQ %d: %d\n", rt5640->irq, ret); rt5640->irq = -ENXIO; From patchwork Thu Jun 22 11:34:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 694926 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 665E7EB64D8 for ; Thu, 22 Jun 2023 11:37:35 +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 17B55852; Thu, 22 Jun 2023 13:36:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 17B55852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433853; bh=71TnWl5vQ1VYhptihx4gdwhha/gx2FUtS8hn2aWfnsE=; 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=E4G1mdP9/TritQV9wQqzjPHXJ/7tv8aAE+zux3GaX6DLrYnwg1QG+4r8e1pfzRaNl SPjSjLE6ZZdEsW9uqqg1hv1SW5ikiLlUt+/TNM55BwfkunclYjp4opxsLGEePrC8I9 N3Y4saSmAQZsXPvv8gqJ/jraEVQ9JMnH7E+1BGD4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id DAC6BF805B1; Thu, 22 Jun 2023 13:35:15 +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 3876BF805AD; Thu, 22 Jun 2023 13:35:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 77239F8057D; Thu, 22 Jun 2023 13:35:10 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2062a.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5a::62a]) (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 B163BF8055C for ; Thu, 22 Jun 2023 13:35:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B163BF8055C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=t3S1t7I3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ltl2E3sUcRhX9T9RJEQxf9B9j8cQ4iUUVPw6y/xTRnNWO25DlrduO0kcleml3rSCUGD/a2CN7pVSdNy93XKSk7VoBGMiKl1UKhmwwwTPnc4NxLeENzxmjn75MxXa/WF0R/+bboeZGowWBnis3fOmSPPSnAwresApAQmnUXdjn3ePyBnjrBz6yl+1fJTPH+jR7CNBR7ivodcG/32aI9KVPBmLElKwzADXoJubVL2bEj56aP0KbtBx641l/iI8G5qyAJ7sP/yO+2Riq9O3rhYenkz3xfkk5frZSgPjRErNYg3G/jQXwRtJqAC7eOMwOVqrY9NjyFyZTnjMckU0+0sdTQ== 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=1/MTBmM+BlPZEZwreOoShm91y/mQbL3reRecZ01CQuk=; b=NYj4JvBbAQi91aviKFArEbGmt6L7bs6ZvppXaWfiK344phc/H9rTxrWPi/wSXymLU9/LDCDe0RF1GS0tjrRw4hhgKBbT1gpX4rG91z+CWMv+ezK6LaBNKoXg0ZbPiYGyKYy33L2e+OU+NovaDAF5IWzpeH4FJVYY1v9tWPa/MAuDxRkunsXc8QhbrYL5FuD981veRIWMd9h4x2uM3J92KOowxDJ5zCCppBGHgzDU1kZ5/xDcPhe2yMe0/ZDdx+JOjx/Q/w5n07F2dQraY4fV+J2xnJX1DwkALQPgEwIVKIQyuOANHMvb0fUcJU9aOoiZu+AgjjPazaPanaYtqGVkyQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=1/MTBmM+BlPZEZwreOoShm91y/mQbL3reRecZ01CQuk=; b=t3S1t7I3kaoS6GbHhop63KrGm0UROr3oW26AvQ1t9JTbEzrS3ERL1h67SNCaAnZQRr5Z9nbzIeVOHa8nKMfgSBkqq3k26J28krb2ZoeMAp6agnAGef74YZZDDTMhoFh7EPMt0UejAd7OPNRFv8UaPK6ZyM9kEWzip7IYJj1qOGCaYhm35cN9lRCl3twgHY5YWhecsJa87TiN5qlXi442Sn5tjWMfUD8HjWb49wxhcDzdq7as2pPhvvjEkrjKUX4Yt942nhbd9Pvp0v2zSpInEm976vCNk4mrPaCDdCP5h3mEdKwDUnzPm6aGHA2sLMG1+7TIL9b+2/gkwsll/+Z13A== Received: from CY5PR18CA0021.namprd18.prod.outlook.com (2603:10b6:930:5::9) by BL3PR12MB6380.namprd12.prod.outlook.com (2603:10b6:208:3b3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Thu, 22 Jun 2023 11:34:59 +0000 Received: from CY4PEPF0000E9CD.namprd03.prod.outlook.com (2603:10b6:930:5:cafe::8c) by CY5PR18CA0021.outlook.office365.com (2603:10b6:930:5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9CD.mail.protection.outlook.com (10.167.241.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:34:58 +0000 Received: from rnnvmail203.nvidia.com (10.129.68.9) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:34:46 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail203.nvidia.com (10.129.68.9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:46 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:42 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , Sameer Pujar Subject: [PATCH 5/8] ASoC: tegra: Use normal system sleep for ASRC Date: Thu, 22 Jun 2023 17:04:13 +0530 Message-ID: <1687433656-7892-6-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9CD:EE_|BL3PR12MB6380:EE_ X-MS-Office365-Filtering-Correlation-Id: 948ac7c4-0452-42d3-22a6-08db7314b58f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: W02ExsHH2v0fnMNhyE1Hi/LraW/oK1egK8A8jeV01WQaTMo+lqguZrUw9zmhRUKwqxjlTlZm6E9lz4fcWKT/57+qlMIezPg+r8it2aUb6nA0d2qiFhcT9bcN2UmrFRuwZIP8szIa32kum3kVuPbTdRcRD3CjPBYuGRfj/LNe381M5BZxtQ5aIUyzTG9TVv4Ay6EBzhT8m0dhIIoljvsyl9bSo4m/zy/O7jDfnqjCIDHvsSHC8QU+EEQNF0KFviAAA7PyYUmLEeFHnwdSmtQBGiTo+TCoHbu+4PQJyISpC7aMEQ2Dr6HPmNhQVNvGD0xTDspMpyrgleuJdZVBxkw9UHuH5HTSC8d1FSQ+54cgdzQlg/B8oXBVsPvIINr2F+EEzv3CtbwFoznDiIlT7aMbdjPO4bzS46arG/5+QsJO+zMUV6vIMXgnMwFX3nrQFZ0sf6XRZ8bF4U4gtQkp6udcyxN1k/5flowxa8/HpgmDAWHNdDlx30Q3BWyS2/nvUjctskcmkTXLSHpH4twgMKEc6jtzNcoI6nSdWrskszwItHqQkxMt/Iy7JR3/50ax3nfPLDRfl8mGFMhtmh4OAUl/Xg5MhDnQ8ct3b72yI109IyPdDaucf2MzwcWhEAXcQovLrOJWhLTxQgZcr+6479Q4delM05cwiPEh+BBVwxy8NxV2luQIN5v3awrFZH+m9qLilI0u8ahJX4EIWwdOq0aMJZc4XQBKh8TEHbGoCEAHpnFFDAB6SSj12nf6TlY2uDEj X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(39860400002)(396003)(136003)(346002)(451199021)(36840700001)(46966006)(40470700004)(4744005)(40480700001)(2906002)(6666004)(8676002)(8936002)(316002)(41300700001)(5660300002)(7416002)(70586007)(70206006)(40460700003)(426003)(7696005)(478600001)(36756003)(54906003)(336012)(82310400005)(86362001)(82740400003)(7636003)(2616005)(356005)(186003)(4326008)(47076005)(83380400001)(110136005)(107886003)(26005)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:34:58.4560 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 948ac7c4-0452-42d3-22a6-08db7314b58f X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9CD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR12MB6380 Message-ID-Hash: MR4QB4M4Y4TC5FJ67NT7GGTBQ3KGUSUF X-Message-ID-Hash: MR4QB4M4Y4TC5FJ67NT7GGTBQ3KGUSUF X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: <> List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Align with other AHUB module drivers and use normal system sleep for ASRC as well. Signed-off-by: Sameer Pujar --- sound/soc/tegra/tegra186_asrc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/tegra/tegra186_asrc.c b/sound/soc/tegra/tegra186_asrc.c index e016a6a..208e2fc 100644 --- a/sound/soc/tegra/tegra186_asrc.c +++ b/sound/soc/tegra/tegra186_asrc.c @@ -1024,8 +1024,8 @@ static void tegra186_asrc_platform_remove(struct platform_device *pdev) static const struct dev_pm_ops tegra186_asrc_pm_ops = { SET_RUNTIME_PM_OPS(tegra186_asrc_runtime_suspend, tegra186_asrc_runtime_resume, NULL) - SET_LATE_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, + pm_runtime_force_resume) }; static struct platform_driver tegra186_asrc_driver = { From patchwork Thu Jun 22 11:34:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 695310 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 1ED4AEB64D8 for ; Thu, 22 Jun 2023 11:37:54 +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 07FBAA4C; Thu, 22 Jun 2023 13:37:02 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 07FBAA4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433872; bh=mB2WeoU3wq+v6eUvWuwNq4WJNibMZkGv1dYdVhYvhzk=; 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=fcDPKNK1YmnjpHYos+KsnTB/rvDd3yl+hlFHMPsKqQ/rO0ZvgiXd5TGhBQG6WFAF8 quknQUJPWsPZJKAtRpv53L2hopfFBZ7LPtkzh2kEI+mkrsUVwNLW9C9FfWieOjSXzD 1ZX+JexUvnnNOCMhdwwXR2nI5WXvczOId03740aE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 72A0AF805B2; Thu, 22 Jun 2023 13:35:19 +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 B88B4F805B5; Thu, 22 Jun 2023 13:35:18 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8A27CF805A1; Thu, 22 Jun 2023 13:35:13 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20625.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eaa::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 282F7F80141 for ; Thu, 22 Jun 2023 13:35:07 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 282F7F80141 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=gTvMrZod ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KP4tYwuD9/dMUNF+MQy27gQ+5GrwrwJ3Uisfzw4SySX2RJXGkchl4HM/8dCYhMWg81YV+RMDmNkb1KApYwpGuV62EuFzoEj2iFmr8ogmTGfQ8KgPme71dQNSV73omPaZ9MahKgyoc/SIZ+OpdZV7Y2Sqfif2iP8e65XCliAsUe/9PFC71Hht/yLvbuRV8+Qz7NOe02rpiXV/wqbveFD1mWd0IghbFGUJJVRr5iM2gLPKHz574OGINgu+i75YKm5SnNv75cA6kQ0GMEGcJMusgkNI9HuC7sL3vibhqnvzUpt4HAZR1qa9soo+/lCx4jWg4/xZPf4rpGi6BDPqKZF2/Q== 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=zkxqy/MuPBKrFxC3rb5vuwr5GhxPJZyxVr1KdKBwpUc=; b=EIX073bxskkNZQCX2IDuTT4VQf/WKTf5sR04Sh7+jQdCsh5WARZ1Xon2n8E89i/sTKtgBe9jpTg4SCW6nCqyqRMnzRJ8RffZPRbb2zscPi5oI5TaveAn74qPNUV7hoAlZSxJ8JV6oGKQV89gTb6o1rIg22wtCL3C5474UwsGBbYfLCSZTel9XBqIyjnnyYRk4yi0SCksLsjqjLqagYdIkEeZb+9n1fwNiKNKzWZlKc4D0Gx7wyHYKUGsyB2eVD2GDU6mnTYzYH46tNxXxgkj5IWunzxywSEpJ4fkGI46bRfjYJHO119RADwbDO6wbcvLMVdoyKCpZ+C9QvxMRT4zeA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zkxqy/MuPBKrFxC3rb5vuwr5GhxPJZyxVr1KdKBwpUc=; b=gTvMrZodM/b5idBev0v9C3l01m4LnS6QIDU3C44EZMxViLQ7EVcif8fcdMQ/qRmMe5KZgWMHJY+i6sBOwr/rNp+o9hQqpwolkoehqhQ60CzaEp443kuEZ2dIMVwTN5/MJs7inpKtXeeRsoLlwUpgKGdllVMb+/WRSDo5xShLD5XqGOGEbmtoPG51hUalKGDBxZ9gOJxDa6Y+jZSTJw8ypC2d2y8AQyv6usm1iLlxLUFRpeBQaG6/TnfhyN0eXoCHhr7wdffCBeWMvlgmil+bLrxc46fY+WEEja8XFBW+Vke5gDE61JmN1xG3f0RFHSeFu4zUDa4nZ9VkvLEl4chglg== Received: from CYZPR19CA0022.namprd19.prod.outlook.com (2603:10b6:930:8e::25) by SN7PR12MB7978.namprd12.prod.outlook.com (2603:10b6:806:34b::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Thu, 22 Jun 2023 11:35:03 +0000 Received: from CY4PEPF0000E9D1.namprd03.prod.outlook.com (2603:10b6:930:8e:cafe::39) by CYZPR19CA0022.outlook.office365.com (2603:10b6:930:8e::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:35:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CY4PEPF0000E9D1.mail.protection.outlook.com (10.167.241.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23 via Frontend Transport; Thu, 22 Jun 2023 11:35:02 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:34:51 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:50 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:47 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , Sameer Pujar Subject: [PATCH 6/8] ASoC: tegra: Remove stale comments in AHUB Date: Thu, 22 Jun 2023 17:04:14 +0530 Message-ID: <1687433656-7892-7-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000E9D1:EE_|SN7PR12MB7978:EE_ X-MS-Office365-Filtering-Correlation-Id: 1734b9f8-aac4-4575-7bd4-08db7314b825 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: a1KePkMOJsm+ofOIzLvU/pI7NcS/anfbu7+C6gs1oNY3XhEsx7J+k5GKzXVM1dMZKCH3QnrXy/2qkAWCTQKddI87HqYZUZC4+jc+uGiyoY66TB3CVr3tbRr0o3YgBqhKA6CARmkYOzR6ANltPBr6afEnpiNAmURNWJfS7Spn3TvmROMaNFt8I1C/4y9Pi4ExDK0VGQ5M9fwYHB9RVSlq2WBanrp2Hn4Pvhu3dVuyLf/0uwy7kQBIaezvL9CZRI6Bvn1iSB7cSDguKrIWWTOYBPis6tLASRPOYnC0CgkyipdsH9fTIHTGDZDvpK+69RyQwUWAz5g8KaWiEnH3B+HGtalwXIbYfbrQBUz+ZrSoVqNmbyvrchZSJ/7ROb/HRNxsFwwgMqO65+NjW1LYd15G2cl20p3Q+C1TYw48cDL2iEgTst40LFVFlF8LR2YMu69akbrGa2CiMFdOg5YkzX1nDDwVM56moL2N3AC6L/MSDUqm2L6djKzEZp7TeeWaVfTU7+aAyniG+c9CWOrjtHarPzda+kK70AQdADfyQZDigOKQNutEOTsSupQRxjCKsAH3+6bugPOWcNHQEvacAF/Djkr3OYQrDIFgOdUcXhca/J84wefGtxQhbLOBG2Zj7m2SDu6KFCTCZ5dNO3MOClj41apdX3Iskbi4ZBuxvK5IvWkGbWV58siGxTC/19H9+9L5PXs4v3UuoONz19yuAba0glX83i04bJCepWjtXPGcT5fcxukxjIaoVPN+xJJ03LcT X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(396003)(39860400002)(136003)(376002)(451199021)(46966006)(36840700001)(40470700004)(7696005)(356005)(36756003)(7636003)(82740400003)(86362001)(82310400005)(4326008)(40460700003)(41300700001)(8676002)(40480700001)(5660300002)(26005)(107886003)(8936002)(7416002)(478600001)(83380400001)(186003)(2616005)(2906002)(47076005)(426003)(336012)(316002)(70586007)(6666004)(54906003)(70206006)(110136005)(36860700001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:35:02.8124 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1734b9f8-aac4-4575-7bd4-08db7314b825 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000E9D1.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7978 Message-ID-Hash: RKL5NQW2OBVGKAY6Y2KKIR7ELGTYPIQR X-Message-ID-Hash: RKL5NQW2OBVGKAY6Y2KKIR7ELGTYPIQR X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Remove stale comments in AHUB driver which is related to DAPM widgets and routes. This is misleading otherwise. Signed-off-by: Sameer Pujar --- sound/soc/tegra/tegra210_ahub.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/sound/soc/tegra/tegra210_ahub.c b/sound/soc/tegra/tegra210_ahub.c index 8c00c09..3f114a2 100644 --- a/sound/soc/tegra/tegra210_ahub.c +++ b/sound/soc/tegra/tegra210_ahub.c @@ -712,11 +712,6 @@ MUX_ENUM_CTRL_DECL_234(t234_asrc15_tx, 0x68); MUX_ENUM_CTRL_DECL_234(t234_asrc16_tx, 0x69); MUX_ENUM_CTRL_DECL_234(t234_asrc17_tx, 0x6a); -/* - * The number of entries in, and order of, this array is closely tied to the - * calculation of tegra210_ahub_codec.num_dapm_widgets near the end of - * tegra210_ahub_probe() - */ static const struct snd_soc_dapm_widget tegra210_ahub_widgets[] = { WIDGETS("ADMAIF1", t210_admaif1_tx), WIDGETS("ADMAIF2", t210_admaif2_tx), @@ -1092,11 +1087,6 @@ static const struct snd_soc_dapm_widget tegra234_ahub_widgets[] = { { name " XBAR-Capture", NULL, name " XBAR-TX" }, \ { name " Capture", NULL, name " XBAR-Capture" }, -/* - * The number of entries in, and order of, this array is closely tied to the - * calculation of tegra210_ahub_codec.num_dapm_routes near the end of - * tegra210_ahub_probe() - */ static const struct snd_soc_dapm_route tegra210_ahub_routes[] = { TEGRA_FE_ROUTES("ADMAIF1") TEGRA_FE_ROUTES("ADMAIF2") From patchwork Thu Jun 22 11:34:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 694925 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 EC273EB64DA for ; Thu, 22 Jun 2023 11:38:06 +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 E0689DEB; Thu, 22 Jun 2023 13:37:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E0689DEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433885; bh=FwayqleBgEOAxs19wet/kDLMS22UbCbeOnFtQ2l9fHk=; 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=b8dUYfv3D1vqAX+FcBzXcFE40wm4Dxuz1qKmnJtXZbOz6KRWsSBNZxVeRy0zkTPYi Vmyh0nQEkHShhXAA4JyFp5pF/k0OMRRm7icRwxNUOo3dGC/rnnk39tStPsyvJod8xq JvsAeMJ9DJ9c5Cql2Aa9r2HpQJ2EIHSuNKfHoWj8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 32A8AF805C0; Thu, 22 Jun 2023 13:35:22 +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 4B0F1F805AE; Thu, 22 Jun 2023 13:35:22 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4C448F805B5; Thu, 22 Jun 2023 13:35:18 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060e.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::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 0ABE0F805AB for ; Thu, 22 Jun 2023 13:35:12 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0ABE0F805AB Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=me9pIpJ0 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QV2JutbNkyTRWbmYWC6FD3OzIteAwvwmlkp6e4iH9AKbwtIUUkJh0x9Ljj/23jD3/r6WgFKj2FKr7L4va/rnojSghXrl8dc3Q9dMZ7emlhhHhHm5bvS4DbKZ8/dyqCR2+W3qd4WsedpxwwRDRG/dEZNbN90th3Mmv7rzGLncWyhI4bbvDsbLYjs2PkIE/WG3DsrWeaE3IVRw3aXHN82KpPQDL6VM1e3dycUO/qppyik8VNm9yOGgqFkRjcDGrh5ubMMhQjYMz2F78Fs4PmKcwpTaBczF4rd7UDOsg1GA2iEg3ycRdaawJvJpkxd/JunVgG6Xky3iPvodr+BUUnDxPQ== 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=EuCwMM3vyXtufdb1uc4t1V6RwotqPAeFw7Fjw46Fgxc=; b=HeACF+CFv5WP1FH6kz08NONERrUHlkQFojhif6Gc/DtdQJiQAR0gCp8e9adMAup5Fl7nBEMrCqqjwEyPKnHWK/EwWUMoSTOogTCCo3pIedgMFa1akCrkSBzkXCw13VBw/rNnvL9iOEZLzHYlYGksr1bRMeQstEVGHqpbTRAeq1p9i1oBvqC0MP5BVNvdwxRvq7KZwrylrybvxcbLV61H1eIcZxC8m1RTR/Vs9bNWPRjIEQ9mPda6ybCWgVOD411IYOCHb0gcWLDSN+fCE3TRHOmKpL8E1+cyeGy7U5MFsweoX20vHHPWBJPCyjGoeMHzpGOrMvGwmT8VQRWWiDFj2g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EuCwMM3vyXtufdb1uc4t1V6RwotqPAeFw7Fjw46Fgxc=; b=me9pIpJ0N4q1n2Cpcn2z0nDeqkSpWbo3S6OI3YiEUFaon3ydbIXxjVw252vWcz5eu3i/uJJp3Pqju7NYiGx7qvre+8sSCZGCWnhZcqRznNUfEiXGOUmmmZsfuhyYnWKxPeJ2Tpi+GkWAHl0LWfBObDAbshmw7jWe3oo08Dp383sYBvY8tFik5QES2LlHVYHLfTfKQhXpN44CoTpWrWY7BnGX9muwHbRx48Nk7jOgiQzx2+cCUgrE5eJZiZdu2mFEajEvLy/yz+il4lLLUW/ZW3o1s+J0leUjkZo+YT4+R1AZf/CAeEnF6Z2yC4J9wkynermugFcEjzf0yoFc6KXmJQ== Received: from DM6PR05CA0052.namprd05.prod.outlook.com (2603:10b6:5:335::21) by MN0PR12MB6317.namprd12.prod.outlook.com (2603:10b6:208:3c2::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.21; Thu, 22 Jun 2023 11:35:08 +0000 Received: from CY4PEPF0000EDD1.namprd03.prod.outlook.com (2603:10b6:5:335:cafe::c8) by DM6PR05CA0052.outlook.office365.com (2603:10b6:5:335::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.9 via Frontend Transport; Thu, 22 Jun 2023 11:35:08 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000EDD1.mail.protection.outlook.com (10.167.241.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.20 via Frontend Transport; Thu, 22 Jun 2023 11:35:07 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:34:55 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:55 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:51 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , , Sameer Pujar Subject: [PATCH 7/8] arm64: tegra: Update AHUB clock parent and rate on Tegra234 Date: Thu, 22 Jun 2023 17:04:15 +0530 Message-ID: <1687433656-7892-8-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD1:EE_|MN0PR12MB6317:EE_ X-MS-Office365-Filtering-Correlation-Id: 88ace55e-18ab-4207-4132-08db7314bb34 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SmZmN51yhWdzOZkMKXgVy3mC8km9ckJy5cgtFlU3P9+p69Vpbs68xSbJ1iJclvZ3+2rVsRpXgWZvh1HJJ2t4EXxB6ES+irWRfWES3yvclDIgTIlE7I04L/Cc7rAQS2dLivxrdGCcgaRF1DAF0iu9HsuvjL0YH6P+qJC70V0BaetVLVvnVqNuKy/mkkfBWqJHyId92CJj1X9WdYze3XFOitBKAaL1W4QrbNedKPPiTQZWgMuappfV5nU99eLg6/PQfC7tmsCwGUqiZE6aTyGSHAl9ifDsmjc9rLrROrZFkTegaF9cnugBI0ie5Z5SpI7LLHnWrmJLn8SE0/pofrKvFV39BxnPtgES53BRSB3LBNECgEOLuKsdiFu+bCyiTcOxkPz2e7WMheXuvBRqdfV39+05Evc+kzl1IHeaIEWdTy55zP/mCQGYh/SD7qff10ZfOsWiKiPHk6LBs6KQf5SBz8emTuSF8jLgsUkKQwOpS9PQhIDPomfgyX8KLooD7lJQvIUfNu21NEwN1S6YjCSC1XmqX9F7QqKPN46ppppASMHQINwvXPBWoMrqvTzz+N4Le9Ha81aiojIzjedgY5aOFX2O7Pb60YSY45vFUZBSAjHxz5lqiAXkq0iI7NeVxEMSTZ+akjXnjjqksJd/22bWO0uUPcYDMTYTiNYtBDJ5v+FSShVCBVhRvvOEnpgRM1Add4HNkQeSvPs0+SVzsCoceNkYKvLMPuE6uVIrEFHL8o+Scc888L0SxzshvCvNoQs8 X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(376002)(346002)(136003)(396003)(39860400002)(451199021)(40470700004)(46966006)(36840700001)(36860700001)(82310400005)(8936002)(47076005)(107886003)(54906003)(83380400001)(6666004)(7696005)(110136005)(336012)(478600001)(26005)(2906002)(2616005)(186003)(86362001)(5660300002)(40460700003)(36756003)(356005)(70206006)(40480700001)(4326008)(70586007)(82740400003)(41300700001)(316002)(8676002)(7636003)(7416002)(426003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:35:07.9267 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88ace55e-18ab-4207-4132-08db7314bb34 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD1.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB6317 Message-ID-Hash: JWEFUKMDXARSQPM62SUNFYWAOWJXSLES X-Message-ID-Hash: JWEFUKMDXARSQPM62SUNFYWAOWJXSLES X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Sheetal I2S data sanity tests fail beyond a bit clock frequency of 6.144MHz. This happens because the AHUB clock rate is too low and it shows 9.83MHz on boot. The maximum rate of PLLA_OUT0 is 49.152MHz and is used to serve I/O clocks. It is recommended that AHUB clock operates higher than this. Thus fix this by using PLLP_OUT0 as parent clock for AHUB instead of PLLA_OUT0 and fix the rate to 81.6MHz. Fixes: dc94a94daa39 ("arm64: tegra: Add audio devices on Tegra234") Cc: stable@vger.kernel.org Signed-off-by: Sheetal Signed-off-by: Sameer Pujar Reviewed-by: Mohan Kumar D --- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra234.dtsi b/arch/arm64/boot/dts/nvidia/tegra234.dtsi index f4974e8..0f12a8de 100644 --- a/arch/arm64/boot/dts/nvidia/tegra234.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra234.dtsi @@ -180,7 +180,8 @@ clocks = <&bpmp TEGRA234_CLK_AHUB>; clock-names = "ahub"; assigned-clocks = <&bpmp TEGRA234_CLK_AHUB>; - assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLA_OUT0>; + assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>; + assigned-clock-rates = <81600000>; status = "disabled"; #address-cells = <2>; From patchwork Thu Jun 22 11:34:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sameer Pujar X-Patchwork-Id: 695309 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 E7846EB64D8 for ; Thu, 22 Jun 2023 11:38:24 +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 7B97886E; Thu, 22 Jun 2023 13:37:32 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7B97886E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1687433902; bh=OQEubNUpdPdmyMl0zTUVWynZz7T1818ePBq7KXB86pY=; 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=neSH26z02Hdc3xt70vG8Udlw7VfJh3OsYg6byfSFzYw0qWnCBY31MTgAKQpknG4SO RtacCJAcm876Xkqr343N4Pk151vvqCfTM1+VLBv2YTEUwnD0+DdsvBk3JepbzNVS9g bEiFR31zETlwSs4xPKepV08rpp2JM/wOFokZejso= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 35125F805C6; Thu, 22 Jun 2023 13:35:25 +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 9E107F805C9; Thu, 22 Jun 2023 13:35:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 878F1F805C1; Thu, 22 Jun 2023 13:35:20 +0200 (CEST) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on20622.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e89::622]) (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 C0C97F805AE for ; Thu, 22 Jun 2023 13:35:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz C0C97F805AE Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256 header.s=selector2 header.b=Wvw7ikTi ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LNINejg5mrav2fw13DndTNzYL7QSSANn0yThmW4hpJewgzVAmMesvzbrJIH8/kuuBHDMHmELyPmMAWKO1P59dUOIXPwjiB5nVg4CQyMrftR1nCojxc8Cpc0gLs2Yg9qZY1X3JB0KAyLHIcxW6Mqyh/O4v/nyzCFr8BoHHOUs2aXn8MRCeJ11DqZtA5m0wL1po3vI/1HxZWeUNO8pWlqdb3Na95wO+al33Iw47Uooe0xWJjpuKpNAIl1Zr2Uva5mViP2gFgvWYfEX+IBSi4cMVc7RoOv8QvoxGHqRPLmYmnrCjafe0W4RMwk8h1sqN7g3+/XNNtWscgr9slrF1Kp9kw== 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=jGrVWp+S+O/NaInoHUg2uGXRtbSVDGzMISV7CfhHRhM=; b=M/YKIF4t0Jn1CqP4x1UinJr2Qq3vawSWgPeNA0jVwk96ojxVCYuS61QBK280ojacAR+g7931PV0rG4oL8EUVsy2K5RF3W8u6rrOmoGS6tkSMcrAnbcRKaUeP2uRA8C407UqH+PX+lsrwp9GDgcqYD6jZj9GJSZJvrr9GfsnrBf2bg/rcWjoJbrlXM7oPFuLFmObQ+2o+w1ot5niNP7pmz3cqk0b3cO9BqB4waS6Ulzp/VXGPspEug0r7oeR6MgYTNVskJU+kICdIaaECDhI4EyqAh0MA2xR7roVwe/dBYYAgumtG9i74b2W3Bjtg0MGkVuma4k9ap9MDdbeTnhASDg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=kernel.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=jGrVWp+S+O/NaInoHUg2uGXRtbSVDGzMISV7CfhHRhM=; b=Wvw7ikTidQn1Bkr5qyQwEAtgC8cwL0G0R/l28aIXQlsopLMgXC6CAhGGdipumaojxcsgb9cmewOP1D/dXpswgUO4FY2UdYAwtW5rQ/EKe0X2Ah0YyOTGQztpVwFmw3+TP2apMH+wM8ynKKOmrWqLZOupO9ZiaPHlI0vCTnpFhb1CO0wGG12zw8MFqrnachOJI+H8g60Q2tlroseH1TjvNJlJXuWm7DBtxkD6nreadkenxcJFyxpeA8cWHywhTbLqKwrDANH5iT4iAy9zokAlTOLMu9D1PEzz2MTlzjrJp/opXyGX5oLzOj7lkyhMxyxAZnuGiLPWrv4/DVkL+IFgbg== Received: from DM5PR07CA0113.namprd07.prod.outlook.com (2603:10b6:4:ae::42) by CY8PR12MB7218.namprd12.prod.outlook.com (2603:10b6:930:5a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.23; Thu, 22 Jun 2023 11:35:10 +0000 Received: from CY4PEPF0000EDD0.namprd03.prod.outlook.com (2603:10b6:4:ae:cafe::7a) by DM5PR07CA0113.outlook.office365.com (2603:10b6:4:ae::42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:35:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000EDD0.mail.protection.outlook.com (10.167.241.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6521.24 via Frontend Transport; Thu, 22 Jun 2023 11:35:10 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Thu, 22 Jun 2023 04:35:00 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Thu, 22 Jun 2023 04:34:59 -0700 Received: from audio.nvidia.com (10.127.8.10) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.986.37 via Frontend Transport; Thu, 22 Jun 2023 04:34:55 -0700 From: Sameer Pujar To: , , , , , , CC: , , , , , , , Sameer Pujar , Subject: [PATCH 8/8] arm64: tegra: Update AHUB clock parent and rate Date: Thu, 22 Jun 2023 17:04:16 +0530 Message-ID: <1687433656-7892-9-git-send-email-spujar@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1687433656-7892-1-git-send-email-spujar@nvidia.com> References: <1687433656-7892-1-git-send-email-spujar@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD0:EE_|CY8PR12MB7218:EE_ X-MS-Office365-Filtering-Correlation-Id: 00150a81-5e68-4995-f4dd-08db7314bcb8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qLNWgnyiHDn5jeyx7KSvzrLHDygUxZf+PEDfhXNVdbazwqktAuHqzfzNcpRWcet4ita1otDsxI/N9TwDu21WpcB/foFToHT6okeLyKR1EqX07aLdrKJHvc2gEAD9+GsVRMxzwFth/3TBVX/cTX20072qrmoxPrVYGGVRdrcit0+bbCa41q6e4Zg81RwnT1zcjUsd5n+Qkfo+eDo4fYq0Bta2LT1Wb6ZJsVjN/tYeOKfH4265Y1hWri4WkJ7Vx/GpHh0rRWJJDSxtpb476B/1EiKFyNEXK5S6liMpE7eADg+8AfwB/1L5wnf2+tt4kqffU6CJi/5Xskbuzvk2wNqU6PHkJ+kW4LKrwk9itEZbdDEbbF9R+L2fCYBT1Ocpxob0d6LjihrY4DIUoR8G/6WMcDU6OhsE9z9WhRK3R8qk4SRImSF3PjsZiL1XUlUbqMEc43Mq/irPk3sNWS7yfD6zzoT51BiTlEohZyKBY9mDUCkjL8vuhE4wnJvZgj8RArpM/MSnmj0F7D89CgO8HpTq4qKa7KGVz56J80VtdMY9H5Ics3SZLWhWpIGqaiQtdilXoYrizSdpu7wxXUnpLLZBLK2v+4kh0MHB8/ujaHDy6bWx1zRTHkUPesPei4IKSs6MyKkUxnCWmlqa01BVLTyBE++roiyCfpgda6Ffv8oFW/W1JR5YgatciuyhZ8A0zW2dXFwxe/vlZyDSqhqzobMk+lSkemCM6wZkiaJ30Qje1BM= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(136003)(396003)(346002)(376002)(451199021)(46966006)(36840700001)(40470700004)(6666004)(7696005)(83380400001)(82310400005)(186003)(7636003)(356005)(40480700001)(36756003)(336012)(426003)(2616005)(47076005)(36860700001)(40460700003)(316002)(70206006)(4326008)(70586007)(2906002)(7416002)(8936002)(8676002)(26005)(86362001)(15650500001)(5660300002)(41300700001)(54906003)(110136005)(82740400003)(478600001); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jun 2023 11:35:10.4741 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 00150a81-5e68-4995-f4dd-08db7314bcb8 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD0.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7218 Message-ID-Hash: LOUU5QO7G3URJRY4U4H7REAY2UYG5B7W X-Message-ID-Hash: LOUU5QO7G3URJRY4U4H7REAY2UYG5B7W X-MailFrom: spujar@nvidia.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.8 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: I2S data sanity test failures are seen at lower AHUB clock rates on Tegra234. The Tegra194 uses the same clock relationship for AHUB and it is likely that similar issues would be seen. Thus update the AHUB clock parent and rates here as well for Tegra194, Tegra186 and Tegra210. Fixes: 177208f7b06d ("arm64: tegra: Add DT binding for AHUB components") Cc: stable@vger.kernel.org Signed-off-by: Sameer Pujar --- arch/arm64/boot/dts/nvidia/tegra186.dtsi | 3 ++- arch/arm64/boot/dts/nvidia/tegra194.dtsi | 3 ++- arch/arm64/boot/dts/nvidia/tegra210.dtsi | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra186.dtsi b/arch/arm64/boot/dts/nvidia/tegra186.dtsi index 7e4c496f..2b3bb5d 100644 --- a/arch/arm64/boot/dts/nvidia/tegra186.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra186.dtsi @@ -135,7 +135,8 @@ clocks = <&bpmp TEGRA186_CLK_AHUB>; clock-names = "ahub"; assigned-clocks = <&bpmp TEGRA186_CLK_AHUB>; - assigned-clock-parents = <&bpmp TEGRA186_CLK_PLL_A_OUT0>; + assigned-clock-parents = <&bpmp TEGRA186_CLK_PLLP_OUT0>; + assigned-clock-rates = <81600000>; #address-cells = <1>; #size-cells = <1>; ranges = <0x02900800 0x02900800 0x11800>; diff --git a/arch/arm64/boot/dts/nvidia/tegra194.dtsi b/arch/arm64/boot/dts/nvidia/tegra194.dtsi index 154fc8c..33f92b7 100644 --- a/arch/arm64/boot/dts/nvidia/tegra194.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra194.dtsi @@ -231,7 +231,8 @@ clocks = <&bpmp TEGRA194_CLK_AHUB>; clock-names = "ahub"; assigned-clocks = <&bpmp TEGRA194_CLK_AHUB>; - assigned-clock-parents = <&bpmp TEGRA194_CLK_PLLA_OUT0>; + assigned-clock-parents = <&bpmp TEGRA194_CLK_PLLP_OUT0>; + assigned-clock-rates = <81600000>; status = "disabled"; #address-cells = <2>; diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi index 617583f..e7b4e30 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi @@ -1386,7 +1386,8 @@ clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>; clock-names = "ahub"; assigned-clocks = <&tegra_car TEGRA210_CLK_D_AUDIO>; - assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_A_OUT0>; + assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_P>; + assigned-clock-rates = <81600000>; #address-cells = <1>; #size-cells = <1>; ranges = <0x702d0000 0x702d0000 0x0000e400>;