From patchwork Mon Jun 17 07:28:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700266 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2063.outbound.protection.outlook.com [40.107.243.63]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0787181D1F; Mon, 17 Jun 2024 07:28:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609334; cv=fail; b=sHwYdyLeaDBX+OYi0E8IallsU0M0B7d0HiKTWf9A43FZAxJK0nQ29X8wtb/v9Z/e7byzx1YrhVzOyJk2X15sk2DRjhUeqw2cFdrAmQeX7/HDvGJ2mSHyvygfeNccrCpYqm5bU9G84QheOVu3GKEn+ofajCbPd4S7X9HZd3xmrrU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609334; c=relaxed/simple; bh=zstUqW0O9iyGwmgmUj/fo5AIT5C2CiL9XT1ogom/D5g=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=W+rGfTQlsRgVsPg2O6tsHJGqPXBVbsmlWoeMVQ8cgzc8E9q4AJHd49r7kDEwSDZmUcF6yBh52oz+V4Bw5cNty9XbJe1l7zU1OPU/DllpAGVzvJ+5ERHamLoNxl3iM3e9LRc1SADSsL9lHQFDfZNYerh5mQtEprmaZuQVZ7Wqq/c= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=vyCyQtyd; arc=fail smtp.client-ip=40.107.243.63 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="vyCyQtyd" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XrilXAXz0s7Ej++EGw1K/6BVnyy99RT7wKipBsGe2V0tvxMGW29dcyUIuJumA8y9Fb3GvVGURCYy1DY3d4Pr+L3cy7G4YsY0CYRC9PKyFmlz6TkOzTLxfIuXZSQFTsev+0nQ2EU/BBH2I9Af/7JZYBpsFdWQtGt4WkIgcIhmglLaDyzWrLE8vWyJ8puiij/MngAuu/2lP/K5Q2bjt2+6au1g7U5DpbJJYN1/iosesnUQ3Cas5te7d4GS8MQDNf8gJw+ccvhApq+pdy5JiOp/HM/y8keU5CmdpHW4DrC+miTDlC+NQF7My6Y+xW6l1upofc/iml0kDoBQyCT6ytI6aQ== 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=/XZg0p/QGUq5x7BRVUEh9zpe9JOJie1jgoF6ipXy9YU=; b=TAdFuzU8Df8LfvNwQbrr+j3XM3RSFq5Zjfxh3+BrzXKzlvt5urfFPHxgdT6LXkBhrXHBi40OpxR1Nrjz3oy7RZsGizZ+YrByecqwk3OLkAurFhRDADxy42n4idlGMYds+Isdri1NXcMxQXOj0Pt03/RJxSnx2rWozA+8krMO13/Ag64J1GygV7l42oUW1Yc4RZByGMF9eHr1mSzcqerVDbHy33pCCm7mlNKNcdgMxpYc97kcDzfbAKRy/avJ3044PYJjW5Z+Ngbg4fCEz3KS6PolqSoJWI9XKZhS0g10cW6i5PVmj5xFj85EaoYuOf/5uRhVslam0td3f6gBW0qwEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=/XZg0p/QGUq5x7BRVUEh9zpe9JOJie1jgoF6ipXy9YU=; b=vyCyQtydebcK48pl+T+j0WhLskGiGPd5i1WtuT8BjkC+nYPZIF/09UW6VtM3u9NGKmjvOdyNRO71tOwStiSB6r24vF8k3iaW74xTjDiORJGL57+Rr6QImsyoro3EKFcTQMdY4oAG2qtgCKb8QEbMddK0PD4SLhiA3oed8rs0vEw= Received: from BYAPR06CA0072.namprd06.prod.outlook.com (2603:10b6:a03:14b::49) by CH3PR12MB9453.namprd12.prod.outlook.com (2603:10b6:610:1c9::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:28:50 +0000 Received: from SJ1PEPF00001CE0.namprd05.prod.outlook.com (2603:10b6:a03:14b:cafe::98) by BYAPR06CA0072.outlook.office365.com (2603:10b6:a03:14b::49) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30 via Frontend Transport; Mon, 17 Jun 2024 07:28:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00001CE0.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:28:49 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:28:48 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:28:45 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 1/8] ASoC: amd: acp: add a null check for chip_pdev structure Date: Mon, 17 Jun 2024 12:58:34 +0530 Message-ID: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE0:EE_|CH3PR12MB9453:EE_ X-MS-Office365-Filtering-Correlation-Id: 5e953331-0078-4f72-7c24-08dc8e9f21be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|36860700010|376011|1800799021|82310400023; X-Microsoft-Antispam-Message-Info: w3EVr2N9d4O72QbAoqm/Jd8cI4KDeOxR8tCHXAYMLSBI105efVdT+L2RhlOUbMHEGUxof62aR6d9vg2L7qYopcU2WaZisGpTyjXUdXbPRjY6i851YSi3xh+6bfbzmDQzWTa0h18rujXtv2raDS5eIiIs9KjlyUXsvAjPGt5kA6QO9172kfpxYtX4FCS1dRvg5eEB30+Tt6g8SsumBCgW653ki4S3+SkyjW6U7sRQm4OEPWttH8KjEdtx2s/p3l00AfHI/QrQNYzRYktOGxhHH5kR0NQOZp/wWA6ltwzlWaVXd4H51w26lf7cI94Z7AfJLeKBiadZ9nnnFfv5FOSf5j+P8V6w85cw5D93oZpoFUl4mZwPet+bBbLwzctCTKpbYce89v/31KL+zSSeZI6D3UdRWcmD8jx8KboI4Oc7bsuJadvtw1lmCN7Ry8F0tzU1g1OAqhC5Jw9/F0nqAtTQ5jZQbMQCgebOUPzTEmgh4WQiYWv1ehuwU/TkiR4MGkuX1B3IjXGdfNoGVkyMfiD064EmZWRao39eKdEUIszy6ecXvJjKsUBpFt4aztPsui3PX/2W5Msnbff4m5fTDUx0ZhnRujcjPwKxpNnFU3UJcVlfMde8m1qc77NEWB6lfFxNcwJ78penzjmhH4T+pRQE+wJjq1FruYk/W251futbjHVXPbgprrPxldDHuuRk3bftA4/u06N6Vz6FOhKBgSiPA/oWwdilsyIWPU3+/87wHoMtLzNSoZIR+e3+SrzNBLhUYbMPCSMaGYkhx+TuHHZs5QMpHfJRPFiyOveeyt5oxwhLZwYoUkdN+6kgCQI6iT8qH06+Mt+BB0mQtOvlQEBEVUHy94YzxY49atn8UiwNCNgsfFSvRKybvAuWIQgzQ3d5bnnb70v3MTgGjpTiPRwx5+4EL6udikN9GOU8kEppZtJo8/GANhoBfWIccB3LnTCNFhPMIV6/HrhXjsjaUdQoGPBxdz+R9D5TDNFtJikggXztPnxGKlu8/WdXJA2cHc2KCSJ2qCnqzU9inPbD1kp/kt2+vAEnhdIVTaExdtxLyPcq8phAbOswm8iBb5qrAZheuXHF1PvGFJLdZf4C7vpBXOefe4uEbBZOgsb6sOI5o0+0TYj0/T4iVmH9zxV8YDALlRk/O1RFsAXA8UPWBD4e8p3Q67PVSyC/Dw7uiofRtUW07fQQafZNn6LzteQDxoRcjbqvFTSy9VdZxSjhDuc6gEwx/uz23m7K+Pjp0Rq257Jc9+fVcbKS9t7CulNNc20AYmru7Edltm8m6qQqj5IToVB3pxPQacRYlCRyZkC841Zkk64+5ZAY5rQhYnEPlO2iDgVJMnyViBJ0QjLtZhWeRqejxC956YncZFHUaXHYmJ0YnOez6xi4lcV5bRTZwtSs2SL3vh7Hcuxz0YQypEs4qA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(36860700010)(376011)(1800799021)(82310400023);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:28:49.5437 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5e953331-0078-4f72-7c24-08dc8e9f21be X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9453 When acp platform device creation is skipped, chip->chip_pdev value will remain NULL. Add NULL check for chip->chip_pdev structure in snd_acp_resume() function to avoid null pointer dereference. Fixes: 088a40980efb ("ASoC: amd: acp: add pm ops support for acp pci driver") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-pci.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c index ad320b29e87d..aa3e72d13451 100644 --- a/sound/soc/amd/acp/acp-pci.c +++ b/sound/soc/amd/acp/acp-pci.c @@ -199,10 +199,12 @@ static int __maybe_unused snd_acp_resume(struct device *dev) ret = acp_init(chip); if (ret) dev_err(dev, "ACP init failed\n"); - child = chip->chip_pdev->dev; - adata = dev_get_drvdata(&child); - if (adata) - acp_enable_interrupts(adata); + if (chip->chip_pdev) { + child = chip->chip_pdev->dev; + adata = dev_get_drvdata(&child); + if (adata) + acp_enable_interrupts(adata); + } return ret; } From patchwork Mon Jun 17 07:28:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700267 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2062.outbound.protection.outlook.com [40.107.100.62]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 550FA188CC2; Mon, 17 Jun 2024 07:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.100.62 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609347; cv=fail; b=hO7UIMXl6ikbWA+hxJQajMpMzm7fkDrb6RdJ4tkMwd6exkwAcxKjy/Mngb2i1ewkvUSh7/5tRe+wE+CfoLBBSMl0yVQicgAyBBq2s1LtG2kkpGYcKEdSyId3rWLSeB9c3LCxNcPPNgoF3X+Irtk8V5E3AZbd+cifC0A/qXMhesA= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609347; c=relaxed/simple; bh=ag9+cpmriUp5rqB9HVXP/zFzmxUzmX+ELNNavcFosuw=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=E/50ymVOCCzK7lpl5v81g82JRNuuFAhIqvG/g+lVZrwHl4cVAOWBS/94obNs98pgUl2RRwBxJTz8aTEOYpYRdnTBiKxfH+7clFlF+aiWDB1JQg+R+neY+gZzKaxOB/FmEtjJLAt1M9+xvGK3Vwm1PPcqq1X2ln7/pWw4etQsEdc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=qAV48hqQ; arc=fail smtp.client-ip=40.107.100.62 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="qAV48hqQ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L2ix8LpdDpGqM+ywbuhjJK8RG4sh9XGYXQCwmlkqSAVqYqBdjNXk+Nn5bMZtChEwnB7kjAILLFCF9NVAjAko7c36fVJOieR1EAZ1XOyIHSvPXe/56upn2G4PWdj9CIVz8BpQyIcA3pemMy52m5ynG4UDo2DtSRIv8tYEfswAQft+lls60sCU2N5V0qvQe6yD0oBXAgC8BvGuyxbcYQDkvkMoaB1GB30snZfQujmpRLwIoqoCHYKvXXFjlzZNoDiHtwm++RPLqdA5e1PsssD6cVyRJoHbgw9zfnLo4yd6rcWkozvbx/SJ2F+qPSL2ho2sO/svWa53/98ylLY6rJ3grg== 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=zs3hEKcQKwvZr7AiQAv+IHIFyPBF7+j9KMX499DrjAE=; b=IZlpYxlbYs6J0L4e4UACc6DhjgE/ITa+gLQQT+Qf0N/OPtxwZyyUtfqeBdmnCeDPTUGRKJnkdTTbO6GUzWbPALoZ6AsNbl1ZJ3M/IKiJ6dPddfRRlfWEqkv01MY32kgK83QQOoKLjT7OcoH+j4LLL2OT0mahGHFiCyOpH3FCYpyzLq67Savwsg3POIuoSwWlrFanr2IyYyu0+Wod1+u41GcBhOHlFIuouOkuTv5t7izraSqYeApxOAeDzEnz4EbcIiKFapp5edgvJ7H1HI0Jy3IpBcsE563Ij1g2UqdPUT53dP4Yp0XPr9pv3TruGB8I6ySMFSfxQEfcJkVv9yqmHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zs3hEKcQKwvZr7AiQAv+IHIFyPBF7+j9KMX499DrjAE=; b=qAV48hqQDWSVJZiZDnThMiFFvnGYanYYuZBC86BTp/n3CTYsnCw0oFIUKlQl94MALx8+CzO7pZp4dP4GJTwGoXxnEAlqw0LBl9i5ZHl0FGrzHhAy10YwKCDwyxrUHyX4RnV5VHMNeBo4kBRALO2d0QwmCxWfKw5Bq6ZAAAO1SQA= Received: from PH7P220CA0055.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:32b::8) by DM4PR12MB8476.namprd12.prod.outlook.com (2603:10b6:8:17e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.28; Mon, 17 Jun 2024 07:29:00 +0000 Received: from CY4PEPF0000EE3B.namprd03.prod.outlook.com (2603:10b6:510:32b:cafe::fd) by PH7P220CA0055.outlook.office365.com (2603:10b6:510:32b::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30 via Frontend Transport; Mon, 17 Jun 2024 07:29:00 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000EE3B.mail.protection.outlook.com (10.167.242.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:28:59 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:28:55 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:28:55 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:28:51 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Kuninori Morimoto , V sujith kumar Reddy , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 2/8] ASoC: amd: acp: remove i2s configuration check in acp_i2s_probe() Date: Mon, 17 Jun 2024 12:58:35 +0530 Message-ID: <20240617072844.871468-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> References: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EE3B:EE_|DM4PR12MB8476:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b08c32e-b231-4824-1f64-08dc8e9f27cb X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|376011|36860700010|1800799021|82310400023; X-Microsoft-Antispam-Message-Info: a4AEZCuXVHFIyeH4bpUiRcpT790nQM1rohnuNb4CMXFowtBFv/BAN9r2Cgw5dR/P44bEfqsEoWhnb8zvd/zcNOGRKk+y8C6dKdLqQZ/NwbBavFThQY04ZyFDHYn3ViPd3K/HdunKQIEVatvBnj4XccUZPUkF4ysmlCHwlTqgRB9zvB5IMozYuLQUS9i5vP/RHE64LkVC59JNX6z20J6d0TZSVfox01lQ7ayFf74FRZzGnTmP0F71Ogm//21WMrr7InkmAI8NeSCc+eoOT9DLwvVhaeBqkAUx5Pn4dfviKxOFloUiLAsencvkfmxm/w4mi6PBF0d75SyxApvoOMpihJx3nM5QarVOJI7fQvcRU47YDUhqkjbkFTPu7xxRgkQEQ4B/XH4T0ftFfo0QLZGhzpbfE0ajLOjmGcBs+R6IUPNvxtRv1Y/ijNTFvD+6pXDTV2EaOQ2LQlq2U6AdASx7a8qTY8uxP6k7X1xcR/b8kJIhZlZ+8ebe/06iQJloQ4Efw/LQ48nx677HwCfCndAdqTw9tpeQiPss6RgEUdrhM42q4rcy1K9Ucf92zvExDuxhlK5tmS641Uml/oWm5NnpPt98thXl1nCJvn0BzVMI/7spJDEozQZ86S4U9tgC3QlFVmdYk5g0KAxtrauuWHro97PscaqlWmrTOKID3wr0TP5Y2rtKNnroFyWa/HNvNNWnADn8ioffrqrululgVLL6191UJ8NNEWm00HY1T+7B9WQcYVt0wPtbmyYo/yGEyJQuGhwLTpkkIx82i/c6ZPlP6a/VIQR5v3qz5weqhStQC11zOz7UNdHS0j35FT8n96v6VO82HqVHUA1BiR9IZE4haFlE1acysLYFPaCabfMcGJ9UIspliEXCFLzmJyU/Q1gtACjvRpWevQMwIeCZpEsIFfvp0W4yHRrWnnTI9GJ1kXYRIyTtB8xsc6u7GIvwHSNLJaiC7TnF8gVe5m5um96eI4eat7fVE2YDBwtSGMCBXnKfp6P0m7IgZt+h9K9gBueM4o0PoCLVIM1TP0TULBgt2pPCXHJ7unonkBU3Gor4mZLl1+5Ucnr5pCaJMTma/4d3RlGZdb8SD/2btWtHZPdEu+dNWRhyrkFI6OXNWuElyYC4GnLnA+5nYc9ZVktTcjyihRb+GSkwJdvy1xCSFnKIYZfWifMwXIqyYhx8T/dz97HmB8yy0zauTI77m3Kost5Or4nThJzyHatYt6P4Tz09rxXcMchuJVe4PN/0HkmJbjQqmxCvzRTrzwKDxtitHASG/yJoRfTuY1GqqSgVeityVJcVj3+yIWVcfo7wwWdXeswENNHnVSmmdbL8fJxnaJxeirne3v13/ZeSttDVfXOkUtrlJ8GHaC+JJ16RMg6ylKcu/kyB4t0NupBZyuTkMh3s/KraQ6F7VUjFJ/jwTNrruw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(376011)(36860700010)(1800799021)(82310400023);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:28:59.7085 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b08c32e-b231-4824-1f64-08dc8e9f27cb X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EE3B.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8476 ACP supports different pin configurations for I2S IO. Checking ACP pin configuration value against specific value breaks the functionality for other I2S pin configurations. This check is no longer required in i2s dai driver probe call as i2s configuration check will be verified during acp platform device creation sequence. Remove i2s_mode check in acp_i2s_probe() function. Fixes: b24484c18b10 ("ASoC: amd: acp: ACP code generic to support newer platforms") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-i2s.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 60cbc881be6e..ef12f97ddc69 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -588,20 +588,12 @@ static int acp_i2s_probe(struct snd_soc_dai *dai) { struct device *dev = dai->component->dev; struct acp_dev_data *adata = dev_get_drvdata(dev); - struct acp_resource *rsrc = adata->rsrc; - unsigned int val; if (!adata->acp_base) { dev_err(dev, "I2S base is NULL\n"); return -EINVAL; } - val = readl(adata->acp_base + rsrc->i2s_pin_cfg_offset); - if (val != rsrc->i2s_mode) { - dev_err(dev, "I2S Mode not supported val %x\n", val); - return -EINVAL; - } - return 0; } From patchwork Mon Jun 17 07:28:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700268 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2085.outbound.protection.outlook.com [40.107.243.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8B2EF18C344; Mon, 17 Jun 2024 07:29:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.85 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609347; cv=fail; b=WCfbsBk6Rk3b0QwT5M7mw24KpZJra7SfmFzJXy2yZtxbTk4w9MajZ/ITcpV1f6KfeHwD4rDWleHZkaMJULbkjqRzTTVdHfdqPjtvGwNLeWJzkTjlhZaHkZl9alHK91nbs6hWHbX75f8ja0gXZcw6aLjIf8kOzkA8oGAMZgJ4A+4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609347; c=relaxed/simple; bh=rTWwRqkKpBVqpE5QLSm6YPJ6TaDJ5OR8u+UjfyROwCU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=rXmcpbdg3WLcRAP/6lGfPP9O9JdO+n6y9H4ggKtWjaO6QwxOZB54Wl6u3bk/Xa4EdsAdCA1aho27xhSwgeicQPmTcPS9gtkG7S3H9ac610AlqFOg45lJwjZAprBkq/hRKqY0Fgo+DDw2behtRYdVCr14q0Nedj8n6mjWrjpiNmk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=WG1Rg/K6; arc=fail smtp.client-ip=40.107.243.85 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="WG1Rg/K6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YHkvv4tIpKRAQNUIiZRatoulLw+sIWC+fIJxa6qEZrwgB+IIP5SSGnSHcRP0YzZ+TZElmTvghPZkZbpHv/8To80DQObrJCTVAVlWH9e5BMd4TdJUPfzpk6buHVHk8gNiARHeX7woVbwA7x19Gesaug0yZuzbDe80huYtH4Gs5ohZm2kL/dHC+1LXILb/ceAOxvmcmJS5QscG0qzMtsXtvkm91in80nMHYHc16Z8Vcw94hXOKtIWdRbCOxZxzHWIMx8MYrQGM+1DRZ4ZV/VhytLx4JDL7eRJoBBwQD76hTIu9IthdUdhlOZVyX9IHETt5TRT4YBMCknh0A9R43lx/cg== 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=F9nORu10sitJPP6VOYhI1H4DJoOq3U3LrYpiy5JMAos=; b=TtzPiRvasqJPkvRZKyBl7boIDJIUsrifwQ5qarqnrjWHPxrN+NWtM4vi9VAKIxZ7ONFW+E8tdj4r4aY6MkoPmy4B63hdx3iDhhDxBrmq3Qww31lYhUDwy210/5bhg3xJ8zWBbyZLS1+wGZXQE0oh2XGKxPXovitHYRBCWVPvdDxMymlACE4iPsLEWsO/C1xjVb4fl4fyfWyErt2eL6+ecqXiPWnFl7Yd+XLGuByM1YjtaWzkUVgtFkRo/BAHnLyNJvVb9Izy8zRUC2cqkcy1A6w2pIp23W/pxK/axyW6BMILrMEqIVT7c4E3IpNkVxzHwLtySe9jMcPVgjZV+X4dIQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F9nORu10sitJPP6VOYhI1H4DJoOq3U3LrYpiy5JMAos=; b=WG1Rg/K6BK4clA8zs9gAAkR93KePiqaLwjnwYxIdrmXxRSqEPvtUYC/mhkotMSxQo+oHxhYT5LLTOkcrd3dVfC+HZxitp9njjDY73breKszhc1Hn+MC+8HuglJT7+6CnQkLGjwEwgoBE/YCV19ncAEEkUVmusVMNdCeTdzVOVUM= Received: from PH8PR05CA0015.namprd05.prod.outlook.com (2603:10b6:510:2cc::16) by CY5PR12MB6273.namprd12.prod.outlook.com (2603:10b6:930:22::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.29; Mon, 17 Jun 2024 07:29:03 +0000 Received: from CY4PEPF0000EDD3.namprd03.prod.outlook.com (2603:10b6:510:2cc:cafe::5a) by PH8PR05CA0015.outlook.office365.com (2603:10b6:510:2cc::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.46 via Frontend Transport; Mon, 17 Jun 2024 07:29:02 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000EDD3.mail.protection.outlook.com (10.167.241.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:29:02 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:29:01 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:28:58 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 3/8] ASoC: amd: acp: move chip->flag variable assignment Date: Mon, 17 Jun 2024 12:58:36 +0530 Message-ID: <20240617072844.871468-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> References: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD3:EE_|CY5PR12MB6273:EE_ X-MS-Office365-Filtering-Correlation-Id: 11146ae1-d1a8-4d59-8f26-08dc8e9f2975 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|82310400023|1800799021|376011|36860700010; X-Microsoft-Antispam-Message-Info: R1bgmWLSBLrrWeQhM9E4nAfkwh2OfstV6GquudJBmhkcktOm9u0QHzxIUZygRQpSGixYKH8rmOD0em8JPGFc4788vMCbjW5x2kgmx6TB8DSzrU1pXddT34lBTJT7AQMtTjsy55E/rcpiw8Flr5hxv4fq22kFuoCV0v0mEudCg6enbUjXiS1PYZReNAxKj9F778xdv7iPb/rgoN42ceH/G7UEyI+7LtYvu4dpQcgK3kXzWbIrm/zykgxT+LK4xnRF++9S0AsXPNHCzU9veRnAkQtGwQ//6BeX2BWnHYHByo5VCkI0T3jLp0PVA4eYXq/MMbdevox95sz4AYv7BXoJhFOLZRNjW4mKrlGntgGNwcQIk4C2eeY9ELzqEiQpYd3NQn5NAK94AjszdeP+M/XqhtWk0wDhonDa6MvDt3CeZAZs6ofliOZBf2sW7DKtv4Gvn6RLq5QWVNelSUZ/vaJhiNKWaYJeMxgSDMNeuz0/5IM/SVIHxnsgDokWQS2Xx66DGMj1rY/COELsplaLQILqTWZgY5RaJmsSzeidWluUjJClElUlTXPOy+WHf4ftBVNYNcJf9Nbz9U6Ml2d0Tg8vNLyVZnRKgQoI8U/n4J6OmEDZfbHSowVNHGHpPPyP28e4rUSDfnc/pB1jH8bWKqm3RgCgPQDqmUlrKvrR0OOGjWfzRQ3jVr2yxlv3NJFo/j7h18DIUklYIhx4TpUF98vya+ls6K/MJihtTwc1MHR68fXxJat3MSq0xCxjax8CMzerGa89D0b72kQpKOIO933TT2zhBkhLm6leNJu9ppRY4+B7cownkvmnUZyWgxj51/5vDCBVweGDe13VGncPpH9OTItK0Auz5Gt6ZdUD/3hkxZp46kxi3CO5G/IQFRdty1TOZQ/e6x9kksPPdjnY+NZSQ3cfNu2cEU5e4pJ73KC86lSbv/0Ga7noMnyXrXvWLccIUdRy9ddM03fd+AQi6nazE91kiAj0HpnNXfgQl46LsUpAhGw0kJZQB/6tEm1tjDE2TigTZxbdEPnLYNLssAyzlRg7C9PJuJGnq91M5IL7hZR4fojA7AIvsqqHHJWEMoTin0Ec8WREszwe09a32QFuM//XHwo7aZDW3SIhNg+v9OvPrUWraEd9c6/z1az4Wg2U/JFME6QZJq4NHlehZvp6YD7sBN76mI/WB/Wl0FLl2Kxb8GFgtJYOL/ydtqtE5STzY7W1TjkH5hqq90wXaN7wDc0CogiV/iyS3bciMHsCsivjm1baCZmdUZQrjIkBhKxgqar3SF2ptecVh1TYDfKvy3XzNarUqrnn1FkYvFyFcz2z6dldM0gBdrtVjgEODwm1aM8JILvW6qXY0YWIjDeYN6tJUO7rTbj/ggD/PbP5ZqVVI1POLL8aeS11Lg61vbNZlGOuzILewCuiCtkdOP/Qig== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(82310400023)(1800799021)(376011)(36860700010);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:29:02.5032 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 11146ae1-d1a8-4d59-8f26-08dc8e9f2975 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6273 chip->flag variable assignment will be skipped when acp platform device creation is skipped. In this case chip>flag value will not be set. chip->flag variable should be assigned along with other structure variables for 'chip' structure. Move chip->flag variable assignment prior to acp platform device creation. Fixes: 3a94c8ad0aae ("ASoC: amd: acp: add code for scanning acp pdm controller") Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c index aa3e72d13451..777b5a78d8a9 100644 --- a/sound/soc/amd/acp/acp-pci.c +++ b/sound/soc/amd/acp/acp-pci.c @@ -100,6 +100,7 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id ret = -EINVAL; goto release_regions; } + chip->flag = flag; dmic_dev = platform_device_register_data(dev, "dmic-codec", PLATFORM_DEVID_NONE, NULL, 0); if (IS_ERR(dmic_dev)) { dev_err(dev, "failed to create DMIC device\n"); @@ -139,7 +140,6 @@ static int acp_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id } } - chip->flag = flag; memset(&pdevinfo, 0, sizeof(pdevinfo)); pdevinfo.name = chip->name; From patchwork Mon Jun 17 07:28:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700269 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2066.outbound.protection.outlook.com [40.107.92.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8CF4018C344; Mon, 17 Jun 2024 07:29:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609354; cv=fail; b=WlbLBmz19RycyWNNkvIyneBugnn++0HYQDUUe/Cl7wrsG3aJ7morLwvLv2rlFBqXc5pQxp6lahEF93tdCfR1ttuUIw8FlBldogZuhROUerFuDmm0ASionc9hfy+dTBcNTgetsdqD/8g0WKz7JBxtLzxHu3zoeBcgPOhep/ZBG64= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609354; c=relaxed/simple; bh=4rA4MoY1oD/sjElxw+DPC+1Xw5Eh/R1KWGwYB6X+YKc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=PIrF3kX5qQcu/fOKkrBRu5dHPb4a5Py3jhBXE4mpXgcUFg1GZIW/A216jMQt162f35JHkbEbw7dqjdFU4ypgzf1XA0sro6xF7QuiWE+KP2YgYLWESud8BxVLoR4pnvzQ7Z8UBo80hhjyeN6ptxhUBypS9OITFDjsgXxo6ynznWA= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=EhUrnHGz; arc=fail smtp.client-ip=40.107.92.66 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="EhUrnHGz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jlOtMcjEv50EZieYsqUTdigG1iQUohLUC5i8lyWqTHs5VcjpFxCgc9hXEYRa9Fj1yUrUaHCQYdFkklFBD4ExY+Tq6zWV86pcf3M6OwkbiXW2IGnzkoEv9yLTQXITAwSEDoIuyfc21uXXQvR6huIgXcFVUD2B0K0QUKf15axNSI/0/haJQwGqbUeyfX9AF/NjLsgApLlBnvFhPICv1OYkVjf4Rt2dqRwpMNnOy3zDRwDVaEJaUhaaH4Pu/wM746JSWbwbIjJu7/pR70O3ia33ZD/1ukU/LRBCJcIoxbb1ZgCrmSVw4HaetPeErRJmRohVEwE/WmFaHmm6p+lTU0viWg== 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=2Dyv1NDMNED30ORLfcqKTahNsT7sXpi25pcbmL3aF6A=; b=ZAPr2Bmm213uLig9uk6mjInfxLzRG+SbENfArVblt6K5uMRCYhX6zlJSgBXRxqWW1J2Ev+nUd7eS0GnCjropVNLgjOSi7HfugIcsUT7ojr5LX3E+YP0rVUrt225LrkFp12TWyUjFxlJ53ISVZ/p6tEhVJb1opSoFtP37Kcx+McnbwqguHxCCXU/NSUgdV0/j1z3oRuJTkxc9aPnB6yLnMJJq1WBV89VaBsyS/v6TeNj1Rntz7/GXJ1RWeRpY/SApzhgOu0iA0rriaANbjsKBvVMzbyoyH8OLX4p+yxO+m9stQDsntUh+n8bAC7pqzYL6/krx1+G5yLFf7KWx5DrC1w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2Dyv1NDMNED30ORLfcqKTahNsT7sXpi25pcbmL3aF6A=; b=EhUrnHGzc31i7Ghar2oBsvefF3iZrcqityXN0oh3TMSWgu8/ejFnK9qjPM9Z6hxBk+54BCOcczQVZb5q/gC4zYQdWjKj/wEAzCWFk9ADiTPvGC/PUr9ryjayTr7iEP3lCjWVjGyUyuHof/UO2QL0DX0T1Am1fhBgDMeJERGXnqk= Received: from BYAPR06CA0064.namprd06.prod.outlook.com (2603:10b6:a03:14b::41) by IA1PR12MB8263.namprd12.prod.outlook.com (2603:10b6:208:3f8::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:29:09 +0000 Received: from SJ1PEPF00001CE0.namprd05.prod.outlook.com (2603:10b6:a03:14b:cafe::ce) by BYAPR06CA0064.outlook.office365.com (2603:10b6:a03:14b::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.28 via Frontend Transport; Mon, 17 Jun 2024 07:29:09 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00001CE0.mail.protection.outlook.com (10.167.242.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:29:09 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:29:08 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:29:04 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 4/8] ASoC: amd: acp: remove acp_i2s_probe function Date: Mon, 17 Jun 2024 12:58:37 +0530 Message-ID: <20240617072844.871468-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> References: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE0:EE_|IA1PR12MB8263:EE_ X-MS-Office365-Filtering-Correlation-Id: 2e6bc5e6-113a-4d72-bb3a-08dc8e9f2d62 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|36860700010|376011|1800799021|82310400023; X-Microsoft-Antispam-Message-Info: lOUt+RM091FCQ0Re8ADtkX2ldVh/9HlIJwHq4xmJxMRfm4cfwokEtmbaG07sN8P2tiz4sTr0V83O26UFERlNhHUevZbb3+ATZz2XDZkc0OwjDiNo/5nxzguRuRFIfq6ZJfgjIjgck0KI7QSTvquMQC5Vs6y3gZhW4OwLnGn7Zm5Is43pi58yrYcS6R8OZZuUd+IdIy0Dxv53uGySd9nD1yaTilYakBiPA91uYCoIoqnH1WQUhirqY3Q9AvWdnQA5fXAn4VcyWixBj8Xb4DNNyqd/DADXJn022/c4eVmNKHSqJc1g/M/VAbNTliMzI7ubFjs1oFwL+AvPBzhOJAA4iC0sbMRLAyX1Dn54xlbjg/SEd+V8YjDy7yLLr9oIVHMJRlLwn0lMjruRRsnZkeV/SEQIAgSf0TZleBOZPF7xyDsJUrR6h5WtuwKV4Lci/4Bcy/CF8ZX0cMN0/7odnO3GvDoq0wrGKFr2ZAV14xx6wfHnB19/wD/KNzwbt37yExiS8gYKd7lE7s0vGL2++3CHd4z+K9PERxtTmNjj+lJY+pTJW4W/dAmZwFR79lTOaoOCNa53+tv6jccKwrglBIJQ8zHwofnF2lGrdPzvJFI1gir0Ft+2ZYoBPnMv/+fuONUOR0j8xGpLtedfrtp6hddXBqwam4wxkXHv5iIaA9CAAwYLmZa++Mm33CnBMhDtrv/Q8UyzLxxZXf1T+CkjwdssYwTPiOTWJpullKCwKRuxjfaNAp+K1Menog6mDeSekdK9clEnq3gtugpUmz7+oDIQSPJLYbvzBA05fbPlfrPBYSP5FjvfGv14VMJEkXfNvwA/qeSfoEgW5LiIQGC4L3vb2IH08PEtxu4y3ONvtNuKMi+xURCi8udxThCTq1C29plkKKoKqCoqqaJbnjXY8L/fllHiRoMpT1E/YSE+RbXXg2pzoxZAeq7tp8jzlKMDgN2YJTMPVFHH+ftcTJ7B9otfqLYrle92VEWfUc8OlQmKFM5E31CuI0fvvO+46Z0McCltCSJY2QsvVtsRiGGMDaOq9K1ReAFFTX3Nd04WSuljytd0FiZwIrpD0sh7aLE0HzFMjzI88Uceso5+LCchowRqrshdOdKoXHdDy4FnstCxgqr3/4HdFzk5vIbk8AdVWGsgA7I3eRJWunksE+cdrjwxRRQ004CQo44lCZcXU9qrd3WK/MKQFh3d6pADaxYJ4ufTTHETNn1f9uN+KfQ9F9FV2nl2UFPOByRJenA9yJ+F7LCnSIUS7dD2xGmAB4frc+Las+OjNoD/3ztTg+6xmY/wW5nRY/tBJAEGXxOgQglrquoaYkZ4ZPVb6GdtmVYhEQEU33FGiBSU6SffT1tFn2Vlm8TGuHNZziVODSmCKg3NPCCXGnFTHtVm4+NBodU6FNpMSy14S5weje1gjV0mbXl6nA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(36860700010)(376011)(1800799021)(82310400023);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:29:09.0750 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2e6bc5e6-113a-4d72-bb3a-08dc8e9f2d62 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CE0.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8263 In acp_i2s_probe(), acp_base null check is verified. As already acp_base null check will be verified in acp platform driver probe sequence, additional NULL check in acp_i2s_probe() is not needed. Remove acp_i2s_probe() function. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-i2s.c | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index ef12f97ddc69..7da414bc3b96 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -584,21 +584,7 @@ static int acp_i2s_startup(struct snd_pcm_substream *substream, struct snd_soc_d return 0; } -static int acp_i2s_probe(struct snd_soc_dai *dai) -{ - struct device *dev = dai->component->dev; - struct acp_dev_data *adata = dev_get_drvdata(dev); - - if (!adata->acp_base) { - dev_err(dev, "I2S base is NULL\n"); - return -EINVAL; - } - - return 0; -} - const struct snd_soc_dai_ops asoc_acp_cpu_dai_ops = { - .probe = acp_i2s_probe, .startup = acp_i2s_startup, .hw_params = acp_i2s_hwparams, .prepare = acp_i2s_prepare, From patchwork Mon Jun 17 07:28:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700270 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on2078.outbound.protection.outlook.com [40.107.96.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2347718C34A; Mon, 17 Jun 2024 07:29:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.96.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609378; cv=fail; b=CBpB8KvdCtQZXCaTxTePilKWLnPjFwlLtldRZOTOGrXUqqiuURUxWGAynRjt1gHzHoXhZYGv5UhKcAI4vePemCmXOyh8hdQy5P7SpXkjT7Ss7qB1WEL1wdC2vk+AF16AGGCuhm+P12KcyAPghaSKMagJjXUOPvpXm9r8cKAayyM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609378; c=relaxed/simple; bh=KO+Ku7z+fqGnz0xVa0+jFNplbhd2hUhJQDnfmkIycdU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=qhq2A58xXlYMClnpTc2DQ37oVTw3y/mm5kfH88/BI5wDthCKuZgR+LSElOasD/y/i6ekfHaCenls9E5fvgMuP0fBpOfncuSWv91JSRIR1v6Mbt5Y6sb6hlfFiFzaJjS9/TZg8rXeIFu4VytuAmPHDnPRKhgUKNu2mMDD91KMgDI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=s2kYjxuT; arc=fail smtp.client-ip=40.107.96.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="s2kYjxuT" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IbAA+T5piRVLufybhnGrhrQbfiOa/6qIEW/xGaRpUGSVJyqjAhVV1yYygc8UAEAidqpv4cpLtTomGQFzAZbdEENQ4/aVa54gB4f4mABIyAYTSuzTZ4nH7a8GLzpuI1e+AlyjRpnmP5JxuBc9y9YwOuPj4p9DnCl2HGGD5zq1Q9PckeuwlQ2dmTthC+IBf9uJa4x1dIbMkY1SA8nfSl/JQxN8QW6icpNPC/r51VoSMg5RVqXA/2VuUe3MsdfywiJESEz/Dqt8xi0ME2eM8GP4Gn3vb0sAL9LtF2Bw870Kgyw7EXy+FL+dXP8y+1GvDPTUg5ryNEylLpmqPt2FL+9Ebg== 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=106nTjmeJtJVVjPCXvnIRUJtPBA8E6jlrKbU1NTEuyQ=; b=V3HAP8jEmWaPxzmIiAclewMuhoQaAAXVwVO1Fv5PNS14WKZD3NfSNvfHNgxTLORzm+N71AV9Okaoz3CjHEwmhKrmzS3CbzKiwrrUqD7XDyKPLiHhFkDua2AQmmJUB0qSvjqsYupE1Xoh7Y/PWlf5Q+i88t2vFR/WmZLQ5eR5fFF6gIkGTJ9xZJyT7YO/K8Q3SORfMTkfLWi+bTVYwg/Y/VE7tcryIs1Y8dJSd3V9apxlHsRIUNbDvFS6CR8FlhQwBDDru1E+qW0mP4lWFu7FSMvUGhQTSDr68N08PUlf27a6YT6b4BEAY0UF7YID+pnFI9NHyNFI1Z+bHZuNAXKluA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=106nTjmeJtJVVjPCXvnIRUJtPBA8E6jlrKbU1NTEuyQ=; b=s2kYjxuTnFmr36W9PgPjxZg7iN9sDxbdam9X8QFDb7Pdv998zfYhhBRWAZyAZHNXzfLdzy1fOtd+/R7DynPEJWLVjnCda020r/WLP+OrKDfj/BhW94b2f2USA9SOiFGWMc6ZAN3u6BtiKMYfYtSnxZhHpKlgRsUvm7AQK4FW9xM= Received: from DS7PR06CA0034.namprd06.prod.outlook.com (2603:10b6:8:54::18) by SJ2PR12MB8062.namprd12.prod.outlook.com (2603:10b6:a03:4c8::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:29:34 +0000 Received: from CY4PEPF0000EDD4.namprd03.prod.outlook.com (2603:10b6:8:54:cafe::8b) by DS7PR06CA0034.outlook.office365.com (2603:10b6:8:54::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30 via Frontend Transport; Mon, 17 Jun 2024 07:29:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000EDD4.mail.protection.outlook.com (10.167.241.200) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:29:33 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:29:33 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:29:32 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:29:28 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Kuninori Morimoto , Dan Carpenter , Yang Li , Mario Limonciello , Marian Postevca , "V Sujith Kumar Reddy" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 5/8] ASoC: amd: acp: remove unused variables from acp_resource structure Date: Mon, 17 Jun 2024 12:58:38 +0530 Message-ID: <20240617072844.871468-5-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> References: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD4:EE_|SJ2PR12MB8062:EE_ X-MS-Office365-Filtering-Correlation-Id: b7661d68-20d3-424e-1862-08dc8e9f3c32 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|36860700010|376011|7416011|1800799021|82310400023; X-Microsoft-Antispam-Message-Info: hCaoJtV+pRZUZDpz33UnnrQgtZSzJbcGT72saT01z3v6S98JJwcJNVgbnbhUoBASZpZcSiIN9p1J+u2FMvhYShgEXK2t0G/otf2AR+idg0vd+nnJUpD+pLfDn4eXW4s/6A9roQvpfnvX9+vCbN06XmEUilfGrVtvTPPsv37gwEQ4bh8bk/ijXSg5AbQ1+DIoBgw+XYa1LnToIPrMNFKOl02cM1IY6R8lC1M5CAL+e53V1GgehBKX6CpNJ1xoRVXjaBHKLgXo68q0ayy9HK4HDD5YiMr3BF7kxRBLyodPwSwSJusyi/iavOn+MtUMaRew2tuqmSPGSeaBidwyToFAhLQWF7BT7wwdVFV8/fB4sGoTNaexccZx0q6jTkrQZukDRujaV7Vq6cC+LPRqQtk3lJYcDzhgAHIlDX6B47aSxRE2pzwv6KTKRHk4EMi9bLptBQloQlREY8AGdhzTEpG21vmXrKwm/XqqavLvGxXgLsJijRfbDfYB+2JEJA2quuevCQyDCtIIUwxWgJbxP1O4xezvw3y7wzGuFAzAl04xsXFhunYlNewuYPQKZiG1smcCs1Z9jwP96eOyytL0wX5ZqfcMTYvpYCwR96sRzMhGDb87XhbeQVGMm785F44YSvEuWUKzmT/q3UHxRVTHkKZajD+n40AYduLXhVnGrq8B3E/fBK9z3+9w42/s1fBOBHaRlnFGS3EnRCfveUKbVRbwSHh4xAtVTT7BNn9dLzOAtdZpsFuaALOxD953y1Zf4NM5qx7tFA6betFzHAKzXTtxA9Guyp0NmQ/gZNvM2ucsAWN3QleRyGeg5aqFw9JCDW3INUqIfoKcv/EkHX+80P+dqFvHsb2ZAaQo0o+MSGp8DqtqRODdSDUMUXugrBPq70yJaAUUhf16PIYcsT8D5WIjSUz3V23lDMFfjceFM4kw31qhoWE2rrisQes0pjAOkbfCd5xcOhqhnuo8jwqTRiJt3pmDYxKY1w5CFiCojuOSks8/BRneAQcyr22/JHIzkn2oXAYYzG+m5yJ0OuTl1Za5dovY4ZyJQmY1hcTCbVDDiliuT5tDxQFwhA3GSl3Ph9++IuKVCj3eXygleYrbGiizNaru5A8616P94QdAtawRTtyAbzxIiAeZEYz5RixW0NPjCvqpslz+YX8rT0SSksumYslFLpbLPTKvTNkTAx+ylPsNWcpHnolG/pfKe8u+FuFklCalrDCR00L+Z2l3cj7QGSEiM1UoYqY+W8xOXAEF+hB8Fgb9PNSmQSQ3Ap/vCoZ6W7Iynyb9d4G7oeMBZhrw8vPZMEazTGjWCqozXnX/XyvtUjq6zl6HG7c+SsPrsvHDqP2+CSiZyx7hxlXKTThyA6VuEXSdODh65oIe5BLbvUCYkSoF1/HS8MYaurfS8ge6r8SMO0xFHosd4iQLhW9EsA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB03.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(36860700010)(376011)(7416011)(1800799021)(82310400023);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:29:33.9378 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b7661d68-20d3-424e-1862-08dc8e9f3c32 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8062 Remove unused variables i2s_pin_cfg_offset and i2s_mode from acp_resource structure entries. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-rembrandt.c | 2 -- sound/soc/amd/acp/acp-renoir.c | 2 -- sound/soc/amd/acp/acp63.c | 2 -- sound/soc/amd/acp/acp70.c | 2 -- sound/soc/amd/acp/amd.h | 2 -- 5 files changed, 10 deletions(-) diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c index 158f819f8da4..953a793de9a3 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -39,8 +39,6 @@ static struct acp_resource rsrc = { .irqp_used = 1, .soc_mclk = true, .irq_reg_offset = 0x1a00, - .i2s_pin_cfg_offset = 0x1440, - .i2s_mode = 0x0a, .scratch_reg_offset = 0x12800, .sram_pte_offset = 0x03802800, }; diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index b0e181c9a733..db835ed7c208 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -32,8 +32,6 @@ static struct acp_resource rsrc = { .no_of_ctrls = 1, .irqp_used = 0, .irq_reg_offset = 0x1800, - .i2s_pin_cfg_offset = 0x1400, - .i2s_mode = 0x04, .scratch_reg_offset = 0x12800, .sram_pte_offset = 0x02052800, }; diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c index 4d342441a650..f223311b6740 100644 --- a/sound/soc/amd/acp/acp63.c +++ b/sound/soc/amd/acp/acp63.c @@ -55,8 +55,6 @@ static struct acp_resource rsrc = { .irqp_used = 1, .soc_mclk = true, .irq_reg_offset = 0x1a00, - .i2s_pin_cfg_offset = 0x1440, - .i2s_mode = 0x0a, .scratch_reg_offset = 0x12800, .sram_pte_offset = 0x03802800, }; diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index 0d7cdd4017e5..a2cbdcca4313 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -31,8 +31,6 @@ static struct acp_resource rsrc = { .irqp_used = 1, .soc_mclk = true, .irq_reg_offset = 0x1a00, - .i2s_pin_cfg_offset = 0x1440, - .i2s_mode = 0x0a, .scratch_reg_offset = 0x12800, .sram_pte_offset = 0x03802800, }; diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index d75b4eb34de8..cbf9ca26f3ee 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -162,8 +162,6 @@ struct acp_resource { int irqp_used; bool soc_mclk; u32 irq_reg_offset; - u32 i2s_pin_cfg_offset; - int i2s_mode; u64 scratch_reg_offset; u64 sram_pte_offset; }; From patchwork Mon Jun 17 07:28:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700271 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2061.outbound.protection.outlook.com [40.107.220.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3288718C33B; Mon, 17 Jun 2024 07:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609394; cv=fail; b=PXFvdSY6Ikc3FTbeglPMEyy13FjjrBn58neQtvrRBZ+/HhZuLq8v8byXPgvWt+J1g+cqNIgN0ieZIllbcqqmzkjSrNVlU9Sf2aHRjjTE/Qznt5R2fA8zJtbycRNJ5ehRSf1BarAaM6ZLp9bNbCmqLzwLGU6O6NSBojS3aKFRvao= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609394; c=relaxed/simple; bh=8Kiie8PJEQCfJbrhQWyt8QJX4b8c76PxkDwaEm1h/4c=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=YFi3M2BI8u0cG+rMOwDj8K0bTUTPWjYN30TRI4fsGIvP+df/YzEP25zOPulSAqa8F+s+PI9fbaWbC+wY+ebVvPIbSB1gbwcPE+9vuAVvOrtDm3KOKt3lttSVPO2bzs3BIgZ5BmuGOG2b/n4gOjdP6nt+XP5y+3RJXaaCM92hNhI= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=hID9vJdG; arc=fail smtp.client-ip=40.107.220.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="hID9vJdG" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=kwxlS+xgPhufgmwHj9jeQqPtTyyIGCD7BwFQLwrmOLpxN9rEqLRgDTSKeQY/w1v99fhhKsAszaU3oSyEi2RiWlagMQuNJXGHlsCSFcU5jpxFDWiCPY7U7pUYo+0Bs2lKxUNoBRwp5Bwral7bzZFkbP9bJO3n0LAb5bHfZvWLkHQvIn8AVYAN4o2n5NJBhGs5qfPigVbtksMVtA227+9+KEktqk95XbouO07Wktad2/XM/p0Mcs01bzlUZMGGgGbstebekp2z96pxqKz/7aSADwJ3k4nKvRMcH00oyju/LyUXc+Vb2mGGV2MYOYBazJjqP4GNu2jxFu7Qsv41AH9wzQ== 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=sSK8T3jVEx+p3fxQ8QuFToo/lAjPdRTecPt6LmaBzeI=; b=TVolHKbrcL2muHOK8/Y/xHEw5jYZ6dOCQ1/Q67ZaXfiemXKuL9uiHBg8/wwHoSGjPhGPfhxRMRRiOaWjK5lfd1HLnTsFbwWGkUuq0znpNG6TXpy2POwUl+kk2L0Zwt4A3YSXROChzUzAURv3ZMwKUzFxv4DPMRSBzu0r7BUDB7gXitPFY5eTq2wHJrnFpi3B96AW39MnlX63J0wVFx6vt22pw33nfD62aCIXQXivKc+G7E+Ay3AMs69rbM2SWzbeZaViutQJnSOEH76Gc2mLbyrKm4oL1nIHpoJ6jpqGRGhHn6WEw3rGPwm72TFS1PgK6aR94/VfFAc3t/GQMbYO7Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sSK8T3jVEx+p3fxQ8QuFToo/lAjPdRTecPt6LmaBzeI=; b=hID9vJdGICa3Jd0hvpXfcpWEfe+WY6kSfO3dhTBnocv4h1YSfaX3AFWBZLRpKp9HDCKrunMUhPevoLl9FaPWUVqu24fT5b+N6uAQN9pZS1Cb60vBWjw1Rhnx5PKQnYxZHj6Ls9xiMeYKXdyLZM/q95q7yM4DMGHAOGqyj+5sKTs= Received: from SJ0PR05CA0170.namprd05.prod.outlook.com (2603:10b6:a03:339::25) by DS7PR12MB6167.namprd12.prod.outlook.com (2603:10b6:8:98::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:29:49 +0000 Received: from SJ1PEPF00001CE2.namprd05.prod.outlook.com (2603:10b6:a03:339:cafe::9b) by SJ0PR05CA0170.outlook.office365.com (2603:10b6:a03:339::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30 via Frontend Transport; Mon, 17 Jun 2024 07:29:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00001CE2.mail.protection.outlook.com (10.167.242.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:29:48 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:29:48 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:29:47 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:29:43 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Kuninori Morimoto , V Sujith Kumar Reddy , Dan Carpenter , "Yang Li" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 6/8] ASoC: amd: acp: modify conditional check for programming i2s mclk Date: Mon, 17 Jun 2024 12:58:39 +0530 Message-ID: <20240617072844.871468-6-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> References: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE2:EE_|DS7PR12MB6167:EE_ X-MS-Office365-Filtering-Correlation-Id: ee80cdf3-7f02-498c-e3cc-08dc8e9f4524 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|36860700010|376011|7416011|82310400023|1800799021; X-Microsoft-Antispam-Message-Info: XNIZWX5ltQ4axKJCEIX9DhtqoMz0PJmZA25/5T8a0H/oz72iAD1FijZVc35vygEz044zlpYgPRa3TpXeRhehA4CpuYjukSFWxIxrOj8epW9MV03yA8OucNrvcHi3YSWL5/i4tq6bWZ8twHeoyhKX6xxCCQDyPxEd3Hdm/zK8M9VzGYRt1DuMIUNDL86dXHPTLprU9w2MFjACDqGvKWPH9w48iBGkydfCZ+BJzgL8lOaL+lp9xC7nGLkM2lGbLHS4PKKP16xHzNU/uBNmTZKApDJ/+04u0YcYr5k4yVw53HaUnD5973PZTQoqjOdjYizkPLQt1JTGoJJqzP0ms9BLtE6RYDGHJDbYDG6lUvTb2eSPp9MUiJ89htfKnBeK22tfLrVjDrEEm42S3LNRDkxuTyHDH1TLOs4U8GRpk5GiVEpFbTo4LoMmcFCX129bJv5snEip3xGxrplK/z3wuLMIg+bC1yGpsaIXpmGJjEifwhk2bz9DLnNsEPJDpOl8kRDTiK9y2vcsm8Tq+aOLYD2603lyRBds+lMt2nJssAMbrUfKLPtQVehRz1pUADlHii8arNQwWzJwGOY82mHfmBEoW9HSGx76zs9PtNijpez8K/MmmZsalAqXk2cvvINeuaMkMNeXjhkEF/jsfqyioKRSRiPBy6Mne+4hjiVoHRgCtgbBinaXfSTY4RcJsY2uLUCxQQXb0A8Jw470v72Sl0Y/kNqEE5+Tao7Z5dyrMqAxvD81aKwo6jN3v6vQztgp1xXnBIyUQsIwZuDIEhVPMiRP2eh4SdsWA4zbnu7Mrk3d5wJBOqeqEMSvlvIfYrr1lL7iWUSi325fxBysv80bU9EgSg8S50J//ziittdl3xK1PMsr0IyxpMPqnCA33QZ8rxsqrrn6MxtAsEhdSvQBIOt/bpzzAxpqTBmGlAVyD07V6OrPzh3PZgQPko7K8Df5hdVTumA1kLL7nQNVx6DRnL/zlDgMIbcKQ37lvFFbZcT/lDcnoIiSLzBoiR1zb5iG/9Fi2EA5G6LSPcVGY4a78dUunuIUgRrG4sR2JRuZ+wfgeCDdlFXo5ZwD3GtWBgkVnP+QYYJgr67ijRn8g+KojKm7WyuGFqjT68sJm5gCXspvTAQm2AFwzlcfVdv9N0+FAkqE4UkauK85Xy/uOqVKfaQved5A17Gty0O7i8c9k3uXrkrCAcYn12czjMAJFtsm49SDc85wPPeGYxl1OFvT4uHAysS85NSrLcXdQ2hfaSMowlX9T6GEz03GZRuWWfdI59XxTU70mIESlK+d4xsmuwxOz2SAnS+L+/3rZ9GP0JIQ8eCq5zf2Kwk4SJ42i5Aj6TVpnVf2smGpMIkL/sLsNCe/UdmVkIagrh9/IZykbOq39EPHOdy76eRjnVMgchLQ+WU8QDzLtpTpfpBuC6k0v8zJDg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(36860700010)(376011)(7416011)(82310400023)(1800799021);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:29:48.9351 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ee80cdf3-7f02-498c-e3cc-08dc8e9f4524 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CE2.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6167 ACP provides different IO configurations(ACP PDM, I2S and SoundWire). I2S mclk should be programmed only when I2S configuration is selected and I2S controller is programmed as clock master. Modify the conditional check for programming i2s mclk. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-rembrandt.c | 5 +++-- sound/soc/amd/acp/acp63.c | 5 +++-- sound/soc/amd/acp/amd.h | 1 + 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.c index 953a793de9a3..e19981c7d65a 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -229,12 +229,13 @@ static int rembrandt_audio_probe(struct platform_device *pdev) adata->rsrc = &rsrc; adata->platform = REMBRANDT; adata->flag = chip->flag; + adata->is_i2s_config = chip->is_i2s_config; adata->machines = snd_soc_acpi_amd_rmb_acp_machines; acp_machine_select(adata); dev_set_drvdata(dev, adata); - if (chip->flag != FLAG_AMD_LEGACY_ONLY_DMIC) { + if (chip->is_i2s_config && rsrc.soc_mclk) { ret = acp6x_master_clock_generate(dev); if (ret) return ret; @@ -267,7 +268,7 @@ static int __maybe_unused rmb_pcm_resume(struct device *dev) snd_pcm_uframes_t buf_in_frames; u64 buf_size; - if (adata->flag != FLAG_AMD_LEGACY_ONLY_DMIC) + if (adata->is_i2s_config && adata->rsrc->soc_mclk) acp6x_master_clock_generate(dev); spin_lock(&adata->acp_lock); diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c index f223311b6740..f340920b3289 100644 --- a/sound/soc/amd/acp/acp63.c +++ b/sound/soc/amd/acp/acp63.c @@ -239,11 +239,12 @@ static int acp63_audio_probe(struct platform_device *pdev) adata->rsrc = &rsrc; adata->platform = ACP63; adata->flag = chip->flag; + adata->is_i2s_config = chip->is_i2s_config; adata->machines = snd_soc_acpi_amd_acp63_acp_machines; acp_machine_select(adata); dev_set_drvdata(dev, adata); - if (chip->flag != FLAG_AMD_LEGACY_ONLY_DMIC) { + if (chip->is_i2s_config && rsrc.soc_mclk) { ret = acp63_i2s_master_clock_generate(adata); if (ret) return ret; @@ -276,7 +277,7 @@ static int __maybe_unused acp63_pcm_resume(struct device *dev) snd_pcm_uframes_t buf_in_frames; u64 buf_size; - if (adata->flag != FLAG_AMD_LEGACY_ONLY_DMIC) + if (adata->is_i2s_config && adata->rsrc->soc_mclk) acp63_i2s_master_clock_generate(adata); spin_lock(&adata->acp_lock); diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index cbf9ca26f3ee..87a4813783f9 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -173,6 +173,7 @@ struct acp_dev_data { unsigned int i2s_irq; bool tdm_mode; + bool is_i2s_config; /* SOC specific dais */ struct snd_soc_dai_driver *dai_driver; int num_dai; From patchwork Mon Jun 17 07:28:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700272 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2064.outbound.protection.outlook.com [40.107.93.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA71418C35F; Mon, 17 Jun 2024 07:29:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.93.64 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609401; cv=fail; b=qtvQ4CfF4ChCobLsFad9hIhSXq472EK+XMB8FdLTrDz1JFE8QgJYD2F0rtmKi2Fxg6qxtwZPdF+6dG0OnjRJDmmfmaEVsdxHsCygr+Xi+bfZlj24TT/m6y2H2tkTyX9GCw6evNMe59EPbMunMIONbMQVeG5Pickl/qqCPxRiQek= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609401; c=relaxed/simple; bh=vuuDorv5yU9uZ8nmuswUrwf/rhSQ0hb8772xklQuG0w=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hDyUdikntHLsMZPL/aspVLRGZ8Z6trdjCCvjtxtUi31wNNqF3ak57Yn232/vEw4IaeWlWoT58FXutKekDp5hJ7pezZD3hNGPh0DwtnvKw9kbbDH88E5nJ5BSn6tEvtsuHKiMV2OjWF4afj5REY24yT0bvE3+kWYmyJ2DHVmvzWw= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=WLaM5Dc6; arc=fail smtp.client-ip=40.107.93.64 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="WLaM5Dc6" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OCCmaQMORoesPxySth67pKahtY9+IOX+11U/u5bZXX5txFuzgmmAnZ48aLFhbjzyT63yOLwy+ZAiUROkCFK016YtJbj4e0Csc9rBZ+4AU1l+n9NR1QImoC/YQuXKFM8qGnv52gWFbsGzHTLX14toNOA7OHGt9qeFhpZ80w0CT78YZ/cDGHjrRtgCGlu1NLgSYT1CzXhGRw0kqUFGEg4Frz+rVhBHx8LyV2vuXc98nKWHY/651bKNTpIDJrAVDC73Ra/zq8N+/6edh919vThuRgDFWvE1YKrFd9iUt9hkDWb+g4pWPB1BP66BJoxIkJQAs4b2W7pX2+jO6UdOROCwjw== 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=C4xfCBmWCH2rtX3qmdeu9aouZBkbzPtOIQq7kEbX0YY=; b=XA2nPt3KcK9Pf7flhlbtXpQuQ0mNC6pYakIdFbjiyQRMs0HI/JP3e5GS7yxQO0PUeXmLPx6I7tQK/GRrDvQNytvxuphoxLsvqVP26m7zb7LT3F0ztNtEfefcrsHEQS69GukD/yB4xFb6/vjgy2TA8vGd/e49Tj7QeiHOvoZmzk3Uqo5cq2qFu0KRu0Ho4Qc08Xp/VCY9vXO5IUxrdZgF4v4gwLD0EZa319q4X8mwAob6iuY4R7sTr+5EyMr3ia7GlQrO6e8Ww7CzO04XiE3El9IuARrMkuR/eNRGKjkEZN5KMVawh+aakwUvojsIKeKSEK+trzTSk5GRJEMPFpeMPw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=C4xfCBmWCH2rtX3qmdeu9aouZBkbzPtOIQq7kEbX0YY=; b=WLaM5Dc6DWhDP3oa3baGkj4DeZMT4NNhZ/h13TvScphzdPOxocOuYmEIfsTKKjrZQ6BAFRwD3tBO71WXRL3Qaeax/QkATVoADQ+F9VnlcuMao2Bc+rLra290wP3My7jR85CHo3Y4zGZ9iAUtafquFozniX9j/kGy6Ph0OYlRFVs= Received: from SJ0PR13CA0171.namprd13.prod.outlook.com (2603:10b6:a03:2c7::26) by SA1PR12MB7411.namprd12.prod.outlook.com (2603:10b6:806:2b1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:29:55 +0000 Received: from SJ1PEPF00001CE3.namprd05.prod.outlook.com (2603:10b6:a03:2c7:cafe::e8) by SJ0PR13CA0171.outlook.office365.com (2603:10b6:a03:2c7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30 via Frontend Transport; Mon, 17 Jun 2024 07:29:55 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00001CE3.mail.protection.outlook.com (10.167.242.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:29:55 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:29:54 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:29:51 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 7/8] ASoC: amd: acp: move i2s clock generation sequence Date: Mon, 17 Jun 2024 12:58:40 +0530 Message-ID: <20240617072844.871468-7-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> References: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CE3:EE_|SA1PR12MB7411:EE_ X-MS-Office365-Filtering-Correlation-Id: fb239c52-b150-4a0a-16a0-08dc8e9f48e9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|36860700010|376011|1800799021|82310400023; X-Microsoft-Antispam-Message-Info: vvMIv6T+i3mola8in2q6NmY7RDzGKPdACJJAbP3LMxP6c9MhGswzxQa0gwj0C5rN7qfS71FECD+geIi2IhG+L0XVNaDWIHQ7CaSXTx+T6U7AqjaiY+2pWJK66cOqP25HhGBvucIsin71TJYBKuzWBg0kWaC/6WRlTenblZtVB6aFlDq4wkzbVRoaYj4MknXGTqBxjnwiKRVq+PRBhEikGL4pQhKq5RxyAhFmELn9oK84M9idb/CIpMGAW67qtATN57sIyD69vOHFBRcEl5uZE7yMFUUSUCa/tQzxVeQNsi452C+f7bQ9TUykD7NIjwILQHseBAimJ6YdLmB4R/bd/IQl11wGECcYCwxllUkGUHrzBBhyQKltY93ASVWFc1nDqlANnhIigU0jPtM0R2xcFlD1Z7VX1xicnBaRhO09n7VnsSnGqs0XT+dIgBz2iate0cyFk0+AT5gwzeZwzPCvWcEVRliBhhbkeDtcR3q/i4A9IpOVGE/P89waRY5T75GuApLY2JlbhhSb88BoAiHUEYY9civfBewBJvdPDxR+Shix9Utzgz5yfmExgpvBM4JfIfiZ0FVdzvze52ZG85mX7h+QF4RbAs9IDiXC5q/TD3FCGt5oGb4hnr/gk/RpYaa+CDNj7XpfP5XTWk0ubV94b/rr2fC1wJa5DPi16MTqCXVIHw7o5/+Hf1/tMEfwLSDv6c8eGfdUD+5hIEMNAQNfkeS0AFwapgMAeg39fOhvLW4eyuA2rQHM2kn7++lxdJKk26YRE9UOW6tW3C5enqHPx8U2OiE1+R1HMFSCf1m6nHRm97mCOUVNHJdgeh4vsSsdvb2xt6LGvlb5yeeB2gAfXmrv8JYkSgI2J4oL+RvueJK3ZoFAG/+KJ3SB9SaqA3y4exb3q5nY06vMl5kw4CbcxbtQejbuGByF3Sp5S7MsPuIOX9MezBiUwmv5aVGSOgI1u37aJUWFZcW2pU7xrKgyae+iZOIXoEI9WweGmzLIjVuJtApx/GF3PhWpu2Mj+MnUtJ5Qe65537/8NrC1MOG9PRYfjTz/5I8fVGBdUJnM4ip5kvJ1Pi99BGKpc6VabbYYOqgMCuUJizbSZeXWBXH/0M4Txml1W2cpj6FFEbsyZMmWtaWe70z/a+h5WjYjY/BjUBmNccdwD+RUijtNWmCIYrph4vKU4zA0OI2Kj5hgBoUAj3g7p1rXW9XkLRYcwssRaqgH+WuXK10HHixGLgNVLoObxqyWZ/+lFpzV81FjwRuYLPsEXqsmeDgVlBLOOFdNSCzcaP9eKzrXh9zwmu4weUQR46U2smJwQEL7mxJUlveir/3m8rn2JXu1x2mFppSWXCSdhQpYeNtM5Ia0r3jtbw+e91iXta951W8h5BV32ahqh3Dm6rTu8ljwDFPfHh8JQZ//s6LVXdvNdWv8ISZxYw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(36860700010)(376011)(1800799021)(82310400023);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:29:55.2541 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fb239c52-b150-4a0a-16a0-08dc8e9f48e9 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CE3.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB7411 I2S clock generation registers should be programmed before starting the I2S dma when I2S controller is programmed as clock master. Move i2s clock generation register programming sequence prior to i2s dma start. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-i2s.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 7da414bc3b96..88985e9d318b 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -369,12 +369,12 @@ static int acp_i2s_trigger(struct snd_pcm_substream *substream, int cmd, struct } writel(period_bytes, adata->acp_base + water_val); writel(buf_size, adata->acp_base + buf_reg); + if (rsrc->soc_mclk) + acp_set_i2s_clk(adata, dai->driver->id); val = readl(adata->acp_base + reg_val); val = val | BIT(0); writel(val, adata->acp_base + reg_val); writel(1, adata->acp_base + ier_val); - if (rsrc->soc_mclk) - acp_set_i2s_clk(adata, dai->driver->id); return 0; case SNDRV_PCM_TRIGGER_STOP: case SNDRV_PCM_TRIGGER_SUSPEND: From patchwork Mon Jun 17 07:28:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13700273 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2085.outbound.protection.outlook.com [40.107.237.85]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9249C11718; Mon, 17 Jun 2024 07:30:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.85 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609411; cv=fail; b=RU4UBz2LWBrv/NOo0GaHGAgRyCxs5serBEeAU2nmu931b+qxfLEnG2bFVVU1PH6xo6DBqGKq77O4alk4SztyzHUID8Dug//1psgKLtwhKdpBoNU050RPATu2e2yh+jYRxP3VbmdusD8rU3x61KWTtVi7lpLPic4xQxuhDCHjdg4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718609411; c=relaxed/simple; bh=9jwe7o2FYbrJCFK7f0i548cNZjFKc0HU/5eyCZJEwmc=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OKoRv//Z8vef80gY48dCzW/2I11MEx2OOI0VsoKT7Z7JmtkOQubKtqybVAKoRsJlCzf3cZnSs5G4ebCoJIoAJk7lMv9WhQiNcI4Sr/yQFXaZmiSGT5lOruKDtSgVzayE4uKYH8EqTlF/4plm8D7/Q/TKlzwvI1Q0cWTHsHmQY7w= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Myou0GPg; arc=fail smtp.client-ip=40.107.237.85 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Myou0GPg" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N5A3Mo4HZr93zk/v4JDemUBXeCpCgsUr2ByX2lCYJAWBioIwmkrcniQLJeMHbtbUEAgN9EJT2HilTm85t9ujD2YOTrXys0vUTvmBpxlmXek10UZfpOMK0qJQCsUHmoaxbZGiaqz1DawWNsGqsoDiTzxeQxTsefGzEFhBi/W/jSmRLdaDLR2yKq8jzWM8EG1fIPd5E+d42bhLFk320soQNDh5xIjFP16uuOVR05ZGzRRJR4ZYMkoQEI7I+qsZwgWugEaT1yTKJSCLd6bJexg1iUfmq/AfH+nyrys7eSpWDtSOLUrXtuemAGOzp4bUEgRPSa0s5frcixskduW08n6FzA== 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=yGT7Dfnz3JtmMpxBbI0tYAJJaoE9JnQ1eo+oQM1C4XM=; b=KKoZRL5ZeRNZG9dPSWQOw7OkjgTrxqcscSEgVBLTM7iVADQF9l3Wu9N9GfSs1oI215tIj5S/BgYTiDDeXsm/kxzw4jj2qLhw8+FTRmYagAUm6Hjm/md2GEAGLN6VvfWLeCBx4NO6dbbJ1ten+Kks/0+ywRhtxoGXWog7vnW6UqxwtDXGEVJCaoUz7bgjVIIz2rOwsndcny4P70MzRHCi1xMjnu5FvSzXdRzO/u9LkwqEg++4/0YeS1CABDkuUMV0yD5rHxzzOsb54NkfPsLHzGWMxXX7WV1ZRf9aKGPpwuT/4ezXIHc4BXs+RWn08D+WKyveFrdXZ6gJ5SaagXiJbQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=kernel.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yGT7Dfnz3JtmMpxBbI0tYAJJaoE9JnQ1eo+oQM1C4XM=; b=Myou0GPgwhnQb4sVd6rlIfHStGrv8zv4vJNoVakZR22oe7NU+E3Hnvi5ocsvCSu6HYHQGI5jsF4DbK35gyDNDRjPjnZWRwyVQbPD9oL7hyREarG+/Z8djuF6GSp9KqK0ez8zQOdzsNGOvAtB3wprkwMJ4yJfpY8/LkOKru6XHe4= Received: from BY5PR03CA0022.namprd03.prod.outlook.com (2603:10b6:a03:1e0::32) by CYXPR12MB9337.namprd12.prod.outlook.com (2603:10b6:930:d8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.30; Mon, 17 Jun 2024 07:30:06 +0000 Received: from SJ1PEPF00001CDF.namprd05.prod.outlook.com (2603:10b6:a03:1e0:cafe::a0) by BY5PR03CA0022.outlook.office365.com (2603:10b6:a03:1e0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7677.31 via Frontend Transport; Mon, 17 Jun 2024 07:30:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SJ1PEPF00001CDF.mail.protection.outlook.com (10.167.242.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.15 via Frontend Transport; Mon, 17 Jun 2024 07:30:05 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Mon, 17 Jun 2024 02:30:00 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Mon, 17 Jun 2024 02:29:57 -0500 From: Vijendar Mukunda To: CC: , , , , "Vijendar Mukunda" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 8/8] ASoC: amd: acp: add pcm constraints for buffer size and period size Date: Mon, 17 Jun 2024 12:58:41 +0530 Message-ID: <20240617072844.871468-8-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> References: <20240617072844.871468-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: Vijendar.Mukunda@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00001CDF:EE_|CYXPR12MB9337:EE_ X-MS-Office365-Filtering-Correlation-Id: 2f69f8b8-236b-486b-9463-08dc8e9f4f24 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230037|376011|82310400023|1800799021|36860700010; X-Microsoft-Antispam-Message-Info: NoRVySmQNu41yyN8VgAqa9wjEcV1yMl7IxIT9HiwxMUpXxHTpm8ibqdvnhuJpEan4K9wM+Y7rIEEM02r1hlxD2HkgxBjdGlEU8vAN+uO+KRgRnmYKhhnl0KeHv+YDyMvr3+pTqRDmJvpigPXH3iYfQio/WcGrom1zWwJrGxgkNjTPuGui/l4MazOdMdxI2VULdUrFzWlo1YlaBD5GBrMd137hlfMELJOahe+Ap83uPC/dCtZCJ4SEMgssQycqTD4xqCCPRImRMeEf9NYIce2ciUpd1pKwkouHVXKYrPPBCmT2RpSxMb7nuIXCZ2OpjrwQmM0t9lMw9VrwbnZ1T94jQ/yqtROwQ5gG7gyQHcxgQnJY6ot/AU7r/dIUjnY07BXbXcyhTygTMtlCzTxUOer31AdCAQq2CbistAoKIemKs671SQsBYzMdGrMCiqU1dGSEYnGwYAJWe4+AtY7SYniYSwUqQoK/bKSOCPG9H7X7xmrq8lHxeLIQENspoMZa9ho+HIWhdu+oLcT0Oh7CJaOForRgONTYw23Hpl0vT/Vb0znxlbBd8GrVkEXZhHKuYd8Jc24ha5t7OJOe40NAUCGMjlsBniTpVCKe9qm9i3+8QbrqssLtZafQtBZvgzt9SmZ7b0Eb2Q5sMPkdANqN+XSCglY7ej5qGDej2svfoe/CNwdh0fkmFAOu/3/AEDscysgQpga1JJkkLuGlDZCjf1s3FHnBR7R3JvVWZIllGCe1Cu5GKx1qe16xgOyNvB4rmo6/daCGB04e4IoJib9EtvNIBYs3DuIkOmysOEmpV5fIPu0qchfc1mprqDDeYMXLdgqptFjJtCxeHtRA/0dj5v6CAq3qEA1b1+w1vW5hXHeb4PmSM1ZHTogyif8EVJVjKR/Hy0DGa6gXU2k7nsrtXc/l+6VzbhIArxUVt8YhOYpEsz/zhsHJiotHmZeOZV3nxsvUvqISDVmjNZtEZs/zli3OTBuUWVZBPtyDHPJ4WPW2l4nkrxFz8l4y8z7Vf2tXl7WkUrqLlsR0KPZGFFuvViCZZZ5t+bpRW+E+HGcPTNEwR+xPszxp5TU+OnEoW/dRV+Fpydtmx+5B9HqDvKsuCaFTdfkqFwFouzQxjAbUwIGcuCa/9pT1BfMcJjMgYJnNGpaAGwm28FuWNrZCic8GxsQdL7VnD5q7CuwFpMjIpEAG9WQ1sk6lPUf9Pof+/8AtXIXf1CqpxNzk54fAlviDzPKCZAMCau6sTkbr51Jcj3byjOhKiiQPntImiVoelnmOsU+NYtQMKNqRbCvizWWgy+xVg81XG9YAn1ztYHNAAhFdI6ExD1aKGrJBKx5SDp0GVAKbVFoE3U2rDxfhtLssOy18Oqgae/PmDQJEcr7xXuD9ZGi37Y9nBepyb/xhUx0YzFHKJQkUF3CR/yTqKikdvgkuQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230037)(376011)(82310400023)(1800799021)(36860700010);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Jun 2024 07:30:05.7571 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 2f69f8b8-236b-486b-9463-08dc8e9f4f24 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SJ1PEPF00001CDF.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR12MB9337 ACP common dma driver has a buffer size and period size restriction which should be 64 byte aligned. Add pcm constraints for the same. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-platform.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c index aaac8aa744cb..4f409cd09c11 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -197,6 +197,20 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs else runtime->hw = acp_pcm_hardware_capture; + ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, DMA_SIZE); + if (ret) { + dev_err(component->dev, "set hw constraint HW_PARAM_PERIOD_BYTES failed\n"); + kfree(stream); + return ret; + } + + ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, DMA_SIZE); + if (ret) { + dev_err(component->dev, "set hw constraint HW_PARAM_BUFFER_BYTES failed\n"); + kfree(stream); + return ret; + } + ret = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS); if (ret < 0) { dev_err(component->dev, "set integer constraint failed\n");