From patchwork Tue Sep 24 06:18:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 830340 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 AA39ACF9C71 for ; Tue, 24 Sep 2024 06:19:38 +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 BBF7E857; Tue, 24 Sep 2024 08:19:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BBF7E857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1727158776; bh=dWGHTT+poVrRSZFTvXwyF5Hvf3FxF+8H0tmFQzXXwOE=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=cw2M0vNJnsCLuqPYTkGT/0ihQ6J0k2yd+Ez2myVeNxH6qagBHxBv9YvLcRfIDweBl yocKDz/oJrQTTvsG5+Q2TxlvZGqUmmrbZxkLrPF+Nn9YY+9EgDT/MqRgVBgr2f0bjH 2v9KLFCMVb1uaj3PLqzyQkvYD8ZABvsWIj8KIpSE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id DA561F805D3; Tue, 24 Sep 2024 08:18:58 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 81663F805AB; Tue, 24 Sep 2024 08:18:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7DD47F802DB; Tue, 24 Sep 2024 08:18:48 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2062f.outbound.protection.outlook.com [IPv6:2a01:111:f403:2409::62f]) (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 25135F80007 for ; Tue, 24 Sep 2024 08:18:42 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 25135F80007 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=vpUALedR ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=WDQ/ISZmo57zMDhC2m53Wgn+albgZKxbTw6LItpvtH8CzfaRL0MjjR0Gca3/OPxUgsptVHLBtsZZqlsWoGWy8i95Az2oF5t5F2nDCoz1Cc6WNwJ6GSckMMLO4XXKx33wNDc36M85Ag+7vEk7hwLBdVuPaqLmox8hAMgW8r8Sxr2j80YQdFkGB5rXeeATIohTh2nQwjw0l0+a0yUoifJ4SPE4PGtEWbJmCEeUfiOk6uLqN89lPxWxj6P5cq0sgR5F7iJcKiVGK60hK2MAH5oi3u4hn/9MtTgSKD/EbPCN8ADwv0RdAfNPoYq8dDUSERdJaOdWMWYl8OBqg/g0QRTmeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=RPExmaT2nIt+cH1CyjmaA98aE1J+qzsigEEBpDhJblE=; b=OMqUdXhGvYXW4FzFklgCbhQS3gqRCNmhgnKS0f98igxBUXjzaL9NaiAoBYhXk2xACzNpWLxx3NBOBA/V2R8Ve/9IJ2f5pvdDENN3/+m1EwbSEUDcVZZcsXrqo6UtgANM1VK42Xfm/GJHZm+mta/+kR69xhdrGL5Gp7+qNziYTZ4qy7lmRg7+j8MIOfwAALS3Q3s4j9qifCqsKDcaD8G4JkdLV1Ysg12Ctklzqb8/EhAAtFprG022pyN9U0O5VA8K7p3fBL07K6mMoFfeCjcZ8sbG3HxsQ9duPpq9zo3BXANyqbHrQTkTFxatd2QoylZCNL2nuQKcnO5wr17w4Bg/gA== 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=RPExmaT2nIt+cH1CyjmaA98aE1J+qzsigEEBpDhJblE=; b=vpUALedRiW9kBkO+d+5k7UbFWxPbNgjaxweVurFxUrz9o6DjDI+XSZHbiGpJW3tx+j39XZnZar4J/JvzudbPHxxiajdw04THcPiYmHG6dIULZJldEKpiaG2RHow8JJrqwFEuQst8rB6YyP+X6mPGe8bqYPrmQ5nThoV+JzsMYDs= Received: from PH7PR13CA0014.namprd13.prod.outlook.com (2603:10b6:510:174::28) by IA0PR12MB7625.namprd12.prod.outlook.com (2603:10b6:208:439::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.26; Tue, 24 Sep 2024 06:18:37 +0000 Received: from SN1PEPF0002BA4D.namprd03.prod.outlook.com (2603:10b6:510:174:cafe::85) by PH7PR13CA0014.outlook.office365.com (2603:10b6:510:174::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.16 via Frontend Transport; Tue, 24 Sep 2024 06:18:37 +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 SN1PEPF0002BA4D.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Tue, 24 Sep 2024 06:18:36 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) 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; Tue, 24 Sep 2024 01:18:32 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 0/9] ASoC: amd: acp: refactor acp version differentiation logic Date: Tue, 24 Sep 2024 11:48:12 +0530 Message-ID: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4D:EE_|IA0PR12MB7625:EE_ X-MS-Office365-Filtering-Correlation-Id: 92e6e500-cef2-4844-7c4a-08dcdc60b994 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|82310400026|376014|1800799024|36860700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/r2DyHHzU2Z/14SB6mOe9EaTeBYzHLQRIBz7oGtYRAtjYAoz8hqV9u2VZJwy5Lfgbap0//z6ZYIO8bvbZY/MioilmTBCbtt/2TVV3nPBT1g38FXY+jFgkjLkkwSyoGhon7G7Uuiz2f+ZWJJ3wfaK3ZgaKxvL591i0BuWySON2X2yYtN1BlmZxR6ARo+nz9Q8Cwc8/CIkB7bO9OYE3idkt5fbWYffsk8Ulk/xJof3/lbgRbXKRUI9i/Bf5bAQhkdGgFy069c6Btg/HR2VdVzK8Ftf4XnMDPI6V+ZX16oH3uTZqlTLVgT9Q5FYACrFr65nZMUw7LVktJIAjGQjpjSQ0A2YqdCk/EzXg8Nq4QK/0qX2ddOH9co9mrMP+Ckxo61/eON7JS2uDJrvgWttI9LYnHR 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:(13230040)(82310400026)(376014)(1800799024)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 06:18:36.7473 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 92e6e500-cef2-4844-7c4a-08dcdc60b994 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: SN1PEPF0002BA4D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB7625 Message-ID-Hash: 4BKNFFJ7KRSQFSQCMS3ZVY3BZZIPGGTO X-Message-ID-Hash: 4BKNFFJ7KRSQFSQCMS3ZVY3BZZIPGGTO X-MailFrom: Vijendar.Mukunda@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Currently different logics being used in the code for acp version differentiation. This patch series refactors the code to use acp pci revision id for handling acp version specific code. Changes since v1: - Add patch to update mach_params subsystem_rev field in machine select logic. Vijendar Mukunda (9): ASoC: amd: acp: simplify platform conditional checks code ASoC: amd: acp: use acp_rev for platform specific conditional checks ASoC: amd: acp: use acp pci revision id for platform differntiation ASoC: amd: acp: store acp pci rev id in platform driver private structure ASoC: amd: acp: pass acp pci revision id as platform data ASoC: amd: acp: update mach_params subsystem_rev field ASoC: amd: acp: remove unused variable from acp_card_drvdata structure ASoC: amd: acp: replace adata->platform conditional check ASoC: amd: acp: remove unused variable from acp platform driver sound/soc/amd/acp/acp-i2s.c | 38 +++++++++++++-------------- sound/soc/amd/acp/acp-legacy-common.c | 24 ++++++++--------- sound/soc/amd/acp/acp-legacy-mach.c | 8 +++--- sound/soc/amd/acp/acp-mach-common.c | 38 +++++++++++++++++++-------- sound/soc/amd/acp/acp-mach.h | 12 +++------ sound/soc/amd/acp/acp-pci.c | 7 +---- sound/soc/amd/acp/acp-pdm.c | 2 +- sound/soc/amd/acp/acp-platform.c | 15 ++++++----- sound/soc/amd/acp/acp-rembrandt.c | 4 +-- sound/soc/amd/acp/acp-renoir.c | 4 +-- sound/soc/amd/acp/acp-sof-mach.c | 6 ++--- sound/soc/amd/acp/acp63.c | 4 +-- sound/soc/amd/acp/acp70.c | 14 ++++------ sound/soc/amd/acp/acp_common.h | 19 ++++++++++++++ sound/soc/amd/acp/amd.h | 9 ++----- 15 files changed, 109 insertions(+), 95 deletions(-) create mode 100644 sound/soc/amd/acp/acp_common.h