From patchwork Tue Sep 24 06:18:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810143 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2056.outbound.protection.outlook.com [40.107.220.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 C6C2D79B8E; Tue, 24 Sep 2024 06:18:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.56 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158727; cv=fail; b=EUVbRWtuMtfcYz5jsm/Fokg9OV1bGQ7kZ4bMevlvy3qrDQZZdCXf7c2lUWuql12cfLzkzVwq2Sb+5gqt6MUFnnbTPLgWwG1oSrrHm2VaGX9htBILqbY9jI0CeB8D7ChAnAhb4kNr+vd8ympKz/VnzKxtaMAov8QIa6q63pgEQoE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158727; 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=tOfRvX7gnBR52mrAVsVIYUBKcSYy19GNvuZM4Izt3A2W4uG6Bj8mlbN8Y+2d9kd1hBRNcO00XtAP3TKFJack7HvsxDVbh8okU+YIrJvcdp/9TV/FVyFvram5Mnft8TetXq33CxHJBDMcExF7PxTAtzHuLmi5eMwI9O+4EFtargI= 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=VX60uGXK; arc=fail smtp.client-ip=40.107.220.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="VX60uGXK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=P/Mo+QQqSM6DtW0SY1RTl2X1uSZiTt5DGrqdNpPDOBGpwief1/i6ovNfADeZQfKGqvW7f9spW4U1PTAwxKyN5lz06JmZVWvqxuIdCnsyYvFuYS9DLK1ZRHLR84h+ZSf3PrFHjogRmB8a1y/uWbERV4REEqPDyCu+Uipksi+Q2CszLGRCv/EiXDR6RvTVPW5NJcmxVA5OqDDquv2mHseD/d/hQXfK/p/N5Zt9EISxvuAvOYSraJmh3x4dpho9c5nY5Ng4STxoPUtCgFKuPKNC2pbqcKG1o3g90ZmAIQk0ljRmfSiaLRfvj285B/vZTmskQS6EXuFRqyXz75cOyGP1rw== 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=gV0R/gQQBSyatbnZINHkpBm4Z9gPQ77XKcTrtnzTy5lRLsCsYoZ7BSJKDeb+SRyKDV6Hxd+Lg5utNq+nTMjDisoebFr3KVJmpRlILl28lET4h3HMpYvtg1T9QSaf85eRPKirBEqI8t4T1KXsvPm3e4jjXFED/cYqfoNIEiQRk+pC8safRohzQwromtAxBmh1KsdRaRdxhjzohDHjTZfq/hotuOLix1W3JJsF3SNBg09q6yQjmLlLsx921E3pMn3ioxFJqDqreK6JKUFgv/DXiV4RM5igt26cQ9LqpX1BtZWvXmrjY+oVKq11d5uzLq48JCr9v3LpjvjbTho29rI1BQ== 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=VX60uGXKsYaSnjVjj3yQ0OZXBXIVsJVYCQHqSy54ZP9NFVPqPdIMKXb5d1OjX0pnzul+4JjDFHtHDqtIPAjx0xmtZiheyQBs4aSlbRCJUDTrP+2cQ3xZVpVfMQm19p3VVCP50BJD+Hb4ndvGTYhnsyem9FnIuDphWg1rWWj11b4= Received: from PH8PR07CA0036.namprd07.prod.outlook.com (2603:10b6:510:2cf::9) by PH7PR12MB6978.namprd12.prod.outlook.com (2603:10b6:510:1b8::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 06:18:41 +0000 Received: from SN1PEPF0002BA4E.namprd03.prod.outlook.com (2603:10b6:510:2cf:cafe::f6) by PH8PR07CA0036.outlook.office365.com (2603:10b6:510:2cf::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.26 via Frontend Transport; Tue, 24 Sep 2024 06:18:41 +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 SN1PEPF0002BA4E.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:18:40 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:18:36 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 1/9] ASoC: amd: acp: simplify platform conditional checks code Date: Tue, 24 Sep 2024 11:48:13 +0530 Message-ID: <20240924061821.1127054-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4E:EE_|PH7PR12MB6978:EE_ X-MS-Office365-Filtering-Correlation-Id: 645d06e5-0eb0-466a-5c5a-08dcdc60bbc3 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: 7ykAnYZU+/CWw18PG7zI+ELbRlLcBiV63i+2lNaeMX0287kgHVVuxtl//zUoAiS5ulXrBZ60zs32zknd6CQVKumv7OjnOJqO+5jmv0MnQYiqMnaQbptoliHMSN27SHPpfvcp4sq5v47gu/t8F4XC2U8m91AgXcofbWMsbWf0NTjwPGqiUA/KsB+LjZWZdrVhZW92EftLquWQI2YPK76flQuct9+fh6mAmk9wTXfT1m93Ef7wu0PQagikcix51EeVQchkuIf14nCiXy5CCmh0rrfmImaonDtRN1a0EUApEGkVkOIccAxZgrB/sOKHfgp8DPJPw7KbIxyDIpSzQyMw5YlJGxQCvClHJMXPM2zzeQ+XsmyFsYrzEYO1ruSBAH5cbud4Wd1NrVvYDKrfV2k2WYIG47m4l5ngQnQ9oynde69xZ+b+TLbJA7UHsOKl0i58HYi016dD05+AHrYC6MDIi0YzW/z3prDwwZf74kociZL6OwgP4VX9tZQM9TD/8TumKI7dc2Yc6QRP6xMhEMaKR75+N8l87P4hTOqhwlSpJ0w79H0KcFcTEQG+IrwWxLCAm8SgzarXYUl6Qa8sftE0bEBstLhe1ur3VWXkxT9PlMEEXFLi3i2Wh1XXXcbSbhQPEpJXFjtixWvVsNYMuoPPV3NcRX5V7SZ4YAQKGhTEAJOXa3nivNwagUaYUVuhM6nbN23Dhhl2SlgNpbR9fmIKhrN761MjesUmJ+GXPWT7opJh/3t3vCNaXWc1GhvymJieD3g2sgXod81cdgegTb16drYny2g/QUEepBMQFhz+vxl+thw8IHYtqOiG2IiVYmN9MNp358nPvl0enNJ8vt0w0YE81EU+MRSPziBuY8cosGeCotbWO/UN0/yLnhtRgBljo9X4IYUjdKfNkfEepR+skar+OQfM9agCnE+ptdACeumkwAiitUm37/Gsa9u6IseZkZU21wReXLHlogOTTmlGep1lYKJoI3rX0HJmAMOrHGUk/FZ0osOj3Blsdi+TWPINXuVZ6eqmHHyrAJL27pd+47UTNJcfxTnLWSPC4yuRFrj2srWbT/w11sH6PNxGJtGXE2H0dX9SVoHhczShQ3VrE/LpOYDyApkpuqtiUZhCc8Fhu9cFzbN8Rukhl94rHcehv2S3Xy9j+9h1xuTfqDTinjevYXdPRdmJcK51aokUhC7Clz5SmzMS64rgeIie9vcs1uBgexfJYGnwIjMDPVMQScVuz0esARAxhYyeNd3hv1kQfblh77UWDSYywRjMBTXQE/ftGz2F324+dx5lmNjO/3QYfFoEkPCSRpyeXRYOXLs4LcMau0kyym8cVrmS7U+Lk5bSNfVDglIM+/vUDzWzjzMrse61GtzEOIKaxsQckA3SpIiPHhJG3XDvW8GkxFx7FUtmVC7UagZ7U6tncMxHhX4RLq9YSG5UhjVV2EpWx5WqLdY3QL9jbAkpgte8iGTf 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: 24 Sep 2024 06:18:40.3943 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 645d06e5-0eb0-466a-5c5a-08dcdc60bbc3 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: SN1PEPF0002BA4E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6978 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 Tue Sep 24 06:18:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810144 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2078.outbound.protection.outlook.com [40.107.237.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1114154767; Tue, 24 Sep 2024 06:18:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.78 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158731; cv=fail; b=vC5meXiLOtbtwZHxFr1xI/vkg8rXwKbXVnxEWlJEfObZomVoJtRX7QmgC9S7Vm6PtTiYO+qNRidaywXoK1Elnvg/+LwV+35qd9TpI91SDi28iWnKj18qxckREQeqS9/GNhyr2u2zcrFDR4VGj8wYhd8Ex6XsH0nIwMnIgaIfTxo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158731; c=relaxed/simple; bh=9FniKUlrjazFq6pmMecSwbmKXIuy6lccmoplzJIApc0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ZE+Q2nAVczUPCagc0Ny0FHDPO7dbNM4xtBw7LKl+SEKqIYIJt9rcpwicKBnzXQw/iIQR//O4SKSqf4i7G0eozge+0bi+cuWe2e06M6hEuAiGbv2k1MPAnGKe4naT9I9SYSfNRMbO6Q50nZz5132GVUAIxjnyqCi5gVrFWzj+auk= 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=I1lEaA8U; arc=fail smtp.client-ip=40.107.237.78 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="I1lEaA8U" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=atp+mCdKfZKWyYQ76WZ7ppEVtkkDDEstxYg7vqeADCdd+RxL/0HRdUvU4S5iysIgT/UwZGmnyenJwp+qeR2x/Oidrk33PyXcWyUKHC3mdnQiAsKES2mkP+716cvKKbWBF7CJ2Zq4Mj3unXYDoG+dxUsewPUqvTletjXgsPF+GQYpw/9glO6lmBzeGdy5+abc5JpqfpwWr+UR9JQgCUbr+EVCsmkufBpz1Oq6fqDcubd4FBu+q4LyzD21QoFLwif/wy/OoRmyQ1mbtXKVE8XerF5AdhJd71b0CQUQnhHv+nZXtz2dkokrtHpyZESXunqtLa0IYbC1cC9peXW1ZWssGw== 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=Zg1/IKpKcA4wWYo3f5RklDxGPV7dzj7AAjaCEDfi96/nwQPBucKYTE+PkBCUEc1HYeVvQm2B0dVVIwuKCoW6GhMcJTgPE7fYb1utrBKOfk4om7RFsov94Zz3BefWfx43CmrdclhYgoumj7mueubLlUXTJFAiCsXN+Q1rzB1aoTBExsb0ZS8BGb4SkUwASN4nARKZw1PhVRFranfac4dXyYfKIw6/hM/xBMkKyooWCRLMX5yWf394BT4RGGpCDpXsA0jZcDM6zrVpyAc9G847kaetyPqBwNZHTK8hGMpY5jvii/M/uQzSnkQAGtG95w++TpE5aEEW1iILj390nsZDvg== 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=I1lEaA8UjEu9TROU1i+8QACHCDCquPOmomWZ/jVt4rerkPmq6yNjY+GLtqmVKwpCEQWB5tL1UF4qnedoJ72MeBj5p2gVPA9UKVKYNDkq4gJ0WhPvZMH6+DeMrT5UJHVsmeaKvhcKA0zULydSJ4mQsU81jecOA04y4rZJ++YdsZc= Received: from SN7PR04CA0205.namprd04.prod.outlook.com (2603:10b6:806:126::30) by DS0PR12MB7971.namprd12.prod.outlook.com (2603:10b6:8:14e::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 06:18:44 +0000 Received: from SN1PEPF0002BA52.namprd03.prod.outlook.com (2603:10b6:806:126:cafe::32) by SN7PR04CA0205.outlook.office365.com (2603:10b6:806:126::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7962.30 via Frontend Transport; Tue, 24 Sep 2024 06:18:44 +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 SN1PEPF0002BA52.mail.protection.outlook.com (10.167.242.75) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:18:44 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:18:40 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 2/9] ASoC: amd: acp: use acp_rev for platform specific conditional checks Date: Tue, 24 Sep 2024 11:48:14 +0530 Message-ID: <20240924061821.1127054-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA52:EE_|DS0PR12MB7971:EE_ X-MS-Office365-Filtering-Correlation-Id: 3e650f93-e290-4f24-b42c-08dcdc60be37 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|36860700013|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: NBjmPE0zkI6FyLtM9pz7RphDL0uzRbJp4Z8kgpnRm3lLaFXj4YwK7eFTcXiUrAILeoBCdm+bWeSlDugZ4IqpOJ58OJV5Uu1HXnmruid3S4YUGAt2nxAi2XqFxiIjx+oTQKSbcm/R7aHeAGeEDpQL29jSYsI/9ghnIPShpB80emrc1SzC+8yI6f7aZu631DoUMp712f6vhblCmkG7gdqwxrAzjxXjSYfPESrFM1tz1LoU9GtDw/jNRkFfxZ4DgJ+JkiSwyIHptpZiPwrXOvb7H3TT0ziNzvqh/YXLImtX5rVNUGnLL+zH5ZL5ThrytYQIr/ganQaO0Yo6V1fIxAsVxdKdc/Tb8gZpxV9EehAmGqJqfl0JrjaMe13OqEI/o4ak6zcgKxbH1mmipnIU5TH3ZbxzlLQkFzX4m+k23a/hQKwYha2VKXSliB+6KCi8WXmzRIbCGwpmcEWYAzEjBV/Wvu0HfdY6pS3/zsoHGzSfkTUMbwo85fV31RKiu6SYqFPWiu6qMZOY6cPVk97PdxQxGWgkzQ9SkCEZ2Jsrz8+A9Y1bFv/QjsYOBXyS8ymQatTFCCC0QrClg0GyIXJqHiGVg4SdpP0e3pPwTGLXtjf75pHbNFFEXjHBOPM+57CjMyIk9Xj5R4ug8QtL/HVgESjHz6zBDwM9mlFUh3qP22YOz4KYuwBhwbdNjYyhmJFxYiC/XMcTMvQGa8nlncNU004RVF6lHH1QgtEJ8OnIlI3mxsfHnBjV7Vk1hIYtxy9aEe9vp9tj2eZB7jZm0lHrEz0pzaNDt+aeNE04Agc5kJQ5+8f+ai1Z7s5sdFmwe3+Oc73YCNShQl/nJ7IsbdRh5BDISQ25f44vacM04+vw2rOJCrWtV6uIp4+qereMd3jNXu8dBQwnwepjo10kwsCySCrqZzAzRJHn+SQ/mXqMFOOJrJfj3pPR6tsZ5jdcsa0Swykj11SenLqvAzpWjkbveLzWVQC8BLibc1F19+z4Ad/t6TLIobCFoGc+c6+LyobqY6qEWxu144O53Dv88eZXvaSicv2rfVF02ha1C3GLGLGmmjKKeRr4nn+vEXW1hvv3GQiuPbQC+oqxbTc+CYMS84AV8DzD2BL59wsOMK3Xg6O4hmmuFG/dWpI6H3AOdTW081jcpW1qhpYyondSQdQ7onWk2YTI9R19CWlh+PjdSoBz1ubi+3h2SAT1qtwjXaOXCUcPWKMAJBbFJssIUZia8vMeM2rLky0f8nDp1s7irPXhnWSghUXGT+G6+v6MqfcmNuIEXXrPYnfaCQIqzQxqTU0aOFBGJLh4a/jgocsaegr6GPUmLj6crmxesH53bpA6mDOYkY0FM7Zas0u8TJtBu13zoUl0H+rXjYA3rSE16jxMNhFkBxGxrQ258uFhnLoV4+WPh7/s9KQYxdfnGKI/2lrGT5pW9YmYoroKIYVOvzflINrJztGK6kTHRmhvYiPxJCy/ 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)(36860700013)(82310400026)(1800799024);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 06:18:44.5123 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3e650f93-e290-4f24-b42c-08dcdc60be37 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: SN1PEPF0002BA52.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB7971 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 Tue Sep 24 06:18:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810145 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2074.outbound.protection.outlook.com [40.107.243.74]) (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 0BD3F824AF; Tue, 24 Sep 2024 06:18:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.243.74 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158735; cv=fail; b=atLqJ1AQYmLoP1A/tcVlQpSXCUy2HoM+zw1eC3+exoOo4zAgMrOPi54yZ2RZYoM2NO0xGBGWVeutCAUZsGwoVthrLsTX7BthPA8Flf4sCh6I8lGpB3pnFTLFGCLvF5tO1kLfoYDYIBdZ0mwvZ0w9ofZLnNkVGd0k9B2oq7H5R1E= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158735; c=relaxed/simple; bh=lOX1HUGFHBX1DNs2BNOg1eNej5qsVEYz7keCjTQ/4w4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Iq1n/i9kjpv1gJiK9MC8NuyF5X/45hxjL0VfcxGI7D312W7UIn+CkTrhG/bv89EGT0FTxQf42kYvdMNLGIB2mFOWiJdEC+LTt2r1WjfRexMPqYEQdyuVIre4OYsLZeJSrZqUrFACoqVjmAs/Koo6pHucqxH/APY8LL9NH39eoWY= 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=jjDeuVOZ; arc=fail smtp.client-ip=40.107.243.74 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="jjDeuVOZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=enyo1EDa5eDfZJ2Jjnho1uuiwkg2AEuIbZIYrU1iidytGiTP5GaMQShUDNyK26Pmih0xsNbC4Jx7UHt85vNbPK6w90WqzRYjfCrShDQp25H1NqwQa9MSKt9iTs5PBATnuuoheioZL7DuKzrWx4oa/xn7zHL3VpznLs26I1ySSpKU3oAht9BX3LHNDDrCeg0TbGrL128wTSZH5IjHEIRfJe0DdXdGUDt8TZaDuf+JL3d43XqmoM7HPjOpRr2s369T41FSTfm+iZihYAcfvXbpjmM1oe1P4ej1KMudVdQuV4ew9UFq6wU8a5FVUXVfA+0e5n350pAbw7rz4JaAhpzP0Q== 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=PtsOXUApUJruS4+lmZvQdCBngg/ZcGg8aM/lzChZ3bc5aHcsu5DZnNToLgav2Bfy709aT7IZeGTsmY1oJ0tkAghk6SbNfWCZRcAGqrUINX3ZvR5hx3N3udAwnHG42OGemMTNBIEeKt52RzYr8vzBJzxYw0aImDI1ZD6BJ4BAzO0ejBaYMDFex3JhsHzXndEfGfzNIccxQr/n8gjeQjZDQDzBLD+Yg992Fh4Ubi7PbZ9Tv3RP+8FMNBVu04+QOtkK49sqlFSrPFZAzAhCjS/UdRsMIuK2s0vFb1JOAjUTXDdoFPr4XYpvlCsoBvbRJZa5QcJFd3z8ixpf8TFbSfmaaA== 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=jjDeuVOZvqA6ti7c0oiJXcc5IGa+FwvRaxdNt1vT5jx7bTzeGO37ci03QsnoVon4S78N5i9JEtf8AIy6UKoMv74HFO+R9TnxleR7Ewx/mKlItaN1C5iQ1qp5pwB3R42XwCAv1IPOSSraWawbLVitWkeIu6Rv0faSXJ+3aop2RdQ= Received: from SA9PR13CA0005.namprd13.prod.outlook.com (2603:10b6:806:21::10) by PH7PR12MB6659.namprd12.prod.outlook.com (2603:10b6:510:210::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 06:18:48 +0000 Received: from SN1PEPF0002BA4F.namprd03.prod.outlook.com (2603:10b6:806:21:cafe::67) by SA9PR13CA0005.outlook.office365.com (2603:10b6:806:21::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:18:48 +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 SN1PEPF0002BA4F.mail.protection.outlook.com (10.167.242.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:18:48 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:18:44 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 3/9] ASoC: amd: acp: use acp pci revision id for platform differntiation Date: Tue, 24 Sep 2024 11:48:15 +0530 Message-ID: <20240924061821.1127054-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4F:EE_|PH7PR12MB6659:EE_ X-MS-Office365-Filtering-Correlation-Id: 927674e4-1599-4a16-7a82-08dcdc60c096 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|82310400026|376014|36860700013; X-Microsoft-Antispam-Message-Info: N2AZHnQGtYkiBEQ9DxVh26prIva1fxDIWlZGCHrsC6/5OntTg326dv/zlrz+zpMLTxsdXjkjiw/5FzIYep33/9LagAPD2G45+ddKErtx7kN7TuKFkfVtrigQAjSUnFToJkZLZcPaFG/lOXBJAbkaQJ9cZ/iAS0DMOTdF/6X1+d/tO6mpg2PkzMJxGv68KmgbXszuMMAEqsV7axsfklbP0nK30N7r5gnClKnGA94VnDPL6JKxQV7DtFpIJn5P7J4vUKhSczY/TC4fW9VrkDnFW3xmN/Bpaidzp1IfTWld4S461Ajl5nAYEUSQIeCL3Ea+1Q7pmgXYlASUNqZLdCfJBxeX/sJV2f0eCaPG2h+4Yy2Me1HFBBHG3pbX1JdoVWlNwxwdyfS9tLjkEa6yoLl4sNfNoTN+b8gc3vyAjbryDkUHZOWAEPG6xWlKlXAijdjDyVEJrTOiTU3eCw/p0sDRr4qiqYubk3XXIKEzERfHJlvuHzDDTppJTt5eaAoytkh0fKb6GR/GDmpk5g8O6hajd7MaslcOWPpOz1kmYkhLU6jpJVQ7WltKAQV9SQPnwgnBpMCF9b737hwXNwa+R4/aGxlnVvnSWDrNvsp6aCp9k77mbyz1hvmbL5E67Q8CeYU40vmIpOE5vK6UBvzwCAHJ42+X1HnKXUs4oI12r2AfAzOxDo3dMxYyDcGz0iINHZ5SbDBhT9whd63Rdsp5ERWlMUs0bQNq3vu6C/dfLc4Ndk5urRintIPL44jevQrWKICtiIV9YfJozxhcohBhctDNg4v4Y/84+83gEmLH38b+t0KAYWSIj+eUo7OEqJ+seyXez0UJfsdk84an9IISovziSUdxbTIaxX44WTjcyn7rh6JKD8yah478cWFKrUmpaEHQLQqLhAWk8mm8DGd0DY6ZMkvauhntX+XAVSO4rAgNajt3GLEFrzFc9JTD72q2nbhoEB6hVS4tyiZ/xHYxW9CZwc3U3Ds2p+1UmnguEh8PJ06M7IiUNAcHhrbyXV0iG/r/3SovXSBGYQ61IantIFCk6Qncx1O6AWGQez5FIW0ZpLsluN6plKHa4WeqaHaMXI1Wq9DBUNkJeu5qE/8CZHe+ofaiOTK/YWgKa1JlSX39kQiwmV5VVmKDdqg4/a+PCZQaZz+Eh45lAs2ImNjTvQr3+6YlHcZNLg0aUZYEmPtvrzZxosbCxka+KPNvYaVFqBaM2jTUy/PrtMi/2xgEqI8/R9OTKHSwMwOBHrj5yNQJiENTWkTG/SImOO88wl6jotXQ81JEP3M9kq1HroPe1Rt49xYpwV2NtMo/bDSrhJ+mQSqJ6RFsUeC6WG9WsgW+veLGfzIJlqtkQbN8f1TmS6AHbiU8kvIiefoqQnziu9dbybKjB/A9zgBA75KIVP9vPKkn 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)(376014)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 06:18:48.4888 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 927674e4-1599-4a16-7a82-08dcdc60c096 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: SN1PEPF0002BA4F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6659 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 Tue Sep 24 06:18:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810146 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2046.outbound.protection.outlook.com [40.107.244.46]) (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 5CE3A770F1; Tue, 24 Sep 2024 06:18:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.46 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158738; cv=fail; b=YHXwWClF9FoiUUC+CiDknN8meBSRvD7tAoPoke4HFWGbPqwycgKvYpVrsK5wXY7oW/UIum1kLrxXmSo+kgVLaKpjR24+YbgWyerD491pW0dhh5wNcc23fehk/Ev4I0bMGVj3YWClB0UPd7a8L/bAb2UN+ltPVLZ3V5AhYSf4LQE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158738; c=relaxed/simple; bh=PEVLJXQU6KRun07b6HhrFMfLrce+M0wlO03pfzhboMM=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BfyxuD66E9RWyZDPxE2LQcUXeQOfxTrtEe8uQOyzEKVgPcRm682kX5MRSJIJkLwom7mDKthWpqxurTniy6Sb7qbWQhxoWCqY+kc45DxR9iqxJlFHnKsUye9W9WkJL90Id5NA60if3eXC3R7iufnbB1uGpLtpmT5K7tRSDdSTk5U= 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=h5/mwgn/; arc=fail smtp.client-ip=40.107.244.46 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="h5/mwgn/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xlqR9ypBY7aMs6j0azOXf+omfqwRQ4JFthhZmfc3mqZHu+rTawc34hNeX58n7d9o0+lB8/ZiQoXu+/lbXBDrkbxXjgq4mf3+l7GNgv+Ep/MMHUfHUvnofgYFP9mhjG7wHHHsT0njlSwghDLwmmkoWIhvV5Jf5pIMfAf81zzfnNTPZC1TYmtd9bLVPwAH5vYwZeucKUl4WmqA24NMh2l2IF7XLTxVZsLMwSl2dmK/hvVbBryzhSoabxFTy8Z870C8TSc4N8oMOW0JvMM2mGPr8Bf24XxtkdUW/XxJfVSfjYH0tGTQg9itKk+WuwQO4xfr1yq+p99SSzBu+32S4lGEUA== 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=faaSFe90o6/zahBCLLMq9ZPvuIbH4Ip2kKQ46XI2U557ynCVf/R2YO6/RCrxItekx2DRCCTbTSWqIGZLQGH12SXBdHaQ+n+CLHgNhPPM3Ul8aq5hDs60ewlRgEkMT1WMr8xnUiQwOe3RA3KeqRPHDjFc9EQhMahU3Qq7KKWKQTi6sova6LmMDQo1ERt/FSo013ALoVywpav12Am0X04+x2VsSGPcRDCcUpzFRrhmxY78r+GRLsSFt+FGRu90xEMhJLSEnsHvPIkCH8giMxe9ft7lKPb7Mc+kAH5UwAqilBfLv09W7uamqd/q6L3i0wG5q2T5ZMFhQw61Mu8kdn/vbQ== 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=h5/mwgn/Yk5t6INqYx374XUnec9m0W7rNvl4bsATm9XyTQodzd1s3X3/RYjv6T/G+ZsmJecP5MDjABFn/6UdHbE5+zxC/1eQov/+ppqwRd+ul2PlXaUswqan5kmGU/7ZeueQc9J5WsFtKzbAdFZ5icvLYgfu3faBE+uqbxNV70Q= Received: from SA9PR13CA0006.namprd13.prod.outlook.com (2603:10b6:806:21::11) by IA1PR12MB6625.namprd12.prod.outlook.com (2603:10b6:208:3a3::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 06:18:52 +0000 Received: from SN1PEPF0002BA4F.namprd03.prod.outlook.com (2603:10b6:806:21:cafe::2f) by SA9PR13CA0006.outlook.office365.com (2603:10b6:806:21::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.14 via Frontend Transport; Tue, 24 Sep 2024 06:18:52 +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 SN1PEPF0002BA4F.mail.protection.outlook.com (10.167.242.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:18:52 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:18:48 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 4/9] ASoC: amd: acp: store acp pci rev id in platform driver private structure Date: Tue, 24 Sep 2024 11:48:16 +0530 Message-ID: <20240924061821.1127054-5-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4F:EE_|IA1PR12MB6625:EE_ X-MS-Office365-Filtering-Correlation-Id: 840bf857-cda0-4365-0059-08dcdc60c2c2 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|1800799024|36860700013|82310400026|376014; X-Microsoft-Antispam-Message-Info: LIKND/WbcaB20v86y2l8d9XDXzpOb8fGihGWadJNSfHgBG5QElobK+ceLIFyOlDwfoGdZKPdu7sKVBaogiUrIuIyDJh6nKZb6hDcgImp/rbx/Y3Fm8xsJkhkwhsB+2yj7mIHmlHr86Xn66nDXkbGMICzbsnK0+wbJS1/dxlUcI1F33eQq7DXCzeS4pftqtiyBnLvKP7kJa+gazCiMOde0Ypb7fPb8aruLa8SiGrVot5Xj3FuBcHcYcqiO/IyUV6DmsaKYWFR5g8IfEqJlom7PzHkx8ZL5+c5YtD7G1KGswJURaUUvf0icONPmlofeUAXyWW7I9GuYx3dyZoB/pY8XEkuJljCjswH3LreJMLkz5ccquFwimcoh1zrC1gtRCvut3i877bNtwXCqc5ugELjCnrbBp0/YubNav/GFB7+F93e6uXsreU/4M22G+ySsIWbg2IUgcJXINKnm7VikQK2sJrxAXj8c+weXVE7Z5PsokbDV+U6ZF34ZlLzcvM0a9H0W73dXgBP8kqp4yg74mYXKLNWPPw882pz/1iRfCp63XLaWMlE0AyQv5tg6o/rurTnoTM/xHIu//gxhOpVjtzipJmvFLXfMQbuTtKcyuF4/03nJA0Zb8qZHSvAUrpI78wxTBDt6BRnkNN0v6QhtziRuCf3xXbRSeLD4A0RfI6L35aEFeD3XLfgH/IaUltRNj9E1FUbq2zQPFQg/PE2MIgUIh2utPymkrz0WVErJy7dVS9njCxMCftpGSTu8+NO4eUDvhj87u9DlzGfd4M2stzNHCBd5tAAsrqrLKrWJs9ngpcSiS9bXdj+hm04QGvVLw3gbdDWbZsFk8RMo1rwJKZHA76rocPPsRctmrabSXM+YnEMuATJ3vJkqV5HU6U/IfxEDibFEbslPAvGFBBknhvOz3DWnYBPOv86nfczlmMAzIh/EYOXmNlxrKnG1r/ef2leT9ugNnUXP8WIH0DnsVQJ9+gVDrdug6oLxlLxbLI3lpxaCc1mWFgdqpq9N/xEqER8rJ0dy0rU1+aMNyxLWrdhnt9N3cE00WbIuSZ55rjWGCcxnUz1oCmrgC0cXX9X4h/QV52USXhPOR+rfzZ+fAq7jKEDXYcBvka+aKmWgg24KyVIycrPXQ13m14OUaRma7OFF+42CkC67kebSzssIMzLwY6UcgYDeDjf63TBa8NbnxasTUWmcmgsiVBCHc8WC2a1LuL8tWHi/8UuPgyDmaDZWnL639oaY/1EHnujWEVcBxyRrYOiE2E8oph45hUZwYN9Wzrfi90c3wIQJXWQ1ajUGbnMnFnZLNrNIZNVFXD5IR09dGSiRzrrP5STx8Xk2jso7nBArdv5PoN1RWl5co31hf1lna1oEVRc60SAD51oZ2IFs6hwOBxILPFfIwXD6Htcp6zE7Alz6AD0TFjKoDer/opBDpe0WoIsnfcEuC9U+LO3TT/sFjoqfnrVuzTX488j 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)(36860700013)(82310400026)(376014);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 06:18:52.1451 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 840bf857-cda0-4365-0059-08dcdc60c2c2 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: SN1PEPF0002BA4F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6625 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 Tue Sep 24 06:18:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810147 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2061.outbound.protection.outlook.com [40.107.237.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6F3917F460; Tue, 24 Sep 2024 06:19:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.237.61 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158741; cv=fail; b=sg25FSyXZGIxPv5cj2Va9dcz+PsdvzXv2uTLQQb0FJj/9jTx1hu5j/gSpcGwnmEMxC68Rkx2zftyG5XxDyYD6RvA7j900KM7rrdUM16Hf0Z1yApe5gUKEpEr+lC0knxLlOmeR0UvrfUJfDCXd2YRnlZ3crxyto8vik/d/LJWeDE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158741; 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=gA27iHnSxIYPm52J8MptaED1rmPaDXrY31bcFXKFaoQLdula69PwGBRFsgWxUE+e+Cia2lurKfZ9BrvF+oIYagHiFPLvodj945mrn1oKRxoXUuxVJYe4BhQmfn4l0C2XZbrXaU1vQvafDvMoJk7VBPEQKKrHp5q3ATtlzZUlk+o= 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=fOBWK81q; arc=fail smtp.client-ip=40.107.237.61 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="fOBWK81q" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IN5sbvDCzUvkPPKjE/jbo4IygQSJym2aivmoveu4C6lJRZnonaKI/8uIxFPk7U9DbPtk2nE4KUIuucdsbhMvPJSBY7a5nJkpUI2ER/xxDxDC8GErBBXcluoquS8WzWfIXdnZcQoMAj5rsRIeHhZ6uE/Q4Q8dxcx9VZv34E8B8NQBJt9i7tCM2cJ+jWX/toKXi3QWfwf863yp5A54ZQ54tKg6Gxg8ZGFeuAdy31EgpqFgqFAYN4wRVP5n6ODo97aApDxEXCf/wFQMtiBuQFoLEssizVCkbzBSWMdW5MVZPPmSxQKdl8W0tvpJc/WhbXiVWqs2wwEcNHDJYKELZDoe5A== 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=aZU/L56VuuoG5jifHXE8z9WBrBxmu3X9oUjp9AjavAMdITzjt6pNG+4nSM5/FvRekEM6dzb/zvxn0Z+cPh0HqBsA3Odz85CSnTlWXEfaZdNy/PUEGEBFnTJqmj2QtsES0RSOLw9OU8LXVMlx7HbhNyPlZlTr1hfipXhji9xXLrmodk7Op6bIMEJvBCAXo9DIoLmIf6sci6F+DzauK+kLWmUMt+2tm52y1NABQTTplfnk9x6rPzE3/xTy0cdEeQx+/Y/0qjx+eRif+9EZrClFuIaYKqV+EPuoc31B6IPnS43tIQBBelxHPQUCVoGNNDFSBGJzmptaxP9+ML0S2EKFgg== 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=fOBWK81qihbSJSsNj3khjyBRd2309lTlEqz5Md1uH7dTMKU0/Hw/cwc/p5XtGDPzlkoi0v+X89YDuiNf1EUWlEXgF30q+hs1Q72sjhwWo3zBUKlEIDEcB3zzgYLn9IuQzDnccsh7wjdIj8ScpyvBSCHxftZvWrPevZ0zzyM2ORI= Received: from SA9PR13CA0042.namprd13.prod.outlook.com (2603:10b6:806:22::17) by DM4PR12MB6039.namprd12.prod.outlook.com (2603:10b6:8:aa::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.26; Tue, 24 Sep 2024 06:18:56 +0000 Received: from SN1PEPF0002BA50.namprd03.prod.outlook.com (2603:10b6:806:22:cafe::fb) by SA9PR13CA0042.outlook.office365.com (2603:10b6:806:22::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.16 via Frontend Transport; Tue, 24 Sep 2024 06:18:56 +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 SN1PEPF0002BA50.mail.protection.outlook.com (10.167.242.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Tue, 24 Sep 2024 06:18:56 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:18:52 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 5/9] ASoC: amd: acp: pass acp pci revision id as platform data Date: Tue, 24 Sep 2024 11:48:17 +0530 Message-ID: <20240924061821.1127054-6-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA50:EE_|DM4PR12MB6039:EE_ X-MS-Office365-Filtering-Correlation-Id: d049b8c0-fbce-43a9-4663-08dcdc60c543 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: eIf+3O/YiyA9uY9ZwQIvebocyquybIMzEKVw9iEyyTe8vzlGpd0ilp/FREJp0lE6d2Fxvnp8/Bk9Q/c5loutUcWtIEtVhRWsVMCoxvLQ5wVsAQXSJ9Nxmv4f0oesTp0zeJTNZWsknsdj/ynWJoPshhaV0wuRX8s7+/mXbqoG3gOnv9tlD1pRjPwfFZhmOtHmcvdiLcfGAWeu1BNtjudu2J08YNTVx4tG9c0iRZLODlOAUkv0xhwWMXSgicrlE/AeVa1IGi6weYQWQCF0enpgyEjWf1p5Xmx2njQAan/HskNHfGGXwTitpfBTfBYhjz4+FKnVg0Azruch98Wy90HMatjCGqXzrtAHqtM5ebU0Y4uXUXV4GDjmOPuPiovqteLoGOzv5yXNdcJvythN/CRpGoCA8rHPqUFaBTu4kgk4N9l8Alu4p6eAyBPz6GdhvEZ3HVgYs85gE3KdAk4mjGC/kDii3msbWsl2pggSN0OJk112JguyJHSKTyA16FidY+GxFaTuYiQPCOwb/b1B08wnYvDDr7kMuQBXiUr/BhJrBIK6OEntbniKAnIZ9PvRHy+FWIiylP2kduuGUfJWhhfRX7mTGG0hj8Et9kFAQFXz4oVICzj9dCtuC4PoHKHQG7jtou/w3Z58rHNHQZcYjuFpArXsUCjfGtH3ed3iAtnIIGiNRcLAD1s3VHJsZ2e6yPtbKmxXxnOW8NUyH17mJkv6DxHr7nlgsurQfKoa0n2rTL9Xmha591CEgsd5cz0gc4NWKZy866CDSuDUiGuyO0kZwixA1R4OdRHc/wAOjNkiLiKOcVWsDunG0dnbxu6UrqQutCaQIlNvNE++d+/XurWqWfzsXdEhSjWTwTPAfqN5mV4bSbnz1J/8eoOrRM84Vr40dwfW9hD2Gta6DAeT2nnWWShEBfLhixLJVYNJ3aTH3ChnMFIVHimGndKy5Q/sfKg1WKoJTXYJU9ZbnWISM4aKkwMPIa6DgeI051UtsYem5ZY4EyJwNfDnl+ghJq7f0vjsnpWDIIiYSfYBnnWlpphxnWS/w/O7x7LWTbzZAve0xjkMmRq3qTnQ+UGQ5H3iZn9IeW/KSVCbvXc7i+0d6WK+m48EiFxE4QSz1CG4bu1SNLE+JAouFxTVKLOk9p9JmtLmBTnVVxC32dd4bW8ml7NlVwk0/g8+4KsVa6lnK2Tqb6fNnfN5gKxIpsaSO8/r6vjs8zFWqpcp3y8JG7plhgIBI8O5sLfZMRSmcxqkOju0OcL8LGS1xAo2/SjeIiSJD6/pQ5STxqDb6qF4Jn7U6QsTUDI1xoDO0r99rVuXzFD3MJNwTANdMVDks8KDttYd6TYYh6H8caE7CE3MCYUlddeEhiok34DZnm/IY9zBoTUGy/REvtgMqFM5ihvIJkjXeGViczYS1W9LnQwAgjIkKaAIAkdZn1b/OA7a86+cCIHFiN1gPag01k3l5XXlRgupesCT 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: 24 Sep 2024 06:18:56.3321 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d049b8c0-fbce-43a9-4663-08dcdc60c543 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: SN1PEPF0002BA50.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6039 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 Tue Sep 24 06:18:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810148 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2051.outbound.protection.outlook.com [40.107.94.51]) (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 091E6770F1; Tue, 24 Sep 2024 06:19:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.94.51 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158744; cv=fail; b=e2g32vRylCo2nSQgOTf8OGJJVIxkxQUfEkfcv85cw8X8QcmY7lh7dpuISdA/GU55OtSyYnDkpCWE5lS9Lin+uvA0B9j2mCuK04bwV90SI2/2DKWMP5PRTgokQLEsQTQJern6Knjug53iBQUr13xiwvziCjgkvZUzb+BiXP5LI0A= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158744; c=relaxed/simple; bh=DiAKOqiKFPugbD/RAZwSuLANvdC+UC3LkmazT4ORcBU=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=biUd7vIhtteOMftne4vVs+qjzDck4v5XSXcFUrJti+txoHVduaDm65VQ6wQvNNCIn+oKQDuVIezAtorVIzkbSLrAKrGvRlhbikhubSQ2V++aT4l7tfmFweffihYMh8ZmTrpPE2O7TpmL1FVNwmzEvhpkRlX570/CYoRFTwN5/nQ= 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=jr4KbNcV; arc=fail smtp.client-ip=40.107.94.51 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="jr4KbNcV" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IniRw6TCITl0W95FhAfVEZH3plckLc/3l6CF9GZOsQRO9c71sHxAgJdu3yl9FnCKttQi+pwvt2A+HfD91/AcMJ3xTR2zaaQ8oRSiCO7ybJwJEZCRGxAO3HGZvRzJySmWgl3hxy4s09K+4uZSZodth0+yDTkEZDijP+yOzqejXDKTfYWTuBZkRT1jYLx8JXrhhkamVBgJ5yLrUhQ07KW7gh1NYi1s53Y1ts4P9G7z0fxG+udISsH3pv+BF+QqfPd0m0o8mOOhNkypiYqa3WZJRoadp88emn9hF9bnflCaVVcQBFEFypNSxrgkgrtbHZ9AAsfSplnIEtbGEly15hoNfQ== 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=X46RqgqZ7sreYeGCiFtVznCnB+4XSiFcw4i22prFr1E=; b=gvF2hAvfU8hTep9rJOySXbDgK/sH/Vl+F5WDkQsmOzY74Y+udHoHnNX11O7YsyyfukfGUaCCJnXpeemXjUjHU+zkvvFwI2nP43x71JV95DdwzlXWbHm1vpqL+yd/8koOxF6c2epylg+xcoPL250+rBYQ/YxNuWdUmeedm+ksH4wkqGoNWuSyA7AvTVPQn/axLQ9fk2R7m/v2CDU2luFdNzHTkUzC/prmEBbQGlGycjcbOjXbVX6fP6wZTHvSsdO6Vm6TOgguv5HP33b/Gqar/9rnRKaET41vUYlxzMqCecbhQ7Jny+cSHAFJDdp9TT6YHV3IBEKqJvfl+NnmdopIOg== 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=X46RqgqZ7sreYeGCiFtVznCnB+4XSiFcw4i22prFr1E=; b=jr4KbNcVX7D4xvZfoCuV+l0yxvP6kcBSeKDmxxUVWMnUZWcChL5mET7OxN92MZtRjfCUctsWgee4ztpZoJxgkWl8+n2yh2Ejok6XpD4GqNCJ9QyNO4TV6XOTDyh9kUqWwOQ7P16gLezjDG/+czQIwY7us7k5mpS3OmN0W+mY1Ds= Received: from PH7P220CA0036.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:32b::35) by DM4PR12MB6304.namprd12.prod.outlook.com (2603:10b6:8:a2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 06:18:59 +0000 Received: from SN1PEPF0002BA51.namprd03.prod.outlook.com (2603:10b6:510:32b:cafe::5d) by PH7P220CA0036.outlook.office365.com (2603:10b6:510:32b::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27 via Frontend Transport; Tue, 24 Sep 2024 06:18:59 +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 SN1PEPF0002BA51.mail.protection.outlook.com (10.167.242.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:18:59 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:18:55 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 6/9] ASoC: amd: acp: update mach_params subsystem_rev field Date: Tue, 24 Sep 2024 11:48:18 +0530 Message-ID: <20240924061821.1127054-7-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA51:EE_|DM4PR12MB6304:EE_ X-MS-Office365-Filtering-Correlation-Id: f2888e9a-a731-46a5-2230-08dcdc60c72d 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: MR7VZNPHiPwTjtpICOrSC9xGCm+kkzopvvkhYrcawVyxMIXe5Zo7a87TjG/aJs6kGWwrkbLIxp1mOzgVUP9tYl732ML6SY+B+HrBL5YA2yv6IHOCG5dV2WM7A+tCwKuYC1RB831OfShW05Wu0Z5BWqJFfRwnFRRVeJdDyRel12S1zuYkobAOZBp3dTVP/dkVpkwjG6PIFo8GGxYXaL3/AhqShjxxex2PS2VFbqMj6e/iRjClTJ91SvmwqDwaZIpD8DTyVvBhiTG7nnOMjLvJ/t8u98LDInHpmrvvWB560KZyy5d4xK+40B6HXC3TH6UaRMjV+zsFbtdi7B5JxpoQbRihG32bM/CNkuhsFdOAC3XftIHSPX9gxyJoBCfxE9xkRfEXCPP1yh0+H5O4YI2PAxBkYI6PFaG3zOfzKtez9pdPR4WZsg+xPh60nfscUpzLntFtqcsu+wHTIuDOnTikeExp9freSGt3wiDiYG4JvNT7e6Asnt8Ng0ekGe6dZI5O/DFlYaZfSVcq8dCUwuBQQZQVANBn+BEJroAGIQ0Zr/RmRAzwmb44MpzaP1aVrQ/NLXVHOcPNns0z1uBP7dY2D4pYBXX8FMFmUoAHDDgztrgFwen/sDn9/f5IHhhZUGFxIpaYvk5BjXxWdczG8iUSfQ27cidSLhV/B3uWDtqfm+Nl91iS+1gnPK8qEUr9zGP5P7ojFtilr9wyKFtLtR/P4ANLz45Izz5TfN5tyWqSbb3qe8Fytv9oTgKFYEZLiqVlG4Q0j/xKFmuJipOs3avtxA4SWktnIg712dYtzGUxOpZLnHj95XTmQ8CFdUoRVHw4WVYLZ6GDoaL44kApLg6i9je2OkdFJoCuTaJAz9S5RCSmy655oTk/PBUeKDpD23UMxLGOVxehfN/MnMRIN02haUDFCpHW0Z+5qxccWEIeOXlipTSXcyYbKrM5Mzzakn4E7WGM/FfSMuhI6LcrtapNTdMgj3KPlxc82945t2fYe9irBS5KDrC1nIoLCMjWBxYLKL+Hnhmi/EBhtldSMNGe45WyeH76MakqSuB7GAFsNLpKU+Tf0Bosa6oTUcoaQDOQBzAAlma/PylhRCYpBpEJU8aCyLlldvf5E56RfQGelKcGpeAkwo0jrupkU9x/mWGL26e2/QQ8+h1cBoWL7Y25ZMN3B8hzufaLGi1o4AQ2wjZKlyX4JS67cExQ/MeuhvHlQaCvuMa3xa/dklnqCNrrfLNYU1dxMCf5iHS3p5CRBDhoxHtAdrjcuXSP8ntbG2wI0Nax2ccqtKPMQnk/PHOMorlxn/pTs0hYWutqK29Kc2dhaBVLLAMvenxXvGVNAjKlNuw0wXfdGWf/x49fWqo67QouQrhXuOFgg9RiyPWyNzzRb2iJn0wla70hTKJd0Zr/ 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: 24 Sep 2024 06:18:59.5425 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f2888e9a-a731-46a5-2230-08dcdc60c72d 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: SN1PEPF0002BA51.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6304 Update mach_params subsystem_rev field in acp_machine_select() function with acp pci revision id value. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp/acp-platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c index a6e5cb263377..78fcff6ea657 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -125,6 +125,7 @@ int acp_machine_select(struct acp_dev_data *adata) dev_err(adata->dev, "warning: No matching ASoC machine driver found\n"); return -EINVAL; } + mach->mach_params.subsystem_rev = adata->acp_rev; adata->mach_dev = platform_device_register_data(adata->dev, mach->drv_name, PLATFORM_DEVID_NONE, mach, size); } From patchwork Tue Sep 24 06:18:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810149 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2088.outbound.protection.outlook.com [40.107.220.88]) (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 6C11A811EB; Tue, 24 Sep 2024 06:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.220.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158751; cv=fail; b=Iyv+Bi9L+ZL29q0NMgoXBMEjbjhGa216m7vPmn0u4xBTCBdyxIY/elaI+Tfd8Tl8jYWB47VgnjceXfJmjRp/VEl9u/gObMHOSbj/3SvlrMKIqGZK9JPdpeigxVkMLZNvgyciIaUS+Nonvo1MmUiZ51vBhcVJ21OIChdekY3OLoQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158751; c=relaxed/simple; bh=NWz8knI7us9C5irlKL+Dy3yWgxoAxx/m4OHKjnCG1s4=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=dayVbgvgQMBzkw4SmcezDdyL0RtvyUCw3y2O/zatfUtExExL47znRW4F82XnTap9atHwVCW3fctlckBcd2JrBwGBnH8MK1YaiPWo6+LRqnmtaoRmUbHUIFHvpUJQAqqpcfGtbK7cgzy6mi4CP9ivI/6+gcU/W6geNvmT66C950Y= 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=FqD+iOvM; arc=fail smtp.client-ip=40.107.220.88 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="FqD+iOvM" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=scS4+q9cMGm1119zJ4/lmrFAo6VkCjFGUZli5aOl/kyHas6lxgH6bCiY6Fgpg/bE7lASSE3llFjbzWrkUQsTy+OMvtTYfIiMnNaBk16t1N+sk8UCtZj6WpaJJ4PPT7Gp8xMe83erdfBlcPdHNxfaw3BXSuUXEzASD0gvu36c41c04bbqN7uTk78KOlZcYd7ddZFuxhhtRVWkvbUt3HJJChubZ3/vFZAjdyoZk0bEtYwuxdS/31RU8HWCQmjJVVsCCzwLL4dGewQh0UVxk4ZJ/X+hgThDWqfyOy+P2kNQObr8BqpPQaghbJ0+iLST8pN5DOCEuDkI8Zy112OCg0XrJA== 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=IGcFHpsonQfwglPrrV38oU0IKkBfBdcKQUFM6fzzh3z0oRlEXQJ6Qj6O63wEsADoQzqQb9Hn89xjyp/n4eB+hXLpoRtThzLPbSSqd2hS+sQaoQs8L6aw7QvxS7MQhhH217NVxmErnWDCWcGrYZqYI8k2bYtR2o/yw2FKAj6Z35NZXNv0xBdjMzkOf1EnSeNF0A7b8Cp4GX8D/5eidTu3WWz5oRJv4F4DKMb57WstWjvrmjAhr0mJeh3pYhyfPeJpmexB0ibQQRie9bHivuYBW+MUZc/tHcmP10FQZp57/8/0KmDigkSo0tlCjn0/CVmuTc16q4yolgiNdESPb0LWCQ== 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=FqD+iOvMHxM2vEeu1VDBtNRYImb1KxZOXpGlq8IFGmxLQw5aex8XR0A/45Cl8XqUMLg6c+AaquG8OIrVZdhRXgBuG2uJXL28zkPgFyyxyN5AqXaJOLVJOtP7MHqgmQwfzXnmvk9oqEpPF43oq7DjvuvTZ8M1Mn1oARySeTjj5xw= Received: from PH7PR13CA0021.namprd13.prod.outlook.com (2603:10b6:510:174::29) by CY5PR12MB6599.namprd12.prod.outlook.com (2603:10b6:930:41::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.26; Tue, 24 Sep 2024 06:19:05 +0000 Received: from SN1PEPF0002BA4D.namprd03.prod.outlook.com (2603:10b6:510:174:cafe::3c) by PH7PR13CA0021.outlook.office365.com (2603:10b6:510:174::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:19:05 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF0002BA4D.mail.protection.outlook.com (10.167.242.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Tue, 24 Sep 2024 06:19:05 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:18:59 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 7/9] ASoC: amd: acp: remove unused variable from acp_card_drvdata structure Date: Tue, 24 Sep 2024 11:48:19 +0530 Message-ID: <20240924061821.1127054-8-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4D:EE_|CY5PR12MB6599:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ed41983-2a91-447c-a024-08dcdc60ca80 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: 8tLRYtrTztQhC280/KIF5E66UQYX0vR1BHT+6mNWLAfG6+RLYHGJp1vUmhPfmo4qWccOc6itX22TufyqV5P+s8ka1OnbAytm84V5XEfJheTeNEMi51wh4KZWIk46nJQEXBvgCENOIsb0kyfG/hTjHHFMPjJ4qWbwuQUm+2tgNl0BKaodssz+yinHOPKOIu/WZ42zHXrQH/AkfsjCsXLJ4niZ0h8Ofv6dllz/76sgrJW72A/gZ7WfyFlB1EfbIFyZ9r1ibbuwD6OmAwbXm2cy0nC8Quzcxb9VmSye5M7XRZdDv8qaf/NU5GsGJ5rqwz2G/moFYG5uhQPBV7FIVV3gjfPKgI5QoJ4L+w/SPSqeSIBRce9imlaB/gMK0/nHayIah/6eEiCbYV8XPd5xawBVMOTLkrAmBXCmdVxVCWsp71AxmXgcwjiIXVJzIMQSnk+8AiaNx0OsZV+lPrFzvCqPsxnjssFpOntPS3P9DBg6S3vzT2kc1MkyfvMTFD/F3wpZDEoWi/b8dhMeeku4rcnWD9el0d7hX/0pLujWywwHwWfKIF+gb8Huo/Vag5YTsv0JmT8TAKHJ/3Vqg4SUWMujKTlHW+Fqn7+DIvhtN+fK4jXMMZuk6wV/gqIAHB+TRBX97KtQIDa/AimkbgRiKoEEfik3UArpQGgLkEkfKXgDLpEYjOxII4hsm23t1Yo9QqiXQDFmGudPf/07IXGyqZtyP6gRkg3/yJmz6RA8F4kTRYo4XzzSNkL+Is7YHhaBvMP1Pppied68UXqnC1+0ssovJmmlImUZTEnpNVWiatjeEsosuuWFlY2ej3NH6w79YfMACFqnyzEcLQVBzVj88M843bQ6zOWYv1+lvrQEbRCL9OHA/qFLsA1bQrWNlCl3UIZIxHVFNohVd+P9I80EkAd5y3Y3g5rtnUXBALk8fpmBf5IHYLv3fzsOChHIcLmBJ90MQv/ZzVEN8XlNXTeyu9cVa5wFS1pvB1keLhS72TYVxA8U6HQLQllIlN6G+XIBR7bxEcPZAUaN4IKHEPwORZdiqDkuNQuNM8bRUif0UzpZC9lkgLXwtpBBxHVsbvH3M3NkOThqk5GA9ywn+45b/Q+Ksfoef6po8b8+F/3H92W88w1/V2GHAMkA62cYWsRFf1kqmk8BLd8SPUhwypxdgKz8KBRL4ZBxPp+oPy0MVL6fIvqRyAqm3TwJ1TyDMWC0n79uIm1uyxVcu17lxUNErceCZZ4LwL0LobZXIl9EgHp5ZZbRcw7RuqUnJ8q5IJSMaEaoV2wD8POv+oKs+yr5TM4ZRS301nqIvGN3Pe4cJ+xa9e1WV7hon0hibHa+dHGJEDJhf3bvwqhwc9IsFopPaWC04KKx4vsLWAyyg5rY6cmJGjSqpRZIIrSCDfDE7T4g0Rg6bnwlwCitO7mEJUBWD9Nw+TuM3kfv/HEXP9yE9bEAH3e9vo6eek8AqRJTHENpkFJX 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: 24 Sep 2024 06:19:05.1384 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4ed41983-2a91-447c-a024-08dcdc60ca80 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002BA4D.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY5PR12MB6599 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 Tue Sep 24 06:18:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810150 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2068.outbound.protection.outlook.com [40.107.223.68]) (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 2734253373; Tue, 24 Sep 2024 06:19:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.223.68 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158752; cv=fail; b=sAlbhwyURWr8fIgU0/0B6XMcA46ahJWkzAZ0ZglfCVGuWpnyO6ZzoHe9zBvtb3lwOfRvvtWUm+IeLlkPmQNEibt6HwHb0R1gyLBWw2tq5gW3vzz0+gEHd0yNtCDTMoPxiB2VPU/i3THza8Dc0T4q/TsXLgYtLMPCzSEBYte2dvE= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158752; c=relaxed/simple; bh=KzitV1oxuy1EUDHT8QTklG1V+1PcaT0h3pPBDN287jQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=FdsFr8pakvo1NS9xtCEUaJox9pYS1RMOeKrN/s7RBzlw7fQFPaZPnkJDpfrLhLZCLvCm9S0Nc98yx+4ZsE4p2IWRkB+pq0GaI3QZOO5CZNW69fJ12ZnwpqyJjHqNqmOfDkP8qfcaFWzZ4n7hbkpr6J0SJi+a4UWyC5jhbLiEbdI= 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=l8SjGOYm; arc=fail smtp.client-ip=40.107.223.68 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="l8SjGOYm" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sAVXERx8N/Cz26So9hfSLydumjiBirQEtdrfhFyO00qDkVpaRMtTr+O2jkMojJV/q4VXR2gGuVBfdh93v0D8FsgHEE3W7FFzyyw7o2MTcsR6HBkcl7Rh7HyTWOnMUjUSJje2VgRyxIjMN+7MiBayKjSiRzJ/H1CjaNeUAh5rnu0BBm61Kavi1eEzGZCDfc4oUgq3YgY3KQ93iMFKITUs0cz7znq21NTb+R4SsUApY3UG8e+K0nAQ71z8kx9Ywng3o0FSQBBDtbNSHpQbTrZFilB7XTzBIEYHtinaKhfDMborRXuuZM38ubLQIt9toSTv/sfE+lsH21hKSP2FJmgwyw== 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=yawNe7HEJ3hSME6919ctWPkNP2GbWKg/m6HoWKacOEU=; b=pZeJvfyKu8Yw0Pkj1Ys+K8SB8aglOvJ99npveDEpyY9YJBvckw6KzA1cSb9tEWrcyZ6TUsEphnbiSgqN3k6GyTYuii1VhBDuW8lFJQIFZmx75M7hAOYJsQ+JfZBEvzOoqCHFEk7fHN4RwyEFFtVoN+FVsTFrN5DRpH7wTFhVVkjCxMGBm45ukixdXyNB+qCTBQyOvSjUkJjVd8q/0b70yQpSRVVV/f8gsZPFwRyFUxA3W1CMziqqJZpIQyMay9kAqBD7Zkdg/g1oQ7or2b9U4MBlvTR08Xgqeu6bwB3wTCVm2df2NZ44nnVeQ2XQvbODKq9QvxEVwlO0pYaYHX7IrA== 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=yawNe7HEJ3hSME6919ctWPkNP2GbWKg/m6HoWKacOEU=; b=l8SjGOYmuNQp+mmZ5L4T3eADsCE7hWLxZ6x0/NjF8cT7NKpavf27wUVNuAhZaUrLcToWU9JQxkvTur7QFat90QrqnD+mb5RHQ7WU02pFlv1598txfM1Zen40/RX74XWfse34BagPHhHR9xHN2l57iZ/V3cAPyKrNbaE8dXlt8aM= Received: from PH8PR07CA0030.namprd07.prod.outlook.com (2603:10b6:510:2cf::16) by MW4PR12MB6975.namprd12.prod.outlook.com (2603:10b6:303:20a::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.25; Tue, 24 Sep 2024 06:19:07 +0000 Received: from SN1PEPF0002BA4E.namprd03.prod.outlook.com (2603:10b6:510:2cf:cafe::32) by PH8PR07CA0030.outlook.office365.com (2603:10b6:510:2cf::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27 via Frontend Transport; Tue, 24 Sep 2024 06:19:07 +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 SN1PEPF0002BA4E.mail.protection.outlook.com (10.167.242.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.8005.15 via Frontend Transport; Tue, 24 Sep 2024 06:19:07 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:19:03 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 8/9] ASoC: amd: acp: replace adata->platform conditional check Date: Tue, 24 Sep 2024 11:48:20 +0530 Message-ID: <20240924061821.1127054-9-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA4E:EE_|MW4PR12MB6975:EE_ X-MS-Office365-Filtering-Correlation-Id: 61bd5262-a6f7-4bfa-35ce-08dcdc60cba9 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|376014|1800799024|36860700013; X-Microsoft-Antispam-Message-Info: eAgMQS6E+AbffL5tIoTjqJlnfrHQw4j2Eg0SjadMzOzFJDVHUVHN+wDl8eFqO6h7QsKUd9rsZS0FJIvF+1gpnn+JY0O0Vupi0b4M4M1DhKPHlRaPYY4cA8dEFwX4f3fl/NpuUY6CxuPO5efQHL3gBUlQ4n8Hho2MZZQ1SxFlfFXjZQbWpBLNcgSZWsEVUp5Jn5PvfsnBgS9ceajZYPX36fc4yy1vfu2iKs2PO1eW4TKyMUzQrgt8pElFcZMzrHHKleMvx28jhe2t+50bvWitgDxHmmmfFYnapNoHnQkyZY5FFsrSP5WdxugA6zTuPEAp5iRnCrqPl/FDX0byJuXN3jLj93okhR7vtADY0DHx7Y97dRtPtjcpiVe/IIjbdP5F2RIwyEvYL3USqWI62XazPmXycLR1K6SGNNdDIvwbpoSwtzN1YteTOHLogitZ+nyCWry54v6TahJZuqeBvzw3JDNuNe84B16UhKQClVYO/B2NAVef/ENteZsUDp+LwgdZRXSdQNYOj/i801HDzehnj4GOQM9fG0t1r2SQaGNpkkW8P6WSt79dBOwpnisBZc+aV47/xzzX698wftCBltgvC0LjA/gb5PJQONSj8UxCb3sgR7k3idiy+4OVIwnUtekEKxQXn3hWKxqQX37VwZkKqSL4teCqdH9iiPbtpcEkoNmnvSEvQgwSVm0FGarANbyCqYtVn2R+u9dMui1rJH5N3ECLrJgXFfoWNlX/keGY4g+TqUf3GyqIb6A9RrDDBYqFxG17evM2ghDZKJR07rNiQFEjvjJC10QXbhM7gAoKHqrnQguAMyitzCVI2K2Ij+tXi620Dgk39Js1Xhmza7lD58/eRQva9ORSBfhOQFNB5u0xu/vbX70MzRcYhywXPyZqbbl32w+O2831vu5bdruEz/kdY4E+Pg+uWf5830BRY/KAMXAhKeaT76aZj36SvQ/l789XfrZ4AUu88DASyvUtO4lYPryg86DWzinqJbBTISOW4FnC94GLPCR9yVxhL6jGgkN/EmUiUYuD8QCOOF7FeWP3BrWiXIJunpZifmoL9xQMi59cw42iGtIVz+nona8sDNE2g0IbJidMKNqeSPvfAtg+DraFmVtmOSWvPnFyIkyjL/IxFSiZvJs7HCNkKg2O2/8iVwa4P1HDAMAzQjukziCLWmAm2rrvsL5acp3fpqR9je/WihBEgEwH9w20H6DFvh/Fo/N40E1kGIZH+Q5tO1GZuHdbIeo+EPX4FxNXs5CVcobiQIl7U4QwvftskYFK8rrUKCP+pW1BiJ6oAzy2/yWGNjo3vyOOD0IVMB3Kwjiuf1ydOVE8ASq2BNVbXr8rhj5ioXbE2bIkfNYGux6VlMgxabID98S7TNCD1jf9qF8= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(376014)(1800799024)(36860700013);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Sep 2024 06:19:07.0821 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 61bd5262-a6f7-4bfa-35ce-08dcdc60cba9 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: SN1PEPF0002BA4E.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW4PR12MB6975 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 78fcff6ea657..7be9b4ff7923 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -205,9 +205,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 Tue Sep 24 06:18:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vijendar Mukunda X-Patchwork-Id: 13810151 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2050.outbound.protection.outlook.com [40.107.244.50]) (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 D85CE13A24A; Tue, 24 Sep 2024 06:19:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.244.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158756; cv=fail; b=WYki3xFq7zbqmF0X+U1N8pxF78cA7V0iejZEfWeERCOFp6hSND2S7gNPL3xiqM0095sWIVfErKBN95tXCepeTuI50HvdCv2qCEY6HH879YY5K5XjlzAFjWK5+pym4dm1MeNhyXuTaoPDK3eg/NBk/myJ5sMkMD2wQ/c7v4oDIU4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1727158756; c=relaxed/simple; bh=loQzfQmJhsQ0pWkbcGsa188ZKhzzVpYxkEQOWXeanRE=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=m+mbpIJp/W5ohSix/RjG9BwWFFY6+jyp55LP8zN/bhWICruuS2T8oGBJKsbQQc908PYHBhDiU0P5RRDs4xnHh+SbHopvjddxEuxoZazmjOuon2Ce/K28Cy4tgw8wuaNYAsMXFq2E6AAx/g8kjV5iLJ/QLs05JEbajo+h7uVOClI= 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=ie20jkRH; arc=fail smtp.client-ip=40.107.244.50 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="ie20jkRH" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=M4mv6/+AFj3wmmVga4B2gDOklPzqnzGqRxmOaHC/4FKbbSNJ72Y4AexrRcRzx7lNj2184s1vU8S2GAl0o8UngLBIl9a7vaMzztuRJHHKHHPYbPlEw8107q1nrdO/9N2s8kZ+7Ln59TkQnZP6tHpslz3D6CKtKb57oPcs8K4lxFtY/9/HO19w/6mHSrsDsxaYjLdSlVBMPJPrwdoARVk5CUQuztXuHgA+oUdaVqQgNrlJAKWt7y7qrwWzgaTmXYOzj7BNmilc5MI9Ph6Pmt9OgnlBXHfdO1aPAHq25rkHSfaPkyuEnYKF7dudFWbRhZtGYcY4tO7/rBFgxLAKd1GR5g== 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=yqRqe7Gv+1+rYRCPk21foZbjH+dt1j/HeE0Iz4KdxXRU0mpVCPaZmX2WCCnclcVwMuLNEZvNrzT1s3TkgkSK/ARFhBxI2+WYMzBMQotObSRIHFvlgOqafDWuuvHooA7eoI7wLC3c7WEx8Z9RdnMybm63pdPWtSRj4lIXFA6yuK3446sN/DeS62Y+HPkqU+3/vQH+ot4J0nUZyTKJqcjKtE1G8bOtW8ZXadnx/rc9t6mqCKpctyAphS8HjWF+Z/33093tzjcLTbrPT5FgQlTOwVGxIeHULigNGgnZlivSA5VOEfe3PcC8i9hV4girG1VIu2F+nbl1MyPreFc0BjFDYQ== 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=ie20jkRHrK/WxsWvNiUMXvlHDLdwbg+5LqWGZtS0h7pr2i71yQ6Tc5Y/dZPw57G/4hTTwXgTZ5ewOZkaU84I8PeTHJNForn5L2rVhAnQJ7QAiITy4S2UtNKINoXwAjcf3TCazXE8ZgtssS4m+MS4ZJzVZIU6uvTbw6U3+JLYQ2s= Received: from SA9PR13CA0056.namprd13.prod.outlook.com (2603:10b6:806:22::31) by MW5PR12MB5597.namprd12.prod.outlook.com (2603:10b6:303:192::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.27; Tue, 24 Sep 2024 06:19:11 +0000 Received: from SN1PEPF0002BA50.namprd03.prod.outlook.com (2603:10b6:806:22:cafe::e2) by SA9PR13CA0056.outlook.office365.com (2603:10b6:806:22::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.24 via Frontend Transport; Tue, 24 Sep 2024 06:19:10 +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 SN1PEPF0002BA50.mail.protection.outlook.com (10.167.242.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7918.13 via Frontend Transport; Tue, 24 Sep 2024 06:19:10 +0000 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 24 Sep 2024 01:19:06 -0500 From: Vijendar Mukunda To: CC: , , , , , , , , , "Vijendar Mukunda" Subject: [PATCH V2 9/9] ASoC: amd: acp: remove unused variable from acp platform driver Date: Tue, 24 Sep 2024 11:48:21 +0530 Message-ID: <20240924061821.1127054-10-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240924061821.1127054-1-Vijendar.Mukunda@amd.com> References: <20240924061821.1127054-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: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002BA50:EE_|MW5PR12MB5597:EE_ X-MS-Office365-Filtering-Correlation-Id: dead6033-bd9f-4ac2-6b91-08dcdc60cde5 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: wakeq3q+lZfy6dpyd1Pg+0618ezgobtFHCk+SR/fFVIHrfXFxSsFeT45mk3676nFkB4PshRsj/kXWOIytJ7da/bm2shRuwkONW7p1q39LhTtC0ssxBq2dEp/E1tb/EZ1i5njDlgoB88GWAEznkkG2PpxSDuuSwSbl9hORMZR4HVsGO3/H8ZquMnSN9Dmp32MbE+6swq9SJxyiRXOe/dC46OTl4oS0y7FoQ8gwgomoeMR1L9er1UpWDI3+0Xccpw10w729EYMCr81aulvfe2tGgVRreWYx0flGVJ1NjOiHgXLe9UdlsqD39aBYNcybXPp03aZqDhaom2W2yugmpyAxl6GZppm4hjKs2hqXRV8wgCOzglzwwznGAqKlamCiiDn9pp2BLqiCZw2J6QYwrWADH8Zxc2CfkVDvUZAz6pOrW3qASK3EglDb2vMDwPHD54b3QIBvJtYumEOmvUJQ/apaSk2VTPnDtCoIrX/Mbi60ZcknlZ+swjoj6qDVBRaDr7/vpBXsLa3I2VqGL1bl7ZuDLpfvuDrXdgtVRGyHdi35UNFnAYZz+SJG3GL4QaRD6+7YnIEjCLeJQbjS4fl2LdnqoKxCe4Alr4u1fzybALGG70F3F1boDpHMH0Aq0IqSR8BNmPgj5bbcTiZa6Pywinit1AD6frl8jLrj540JNlB/wU5EgY/S8biHsmxXW2vVGbW2TePCtse/hx+Q4OM2E/3qZgXsVOHLcwHjIwp51QlSeP4SypPr4bzzAmDrzV+Z5YQCjzDe2yjNaZ+4jR9LVt46de/TIy+ohKYpyEfhZEhOta9TGh9a4wlulT0OF+Wjk138wo/C9Pj2HsDsMoiBmHqlsrtES1V0fLRzKeP4vXBasrfLU+ihFjspE7OUIoLcUGZ56DVovaDsEsvoJ9kQVhf3QYiJJCVumJ8E9yWOtHT0Mi6p3jDTz+eRO69SdjWTjKsusbK7UsH9CqSobjTjw8FQt9RziCZztvJDrqDwrDVHyJtBQ7XolOCnMaRrljOr9I1g5Nz3+kVh6U8PEEr/w4+Hku/GM+T+ZKZnMBgF9PTJSHp1HQ96LWuOIT2oovSUygOZ01xIv5PmHjURm4vx74zzZrcppydeFC09XGz7y3pYnKqxJmSW+0obLaQyYEU/OFcD1/t3Hlhxu93AKcFznohY23wywB/KHJ6ug8LpT92UOGogfOSP061yl6xAlcR/FKiIe2ui0Bcri+FnG2tS8LAGOy5/lZx1/KwD63cuAkFphP1FDXpbueNPykc+va8h8ipFGZcO0G8ZeIfjpc+KfZ0G9cQk8LDJW4YEwEU9Pt26iUb2jhNlYu9MwdQIVuqr0WH1vsCEHcD+y2tQThhWp2bRYyCVJILUbxuof2uGAj1Q5+bAXWwtFsRoXGqXX+P6d2Ot6EPH+W2G0maaQBkEt05CQl4Nafy3zqljdgLZ+hbm6RfDXFhc5BhOqRof/wAlDJ+ 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: 24 Sep 2024 06:19:10.8166 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: dead6033-bd9f-4ac2-6b91-08dcdc60cde5 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: SN1PEPF0002BA50.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5597 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 {