From patchwork Wed Sep 18 06:15:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806591 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: OMiZfx1laQd8/246YoFfAPB46aY9y1+vHBwqEsbXUfE15A/OiGYOj/Rz1uPXFIIQl3KIBeC046eOppueDL2fWQVE6G1IlCmoYHvLQiJx7VJ9G17PjqsMrpyKPGurn5OTE7In59yYs1LW3EhoGDdVGsAbGZDK6OzjBdMU8O+OU321LzsGvEc8NMplvrF+pl1lp5dIdgCIFZ6YTYT0lVa0NBJ3LcGnFOSr+5K0McoV8+QbBOLaxzE3jgIw7N5myW6YPzIg7VM5TrarE7UvoBHVUyJ1U/NiGZc5jt2PWG5nTVD6Wb5yfnZX6d9J6xkuxN3yjQ8OQQGpngUQC+ai1dwxQjwd6WH0/1LE1DStXB3oNF+8oLau5r74NGparjFwVFV8lDG44aZqOvZivevW2mD1NLamW5SpIPDX8EkY9kl6h9/YJFHRlPc7tNe7uog9VINUvAXb9FOZjRJ6WjzdB5qbVYawhC6PsK7Sdus8hN6ag5/ruvp4/Z315ygv6WDtGnKphFCnKaUFrKqqtEScMChyHQmpyIABiXVofUFl3c7uskfa33Bsn/up6lq0AA51Zuk6pwrG7M6CgI70ozanpbMU3J0bjmSnYsHkHkqNW3jnDDDnnIqN1/uA5M8O2PMgIeZzjVVgPOglzgdAV8b2H0/S6QZsFMTSXxlcxShqDeL/PXgdIMHgN+frV2GX9j0PTFnUUHgXALGeg/yIRXWCeYNVPkq8RMqzi4QBdscQx97envW972eTgUuIOEq13OVYnZcCh0ULpErggpP6RXVhYjjlb5kHU6FhK3YzAa8WHnxE6HUU5Pxni8SRkZmdEhadEzuBgTLccnFC3z31JMGvS+MNZDQiBJuknqSh0uV2CunJ+MKe1PDTHDM+dCcjbfZdZHPB0YmFXJUYx5laTGG90PCZZCNuG28U65/SdFMRC9SA9eLSDLAIjdM3KVuvoQAkyh8tTXOJobVo0k7GpfDw+sdv7zF1jSLk/UowcRb0KXN9tY6RJjiSH+i4U4ilqTjRPNd8+vw25e2cbo11OSPh75KxTdRBfoEzSC8tPJkTkWGLFHHh5oZV07HyPP2Nin1HzX8V8nd6p92+qSMO1WIvzGq5CqgYQzCA9qx4Pn6BDw5FhkeKswOt1z2zIQuPjD2HlOKGeaBRn3GcXiubnvntGR9j93ZPpEl033yFMqvJsoH7KFhg2oJzkNsl0iL4rGSMMsddhtkVYaA9djKP6nc9L6XgQSoM6qNfwieq1EVJ0IdPE9g/sBtKpT7vVbxZn8ICftGYWiV2kZbVRdWvupUUiEvXY/XnGjQiNsJJBcVCdDu2RP5lqoBz1z6PXHqedQs1JZqh4UfgnyRUiHWY+XE1Dv1D3BH3QPu9lfeTgAXOMqRBJ3/4dCvoulH/3VLgyr2eQEX31GhgGmZXTXbv5/3+0xkYBH7xJQ8Ay6x42/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 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-mach-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 = HEADSET_BE_ID; links[i].cpus = i2s_hs; links[i].num_cpus = ARRAY_SIZE(i2s_hs); - if (drv_data->platform == REMBRANDT) { + switch (drv_data->platform) { + case REMBRANDT: links[i].platforms = platform_rmb_component; links[i].num_platforms = ARRAY_SIZE(platform_rmb_component); - } else if (drv_data->platform == ACP63) { + break; + case ACP63: links[i].platforms = platform_acp63_component; links[i].num_platforms = ARRAY_SIZE(platform_acp63_component); - } else { + break; + default: links[i].platforms = platform_component; links[i].num_platforms = ARRAY_SIZE(platform_component); + break; } + links[i].dpcm_playback = 1; links[i].dpcm_capture = 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 = AMP_BE_ID; links[i].cpus = i2s_hs; links[i].num_cpus = ARRAY_SIZE(i2s_hs); - if (drv_data->platform == REMBRANDT) { + switch (drv_data->platform) { + case REMBRANDT: links[i].platforms = platform_rmb_component; links[i].num_platforms = ARRAY_SIZE(platform_rmb_component); - } else if (drv_data->platform == ACP63) { + break; + case ACP63: links[i].platforms = platform_acp63_component; links[i].num_platforms = ARRAY_SIZE(platform_acp63_component); - } else { + break; + default: links[i].platforms = platform_component; links[i].num_platforms = ARRAY_SIZE(platform_component); + break; } + links[i].dpcm_playback = 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 = pdm_dmic; links[i].num_cpus = ARRAY_SIZE(pdm_dmic); - if (drv_data->platform == REMBRANDT) { + switch (drv_data->platform) { + case REMBRANDT: links[i].platforms = platform_rmb_component; links[i].num_platforms = ARRAY_SIZE(platform_rmb_component); - } else if (drv_data->platform == ACP63) { + break; + case ACP63: links[i].platforms = platform_acp63_component; links[i].num_platforms = ARRAY_SIZE(platform_acp63_component); - } else if ((drv_data->platform == ACP70) || (drv_data->platform == ACP71)) { + break; + case ACP70: + case ACP71: links[i].platforms = platform_acp70_component; links[i].num_platforms = ARRAY_SIZE(platform_acp70_component); - } else { + break; + default: links[i].platforms = platform_component; links[i].num_platforms = ARRAY_SIZE(platform_component); + break; } links[i].ops = &acp_card_dmic_ops; links[i].dpcm_capture = 1; From patchwork Wed Sep 18 06:15:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806592 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: rNJpwRa1Q2E2t7B/v2kdUuXA9mlP3QG1PgJ3z7GYxLsGhb0nZsJaUV3/NzjXiHlFsH5gYNsowoZ+w2bH4o56NY/dLDBCmnCl6LwRSD7ASK2H8YYbsLqXx2m6OOhLRYjJ//QOBxEjhuHrmX7YVlMiVJcD2i47L/uzlldWJf7n0KnmDRTR6yew/HzpZjv+EQx5ypNXTsELgiXEFF+qBlCU76QcD1rJvWN4GdykNnwZn9sOwROw5hgmHYCWIarUvwj+52lA/R3aUorBWRbiujU1sLqwqYVNyfSN0wkESTw+JMT2R2Acrs6UrppOlODDrRf/BKA3TXpXlXxVKwfFrfnR5aCvfAwwpd91KlVwK0gIHNi73yRyhaLWZKh0JFg7EqdTqyHVJaQMnLuXD+XYC/Gx5VvOY/UZDKZZuZAEJ+LY0SsKiMNauE9VdV5E3HO6MJ2bknMp8oC5gzzThXBY3kr0h7k9Rgl7pA87g8mmUADBSrBLM/TYXWrDNb3QJ56Y6/E3pWYVbix0nYhriWaq0DTqrEnKcSzeUKUxBUrFleJwIW5iXF2JR/c38yWlRS7LJxT4iZs/5Y5rLe1Pl+F9K46zUuWRBuNxDYQz5cThq8pyC85fi2Bj4Z822xU76LLZAblQF6pZ0vUXwyWN+5p4X0z0N01ep82w/7FrCFN6Ebi7+aWwm/0OvnV7UqDfTW50xyLfhWnLkshQM5jsvMNF/j288dJ0k8VuEbU59QA7TOcZmxiZIK+MVf5xtLr1KmBfB1nvkD+rjrz3Rjx4MJivqyWfFxRJovvwsuLo7YRlZL+CikyNUNl19Pw+tAsmMobtcsfw5KeVhxYeZBM5Ih+VdG2Ipj2viLyFpmptXLCSDuivC2qGt7Qsqh4Z+IZU+BkS045Bzcqfp+GAeVEWGbvGbt9kdXNqTItQ3s10TXw8B6E+ZeGucnvhUgNDroqMH/p4aM5qVkcutu9Y8Saw43nUx2tyJYsV/Js6W7mtcim6wppg3xakW3ISrPkQRdKuNChm+XrNRYpmJIqhobFflM2Dylj5zdU4XGEYSi4gt4+THtXzvJI38HdA+pwucO0hvkuyZBrrzfWQJaXx+E4amHE3t7nA/FeTcLZpIhOILVouk9N+dFSNmm70xEMUMpmigluPwheXvZXRTZHKgNt1ioo3CyhL5k+eT8heU7HoO7kR87ObGNPXnxoV+VX7Hmrr9nmie6X3Ud1dZXgGmrAjs/ts6VasEeO64uCToTTCvayM321BfdCswfD00v/mphW5d+O2jMmORrzCfI0ng9G0AJ4w8ffm9RSO2NUeQM75IKPotlRbxZHuZGt9VIN6SL7bcf41m+1hnega90CsqsNpDMfo6okCAXF3mzZKbn1TzBjzTQV4HDQpxY6VU4cfnMpFTF+daf9/9lwp00e76LBZAn/fR5IQUj8WJ6DdLlOyJ/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 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-legacy-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 = NULL; struct device *dev = &pdev->dev; + struct snd_soc_acpi_mach *mach = 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 = *((int *)dev->platform_data); + acp_card_drvdata->acp_rev = mach->mach_params.subsystem_rev; dmi_id = dmi_first_match(acp_quirk_table); if (dmi_id && dmi_id->driver_data) acp_card_drvdata->tdm_mode = dmi_id->driver_data; diff --git a/sound/soc/amd/acp/acp-mach-common.c b/sound/soc/amd/acp/acp-mach-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 == I2S_SP) { links[i].name = "acp-amp-codec"; links[i].id = AMP_BE_ID; - if (drv_data->platform == RENOIR) { + if (drv_data->acp_rev == ACP_RN_PCI_ID) { links[i].cpus = sof_sp; links[i].num_cpus = ARRAY_SIZE(sof_sp); } else { @@ -1647,12 +1647,12 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].id = HEADSET_BE_ID; links[i].cpus = i2s_hs; links[i].num_cpus = ARRAY_SIZE(i2s_hs); - switch (drv_data->platform) { - case REMBRANDT: + switch (drv_data->acp_rev) { + case ACP_RMB_PCI_ID: links[i].platforms = platform_rmb_component; links[i].num_platforms = ARRAY_SIZE(platform_rmb_component); break; - case ACP63: + case ACP63_PCI_ID: links[i].platforms = platform_acp63_component; links[i].num_platforms = ARRAY_SIZE(platform_acp63_component); break; @@ -1719,12 +1719,12 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) links[i].id = AMP_BE_ID; links[i].cpus = i2s_hs; links[i].num_cpus = ARRAY_SIZE(i2s_hs); - switch (drv_data->platform) { - case REMBRANDT: + switch (drv_data->acp_rev) { + case ACP_RMB_PCI_ID: links[i].platforms = platform_rmb_component; links[i].num_platforms = ARRAY_SIZE(platform_rmb_component); break; - case ACP63: + case ACP63_PCI_ID: links[i].platforms = platform_acp63_component; links[i].num_platforms = ARRAY_SIZE(platform_acp63_component); break; @@ -1770,17 +1770,17 @@ int acp_legacy_dai_links_create(struct snd_soc_card *card) } links[i].cpus = pdm_dmic; links[i].num_cpus = ARRAY_SIZE(pdm_dmic); - switch (drv_data->platform) { - case REMBRANDT: + switch (drv_data->acp_rev) { + case ACP_RMB_PCI_ID: links[i].platforms = platform_rmb_component; links[i].num_platforms = ARRAY_SIZE(platform_rmb_component); break; - case ACP63: + case ACP63_PCI_ID: links[i].platforms = platform_acp63_component; links[i].num_platforms = ARRAY_SIZE(platform_acp63_component); break; - case ACP70: - case ACP71: + case ACP70_PCI_ID: + case ACP71_PCI_ID: links[i].platforms = platform_acp70_component; links[i].num_platforms = 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 +#include "acp_common.h" + #define TDM_CHANNELS 8 #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-mach.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 = NULL; struct device *dev = &pdev->dev; + struct snd_soc_acpi_mach *mach = 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 = dmi_id->driver_data; + acp_card_drvdata->acp_rev = mach->mach_params.subsystem_rev; ret = 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 From patchwork Wed Sep 18 06:15:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806593 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: sX5A6ZY0fsT8CK/GahpSyDRNhWZDRji7hmCSSniApNoDwwLFPPWCIDqFoJr+eZYUb6/KkvofIfV981WMxuH91e5gPHEv2WQXFFxcKczoyld021/aB5BQV+7HzZPi7elFtey/Lj+gZEdbaqhtr+R8thbhYuanMJZH6iyU+cUdfVvFxvVma7h/Kv5l5HUM9GWQ7uHchqjNEtT7QIzQtQ+x+3h3OgkgOowd2ao5SlLVsYseKvBgZbxmWJg90d9/A3vl5ZASUJ3oHOpkFLxyDcMaIzhshH04zpKOnReXz88fFiWfZHo8/o8ytcq9QML9ILyMFfzex00LZbZVQOfYzch/NyRzQ+Keq4YUWzuS3UT9LQ4Ilbb9HpMG/4Ze0omUOwWYJbSZc7W79iHLeSCnKlg30OmTYn1WuSCrwgaW9xp0n9gSa/+AnbF3S7wS9DYMavfRmRLBMJJN26kaCaS5JXlmwLyGaOURm+rPyyJeynPTLCCuH50Hjpn9Lafa71oMziE5oL1J8QiV25fLueWPpP3zvN9DzQPGquCMem6NRNgKAiik66WiWAxGA522/XA/ePckRBtHPQYjQRUQjN+9JOG/pXuUNcihqgN8Ldhqu289A7pYg04ASqeu86Vywxqu9ykgnm6WRMJx67iv3PwKIaMsPwG/1vMJJSczfnujjxnPmZwZtPabtL6SXQeybNKmnnE49arJLTHRH61Ib2psZeXtKMqTwhnZQsB6Fqjq59eiEA21ilwZ2Z7J8Np9EAuVmj/S2kk6Gf2dv9RKoVlTK2+AzV9rd7GMy684fqXRlZ38qndaqSbNdq3Xd3pdgTDsmgLanxDTLsGyP8uqH34vi4GmDB9r39jQDkQuXAusSkSfr4aNImpJh+PG0om5Bhp06y5MA3W0IFyG3ZIwJinUOlFG9SojzFFjQWcWZtEgGdw+6XcyZxnkALIT/FIiSjOl60dWhrykiF1wYvM6pIZlIcIE3hL3hUnarz5e6hwquJbRcl4dvA8qrehoobOW45X/NRS0GQMVHqebpGDDtgqXwsTzekz3GyKL0DIXY1FRellOx7RtitGs2xkkIOKMU9QogTRwVh9a6ifXZePZ0iElERWVXB+25wCFh2Tne+4FpLqw8C+n9BuJlvqfiDlwq2MFv77Z//3pteOEaf/lL2lNILag60yQ4KkKaNkZDoYZ1aTCdePYFRffaAYifBcPKxSNrwS03g77YEe0ciZx7qDv4eXDq42vjSL5n4lL+kggiqZUFzMsvuhab+MnARQfFhlpxLdemBQgeXl8Upc9Go2Wx2Y1I/TWdX5yece/uz13cw+P6KbMNz8dDIsSBG4xLVDoHtP8y1IYp0Kd4/5cydOFRmqfceEkSxApFlZPiCsMWSDtH12s61SQ53v9Eepm2PTlBFIJuVJrbYVJhvau1HEYI0POvovGu0f2inTAUaIcKeHoOI+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 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 *adata, int dai_id) val |= BIT(1); 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 |= FIELD_PREP(ACP63_LRCLK_DIV_FIELD, adata->lrclk_div); val |= 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 } 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 = 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 = 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 == SNDRV_PCM_STREAM_PLAYBACK) adata->tdm_tx_fmt[stream->dai_id - 1] = 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] = 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 == SNDRV_PCM_STREAM_PLAYBACK) adata->tdm_tx_fmt[stream->dai_id - 1] = FRM_LEN | (slots << 13) | (slot_len << 18); @@ -534,7 +534,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d reg_fifo_addr = ACP_I2S_TX_FIFOADDR(adata); reg_fifo_size = ACP_I2S_TX_FIFOSIZE(adata); - if (chip->acp_rev >= ACP70_DEV) + if (chip->acp_rev >= ACP70_PCI_ID) phy_addr = ACP7x_I2S_SP_TX_MEM_WINDOW_START; else phy_addr = I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset; @@ -546,7 +546,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d reg_fifo_addr = ACP_I2S_RX_FIFOADDR(adata); reg_fifo_size = ACP_I2S_RX_FIFOSIZE(adata); - if (chip->acp_rev >= ACP70_DEV) + if (chip->acp_rev >= ACP70_PCI_ID) phy_addr = ACP7x_I2S_SP_RX_MEM_WINDOW_START; else phy_addr = I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset; @@ -561,7 +561,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d reg_fifo_addr = ACP_BT_TX_FIFOADDR(adata); reg_fifo_size = ACP_BT_TX_FIFOSIZE(adata); - if (chip->acp_rev >= ACP70_DEV) + if (chip->acp_rev >= ACP70_PCI_ID) phy_addr = ACP7x_I2S_BT_TX_MEM_WINDOW_START; else phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; @@ -573,7 +573,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d reg_fifo_addr = ACP_BT_RX_FIFOADDR(adata); reg_fifo_size = ACP_BT_RX_FIFOSIZE(adata); - if (chip->acp_rev >= ACP70_DEV) + if (chip->acp_rev >= ACP70_PCI_ID) phy_addr = ACP7x_I2S_BT_RX_MEM_WINDOW_START; else phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; @@ -588,7 +588,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d reg_fifo_addr = ACP_HS_TX_FIFOADDR; reg_fifo_size = ACP_HS_TX_FIFOSIZE; - if (chip->acp_rev >= ACP70_DEV) + if (chip->acp_rev >= ACP70_PCI_ID) phy_addr = ACP7x_I2S_HS_TX_MEM_WINDOW_START; else phy_addr = I2S_HS_TX_MEM_WINDOW_START + stream->reg_offset; @@ -600,7 +600,7 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d reg_fifo_addr = ACP_HS_RX_FIFOADDR; reg_fifo_size = ACP_HS_RX_FIFOSIZE; - if (chip->acp_rev >= ACP70_DEV) + if (chip->acp_rev >= ACP70_PCI_ID) phy_addr = ACP7x_I2S_HS_RX_MEM_WINDOW_START; else phy_addr = 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) base = chip->base; switch (chip->acp_rev) { - case ACP3X_DEV: + case ACP_RN_PCI_ID: acp_pgfsm_stat_reg = ACP_PGFSM_STATUS; acp_pgfsm_ctrl_reg = ACP_PGFSM_CONTROL; break; - case ACP6X_DEV: + case ACP_RMB_PCI_ID: acp_pgfsm_stat_reg = ACP6X_PGFSM_STATUS; acp_pgfsm_ctrl_reg = ACP6X_PGFSM_CONTROL; break; - case ACP63_DEV: + case ACP63_PCI_ID: acp_pgfsm_stat_reg = ACP63_PGFSM_STATUS; acp_pgfsm_ctrl_reg = ACP63_PGFSM_CONTROL; break; - case ACP70_DEV: - case ACP71_DEV: + case ACP70_PCI_ID: + case ACP71_PCI_ID: acp_pgfsm_stat_reg = ACP70_PGFSM_STATUS; acp_pgfsm_ctrl_reg = 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 >= ACP70_DEV) + if (chip->acp_rev >= 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; - 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; switch (chip->acp_rev) { - case ACP3X_DEV: + case ACP_RN_PCI_ID: pdm_addr = ACP_RENOIR_PDM_ADDR; check_acp3x_config(chip); break; - case ACP6X_DEV: + case ACP_RMB_PCI_ID: pdm_addr = ACP_REMBRANDT_PDM_ADDR; check_acp6x_config(chip); break; - case ACP63_DEV: + case ACP63_PCI_ID: pdm_addr = ACP63_PDM_ADDR; check_acp6x_config(chip); break; - case ACP70_DEV: - case ACP71_DEV: + case ACP70_PCI_ID: + case ACP71_PCI_ID: pdm_addr = 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 struct pci_device_id *pci_id res_acp = acp_res; num_res = ARRAY_SIZE(acp_res); - + chip->acp_rev = pci->revision; switch (pci->revision) { case 0x01: chip->name = "acp_asoc_renoir"; - chip->acp_rev = ACP3X_DEV; break; case 0x6f: chip->name = "acp_asoc_rembrandt"; - chip->acp_rev = ACP6X_DEV; break; case 0x63: chip->name = "acp_asoc_acp63"; - chip->acp_rev = ACP63_DEV; break; case 0x70: chip->name = "acp_asoc_acp70"; - chip->acp_rev = ACP70_DEV; break; case 0x71: chip->name = "acp_asoc_acp70"; - chip->acp_rev = 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 *substream, size_dmic = frames_to_bytes(substream->runtime, substream->runtime->buffer_size); - if (chip->acp_rev >= ACP70_DEV) + if (chip->acp_rev >= ACP70_PCI_ID) physical_addr = ACP7x_DMIC_MEM_WINDOW_START; else physical_addr = stream->reg_offset + MEM_WINDOW_START; diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.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 *component, struct snd_pcm_subs stream->substream = substream; chip = 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 == SNDRV_PCM_STREAM_PLAYBACK) runtime->hw = acp6x_pcm_hardware_playback; else diff --git a/sound/soc/amd/acp/acp-rembrandt.c b/sound/soc/amd/acp/acp-rembrandt.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; } - if (chip->acp_rev != ACP6X_DEV) { + if (chip->acp_rev != 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 *pdev) return -ENODEV; } - if (chip->acp_rev != ACP3X_DEV) { + if (chip->acp_rev != 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 *pdev) return -ENODEV; } - if (chip->acp_rev != ACP63_DEV) { + if (chip->acp_rev != 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) } 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 = ARRAY_SIZE(acp70_dai); adata->rsrc = &rsrc; adata->machines = snd_soc_acpi_amd_acp70_acp_machines; - if (chip->acp_rev == ACP70_DEV) + if (chip->acp_rev == ACP70_PCI_ID) adata->platform = ACP70; else adata->platform = 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 +#include "acp_common.h" #include "chip_offset_byte.h" -#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 From patchwork Wed Sep 18 06:15:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806595 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: qCtPrhF2S6bIHdmUmjA38mnigMpOvReUlpBzxP89e3I0KyAwCor7+dZucrDUW+CAHqZkb6QpK9vrvIcJ8aoalCmnG0lOUxKTn5Ww9kB3zKecKrc0QufrMkw3WaUf5vnks2b602oSQngmzKNOG2eEFkNLCO9KddnKNNvb4mau6T5mkEDK7Vl3wnV13UKiG3uKOOAq075Q2SD3ugyoZzNyfEPbec6SJ7XWYfcIRtOFE87p0+qMiBvaeRqMsEWo3Gpp4bQ8/zQYjLuqFkCilOQ58LtCQZQ//+PeYo6uX/6um0FMv0mM2NlxvtN8g2uJ3jtDVXToI6YwQuf6N5TD5YchfRkCZ/IqhDjM3hWsghm2swjxbdBGxjiR4kY0ySk35HmFXX1VpmT+ZsBXp4I90eN5/J5Fq5YAWRy1RNaBPZ0s2QxmVZuf0t4TAvXlfqBdP6fBj4Kx5R18TVLxibN3W1Y0EMKcXzFf/8P5ehGxaMW+XfcRh3C+xU5atFiLwMRbIS30eqZ9jmri9qWeSnQLnsZqnqDEU94/+Qd/FWC+b0ZxxNoKYkSioMMvy2rm/Cbufzg3IwpVMIAY1Nh8/xMXPYb2k35XpvGiDflgi0QlIXebZZ22v0LYelbnHLw+cG7hTDwvOvKbI6+m8nYnBLa/lbMaQcObWGWgMom/fvr0qx2Dbqj59hNNB9uFY83JOdM+9bKzSbea0StuoGG/DWy72ITghZGHPXjr2nk3MycWTWL+W4EXgJqu0FyXNHFwOt/A7vKzAYxOfH2o6Saf34pbWqc1xYvCI5hRdRWSm0qishbVaqhrMByU6OratXheqcoWr9pDYKaU1v5wv+IsZEO8NIdEeJnqbb8qHv7DH8H57nxlmdD0dzVK5dfJ370izk25xhbxo/MnaBkb1W44qgOqwM1Pe4vrLRmrrTr3Pv6vgi8tjXRiIHhzyXakzWB7ee/mVcya18tHss/39JxXdXSTDEKa6QP+TRFXJQJsWCsy+Bwhpu2ma5Yem5Cd0lL5QwOZoREyP/poKqborsjR8liV5bczBbSH2bEJYvU4nCeO3fgvomxW3DCcUziumwiLCBxL90nNSN0Qm6Lxj8Geps5DyEO/70gwoK4QpwpXZ/5+IQPVl55F9SoYb8QsLDhNLNmx3BTBg3Xn2UXL+ROsB24QUgTHCAKYjU7GfUEHUIxriQqiZu7uyCFROER2+Vd6uFxC2VZ+tFwKqSF137adX9w4AFgbTQ9bNqhOQa+Xs0gjGhAnYgoFXEFJXo7LkvqCbqGTwj74KqndTfzfpt8idGc/4q9BYaHBMyGfMOem+AAV48/ijwRTMOjpHgKXe6JFC4AYhNPr1BAqR3mt1jQSqpyhqkjrcqjuJka9yIpLjXjeD1MnwAbw4eHwt02mGgyCYfiXVFJd 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 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-rembrandt.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 = ARRAY_SIZE(acp_rmb_dai); adata->rsrc = &rsrc; adata->platform = REMBRANDT; + adata->acp_rev = chip->acp_rev; adata->flag = chip->flag; adata->is_i2s_config = chip->is_i2s_config; adata->machines = 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 *pdev) adata->num_dai = ARRAY_SIZE(acp_renoir_dai); adata->rsrc = &rsrc; adata->platform = RENOIR; + adata->acp_rev = chip->acp_rev; adata->flag = chip->flag; adata->machines = 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 *pdev) adata->num_dai = ARRAY_SIZE(acp63_dai); adata->rsrc = &rsrc; adata->platform = ACP63; + adata->acp_rev = chip->acp_rev; adata->flag = chip->flag; adata->is_i2s_config = chip->is_i2s_config; adata->machines = 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 = ARRAY_SIZE(acp70_dai); adata->rsrc = &rsrc; adata->machines = snd_soc_acpi_amd_acp70_acp_machines; + adata->acp_rev = chip->acp_rev; if (chip->acp_rev == ACP70_PCI_ID) adata->platform = 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 */ bool tdm_mode; bool is_i2s_config; From patchwork Wed Sep 18 06:15:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806596 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: hOeKxHs3bBZ99W+lEZ0G7cehIkI7N3C+RZmQe0sxgAEzOZZPAja49FXU9eCA7krQEPPL2YGJcAorrw7vVbag/zQJrR3pdYxnRLhhAB4sQX1kCz1CBitqqBBTVJdIsECaw2Fxl4cDXlRLhjnuu8dsbK5WVHTTfI0URyo+ChhobeEShKf0yd2uXH0S6GzvJzfmkkave9wyD5W2SJyktTdutDLPRlsnM26MZBL8W7/S8w90kqmDqFpwEor6hX4Y1o8Hai25RUQk3K6V/Hq1kogPf8nZTUiP3w1xUjTf3XqRT2Lf/vLhYG+1T+WKk76q76JZ4LnKxXy+oD3GyXeSlLulU+5uAjfxYkL1ObvNKxbgux+Hchqr3wK2A5G96nSXN6H+D4USE34SFI6ecvcXT2sSVStZRN6gUvbR+VAXOrW9n8SWvHwDliFsz8XMCTXcIMpSJRDnlfxUzTI+koNqqA6knr0bYt9BpGQxONAzC8NW/jEYhOZ9gUzDDeeFZCZKgf5vU+8/FLVFiHr8B8mKMQH3PHOOXRm+phCCqgl2Ybltg5LsWZf45XJ+9L3b/xHLkhb93yrRI8DNqqqxXDvP8eyoE+M09MZo3LdLGVVgjQUspyYLfqDeWCWc4XvEohM59pvRPiSzD4xKuug4p11Osd5URmvIsWD9/q20GI/vWnjhv217392bOZVnE4DEcIqaq2Z3r6w2w2RmInpc5GD2vjfR8GHYAQJOeSIwxKt8HqL1ZKCF/wfIHm0e2yyERc6hzMlfy4WuN4OCKARmlT5gf+PEewBc/hKEJYBTX8mmtCuttvV0PDohiBleZ6Ih1qBdWJEdlya7Q0sa8NgUKoBBYh9AxxeTnMgPD9h0IQr5M88OZu+GPwfndROpJPngyGr7IokcvrsjYn43azWsyaCz30FZElWx/OfGjgEpIObNuOjvrHLv9Ryl+S477ZcviYPH/gbssqF0S7Hp6WdBcQxK0Ap7NOzKjh+Rf8WP8iFODoYgK7XEdACm8seyWTLJP97DTb7tqmwHoIEY5FTRFr/cHENCSXOA4hRx/VmT9yNFfNvkJpLDQlvSRPx5m9XExOEs43K4gaYJFnHegHTn1Z/tr2pTVOfx0nLzG3VbZpf1fNHXnpWL/pxcp/r4E6kkGGF/OoaE+2SSNveJBjngJfJuMzTmHiyO1QNYVCfC199Rm3Gzg0JVQs+FUAGcsNk7QNASNivG7wgWhtYYMMPS2henigy3KUDjzhHbTbGNN/hCXxQ44HqpntVC4yi7eIP0GoIMkFAHq7t/J3ft+sRVjfPpI3gWEqr0GrHExCKFPxlpp8wo1LnwuvTAoE3GQ8PEcAs+1mns66gNfDDw691EHb4S+3ul/L69bCwmLovsWNwB9jtPMvrmyC27qSdm73ywaMhJDfUyPEu5kxW+evXT0H89Ft0TtkBA4+VXqCILsoDsA0KA7RJ+iPEf9UpeolptFYV/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 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-legacy-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 = *((int *)dev->platform_data); + acp_card_drvdata->acp_rev = *((int *)dev->platform_data); + else + acp_card_drvdata->acp_rev = mach->mach_params.subsystem_rev; - acp_card_drvdata->acp_rev = mach->mach_params.subsystem_rev; dmi_id = dmi_first_match(acp_quirk_table); if (dmi_id && dmi_id->driver_data) acp_card_drvdata->tdm_mode = dmi_id->driver_data; diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.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; if (adata->flag == FLAG_AMD_LEGACY_ONLY_DMIC) { - platform = adata->platform; + platform = adata->acp_rev; adata->mach_dev = platform_device_register_data(adata->dev, "acp-pdm-mach", PLATFORM_DEVID_NONE, &platform, sizeof(platform)); From patchwork Wed Sep 18 06:15:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806597 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: +tkJjtZbePJ2kTCGLNz2FA/bnIk9j69BiozN7TTDzQQvnLZ11Eh9NwVCcylNMb9C8MZfGM5jc/sq+ufsGjBZxxZNaHtr8ThVaQOFSETQCAL0tSO1s+4OhLqHXpvWpqlFN2TG1v4DC1r+ye7v+JD+yoa4rcrh61WSZhulPJD4BqfuuAK+lcfdqB14c1BYbQ1WmKKW9XwL5LR0mq5iYmsqmJmJbf8bgtNZQyIYVwDtKca0qnp6G1TpetjoY3xvpzXvhPp7cO8hCBMyafU0keZEbCVOxEyAIcImINdlq9znLKzbcFSinSnYDKeBHjtwJmWLWHk788nrEWckkW4lXZGDPLmKzu2L8R+RmNChRo7z1LBze4PZgwwQr+GqGH8F6OjveDYKs423StQZ67m3VCxBEJuwp4CHJC24z7cy1egp1+ZoGVwWytFhjkVnYZgaFfQiDlY14/h4f5YjH7ALYklpS9Q6yEui7w48wDZ5ZSva2g/vuYRgTC/pE1S+p1cEr3Vp1XHVafgZoWTuesfBYCg+AKAto6FQj3Clb+vuqYm8jMKr9pjJ3E53O5OY7gzpF3QsWpuBsIC5AQQkfmk9a2Zib2SIs97XQ+8lHFHCJcPambwmDt2DHWmDV3AZ/HHY0JoJDO2c04WGepvL+kF4SeBvSJh8VvwS7sTBBO6IBR652TckLt0VLPjj+Gwcc8uzieygJ9HJKGha84uqPB6bVIMcuJC5/a/glc+VscQSdtJTK0Z3RV6UTPqpA98RnxB47tNBDeWaFpHIkAEp1RiiQsUOvJjdXP8FULR4OO8mk2+anP5VHJ+dja5srDg50riaDL5D5BNsUeNuOtMIGIbjjdxKYo+IT7WMZWj62DPVGEkwFgkTdjQ+TTJPDvYDO0yWrWSrESm+aTZ1LzbGJ2Fr6NQXX577F7qd/v9O/h4Y6/EruCvxjNhUG7DbSj+nWs+6BHuowKpI6QUVeKAQkWipf3VQmQGrT/AHpX83XQKTXcJoYL2WneO0wOmjm5EbmYT3bi0LhvdWrTKEeHBgqJwjvqUy4Ehs3wLRvoOw1E+E+jEbhxtmxlsY9oy/FyousVVDUPmb66UrMVmgCRwNsvdkLUEIzp6TatL15JDecCfdAEJ2C72WFfdc+7w3C01OwkFfuPvI3ER8L7JeRiOPPmEvoxiZPecaCZ2sWp1bKCgucma8F8y3nlYdk/L/gG6ZNpQLX7jGxgRYIGhuRBiOJV/CW1mcvS+bHoD85LhOFGccqmOsR7x2dbRunbwUKyhLZkoBoZRMtP+1wDT3kcL9qy0xJ2/SqDFnI9XIecZaQTHU1Xw3Csuy7B0OgoLX0Nc72S9cB7sWQGseWkjVDcHfEeCNvtUbbTu9Z3k5oSwITmMRZ/U26+2Td4tlWPnhw4s5KI02RcDsQ8CvT6sJlSzL+wNUifmGZpUPMCTGJ3McIlJypq8HTE3wzlRTC26YspoQDCUCiUXY 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)(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 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-legacy-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 = { .dmic_cpu_id = DMIC, .hs_codec_id = ES83XX, .dmic_codec_id = DMIC, - .platform = RENOIR, }; static struct acp_card_drvdata max_nau8825_data = { @@ -68,7 +67,6 @@ static struct acp_card_drvdata max_nau8825_data = { .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, .soc_mclk = true, - .platform = REMBRANDT, .tdm_mode = false, }; @@ -80,7 +78,6 @@ static struct acp_card_drvdata rt5682s_rt1019_rmb_data = { .amp_codec_id = RT1019, .dmic_codec_id = DMIC, .soc_mclk = true, - .platform = REMBRANDT, .tdm_mode = false, }; 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-mach.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 = { .hs_codec_id = RT5682S, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, - .platform = RENOIR, }; static struct acp_card_drvdata sof_rt5682s_max_data = { @@ -56,7 +55,6 @@ static struct acp_card_drvdata sof_rt5682s_max_data = { .hs_codec_id = RT5682S, .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, - .platform = RENOIR, }; static struct acp_card_drvdata sof_nau8825_data = { @@ -66,7 +64,6 @@ static struct acp_card_drvdata sof_nau8825_data = { .hs_codec_id = NAU8825, .amp_codec_id = MAX98360A, .dmic_codec_id = DMIC, - .platform = REMBRANDT, .soc_mclk = true, }; @@ -77,7 +74,6 @@ static struct acp_card_drvdata sof_rt5682s_hs_rt1019_data = { .hs_codec_id = RT5682S, .amp_codec_id = RT1019, .dmic_codec_id = DMIC, - .platform = REMBRANDT, .soc_mclk = true, }; From patchwork Wed Sep 18 06:15:39 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806598 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: zggmbvynBbTXRwPSf9/LFmVPKgU+CgAo8M7iH8GSyUKOXq20dFidXycWUZ9jLOP9FjBVziW4OsWN1u+hi9f4qtZi2rGaUvmnGm2yc53jZdwsCIvvvhpsDjZS5I5CsXmihFVk2Y7/P5qFlIWJqLYhFbP93qPTmlbdC4+KMCpI48CBwHm+TpP0PppxuEgfdgykxCphHrQGELtR2VX2NagW1SKrxmIkbtNCc/CndHpTfpt0qJvEo3FQxvF/UtgDzLlpRsHec/YukD1mlRb0H17upRgKXzz1MMcdRfR9VgB08ukEqX3/iAHhBhlZeA+08Fws4+9ejET77DpDpCRxTnsiYX3nO9DgpOAWuN2L74y6a1P8PyzbUZtfwFwMk3Jg8P66JcODh6AGGWStWhg/6D6TviKgdBw2rncz11Q7B8M6HGb2ArgQOD3PFcnShL99QMAJtMRheMrMcoTJgPKl5imUuStX4Q2mWWbvD/4Jj/JxQ6aPPZ/jXb/L2ftBzbX//lfP2ENLwU5ZLwFZj3EsTTlFYWIiF8YCQTsVIouY1KgWSjXxki/gC1Fu+Kj5WNFtzkOyUmyijiqMo/WF346pM/Jwpfiu2eltctl5fGo/GjnZTJUyzP8f0bwhmRyBvL6wUovFRCs8cxfGynCKF5Lr3U2HDsv3+0bDXXCJet5PkvTVIOGkspl9zwsYz5wmWM1LMrh+q8Irz1rjkqqI/QwNqdsQTpSZ0kIhu6d5r8L2g3gS3LMvycE7LFMQExZlpjSkNEkpVeAm5pN+aYudqdXWtBnEwlV3ILOv5hr9fgm88n7FHIu+WKi5WpvHzl3OIJrKayIPYrp2Ld+SUb7LmkbtYduZbbD6FFUnxaN1cGa5QY8IsEsgh2Tf6lkYFFOl9gvvt8PaTlaeSzoE9BjPXACXwSoB9XteIG/+4b+/2TWp8Sj03122/T1SLyOhuWRyJIADP0oNvUYE639bB/klkqc/el54rBsNtR1x70xQxJAz6q6eGI2HQ1j04VdM/n2AMrmkJZ/cMqPht7S2xV+ZG9xL4RaLTGFpOqH6F2g2lFWe37LEDDTDIdossYwAnq5i63Tf7xC53I2Uqpx2WlqjX5Ly4/1/oHXaoX/gcgBSyzEvChd1CpZiXOWvPCFrpxmq17rTNjFh6nmYMc6QyhI77ZsM/o/1FUsy0O8r7CCHf9o1MJVcZLWdmYkdf2iBymusCBGNvSoY6j1TX4UJme1l4nF+jhOjfFSA6XjiuVZAGNNr9x63XDDgZLNiDzloSfpeiSG64DU6bRUppZ8DBjXiokGDnq4Fj4HTugzV9sotMdaDPRGu0ztaqGbcelIphlTIaxnwfpEol7MR7uLBAx3JLvElrk0/gblbqoTCkwdFRCfh8x2JKtzfjNrV39CebuLrgR3ZwqMC8FYncHrjnHWIDTrv/4DZtaHrZAqw6WBWPp2gsB4r9j3joq0h2POT2H5Rc13VVIDU 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 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-platform.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; - 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 == 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_dev_data *adata) struct pci_dev *smn_dev; u32 device_id; - if (adata->platform == ACP70) + if (adata->acp_rev == ACP70_PCI_ID) device_id = 0x1507; - else if (adata->platform == ACP71) + else if (adata->acp_rev == ACP71_PCI_ID) device_id = 0x1122; else return -ENODEV; From patchwork Wed Sep 18 06:15:40 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13806599 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-sound@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 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: MqG937KLzLhQIuyUfXrcK8HWV27Vpi9kWrU3F6nHRr7s3ujckApmH13TOhdCTUaXG5D6vYTuYZV7KLwUc+rF4Mzl/NSJTKhmBdKm2hn2HUlsawAXy3MYtmLjIV6AvsfdavVl+OUYtL5mgnP61woAH+JpYJaKmKnNWgYDLDqRZcd8lS1Npgl4Lbv2no+mbpfXgyf1++6+zZ+S2J6WobHj0MKwCwAUzrPuBSdICEw7hvSDp/aO3nPNTDUdxJMyEtkSa9b6YLaX4XWIKc5e5SYCuaHGTwj7y2LnxGiFSlUyrxelQO+sA8EBCmooaYU6PKOUzQLnO/6n9OHr8mWdYCMbjhspEwK9qjNT4k56lrlAj/TFKWacjRvGboUGI30mP85o5TosKZXaboFV1FRgTn3dv4xSsNiwn+DnQSutG1Ycvg1cZr5N06s90QbMKkiwEsC7UZI3IZkyXhpkyxed/oP3qvrsCXQPjb/LUX03PWxs/D8/QBbGOPmcQ0z0GykiBrRFjq8c/PWbkdZ+pK8IFnq7eUbjk5M5cVA9OK0gngBskq+QVaKur3PBm0X9mJIQ5WGtPKiw8SFMB4VZoTMw6mMy2DPxjIo16yh7T3y9gqDSRGYAvZZfD8c+bPqu5JddIYNog1sG8GN7z2t1+gwETKBi6zg9WPpCKhcRcYPUxNnSwNKLm30lJMlvEDHlDJUFFVKBlahnqBcF/0ZklUzsOOv2EX2b6XddGMPj+priIXoQMbyZlYba21w/xsmq4pA2w39woH1En0pBdTAexiT1dt+DDG/uTghfwvI29q7ACNRKdGahzz8fX/Xwwe1/AVfETc1I/aEGfXpnhGrsSB/oTtepYJvLOWWaf3na5+DhqmbQeznQP160tgcpzeg6WA/xbzo3zI/YE08NjriKAX1TYUmQLEkc1RR0q908Hqm1ZEfhNM+Yk12Ik9NzupwOCYHrDch15M0nSZ4aOIwF9CEv88nDTi8sFYovBgzu6SHT9wauR5XFGy2LKj13fLplsJCZthPH/rNXsHOsGVdQwd9gcHQceCbepxXgAZ+JY5PK7hMpmH3P7sn2oJ8gIPJTVGPVbU8SczInAxqXiFOr3MaNBbxKUxwD3yYRer/joEK1ugWiSFyb4cN/CfTMksLJnp0db2aq2HHvSur0+83zaWrqCNtp2q3Tlb3o5gkpsJKyAVJQP+dqDJf+EXb8N3WJ+ymq3AjshJYY26rLDFKoOcwt60gO2QKmZVKg+cK91mdw5kQeZCnxGuzJVBFTIuauhnFquoQIPEdoH89yFRtFQwGt48Y6C9bszaxAMFKPQGEFDQML2DioJrplsozZYWTbr/vynW3HK3xkiO9uS4Eegd6V5djLx0pkJcyrUcwGFgPk4y6pQjdRVxvHH66K0uNSCt4+ugcq8MQybCann5y9qsu9X+y0kniDR68CWRbWXZ0aVZM6DcBcORjFBH32FXNWpQNLVTeO 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 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, }; -enum platform_end_point { - RENOIR = 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-rembrandt.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 = acp_rmb_dai; adata->num_dai = ARRAY_SIZE(acp_rmb_dai); adata->rsrc = &rsrc; - adata->platform = REMBRANDT; adata->acp_rev = chip->acp_rev; adata->flag = chip->flag; adata->is_i2s_config = 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 *pdev) adata->dai_driver = acp_renoir_dai; adata->num_dai = ARRAY_SIZE(acp_renoir_dai); adata->rsrc = &rsrc; - adata->platform = RENOIR; adata->acp_rev = chip->acp_rev; adata->flag = chip->flag; 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 *pdev) adata->dai_driver = acp63_dai; adata->num_dai = ARRAY_SIZE(acp63_dai); adata->rsrc = &rsrc; - adata->platform = ACP63; adata->acp_rev = chip->acp_rev; adata->flag = chip->flag; adata->is_i2s_config = 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_device *pdev) adata->rsrc = &rsrc; adata->machines = snd_soc_acpi_amd_acp70_acp_machines; adata->acp_rev = chip->acp_rev; - if (chip->acp_rev == ACP70_PCI_ID) - adata->platform = ACP70; - else - adata->platform = ACP71; - adata->flag = chip->flag; acp_machine_select(adata); 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; }; enum acp_config {