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: 13810142 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (mail-mw2nam04on2065.outbound.protection.outlook.com [40.107.101.65]) (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 B6EE640879; Tue, 24 Sep 2024 06:18:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.101.65 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158722; cv=fail; b=FMxAeZYuRJ/r9Du1Pu/f5hhOEeI5W3Md4kSN9b9FPy27rWCtIeUgz0EHu9HarcS5z/sFmem7CX7AanKUB6SjtjVDM0/W0jt+WAeAQkxlo8ZoHE1yTz86CDrNknhZBwsFUJVTP4CyOv242hQhwv8IhCw95CR2sKStRGJlrAkwBkc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158722; c=relaxed/simple; bh=dWGHTT+poVrRSZFTvXwyF5Hvf3FxF+8H0tmFQzXXwOE=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Ojaibxq3H/p9Tv1nDbNrG03kjbwVxGTKP+3hn1i0R2GmYc76rA5sdK1qkE3II2EjuufmLP2umYtYMIR8CF0hK/ghzpWDPiymvj0zwd1GYMABmU6vVJ2yBXCuglD17+0jLlY5hBF8s424DPw/Xs0i7FkmWmQlIuu+INJNU0hi5Ts= 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=vpUALedR; arc=fail smtp.client-ip=40.107.101.65 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="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 Precedence: bulk X-Mailing-List: linux-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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|36860700013; X-Microsoft-Antispam-Message-Info: 04DBb+1KbTbXzt9TMWYml90KysD+HVrSm55Pz89C77X0e/KkGZV1Jxp6z1v6jaUFatOPBvwCa2zvUBbqK68iKJ3NZR6O4NFy9ExWaYRRzQXu+VTpe6nfAL9TvnDpVlgsMcmcFvR9rTikcnaYdRZCWy5NY6kXqQWmuxbbgxFtLxtWTTnXLZkVhSPugJqaK+03a/57lvvUhSp0LnE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Ulk/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 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