From nobody Fri Nov 29 15:36:08 2024 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2043.outbound.protection.outlook.com [40.107.223.43]) (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 B2C35339A0; Wed, 18 Sep 2024 06:18:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.43 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640324; cv=fail; b=LZFk2U2qN0nvsH+CYBAFDu7MsmtxH9Ye3KfBMHfTCxSVCtFeUW5UssumYc/+1clBdq3CUigeAXKWvXMMh9eM53MmQrA0cr4LpxvQO7KHpC8G9Pz/8+r7kN4KQ6iQOiGvvlqxUCAxsp5fPQntVzjKfNvlsAZ44xt4bYLa3exfdpU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640324; c=relaxed/simple; bh=1Bd7wwGG/QVQcvhWSYSxbiBiNP3ENN/9T320Rmspy+8=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TyPFUkSaxPI9Oo5oOEFCMaMGNwv/WbMAwKqXWfYZWb89YaoQZ8Sg9ocjK7kPFPFaRpPaaVhHUtiQBpQG04Yj5bG+a4QRjwtwHCO0iMx0LQJNTxBn7U7oSJTTr0ZuDnD/wbSVI7IyrVPo5RDazKd6lzZg6wt1duR1QJPQvR351e4= 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=hE7tVXYW; arc=fail smtp.client-ip=40.107.223.43 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="hE7tVXYW" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=spJcG+vpQ+WozanIJD7vi6PtiBKeUKAPWUSog7DNpf/z6fBxShxBQxEWwSn7S9JQT7FKhtZjrSi3rjJkPRR2a0LnaB0GHAvkd9ShBKwOND2po4LVZVU6Uz2OE6QuzAqbZ3NA2wtBVln430cxIZz3gQu61unzEbWEX7hUZ9Z0grOILTKhQSpJEx68E8x+5JzNMVNauMbFuoi6g1Rkj7ZqN6QYlYKxKKZWkVoAmNiCa2XdA8P7jIPp0riZFOqjb3H9kUx3VUYiZuQ0WR/BkFQx2/GtE9Tf52kiYmVk1A/JN5J44FheF+554b+hVL1KIvEFPohpZ3AXWITT+ydzCwXoTw== 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=PMPd7XQtbsy8edkYKpkZR+rJtSF7bSxWXMLhWhpYXaQ=; b=F3SCyW+6FOUMAKeDzUTTotonP2avPIaCAkPtbMenp/uuRl57fpevOvAGCQd3rinw45fedwhrAmuqaO4LDEpTPZo5TNtyA78BZvMt6DFUJBrng7KGvoOCwWrG3tCbmVxOTbgO6ErhqKy9XO8NoQoFDKVSzrA3Nup8IkYsPdH4jnXlXPskXQrztfiLgylYV2YOOHqEHlHlPe+RQlpgYenE9JgGDZw2hI6oyUXOs+jJrbqjmCfs0GrfG74RzVnp6Injrtzz3rmro/1RoMICDV1E+MQBqgUJUDXBKqBI8IP7j8wI2LAFiYjURZI0v+rnLGadJ10A8R6ZOvP84sDAeE6vrQ== 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=PMPd7XQtbsy8edkYKpkZR+rJtSF7bSxWXMLhWhpYXaQ=; b=hE7tVXYWr6PPniMLSy2wX514beLh5k4GsCZa3xcW1CiZA/1CLHT2vPjcVijoCKfCKJ5OHrdVD/gndeQbAxo33gz0ZL8KxxjsXYCui7SRCL6pCIYjIB8WdfjcnAgQiFxJ1YYFy8/iPZot72WQNHluDRgPtExZR8t3LH9gU5mHc28= Received: from SA9PR11CA0028.namprd11.prod.outlook.com (2603:10b6:806:6e::33) by CY5PR12MB9054.namprd12.prod.outlook.com (2603:10b6:930:36::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Wed, 18 Sep 2024 06:18:39 +0000 Received: from SA2PEPF000015CB.namprd03.prod.outlook.com (2603:10b6:806:6e:cafe::7a) by SA9PR11CA0028.outlook.office365.com (2603:10b6:806:6e::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 06:18:38 +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 SA2PEPF000015CB.mail.protection.outlook.com (10.167.241.201) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:18:38 +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; Wed, 18 Sep 2024 01:17:30 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 1/8] ASoC: amd: acp: simplify platform conditional checks code Date: Wed, 18 Sep 2024 11:45:33 +0530 Message-ID: <20240918061540.685579-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CB:EE_|CY5PR12MB9054:EE_ X-MS-Office365-Filtering-Correlation-Id: 70ae87e8-2dd0-4404-47f0-08dcd7a9bc58 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|376014|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?OMiZfx1laQd8/246YoFfAPB46aY9y1+vHBwqEsbXUfE15A/OiGYOj/Rz1uPX?= =?us-ascii?Q?FIIQl3KIBeC046eOppueDL2fWQVE6G1IlCmoYHvLQiJx7VJ9G17PjqsMrpyK?= =?us-ascii?Q?PGurn5OTE7In59yYs1LW3EhoGDdVGs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vw25e2cbo11OSPh75KxTdRBfoEzSC8tPJkTkWGLFHHh5oZV07HyPP2N?= =?us-ascii?Q?in1HzX8V8nd6p92+qSMO1WIvzGq5CqgYQzCA9qx4Pn6BDw5FhkeKswOt1z2z?= =?us-ascii?Q?IQuPjD2HlOKGeaBRn3GcXiubnvntGR9j93ZPpEl033yFMqvJsoH7KFhg2oJz?= =?us-ascii?Q?kNsl0iL4rGSMMsddhtkVYaA9djKP6nc9L6XgQSoM6qNfwieq1EVJ0IdPE9g/?= =?us-ascii?Q?sBtKpT7vVbxZn8ICftGYWiV2kZbVRdWvupUUiEvXY/XnGjQiNsJJBcVCdDu2?= =?us-ascii?Q?RP5lqoBz1z6PXHqedQs1JZqh4UfgnyRUiHWY+XE1Dv1D3BH3QPu9lfeTgAXO?= =?us-ascii?Q?MqRBJ3/4dCvoulH/3VLgyr2eQEX31GhgGmZXTXbv5/3+0xkYBH7xJQ8Ay6x4?= =?us-ascii?Q?2/Y0aseFkUd14i3kmASWraKlll0PvowA?= 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)(1800799024)(376014)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:18:38.8177 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 70ae87e8-2dd0-4404-47f0-08dcd7a9bc58 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: SA2PEPF000015CB.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB9054 Content-Type: text/plain; charset="utf-8" Simplify code with switch statements for platform conditional checks. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-mach-common.c | 36 +++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-ma= ch-common.c index e9ff4815c12c..d4c7a7b79177 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -1647,16 +1647,21 @@ int acp_legacy_dai_links_create(struct snd_soc_card= *card) links[i].id =3D HEADSET_BE_ID; links[i].cpus =3D i2s_hs; links[i].num_cpus =3D ARRAY_SIZE(i2s_hs); - if (drv_data->platform =3D=3D REMBRANDT) { + switch (drv_data->platform) { + case REMBRANDT: links[i].platforms =3D platform_rmb_component; links[i].num_platforms =3D ARRAY_SIZE(platform_rmb_component); - } else if (drv_data->platform =3D=3D ACP63) { + break; + case ACP63: links[i].platforms =3D platform_acp63_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp63_component); - } else { + break; + default: links[i].platforms =3D platform_component; links[i].num_platforms =3D ARRAY_SIZE(platform_component); + break; } + links[i].dpcm_playback =3D 1; links[i].dpcm_capture =3D 1; if (!drv_data->hs_codec_id) { @@ -1714,16 +1719,21 @@ int acp_legacy_dai_links_create(struct snd_soc_card= *card) links[i].id =3D AMP_BE_ID; links[i].cpus =3D i2s_hs; links[i].num_cpus =3D ARRAY_SIZE(i2s_hs); - if (drv_data->platform =3D=3D REMBRANDT) { + switch (drv_data->platform) { + case REMBRANDT: links[i].platforms =3D platform_rmb_component; links[i].num_platforms =3D ARRAY_SIZE(platform_rmb_component); - } else if (drv_data->platform =3D=3D ACP63) { + break; + case ACP63: links[i].platforms =3D platform_acp63_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp63_component); - } else { + break; + default: links[i].platforms =3D platform_component; links[i].num_platforms =3D ARRAY_SIZE(platform_component); + break; } + links[i].dpcm_playback =3D 1; if (!drv_data->amp_codec_id) { /* Use dummy codec if codec id not specified */ @@ -1760,18 +1770,24 @@ int acp_legacy_dai_links_create(struct snd_soc_card= *card) } links[i].cpus =3D pdm_dmic; links[i].num_cpus =3D ARRAY_SIZE(pdm_dmic); - if (drv_data->platform =3D=3D REMBRANDT) { + switch (drv_data->platform) { + case REMBRANDT: links[i].platforms =3D platform_rmb_component; links[i].num_platforms =3D ARRAY_SIZE(platform_rmb_component); - } else if (drv_data->platform =3D=3D ACP63) { + break; + case ACP63: links[i].platforms =3D platform_acp63_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp63_component); - } else if ((drv_data->platform =3D=3D ACP70) || (drv_data->platform =3D= =3D ACP71)) { + break; + case ACP70: + case ACP71: links[i].platforms =3D platform_acp70_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp70_component); - } else { + break; + default: links[i].platforms =3D platform_component; links[i].num_platforms =3D ARRAY_SIZE(platform_component); + break; } links[i].ops =3D &acp_card_dmic_ops; links[i].dpcm_capture =3D 1; --=20 2.34.1 From nobody Fri Nov 29 15:36:08 2024 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2071.outbound.protection.outlook.com [40.107.220.71]) (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 0B6CC339A0; Wed, 18 Sep 2024 06:19:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.71 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640343; cv=fail; b=I3KOYJMPyfMI2qDcGGp6f3B2UzlO6WTSQVno0ts4QKBOSOVKegRmUQU3YYfP7OZjBs/t3azwZrduEvoT2BnKsKMhlb955Q9iLCZIkQNC+WsKAwlhfOSnOAAoL8qIlN2TSM/UJX/xUfDiiZ9N0HEBBRA6FDoEZmb7jd1Ite2MwcI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640343; c=relaxed/simple; bh=9FniKUlrjazFq6pmMecSwbmKXIuy6lccmoplzJIApc0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Tez2xvGT3+7TAUCN9BVl4tW5eJfK+cQjv+DOS6x3nYmHoy3nJx+nPSXc6mnifetoOxdxWFgMmtLH148ru+AEN4GUGypJKxTKWJpnPMMAy7+W/WhH2ru+qdaZ5IveJhS5+tW1Pe7t0gB0EeBg+UcrS7DqMyJRNtr8PyzloWiSO6k= 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=b5dMQ9VO; arc=fail smtp.client-ip=40.107.220.71 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="b5dMQ9VO" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IYPk0SXgLqXyJZ43mNkMdLpy4g2L8b/mXDD+I8kdOLj0zs//vxgwvKHyQ6uksO6OXpEdOsjALW2UIZm1oQJlFM3HwlX+TWhpMyVPbf5m5x/lPqaB26DuV9L3M1myVRQsFC8JnrJO5A8/UtdQSsbxyCTDOT8p8FRj4sWjkHgwRLvKUScHQapY1ubAnD4+3BNf3msJ8J2LDxCvo7UP3rpUKInWFOpikJHbc0YIzYt/mSWGjoBMNBTgU2jFInSIFdHp9UFygeustvIx6k/2O2/iv6c2azWNEzWLZXyFi57ie87svnyv4XuQtM4VhDdXdkAgjwAF4VP8/Vfok9uvWsn3/Q== 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=3eGIJ3IVrjjqLH0Za3OQUHa8UGopheQ4Ktf6ylu5E7Y=; b=WVpAY0spRw/ITmhvnECp82KTI8zuwF2zRnF29xD2Fg9N3GnRcdsikawRWKMBbbZ7Kk69Ipa6ytG4PMRQRvSn8OW0xMspYjM9ifzybGQO4NL8P9FYktJanB7V74Sp8uAY5+zTvwBntwSTz5BzjlolFiX9eYuqKbDApj8FCkWxxb3/aFHaXk9V/eXMmBJjSjgD+KGfJG/qsyZbLPlMsdiIvzQGhto2xbJ2RacnQDBSYuadJqJ1f7YziBlgQWGGF31oiB6RNZdS3q6MUWx7LL2atixyV8KvX0u1QIh4O9XOY22snt9FQ3RrGECoHxIBe6vFmsZ3qF0DuQr5lyCqcZ0ogQ== 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=3eGIJ3IVrjjqLH0Za3OQUHa8UGopheQ4Ktf6ylu5E7Y=; b=b5dMQ9VOXboq9bYTAQZCGtrnf7rHQnyDN5a2l5MMSkBsHBRHrDOekxqn5+sf6YG1gRFfEgMuDoPLuoUcTQYZSBCKxkWPRdDu0h1mbso1HcjyN7SMVLsV6WnlwpK9rMXelGKrjdxr3Wi7wEwf76pMs8Ifqcgy8gB9A/kr1Vmr+D0= Received: from PH8PR07CA0029.namprd07.prod.outlook.com (2603:10b6:510:2cf::27) by MN0PR12MB5979.namprd12.prod.outlook.com (2603:10b6:208:37e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16; Wed, 18 Sep 2024 06:18:59 +0000 Received: from SA2PEPF000015CA.namprd03.prod.outlook.com (2603:10b6:510:2cf:cafe::d8) by PH8PR07CA0029.outlook.office365.com (2603:10b6:510:2cf::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 06:18:58 +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 SA2PEPF000015CA.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.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:18:58 +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; Wed, 18 Sep 2024 01:18:02 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 2/8] ASoC: amd: acp: use acp_rev for platform specific conditional checks Date: Wed, 18 Sep 2024 11:45:34 +0530 Message-ID: <20240918061540.685579-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CA:EE_|MN0PR12MB5979:EE_ X-MS-Office365-Filtering-Correlation-Id: 3f363442-800d-48a0-9988-08dcd7a9c7ff X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|36860700013|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?rNJpwRa1Q2E2t7B/v2kdUuXA9mlP3QG1PgJ3z7GYxLsGhb0nZsJaUV3/NzjX?= =?us-ascii?Q?iHlFsH5gYNsowoZ+w2bH4o56NY/dLDBCmnCl6LwRSD7ASK2H8YYbsLqXx2m6?= =?us-ascii?Q?OOhLRYjJ//QOBxEjhuHrmX7YVlMiVJcD2i47L/uzlldWJf7n0KnmDRTR6yew?= =?us-ascii?Q?/HzpZjv+EQx5ypNXTsELgiXEFF+qBlCU76QcD1rJvWN4GdykNnwZn9sOwROw?= =?us-ascii?Q?5hgmHYCWIarUvwj+52lA/R3aUorBWRbiujU1sLqwqYVNyfSN0wkESTw+JMT2?= =?us-ascii?Q?R2Acrs6UrppOlODDrRf/BKA3TXpXlXxVKwfFrfnR5aCvfAwwpd91KlVwK0gI?= =?us-ascii?Q?HNi73yRyhaLWZKh0JFg7EqdTqyHVJaQMnLuXD+XYC/Gx5VvOY/UZDKZZuZAE?= =?us-ascii?Q?J+LY0SsKiMNauE9VdV5E3HO6MJ2bknMp8oC5gzzThXBY3kr0h7k9Rgl7pA87?= =?us-ascii?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3mzZKbn1TzBjz?= =?us-ascii?Q?TQV4HDQpxY6VU4cfnMpFTF+daf9/9lwp00e76LBZAn/fR5IQUj8WJ6DdLlOy?= =?us-ascii?Q?J/7gva+ynq84F16njyPJjZKxLUoIxojl?= 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)(36860700013)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:18:58.3848 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3f363442-800d-48a0-9988-08dcd7a9c7ff 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: SA2PEPF000015CA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5979 Content-Type: text/plain; charset="utf-8" Add 'acp_rev' as a member in machine driver private data structure to store acp pci revision id. Replace platform specific conditional checks by using 'acp_rev' variable. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-legacy-mach.c | 2 ++ sound/soc/amd/acp/acp-mach-common.c | 24 ++++++++++++------------ sound/soc/amd/acp/acp-mach.h | 3 +++ sound/soc/amd/acp/acp-sof-mach.c | 2 ++ sound/soc/amd/acp/acp_common.h | 19 +++++++++++++++++++ 5 files changed, 38 insertions(+), 12 deletions(-) create mode 100644 sound/soc/amd/acp/acp_common.h diff --git a/sound/soc/amd/acp/acp-legacy-mach.c b/sound/soc/amd/acp/acp-le= gacy-mach.c index d104f7e8fdcd..2a59f7916e15 100644 --- a/sound/soc/amd/acp/acp-legacy-mach.c +++ b/sound/soc/amd/acp/acp-legacy-mach.c @@ -126,6 +126,7 @@ static int acp_asoc_probe(struct platform_device *pdev) { struct snd_soc_card *card =3D NULL; struct device *dev =3D &pdev->dev; + struct snd_soc_acpi_mach *mach =3D dev_get_platdata(&pdev->dev); const struct dmi_system_id *dmi_id; struct acp_card_drvdata *acp_card_drvdata; int ret; @@ -173,6 +174,7 @@ static int acp_asoc_probe(struct platform_device *pdev) if (!strcmp(pdev->name, "acp-pdm-mach")) acp_card_drvdata->platform =3D *((int *)dev->platform_data); =20 + acp_card_drvdata->acp_rev =3D mach->mach_params.subsystem_rev; dmi_id =3D dmi_first_match(acp_quirk_table); if (dmi_id && dmi_id->driver_data) acp_card_drvdata->tdm_mode =3D dmi_id->driver_data; diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-ma= ch-common.c index d4c7a7b79177..2394aa061265 100644 --- a/sound/soc/amd/acp/acp-mach-common.c +++ b/sound/soc/amd/acp/acp-mach-common.c @@ -1471,7 +1471,7 @@ int acp_sofdsp_dai_links_create(struct snd_soc_card *= card) if (drv_data->amp_cpu_id =3D=3D I2S_SP) { links[i].name =3D "acp-amp-codec"; links[i].id =3D AMP_BE_ID; - if (drv_data->platform =3D=3D RENOIR) { + if (drv_data->acp_rev =3D=3D ACP_RN_PCI_ID) { links[i].cpus =3D sof_sp; links[i].num_cpus =3D ARRAY_SIZE(sof_sp); } else { @@ -1647,12 +1647,12 @@ int acp_legacy_dai_links_create(struct snd_soc_card= *card) links[i].id =3D HEADSET_BE_ID; links[i].cpus =3D i2s_hs; links[i].num_cpus =3D ARRAY_SIZE(i2s_hs); - switch (drv_data->platform) { - case REMBRANDT: + switch (drv_data->acp_rev) { + case ACP_RMB_PCI_ID: links[i].platforms =3D platform_rmb_component; links[i].num_platforms =3D ARRAY_SIZE(platform_rmb_component); break; - case ACP63: + case ACP63_PCI_ID: links[i].platforms =3D platform_acp63_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp63_component); break; @@ -1719,12 +1719,12 @@ int acp_legacy_dai_links_create(struct snd_soc_card= *card) links[i].id =3D AMP_BE_ID; links[i].cpus =3D i2s_hs; links[i].num_cpus =3D ARRAY_SIZE(i2s_hs); - switch (drv_data->platform) { - case REMBRANDT: + switch (drv_data->acp_rev) { + case ACP_RMB_PCI_ID: links[i].platforms =3D platform_rmb_component; links[i].num_platforms =3D ARRAY_SIZE(platform_rmb_component); break; - case ACP63: + case ACP63_PCI_ID: links[i].platforms =3D platform_acp63_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp63_component); break; @@ -1770,17 +1770,17 @@ int acp_legacy_dai_links_create(struct snd_soc_card= *card) } links[i].cpus =3D pdm_dmic; links[i].num_cpus =3D ARRAY_SIZE(pdm_dmic); - switch (drv_data->platform) { - case REMBRANDT: + switch (drv_data->acp_rev) { + case ACP_RMB_PCI_ID: links[i].platforms =3D platform_rmb_component; links[i].num_platforms =3D ARRAY_SIZE(platform_rmb_component); break; - case ACP63: + case ACP63_PCI_ID: links[i].platforms =3D platform_acp63_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp63_component); break; - case ACP70: - case ACP71: + case ACP70_PCI_ID: + case ACP71_PCI_ID: links[i].platforms =3D platform_acp70_component; links[i].num_platforms =3D ARRAY_SIZE(platform_acp70_component); break; diff --git a/sound/soc/amd/acp/acp-mach.h b/sound/soc/amd/acp/acp-mach.h index 93d9e3886b7e..2b6b8b3e1b94 100644 --- a/sound/soc/amd/acp/acp-mach.h +++ b/sound/soc/amd/acp/acp-mach.h @@ -18,6 +18,8 @@ #include #include =20 +#include "acp_common.h" + #define TDM_CHANNELS 8 =20 #define ACP_OPS(priv, cb) ((priv)->ops.cb) @@ -78,6 +80,7 @@ struct acp_card_drvdata { unsigned int dmic_codec_id; unsigned int dai_fmt; unsigned int platform; + unsigned int acp_rev; struct clk *wclk; struct clk *bclk; struct acp_mach_ops ops; diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-m= ach.c index f36750167fa2..49aadbadb7e1 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -94,6 +94,7 @@ static int acp_sof_probe(struct platform_device *pdev) { struct snd_soc_card *card =3D NULL; struct device *dev =3D &pdev->dev; + struct snd_soc_acpi_mach *mach =3D dev_get_platdata(&pdev->dev); const struct dmi_system_id *dmi_id; struct acp_card_drvdata *acp_card_drvdata; int ret; @@ -116,6 +117,7 @@ static int acp_sof_probe(struct platform_device *pdev) if (dmi_id && dmi_id->driver_data) acp_card_drvdata->tdm_mode =3D dmi_id->driver_data; =20 + acp_card_drvdata->acp_rev =3D mach->mach_params.subsystem_rev; ret =3D acp_sofdsp_dai_links_create(card); if (ret) return dev_err_probe(&pdev->dev, ret, "Failed to create DAI links\n"); diff --git a/sound/soc/amd/acp/acp_common.h b/sound/soc/amd/acp/acp_common.h new file mode 100644 index 000000000000..f1ae88013f62 --- /dev/null +++ b/sound/soc/amd/acp/acp_common.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only + * Copyright (c) 2024 Advanced Micro Devices, Inc. All rights reserved + */ + +/* + * acp_common.h - acp common header file + */ + +#ifndef __ACP_COMMON_H +#define __ACP_COMMON_H + +#define ACP_RN_PCI_ID 0x01 +#define ACP_VANGOGH_PCI_ID 0x50 +#define ACP_RMB_PCI_ID 0x6F +#define ACP63_PCI_ID 0x63 +#define ACP70_PCI_ID 0x70 +#define ACP71_PCI_ID 0x71 + +#endif --=20 2.34.1 From nobody Fri Nov 29 15:36:08 2024 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2063.outbound.protection.outlook.com [40.107.102.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 4856616A94A; Wed, 18 Sep 2024 06:19:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.102.63 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640351; cv=fail; b=J0E5sGXGXU62WsA91x8VHj3hTKb0zhjytNRvG6REuFiprUqZkU7nEWTvrOGgAT0YzAT5yx6rHw5IevdAR1bHA5bC0rTMzH91jXKVnk8XCqMw3fmrpYhcFxi2KGtUFy4J46TA42tjc1ODc+7sC0lIQVOeBaU5ukHDDRfCk65weKE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640351; c=relaxed/simple; bh=lOX1HUGFHBX1DNs2BNOg1eNej5qsVEYz7keCjTQ/4w4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TGSdiGd4STNnp9OxS3y1amIaWzFHGpFQd497y//zwc2kQOshJ+i+7PZHtAQKEHCd7xORn3WdOdp6Ckuqa30X9zAlSdgRqirjFmRqmA2fvzB/iW4vpercBaLupk2ueLxw8NzdQVXP87lgMk+9fKSJ0sApLREFinZLa4PHCeIJFBQ= 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=meHYYsGv; arc=fail smtp.client-ip=40.107.102.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="meHYYsGv" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OJC3RCSLnBFmilItpYn+OjcIRo0zupsH6vMCJ3J74JdhPameRJnE/4ZVPbWs9lMLj9wFMw0uXWVmOZDonvTMhL1gLA65DmG3K6ogX25QmkZqpsNVyHIgLmyTwQt9AxH946C/k4lUizAyfRfG+0ZJSsqEJ6bXV554VB2O8q8MzRH4Ch7cS+VzKDawdO82A79TiQaMATgoTHKt8Wj5JKzmpOuHU/OI7dj8z/WIaCv6XMryMAaQ8obPEX5JPk9fqnXfcx4n1boYLzjWNOwZ4USzW01MA7EnB/s6Y34n3n7heISS9tc4VjijgPLNYTqzaC9SL19VRDVHSnm1PQd5gbiITg== 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=5H0wI6+uJGaRPBAubRwJVI2iQJgonhHPTKDcye/8Cfo=; b=jjH20ZOmgntqFudEELwdIegb70L8W93/0Q/bq3NRF0M/RW5M3QftqV2DdvhK5tPWJzxOf3q/w98diTKHlGYQFAsTDjFdt9AYYNOwKtS8QC/bkEoLDpqFdJpWfWPxOkkhzNOEEDXGxpd/e05sdSgY98d+IB2o9lDwvo8Wp9TtD2NnGy/xPXq0CybROWa/xCdhe3KPN8mr4HtYCC2ly74rW5DQUzLcNjyYUJCGNDJA/gBWUcHG47r/558Q7q+0r5o1s/b8Ui5hQc60wpAzIU8YaA0sxF9LNMMwMRC2dOQm4qEz+kDzi1GwBZg8X8Q1lkAyMWw6ac0wtdI0BJytIs3DZw== 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=5H0wI6+uJGaRPBAubRwJVI2iQJgonhHPTKDcye/8Cfo=; b=meHYYsGvYJNx5RENepv05IyuxPDBWFTyfpv7PHyLmRqlLZs6H2XYTEEmqr6v6V5PCAOtiDHeUOOwL9hborSP8eDnEsGyazOtXdljCvSDlRxa8idG282nqAm1DcL4XDzF1M3vFi2PUUfeUamad9zum5KJboCFP3uOMZSWY1cF6as= Received: from PH8PR07CA0043.namprd07.prod.outlook.com (2603:10b6:510:2cf::28) by CH3PR12MB7740.namprd12.prod.outlook.com (2603:10b6:610:145::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Wed, 18 Sep 2024 06:19:01 +0000 Received: from SA2PEPF000015CA.namprd03.prod.outlook.com (2603:10b6:510:2cf:cafe::76) by PH8PR07CA0043.outlook.office365.com (2603:10b6:510:2cf::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 06:19:01 +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 SA2PEPF000015CA.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.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:19:01 +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; Wed, 18 Sep 2024 01:18:40 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 3/8] ASoC: amd: acp: use acp pci revision id for platform differntiation Date: Wed, 18 Sep 2024 11:45:35 +0530 Message-ID: <20240918061540.685579-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CA:EE_|CH3PR12MB7740:EE_ X-MS-Office365-Filtering-Correlation-Id: 3acdcbf9-8af4-46bb-c2bb-08dcd7a9c98d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?sX5A6ZY0fsT8CK/GahpSyDRNhWZDRji7hmCSSniApNoDwwLFPPWCIDqFoJr+?= =?us-ascii?Q?eZYUb6/KkvofIfV981WMxuH91e5gPHEv2WQXFFxcKczoyld021/aB5BQV+7H?= =?us-ascii?Q?zZPi7elFtey/Lj+gZEdbaqhtr+R8thbhYuanMJZH6iyU+cUdfVvFxvVma7h/?= =?us-ascii?Q?Kv5l5HUM9GWQ7uHchqjNEtT7QIzQtQ+x+3h3OgkgOowd2ao5SlLVsYseKvBg?= =?us-ascii?Q?ZbxmWJg90d9/A3vl5ZASUJ3oHOpkFLxyDcMaIzhshH04zpKOnReXz88fFiWf?= =?us-asc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CdePYFRff?= =?us-ascii?Q?aAYifBcPKxSNrwS03g77YEe0ciZx7qDv4eXDq42vjSL5n4lL+kggiqZUFzMs?= =?us-ascii?Q?vuhab+MnARQfFhlpxLdemBQgeXl8Upc9Go2Wx2Y1I/TWdX5yece/uz13cw+P?= =?us-ascii?Q?6KbMNz8dDIsSBG4xLVDoHtP8y1IYp0Kd4/5cydOFRmqfceEkSxApFlZPiCsM?= =?us-ascii?Q?WSDtH12s61SQ53v9Eepm2PTlBFIJuVJrbYVJhvau1HEYI0POvovGu0f2inTA?= =?us-ascii?Q?UaIcKeHoOI+RKPrwzm0BseI5FvBvPGsk?= 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)(36860700013)(82310400026)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:19:01.0098 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3acdcbf9-8af4-46bb-c2bb-08dcd7a9c98d 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: SA2PEPF000015CA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7740 Content-Type: text/plain; charset="utf-8" Store acp pci revision id value in 'acp_rev' variable. Use common ACP PCI revision id macros throughout the code for acp_rev check and remove unused macros for platform differentiation from common header file for acp platform driver. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-i2s.c | 38 +++++++++++++-------------- sound/soc/amd/acp/acp-legacy-common.c | 24 ++++++++--------- sound/soc/amd/acp/acp-pci.c | 7 +---- sound/soc/amd/acp/acp-pdm.c | 2 +- sound/soc/amd/acp/acp-platform.c | 6 ++--- 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 | 6 ++--- sound/soc/amd/acp/amd.h | 7 +---- 10 files changed, 43 insertions(+), 53 deletions(-) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 56ce9e4b6acc..515bf862deb5 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -59,9 +59,9 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *a= data, int dai_id) val |=3D BIT(1); =20 switch (chip->acp_rev) { - case ACP63_DEV: - case ACP70_DEV: - case ACP71_DEV: + case ACP63_PCI_ID: + case ACP70_PCI_ID: + case ACP71_PCI_ID: val |=3D FIELD_PREP(ACP63_LRCLK_DIV_FIELD, adata->lrclk_div); val |=3D FIELD_PREP(ACP63_BCLK_DIV_FIELD, adata->bclk_div); break; @@ -121,8 +121,8 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai= , u32 tx_mask, u32 rx_mas } =20 switch (chip->acp_rev) { - case ACP3X_DEV: - case ACP6X_DEV: + case ACP_RN_PCI_ID: + case ACP_RMB_PCI_ID: switch (slots) { case 1 ... 7: no_of_slots =3D slots; @@ -135,9 +135,9 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai= , u32 tx_mask, u32 rx_mas return -EINVAL; } break; - case ACP63_DEV: - case ACP70_DEV: - case ACP71_DEV: + case ACP63_PCI_ID: + case ACP70_PCI_ID: + case ACP71_PCI_ID: switch (slots) { case 1 ... 31: no_of_slots =3D slots; @@ -160,8 +160,8 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai= , u32 tx_mask, u32 rx_mas spin_lock_irq(&adata->acp_lock); list_for_each_entry(stream, &adata->stream_list, list) { switch (chip->acp_rev) { - case ACP3X_DEV: - case ACP6X_DEV: + case ACP_RN_PCI_ID: + case ACP_RMB_PCI_ID: if (tx_mask && stream->dir =3D=3D SNDRV_PCM_STREAM_PLAYBACK) adata->tdm_tx_fmt[stream->dai_id - 1] =3D FRM_LEN | (slots << 15) | (slot_len << 18); @@ -169,9 +169,9 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai= , u32 tx_mask, u32 rx_mas adata->tdm_rx_fmt[stream->dai_id - 1] =3D FRM_LEN | (slots << 15) | (slot_len << 18); break; - case ACP63_DEV: - case ACP70_DEV: - case ACP71_DEV: + case ACP63_PCI_ID: + case ACP70_PCI_ID: + case ACP71_PCI_ID: if (tx_mask && stream->dir =3D=3D SNDRV_PCM_STREAM_PLAYBACK) adata->tdm_tx_fmt[stream->dai_id - 1] =3D FRM_LEN | (slots << 13) | (slot_len << 18); @@ -534,7 +534,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *su= bstream, struct snd_soc_d reg_fifo_addr =3D ACP_I2S_TX_FIFOADDR(adata); reg_fifo_size =3D ACP_I2S_TX_FIFOSIZE(adata); =20 - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) phy_addr =3D ACP7x_I2S_SP_TX_MEM_WINDOW_START; else phy_addr =3D I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset; @@ -546,7 +546,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *su= bstream, struct snd_soc_d reg_fifo_addr =3D ACP_I2S_RX_FIFOADDR(adata); reg_fifo_size =3D ACP_I2S_RX_FIFOSIZE(adata); =20 - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) phy_addr =3D ACP7x_I2S_SP_RX_MEM_WINDOW_START; else phy_addr =3D I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset; @@ -561,7 +561,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *su= bstream, struct snd_soc_d reg_fifo_addr =3D ACP_BT_TX_FIFOADDR(adata); reg_fifo_size =3D ACP_BT_TX_FIFOSIZE(adata); =20 - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) phy_addr =3D ACP7x_I2S_BT_TX_MEM_WINDOW_START; else phy_addr =3D I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; @@ -573,7 +573,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *su= bstream, struct snd_soc_d reg_fifo_addr =3D ACP_BT_RX_FIFOADDR(adata); reg_fifo_size =3D ACP_BT_RX_FIFOSIZE(adata); =20 - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) phy_addr =3D ACP7x_I2S_BT_RX_MEM_WINDOW_START; else phy_addr =3D I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; @@ -588,7 +588,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *su= bstream, struct snd_soc_d reg_fifo_addr =3D ACP_HS_TX_FIFOADDR; reg_fifo_size =3D ACP_HS_TX_FIFOSIZE; =20 - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) phy_addr =3D ACP7x_I2S_HS_TX_MEM_WINDOW_START; else phy_addr =3D I2S_HS_TX_MEM_WINDOW_START + stream->reg_offset; @@ -600,7 +600,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *su= bstream, struct snd_soc_d reg_fifo_addr =3D ACP_HS_RX_FIFOADDR; reg_fifo_size =3D ACP_HS_RX_FIFOSIZE; =20 - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) phy_addr =3D ACP7x_I2S_HS_RX_MEM_WINDOW_START; else phy_addr =3D I2S_HS_RX_MEM_WINDOW_START + stream->reg_offset; diff --git a/sound/soc/amd/acp/acp-legacy-common.c b/sound/soc/amd/acp/acp-= legacy-common.c index be01b178172e..3f76d1f0a9e7 100644 --- a/sound/soc/amd/acp/acp-legacy-common.c +++ b/sound/soc/amd/acp/acp-legacy-common.c @@ -257,20 +257,20 @@ static int acp_power_on(struct acp_chip_info *chip) =20 base =3D chip->base; switch (chip->acp_rev) { - case ACP3X_DEV: + case ACP_RN_PCI_ID: acp_pgfsm_stat_reg =3D ACP_PGFSM_STATUS; acp_pgfsm_ctrl_reg =3D ACP_PGFSM_CONTROL; break; - case ACP6X_DEV: + case ACP_RMB_PCI_ID: acp_pgfsm_stat_reg =3D ACP6X_PGFSM_STATUS; acp_pgfsm_ctrl_reg =3D ACP6X_PGFSM_CONTROL; break; - case ACP63_DEV: + case ACP63_PCI_ID: acp_pgfsm_stat_reg =3D ACP63_PGFSM_STATUS; acp_pgfsm_ctrl_reg =3D ACP63_PGFSM_CONTROL; break; - case ACP70_DEV: - case ACP71_DEV: + case ACP70_PCI_ID: + case ACP71_PCI_ID: acp_pgfsm_stat_reg =3D ACP70_PGFSM_STATUS; acp_pgfsm_ctrl_reg =3D ACP70_PGFSM_CONTROL; break; @@ -322,7 +322,7 @@ int acp_init(struct acp_chip_info *chip) pr_err("ACP reset failed\n"); return ret; } - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) writel(0, chip->base + ACP_ZSC_DSP_CTRL); return 0; } @@ -337,7 +337,7 @@ int acp_deinit(struct acp_chip_info *chip) if (ret) return ret; =20 - if (chip->acp_rev < ACP70_DEV) + if (chip->acp_rev < ACP70_PCI_ID) writel(0, chip->base + ACP_CONTROL); else writel(0x01, chip->base + ACP_ZSC_DSP_CTRL); @@ -448,20 +448,20 @@ void check_acp_config(struct pci_dev *pci, struct acp= _chip_info *chip) u32 pdm_addr; =20 switch (chip->acp_rev) { - case ACP3X_DEV: + case ACP_RN_PCI_ID: pdm_addr =3D ACP_RENOIR_PDM_ADDR; check_acp3x_config(chip); break; - case ACP6X_DEV: + case ACP_RMB_PCI_ID: pdm_addr =3D ACP_REMBRANDT_PDM_ADDR; check_acp6x_config(chip); break; - case ACP63_DEV: + case ACP63_PCI_ID: pdm_addr =3D ACP63_PDM_ADDR; check_acp6x_config(chip); break; - case ACP70_DEV: - case ACP71_DEV: + case ACP70_PCI_ID: + case ACP71_PCI_ID: pdm_addr =3D ACP70_PDM_ADDR; check_acp70_config(chip); break; diff --git a/sound/soc/amd/acp/acp-pci.c b/sound/soc/amd/acp/acp-pci.c index f7450a5bd103..4b6ad7abc3ba 100644 --- a/sound/soc/amd/acp/acp-pci.c +++ b/sound/soc/amd/acp/acp-pci.c @@ -77,27 +77,22 @@ static int acp_pci_probe(struct pci_dev *pci, const str= uct pci_device_id *pci_id =20 res_acp =3D acp_res; num_res =3D ARRAY_SIZE(acp_res); - + chip->acp_rev =3D pci->revision; switch (pci->revision) { case 0x01: chip->name =3D "acp_asoc_renoir"; - chip->acp_rev =3D ACP3X_DEV; break; case 0x6f: chip->name =3D "acp_asoc_rembrandt"; - chip->acp_rev =3D ACP6X_DEV; break; case 0x63: chip->name =3D "acp_asoc_acp63"; - chip->acp_rev =3D ACP63_DEV; break; case 0x70: chip->name =3D "acp_asoc_acp70"; - chip->acp_rev =3D ACP70_DEV; break; case 0x71: chip->name =3D "acp_asoc_acp70"; - chip->acp_rev =3D ACP71_DEV; break; default: dev_err(dev, "Unsupported device revision:0x%x\n", pci->revision); diff --git a/sound/soc/amd/acp/acp-pdm.c b/sound/soc/amd/acp/acp-pdm.c index 22dd8988d005..48faafe724ed 100644 --- a/sound/soc/amd/acp/acp-pdm.c +++ b/sound/soc/amd/acp/acp-pdm.c @@ -47,7 +47,7 @@ static int acp_dmic_prepare(struct snd_pcm_substream *sub= stream, size_dmic =3D frames_to_bytes(substream->runtime, substream->runtime->buffer_size); =20 - if (chip->acp_rev >=3D ACP70_DEV) + if (chip->acp_rev >=3D ACP70_PCI_ID) physical_addr =3D ACP7x_DMIC_MEM_WINDOW_START; else physical_addr =3D stream->reg_offset + MEM_WINDOW_START; diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platf= orm.c index 3a7a467b7063..c772520227c7 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -270,9 +270,9 @@ static int acp_dma_open(struct snd_soc_component *compo= nent, struct snd_pcm_subs stream->substream =3D substream; chip =3D dev_get_platdata(dev); switch (chip->acp_rev) { - case ACP63_DEV: - case ACP70_DEV: - case ACP71_DEV: + case ACP63_PCI_ID: + case ACP70_PCI_ID: + case ACP71_PCI_ID: if (substream->stream =3D=3D SNDRV_PCM_STREAM_PLAYBACK) runtime->hw =3D acp6x_pcm_hardware_playback; else diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-remb= randt.c index 396434a45eea..af6005888c82 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -197,7 +197,7 @@ static int rembrandt_audio_probe(struct platform_device= *pdev) return -ENODEV; } =20 - if (chip->acp_rev !=3D ACP6X_DEV) { + if (chip->acp_rev !=3D ACP_RMB_PCI_ID) { dev_err(&pdev->dev, "Un-supported ACP Revision %d\n", chip->acp_rev); return -ENODEV; } diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index 5e3f730aa6bf..65782023435e 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -157,7 +157,7 @@ static int renoir_audio_probe(struct platform_device *p= dev) return -ENODEV; } =20 - if (chip->acp_rev !=3D ACP3X_DEV) { + if (chip->acp_rev !=3D ACP_RN_PCI_ID) { dev_err(&pdev->dev, "Un-supported ACP Revision %d\n", chip->acp_rev); return -ENODEV; } diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c index f325c374f228..099e2df5558d 100644 --- a/sound/soc/amd/acp/acp63.c +++ b/sound/soc/amd/acp/acp63.c @@ -207,7 +207,7 @@ static int acp63_audio_probe(struct platform_device *pd= ev) return -ENODEV; } =20 - if (chip->acp_rev !=3D ACP63_DEV) { + if (chip->acp_rev !=3D ACP63_PCI_ID) { dev_err(&pdev->dev, "Un-supported ACP Revision %d\n", chip->acp_rev); return -ENODEV; } diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index 68d2590e1a4e..0cd3daf677f5 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -175,8 +175,8 @@ static int acp_acp70_audio_probe(struct platform_device= *pdev) } =20 switch (chip->acp_rev) { - case ACP70_DEV: - case ACP71_DEV: + case ACP70_PCI_ID: + case ACP71_PCI_ID: break; default: dev_err(&pdev->dev, "Un-supported ACP Revision %d\n", chip->acp_rev); @@ -209,7 +209,7 @@ static int acp_acp70_audio_probe(struct platform_device= *pdev) adata->num_dai =3D ARRAY_SIZE(acp70_dai); adata->rsrc =3D &rsrc; adata->machines =3D snd_soc_acpi_amd_acp70_acp_machines; - if (chip->acp_rev =3D=3D ACP70_DEV) + if (chip->acp_rev =3D=3D ACP70_PCI_ID) adata->platform =3D ACP70; else adata->platform =3D ACP71; diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index 854269fea875..c82e438a1712 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -16,14 +16,9 @@ #include #include =20 +#include "acp_common.h" #include "chip_offset_byte.h" =20 -#define ACP3X_DEV 3 -#define ACP6X_DEV 6 -#define ACP63_DEV 0x63 -#define ACP70_DEV 0x70 -#define ACP71_DEV 0x71 - #define DMIC_INSTANCE 0x00 #define I2S_SP_INSTANCE 0x01 #define I2S_BT_INSTANCE 0x02 --=20 2.34.1 From nobody Fri Nov 29 15:36:08 2024 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2048.outbound.protection.outlook.com [40.107.236.48]) (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 5E56215EFA1; Wed, 18 Sep 2024 06:19:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.236.48 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640367; cv=fail; b=psDFvQ3tG3dBQfpx+KgMkpZmiKPk6KlgZKAtdXo/l1io3Q5Nb4mKmtzm3UaHgYNcfmFv/sWXz5IBJHlZNJkbwMGAmZXBhge225jzHf1rhaWbQzK3zitppw5eDUmcGbaadXATyuE9BPjmKUap59EErUQg6hwnJl+z2EktRmkXmkY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640367; c=relaxed/simple; bh=PEVLJXQU6KRun07b6HhrFMfLrce+M0wlO03pfzhboMM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=e5I4/CmeASU1wh6/ryajF/7RxsnyRVfbZNQpKvQAw4fUjGqFgw00ToPCdhlLwdH0nmKYNMdlkx87j7yX+ekP9mrfYVWfC/ewtxHUOl+Iz+BOZOGphZf7L/IVEhglS5R8rUpy0AYaqR0KVLU7kY7uIA/Lxg6OLjP/owbinrSuJLA= 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=eynLzljZ; arc=fail smtp.client-ip=40.107.236.48 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="eynLzljZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=yfSOGOu3MxbTtp1dgNYyMJrSiKJPLDTDFPxP7FPlg6uJHiHc88GnquE1jIL2mCpmG7ns4KilWOdhkOM9hLVI8Ff6YQFufrBz6KKyfY4ABGZTaKkvQABra9tiMdrGArTJbFqRRj/LAlYMLPUdRNhyBPaL+7Gk3/pctKyL/L7B/k7LrEnLjSQyOmC3RqrWnvtFCma1hXK5G0h16Qq4p3vWFHylIcCyWV/uZE7hsqp3m29HJMg8FITIJPZ4uqiOcEwjmaw3hJIUqn60Cz5konyYS/x1IrhIsqhP/wwPt8/hfXpPdiN0uPCwN8GFmEcO1cYQk0FHJHuUhAb3L4gn9CSxlQ== 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=YbMtsb0Y98ZJcqNBWX4z+r9vW2AG6RYWKe+IgiqUbYY=; b=u2j2V9PgmBfQxy8Qk53L9EwTSaT8MGVDzopnn2BKwBWUcTHmOBff70qUVlT05Z7diCEJHrG1ZIdx9TUzGcgdAuM+JXdd7wedvXp0eJwVYX0+rIic83lTg+RbDsYkfz8jlFZV0AHtOT+cf9Sweq3n4CX188ibypFkzupv8d5lEJFS6N7Hh/tlIl8VMYQa3iMp1Ymll9KzvW6O1SWqGNacvOqk76DVF+HV6ktrEpmlQiZI3WlPfC1Hd2RAbgBLG+4tY1HI1quA2E3xyRW1F1jAVSEpn+56cyk7V6VFpi0rDkaSg+jlsO/YKK0QF7y3uXYgS6NWAPI+drgG+SJ+hwAHLA== 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=YbMtsb0Y98ZJcqNBWX4z+r9vW2AG6RYWKe+IgiqUbYY=; b=eynLzljZ51MD20BVh1O8DKOa8yxCFE6cUtb3SzJWmISt2j+NhGgjlGJNRcFxOd3wgq2Tp6mOzixHOTQ9aLoYdQ8d0Mdz9iIiYJ2gTXIAOcTG0Ty/HGnY4p+UoogVzu3xiezPoWs01gYaRyKEBX7tbeopnecnznMnFiFWxbBMvbo= Received: from SN7PR18CA0007.namprd18.prod.outlook.com (2603:10b6:806:f3::27) by MN2PR12MB4079.namprd12.prod.outlook.com (2603:10b6:208:1d5::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24; Wed, 18 Sep 2024 06:19:22 +0000 Received: from SA2PEPF000015CA.namprd03.prod.outlook.com (2603:10b6:806:f3:cafe::8f) by SN7PR18CA0007.outlook.office365.com (2603:10b6:806:f3::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 06:19:21 +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 SA2PEPF000015CA.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.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:19:21 +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; Wed, 18 Sep 2024 01:18:58 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 4/8] ASoC: amd: acp: store acp pci rev id in platform driver private structure Date: Wed, 18 Sep 2024 11:45:36 +0530 Message-ID: <20240918061540.685579-5-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF000015CA:EE_|MN2PR12MB4079:EE_ X-MS-Office365-Filtering-Correlation-Id: dcd128db-4d4c-4a52-22d8-08dcd7a9d5b5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|82310400026|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qCtPrhF2S6bIHdmUmjA38mnigMpOvReUlpBzxP89e3I0KyAwCor7+dZucrDU?= =?us-ascii?Q?W+CAHqZkb6QpK9vrvIcJ8aoalCmnG0lOUxKTn5Ww9kB3zKecKrc0QufrMkw3?= =?us-ascii?Q?WaUf5vnks2b602oSQngmzKNOG2eEFkNLCO9KddnKNNvb4mau6T5mkEDK7Vl3?= =?us-ascii?Q?wnV13UKiG3uKOOAq075Q2SD3ugyo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us-ascii?Q?CBxL90nNSN0Qm6Lxj8Geps5DyEO/70gwoK4QpwpXZ/5+IQPVl55F9SoYb8Qs?= =?us-ascii?Q?LDhNLNmx3BTBg3Xn2UXL+ROsB24QUgTHCAKYjU7GfUEHUIxriQqiZu7uyCFR?= =?us-ascii?Q?OER2+Vd6uFxC2VZ+tFwKqSF137adX9w4AFgbTQ9bNqhOQa+Xs0gjGhAnYgoF?= =?us-ascii?Q?XEFJXo7LkvqCbqGTwj74KqndTfzfpt8idGc/4q9BYaHBMyGfMOem+AAV48/i?= =?us-ascii?Q?jwRTMOjpHgKXe6JFC4AYhNPr1BAqR3mt1jQSqpyhqkjrcqjuJka9yIpLjXje?= =?us-ascii?Q?D1MnwAbw4eHwt02mGgyCYfiXVFJd?= 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)(36860700013)(82310400026)(376014)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:19:21.3693 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dcd128db-4d4c-4a52-22d8-08dcd7a9d5b5 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: SA2PEPF000015CA.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4079 Content-Type: text/plain; charset="utf-8" Store acp pci revision id in platform driver private structure for all acp varaints. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-rembrandt.c | 1 + sound/soc/amd/acp/acp-renoir.c | 1 + sound/soc/amd/acp/acp63.c | 1 + sound/soc/amd/acp/acp70.c | 1 + sound/soc/amd/acp/amd.h | 1 + 5 files changed, 5 insertions(+) diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-remb= randt.c index af6005888c82..065ac13b2220 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -228,6 +228,7 @@ static int rembrandt_audio_probe(struct platform_device= *pdev) adata->num_dai =3D ARRAY_SIZE(acp_rmb_dai); adata->rsrc =3D &rsrc; adata->platform =3D REMBRANDT; + adata->acp_rev =3D chip->acp_rev; adata->flag =3D chip->flag; adata->is_i2s_config =3D chip->is_i2s_config; adata->machines =3D snd_soc_acpi_amd_rmb_acp_machines; diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index 65782023435e..f372a56a0a17 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -186,6 +186,7 @@ static int renoir_audio_probe(struct platform_device *p= dev) adata->num_dai =3D ARRAY_SIZE(acp_renoir_dai); adata->rsrc =3D &rsrc; adata->platform =3D RENOIR; + adata->acp_rev =3D chip->acp_rev; adata->flag =3D chip->flag; =20 adata->machines =3D snd_soc_acpi_amd_acp_machines; diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c index 099e2df5558d..f0c516ccf96b 100644 --- a/sound/soc/amd/acp/acp63.c +++ b/sound/soc/amd/acp/acp63.c @@ -238,6 +238,7 @@ static int acp63_audio_probe(struct platform_device *pd= ev) adata->num_dai =3D ARRAY_SIZE(acp63_dai); adata->rsrc =3D &rsrc; adata->platform =3D ACP63; + adata->acp_rev =3D chip->acp_rev; adata->flag =3D chip->flag; adata->is_i2s_config =3D chip->is_i2s_config; adata->machines =3D snd_soc_acpi_amd_acp63_acp_machines; diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index 0cd3daf677f5..82c26e4fefc1 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -209,6 +209,7 @@ static int acp_acp70_audio_probe(struct platform_device= *pdev) adata->num_dai =3D ARRAY_SIZE(acp70_dai); adata->rsrc =3D &rsrc; adata->machines =3D snd_soc_acpi_amd_acp70_acp_machines; + adata->acp_rev =3D chip->acp_rev; if (chip->acp_rev =3D=3D ACP70_PCI_ID) adata->platform =3D ACP70; else diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index c82e438a1712..dcfc29b2f072 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -177,6 +177,7 @@ struct acp_dev_data { struct device *dev; void __iomem *acp_base; unsigned int i2s_irq; + unsigned int acp_rev; /* ACP Revision id */ =20 bool tdm_mode; bool is_i2s_config; --=20 2.34.1 From nobody Fri Nov 29 15:36:08 2024 Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2089.outbound.protection.outlook.com [40.107.212.89]) (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 7A85A13CA81; Wed, 18 Sep 2024 06:21:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.89 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640521; cv=fail; b=ewzIgCo9mTpDcTL3WojnpRZzuqd8SbTjyOzexyV/hhvwTBHFsi5tL4UZCBRnXe8uUY9yrJT9fx4dpC3pVODLVip1/x1BFAcdNGg3GwmDI7o3q1dunlj5zlnpFXbE9kAb1lBANzh3YRTcm9OewmPdjl7LJZ67nvGDjTD03DZ8LVE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640521; c=relaxed/simple; bh=hOezVq1+7iN2CEX2zu6ii4h12kDi7pUnqfq+F/a582U=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eEa0TZUxsE2xgKnKxoHRQWuaId/PpFJNuj5zsQSvEi1dixoQ+buI/DZi+EtRJYIGhtoIPyV1La2AOydqSOW7J9xt7Tb3M1fAYgRF7HRYMH4JQu4FF7TdiXpJGIl+Uxi6CDkyJa7MZKSPQYMBv1Deg0qU1MQQ+7LUIpdCasT7xpk= 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=HyrZoeCm; arc=fail smtp.client-ip=40.107.212.89 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="HyrZoeCm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=PdjEk3/BDxtLZAc4OAeiaAvvdK2aCJvp+loNLAqSSL+e0nzcRp4MWzuSEyHKv8R4wXn9I48jEciwxwlMmdnDUN/ODQhoyKN1nduc7S1pi3i26xqjApMtMVFXatP9UT+rmvORl17+K99om/QZnKFXZfuF12FaFu1Nqjfp74oIfhrsgETukDr2jAXI8zTKxdYiy9joXLNSJeAXH6mTbXARfqiwddklq2cpSjS6+sWCUFwwus/frdG+KadPFz6Lt1xr1sesyK+Ea+RUKsQH/ubJAnm/7J+mJhZCE6WDU2XewQinSO8MMaF4/XFhNcEwbii1HQylwQJK3UMORnkIkwjSGQ== 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=9DbNpM1+Et8OoKgJBCBnOtnExxvpnwQEy2lpYYAnl4c=; b=Mz55wS4I92cCrYHL7Gy41CyO+2m2AjXS5xFeumBG0wAR3ZgKiE3rATOvEu4icbRt4ciFt0OLgBUVjdsVVulmR9ipkKmRQqzHxrVeVuYz9pOkMNDFL2EHNHMgSVi+7HiHlKoLmLNR4ZUoBi1d4MAyQJw6FVXm3rBzAFCDUD10Z4StLAuvBC5IcLiLcO6rJA+J5IpvDilPnHZK/nwqjBcc2UCex9/nPV1hdERBjagpJblstkpj0U7tG/Lz1oHmYBFPA4LEz87A0/6isAFLvdPO7QF5IZR+ufNsScy4SsGpx4asiCnDb86XE45u99qZ6JskUwpO4OOLEnxW4eW0BgD1ZA== 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=9DbNpM1+Et8OoKgJBCBnOtnExxvpnwQEy2lpYYAnl4c=; b=HyrZoeCmt2w0Fg3zevUFCASuyx/5y1Nu/b53OYCJWrFpbyQPevOtpZ25OwUpqHw/Fsus+efd0w3NfkccSL3n5jDPlfUmDZqQrd7FjpTZsekdLEQNvTvsAItu1JIV+c0Rjij1rwV41l7GPodV7ooajQPqtxgAN67rWdxdD8Jt7Dw= Received: from BN9PR03CA0523.namprd03.prod.outlook.com (2603:10b6:408:131::18) by PH7PR12MB9150.namprd12.prod.outlook.com (2603:10b6:510:2eb::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.23; Wed, 18 Sep 2024 06:21:53 +0000 Received: from BN1PEPF00004681.namprd03.prod.outlook.com (2603:10b6:408:131:cafe::69) by BN9PR03CA0523.outlook.office365.com (2603:10b6:408:131::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 06:21:53 +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 BN1PEPF00004681.mail.protection.outlook.com (10.167.243.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:21:53 +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; Wed, 18 Sep 2024 01:19:21 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 5/8] ASoC: amd: acp: pass acp pci revision id as platform data Date: Wed, 18 Sep 2024 11:45:37 +0530 Message-ID: <20240918061540.685579-6-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004681:EE_|PH7PR12MB9150:EE_ X-MS-Office365-Filtering-Correlation-Id: 8e8a6438-b89a-4f56-7ef9-08dcd7aa304b X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|36860700013|1800799024|82310400026|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?hOeKxHs3bBZ99W+lEZ0G7cehIkI7N3C+RZmQe0sxgAEzOZZPAja49FXU9eCA?= =?us-ascii?Q?7krQEPPL2YGJcAorrw7vVbag/zQJrR3pdYxnRLhhAB4sQX1kCz1CBitqqBBT?= =?us-ascii?Q?VJdIsECaw2Fxl4cDXlRLhjnuu8dsbK5WVHTTfI0URyo+ChhobeEShKf0yd2u?= =?us-ascii?Q?XH0S6GzvJzfmkkave9wyD5W2SJyktTdutDLPRlsnM26MZBL8W7/S8w90kqmD?= =?us-ascii?Q?qFpwEor6hX4Y1o8Hai25RUQk3K6V/Hq1kogPf8nZTUiP3w1xUjTf3XqRT2Lf?= =?us-ascii?Q?/vLhYG+1T+WKk76q76JZ4LnKxXy+oD3GyXeSlLulU+5uAjfxYkL1ObvNKxbg?= =?us-ascii?Q?ux+Hchqr3wK2A5G96nSXN6H+D4USE34SFI6ecvcXT2sSVStZRN6gUvbR+VAX?= =?us-ascii?Q?OrW9n8SWvHwDliFsz8XMCTXcIMpSJRDnlfxUzTI+koNqqA6knr0bYt9BpGQx?= =?us-ascii?Q?ONAzC8NW/jEYhOZ9gUzDDeeFZCZKgf5vU+8/FLVFiHr8B8mKMQH3PHOOXRm+?= =?us-ascii?Q?phCCqgl2Ybltg5LsWZf45XJ+9L3b/xHLkhb93yrRI8DNqqqxXDvP8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ptFYV/bdJI?= 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)(36860700013)(1800799024)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:21:53.3809 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8e8a6438-b89a-4f56-7ef9-08dcd7aa304b 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: BN1PEPF00004681.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB9150 Content-Type: text/plain; charset="utf-8" Pass acp pci revision id as platform data to machine driver instead of 'platform' variable when ACP PDM configuration is selected. 'acp_rev' should be retrieved from mach params revision id for other configuration. Modify the conditional check for the same. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-legacy-mach.c | 5 +++-- sound/soc/amd/acp/acp-platform.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sound/soc/amd/acp/acp-legacy-mach.c b/sound/soc/amd/acp/acp-le= gacy-mach.c index 2a59f7916e15..3526fbe2c84d 100644 --- a/sound/soc/amd/acp/acp-legacy-mach.c +++ b/sound/soc/amd/acp/acp-legacy-mach.c @@ -172,9 +172,10 @@ static int acp_asoc_probe(struct platform_device *pdev) goto out; } if (!strcmp(pdev->name, "acp-pdm-mach")) - acp_card_drvdata->platform =3D *((int *)dev->platform_data); + acp_card_drvdata->acp_rev =3D *((int *)dev->platform_data); + else + acp_card_drvdata->acp_rev =3D mach->mach_params.subsystem_rev; =20 - acp_card_drvdata->acp_rev =3D mach->mach_params.subsystem_rev; dmi_id =3D dmi_first_match(acp_quirk_table); if (dmi_id && dmi_id->driver_data) acp_card_drvdata->tdm_mode =3D dmi_id->driver_data; diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platf= orm.c index c772520227c7..a6e5cb263377 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -114,7 +114,7 @@ int acp_machine_select(struct acp_dev_data *adata) int size, platform; =20 if (adata->flag =3D=3D FLAG_AMD_LEGACY_ONLY_DMIC) { - platform =3D adata->platform; + platform =3D adata->acp_rev; adata->mach_dev =3D platform_device_register_data(adata->dev, "acp-pdm-m= ach", PLATFORM_DEVID_NONE, &platform, sizeof(platform)); --=20 2.34.1 From nobody Fri Nov 29 15:36:08 2024 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2056.outbound.protection.outlook.com [40.107.92.56]) (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 BF71414C5BA; Wed, 18 Sep 2024 06:22:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.92.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640550; cv=fail; b=BSIHyG4v0fw+Anhrh2UQIBNn3mkC5F8Jx1DrNLPHMBrYaenduhEwKM4mKup62IkwwQamZXKeGYEu6obeaITAaonsh0QeY++4EBvGX3d8UMtxHk3Dby1Nzmo0e67mkcNjLNnqaouvS4ZwKlmHUprYckE9aTAdbvVm8QmzmWZlLaU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640550; c=relaxed/simple; bh=NWz8knI7us9C5irlKL+Dy3yWgxoAxx/m4OHKjnCG1s4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=MvegeAyM6AjZcFcLXvBP12GfBylefDa5BXpIX4DVsRA+C64m4VbD1LxTO44hsv5LXUhbpZaqZHLTO4VRakHZh1Uj4H/TVcLovRSSWZLayd5bxC9MjqqoKqmOnnHf/QlEEmHVnbq8zvTrwWkHx3C2y6HmDjDqoVlOmLRV9p64xok= 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=x9N70rox; arc=fail smtp.client-ip=40.107.92.56 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="x9N70rox" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s92eI1Ajtb8vlnEoFjwkN6Q4Ti+xsDKwCLP6LzQGdk45u8hzFoTFJYaG/nyggCUccrkO9qNt6A9MhklHKdyQZ/7c51dHVXUHT3sUJFWCtz0u2Q3PtB2lck32x0Ki0Acr2GY7rglfYjI3BBXp8L3+mjYKhufn/7DLhq/3pjYNshw3sgNNioOPf6don+ruWfit2otBElFKK23bZ8UwOZUILJtslfy98g9huaMxl5sS+7MtlV+m3GMqSWS5DorL+DTY6gRuBDLRkBkBCewlyJkKk/bAFKxRdYnMfmnAHWaRo1nPhJNGOQo2wBdebZcWW19Dc+63Xt3ozAw9PSQvc/wLhw== 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=yYyEICfYiLb5ugOa5VANcuKbNB31s+AMUuuyEvTrqH4=; b=xQDy6TKKoACpVp0TF/9D2RlWLZXr/q5i/i1BWgS2mW35MwSg7HMbzpv3lbBh2jn0ahMrNLZWkaNRBdGp5+stZTxqUIXQyvUjEGVx5aiRmpcZGKCHF57WmrdNm5rDEZ01fInip+lw0eVGzhc0Oq1xHLVVnQ7OWbisLfm4g6eMKdhfGPvs1cYgLCyBRbIXh8/fTnPRUzfWQmL+iyTMWhEvx0Cw0RftJSbEgq8M7n0oP9I/IinxUiRepYHyDmrLzyh0+kRg2D0NOi4THkotzg3aHj8RiRSOToVc6sXbvhUeJI3nRkMbaxWytIgvnkLxZowRSaLnf4G5HbaLpbRCFTu3OQ== 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=yYyEICfYiLb5ugOa5VANcuKbNB31s+AMUuuyEvTrqH4=; b=x9N70rox1wdzKajR0ZT9f+UEgQmNFqfZzqFdzNMX4TRdnTPW/cx5kP8IQEpB9dt+bE0ICBsadMCbawcdn8uksMnY+2rF27nvem0DPpkaSva5iYnkhA0TWn9ZNPNKOxJGxmi/a498U+uetyG6KY56e9H48uDw8QwQG5wRpvuK1l0= Received: from BN0PR02CA0026.namprd02.prod.outlook.com (2603:10b6:408:e4::31) by SA0PR12MB7461.namprd12.prod.outlook.com (2603:10b6:806:24b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Wed, 18 Sep 2024 06:22:23 +0000 Received: from BN1PEPF00004682.namprd03.prod.outlook.com (2603:10b6:408:e4:cafe::6) by BN0PR02CA0026.outlook.office365.com (2603:10b6:408:e4::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 06:22:23 +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 BN1PEPF00004682.mail.protection.outlook.com (10.167.243.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:22:22 +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; Wed, 18 Sep 2024 01:21:12 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 6/8] ASoC: amd: acp: remove unused variable from acp_card_drvdata structure Date: Wed, 18 Sep 2024 11:45:38 +0530 Message-ID: <20240918061540.685579-7-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004682:EE_|SA0PR12MB7461:EE_ X-MS-Office365-Filtering-Correlation-Id: bf7f1e8c-87bc-42d9-dd24-08dcd7aa41e6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?+tkJjtZbePJ2kTCGLNz2FA/bnIk9j69BiozN7TTDzQQvnLZ11Eh9NwVCcylN?= =?us-ascii?Q?Mb9C8MZfGM5jc/sq+ufsGjBZxxZNaHtr8ThVaQOFSETQCAL0tSO1s+4OhLqH?= =?us-ascii?Q?XpvWpqlFN2TG1v4DC1r+ye7v+JD+yoa4rcrh61WSZhulPJD4BqfuuAK+lcfd?= =?us-ascii?Q?qB14c1BYbQ1WmKKW9XwL5LR0mq5iYmsqmJmJbf8bgtNZQyIYVwDtKca0qnp6?= =?us-ascii?Q?G1TpetjoY3xvpzXvhPp7cO8hCBMyafU0keZEbCVOxEyAIcImINdlq9znLKzb?= =?us-ascii?Q?cFSinSnYDKeBHjtwJmWLWHk788nrEWckkW4lXZGDPLmKzu2L8R+RmNChRo7z?= =?us-ascii?Q?1LBze4PZgwwQr+GqGH8F6OjveDYKs423StQZ67m3VCxBEJuwp4CHJC24z7cy?= =?us-ascii?Q?1egp1+ZoGVwWytFhjkVnYZgaFfQiDlY14/h4f5YjH7ALYklpS9Q6yEui7w48?= =?us-ascii?Q?wDZ5ZSva2g/vuYRgTC/pE1S+p1cEr3Vp1XHVafgZoWTuesfBYCg+AKAto6FQ?= =?us-ascii?Q?j3Clb+vuqYm8jMKr9pjJ3E53O5OY7gzpF3QsWpuBsIC5AQQkfmk9a2Zib2SI?= =?us-ascii?Q?s97XQ+8lHFHCJcPambwmDt2D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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)(376014)(1800799024)(36860700013)(82310400026);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:22:22.8891 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf7f1e8c-87bc-42d9-dd24-08dcd7aa41e6 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: BN1PEPF00004682.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7461 Content-Type: text/plain; charset="utf-8" Remove unused 'platform' variable from acp_card_drvdata structure. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-legacy-mach.c | 3 --- sound/soc/amd/acp/acp-mach.h | 1 - sound/soc/amd/acp/acp-sof-mach.c | 4 ---- 3 files changed, 8 deletions(-) diff --git a/sound/soc/amd/acp/acp-legacy-mach.c b/sound/soc/amd/acp/acp-le= gacy-mach.c index 3526fbe2c84d..45613a865d2b 100644 --- a/sound/soc/amd/acp/acp-legacy-mach.c +++ b/sound/soc/amd/acp/acp-legacy-mach.c @@ -57,7 +57,6 @@ static struct acp_card_drvdata es83xx_rn_data =3D { .dmic_cpu_id =3D DMIC, .hs_codec_id =3D ES83XX, .dmic_codec_id =3D DMIC, - .platform =3D RENOIR, }; =20 static struct acp_card_drvdata max_nau8825_data =3D { @@ -68,7 +67,6 @@ static struct acp_card_drvdata max_nau8825_data =3D { .amp_codec_id =3D MAX98360A, .dmic_codec_id =3D DMIC, .soc_mclk =3D true, - .platform =3D REMBRANDT, .tdm_mode =3D false, }; =20 @@ -80,7 +78,6 @@ static struct acp_card_drvdata rt5682s_rt1019_rmb_data = =3D { .amp_codec_id =3D RT1019, .dmic_codec_id =3D DMIC, .soc_mclk =3D true, - .platform =3D REMBRANDT, .tdm_mode =3D false, }; =20 diff --git a/sound/soc/amd/acp/acp-mach.h b/sound/soc/amd/acp/acp-mach.h index 2b6b8b3e1b94..414d0175988b 100644 --- a/sound/soc/amd/acp/acp-mach.h +++ b/sound/soc/amd/acp/acp-mach.h @@ -79,7 +79,6 @@ struct acp_card_drvdata { unsigned int bt_codec_id; unsigned int dmic_codec_id; unsigned int dai_fmt; - unsigned int platform; unsigned int acp_rev; struct clk *wclk; struct clk *bclk; diff --git a/sound/soc/amd/acp/acp-sof-mach.c b/sound/soc/amd/acp/acp-sof-m= ach.c index 49aadbadb7e1..63a9621ede6d 100644 --- a/sound/soc/amd/acp/acp-sof-mach.c +++ b/sound/soc/amd/acp/acp-sof-mach.c @@ -46,7 +46,6 @@ static struct acp_card_drvdata sof_rt5682s_rt1019_data = =3D { .hs_codec_id =3D RT5682S, .amp_codec_id =3D RT1019, .dmic_codec_id =3D DMIC, - .platform =3D RENOIR, }; =20 static struct acp_card_drvdata sof_rt5682s_max_data =3D { @@ -56,7 +55,6 @@ static struct acp_card_drvdata sof_rt5682s_max_data =3D { .hs_codec_id =3D RT5682S, .amp_codec_id =3D MAX98360A, .dmic_codec_id =3D DMIC, - .platform =3D RENOIR, }; =20 static struct acp_card_drvdata sof_nau8825_data =3D { @@ -66,7 +64,6 @@ static struct acp_card_drvdata sof_nau8825_data =3D { .hs_codec_id =3D NAU8825, .amp_codec_id =3D MAX98360A, .dmic_codec_id =3D DMIC, - .platform =3D REMBRANDT, .soc_mclk =3D true, }; =20 @@ -77,7 +74,6 @@ static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data= =3D { .hs_codec_id =3D RT5682S, .amp_codec_id =3D RT1019, .dmic_codec_id =3D DMIC, - .platform =3D REMBRANDT, .soc_mclk =3D true, }; =20 --=20 2.34.1 From nobody Fri Nov 29 15:36:08 2024 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2086.outbound.protection.outlook.com [40.107.237.86]) (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 6A7F1149C70; Wed, 18 Sep 2024 06:22:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.86 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640565; cv=fail; b=EDKyQbljjWkRZpF1lp+oMwKoKL9/KCbqL4GyYQEAsNmQRdyXDayxO7/Jtsp6f0HxjUZ9sCafDKUgce7GOg0m7+3oaLMgaT3LvpnsqhJFgVBP0gI22TE5FiSjc8JS88ab6XSSGW71i76rFurbf8cONGGiYQur5hBzizoOySQnHB8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640565; c=relaxed/simple; bh=WjTAS1K2L4UWOtNZuASNRs3zvxWdgoRLi2uw7rJAiE4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Qd3ljUwzMsVC7ndW033eBHKpnBMa6CT5D0fdcbBy5TEKA5uX0NesxexcoHDDu1A1fuZcuCm1aKl+BBBWtAubnfUOpvRg5rGB2cZQ7r/wHk4P81Iuix9PB2NHDDvifsJpkiDaCdSRO2pQmAiPmvQS6pM3e/DJ8IW4s8Lmh6psC68= 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=XQnDn5TK; arc=fail smtp.client-ip=40.107.237.86 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="XQnDn5TK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pTZwGz4Ntmh/lUwQKHseAOTCXDVeu27DzUaGSnNDGcoXLo11YLuoVFLxjIKu0nSVe3liRYgqZqUCQGmNH9UwOwDbXN/hlLZXSWq7qoH4ICsGtBSQ3Y5B9j0dXvSmwRsZ05E1Z4lXSYYP01taFS7KlgkQ3jIsUBdbHYcqiC7BJRCrqRGNw16DwFjRfmm1RDzAFbebO7v4BilK6uvW2bALZcSxHzUh28OOleWrjmh1xR+8v5uKn/SOwaahfPzamIx25GNT/gErpNQ77Iym5SQbDJVhuV43uqQpcJIDVfwvG1U2nlEdV7Wq7C0yogGhl3NMQBRy28OPNQIOrcPYpzKnow== 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=xACMO2b4h4TWup/kb8NMxouIM6azWSC3MNSN6Lodgsg=; b=l2cL2qSYb0/MyENWz6VlLQ9Fav9//jj7eCNn2IPaSXoGLQ9dJmnu0kujFbYwbwHRgeaAw2BCC1RgZFdgSmRDF8N+48btJDtI8823HuOF7RAXPcXm97FEmvbz7EVF8a9xVRTe6JcXJFAwjkfixFxWh6AnE9JR9JdN3Rge0mG7Z6D/OFIe9h2GtXqfEZBG37SZBDmPH7+SFnd1YsfbGxGo3dXwe9v/4hC6/ZxqbAB2SyYjN67yfHRBCo5Z+QKLBPnFSLjn4LwkBgi4SqU5fUsxeMlxGWe9tMyM6Uxm6JyglcRwrfnP46FT0RFlrTJyOm7a/CP+20S7RpPsDMlEWj0p9g== 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=xACMO2b4h4TWup/kb8NMxouIM6azWSC3MNSN6Lodgsg=; b=XQnDn5TKMjXzuVJOyhqbxMFV3rUqzDpqfwbmRkb1kQJSjgH3MoEQ1h0v3ZzHoXmNMuM0Iv8ChMo2NWqX51dmtLbjTyIAp1hDoMROjh3WVEKD6mQBnGWRQdBPOTyJ/YVQzkMfgIRYd53BB6SR9LyhwUKYlqFLw0ESgOHn677Cg+k= Received: from LV3P220CA0013.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:234::34) by MN0PR12MB5737.namprd12.prod.outlook.com (2603:10b6:208:370::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.17; Wed, 18 Sep 2024 06:22:38 +0000 Received: from BN1PEPF00004685.namprd03.prod.outlook.com (2603:10b6:408:234:cafe::d2) by LV3P220CA0013.outlook.office365.com (2603:10b6:408:234::34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.30 via Frontend Transport; Wed, 18 Sep 2024 06:22:38 +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 BN1PEPF00004685.mail.protection.outlook.com (10.167.243.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:22:37 +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; Wed, 18 Sep 2024 01:21:52 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 7/8] ASoC: amd: acp: replace adata->platform conditional check Date: Wed, 18 Sep 2024 11:45:39 +0530 Message-ID: <20240918061540.685579-8-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004685:EE_|MN0PR12MB5737:EE_ X-MS-Office365-Filtering-Correlation-Id: 21fa4ea4-5ea7-4409-6df8-08dcd7aa4ade X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?zggmbvynBbTXRwPSf9/LFmVPKgU+CgAo8M7iH8GSyUKOXq20dFidXycWUZ9j?= =?us-ascii?Q?LOP9FjBV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huWRyJIADP0oN?= =?us-ascii?Q?vUYE639bB/klkqc/el54rBsNtR1x70xQxJAz6q6eGI2HQ1j04VdM/n2AMrmk?= =?us-ascii?Q?JZ/cMqPht7S2xV+ZG9xL4RaLTGFpOqH6F2g2lFWe37LEDDTDIdossYwAnq5i?= =?us-ascii?Q?63Tf7xC53I2Uqpx2WlqjX5Ly4/1/oHXaoX/gcgBSyzEvChd1CpZiXOWvPCFr?= =?us-ascii?Q?pxmq17rTNjFh6nmYMc6QyhI77ZsM/o/1FUsy0O8r7CCHf9o1MJVcZLWdmYkd?= =?us-ascii?Q?f2iBymusCBGNvSoY6j1TX4UJme1l4nF+jhOjfFSA6XjiuVZAGNNr9x63XDDg?= =?us-ascii?Q?ZLNiDzloSfpeiSG64DU6bRUppZ8DBjXiokGDnq4Fj4HTugzV9sotMdaDPRGu?= =?us-ascii?Q?0ztaqGbcelIphlTIaxnwfpEol7MR7uLBAx3JLvElrk0/gblbqoTCkwdFRCfh?= =?us-ascii?Q?8x2JKtzfjNrV39CebuLrgR3ZwqMC8FYncHrjnHWIDTrv/4DZtaHrZAqw6WBW?= =?us-ascii?Q?Pp2gsB4r9j3joq0h2POT2H5Rc13VVIDU?= 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)(1800799024)(82310400026)(36860700013)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:22:37.9489 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21fa4ea4-5ea7-4409-6df8-08dcd7aa4ade 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: BN1PEPF00004685.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR12MB5737 Content-Type: text/plain; charset="utf-8" Replace adata->platform condition check with acp pci revision id variable in config_acp_dma() & acp70_i2s_master_clock_generate() functions. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-platform.c | 6 +++--- sound/soc/amd/acp/acp70.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platf= orm.c index a6e5cb263377..b66e7f69ec75 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -204,9 +204,9 @@ void config_acp_dma(struct acp_dev_data *adata, struct = acp_stream *stream, int s u32 low, high, val; u16 page_idx; =20 - switch (adata->platform) { - case ACP70: - case ACP71: + switch (adata->acp_rev) { + case ACP70_PCI_ID: + case ACP71_PCI_ID: switch (stream->dai_id) { case I2S_SP_INSTANCE: if (stream->dir =3D=3D SNDRV_PCM_STREAM_PLAYBACK) diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index 82c26e4fefc1..db5dd64969b0 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -142,9 +142,9 @@ static int acp70_i2s_master_clock_generate(struct acp_d= ev_data *adata) struct pci_dev *smn_dev; u32 device_id; =20 - if (adata->platform =3D=3D ACP70) + if (adata->acp_rev =3D=3D ACP70_PCI_ID) device_id =3D 0x1507; - else if (adata->platform =3D=3D ACP71) + else if (adata->acp_rev =3D=3D ACP71_PCI_ID) device_id =3D 0x1122; else return -ENODEV; --=20 2.34.1 From nobody Fri Nov 29 15:36:08 2024 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2059.outbound.protection.outlook.com [40.107.243.59]) (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 84CA5161916; Wed, 18 Sep 2024 06:22:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.59 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640569; cv=fail; b=FN5G8hUwbet3VRVl7C636HKAgPjrKnVJj6ZVkANQfvow11fL1dHo93rtgeMShCAST38ndF0+2s8MftdGaUjmFPqBy/RZ0T6PGmqtR4XdiCwlnjCdYGBz7zy6TpieFZiuQ7nvlTVfuHyQlkShCTFJ9Qm0fhPzwylYcKbeQv3+kHY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726640569; c=relaxed/simple; bh=loQzfQmJhsQ0pWkbcGsa188ZKhzzVpYxkEQOWXeanRE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dT/vILO8FwWqHrYceDEYS4/mDdrDsjuawcVhfF8ErnGQXPEXHYyW1GAlAHp534DHzK/MZlnSP6ZtMc5cyR9V9NJwScM96OaIOwxc2GW8gQ/QHTfyHob2twjqTKtx6jM83bJfVQwr0Ogv0Ynu8LiiU6zo4ALf0yVK2PhGIVlwgLo= 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=UTmN8FCh; arc=fail smtp.client-ip=40.107.243.59 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="UTmN8FCh" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=fmOlIY+EANwaWFRBkz5AMZsPVbod4oJFSqWMO2mqA3yiCj+iF5NIpQr53tnL12Gnzue67wyV6Bs8LYqwJYz8Pq/7rBCNFTfa84s6c4erg9mDe0hxbXb7YpSyspZTQc+7L3NgISHVMkWR9vHJ0leTbsXnM4cYrIYwA7OkmodclqiVqx3QgziwEuIM71JqTufV9y2cFksbWbh1Y2oZcgjXbPwmiC28pkgjWMTVlnbrfcOb7beaIiww/Jk0NOgfx6e18ZY+CW9SNb1qYQa6uBYHvw6CFZVfypFEwAAxClo20m/H/xOBkS/+sKhdrxu5zCFydfpwaA+kG80d4fKbNgMpmw== 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=cf4LILkITo6sRTgwpXVGJGnK3u/PXFXhO0mgTbTkqgE=; b=ciGPPY3KMi85D8DQohDGb3qkMiIWZd6R4BChjCQlJqiTyEhQKXMwomxZAv+mQ7pnNnxECtHL+GPfU5Ub/h3QiAOtcIctYQ9Uhnn9zE9Su5U5Tms6CgDgWnZ+MaIDJpGJ8DUlMSd52Ekyctq2LL/5aiOa1nguluWI3Mwn1vOIb1BGTFJnrFRQJwYr6JNJ6VBbefu99Og5fSraMjazUCkBHIKu9OgvuARVlos20cf75ujqtwNjQxVMEoxACKVlUBY2he9hi/qU1Bceb+96Qnq7wVsI4Q5h4jjP1hQ1RwJWMAEJkp9QUXJlv5K1qMln3ZOFVEhgvI1nH8VDI8fCqC2Fig== 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=cf4LILkITo6sRTgwpXVGJGnK3u/PXFXhO0mgTbTkqgE=; b=UTmN8FChJnQoVvmL2KF/eIf5eNyjCHnkyWw0SsbCbo900fVdEsnj62FP1oBFarsFKtOSe/V+Ulkak14DDpmZ55oSUbnmq24Z0HilMPLxfxnkuJ0Y06UU3F2YTxxALK9GLS+HtIczER9foE2iLT6fW/tyKB1MLenuCUL4WSgMpBo= Received: from BN0PR02CA0009.namprd02.prod.outlook.com (2603:10b6:408:e4::14) by DS0PR12MB6581.namprd12.prod.outlook.com (2603:10b6:8:d3::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.24; Wed, 18 Sep 2024 06:22:43 +0000 Received: from BN1PEPF00004682.namprd03.prod.outlook.com (2603:10b6:408:e4:cafe::5e) by BN0PR02CA0009.outlook.office365.com (2603:10b6:408:e4::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.25 via Frontend Transport; Wed, 18 Sep 2024 06:22:42 +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 BN1PEPF00004682.mail.protection.outlook.com (10.167.243.88) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Wed, 18 Sep 2024 06:22:42 +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; Wed, 18 Sep 2024 01:22:23 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH 8/8] ASoC: amd: acp: remove unused variable from acp platform driver Date: Wed, 18 Sep 2024 11:45:40 +0530 Message-ID: <20240918061540.685579-9-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> References: <20240918061540.685579-1-Vijendar.Mukunda@amd.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN1PEPF00004682:EE_|DS0PR12MB6581:EE_ X-MS-Office365-Filtering-Correlation-Id: 4994a2e8-e3c4-4d61-9345-08dcd7aa4dbf X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?MqG937KLzLhQIuyUfXrcK8HWV27Vpi9kWrU3F6nHRr7s3ujckApmH13TOhdC?= =?us-ascii?Q?TUaXG5D6vYTuYZV7KLwUc+rF4Mzl/NSJTKhmBdKm2hn2HUlsawAXy3MYtmLj?= =?us-ascii?Q?IV6AvsfdavVl+OUYtL5mgnP61woAH+JpYJaKmKnNWgYDLDqRZcd8lS1Npgl4?= =?us-ascii?Q?Lbv2no+mbpfXg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?= =?us-ascii?Q?VGPVbU8SczInAxqXiFOr3MaNBbxKUxwD3yYRer/joEK1ugWiSFyb4cN/CfTM?= =?us-ascii?Q?ksLJnp0db2aq2HHvSur0+83zaWrqCNtp2q3Tlb3o5gkpsJKyAVJQP+dqDJf+?= =?us-ascii?Q?EXb8N3WJ+ymq3AjshJYY26rLDFKoOcwt60gO2QKmZVKg+cK91mdw5kQeZCnx?= =?us-ascii?Q?GuzJVBFTIuauhnFquoQIPEdoH89yFRtFQwGt48Y6C9bszaxAMFKPQGEFDQML?= =?us-ascii?Q?2DioJrplsozZYWTbr/vynW3HK3xkiO9uS4Eegd6V5djLx0pkJcyrUcwGFgPk?= =?us-ascii?Q?4y6pQjdRVxvHH66K0uNSCt4+ugcq8MQybCann5y9qsu9X+y0kniDR68CWRbW?= =?us-ascii?Q?XZ0aVZM6DcBcORjFBH32FXNWpQNLVTeO?= 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)(376014)(1800799024)(82310400026)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2024 06:22:42.7799 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4994a2e8-e3c4-4d61-9345-08dcd7aa4dbf 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: BN1PEPF00004682.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB6581 Content-Type: text/plain; charset="utf-8" Remove 'platform' variable from acp platform driver private data structure. For platform differentiation, ACP pci revision id being used through out the code. As platform variable is no longer used in code, drop the code corresponding to 'platform' variable. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-mach.h | 8 -------- sound/soc/amd/acp/acp-rembrandt.c | 1 - sound/soc/amd/acp/acp-renoir.c | 1 - sound/soc/amd/acp/acp63.c | 1 - sound/soc/amd/acp/acp70.c | 5 ----- sound/soc/amd/acp/amd.h | 1 - 6 files changed, 17 deletions(-) diff --git a/sound/soc/amd/acp/acp-mach.h b/sound/soc/amd/acp/acp-mach.h index 414d0175988b..f94c30c20f20 100644 --- a/sound/soc/amd/acp/acp-mach.h +++ b/sound/soc/amd/acp/acp-mach.h @@ -53,14 +53,6 @@ enum codec_endpoints { ES83XX, }; =20 -enum platform_end_point { - RENOIR =3D 0, - REMBRANDT, - ACP63, - ACP70, - ACP71, -}; - struct acp_mach_ops { int (*probe)(struct snd_soc_card *card); int (*configure_link)(struct snd_soc_card *card, struct snd_soc_dai_link = *dai_link); diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-remb= randt.c index 065ac13b2220..008d97598b62 100644 --- a/sound/soc/amd/acp/acp-rembrandt.c +++ b/sound/soc/amd/acp/acp-rembrandt.c @@ -227,7 +227,6 @@ static int rembrandt_audio_probe(struct platform_device= *pdev) adata->dai_driver =3D acp_rmb_dai; adata->num_dai =3D ARRAY_SIZE(acp_rmb_dai); adata->rsrc =3D &rsrc; - adata->platform =3D REMBRANDT; adata->acp_rev =3D chip->acp_rev; adata->flag =3D chip->flag; adata->is_i2s_config =3D chip->is_i2s_config; diff --git a/sound/soc/amd/acp/acp-renoir.c b/sound/soc/amd/acp/acp-renoir.c index f372a56a0a17..166f1efacf1d 100644 --- a/sound/soc/amd/acp/acp-renoir.c +++ b/sound/soc/amd/acp/acp-renoir.c @@ -185,7 +185,6 @@ static int renoir_audio_probe(struct platform_device *p= dev) adata->dai_driver =3D acp_renoir_dai; adata->num_dai =3D ARRAY_SIZE(acp_renoir_dai); adata->rsrc =3D &rsrc; - adata->platform =3D RENOIR; adata->acp_rev =3D chip->acp_rev; adata->flag =3D chip->flag; =20 diff --git a/sound/soc/amd/acp/acp63.c b/sound/soc/amd/acp/acp63.c index f0c516ccf96b..e0b86132eb95 100644 --- a/sound/soc/amd/acp/acp63.c +++ b/sound/soc/amd/acp/acp63.c @@ -237,7 +237,6 @@ static int acp63_audio_probe(struct platform_device *pd= ev) adata->dai_driver =3D acp63_dai; adata->num_dai =3D ARRAY_SIZE(acp63_dai); adata->rsrc =3D &rsrc; - adata->platform =3D ACP63; adata->acp_rev =3D chip->acp_rev; adata->flag =3D chip->flag; adata->is_i2s_config =3D chip->is_i2s_config; diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index db5dd64969b0..3e4fd113a8a4 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -210,11 +210,6 @@ static int acp_acp70_audio_probe(struct platform_devic= e *pdev) adata->rsrc =3D &rsrc; adata->machines =3D snd_soc_acpi_amd_acp70_acp_machines; adata->acp_rev =3D chip->acp_rev; - if (chip->acp_rev =3D=3D ACP70_PCI_ID) - adata->platform =3D ACP70; - else - adata->platform =3D ACP71; - adata->flag =3D chip->flag; acp_machine_select(adata); =20 diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index dcfc29b2f072..ee69dfb10cb8 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -201,7 +201,6 @@ struct acp_dev_data { u32 xfer_tx_resolution[3]; u32 xfer_rx_resolution[3]; unsigned int flag; - unsigned int platform; }; =20 enum acp_config { --=20 2.34.1