From patchwork Tue Sep 3 11:34:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 824964 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2EBACCD13CF for ; Tue, 3 Sep 2024 11:35:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 15427851; Tue, 3 Sep 2024 13:35:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 15427851 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363347; bh=fqrZzJyd8MAy+NtiqjQ9CU8CvY3d+BXPJ3l2U5ZUcas=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=B0rDi2oY7YD8HgWPwI+sa0nraDcub0nlsh07nM2J9pF1UauH+rIEDwdSgcR2WJpVE 8LQ9KBQUxwEzmjVwURUvx4ZVV2kktqBv6TwuEn/DdElYKOQ5r3TNvSRU6FeU+BPafF fcgWZH45BQ3C5SV8QDEwZmpXcBFzntMuWnnxQF4c= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 56370F805BE; Tue, 3 Sep 2024 13:34:56 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 5AA7FF805D3; Tue, 3 Sep 2024 13:34:56 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id DFBC6F80199; Tue, 3 Sep 2024 13:34:49 +0200 (CEST) Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2060b.outbound.protection.outlook.com [IPv6:2a01:111:f403:2409::60b]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D7677F80116 for ; Tue, 3 Sep 2024 13:34:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D7677F80116 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=H94G5Exn ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vZkNDjj3fBqQudlsdHmm483NV0JiWGu21VTdOEkSjHFcQs68r68A216Jx7lxwMwGqBfYH4++7oRKaB+zzKqWK5Dx0GPYWQerQgg3RfUHn3zQDf705uXWe6cUv2W0mth7A8N3iU0YxT4wDUVJxTRJnm6IOYPSJQ6bCVFMSZNL3dtpb2/hiyhCpPG+sIihrBCei4SRUlFRaYBsPArYgNFqwRiA1XpsM8DcRscIcFRxv92Ihe+grdnsR45QWL1Fxp2pyfisKMhzvkdF3sFF8UXTjlrUgXzwP9EBIPuM9wGzt2oGERDAHjJ3hii6eYBreREg5ybsjJX48OUj4CurjB/Q6g== 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=py8u4OX83i/3syVL8qYVVIMaXkGK1P/LrBgXyBaPsf4=; b=MtMLiZzU+5Al3MNk6DilfSjeZMcmicYov1APj/Boz//bcSLXXw0nbehk1rygoixY6TLwwkme5JcsWcARjm4hQspJ7wsRX5WFGg4qc18ac9rsdJNGxKFKtgFOMgXkaGTEdmTv8ZQz6on0P4XvWvTdCm22VKO0e27U6jFwXG6y+lXoMC3N98u5BLwmAYhilqc7toBPszDikOJQsL5gGoacBhYfVY9HHiTvBoO3YWqDE8WVBRn5rZPpuQboFIlO8EGYfWCPy14Z5i2c6QiolOFG9X5ysI8t0A2pq6GFtaSX+b7/zSOHPsULbw0qeEu+nHq7IgcEhDbmK1n/QPqXSgOQPg== 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=py8u4OX83i/3syVL8qYVVIMaXkGK1P/LrBgXyBaPsf4=; b=H94G5ExnfrSfCwwlUBvJ2kwpbvcb+SQJHjSrfFsx4euNkhLhP2YLG4gGX6ge50EjxviscTp0RE8NHHflsBhn/AQ6tM3wOPqcXE5EPS1NdGy/OpEyewu0KeZgc2ZMNHj+i8zMlw3z8xyKpYiM8+mTu0GJbKDDCHhTO+YWwUL2MaE= Received: from BN7PR06CA0066.namprd06.prod.outlook.com (2603:10b6:408:34::43) by PH8PR12MB7278.namprd12.prod.outlook.com (2603:10b6:510:222::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 11:34:42 +0000 Received: from MN1PEPF0000ECD8.namprd02.prod.outlook.com (2603:10b6:408:34:cafe::55) by BN7PR06CA0066.outlook.office365.com (2603:10b6:408:34::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Tue, 3 Sep 2024 11:34:42 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by MN1PEPF0000ECD8.mail.protection.outlook.com (10.167.242.137) 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, 3 Sep 2024 11:34:42 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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, 3 Sep 2024 06:34:41 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:34:32 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Jeff Johnson , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 01/12] ASoC: amd: acp: Refactor TDM slots selction based on acp revision id Date: Tue, 3 Sep 2024 17:04:16 +0530 Message-ID: <20240903113427.182997-2-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECD8:EE_|PH8PR12MB7278:EE_ X-MS-Office365-Filtering-Correlation-Id: 1f79c23c-6eb9-4376-ef57-08dccc0c6716 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|82310400026|36860700013|376014; X-Microsoft-Antispam-Message-Info: mTzmuBrS4PHyEYniTUtV9wq5BjBvJ1CqVRrxj9vtM7fZuQcO8FpTAKwJHXpHMmuRHFUF+1BJbnqk4cuWdtDj/FRxJaGHi9HdpXHQfNbItqITGJWScOeMgYU10GEFI9o7r0ksJI4YIqhPd8/efF0OQAxeBw+YOxcTkNog/5PlZIqC7Op6CT0UfrP+JfdMGQtL8/DXQBFkPiHLD9+KvnvLM9j6/dDdfI/GHmfgmsy8Qt2PEciuJuBcfv24+1ME5/CpaGqWK1rxMZMiuIuVtJwESI0MWF8a+l7nDf+oAymNHSAs9gpwDhWy9I+x/nT4lknP2p5TRUNCZoo0BS5Um/VZiHCw2kpa9l//BgQBzIR+bzTN8T7HbvVBe+RIlbV4P3kHkVpkpKkeDUjNyiImGt8+7okMaYqSvUyW6FJGB8j4he8EVBz5Ad8gf86oFn24yqLUGR/wXMDWDZtLOCGW6B+LX5zqLwzokYtkMjDUR2tMC9jFvyVr+L0Z+wghBq80cUDllWPADQj/UVOVRkSQoM2e4YHy+IMQ1GxxljM0yX0s/rRBfKR2gnc//bb+A28noN8ROXVnl1ZGFpKi8k1SR+VkOZOYMdll14OkCGMqRIUc6T1ZLsMJdoXxCgU6ShuDppoTsL1wuP39bF/6/3FUqbAEXG9nP0glFEnzwtmhVN0+QZA63taQkuQl8WQ2a2H6uVapRvpFFpXVHfxvVVGZQN7nKKPk7b93TE415yQhquhzYP4RuERLxS8lnYXMqmW341UGz0hXGOLlJ+XQNkA4Ltfxj/qw+tIOWuSi2KDhnccoOnS61qdy1TQAzhm7dl3k9ZG/EPFEjjgAKs4JlzdjO6T1Xddg09q2zP0Cuk4lfCzTJP0Wusz/xRoJ25JrMZW+GrouVZ6mzWJxx74IbI1/02Zp8Dj89HielyMeJrlCs2Aui2DADwkV5B7FmFbxpnCovfXSv5vsoknLuj4kjbcYvSrDXtBsqrAGN49f2f0P99lvoHIvahSRNoGh8O/0cXYB9yBSPVhe++7/LmRbBAeZ/XlaET9VRdldISTKtQarGEKeILHNRiXtpKKrdSlBFL4jy2tBwj+g9Bp6lYNlfdFwmSEg8MqfHOJQArPZyzdL1yWAI2LTR4KrxIU1YLY8u0r6nMd/rCGFv+7Nnfgjrr5iEWbQAdiy7fC0MqCbtsZzghRa4aCy40Ik80U6rlmE4U9TQXt4vVZGNrvTPKa4DZ7ysLhK67A0bH8IC5GRIrzNdNmPSSUkeeVrp0q4sP6QPGXGB46h3iMKX5AXe9fs9BxZqCwyq0AW3Mzj6/ur1IpSp2dPXh4UxRD3T/pHeUCVs35xBMyIYo45TW3XrfDUcpg2o6tRDN0ohs5QvX2oSKVU8Bafen8vfj5zWKIjwq2b7st5CN8EBoHLlEWmKomIG0HYYW9mNKRG0mF3h8GDUWyRG6DplXqgzk32L88H+AV8N3mP1D1v X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(82310400026)(36860700013)(376014); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:34:42.0216 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1f79c23c-6eb9-4376-ef57-08dccc0c6716 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: MN1PEPF0000ECD8.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH8PR12MB7278 Message-ID-Hash: BYJHJTHY7AG34XY57BWZF5IZ2FTNLPZA X-Message-ID-Hash: BYJHJTHY7AG34XY57BWZF5IZ2FTNLPZA X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Refactor TDM slots selection based on acp revision id. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-i2s.c | 40 +++++++++++++++++++++++++++---------- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 97258b4cf89b..5d1d27078626 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -95,9 +95,11 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas { struct device *dev = dai->component->dev; struct acp_dev_data *adata = snd_soc_dai_get_drvdata(dai); + struct acp_chip_info *chip; struct acp_stream *stream; int slot_len, no_of_slots; + chip = dev_get_platdata(dev); switch (slot_width) { case SLOT_WIDTH_8: slot_len = 8; @@ -116,15 +118,23 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas return -EINVAL; } - switch (slots) { - case 1 ... 7: - no_of_slots = slots; - break; - case 8: - no_of_slots = 0; + switch (chip->acp_rev) { + case ACP3X_DEV: + case ACP6X_DEV: + switch (slots) { + case 1 ... 7: + no_of_slots = slots; + break; + case 8: + no_of_slots = 0; + break; + default: + dev_err(dev, "Unsupported slots %d\n", slots); + return -EINVAL; + } break; default: - dev_err(dev, "Unsupported slots %d\n", slots); + dev_err(dev, "Unknown chip revision %d\n", chip->acp_rev); return -EINVAL; } @@ -132,12 +142,20 @@ 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) { - if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK) - adata->tdm_tx_fmt[stream->dai_id - 1] = + switch (chip->acp_rev) { + case ACP3X_DEV: + case ACP6X_DEV: + if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK) + adata->tdm_tx_fmt[stream->dai_id - 1] = FRM_LEN | (slots << 15) | (slot_len << 18); - else if (rx_mask && stream->dir == SNDRV_PCM_STREAM_CAPTURE) - adata->tdm_rx_fmt[stream->dai_id - 1] = + else if (rx_mask && stream->dir == SNDRV_PCM_STREAM_CAPTURE) + adata->tdm_rx_fmt[stream->dai_id - 1] = FRM_LEN | (slots << 15) | (slot_len << 18); + break; + default: + dev_err(dev, "Unknown chip revision %d\n", chip->acp_rev); + return -EINVAL; + } } spin_unlock_irq(&adata->acp_lock); return 0; From patchwork Tue Sep 3 11:34:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 825349 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 512EECD13CF for ; Tue, 3 Sep 2024 11:36:04 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 94B4884C; Tue, 3 Sep 2024 13:35:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 94B4884C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363362; bh=mPH1eQkY2c6pfp7i55vbvaSq1AN7XRAZG/wPCY+9Bbc=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TWy2STLCyb9bT1c2zB4+EHSayzUjUE2bBgtA81fsL/zPwjf+n42vl+Q25+iCTffY7 B5heitNVmc0CchoOxJEAntkdfK1M+KSM3ccGTSbXTVkRWPVYICaj+1ze9D6z7yje53 1MBUTVRlOVX/GR31HeIHocYz5t4pKjrsA3TmBKzk= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 530A5F805FF; Tue, 3 Sep 2024 13:35:12 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C3B94F805A0; Tue, 3 Sep 2024 13:35:11 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 61D91F8059F; Tue, 3 Sep 2024 13:35:07 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20606.outbound.protection.outlook.com [IPv6:2a01:111:f403:2414::606]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id E0880F80199 for ; Tue, 3 Sep 2024 13:35:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E0880F80199 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=LJjtrtP1 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=UbOiU7vyAcHUG2dICCZzaWvrO+do/wIwJ/XyG3dxZ6w/W1g0akVIfjrFdQef8kTfW/fGuJXs8+ai4nUCnnRABrS7IxXee5d8ieg8GwX5imP08ZnPHbYEFvPTO47rY1nKsvwbk9KZH7TzKTJg8K5Z4NZJOx9TW1gRUL2nksz4WU82QJsak3kqdQI4DFL6jizFeLu9HioOnVuNbtKPoBdoovnWfqmkG90U53WcwS61GyybZJw/9rB0E0JzSTNckk2DdW0zBhL//YeIFWHje05F7lFBBMbL5lo9jbQa9mU4pjUUa5Unj8z72m53wU0NiR8tIqxMRnlKyL2QtP9D1SMQrA== 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=SG7wZ6YM1q45EvH4nB1/vewtBNpPEVGhKnFgAICTw8w=; b=OODraAG4AaUILrj/cvYxTY7+6eZdOUdDG/c1M9U8zffBQ9P50q6QXV0KT/Fs/Jn/0nSqzR61iaplqbijcludLDaXeONXnP/0LGFBGZIaEF4dqExmzdInY896UcVLXE3nSo4Hw1EuSqI1eEDVgCgEltY2ti+LT0OHPlhDFBWM0W93MVu24OgKxFdn7/5xlu98oOJoM5j+nbp6/NZIVuWYB2UESQYFHULS9mRpzEwWvcCPu3+Ykek3ygt51gKI79J0F0iCDOZlMMVkF38SXonKzZziBA3bZqg3EpBTMWuMqYvdHnJpoO+kSeYo2BqcvQajywftRhI/wzEc4QDORJJo9g== 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=SG7wZ6YM1q45EvH4nB1/vewtBNpPEVGhKnFgAICTw8w=; b=LJjtrtP1+dTVRp3vg05bvQp1I/XxtIZ4mrg8RbPmCNkYOGaLT3TnTO7jdZ1keMokRoSKsLyUmEBYR6r2CDfqwW/seteu5IMuOKzlYf49qhfaNGDnpiOTij7eIMsNaJwELWJXA5013vn2afW+bouHbCN2LQbgEvE6L4Wu5FI6CuE= Received: from DS0PR17CA0018.namprd17.prod.outlook.com (2603:10b6:8:191::18) by CH2PR12MB4120.namprd12.prod.outlook.com (2603:10b6:610:7b::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.23; Tue, 3 Sep 2024 11:34:55 +0000 Received: from DS1PEPF00017097.namprd05.prod.outlook.com (2603:10b6:8:191:cafe::7b) by DS0PR17CA0018.outlook.office365.com (2603:10b6:8:191::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7784.20 via Frontend Transport; Tue, 3 Sep 2024 11:34:55 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF00017097.mail.protection.outlook.com (10.167.18.101) 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, 3 Sep 2024 11:34:54 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:34:54 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:34:53 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:34:45 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , Jeff Johnson , Kuninori Morimoto , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 02/12] ASoC: amd: acp: Refactor I2S dai driver Date: Tue, 3 Sep 2024 17:04:17 +0530 Message-ID: <20240903113427.182997-3-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017097:EE_|CH2PR12MB4120:EE_ X-MS-Office365-Filtering-Correlation-Id: 98cf2d25-547c-47c5-fd80-08dccc0c6ed4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: N6eV2MTWdvrXIXTvA++53RHAGcCdVI73tOkyq0j+WCSM0StQUj1LmHw9hI7wrX/OpGIriZ+nOCE44pxY+zaEZZqGWXTCV4a4oWhRZ2588lEDUEyPHPrnIKs53eqLdH6jcA5IcreeoO8ntGemkIIlzh+zjaN21BqluC7KRNurUUFDI4kPYD6cFHHNMGncS0M/I/vgcYPZsSuLVMwHLX3eUh+hYJqkzi7og4p+KfSGjuvdf5pTQy3e62X7CRQYJ0zNy7g0mK7x3919sp2FNPuatbcTU1tUyYEokGAvnKuzFHOOvYeU+FIAxBk4AtzfUoKedAisZgmFN8fxT/oVLlAEnwRw/0ShiUlnwZFAwWzi/87zChIt646te1MUqMO0V582s3M3gXt6h/zTqML15lThZJ7knHlipPKdt1IPvnzrO4JWtNRJhK7LOzyfkx/kxbrP9HisaEeP4hljebGnTkhmO9E5Gfhobr0tb2piRoIpe3O0MJiAX9creA/b8SM/PcXR1YpS9CJulMJqDrqfLRAjRn8ctNz8h6ArlerWtE7G4pOBBrQd4hBoxIO565K25YtdJKapsfIFBw0fJkoDIoX3a1ZJrcHIiwMaFiK8cTFMBO4Uj1ExDqWvBcEmie47joUo2RuW4k0doEfSIG5QBvFGoPsuq8a0ZhQAc5/tbUygmVg5eWNMyuit5xfLUrr+WZbGeIkETlMHSFax0yZtK5vOghnu82JNn7vx/kkMFCJdIfaAJ7k+n1DiPkifuP0HVILWAtHQkMwRNBjVEEkizcwg8dvRVZFZBoaHgaB4rAtWjCFd+BbZxHn3/2MdHNUrV/6PoRyyPJt9iCbuGinyWL6Vl8mHdwKUPdCu7ew/HK0hkW+V0NU3RH3y3JX5xyHKjqWN02y9kJGcsC+BJvJ6NowSRCQKw/5XQkS/Q3daa+Gz0AAeNJAOEnFFv/Y1zLw0ZDemCk2YMGBVNLnjoGDoq+FqQ2RCYvZ3kiAVeHuKwYC4T908pvPr0zS+8oQsKhM1HzKATHRhMOKb4+I6fmfICIxgD2/ouykleu747wee54PP4u3BBeozwwxxPxOVaubf+5PlWZd2VUV6FU6YzK0rUbxxAFgQaSJ2L3L2PgTmih1QNgSN3xpC7dMnbzqpjnHPjXNNefxGqWrpos2PhP2waPVwhMoe08lW3vKAfviJf28ZJqTBtk2a2D8RwoFRH5/3LpzBGgNTyGPnPEM86zi3kUGF39Mv+l3BVDRccRbaZHH2/K9iQoWhOqBCtphKzxQcfmatLdwAYsI9I6SVZHDaWXkcahYdpX0yCp6y/lRhYhDU1Ywej2b49LrjtzupQtoFf8V1Diq1jt0r8S8b8BuJNoAz2cHjydSXl8M7+QsK0EMhluXqLNaWNRxG+OpsGGbTMXyN+c8n2q8iOI1KbhkCEyQboyxsJ1/rfyYXEUnrzmSJYlg= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:34:54.9956 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98cf2d25-547c-47c5-fd80-08dccc0c6ed4 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017097.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB4120 Message-ID-Hash: 7UW27VPEKP67XBAWRUCGZZROXBVQV3GE X-Message-ID-Hash: 7UW27VPEKP67XBAWRUCGZZROXBVQV3GE X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: All I2S instances are connected to different powertile form acp6.0 onwards, refactor dai driver to support all I2S instances for all acp platforms. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-i2s.c | 49 ++++++++--------- sound/soc/amd/acp/acp-legacy-common.c | 32 +++++------ sound/soc/amd/acp/amd.h | 16 +++--- sound/soc/amd/acp/chip_offset_byte.h | 77 ++++++++++++++------------- 4 files changed, 90 insertions(+), 84 deletions(-) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 5d1d27078626..aca99020120a 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -339,16 +339,16 @@ static int acp_i2s_trigger(struct snd_pcm_substream *substream, int cmd, struct if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { switch (dai->driver->id) { case I2S_BT_INSTANCE: - water_val = ACP_BT_TX_INTR_WATERMARK_SIZE; + water_val = ACP_BT_TX_INTR_WATERMARK_SIZE(adata); reg_val = ACP_BTTDM_ITER; ier_val = ACP_BTTDM_IER; - buf_reg = ACP_BT_TX_RINGBUFSIZE; + buf_reg = ACP_BT_TX_RINGBUFSIZE(adata); break; case I2S_SP_INSTANCE: - water_val = ACP_I2S_TX_INTR_WATERMARK_SIZE; + water_val = ACP_I2S_TX_INTR_WATERMARK_SIZE(adata); reg_val = ACP_I2STDM_ITER; ier_val = ACP_I2STDM_IER; - buf_reg = ACP_I2S_TX_RINGBUFSIZE; + buf_reg = ACP_I2S_TX_RINGBUFSIZE(adata); break; case I2S_HS_INSTANCE: water_val = ACP_HS_TX_INTR_WATERMARK_SIZE; @@ -363,16 +363,16 @@ static int acp_i2s_trigger(struct snd_pcm_substream *substream, int cmd, struct } else { switch (dai->driver->id) { case I2S_BT_INSTANCE: - water_val = ACP_BT_RX_INTR_WATERMARK_SIZE; + water_val = ACP_BT_RX_INTR_WATERMARK_SIZE(adata); reg_val = ACP_BTTDM_IRER; ier_val = ACP_BTTDM_IER; - buf_reg = ACP_BT_RX_RINGBUFSIZE; + buf_reg = ACP_BT_RX_RINGBUFSIZE(adata); break; case I2S_SP_INSTANCE: - water_val = ACP_I2S_RX_INTR_WATERMARK_SIZE; + water_val = ACP_I2S_RX_INTR_WATERMARK_SIZE(adata); reg_val = ACP_I2STDM_IRER; ier_val = ACP_I2STDM_IER; - buf_reg = ACP_I2S_RX_RINGBUFSIZE; + buf_reg = ACP_I2S_RX_RINGBUFSIZE(adata); break; case I2S_HS_INSTANCE: water_val = ACP_HS_RX_INTR_WATERMARK_SIZE; @@ -385,6 +385,7 @@ static int acp_i2s_trigger(struct snd_pcm_substream *substream, int cmd, struct return -EINVAL; } } + writel(period_bytes, adata->acp_base + water_val); writel(buf_size, adata->acp_base + buf_reg); if (rsrc->soc_mclk) @@ -463,43 +464,43 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d switch (dai->driver->id) { case I2S_SP_INSTANCE: if (dir == SNDRV_PCM_STREAM_PLAYBACK) { - reg_dma_size = ACP_I2S_TX_DMA_SIZE; + reg_dma_size = ACP_I2S_TX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + SP_PB_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_I2S_TX_FIFOADDR; - reg_fifo_size = ACP_I2S_TX_FIFOSIZE; + reg_fifo_addr = ACP_I2S_TX_FIFOADDR(adata); + reg_fifo_size = ACP_I2S_TX_FIFOSIZE(adata); phy_addr = I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_I2S_TX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_I2S_TX_RINGBUFADDR(adata)); } else { - reg_dma_size = ACP_I2S_RX_DMA_SIZE; + reg_dma_size = ACP_I2S_RX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + SP_CAPT_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_I2S_RX_FIFOADDR; - reg_fifo_size = ACP_I2S_RX_FIFOSIZE; + reg_fifo_addr = ACP_I2S_RX_FIFOADDR(adata); + reg_fifo_size = ACP_I2S_RX_FIFOSIZE(adata); phy_addr = I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_I2S_RX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_I2S_RX_RINGBUFADDR(adata)); } break; case I2S_BT_INSTANCE: if (dir == SNDRV_PCM_STREAM_PLAYBACK) { - reg_dma_size = ACP_BT_TX_DMA_SIZE; + reg_dma_size = ACP_BT_TX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + BT_PB_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_BT_TX_FIFOADDR; - reg_fifo_size = ACP_BT_TX_FIFOSIZE; + reg_fifo_addr = ACP_BT_TX_FIFOADDR(adata); + reg_fifo_size = ACP_BT_TX_FIFOSIZE(adata); phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_BT_TX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_BT_TX_RINGBUFADDR(adata)); } else { - reg_dma_size = ACP_BT_RX_DMA_SIZE; + reg_dma_size = ACP_BT_RX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + BT_CAPT_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_BT_RX_FIFOADDR; - reg_fifo_size = ACP_BT_RX_FIFOSIZE; + reg_fifo_addr = ACP_BT_RX_FIFOADDR(adata); + reg_fifo_size = ACP_BT_RX_FIFOSIZE(adata); phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_BT_RX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_BT_RX_RINGBUFADDR(adata)); } break; case I2S_HS_INSTANCE: diff --git a/sound/soc/amd/acp/acp-legacy-common.c b/sound/soc/amd/acp/acp-legacy-common.c index 3cc083fac837..be01b178172e 100644 --- a/sound/soc/amd/acp/acp-legacy-common.c +++ b/sound/soc/amd/acp/acp-legacy-common.c @@ -113,40 +113,40 @@ static int set_acp_i2s_dma_fifo(struct snd_pcm_substream *substream, switch (dai->driver->id) { case I2S_SP_INSTANCE: if (dir == SNDRV_PCM_STREAM_PLAYBACK) { - reg_dma_size = ACP_I2S_TX_DMA_SIZE; + reg_dma_size = ACP_I2S_TX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + SP_PB_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_I2S_TX_FIFOADDR; - reg_fifo_size = ACP_I2S_TX_FIFOSIZE; + reg_fifo_addr = ACP_I2S_TX_FIFOADDR(adata); + reg_fifo_size = ACP_I2S_TX_FIFOSIZE(adata); phy_addr = I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_I2S_TX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_I2S_TX_RINGBUFADDR(adata)); } else { - reg_dma_size = ACP_I2S_RX_DMA_SIZE; + reg_dma_size = ACP_I2S_RX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + SP_CAPT_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_I2S_RX_FIFOADDR; - reg_fifo_size = ACP_I2S_RX_FIFOSIZE; + reg_fifo_addr = ACP_I2S_RX_FIFOADDR(adata); + reg_fifo_size = ACP_I2S_RX_FIFOSIZE(adata); phy_addr = I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_I2S_RX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_I2S_RX_RINGBUFADDR(adata)); } break; case I2S_BT_INSTANCE: if (dir == SNDRV_PCM_STREAM_PLAYBACK) { - reg_dma_size = ACP_BT_TX_DMA_SIZE; + reg_dma_size = ACP_BT_TX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + BT_PB_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_BT_TX_FIFOADDR; - reg_fifo_size = ACP_BT_TX_FIFOSIZE; + reg_fifo_addr = ACP_BT_TX_FIFOADDR(adata); + reg_fifo_size = ACP_BT_TX_FIFOSIZE(adata); phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_BT_TX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_BT_TX_RINGBUFADDR(adata)); } else { - reg_dma_size = ACP_BT_RX_DMA_SIZE; + reg_dma_size = ACP_BT_RX_DMA_SIZE(adata); acp_fifo_addr = rsrc->sram_pte_offset + BT_CAPT_FIFO_ADDR_OFFSET; - reg_fifo_addr = ACP_BT_RX_FIFOADDR; - reg_fifo_size = ACP_BT_RX_FIFOSIZE; + reg_fifo_addr = ACP_BT_RX_FIFOADDR(adata); + reg_fifo_size = ACP_BT_RX_FIFOSIZE(adata); phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; - writel(phy_addr, adata->acp_base + ACP_BT_RX_RINGBUFADDR); + writel(phy_addr, adata->acp_base + ACP_BT_RX_RINGBUFADDR(adata)); } break; case I2S_HS_INSTANCE: diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index 4f0cd7dd04e5..9fb4e234d518 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -259,12 +259,12 @@ static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int if (direction == SNDRV_PCM_STREAM_PLAYBACK) { switch (dai_id) { case I2S_BT_INSTANCE: - high = readl(adata->acp_base + ACP_BT_TX_LINEARPOSITIONCNTR_HIGH); - low = readl(adata->acp_base + ACP_BT_TX_LINEARPOSITIONCNTR_LOW); + high = readl(adata->acp_base + ACP_BT_TX_LINEARPOSITIONCNTR_HIGH(adata)); + low = readl(adata->acp_base + ACP_BT_TX_LINEARPOSITIONCNTR_LOW(adata)); break; case I2S_SP_INSTANCE: - high = readl(adata->acp_base + ACP_I2S_TX_LINEARPOSITIONCNTR_HIGH); - low = readl(adata->acp_base + ACP_I2S_TX_LINEARPOSITIONCNTR_LOW); + high = readl(adata->acp_base + ACP_I2S_TX_LINEARPOSITIONCNTR_HIGH(adata)); + low = readl(adata->acp_base + ACP_I2S_TX_LINEARPOSITIONCNTR_LOW(adata)); break; case I2S_HS_INSTANCE: high = readl(adata->acp_base + ACP_HS_TX_LINEARPOSITIONCNTR_HIGH); @@ -277,12 +277,12 @@ static inline u64 acp_get_byte_count(struct acp_dev_data *adata, int dai_id, int } else { switch (dai_id) { case I2S_BT_INSTANCE: - high = readl(adata->acp_base + ACP_BT_RX_LINEARPOSITIONCNTR_HIGH); - low = readl(adata->acp_base + ACP_BT_RX_LINEARPOSITIONCNTR_LOW); + high = readl(adata->acp_base + ACP_BT_RX_LINEARPOSITIONCNTR_HIGH(adata)); + low = readl(adata->acp_base + ACP_BT_RX_LINEARPOSITIONCNTR_LOW(adata)); break; case I2S_SP_INSTANCE: - high = readl(adata->acp_base + ACP_I2S_RX_LINEARPOSITIONCNTR_HIGH); - low = readl(adata->acp_base + ACP_I2S_RX_LINEARPOSITIONCNTR_LOW); + high = readl(adata->acp_base + ACP_I2S_RX_LINEARPOSITIONCNTR_HIGH(adata)); + low = readl(adata->acp_base + ACP_I2S_RX_LINEARPOSITIONCNTR_LOW(adata)); break; case I2S_HS_INSTANCE: high = readl(adata->acp_base + ACP_HS_RX_LINEARPOSITIONCNTR_HIGH); diff --git a/sound/soc/amd/acp/chip_offset_byte.h b/sound/soc/amd/acp/chip_offset_byte.h index 18da734c0e9e..97b8b49f1e64 100644 --- a/sound/soc/amd/acp/chip_offset_byte.h +++ b/sound/soc/amd/acp/chip_offset_byte.h @@ -32,42 +32,47 @@ /* Registers from ACP_AUDIO_BUFFERS block */ -#define ACP_I2S_RX_RINGBUFADDR 0x2000 -#define ACP_I2S_RX_RINGBUFSIZE 0x2004 -#define ACP_I2S_RX_LINKPOSITIONCNTR 0x2008 -#define ACP_I2S_RX_FIFOADDR 0x200C -#define ACP_I2S_RX_FIFOSIZE 0x2010 -#define ACP_I2S_RX_DMA_SIZE 0x2014 -#define ACP_I2S_RX_LINEARPOSITIONCNTR_HIGH 0x2018 -#define ACP_I2S_RX_LINEARPOSITIONCNTR_LOW 0x201C -#define ACP_I2S_RX_INTR_WATERMARK_SIZE 0x2020 -#define ACP_I2S_TX_RINGBUFADDR 0x2024 -#define ACP_I2S_TX_RINGBUFSIZE 0x2028 -#define ACP_I2S_TX_LINKPOSITIONCNTR 0x202C -#define ACP_I2S_TX_FIFOADDR 0x2030 -#define ACP_I2S_TX_FIFOSIZE 0x2034 -#define ACP_I2S_TX_DMA_SIZE 0x2038 -#define ACP_I2S_TX_LINEARPOSITIONCNTR_HIGH 0x203C -#define ACP_I2S_TX_LINEARPOSITIONCNTR_LOW 0x2040 -#define ACP_I2S_TX_INTR_WATERMARK_SIZE 0x2044 -#define ACP_BT_RX_RINGBUFADDR 0x2048 -#define ACP_BT_RX_RINGBUFSIZE 0x204C -#define ACP_BT_RX_LINKPOSITIONCNTR 0x2050 -#define ACP_BT_RX_FIFOADDR 0x2054 -#define ACP_BT_RX_FIFOSIZE 0x2058 -#define ACP_BT_RX_DMA_SIZE 0x205C -#define ACP_BT_RX_LINEARPOSITIONCNTR_HIGH 0x2060 -#define ACP_BT_RX_LINEARPOSITIONCNTR_LOW 0x2064 -#define ACP_BT_RX_INTR_WATERMARK_SIZE 0x2068 -#define ACP_BT_TX_RINGBUFADDR 0x206C -#define ACP_BT_TX_RINGBUFSIZE 0x2070 -#define ACP_BT_TX_LINKPOSITIONCNTR 0x2074 -#define ACP_BT_TX_FIFOADDR 0x2078 -#define ACP_BT_TX_FIFOSIZE 0x207C -#define ACP_BT_TX_DMA_SIZE 0x2080 -#define ACP_BT_TX_LINEARPOSITIONCNTR_HIGH 0x2084 -#define ACP_BT_TX_LINEARPOSITIONCNTR_LOW 0x2088 -#define ACP_BT_TX_INTR_WATERMARK_SIZE 0x208C +#define ACP_I2S_REG_ADDR(acp_adata, addr) \ + ((addr) + (acp_adata->rsrc->irqp_used * \ + acp_adata->rsrc->irq_reg_offset)) + +#define ACP_I2S_RX_RINGBUFADDR(adata) ACP_I2S_REG_ADDR(adata, 0x2000) +#define ACP_I2S_RX_RINGBUFSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2004) +#define ACP_I2S_RX_LINKPOSITIONCNTR(adata) ACP_I2S_REG_ADDR(adata, 0x2008) +#define ACP_I2S_RX_FIFOADDR(adata) ACP_I2S_REG_ADDR(adata, 0x200C) +#define ACP_I2S_RX_FIFOSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2010) +#define ACP_I2S_RX_DMA_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2014) +#define ACP_I2S_RX_LINEARPOSITIONCNTR_HIGH(adata) ACP_I2S_REG_ADDR(adata, 0x2018) +#define ACP_I2S_RX_LINEARPOSITIONCNTR_LOW(adata) ACP_I2S_REG_ADDR(adata, 0x201C) +#define ACP_I2S_RX_INTR_WATERMARK_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2020) +#define ACP_I2S_TX_RINGBUFADDR(adata) ACP_I2S_REG_ADDR(adata, 0x2024) +#define ACP_I2S_TX_RINGBUFSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2028) +#define ACP_I2S_TX_LINKPOSITIONCNTR(adata) ACP_I2S_REG_ADDR(adata, 0x202C) +#define ACP_I2S_TX_FIFOADDR(adata) ACP_I2S_REG_ADDR(adata, 0x2030) +#define ACP_I2S_TX_FIFOSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2034) +#define ACP_I2S_TX_DMA_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2038) +#define ACP_I2S_TX_LINEARPOSITIONCNTR_HIGH(adata) ACP_I2S_REG_ADDR(adata, 0x203C) +#define ACP_I2S_TX_LINEARPOSITIONCNTR_LOW(adata) ACP_I2S_REG_ADDR(adata, 0x2040) +#define ACP_I2S_TX_INTR_WATERMARK_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2044) +#define ACP_BT_RX_RINGBUFADDR(adata) ACP_I2S_REG_ADDR(adata, 0x2048) +#define ACP_BT_RX_RINGBUFSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x204C) +#define ACP_BT_RX_LINKPOSITIONCNTR(adata) ACP_I2S_REG_ADDR(adata, 0x2050) +#define ACP_BT_RX_FIFOADDR(adata) ACP_I2S_REG_ADDR(adata, 0x2054) +#define ACP_BT_RX_FIFOSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2058) +#define ACP_BT_RX_DMA_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x205C) +#define ACP_BT_RX_LINEARPOSITIONCNTR_HIGH(adata) ACP_I2S_REG_ADDR(adata, 0x2060) +#define ACP_BT_RX_LINEARPOSITIONCNTR_LOW(adata) ACP_I2S_REG_ADDR(adata, 0x2064) +#define ACP_BT_RX_INTR_WATERMARK_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2068) +#define ACP_BT_TX_RINGBUFADDR(adata) ACP_I2S_REG_ADDR(adata, 0x206C) +#define ACP_BT_TX_RINGBUFSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2070) +#define ACP_BT_TX_LINKPOSITIONCNTR(adata) ACP_I2S_REG_ADDR(adata, 0x2074) +#define ACP_BT_TX_FIFOADDR(adata) ACP_I2S_REG_ADDR(adata, 0x2078) +#define ACP_BT_TX_FIFOSIZE(adata) ACP_I2S_REG_ADDR(adata, 0x207C) +#define ACP_BT_TX_DMA_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x2080) +#define ACP_BT_TX_LINEARPOSITIONCNTR_HIGH(adata) ACP_I2S_REG_ADDR(adata, 0x2084) +#define ACP_BT_TX_LINEARPOSITIONCNTR_LOW(adata) ACP_I2S_REG_ADDR(adata, 0x2088) +#define ACP_BT_TX_INTR_WATERMARK_SIZE(adata) ACP_I2S_REG_ADDR(adata, 0x208C) + #define ACP_HS_RX_RINGBUFADDR 0x3A90 #define ACP_HS_RX_RINGBUFSIZE 0x3A94 #define ACP_HS_RX_LINKPOSITIONCNTR 0x3A98 From patchwork Tue Sep 3 11:34:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 824963 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 7369BCD13CF for ; Tue, 3 Sep 2024 11:36:21 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CBFA0B65; Tue, 3 Sep 2024 13:36:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CBFA0B65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363379; bh=nlUWORNFd9KOa1CXYjKJZUeQgBqU/os8bdvHeLxrru8=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=L7Zjo+AOkaan4UaTA5B71leeJgeiZMY7v9QOK2DWwIX5zrKD/iH/ulSTpGce+qzhC c4hmspSlps35IZVEJ6WUmgPwwwmHuHInyjYxlTPuwUUiqB7KyFf689y+d2kGrEwTi5 SqwcoWTJiM9xdVtT3wJcYGKagfFgLnLM5Gek5SUE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B3B8DF80615; Tue, 3 Sep 2024 13:35:18 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id D5390F8061D; Tue, 3 Sep 2024 13:35:17 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0FE0DF8060D; Tue, 3 Sep 2024 13:35:14 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20621.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::621]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0B4A0F8060B for ; Tue, 3 Sep 2024 13:35:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0B4A0F8060B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=H4vYXqvg ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=NaO7ua3s5nR/+abpx3MTlvkLjVEmvGKvIDdH0xYdh4kdjxOsyY0I8DdG3EKxcvG9qZJ4rQuFJVKhtphFxZ+lkoX1rEyP9LRz2aWGAq/5kLaqDPlWQF+CCJ7uBgkc+jKv90T2r2vwWzkqFfdNELTz2mM8K8Mf8rbHbNAQb2XbJgXbG89PiQdAx+3GSAv2yu9YuSyLkxEwq6Uk25v75pFSrHsdW2ogNhnbyGFyeQker7GLDemvS0NjV2F50x+bJZfYtFKvwaZzKAEzc0x4cJ2rbG4W0VC3I3GvSZ4OT0RsAxrzKoEiLdOz5zfdQzUky7A/Qo/VUZAEZTXFW3LcAd7wpQ== 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=xWiDPIkzvQd5Q44FRgFW2oHAncOpqnss+4Ve0U1l7Qg=; b=CODmWzh+eA4WugEy1wWoHitRinSnSP2D+wk8OXO2ZCV7mWUFY4jliqo9C4dTiWrj4nNZVQ+qBG5gWsIBamI7QFgyhAzDTsfJps8aSFrUhb1gvadwIL19xlOSYsF0ryOlVp4s/Z9ckewHmIw5z8sQ66VK1bSojPF9h05gEIYHRnyOiGZlHQ7+SYSE7z2oAJO8Xwc8CGnp2loKhWXYysZ3auvdTpHkoZ6Z3J51uMOQEmd8ZMA6elU2ZBqu20UDv9g63qkaI4IU77sETMwdmc6moVxhd4LM/zfbb3f5Kl719ylC7a/YkY9ao7N+09BQURAB+MfOrWA8BCqPR+OomlF1oQ== 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=xWiDPIkzvQd5Q44FRgFW2oHAncOpqnss+4Ve0U1l7Qg=; b=H4vYXqvgVvsOByxQvM9ihNZ64uOTtjMTndlXBi3wC4a+1SNRgoAdllEAlLFEVspIgk8iL7o9CLlpNytWENaOKdaHHs87AEAmxk7ZykNqESuvaRXSdIeHeqSlgZySdwvWcT8mMHweCLZWKay7aLq9OWE0FIvdB+sraDmrzewdlUM= Received: from DS7PR03CA0331.namprd03.prod.outlook.com (2603:10b6:8:55::26) by CYXPR12MB9426.namprd12.prod.outlook.com (2603:10b6:930:e3::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Tue, 3 Sep 2024 11:35:05 +0000 Received: from DS1PEPF00017098.namprd05.prod.outlook.com (2603:10b6:8:55:cafe::67) by DS7PR03CA0331.outlook.office365.com (2603:10b6:8:55::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Tue, 3 Sep 2024 11:35:04 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF00017098.mail.protection.outlook.com (10.167.18.102) 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, 3 Sep 2024 11:35:04 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:35:04 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:35:03 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:34:55 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 03/12] ASoC: amd: acp: Update pcm hardware capabilities for acp6.3 platform Date: Tue, 3 Sep 2024 17:04:18 +0530 Message-ID: <20240903113427.182997-4-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017098:EE_|CYXPR12MB9426:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b5960aa-c78f-449b-7945-08dccc0c74ae 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: tI+Ft6PZifUk9qCxjtKyEXr8/oM9gqDVgWmkOuIs07/eySKYqtiTDJb7IadwI3q3zjrAg6mUvSUN5Fhljorm1/VGqgt8FwByQNyD0tF0hgNjkRBttAGv/PWaRddN43OsKzG8UoxNUctY+niag2quyRTp+npEHpk4ZWjq/6c0Y8h/Xf/MTgYLD5p++S6abTU3HeW2jl9hbW864+eVbKqMDtCNvG2EZPKzuoCLiczQb+vrIxONUmCdD+dDC1F/zPwFaIEOnOagI52E76EcxqURJOPhgQE2hD18Ang9DupcZUxI8Bid4PHJqnmE6BswnP3k6BKOYP1sktok3lpy1YOI2qz3aO8jNjrOaaO3qhp3vYfO8hdbwNZdatmFRbmnF4FjUcMyjzwiQgJvgz/jHC69P9EDSKNw87ZbKclLXJ1uH0CAsHwq3SIHnZ7vKcxkoDpS/EVpLjU8g/acMZuqZqlyiGcoSaycjPNlGXvaWj4m2l3CDhu3i4mZGifne59v1wqJ+dO3KyjVb5TJ5Wnyff/Lk9Dw+/E5NvTxOb2+Ded9aXiILgZcA7ijesgpqWoquec8Un2Y90UJQOM4BXaPAj8W9AXH4p7GlRHm4xiQTOKTRyxOjuBksfWr47EFHOjsgEnvnOCK2cJ5TPuq4G+eMWVZZfPL5tlh4KrvVKNvBcoChzvaPDXPqGE0WjrhByG3272bitXlXAOB05UC1Axf2aEZNuZJh2zPjb0b4UfcZdonuRkFjcC9rSfHz0YqV6NJN20SPLnwzc0b+x/Lczaz0e7OtJyEaMILY836CZDX1S2eDMqJgw8/0eJMs/Cl3YekHQLpSrU61P0zUAKdPqDz/4Lf5jIaAe/p2z/1SlhRu4UM23woW9gLolaW6YDfdfBRvojRvGpwvNaktCflR4CbHofzos6YklA6yBcKYc/K/RBlr/CgfHcNM7cGhOSdfvPClgdIXhzBRCtHDUP4nQ1/p9Ba17EzaPxlrHkXQnavw6iU6KLKPxU/opq3Xbf0R7p1E6o3ct1/kwBfF3n6vMJbCfvmkr+s7tTi1tRhZgy+LFuNdDri5HP4zi+Zf5qOs20Pk+hezT+N20vYmSH38B5oGryc47/wUBALFXON4bREcYxme6oQWF/zaKInK6hys2rpRpHNBAY20PnOdtMvU9N9O4l1OP/UfSJuHKJVd/EbL3erJpVhuQMl1CQtBxVcDI5E6m/qkrLezDiVb17GvFELyi4iOFTR8NhM5VtjKCUKyeQ9IRaLj9Qcp2pp0lLOvNLI7p0YzbrxWdZBuF0GmTPI0nyiCggEdeAGMygl5akHDfXOwcqYsycQewilXKiMAyVlJ1+Z1jQJ72d8D44IkktsKcIoXA/skp7JaodBIFKc0lIoePDFk2yLlOjign7u0GNosunqSrsGKvFOtl/tTfUJP4Dl3bks54tcPEB0nM1D2p5FpNv0I1Ij5heedok9i5dPHugO X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.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: 03 Sep 2024 11:35:04.8095 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b5960aa-c78f-449b-7945-08dccc0c74ae 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017098.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CYXPR12MB9426 Message-ID-Hash: DD3VLCJMWHFEROQY3BFD7PBP5CYYMW46 X-Message-ID-Hash: DD3VLCJMWHFEROQY3BFD7PBP5CYYMW46 X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Update pcm hardware capabilities based on acp revision id. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-platform.c | 61 +++++++++++++++++++++++++++++--- 1 file changed, 56 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c index 4f409cd09c11..238b4f648f44 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -68,6 +68,46 @@ static const struct snd_pcm_hardware acp_pcm_hardware_capture = { .periods_max = CAPTURE_MAX_NUM_PERIODS, }; +static const struct snd_pcm_hardware acp6x_pcm_hardware_playback = { + .info = SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S32_LE, + .channels_min = 2, + .channels_max = 32, + .rates = SNDRV_PCM_RATE_8000_192000, + .rate_min = 8000, + .rate_max = 192000, + .buffer_bytes_max = PLAYBACK_MAX_NUM_PERIODS * PLAYBACK_MAX_PERIOD_SIZE, + .period_bytes_min = PLAYBACK_MIN_PERIOD_SIZE, + .period_bytes_max = PLAYBACK_MAX_PERIOD_SIZE, + .periods_min = PLAYBACK_MIN_NUM_PERIODS, + .periods_max = PLAYBACK_MAX_NUM_PERIODS, +}; + +static const struct snd_pcm_hardware acp6x_pcm_hardware_capture = { + .info = SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | + SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S24_LE | + SNDRV_PCM_FMTBIT_S32_LE, + .channels_min = 2, + .channels_max = 32, + .rates = SNDRV_PCM_RATE_8000_192000, + .rate_min = 8000, + .rate_max = 192000, + .buffer_bytes_max = CAPTURE_MAX_NUM_PERIODS * CAPTURE_MAX_PERIOD_SIZE, + .period_bytes_min = CAPTURE_MIN_PERIOD_SIZE, + .period_bytes_max = CAPTURE_MAX_PERIOD_SIZE, + .periods_min = CAPTURE_MIN_NUM_PERIODS, + .periods_max = CAPTURE_MAX_NUM_PERIODS, +}; + int acp_machine_select(struct acp_dev_data *adata) { struct snd_soc_acpi_mach *mach; @@ -183,6 +223,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs struct snd_pcm_runtime *runtime = substream->runtime; struct device *dev = component->dev; struct acp_dev_data *adata = dev_get_drvdata(dev); + struct acp_chip_info *chip; struct acp_stream *stream; int ret; @@ -191,11 +232,21 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs return -ENOMEM; stream->substream = substream; - - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) - runtime->hw = acp_pcm_hardware_playback; - else - runtime->hw = acp_pcm_hardware_capture; + chip = dev_get_platdata(dev); + switch (chip->acp_rev) { + case ACP63_DEV: + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + runtime->hw = acp6x_pcm_hardware_playback; + else + runtime->hw = acp6x_pcm_hardware_capture; + break; + default: + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) + runtime->hw = acp_pcm_hardware_playback; + else + runtime->hw = acp_pcm_hardware_capture; + break; + } ret = snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, DMA_SIZE); if (ret) { From patchwork Tue Sep 3 11:34:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 825348 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BDF8ACD13CF for ; Tue, 3 Sep 2024 11:36:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 72264DF8; Tue, 3 Sep 2024 13:36:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 72264DF8 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363393; bh=yBlgtCI0vR0scXorGL7tJ8nY3CXONw5Ic0CbiCgtGc0=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=q7yrA0Yqr0yELsfLdRzX1n4vtb4douN1dh4WVlkSGKGBoZ0LsiSRn7a26nVC16KBb kzHLnJgsptHE0Z6TarBK23Kd/OdnVHg7NRUM1NyK0Fauizg+h+Oe59bDDgO7uXZ/cd RZdQTc1ns4AW+dXGoju2dUmPjsI2HMnljoGDwCwg= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 09A0DF8063E; Tue, 3 Sep 2024 13:35:27 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 57D73F80641; Tue, 3 Sep 2024 13:35:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0927FF80633; Tue, 3 Sep 2024 13:35:23 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20604.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::604]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 0846AF80630 for ; Tue, 3 Sep 2024 13:35:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 0846AF80630 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=5rZq6qtx ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rb+rtOa4cBgEYPnRye7OANd3ZM7+hgUQ23CYe0z0aLzOFz7IliMIWMiG/zRFcR0f42EYn1Ri1UQ5RT/61hP4mlDfzCo7+ZBDO5Skh3i4cZHS3KykEWH4uGV4ClKAUW+QFGwEM+gzKRGtSla70wciagpCRtlEVUMsljPU7WMdRl2ZtKvAZqMeNtOyFkEWFXBiDpoRTY+WpDCF40cvGfNRehanaSQrt0uxNxBpfZHG7CLoagxP90MBOQiIQwApAyVjF8Pf5YcKpm176ttWSZvWOFutIsOlp1Oj9GPJeAcjuZkkV0exfn+mxdBXJqHqIzXnv8xUhwWvVLi0784jTqeumw== 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=Z0VhpKGGyhT1g4xfstXh5jMXLsaoZbbwEcen263NSGM=; b=AMXsHXdBDwXVSlQDT1dQUmWdU7rX38fq81/kMpNjLOnJaCwE9QNBM+EsNjSychfMVEvWa9GRSlB902SFbiEmK5Ahong8szD8ihvFaIEX2MKMQCx4i/wBg+xyd8WhiCZkKn282b77B+0vZfKSZDtsnDrAXkAo+bl+Q9I9E2JXvWFUpP0E5LATGZ6R2MhFFLhgjA7lKb3WErfVo0UQRPoxnHAvXWmYS/FtUQEj9LxY4LYaVE9vFlZ3oJZM8VEAjLPJsQ39BUxMuIBk3q8iJ5xVC9D78CVnRFcUznRRAeAio0Mp3QgQx3gLfbwoHwEbAhrm7iloWp0K3fidUgDNkAyLTQ== 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=Z0VhpKGGyhT1g4xfstXh5jMXLsaoZbbwEcen263NSGM=; b=5rZq6qtxBz1oAW8bvQkm0SLX6tbjJlj7lQwoMsPtkswVv9gEs4p1lMsyCWQ3W/x8DMes1Lv7nS6QT4VCmeWrk2av4Dpi/7WjTW8/6UGQx3XX9ieHpqfzTgFRhYj5MK5R4uWxwpPfPOx1cIziTL9zvnBTEzAhbjQ+q7dEk6GCJbc= Received: from MN2PR05CA0039.namprd05.prod.outlook.com (2603:10b6:208:236::8) by PH7PR12MB7794.namprd12.prod.outlook.com (2603:10b6:510:276::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.24; Tue, 3 Sep 2024 11:35:15 +0000 Received: from MN1PEPF0000ECDA.namprd02.prod.outlook.com (2603:10b6:208:236:cafe::aa) by MN2PR05CA0039.outlook.office365.com (2603:10b6:208:236::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7939.14 via Frontend Transport; Tue, 3 Sep 2024 11:35:14 +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 MN1PEPF0000ECDA.mail.protection.outlook.com (10.167.242.134) 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, 3 Sep 2024 11:35:14 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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, 3 Sep 2024 06:35:14 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:35:13 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:35:05 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , Jeff Johnson , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 04/12] ASoC: amd: acp: Add I2S TDM support for acp6.3 platform Date: Tue, 3 Sep 2024 17:04:19 +0530 Message-ID: <20240903113427.182997-5-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MN1PEPF0000ECDA:EE_|PH7PR12MB7794:EE_ X-MS-Office365-Filtering-Correlation-Id: 6529b8f1-6f4e-407e-fdad-08dccc0c7a9e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: CbFbQiOB66t01bwP9cNaOssVUSsO+V9DaEwn/wA6qNTRlMuQlZT/Exs6fOlAGa9xiWZHPWGTFQZ8ObIdtOjj6DeJp+lAIG4Ouc9fT+ixgjKmM3lL/CuUAFy1Y3aZtXYobMCHdBjoJrcINEYG7WL+cc6pfZAyWzPTz9KKHT98ZTBp4L1mPXGVr9Z9H2kSpkr/kBCGC4LFg47v442LAtXlOghpdA3u6U4DPvRgdkc+HXQHnr+q64+hW2agaIHfmo39am4GFwGID1BaCiNQgs/5AKBQgtiOiSMzkFjjfMJZyWgkR60mr3Pzhi+ArNH9dGIdyqdfyTXlAMToXLAISizSx8vErvt2jS/TPpKjae+w+2TZSzRZeAGM0hKq8j1Oy6w/m8BWTucDvCTWnCf6LrgyDeOIZD/iDxK8ZSEl5BdieKrQYZf3uzY9+gRktTK+TVRy0uxHCUmQFde+FGnExxfxDmi3Pz4Dbhv1pXlilq3JctLkbE/7xs3oGsCZCursb6/Zq2NF53MKj45op+XGIi9TkTeZZcojg+Dao7Ds0b+Am1hMvZprrmeGCW94iu8em8plkQluBcswVAlmhUykIMnuCSJfb/jqckGkuabbZNZyQbCKSTxIMgJvbC/vEUZO5BCFimoBfACQpP8yvmngZMH8VZsIOfOcsLqIwaKEKarltuGjjpTFNwJeFEMw+KmaMJ3vNWiNWuB4dpKcUaYyTvFVIlY66RDtBoPpnZra9PpU8syj/808obkfQXeWehKgh/SBbzj9eZvXpbckNLrBlsrxPwAII2rdWIjgf6WVZL9R13FFUozRyerdiUv7gpHDLBZ06zxQN8Jtj7F/UCTD6BRiLOINDnwdKOfm6ePZdVGuDfFicI+VW/o6sQRlIDEg7kiybX4LfnjC73j6xP1tk6fR4TM0qBQihB9anawCQ20ywnmO4XkaXMoCOtQtQwssn8HPU4AoZmq64xpWMy+LjhA7GWgpHawOENsPNziPVgBmceoiO1xgjAQyLR4isgcHMbnhv1HUsFWm7s+q55s+Qdi+ezgH4z0p/RMxRysAGnYB6jXjUH0RJ5OeU4AY7gLoAfUc339TfprYXyal8QGnh4IH8cDLxabacEg2F5/pgaKiYuKl3mxpCdaeVieJKmh+7Fj4MiHh/Xxl+gPYuKyQOPBkpRaHG7lIYEm6QmohshnNPh2Qr/a3Wx6jdeb+ox6d8cVWFv2ErEPGpKPMwIrtdy8kYgPR4C2mc/TQ9uWmQbrk/hQrZ96uGzq8zecw6tWX8j2QJhRZieVyCSgUFMITgD1pU5jXFPIOhVNpBa3UhJmB1zN5nrj0WB0Z6ss1X4p+IFpbWe1bTM+VNMFjS30Jl+Dakc4XpN31FcJNmBA/cHTjxrEMjMzO0Ywe4MVTRbBrgN4dwA0Xih2k+XYFI5DQQ5ROkJtULBa+MRM4AMDRSbcMXb3SrBtGBsMrIlauC5gRHDeJ X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:35:14.7744 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6529b8f1-6f4e-407e-fdad-08dccc0c7a9e 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: MN1PEPF0000ECDA.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7794 Message-ID-Hash: UEQCE6O6VQCL6Z4LOVS4PHYXW2GNHY5Y X-Message-ID-Hash: UEQCE6O6VQCL6Z4LOVS4PHYXW2GNHY5Y X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add slots selection and 32-channels TDM support for acp6.3 platform. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-i2s.c | 56 +++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index aca99020120a..eceffc69bf3e 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -133,6 +133,19 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas return -EINVAL; } break; + case ACP63_DEV: + switch (slots) { + case 1 ... 31: + no_of_slots = slots; + break; + case 32: + no_of_slots = 0; + break; + default: + dev_err(dev, "Unsupported slots %d\n", slots); + return -EINVAL; + } + break; default: dev_err(dev, "Unknown chip revision %d\n", chip->acp_rev); return -EINVAL; @@ -152,6 +165,14 @@ 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: + if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK) + adata->tdm_tx_fmt[stream->dai_id - 1] = + FRM_LEN | (slots << 13) | (slot_len << 18); + else if (rx_mask && stream->dir == SNDRV_PCM_STREAM_CAPTURE) + adata->tdm_rx_fmt[stream->dai_id - 1] = + FRM_LEN | (slots << 13) | (slot_len << 18); + break; default: dev_err(dev, "Unknown chip revision %d\n", chip->acp_rev); return -EINVAL; @@ -314,6 +335,41 @@ static int acp_i2s_hwparams(struct snd_pcm_substream *substream, struct snd_pcm_ default: return -EINVAL; } + + switch (params_rate(params)) { + case 8000: + case 16000: + case 24000: + case 48000: + case 96000: + case 192000: + switch (params_channels(params)) { + case 2: + break; + case 4: + bclk_div_val = bclk_div_val >> 1; + lrclk_div_val = lrclk_div_val << 1; + break; + case 8: + bclk_div_val = bclk_div_val >> 2; + lrclk_div_val = lrclk_div_val << 2; + break; + case 16: + bclk_div_val = bclk_div_val >> 3; + lrclk_div_val = lrclk_div_val << 3; + break; + case 32: + bclk_div_val = bclk_div_val >> 4; + lrclk_div_val = lrclk_div_val << 4; + break; + default: + dev_err(dev, "Unsupported channels %#x\n", + params_channels(params)); + } + break; + default: + break; + } adata->lrclk_div = lrclk_div_val; adata->bclk_div = bclk_div_val; } From patchwork Tue Sep 3 11:34:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 824962 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 553EACD13CF for ; Tue, 3 Sep 2024 11:36:53 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9765014E0; Tue, 3 Sep 2024 13:36:41 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9765014E0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363411; bh=pzVQJ2oBcN/W/lJHA0ITThSO9WcpclH7jXkM7SyQ/vI=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=V/Evu5r8Rxp2PB67hJY5Vc410xT7DdkTqnN/U+sLPR5U//W9I1+ZH5uBd3608xTy1 oSi1oUCSAdhJE6D5aL6woejOICHCEGAHf2OezR8ojcH5ZNubPYPgNcoiQKNzbOCthl 6bE66TLuUrssCTqTvfdKOdZX8pu/3Spzssz5DcS0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 45D03F8065C; Tue, 3 Sep 2024 13:35:36 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B708EF805C2; Tue, 3 Sep 2024 13:35:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 1A149F805C5; Tue, 3 Sep 2024 13:35:33 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20600.outbound.protection.outlook.com [IPv6:2a01:111:f403:2009::600]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3CF51F805BF for ; Tue, 3 Sep 2024 13:35:30 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3CF51F805BF Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=xhJ41aHL ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BOtnPnGSTk9w8Fqi4f+3rfgXPGzKMatFLe2UHxKfEjyHKZestZqgG/V2O6kapPUgGB0U4Q6di2f9Y0qb0AC/hTjoYTIEpZ8oUZKVaUqUajYD/5tUo3dCOfIdFfJN/MHuvzKbx6QMPIDqdymyfUG9CdYXrh8qDfU/KrkCWArVL0dZoY45ZjcXwil/qUf9pZJrVNaDSJEfBO1MbJ17conwUol9Z3nxN7laSEQvaUpHtzjHan4SGVZOxpdFU9bZh5wFe7BH240uNuvPVtR6u/gilJHEeQLKxLVuck59N95Ppnt80Dgicl1h9RCncmuWFKpEGaFehCeeBQ5iW2GoKCXjcg== 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=c2cOki3l4blca+xqthX9RSDzuPkGkB1UWmJhP3XxZUg=; b=dwffCdWZofNT09qzjHtAFTwvfM6R/mQiIaRjRUV8gxAgL0l76eZJT+MavGLYWd4Dpx/9NR58FdgBkOAGMtAuyD996pT6n3S1KYFKF9qN5zsc9tg4qmcfTE6qPH3/jhp3nWNitT/Ib5I5sPxVfVNibAcjuUR5Svsc2kW4vYkFNYWBxPyiPj0mtcY/2UXGl18iOtWtDQW64nfAZiyQPX6Oh3BoZmFC6TLAS3JqfkcfgKi5JX4FlsRo6Xb5YiJBfgK8ylpGYIyLVR2x7rxErYvOFGGOZzdoQ4iyEi0Qct3HkeF3AHtRn5Kf69FEwG4qOHYcQebCSkmNH5zhQqjKIZoBXw== 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=c2cOki3l4blca+xqthX9RSDzuPkGkB1UWmJhP3XxZUg=; b=xhJ41aHLiRK+PIHysxeoTW5e/jEPUCi3Wa/JVW6veq7y5ng+atZ2jxKJFO1dfCE02+xr2+OE9Du0X73Hspmj6dhWUJnlRXnaKBLnJQWVTbdgNli2CZbdzQXxPFlsMCB/aHHRD1yQXOltG+vyzIQKHH1jAcn4gWli1iFcuaBCcKQ= Received: from DS7PR03CA0110.namprd03.prod.outlook.com (2603:10b6:5:3b7::25) by DS0PR12MB9423.namprd12.prod.outlook.com (2603:10b6:8:192::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7897.28; Tue, 3 Sep 2024 11:35:24 +0000 Received: from DS1PEPF0001709C.namprd05.prod.outlook.com (2603:10b6:5:3b7:cafe::b5) by DS7PR03CA0110.outlook.office365.com (2603:10b6:5:3b7::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Tue, 3 Sep 2024 11:35:24 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF0001709C.mail.protection.outlook.com (10.167.18.106) 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, 3 Sep 2024 11:35:24 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:35:23 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:35:15 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 05/12] ASoC: amd: acp: Update pcm hardware capabilities for acp7.0 platform Date: Tue, 3 Sep 2024 17:04:20 +0530 Message-ID: <20240903113427.182997-6-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF0001709C:EE_|DS0PR12MB9423:EE_ X-MS-Office365-Filtering-Correlation-Id: c6f8c49e-e7dd-42e4-f908-08dccc0c8093 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|1800799024|376014|82310400026; X-Microsoft-Antispam-Message-Info: EJOLIlPpyXsSd1jaZZGoLdJSnZY58m2afnR9WLE18hxXf/OXAmBfUatN/AaLwI3/ygH0LK73PqacLNVjc4ysJoQKY8r6PCOyCEngXxaLVOusYSAbjTaDqbmKxlvp4hoMorAzoBuVHrYeYwNoxtxrZ2KkCb2uUoQxF7J5koDWq0wbbJ/px+NzY+shtc6D5HejppptfkSzkub8avc1N5c0AaTIMHw8T02Mmbi2e0pgUTToA+QSwvxKQwXitCKbISRXg1IWQcGTd8QpQji7f1bbkKI4fcwupa3J6MrsEYrpzovu65/QodESvojF5+zFcq48OuyzfhIK4VE5DWMw78UKfVuIF/+Vcd6SSfdQfU4Si8o8TTqOLcbKdeBZIeWJdX55fOiQs1PxAocI8yeUrxNLK9maHSUPr3dGMwJcopQfwk6XpiFHB72/oTXmth9Kga9J7xY4tJm95ztA4RwGMkOCSXRtf+6s7gY+sHP/w6bVx7frmvJ9gh2ePYHhMtFmWQ4Xtc6FUdKgvhbUG8hZdAXMH6vBfER2WTSRsFWnszIJddWC6Tq541rrwIG4vTY0tfjYcVYzQ135+2B6CdaNRbIwYAQS4D0EOlC4MIYcOtFemBFQ+riyR/pN74jgWkbC1/DKD7NcLLHS8yRf0OMLXh6gt/KTYXfucFkDajC5MgszW3vBmvyU0l0yq5D2J5c8eo2aRaEQKQJCgZ1pRJuagjGDM3cVTupr1EzzFarSwqDI2TGdv3VBnfTX8asnC+nn/TZW4QS5rsC4fiD3UuvcUi9LLmm73YKb5HAMMZFajgrbjyWuwfl+xFjwu57A6rBMGs5y+H5H49oeLz8BmmLRM3FZTq32PxxKN3eFzaE+Iwk95wVNPLmawHu6baxo7yUAKHufjd3Y7KDwHp1q0kUNhLVICQjjua7aXVYT9o/MXm5XnfL1oJABk4DAjh80FtA43r9LYY8r2tvK87CVldhAEhIivHakmgbyn0PtFPeCcivHn96T+6Yx2yIgCLqP5DKB69VbR7h75Dx0Eh1qq0ob9blCIZxO44bvqN/D+XD0yvkCpwyDv8s+VFgi9+hv2PwhsFCW7oAwGscuWwD3VmzLjL4HkF2LSMikaeTF7BT+1GaEYR8eY/bQ2FzdJI57xB2inMPPSMTypHo0ZWiZNOX02AeeyXTvu7K2ua6kokcdKJbP1/IPBlg5qL9VjiIESrEV0Ylcj9/L4+cIC7+simvU0pc25JpyECCzpztlnx3U+WcS9Y1m7cjEXie1w3+2UZZn8taCSPObQaQy78eC5iTohjZwgCwGbUbUu8joo68XaknnPyv6jKx+6VzqBHsi+jcE4pwfA3Brzx1hDPfe0S4c5idEruD4DP+eo+Ogwpoaj3/L0DmDVHbD27trObVt8W/OBxVEUyqeDxhtX81AEBMa37Zhg1WLAfcXpXUc5BVORjlaJqI= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(36860700013)(1800799024)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:35:24.7685 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c6f8c49e-e7dd-42e4-f908-08dccc0c8093 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF0001709C.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS0PR12MB9423 Message-ID-Hash: WXUYU6AH6K5VFG6GLPNWFZ2653SBR5DP X-Message-ID-Hash: WXUYU6AH6K5VFG6GLPNWFZ2653SBR5DP X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Update pcm hardware capabilities for acp7.0 platform. Signed-off-by: Venkata Prasad Potturu --- 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 238b4f648f44..55573bdd5ef4 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -235,6 +235,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs chip = dev_get_platdata(dev); switch (chip->acp_rev) { case ACP63_DEV: + case ACP70_DEV: if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) runtime->hw = acp6x_pcm_hardware_playback; else From patchwork Tue Sep 3 11:34:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 825347 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id DA2E2CD13CF for ; Tue, 3 Sep 2024 11:37:11 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id C5412DEC; Tue, 3 Sep 2024 13:36:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C5412DEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363429; bh=Huad3TQLOXUYSI5yA4//wXmmG+/q33HbF2TTLxTwJ1Q=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=Tsq9xW4mnx4NDUQbUI4+9QIbF6M8JLNBFeg7cpme0zGiYP3X88+ypEK4jXRVWOU1R YO7KD6j0YSx0weHWrAxuAC3lPldY16ttSppmAWkt5IS2sR3xvx0KK4Z/VDuaKnX/IR /jEj853crrVU/XytZBSGTdMM9iqA5EM4eJBS6GVA= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BFCDCF80673; Tue, 3 Sep 2024 13:35:50 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 0F382F805D8; Tue, 3 Sep 2024 13:35:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 4DEFDF805D2; Tue, 3 Sep 2024 13:35:46 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2062c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2009::62c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 683F4F805C8 for ; Tue, 3 Sep 2024 13:35:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 683F4F805C8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=LVg9Gr64 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=On+EVU8RXIgymbu4ueUuJytM5EuCxDj+1kGPb85qgUjtxG/18Q85CgVo0Awwb5qjGH4zqO0kbfhwgMEEnOhpYnF2mIeh0uubXE+NtQLVTf56B/5+/8gYlOeRoOpWBrWHfLy7pWs5GOixBvWGu0i6yIRksCBAHCR8A1biZgZ/3QrjcNDjrYCmSnAK7dOUz0NMMd/gLA03f9OWuWIVpa78BQKwhjH4heK9PI8fBbhcXWY44H+GWfp6vmosL7taXl3i+Jwii6q73ozxslpF2Yt6GK6ku+ZIKzWFqWwDILVufnTie11RmjsK/V2xrKcNlMwWoAYKNVF4tu7PXoRMdR9VeQ== 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=2fAzt+/f40TIpGIbhOZZzgwC0/W+Uqe1jVQX0hP95cg=; b=DNey3+FNlZV7xxmOO14hrlNtZrjPYgG9DtRR+0E4ykTgfafSWsXdhhvjgIU4F2L25vSNmtJ23NSDrjeiIiNTs5Qp3wRuW5nmFxal+1aaEbxhZKwixR+NGWiqIxGUGdpXkeu1U7xyr1/ZkuxU93Om6fdTHpQxFZjpLSJ+jYAk1baQvJ5m/sCkkowxQpjfMgkBpJR6j5rAu6FQ4FqCnhktAReanELMN7eF/xog7zQT2oKyW0CGD5Ov3aJvenwfRbk7GTAp/fgwbGDCtHUaSCs/3f/Z9IFU6ZOAiJNldmYiLs/ThKozR6B5iIZB3HHqurk5Rkz5MGHCtV+p/i8kZw1obQ== 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=2fAzt+/f40TIpGIbhOZZzgwC0/W+Uqe1jVQX0hP95cg=; b=LVg9Gr642le2Dl0l3xto9gi4pJJv62Jza78wFB/AjtzWWYRjrl3+7hEIOXfj3zAmKTckBeEbGLi1fJcDahMrg6jeXBlQLwaDZLosR7Jd9bgC9GRV1Tq21ZqZiznNJjesOSB/h7l1ZtTOkXICOZB8iVn5KXIh/JyhVakpMuE8O0w= Received: from DS7PR03CA0359.namprd03.prod.outlook.com (2603:10b6:8:55::35) by SN7PR12MB7249.namprd12.prod.outlook.com (2603:10b6:806:2a9::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 11:35:39 +0000 Received: from DS1PEPF00017098.namprd05.prod.outlook.com (2603:10b6:8:55:cafe::47) by DS7PR03CA0359.outlook.office365.com (2603:10b6:8:55::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25 via Frontend Transport; Tue, 3 Sep 2024 11:35:39 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF00017098.mail.protection.outlook.com (10.167.18.102) 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, 3 Sep 2024 11:35:38 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:35:38 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:35:29 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 06/12] ASoC: amd: acp: Add I2S master clock generation support for acp7.0 platform Date: Tue, 3 Sep 2024 17:04:21 +0530 Message-ID: <20240903113427.182997-7-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017098:EE_|SN7PR12MB7249:EE_ X-MS-Office365-Filtering-Correlation-Id: 8dc85768-41f6-4404-f485-08dccc0c8907 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: g8A0kEL1S9wJJhd4s6wOh6Mt5lVYnz2MBkhcHTDgb5TcOCSthszWj3wFgmDStnhhfhbs5S4Q90mSfyurbYlHVUQ5AiiKdJd64nIIgvtoo4/eLkEt0K1y/g9ZcxCVtudVbdvzN0VjJpmVBdlJLoHaCYUuE8aokykJLSSo743SJWLnQZRvr+KMXLmooJIkYRL9qMWmmyn65GMw+nXxZo+B+TylemWwVcWI/rbp6i/y9+1kAWOgZBdLTeTyrHMNLeZ2t3ppm73dLhSBewfoeR3DEZf9Wo04dllfJXHlDDeD1kAxUk6og8GH/bgjNHdZpaDoGMqPjFq+MhpBGrv62kdBO7AIjB4fjkch8tU860rE1B5JxQNHZny7p/j1pPdfVTumH38Uj3Eu7LXH9TVlyL7lBu4pHecLdVG2xTC8Yczw8AtxicBihdcTQuBpuyCjyDblU3192YHJvWIfONwY9/sJxo2Zw4dOmgVv2VKWCf0xxOsRfDwYMPnnV4DhsmmOYLI03MT84osox8AoFqI31m+zL5YPO73E1jIkgrtrZRCbwulJPeftOiVrKJwYcFHyc/BGvl5dYQI+gP7dwyX3e7Ld73e9Sb4TyIcM3oMian1XP4WAb3XTOdJ7SCTu+QNJZw/R7l6Mkreq+kIDcRv9rXUeQkbyNXhZ+U3wEl97M7pDdurXHYc7sgq1WiVYXrnoflzJsMiCIMkDZRm3enK1pAM8sp9l8rqNL0ytwIX+G6EyrGOgj/UVotFH6zkbyxd5XpHTISQmevj/lWjgjY7tSJJ0k4iiT56rHb7gasxX0XfX8Vbk7Ef3KamNx9CGWzG//WTmdPdwmOhE4JzZpELXk7t0hHYkM4CEmZ29Z5kC6mDrLExlPD3N3mKa0yFPKbDfZaSKAPl6z8EDLOnC9+H/it6HwTYyXUGyChyNXu1f6A+8SgXp1BvaQD+6/Y1GfDCEMSSfsKweLjs1d/yDywOb9XGioUu7Tta+7donk9XsGT7rxfoW6IsTWfr1jsAd+/IDV6v3DC5UbFyrY0dRT/wVzaG82CXkkGDOWhJw/MF9mx24BQ2/dqmUfaZ/DQn7kwDNPmMIqV55gzMpupjQiDyUpyim7SRffRXIjme2j9Dj9abLxFw9vGYm9uJeFKdEQCo2LclNkUZGRszOy+iLpikfTXxfyMrr3HVB3zyBHaw54yRhLFcGkm/Gq76+3295XqJEtHsrZDsC8ILcKlXRwLzL4qu8FkqYiOYn4YhmU8+2vJxQ9BwjLTcWCmleT537OMlt+/jp2XP4IKMlAFA2nZ8pVTMgv0xCNtxFSfTM2ckJW1YT/BdLGNYGvOp+EIG1XNAzqpOzrRrX90XE87uWlykJdFT71zfd60ax6L8YXsDmHKzl4vqSN2DDsXjf2C5buafSUlDXO0dlb9LC5Zln7dMGvdIi8UPqQOG38I/5MupEr2CN+tUS7ufALMPmVKbR3jaiBPNY X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.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: 03 Sep 2024 11:35:38.9347 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8dc85768-41f6-4404-f485-08dccc0c8907 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017098.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB7249 Message-ID-Hash: NPWTVZB5KYRLFK4XSZYU7CGVSCMNK57B X-Message-ID-Hash: NPWTVZB5KYRLFK4XSZYU7CGVSCMNK57B X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add I2S master clock generation support for acp7.0 platforms. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp70.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index 81636faa22cd..a9be059889b7 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -25,6 +25,9 @@ #define DRV_NAME "acp_asoc_acp70" +#define CLK7_CLK0_DFS_CNTL_N1 0X0006C1A4 +#define CLK0_DIVIDER 0X19 + static struct acp_resource rsrc = { .offset = 0, .no_of_ctrls = 2, @@ -134,12 +137,27 @@ static struct snd_soc_dai_driver acp70_dai[] = { }, }; +static int acp70_i2s_master_clock_generate(struct acp_dev_data *adata) +{ + struct pci_dev *smn_dev; + + smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1507, NULL); + if (!smn_dev) + return -ENODEV; + + /* Set clk7 DFS clock divider register value to get mclk as 196.608MHz*/ + smn_write(smn_dev, CLK7_CLK0_DFS_CNTL_N1, CLK0_DIVIDER); + + return 0; +} + static int acp_acp70_audio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct acp_chip_info *chip; struct acp_dev_data *adata; struct resource *res; + int ret; chip = dev_get_platdata(&pdev->dev); if (!chip || !chip->base) { @@ -191,6 +209,12 @@ static int acp_acp70_audio_probe(struct platform_device *pdev) acp_machine_select(adata); dev_set_drvdata(dev, adata); + + ret = acp70_i2s_master_clock_generate(adata); + if (ret) { + dev_err(&pdev->dev, "Failed to set I2S master clock as 196.608MHz\n"); + return ret; + } acp_enable_interrupts(adata); acp_platform_register(dev); pm_runtime_set_autosuspend_delay(&pdev->dev, ACP_SUSPEND_DELAY_MS); From patchwork Tue Sep 3 11:34:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 824961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E520ECD3420 for ; Tue, 3 Sep 2024 11:37:25 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 12E8F14E7; Tue, 3 Sep 2024 13:37:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 12E8F14E7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363444; bh=CvNlxEP3SH6unceMv6raEfXf94xthuFOXRSTkaWnuZQ=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dtdRrLMX00F2gzS/9RjM3XLe/Y2WinYpcmsWGaT3S4gam4CJPmgAF6wDzWjSq6TFx 9Tmk99N5MRej4UElJTpkvNC7ICkCb0vLK6enfUW0oElkXyxBmxLBxuHy28IIB2c8Km GHw9gTS64ezkinZKSqRrhvCXUvcMUuQuWiMiys20= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7FC1CF805FC; Tue, 3 Sep 2024 13:36:01 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id C6DE0F80687; Tue, 3 Sep 2024 13:36:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B7FC1F805FB; Tue, 3 Sep 2024 13:35:56 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on2062f.outbound.protection.outlook.com [IPv6:2a01:111:f403:2415::62f]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CEED7F80199 for ; Tue, 3 Sep 2024 13:35:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CEED7F80199 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=kbM1NXL6 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=oizTbxx1f0IUNUrkcRG1mApb3d+Vx+RiNndybNNkJVJK2P6gD/wqaYY2oSan6s6C+NJbj3s47Eln05JKjIJxYZfC6abTglzRd52ubs3Rqwdd7ujfmRS6pPAtWmRTJ6goLYepLI0IfaIxRPgbLVlkLqFnApFUpSZVvVMr0zAkQgYWcg/uh33v/0Pz8hOgkAkWwdNVcPU3pHRd3ASDGeMKzR3v4XcPiFkcmLoBnTl6OVK1NFyZ4TjTqE5OYCy8MvueNig50NROIXeQDW0fj+LhHS87+NruTplkxvC4mXOcuvSkCN0xkQKXB7eN65fsr2y/vEnJdX7thhgW7t5yeMfYRA== 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=eoYfDpXZYeD4NRq1FRTE5REBJVFe8xXnmX1KJSnAlyY=; b=IKzs7LvUa2zdLjukXUrnPBcQeqGwyaKZvyQhlMT8OYvp/2SdKSRF+g25AJDQZl10HBOQ3GgK5KL4vHLnqDoVm69gMHYCw3xktjcILKIFNCji4P/Xyvc0sujKePtPbWw1U+duPXOWA1WIVc8NBqJHP0YR8iPI7CNwsWSaz1okPRHK/It6XU4giS8ka872cgIuhN8q5rT8p+RPYeB1KKUIIsS9Yo6tO78h46X5KXtwj7p0rIVLNfCIzQR5Ag2qIxu/FqTYA3snwDJVsDUvqgddbrXc9mAkUZjfop2h9PFAave3ecyg+gBwDegfJLNTT700IFpAingjWXzjn7V/KfAy7g== 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=eoYfDpXZYeD4NRq1FRTE5REBJVFe8xXnmX1KJSnAlyY=; b=kbM1NXL6yaVpsL9r+LoFyAEjZe8QiO4jGhTOnVOicFiBKmHVX9EozrUufRo7gHO5kpY7U2g3fUBKzw1Y7XUatzo2F8Y7f2gexYeqUusLuFiLGTIJc6bQvkKSQu8dl6d64RG+lqeWla1t6t8yhSwR0wVQNq4T4e1TGT8LyTjviVk= Received: from SJ0PR03CA0020.namprd03.prod.outlook.com (2603:10b6:a03:33a::25) by SJ2PR12MB8157.namprd12.prod.outlook.com (2603:10b6:a03:4fa::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 11:35:49 +0000 Received: from SJ1PEPF0000231A.namprd03.prod.outlook.com (2603:10b6:a03:33a:cafe::57) by SJ0PR03CA0020.outlook.office365.com (2603:10b6:a03:33a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Tue, 3 Sep 2024 11:35:49 +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 SJ1PEPF0000231A.mail.protection.outlook.com (10.167.242.231) 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, 3 Sep 2024 11:35:49 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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, 3 Sep 2024 06:35:48 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:35:39 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Jeff Johnson , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 07/12] ASoC: amd: acp: Set i2s clock for acp7.0 platform Date: Tue, 3 Sep 2024 17:04:22 +0530 Message-ID: <20240903113427.182997-8-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231A:EE_|SJ2PR12MB8157:EE_ X-MS-Office365-Filtering-Correlation-Id: 6cdb5441-6732-4dfc-4c22-08dccc0c8f1a X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|36860700013|376014|82310400026|1800799024; X-Microsoft-Antispam-Message-Info: XcSjSvs2sgY/JLqsWwZKISRdCjgMY/Ftt+PKjSCLKuuFyoYgxQ6FGvfdm45tYbCGie35R0EqyFQ8wEwhhZgrot1W4hu9Ljtinx36InUCcEeW1DJGFIGcrfvDIO8z+aGyQbpOXhXorLDsmjwJxNFoztbFI3tuLGGbcZI5n7a5Z9CPFRvYMAEfZbefK0UUOtOrsdEqhGK8YOUyLu70mil5AoHY9j1l9f5kCu74ybpPcsQP8Xz7tsuCW8V43AeS7bN8osJGDl4G7g36d3Kq3LxweAh3gOAwLMoH/r1NuayOpifnaIXxiQUFRYaTJFIc7X88zxFHSe13A/zcBqQLqHrduFQHY3EIaNlMRUDZG0BmgPvAoQpJr2UR45GIpvaJNA8aemcv/7GmEEJRAYgVIU7EjRC3CNSJqRIcU2y8W/W3aZ1rxlCETftLvWF3kgzAalXbBLQx/r70BbeW4BHqjlrE1P5zpPoXNcrKylfgHGGzyINlXK/Kn52CcdlmZmbcab8khCc3qRXybn1+ye7setG9Y2V4xJBKZVTTmIAkYQf8Ht4LOGZxKD8EsTSt3DWU7jqK8PXkuUlKhpSzcpFiT+f++pfsHooeffqlXFruZm30+bAgVqPsLlietSebZPiT9/ApH/pkqQjzFVP87DuGuQx592Wu3vHiz+NC8Y+ytXzG5crQErFkjwITUBBhqEjQpV5JdGzA2oh2UJEzz0Lp9qe3mhclznXj/1MrU8cl+ZWiQT02/T2Yp6vWBicpjHVqWf5OuK1YJiOLZ4cwUZ8HjIgicFHYoN9N2EDkJRsx5csZnWE03wFiUOw8MfVSveKw+y3Imwxshe2HnKHh+mtzyw6I4CPiKWK6cUuF+eb26ezoCKfsNaPsiV1SWEwlJMQAaS51SHsY707A25IJxs+vugehjfKpI6Q0Sp2wj7pOKBHXb5eZBIkZTrvBG9/wGMaAhI3yGZRaBz5bv/IMACQ5A6RnqQ05F0xPBo7JU1QMLROB7TS3DeuN+OlYYfTwN41VGhusZ2YDWR/buU4P+SA4kjm+h6Zrx2DRg2fYWzcclhM/M8w/rxnyUrIbWKUODAQ/Wk3WVfdXRo87tOafWHCIBrMZchuq2n79P9VjMgcaFtqDAE7ldm670q27LB1OQ9s/AOXNGVsrOQm5MNN2+Lj0enLvUQHqonqnF+iZcEX0VLIknAiQbcdTIh/Jy1Fm0EJdrIaw/WhDfnpTKwTnDioaZ3d3sL+rya7lxyyIeU5CYbb+MILpdTvNJti4M72jK2wGh9n+NhIUJiQoGuHQwfJ25ZYv9zAjS6FjSl/YUNX3Jh8XCOb5cUiUdkksV+f8YFPtpn/DNjoOeoUMqITwiXmOh6fYixrRP9mek/oS5tS+OTaxeT7gq6NFvMfc7G/iXkfCXundOsbxxbWLdP7icLc9/6r/5cCFEJp+TendyZFifDY7fPmUzCtdWcOUhETbfRDduiI5 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)(376014)(82310400026)(1800799024); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:35:49.0588 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6cdb5441-6732-4dfc-4c22-08dccc0c8f1a 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: SJ1PEPF0000231A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ2PR12MB8157 Message-ID-Hash: UWLI7LF2IV4WK7IP2EWFBSCMK3L662DU X-Message-ID-Hash: UWLI7LF2IV4WK7IP2EWFBSCMK3L662DU X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Set i2s bclk and lrclk for acp7.0 platform. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-i2s.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index eceffc69bf3e..31475a4dbced 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -60,6 +60,7 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id) switch (chip->acp_rev) { case ACP63_DEV: + case ACP70_DEV: val |= FIELD_PREP(ACP63_LRCLK_DIV_FIELD, adata->lrclk_div); val |= FIELD_PREP(ACP63_BCLK_DIV_FIELD, adata->bclk_div); break; From patchwork Tue Sep 3 11:34:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 825346 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6D258CD3420 for ; Tue, 3 Sep 2024 11:37:48 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 05FD014FD; Tue, 3 Sep 2024 13:37:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 05FD014FD DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363466; bh=8jj3hGlDpc8xvEB4oNd2pNtRgH40vcvlsLeOhWwYHcQ=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=jQkSjz5qdugj+y+fxQijb3Ev8tALpmLnCRdKDK9MZzx9KozRqLtXfZ88SZjmsfWhV aLRUW8ntWDfSVcO9vqbpsuuUspELR7XRLME8W71nODKsgIfPd0jZU3MRBCzy3wKguP DVhCP+nTPMuGz8Vg6yHz+Ixwxj8gpRHD6gDl5Hjs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 175BAF8061A; Tue, 3 Sep 2024 13:36:15 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 670DEF80611; Tue, 3 Sep 2024 13:36:15 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E7E47F805B2; Tue, 3 Sep 2024 13:36:10 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20605.outbound.protection.outlook.com [IPv6:2a01:111:f403:2418::605]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1EA7CF8058C for ; Tue, 3 Sep 2024 13:36:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1EA7CF8058C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=FFxyAHPD ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=CpvavyQsF6sAM127lvU+lLRjHrEIy4Vb5qV6ueLWKvP85Lhb7Wmg5gZU04SuIwdzXqcHAvY4567p4nfef/jr4U7ZHW4C2nmb1OHbzBu/nqCt2Xgq6fQcHEzGAWxUCzOI735J2VkohTfruz4nYZ/QVF2BFqwFJmizqDc2OU4Cx8MjsicBsaV89uQqYmgpFJ9s2GgEekQRpy86OD1iNkS2h/PzLOdP92na5TF1X8wGIiCrq2ti7gOMR4cYdLe0VTfpopRczddjoziTMBwvLpkfISIwN3XOnhx9spsDaVTfKlMVzShYn1rRboyZ6AoFb7nJFKg1Dr0mwA2rUMt+4nAEvw== 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=wgRp37pmD/yGMBYex1nMEZ3AFNDx0Sl/Mcav039Q0Yg=; b=xChw0nVfXJqb9FDQQXc4RwaVYobqaXU/qA7lHQIRUohPINbecQbSVGMxmYDuSAQnFfnpPvB9Pz/2FQLxBilNdinieTn5Nkm7OJSvMAiXPtLVVQoSSHo5BR7eJtHUZkusx0pD/W41CEWftswOq04pjcEeAoJa1v6uC1CY7FLmP4SlhK3xTuvdI7/N9kSyKD5oPxwnAssQpjquDY3mYoM8rJUyNOdcC9ke9XvQir6A5KosoRvTFFKEik8coqNpQORkY7cy57kw0djsUmIz/nN6JoUp4sQTqNe8RKAL0/aPmq+NyDJh47O1A1xMawK41anRmCmyGMLOnljCwOklEw91JQ== 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=wgRp37pmD/yGMBYex1nMEZ3AFNDx0Sl/Mcav039Q0Yg=; b=FFxyAHPDYuJ1fOkJXYtxhZzxGA/iSPaXK58RwFnA4TEzXJtIH3aeM1Bsas6E5/p5EMqyUDg0KaQgIPXUOKSykInW6+Har/Qx8pjMMCdTtpoLSGNLTJDedHx9f9JcDXSsS2fJhAMBRqCPq0wkw/Oq9q4QeJNsiBSjHC+TvwVS3LE= Received: from SJ0PR03CA0009.namprd03.prod.outlook.com (2603:10b6:a03:33a::14) by IA0PR12MB9010.namprd12.prod.outlook.com (2603:10b6:208:48e::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Tue, 3 Sep 2024 11:36:02 +0000 Received: from SJ1PEPF0000231A.namprd03.prod.outlook.com (2603:10b6:a03:33a:cafe::31) by SJ0PR03CA0009.outlook.office365.com (2603:10b6:a03:33a::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.26 via Frontend Transport; Tue, 3 Sep 2024 11:36:02 +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 SJ1PEPF0000231A.mail.protection.outlook.com (10.167.242.231) 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, 3 Sep 2024 11:36:02 +0000 Received: from SATLEXMB05.amd.com (10.181.40.146) 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, 3 Sep 2024 06:36:01 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB05.amd.com (10.181.40.146) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:36:01 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:35:52 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 08/12] ASoC: amd: acp: Modify max channels and sample rate support for acp70 dai driver Date: Tue, 3 Sep 2024 17:04:23 +0530 Message-ID: <20240903113427.182997-9-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB05.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231A:EE_|IA0PR12MB9010:EE_ X-MS-Office365-Filtering-Correlation-Id: cd108cb2-98cf-473a-9d74-08dccc0c96ea X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|376014|82310400026|36860700013; X-Microsoft-Antispam-Message-Info: EOdvk17WGEgruvUo/Bi9BPVT8DdX8ktH+hU8X3XMoz2kSTxtJTg/a7Q2KTNWw175SWo0dOltyO4E/7d7ah0ehbs0OMQVLp5yEoNAVMP92s2oB6hN3RJpK0C3jrQRde8OtGsDELxQDgOoDqDyZkJXm31pDuDFfb3GndBU2sh71mK9iwcB6fMcR3daaSm5uHGn9OOZnvcAyLqA5IBtgTorhXqCaXK4nKCNK+kfw/3HyehtPm6CUtDv9Ceb1HhUfCKtnOb7XF2Ijlj800mCvWcMW23ahIj48pGrPXnienNaPkKII0NeHM0uypG5Co4q3AHGCHhU+urklfKqTsJH3yhRv85mXaiwW+rZhlkKafmlJYAPq/yvgTQrkLew8l87dONzcnBY7kjV7aQuo5ob5Qz9SxxqRVBHsXDoMcR6yPJIwICPKSNrwgVJxdyKJME2eX3nZ1UjcTCZ6dRJRuC/f06w3CrEwRG20MRQuwonTnfOziLtreFSUVo/ORCynM8+re1sjRaSQvGWtvpQNkwpmI3is72UAR28kYRSLkpf2zOOYOP2COeG8o+RonlQkS1RCcEwJtuI9d1lZvB5ZuD2O2q0Ecl8P6If519zb5+H4R4OZF6NKj+IyYBbm0/EtUUHxKiN6arBJqzAZlzwlF0e0C9KHokhCgNKn7R7lWpc55AL9iRfb6+oqZbFQ9/LVbWfBQaFUJTBU7+121d3PlsyCd5j4KjqinFV83NbufQJy8gUUaW+JIMB/RX1zfdR31wO/6aMQ/VweOUW9PioL2cyuVS37dhQs2k+9EZmvJ4l5mJJAoPNwUmFBbFBYEtHIp8PbjT+nmLfnm0sv4Jtq/uxDG3PLbWq6dbPUQA7+VBgqxeI2XNm172eLZLWuOano6422xpMpRns7xlSFoocC8aYehnbo/eyD2PeodPTSx00ZeoCW9uPMz6QISWGv6iTELjn8MEW7S2nDb4DiQnchzFcBpFx/ahaNTYknBYlVLb1Oua6G93mB1+FsUtv9CCXRg+3A1EG+oYtRZWOSgkyQslJH3AgXAuI/vIV3uiJ+Ezic8fl9DuFpfbeywyW7GrnBQLutcjVnTd8/iBYQktk/TaSk3JNNVP9sCbV7YfDsQqjLqwVEbtf4hcY7HbZ72gsNnhwyefMg+hZn3B2kb8jcyEipqanMCBoNq7uEkkGFmRAv89mZoz8pEiLepzuY3mDpHsWYq3K4Np+BrgDxt3/+640eP98D4PMMn6e2oTxFy91trpBo7aFL1w29dwtqv+vqLeD4W/SRH2Kpeg0aMbqiwaGFNrG6bug1xYA9C8ZJsTJP2Uib1WW+QJTOzrObvf3YPt6056xv5wBqQgEtpd+0r63O7ha8TIt7X0g49e0zQzj1aGUSQVL4TT23r8dqwJFFxeFTwmdNdQyGoKE/OTJh/jZ7IeDfT9IF/V+Hv+VjAQZxHZvToxheXhJsjgYG5rRfzTqi4UC X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(376014)(82310400026)(36860700013); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:36:02.1837 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd108cb2-98cf-473a-9d74-08dccc0c96ea 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: SJ1PEPF0000231A.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA0PR12MB9010 Message-ID-Hash: JD2CNYSMRUJTRYUSOBM72522X34J6MGZ X-Message-ID-Hash: JD2CNYSMRUJTRYUSOBM72522X34J6MGZ X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Modify max channels and max sample rate support in the dai driver for acp7.0 platform. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp70.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index a9be059889b7..a662c7db7506 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -52,23 +52,23 @@ static struct snd_soc_dai_driver acp70_dai[] = { .id = I2S_SP_INSTANCE, .playback = { .stream_name = "I2S SP Playback", - .rates = SNDRV_PCM_RATE_8000_96000, + .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .channels_min = 2, - .channels_max = 8, + .channels_max = 32, .rate_min = 8000, - .rate_max = 96000, + .rate_max = 192000, }, .capture = { .stream_name = "I2S SP Capture", - .rates = SNDRV_PCM_RATE_8000_48000, + .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .channels_min = 2, - .channels_max = 2, + .channels_max = 32, .rate_min = 8000, - .rate_max = 48000, + .rate_max = 192000, }, .ops = &asoc_acp_cpu_dai_ops, }, @@ -77,23 +77,23 @@ static struct snd_soc_dai_driver acp70_dai[] = { .id = I2S_BT_INSTANCE, .playback = { .stream_name = "I2S BT Playback", - .rates = SNDRV_PCM_RATE_8000_96000, + .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .channels_min = 2, - .channels_max = 8, + .channels_max = 32, .rate_min = 8000, - .rate_max = 96000, + .rate_max = 192000, }, .capture = { .stream_name = "I2S BT Capture", - .rates = SNDRV_PCM_RATE_8000_48000, + .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .channels_min = 2, - .channels_max = 2, + .channels_max = 32, .rate_min = 8000, - .rate_max = 48000, + .rate_max = 192000, }, .ops = &asoc_acp_cpu_dai_ops, }, @@ -102,23 +102,23 @@ static struct snd_soc_dai_driver acp70_dai[] = { .id = I2S_HS_INSTANCE, .playback = { .stream_name = "I2S HS Playback", - .rates = SNDRV_PCM_RATE_8000_96000, + .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .channels_min = 2, - .channels_max = 8, + .channels_max = 32, .rate_min = 8000, - .rate_max = 96000, + .rate_max = 192000, }, .capture = { .stream_name = "I2S HS Capture", - .rates = SNDRV_PCM_RATE_8000_48000, + .rates = SNDRV_PCM_RATE_8000_192000, .formats = SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S32_LE, .channels_min = 2, - .channels_max = 8, + .channels_max = 32, .rate_min = 8000, - .rate_max = 48000, + .rate_max = 192000, }, .ops = &asoc_acp_cpu_dai_ops, }, From patchwork Tue Sep 3 11:34:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 824960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 20E4ECD13CF for ; Tue, 3 Sep 2024 11:38:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id CBBCA1923; Tue, 3 Sep 2024 13:37:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz CBBCA1923 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363478; bh=xKcLnaQDGwn0Pbq10Bo9rykUqa45KZZzp3wVIP3naWc=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=TKRWSmMJFwRKYoLTg8SypbjhYdQAB3ulni2T1/2m7zONtiynkyQ7DDtSc5flpZ7vo 2AYaKUXjZh0MlrUzCAiXXZihBmDh7h454G3gA/qGUxOnE7bJvmLfc1KpYP8xmoDMaX xtrtN/Qt1Av5r8+EQHZo7hZFhdNE2XnFPpC+g08w= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7A586F80685; Tue, 3 Sep 2024 13:36:25 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 005EFF805AA; Tue, 3 Sep 2024 13:36:24 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 19EA5F8060D; Tue, 3 Sep 2024 13:36:20 +0200 (CEST) Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11on20604.outbound.protection.outlook.com [IPv6:2a01:111:f403:2415::604]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 3A799F805A1 for ; Tue, 3 Sep 2024 13:36:17 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 3A799F805A1 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=VUpwL/MX ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=pPQZAAlpDpz+9kK/TMk/21kg7fX5xSUdL+Hh++51zEZEcEqtzdxS901ajGKzg6gjJeNfqP6D66IeFQQSu4uJXWwWgHEUW8KrxpGvhM7y4SIaqMGwmgbwdgR5WomPFqGRgkFhdtR7rG9pbyRthulriRDcmNYYUQblbwDCzuJkxp9+5f78HnAjblw8SLkWBBwyCuoaOaoAbkYPcjyIrd7i7IndlRB1wJwO3wUYrpkf3pwdJqccfxrBCzyw89yDncNI9OGHGo7lCWGmAF0Ua/MB3B6K8Hp8WPKY7GPzZsPjBMsM89DqHpLmIqFvQ00zcrBdo8nmKPJcOdPA5oVQ+WWiaw== 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=JgNguuEw2MSrlS8j3DDY57JaEDgE8yzDudXajSgCDx0=; b=iS7afbp3OhV7o+2b9jiEvcQRr4jb/fM6SxErCMmAncyz1xQ73j4OETCzWvhwvGx4VlnOqNgN0jkOaV9lLH8swSGR+Fx31WNOWIsB2rnND9/Mp3t+8Vv8gkY+IOaO9FAgWj2LM2o1lDFR3bV97Fh7bE25f2YLP/HaKPczub8U92KOp9WhzwJI6Be1dk8FMXWJofeWVE2R7h+ICtQ1fRf3rPyBFKnJ79WkIF/JG0gGeJ4WgVIm1D+isZeJidzWJDmr9qd9ePOeclpk9umdF+qKjAgsNXrBx/Sq0fnRDFPkUVMms6bEV1P8xNA1kVfcjB8MzuZiAGFF6PWl4hQiQJvlGg== 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=JgNguuEw2MSrlS8j3DDY57JaEDgE8yzDudXajSgCDx0=; b=VUpwL/MXCZocSPJJs7pLi19OW+3be3UFc/6KLAKzRKyo9ms2mto2pkAcyOIVs4YCnMXDIN4gEY1xteIqLHJsFo73mXQqOigo5MtuLNRhvwO0I4Pbnm7gg+0lQLEZ6L5bRFgzIpP+CbCH9kEmMcra5NBcRCH9lDFF1QvPVHgJKUk= Received: from BY3PR10CA0008.namprd10.prod.outlook.com (2603:10b6:a03:255::13) by SA0PR12MB7479.namprd12.prod.outlook.com (2603:10b6:806:24b::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Tue, 3 Sep 2024 11:36:13 +0000 Received: from SJ1PEPF0000231F.namprd03.prod.outlook.com (2603:10b6:a03:255:cafe::52) by BY3PR10CA0008.outlook.office365.com (2603:10b6:a03:255::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25 via Frontend Transport; Tue, 3 Sep 2024 11:36:13 +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 SJ1PEPF0000231F.mail.protection.outlook.com (10.167.242.235) 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, 3 Sep 2024 11:36:13 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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, 3 Sep 2024 06:36:12 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:36:02 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Jeff Johnson , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 09/12] ASoC: amd: acp: Add I2S TDM support for acp7.0 platform Date: Tue, 3 Sep 2024 17:04:24 +0530 Message-ID: <20240903113427.182997-10-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231F:EE_|SA0PR12MB7479:EE_ X-MS-Office365-Filtering-Correlation-Id: 0c3c1d0d-0e69-4a27-938d-08dccc0c9d9c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: HTKpOTLIA8Ilj99V+gxcxvEJmITahrUbCR3sP95+Q0lHSZDs9FFFFBu0eSVluXHoAgzs4YQntgBIF2Ug9cHf8mAGqtj1VIFr+zP1D+O9Mo44+XbuQ83vK/RZKnqyhiQFIi4Nbh514Hf6m/YAB4Doo/n1FPqziCIMvIlbI/wFwmvGzBuys2IDhW7ypHuWwmrK6oRHgxRTVhod4s9yF9hL1BS9UFr2xq68FjqXIpo6k0qgRpPKl6CvwnA/4FM9LcuLxzGBOG1Lv6fjTo4WuPgKOTkwsoEyq6zSLvdVTMevD6XZWzqivFJdX4yl3PPnuKuyOq6ZnZxnk+y0nuVd/aplfXxHq9BG4SKwWsM+e5MFgsR3YoqwED++xhLRoZJVvu0secUi49vj6/vVgXbJmVr9HRcnN7IWRG/Y+obFjpSUzQUCLqG8/EWxrTkh8AR7XEnUjCQKIEZ73HCYQoIeMwSFYX/N2VA2U4lgtrhKT5Sa9AT3pFaDcRVAFp/viis0Onof886uIKC/Gum9SoB94fuYWOExQ1sLaN+KYPwXRfpaJTDuXqUSznQ5l4ScFFgt21rwoaNzs5G5UHiZpdEi6cPrZ488vvCqt+eBo3dOiNbagqd1+3JaINg0adksTXF8nkjEnd++RXg9+peQiu1tS8bqUWGa7w3rPOh/X2yi+4o77F1nkY+bXjOCg6/G/io7NpMeh+c6kKRVWn87l6hiSnTA5aDSiALrDcac/yPO9Wst71Hgbl+iGOZAk+z7J4JMflC0uHhbP3ApWy/QozJVUkxFipI2FDdDQTRPQzvQAmNLL4awhEOBY3yBiA54p25920D83M/dxunAeLq9rNzN8eF7PK7fV9kHYkbGSkn+0MCmzSyVP+VPwJD80rRRiG92XYkaAfbeKWtpOUecScMkbb1jV0KTnGxNJAO+q/muTGFbPH/2mhYfh7M+AV+9MFSEDqxm++0mLiRpmDf/X0sDCp1URfreRh4rFVCffU1Mg3+iIYDp6yEcRlFPWaC4/KgTYXiGhmqDZ4ANQt65l3bLd9VTIg/nyp9UJ15HZeP8vBiRDVmYKZvt5O/rGjPoNiQ+1mVcFbZT1Cj4IW3gYcNKTByV+ijO5eE1a0SDzk+VuKxiJj63t4UnIMj2NQ3hsEqvMvmu1Q5VUwN5Rxy+BeqdENCYwwKJXLONV7PWIdoZRT78FVy0Drti1CzaLM87zBVrUwppT6GKTffAeMNwQOM/5Ne2t8GG/TS00hytdRZN0Aj0IaFDAO9aPXgDIhjvpdnTql1Qrx2pd9Ce/GAmRP+pfDaqwQqnq626ISSMqYE5qRHu3klYHR4dbRyojw3BdGSuuYOYNQXn3IOMGj2bjPBubfaZifOYO+1CnOMMWf7xioPMQ5D3RoTYuU0SYsdsM74VTHWbq2lwH+6UUarHpLK02ZEN0IJlt0uYNjK8IpkBaDEaps4tOFnrIAux+YTG6UlvkUIq 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)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:36:13.4319 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0c3c1d0d-0e69-4a27-938d-08dccc0c9d9c 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: SJ1PEPF0000231F.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7479 Message-ID-Hash: G7J245UPI522L2A5G5PDFVSV3VAVNT33 X-Message-ID-Hash: G7J245UPI522L2A5G5PDFVSV3VAVNT33 X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add acp70 revision id to support I2S TDM. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-i2s.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 31475a4dbced..2a23c52eb512 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -135,6 +135,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas } break; case ACP63_DEV: + case ACP70_DEV: switch (slots) { case 1 ... 31: no_of_slots = slots; @@ -167,6 +168,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas FRM_LEN | (slots << 15) | (slot_len << 18); break; case ACP63_DEV: + case ACP70_DEV: if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK) adata->tdm_tx_fmt[stream->dai_id - 1] = FRM_LEN | (slots << 13) | (slot_len << 18); From patchwork Tue Sep 3 11:34:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 825345 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 168B0CD13CF for ; Tue, 3 Sep 2024 11:38:16 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 7846F832; Tue, 3 Sep 2024 13:38:04 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 7846F832 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363494; bh=sucrGEUl1BiAnZb085qAlT0S+J4ipUYrtJEatGEi2is=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=s7t9DnTJnWkRsjSanPK30lVl8icQQ9ScPv8RwBKfanp8Gi0HKS/y9Z8GyxXveVuap JgWRza6hAuwFjDHKJ4CJhkdlXkAmccd+OSwfkO5jdji76zow8/gy1q2HdyeY2syJ0d l7BPnfAmLVToh1FxDqV/YUcBc2a4E++LYx4OkiM0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id A6B11F805C1; Tue, 3 Sep 2024 13:36:46 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 2FCCFF8063E; Tue, 3 Sep 2024 13:36:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 614C2F805AD; Tue, 3 Sep 2024 13:36:42 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on20603.outbound.protection.outlook.com [IPv6:2a01:111:f403:2416::603]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AB7C7F805AB for ; Tue, 3 Sep 2024 13:36:38 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AB7C7F805AB Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=S748OFxE ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=XzYfwSyYRlF1vC7TGoqK14mQZQ3IoWUSQqu/Sn8pL7RsgGlSOv/et+UySq3xp+yBISo2Y/72L59rtDJ5Ua2EVmSj/g9pOei03Eh+4wAC75XoJIE799lnCKdJfr8mNSW5LxKSUkLK151sHwgAN1EIXb0MZNl1Y2TVNO0h7vq7iQxSCodaXvzmIJH7QGpY3bePdEvr1X0gEfdG3doz9gbOVuL7xUpnbpuaKr73MNRInXZvNCcqzm0eGkLkqI0tDKblLRZduhGsuJj96XX6x4WAiTfibcPRK9iOIwF0DvOYk+llanskkaGDOU/wymWgkz99ZYtz9hpsLjdNYXQBxRPe/A== 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=BYw6sufEDxN/fNfdWXIXqI0THcGf4mG/ednPRcU5XY4=; b=BpQ5NoiR7vESPFCAazQ4kFvaMCoQa/SV58nt8O8q4K4zDCY1SacoYuNWtekheJPr22Omz8esOeNUnMvIo89LMJfhTekWJHthh9/zdsw0QY6MmjQgWFJmlxp7SOSzJqyg5xchNq8YWGiXwXioyX/7zu18xLBetsLrt8yscBHKaYaUmFPp1nZL1uYsxojxKhR7hNK/XUk6w9DoUIXTiR/BU48FMJ8hh42MvGmS6aEoi1Kn3augr3c/O/Yhymn4T0ovcmM2OszaPwHI8KVeuJhxRb6+iUn+KUmhhg16lKoptbOBFlfgvmqBkgudJG2s648oZbaXlGAKCavqOkAJZw32yw== 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=BYw6sufEDxN/fNfdWXIXqI0THcGf4mG/ednPRcU5XY4=; b=S748OFxE9kGu9BsQVpN3Z+gj1U2VPrq76BVOhLO6shKAL7X/y9RfSBJvevYgPNiGG3MLdQ+q81dHTfj5wX69svoRe7hVre4k3+RItJnSwvBxM6Sj+1P86y++EsDmtpC9lGkuLgZ4T81Bav5crV+TADpp8rOYUoN6pRdI0Y7DKlc= Received: from SJ0PR03CA0345.namprd03.prod.outlook.com (2603:10b6:a03:39c::20) by PH7PR12MB6537.namprd12.prod.outlook.com (2603:10b6:510:1f2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25; Tue, 3 Sep 2024 11:36:31 +0000 Received: from SJ1PEPF0000231C.namprd03.prod.outlook.com (2603:10b6:a03:39c:cafe::8d) by SJ0PR03CA0345.outlook.office365.com (2603:10b6:a03:39c::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Tue, 3 Sep 2024 11:36:30 +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 SJ1PEPF0000231C.mail.protection.outlook.com (10.167.242.233) 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, 3 Sep 2024 11:36:30 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) 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, 3 Sep 2024 06:36:29 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:36:20 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Jeff Johnson , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 10/12] ASoC: amd: acp: Add pte configuration for ACP7.0 platform Date: Tue, 3 Sep 2024 17:04:25 +0530 Message-ID: <20240903113427.182997-11-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB04.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF0000231C:EE_|PH7PR12MB6537:EE_ X-MS-Office365-Filtering-Correlation-Id: f18af8cf-0d3b-476c-87a1-08dccc0ca7ce 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: 9H89o3TcHgVUvKx8Xb0g2EF+Ugh8SNFZJdnvt2US4klAAhzsbY3TbwvGso+7EIA6sNaLtFrW4TAHAXUNYaZKIJOz50XOIMEumRxQsCW/QHE309pNIbAQxRofytphRZEKHIarwW4r1BTGLpgGyESt2IMmbBh1WcO19IaRtPDpKPNWjFY3/+FzHK8+Rm2J8MS4HlU0UKm1WzqgOszQ40jZHqB/ZNcIoY2Gs/V7j0hUFOViggNf5hNd8eT3PgXAgkVlBpzWHCHUQbpzQXBFQhJ2DFqlQWpF33w2NFXTmCjM1aHNQ6zIHg66u7Ozv1v7e8S/8MTTCnAUjOEqpG2jOp4uGsdVgaU0w5CO+VNjJpsbpRRwwGsBTH8j1tXqJfBBWeKq3zJxeFljTX/cEpdV7L3AOT4FWfi1o7f8MqFDM7W5Rw4ap8dI10BGO8JmOBov8Xy2/xES1YiOy5Hc/D7dTqItRJA2JG8VwrjLiqkZvGegv+jM3zkRdcDlxPoJdcpOAyUe/prtVm076dNDv/8inlUsbqyC8AP2b/6PX9d0Alfi9jiX2Pj61dQCuXVL22pKtdlRz7nQHqASjhnLQ8kUx3vGCT9W1vakvAeFm13oJ3TP1LL+1/Mn663+OIDd06n1wB9TzaS3e7BJeomB1UHdqe/5NvFk5PMQIILYdBf8Uf0jfUYIYBDXf2QGrFobVQGC7kKb2EtWDax6PEyXBQBfEm9YXZByNn95dfv7ZWDlhGS1EFeYJPNtnjmdIElLfGXSM93k90rZsC8WELZoJKFpF4+dM/oLiqxjXVdvt8WN+SqgMRivdPJse8W2GcR04VREFFTPE4eRQ1U/WhiEjoiDDoTpv2yLnSYPm9I4rmFj0UJysfumhWfe5R/zl1Hna1JElhwd/9HsViaBuIUyT/V4kqCG59NOldNDoNk7ZJIcsnGnYR6tNoCIZ/IzQIChWfSqZUkzqYYsZ6zntMhkUzuA/W72ILLe8WT+QGNs00+acBihlEaDBPN4t9HNaaRp++r2LAf2/UmJq0+/9yCUdWFJZj88Yvrw4yBuMfKAsAYIsQ0ht07pPqEck7aD6/lQQWcBJBgGBQgRhkmrZxQu/2jHa8zJtmDniDhzoxsmf+UcYdha+bgOWZ2ma+HyX8Hq4JwD275vmvD4cI30lf4sB8V8fPwwawxwvFo82IIwF4Y0Fk8VpRaoSiyVZaGOklwYC4m9HokeZa5LXo4QEtG0FaQRTttvvuMIAczj3pBLWzkkwpx1spkbLqc8/GCs7XCkS6rVME5eMnsgXxO2TNol+oK9mqb8xl6LVkEQTj/5Dvhyen61I8kt5H4e2sZ2SZ8FC0OsxlhIWDczPPpFsC8LQEujmYtc2Go+anDByc4x27S/WG0iiOTtKAvem57Dn1hYW1sXPA69N8YzZNFhhLnHMogye1/v1k1wdL2A/RDl1hQRBT+v5F3XWWfY3PTNBs2k53fzYOhF 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: 03 Sep 2024 11:36:30.5365 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f18af8cf-0d3b-476c-87a1-08dccc0ca7ce 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: SJ1PEPF0000231C.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6537 Message-ID-Hash: P4HZU4NWBMBQWIQAPWV24KMKC2HZB3ZB X-Message-ID-Hash: P4HZU4NWBMBQWIQAPWV24KMKC2HZB3ZB X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add page table entry configurations to support higher sample rate streams with multiple channels for ACP7.0 platforms. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-i2s.c | 33 +++++++++++++---- sound/soc/amd/acp/acp-pdm.c | 7 +++- sound/soc/amd/acp/acp-platform.c | 53 +++++++++++++++++++++++----- sound/soc/amd/acp/acp70.c | 4 +-- sound/soc/amd/acp/amd.h | 8 +++++ sound/soc/amd/acp/chip_offset_byte.h | 7 ++++ 6 files changed, 94 insertions(+), 18 deletions(-) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 2a23c52eb512..74f2ad62e596 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -514,12 +514,14 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d { struct device *dev = dai->component->dev; struct acp_dev_data *adata = dev_get_drvdata(dev); + struct acp_chip_info *chip; struct acp_resource *rsrc = adata->rsrc; struct acp_stream *stream = substream->runtime->private_data; u32 reg_dma_size = 0, reg_fifo_size = 0, reg_fifo_addr = 0; u32 phy_addr = 0, acp_fifo_addr = 0, ext_int_ctrl; unsigned int dir = substream->stream; + chip = dev_get_platdata(dev); switch (dai->driver->id) { case I2S_SP_INSTANCE: if (dir == SNDRV_PCM_STREAM_PLAYBACK) { @@ -529,7 +531,10 @@ 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); - phy_addr = I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset; + if (chip->acp_rev >= ACP70_DEV) + phy_addr = ACP7x_I2S_SP_TX_MEM_WINDOW_START; + else + phy_addr = I2S_SP_TX_MEM_WINDOW_START + stream->reg_offset; writel(phy_addr, adata->acp_base + ACP_I2S_TX_RINGBUFADDR(adata)); } else { reg_dma_size = ACP_I2S_RX_DMA_SIZE(adata); @@ -537,7 +542,11 @@ static int acp_i2s_prepare(struct snd_pcm_substream *substream, struct snd_soc_d SP_CAPT_FIFO_ADDR_OFFSET; reg_fifo_addr = ACP_I2S_RX_FIFOADDR(adata); reg_fifo_size = ACP_I2S_RX_FIFOSIZE(adata); - phy_addr = I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset; + + if (chip->acp_rev >= ACP70_DEV) + phy_addr = ACP7x_I2S_SP_RX_MEM_WINDOW_START; + else + phy_addr = I2S_SP_RX_MEM_WINDOW_START + stream->reg_offset; writel(phy_addr, adata->acp_base + ACP_I2S_RX_RINGBUFADDR(adata)); } break; @@ -549,7 +558,10 @@ 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); - phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; + if (chip->acp_rev >= ACP70_DEV) + phy_addr = ACP7x_I2S_BT_TX_MEM_WINDOW_START; + else + phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; writel(phy_addr, adata->acp_base + ACP_BT_TX_RINGBUFADDR(adata)); } else { reg_dma_size = ACP_BT_RX_DMA_SIZE(adata); @@ -558,7 +570,10 @@ 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); - phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; + if (chip->acp_rev >= ACP70_DEV) + phy_addr = ACP7x_I2S_BT_RX_MEM_WINDOW_START; + else + phy_addr = I2S_BT_TX_MEM_WINDOW_START + stream->reg_offset; writel(phy_addr, adata->acp_base + ACP_BT_RX_RINGBUFADDR(adata)); } break; @@ -570,7 +585,10 @@ 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; - phy_addr = I2S_HS_TX_MEM_WINDOW_START + stream->reg_offset; + if (chip->acp_rev >= ACP70_DEV) + phy_addr = ACP7x_I2S_HS_TX_MEM_WINDOW_START; + else + phy_addr = I2S_HS_TX_MEM_WINDOW_START + stream->reg_offset; writel(phy_addr, adata->acp_base + ACP_HS_TX_RINGBUFADDR); } else { reg_dma_size = ACP_HS_RX_DMA_SIZE; @@ -579,7 +597,10 @@ 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; - phy_addr = I2S_HS_RX_MEM_WINDOW_START + stream->reg_offset; + if (chip->acp_rev >= ACP70_DEV) + phy_addr = ACP7x_I2S_HS_RX_MEM_WINDOW_START; + else + phy_addr = I2S_HS_RX_MEM_WINDOW_START + stream->reg_offset; writel(phy_addr, adata->acp_base + ACP_HS_RX_RINGBUFADDR); } break; diff --git a/sound/soc/amd/acp/acp-pdm.c b/sound/soc/amd/acp/acp-pdm.c index bb79269c2fc1..22dd8988d005 100644 --- a/sound/soc/amd/acp/acp-pdm.c +++ b/sound/soc/amd/acp/acp-pdm.c @@ -31,9 +31,11 @@ static int acp_dmic_prepare(struct snd_pcm_substream *substream, struct acp_stream *stream = substream->runtime->private_data; struct device *dev = dai->component->dev; struct acp_dev_data *adata = dev_get_drvdata(dev); + struct acp_chip_info *chip; u32 physical_addr, size_dmic, period_bytes; unsigned int dmic_ctrl; + chip = dev_get_platdata(dev); /* Enable default DMIC clk */ writel(PDM_CLK_FREQ_MASK, adata->acp_base + ACP_WOV_CLK_CTRL); dmic_ctrl = readl(adata->acp_base + ACP_WOV_MISC_CTRL); @@ -45,7 +47,10 @@ static int acp_dmic_prepare(struct snd_pcm_substream *substream, size_dmic = frames_to_bytes(substream->runtime, substream->runtime->buffer_size); - physical_addr = stream->reg_offset + MEM_WINDOW_START; + if (chip->acp_rev >= ACP70_DEV) + physical_addr = ACP7x_DMIC_MEM_WINDOW_START; + else + physical_addr = stream->reg_offset + MEM_WINDOW_START; /* Init DMIC Ring buffer */ writel(physical_addr, adata->acp_base + ACP_WOV_RX_RINGBUFADDR); diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c index 55573bdd5ef4..6ef9baeed74a 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -177,17 +177,20 @@ static irqreturn_t i2s_irq_handler(int irq, void *data) void config_pte_for_stream(struct acp_dev_data *adata, struct acp_stream *stream) { struct acp_resource *rsrc = adata->rsrc; - u32 pte_reg, pte_size, reg_val; + u32 reg_val; - /* Use ATU base Group5 */ - pte_reg = ACPAXI2AXI_ATU_BASE_ADDR_GRP_5; - pte_size = ACPAXI2AXI_ATU_PAGE_SIZE_GRP_5; + reg_val = rsrc->sram_pte_offset; stream->reg_offset = 0x02000000; - /* Group Enable */ - reg_val = rsrc->sram_pte_offset; - writel(reg_val | BIT(31), adata->acp_base + pte_reg); - writel(PAGE_SIZE_4K_ENABLE, adata->acp_base + pte_size); + writel((reg_val + GRP1_OFFSET) | BIT(31), adata->acp_base + ACPAXI2AXI_ATU_BASE_ADDR_GRP_1); + writel(PAGE_SIZE_4K_ENABLE, adata->acp_base + ACPAXI2AXI_ATU_PAGE_SIZE_GRP_1); + + writel((reg_val + GRP2_OFFSET) | BIT(31), adata->acp_base + ACPAXI2AXI_ATU_BASE_ADDR_GRP_2); + writel(PAGE_SIZE_4K_ENABLE, adata->acp_base + ACPAXI2AXI_ATU_PAGE_SIZE_GRP_2); + + writel(reg_val | BIT(31), adata->acp_base + ACPAXI2AXI_ATU_BASE_ADDR_GRP_5); + writel(PAGE_SIZE_4K_ENABLE, adata->acp_base + ACPAXI2AXI_ATU_PAGE_SIZE_GRP_5); + writel(0x01, adata->acp_base + ACPAXI2AXI_ATU_CTRL); } EXPORT_SYMBOL_NS_GPL(config_pte_for_stream, SND_SOC_ACP_COMMON); @@ -201,7 +204,39 @@ void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int s u32 low, high, val; u16 page_idx; - val = stream->pte_offset; + switch (adata->platform) { + case ACP70: + switch (stream->dai_id) { + case I2S_SP_INSTANCE: + if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK) + val = 0x0; + else + val = 0x1000; + break; + case I2S_BT_INSTANCE: + if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK) + val = 0x2000; + else + val = 0x3000; + break; + case I2S_HS_INSTANCE: + if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK) + val = 0x4000; + else + val = 0x5000; + break; + case DMIC_INSTANCE: + val = 0x6000; + break; + default: + dev_err(adata->dev, "Invalid dai id %x\n", stream->dai_id); + break; + } + break; + default: + val = stream->pte_offset; + break; + } for (page_idx = 0; page_idx < num_pages; page_idx++) { /* Load the low address of page int ACP SRAM through SRBM */ diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index a662c7db7506..3b3bd15964fc 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -34,8 +34,8 @@ static struct acp_resource rsrc = { .irqp_used = 1, .soc_mclk = true, .irq_reg_offset = 0x1a00, - .scratch_reg_offset = 0x12800, - .sram_pte_offset = 0x03802800, + .scratch_reg_offset = 0x10000, + .sram_pte_offset = 0x03800000, }; static struct snd_soc_acpi_mach snd_soc_acpi_amd_acp70_acp_machines[] = { diff --git a/sound/soc/amd/acp/amd.h b/sound/soc/amd/acp/amd.h index 9fb4e234d518..854269fea875 100644 --- a/sound/soc/amd/acp/amd.h +++ b/sound/soc/amd/acp/amd.h @@ -62,6 +62,14 @@ #define I2S_HS_TX_MEM_WINDOW_START 0x40A0000 #define I2S_HS_RX_MEM_WINDOW_START 0x40C0000 +#define ACP7x_I2S_SP_TX_MEM_WINDOW_START 0x4000000 +#define ACP7x_I2S_SP_RX_MEM_WINDOW_START 0x4200000 +#define ACP7x_I2S_BT_TX_MEM_WINDOW_START 0x4400000 +#define ACP7x_I2S_BT_RX_MEM_WINDOW_START 0x4600000 +#define ACP7x_I2S_HS_TX_MEM_WINDOW_START 0x4800000 +#define ACP7x_I2S_HS_RX_MEM_WINDOW_START 0x4A00000 +#define ACP7x_DMIC_MEM_WINDOW_START 0x4C00000 + #define SP_PB_FIFO_ADDR_OFFSET 0x500 #define SP_CAPT_FIFO_ADDR_OFFSET 0x700 #define BT_PB_FIFO_ADDR_OFFSET 0x900 diff --git a/sound/soc/amd/acp/chip_offset_byte.h b/sound/soc/amd/acp/chip_offset_byte.h index 97b8b49f1e64..117ea63e85c6 100644 --- a/sound/soc/amd/acp/chip_offset_byte.h +++ b/sound/soc/amd/acp/chip_offset_byte.h @@ -12,9 +12,16 @@ #define _ACP_IP_OFFSET_HEADER #define ACPAXI2AXI_ATU_CTRL 0xC40 +#define ACPAXI2AXI_ATU_PAGE_SIZE_GRP_1 0xC00 +#define ACPAXI2AXI_ATU_BASE_ADDR_GRP_1 0xC04 +#define ACPAXI2AXI_ATU_PAGE_SIZE_GRP_2 0xC08 +#define ACPAXI2AXI_ATU_BASE_ADDR_GRP_2 0xC0C #define ACPAXI2AXI_ATU_PAGE_SIZE_GRP_5 0xC20 #define ACPAXI2AXI_ATU_BASE_ADDR_GRP_5 0xC24 +#define GRP1_OFFSET 0x0 +#define GRP2_OFFSET 0x4000 + #define ACP_PGFSM_CONTROL 0x141C #define ACP_PGFSM_STATUS 0x1420 #define ACP_SOFT_RESET 0x1000 From patchwork Tue Sep 3 11:34:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 824959 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 3496FCD3420 for ; Tue, 3 Sep 2024 11:38:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2AA16DEC; Tue, 3 Sep 2024 13:38:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2AA16DEC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363513; bh=D4/60wdl5MYHUC1HEvie8mMe6F4I8EbBdJvUH5BWzjM=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=h+mko5u5D881daiff0a0iLp0yOqNbVERbyAto+7mQAXOqopQr/ZpvqbexKNN6p+8M byysAsDXlOvirGb3bn90bnzhxYmu/Z2NVY/IX4117ZwepCuGp9Buf0BPxENADpGDzz +5rwxRaXulKbYNMRUZxWzwE6SF76sW81p1gS59WE= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 0F3FBF80659; Tue, 3 Sep 2024 13:36:58 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id ABC26F805E1; Tue, 3 Sep 2024 13:36:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8CE74F805C2; Tue, 3 Sep 2024 13:36:53 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20619.outbound.protection.outlook.com [IPv6:2a01:111:f403:2414::619]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id B2A2DF805BA for ; Tue, 3 Sep 2024 13:36:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz B2A2DF805BA Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=WR4ngTzs ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Zr+V0u1/wQ+JyjVt4iVk9fj5vGg3XZNq0dk7jrxBx8AdFtL/qYpTrQwN6u4zGz9sV3GUyNYkWGclv8tZXqyZB/Y6aRSzGlIDCcFbRCQ0UsiiT7KyzipirrdfFi+TtcD53odk1rq1cmMaRUUDSGjUo+7z1svb1736xr1cL3uR7yI68z5/Dmm63GmNKjkiCogQOa5PkMvADyP7JSsuOcOportAkvvY0UktUAUPwupV5dsgvc4x+LuSY3ksUmp+2Z2g5D7Jgtzu82MLCKA+Ci2EAGAAqQ9nXOOQEzIbDyNIEuGt0q6lFNS78y1qgEmhn8lg/7Y0pWa0FEseADPiplxipg== 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=UWeHSh2dEBZeaGcX1AZKhHMVfLYfNA2BXhFheHpAFMw=; b=Zfl7/be0G+Sfl7xclKaQ5V4LkhZBy0UGcBtJ/ON1En/Qp5FOnIdT7dyNEjgjdF3TuZSciCCrHzMGLLo5yh+VeqpUwr6hmBZ2KVKH9ReIf+euH7KuYsI5k33JH9M+Jf9oT2Q5LqjtdjlghUz6Tv+PeuiT1ib34XNK4ZZPSqg+C5gW3HumDVHTKLGqi1+JpMVGTSyj7dbRpN58ISfnwQgcFXJuOzY/RPGB8vMOya7nGz8BmPwi/OAcs6YtiagdHNqqCP4NWPL5lkp/ftPsu2/UEuJ4EQvW2nPNpNtUX5D7EjT7jKiazi5T6zGMpRX+P2XH90NtMDeaLa4IB6ZwdruX2w== 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=UWeHSh2dEBZeaGcX1AZKhHMVfLYfNA2BXhFheHpAFMw=; b=WR4ngTzsXWRHdv4YPv2efK4w1gf8VWaIhe1UNxk5YSe56JgrOvBpg574D8GOhOVg+yrnclBA3JsWWKIaNAMo9yYk917GoDGq+I00MT8FgX4QOqa7QIv3aX9zZHP1SOgvw/Nwj3NZX8IvMLk16srX2L6WqgYPeQZk+I0n0Clki3Y= Received: from BY5PR04CA0022.namprd04.prod.outlook.com (2603:10b6:a03:1d0::32) by CH0PR12MB8488.namprd12.prod.outlook.com (2603:10b6:610:18d::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Tue, 3 Sep 2024 11:36:44 +0000 Received: from SJ1PEPF00002319.namprd03.prod.outlook.com (2603:10b6:a03:1d0:cafe::3e) by BY5PR04CA0022.outlook.office365.com (2603:10b6:a03:1d0::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27 via Frontend Transport; Tue, 3 Sep 2024 11:36: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 SJ1PEPF00002319.mail.protection.outlook.com (10.167.242.229) 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, 3 Sep 2024 11:36:43 +0000 Received: from SATLEXMB06.amd.com (10.181.40.147) 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, 3 Sep 2024 06:36:43 -0500 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB06.amd.com (10.181.40.147) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:36:42 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:36:34 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Syed Saba Kareem , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 11/12] ASoC: amd: acp: Add i2s master clock generation support for acp7.1 platform Date: Tue, 3 Sep 2024 17:04:26 +0530 Message-ID: <20240903113427.182997-12-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ1PEPF00002319:EE_|CH0PR12MB8488:EE_ X-MS-Office365-Filtering-Correlation-Id: 37be0f11-6928-4420-a058-08dccc0cafbb 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: 4NXNsLxh4c/n1g9Yq+xkNKG96gGEOYuDKiSYUyjzVaIv4GO9vXOzKDQyzBHCxkwgTc8LL3GFOCCWJ5Xkd+2RtNcXTDiXONVDttxR1b24YcvZNMlp7hznxJLdK5imKtS3pjpgyGLr8KN7svzDLlcprzwksRwr2lXykNg2zslrZsiX+c+oUHl14sWC/bbe2mV3IxyzbgPR0m25NEDMrUUxgFx8Vx6P3L67e3VK1fIZVUecJ+0XD3qVAKEwr41UbU63gYLMBI/fSiMG8fwusQncHKJkNSYw0MNwusQOo9Dea0MLsF5rtLrAzqII4kN3x7+GlpgIyMuYorwyUVS7xGRQnnJq0SZjTm/+8aYfveT1NSD0w7QASvZMy/2JbVAya9SrCP1Gf6skh8x4Tiuxo8vPXiWtN2xbzTsgoRBc5nX7MgFBk+ewFHKL1/iUMGzC/cTj5Lc1ibL1h/ETqPMFOyQhgxmoggu6dOCvVmsAMZyM+JY/jIynpBj6FUC2Y5MmdnZ0QO4KzHB6X/KugpIvUTxjIbjWV9VdlQxJijjFN4jf+ycWNZrqTOvgQR6nsLld/lnjzL5xzFwayOmoitspGsR/exhnWhIM3PJbQ3RXIYDfnJdOX1m2pFt85CVvxQftIVXtye97a1wKBS9ZaqXCxQJ15fx8ucEwSbtnVqoJEUvZEPxG0Oj0owBR+gbiJ1PjD+IoZwVy/Dw1pP06TYChicr60IIGJtt1TDzayVBKoozeQ90sIvX+AbNtKBrYLukfWxDOlCqAR8/lIxcYUiLsy9e5MHr73ag49broyNH8kjuU98CI5tMUWDsuz/ex5Vz919hdNy09kuDpGWshmYxG+vVcBg/YxJQnz2cNmR6M3OnJz0DuK4tobgZ0QWBP2WtC8b+USQ7Alxk19ZJEC9pArgxBAArR7DBS6wDJ2QmLA8KCGdkHvT5sDFZ9iNtA5n3y52WxC2IT3hZG7MoQ2+RN+LJBCxQjMSOfLhNQgj4RP19VZU1PNNCaxa6kpHj2cND9AxiL1qo9OujUdnoKKKj57EKtw85/dJp2FibFKWQKJtGvVe5r7AEyq6D2LK9TPTw6CcVPhETYq3m2M3WIG9UpO1x8O2tYL64I3r5iOxrSq+7VL1PIG11j32EXp70bJNAyEGOAtavYHxV6q9PydYFg8HHKvr5RW+JRefiB4Du9RqDzIG15hpvFik/L636G/6+omM1PPnmYN7YXWoXnWP+2FFutBlMqDmFsbITpVq0w0K4+oO9v84m5xrpkS4iVsfT2PtXSyzcbh+r9bfNrD8qZbAONPAvn1y5U3W548+nwIX3LXYZVFtBnxyrdS/uB5DyzdbEfFhoepWZgu5eX8XIvfyHi7fcZjDIBTTE4cS17Dj/CT4yG5cV/8FWxGm3bdOOUvbn4Ait/skRTwUjh9UoEL73HOa6+MoGNRTYyisMZvul2y2kwFZTCqxhdGLsYxfbEhola 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: 03 Sep 2024 11:36:43.8188 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 37be0f11-6928-4420-a058-08dccc0cafbb 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: SJ1PEPF00002319.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8488 Message-ID-Hash: 5XCLXVO22IVEFLSG4M5NM4I2MU2KBNHC X-Message-ID-Hash: 5XCLXVO22IVEFLSG4M5NM4I2MU2KBNHC X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add i2s master generation support for acp7.1 platform based on pci device id. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp70.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/sound/soc/amd/acp/acp70.c b/sound/soc/amd/acp/acp70.c index 3b3bd15964fc..1b0b59a22924 100644 --- a/sound/soc/amd/acp/acp70.c +++ b/sound/soc/amd/acp/acp70.c @@ -140,8 +140,17 @@ static struct snd_soc_dai_driver acp70_dai[] = { static int acp70_i2s_master_clock_generate(struct acp_dev_data *adata) { struct pci_dev *smn_dev; + u32 device_id; + + if (adata->platform == ACP70) + device_id = 0x1507; + else if (adata->platform == ACP71) + device_id = 0x1122; + else + return -ENODEV; + + smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, device_id, NULL); - smn_dev = pci_get_device(PCI_VENDOR_ID_AMD, 0x1507, NULL); if (!smn_dev) return -ENODEV; From patchwork Tue Sep 3 11:34:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: potturu venkata prasad X-Patchwork-Id: 825344 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 459D7CD3420 for ; Tue, 3 Sep 2024 11:38:51 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 98AB3211C; Tue, 3 Sep 2024 13:38:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 98AB3211C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1725363529; bh=Zxo6uDrxY+TcIOP7JCSCmW2wl907TvExYyKssqGL4cI=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=qjd5hriCLj6nENhKeblY46sBRCO730Ar3ZV1I8jKbdx+7RTBi6OJAclrhWiTFDBiY s/QFtsa5mfRA4pbinUy+qX1JJre4odws2igHbr9+2O/tAY3CVvPW5Zc+1MAd6mnxTu 1wWZzfkz7Rh3IxqsdsZD30RL9aCfEXGxSUKgOA2E= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 92876F806A0; Tue, 3 Sep 2024 13:37:04 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 3A17DF806AD; Tue, 3 Sep 2024 13:37:04 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 50709F805EC; Tue, 3 Sep 2024 13:37:01 +0200 (CEST) Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2061c.outbound.protection.outlook.com [IPv6:2a01:111:f403:2408::61c]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 751D7F805C8 for ; Tue, 3 Sep 2024 13:36:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 751D7F805C8 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key, unprotected) header.d=amd.com header.i=@amd.com header.a=rsa-sha256 header.s=selector1 header.b=NQYcXGlc ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=s1qq13f+lHlKgxfLVNJnNgsNHiqMcwaIgyPbG7odWupnXASuJLzHt05ArvBnGLkizpDPKgF4pFcB9u5OZbKuuyLjN9noNp+8I0LssXZQnM33r3CYvHTsjMDwllcxE/3FR3QFiiNdpVhba750L5UZ6CE2irmpyubUJuLKZgy8nDfvv6cusQuZpThbIK1E9YUiBaN4OF6KIAbLRJwcTP+1rPSDKonKMqXikV9QXEtQK1PgJEmJU4xgBNhyMzFKLn94KKrCOYosv4RwN3VR2JcUzmRgygVhhcVl1mh22z/kfHRDRvTiOxNb5Ad6CRKqU40Fo1W3yWP0fZtvcDMf3eoJVQ== 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=WlTY1ccp5e6+zTkz5tnVE4zpMvVe1UTQ2EdRjn40jU8=; b=kCn81ZDJtGLih1tkzrQAXheS0FeqR1WWAj181b/JK3RKKZIBVV+LsOKROKxWh92M4Qo3H2lyu5LAT1vhPqWidE62prkPqb0x+FJJ/ijN4S3rdn1r17QTjoct8kl+cPY4/M4ipGL0V8EyaTlHewnz3KvvtycLEQh0cRzMbEdyy1V7s6UMDNmPoQIYLc8KCCKBedjS2IuqgYUkp4SO1L5NrbQ8U1LrHIdnTRQzvct98rqvtFZiGs+JYGWlrC04IzwZ5jc2zLZHnycba9nppeP+W8Pm73lUXMB+E/gvWItls5o3G/hqrP6diZ41f+JhUPsb8FwOqQrxGZPQZal0uqvuzQ== 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=WlTY1ccp5e6+zTkz5tnVE4zpMvVe1UTQ2EdRjn40jU8=; b=NQYcXGlcKMlcNzs9jyfnZtKrAOS2ialLz1F8nFPJ46bVOQv8soq8f9rJdzmwYn1COU3sCDEhnFB3O9s11fq9A81ZaGIY5WkYSwBpaUcgQqSQevPeUHueJeUUYZ3fwUTn74GDX5TZKXIJ8F9uJrD9lqpLJnw+oVDjri1J7K1mvaA= Received: from DM6PR03CA0001.namprd03.prod.outlook.com (2603:10b6:5:40::14) by MW3PR12MB4492.namprd12.prod.outlook.com (2603:10b6:303:57::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.27; Tue, 3 Sep 2024 11:36:54 +0000 Received: from DS1PEPF00017099.namprd05.prod.outlook.com (2603:10b6:5:40:cafe::68) by DM6PR03CA0001.outlook.office365.com (2603:10b6:5:40::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7918.25 via Frontend Transport; Tue, 3 Sep 2024 11:36:54 +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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by DS1PEPF00017099.mail.protection.outlook.com (10.167.18.103) 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, 3 Sep 2024 11:36:54 +0000 Received: from SATLEXMB04.amd.com (10.181.40.145) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 3 Sep 2024 06:36:53 -0500 Received: from prasad-r9-mach.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server id 15.1.2507.39 via Frontend Transport; Tue, 3 Sep 2024 06:36:44 -0500 From: Venkata Prasad Potturu To: , CC: , , , , "Venkata Prasad Potturu" , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , "Syed Saba Kareem" , Jeff Johnson , "open list:SOUND - SOC LAYER / DYNAMIC AUDIO POWER MANAGEM..." , open list Subject: [PATCH 12/12] ASoC: amd: acp: Add I2S TDM support for acp7.1 platform Date: Tue, 3 Sep 2024 17:04:27 +0530 Message-ID: <20240903113427.182997-13-venkataprasad.potturu@amd.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240903113427.182997-1-venkataprasad.potturu@amd.com> References: <20240903113427.182997-1-venkataprasad.potturu@amd.com> MIME-Version: 1.0 Received-SPF: None (SATLEXMB03.amd.com: venkataprasad.potturu@amd.com does not designate permitted sender hosts) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS1PEPF00017099:EE_|MW3PR12MB4492:EE_ X-MS-Office365-Filtering-Correlation-Id: d8b6d2db-051d-42e2-6001-08dccc0cb5f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700013|376014|82310400026; X-Microsoft-Antispam-Message-Info: LxLa7slmEo/yzBOLdCy696n7zm49bIy7ynfEXDzw1pnvQrNTj7ndVKF04C4pr6TFD7IdAi8b1qsV8WWR7Oje7s10/i8GKLdM/eRCTYzlIv7r5gnpOHLY+iLbLS0QfW3/QiCtOIROhrBYfWUBghYMhDq57Ifyl1xXGO2huZAeLDZic8jMF84TbF8wDXPSJ3Pv1aZ86TO+CmHUoLC8SE77ZSdiT1tWtel6ptUHuwedJBjB/nMeu9SKokGMWzPNHNw7Hk152B6zMf5MtwQCCF2LAXY9KLCKOwiqHbGwAaVD5fk+2SqeshuvicC9R4wD2GCxHev1phEHpiudzNXA2/g3WqS8Xs+C8iSVero0wj+4BxCbqB2K7L9bI0bUY+apfNVifqK+K3p/egH47f8j04m2ak6OheCdFNIHhn89mB3Vk4hlVDwGhEJfL6nkGXzKjiaRow5g1oF3Vwpmg2/QLPTjZbnGaOUYsU+Zw/iDMisBap1bqdVoXN6nEYn2h3LwTU9U4nxap+8iTY/FOp2beYvE20ahhdAGZAC7/5zUKzhjuPVE1vMCuBO2hva1XbYP5vrF7V8yq8Rku1/xPHUKn8+P3+oeiRr+QKuSg/MKzoK3VocGlLdzhtw0wCwKF8DTYolUstCSepbeS2jcRTRmSAmthCVsP3bSogZS3nWjI08sDKfOTFbA1dj76N93VkYu1ljrZnd/1QgsKwxeovS9PyS0zmXwq9W6EQoCCYS30NVeL1+nOaWqFF1h2DvPaCcAzqf3+40QAe8a31o7ROsiIlvA1hbd53l9rAZmNWDdh0bVaQHyEihuz8pMeHx3d0SezPKB9kKhl9dCuO9YSDvVTJDZZA3u/ps+tcMy0tTvR5/3G8hQ3QONFrpkazBTHtLtwGVGIoi2wBswMMczx4Lc3beTeCQbm2KHr79wzTVBZn6regOfEHdyqm7UVpFK8q+Fq6+h1sEiQoSmR2cVYsslJgnJUXyfEBW5o/VmjhyCvmEmr59cCjMOks2WwlH6oMWYrNE6A8iNdFR9mJcq9kY/MDKFv2kmwS8WJa3ggrTV4YrYogXejWxn9IAifA3vE30aQtfBzKsKw3q9YkjJ/H7S3JFCCxPAOIZ58bTSdg780w7JfMlQm6/w7OBicG8BTfblwPGIf97rpebo/pOHKUh3K4+xlkX/JniJrpQP2rSjRwjkauDFF2Tio4OMwXT9NZuP5+Ge6awjMY6Te/3T71vnsCcPmEEChwVIAFVrUdETMU5HHTEXJ3TCRYOqza/21Bg/ffrc6+0I6Il/aBQ0/S12IkK+O+rPb60bvsndzTitVzZ1DnMhXCs9HtIO/EoOGDZNkb/2KsxEJUHojI25JHv0VR9lJTKTOANSkCXrjyApKJj5fngBk4n6IjmKgGZxxjW4szngT/AhrQIjN/LkRFM2SZGi47vlySYpWAr8UQt1DzIMmYY3cnYekEMe9Dogr651vkVL X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB03.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(36860700013)(376014)(82310400026); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Sep 2024 11:36:54.2207 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d8b6d2db-051d-42e2-6001-08dccc0cb5f8 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=[SATLEXMB03.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS1PEPF00017099.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW3PR12MB4492 Message-ID-Hash: O23KB5OVLCBEVQ33XC6XRBLYQ5R2WJFF X-Message-ID-Hash: O23KB5OVLCBEVQ33XC6XRBLYQ5R2WJFF X-MailFrom: venkataprasad.potturu@amd.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add acp71 revision id to support i2s/tdm mode. Signed-off-by: Venkata Prasad Potturu --- sound/soc/amd/acp/acp-i2s.c | 3 +++ sound/soc/amd/acp/acp-platform.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/sound/soc/amd/acp/acp-i2s.c b/sound/soc/amd/acp/acp-i2s.c index 74f2ad62e596..56ce9e4b6acc 100644 --- a/sound/soc/amd/acp/acp-i2s.c +++ b/sound/soc/amd/acp/acp-i2s.c @@ -61,6 +61,7 @@ static inline void acp_set_i2s_clk(struct acp_dev_data *adata, int dai_id) switch (chip->acp_rev) { case ACP63_DEV: case ACP70_DEV: + case ACP71_DEV: val |= FIELD_PREP(ACP63_LRCLK_DIV_FIELD, adata->lrclk_div); val |= FIELD_PREP(ACP63_BCLK_DIV_FIELD, adata->bclk_div); break; @@ -136,6 +137,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas break; case ACP63_DEV: case ACP70_DEV: + case ACP71_DEV: switch (slots) { case 1 ... 31: no_of_slots = slots; @@ -169,6 +171,7 @@ static int acp_i2s_set_tdm_slot(struct snd_soc_dai *dai, u32 tx_mask, u32 rx_mas break; case ACP63_DEV: case ACP70_DEV: + case ACP71_DEV: if (tx_mask && stream->dir == SNDRV_PCM_STREAM_PLAYBACK) adata->tdm_tx_fmt[stream->dai_id - 1] = FRM_LEN | (slots << 13) | (slot_len << 18); diff --git a/sound/soc/amd/acp/acp-platform.c b/sound/soc/amd/acp/acp-platform.c index 6ef9baeed74a..ae63b2e693ab 100644 --- a/sound/soc/amd/acp/acp-platform.c +++ b/sound/soc/amd/acp/acp-platform.c @@ -206,6 +206,7 @@ void config_acp_dma(struct acp_dev_data *adata, struct acp_stream *stream, int s switch (adata->platform) { case ACP70: + case ACP71: switch (stream->dai_id) { case I2S_SP_INSTANCE: if (stream->dir == SNDRV_PCM_STREAM_PLAYBACK) @@ -271,6 +272,7 @@ static int acp_dma_open(struct snd_soc_component *component, struct snd_pcm_subs switch (chip->acp_rev) { case ACP63_DEV: case ACP70_DEV: + case ACP71_DEV: if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) runtime->hw = acp6x_pcm_hardware_playback; else