From patchwork Fri Oct 20 06:28:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13430109 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 B009DCDB474 for ; Fri, 20 Oct 2023 06:32:15 +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 D665684A; Fri, 20 Oct 2023 08:31:21 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D665684A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697783531; bh=aB5NZOpgDzkFFQrYREsHk3KrbCa64lemn+lAVs6U5CE=; h=From:To:CC:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=a75T4i0g0+uc7BDO0KOiixej8dwT0UTLDbwkMerHs7I2gN3nLX1p/1W7aM8u7MsQh dqoep3Ttb2XYqp9v8sx/6pfSSJpPfZKx6NsaBrNdq5xVnOlem2Pi/AEM7nqhYjdn0n zsy7j23tiZqYjVQ+mJ5QAzTr89SvjEq48NH6URoo= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E9F6EF80557; Fri, 20 Oct 2023 08:30: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 66875F8025F; Fri, 20 Oct 2023 08:30:50 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id B47F9F8027B; Fri, 20 Oct 2023 08:29:10 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on20600.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eae::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 21571F80236 for ; Fri, 20 Oct 2023 08:28:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 21571F80236 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=wgewHxJ8 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nWgQiMymGkWLJlO5epx1sdHuVcn0s2IwQyhif+9VvUfJDwyASepvmzCu2EzdbYQBvjmU+niaRpg8/HwX8OUAskJKqTUzw7uV1NBK/8sSTcxom5K89+uBIc3mm1/0xjknp1WahvzhqvuipKthQpU31sMvGqwRPSB5zHXgiOiizV9BWgOvefn4QYSq4ptAdQFUb+emyTt6xa3pCaz9psMUM2s7VvhakcLntTd0yThaoJLFCYiTFgnmL+P5QihC0lEm1R5Xf4abMyFiO2hpx2VmKC7xa7PGIdUn8op4xR2kt5ZxS7r7ClTNG/htvuaEnF0yobpVRktpu43qZhHuQMqhrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=JcB01EX+Kne+GnrqpXoo7+eKMlQeN5wi7mDAQJKfoJg=; b=S/OXSlIrYvymLsUvlVrDg7aH91WoO0CZ+IJ71cn2/t68y5kPG0Eprnh3jTEG9jIPXTjJfhHUhae22135UMvEIIaXEttHv3hYm4vllNlm9w+d/fisarL24kaSOyCzlyVr+iZlGzxOoQBlITDciBkIG5B60GXR50WYEWJFYOQBmzhQrkiAwZnlcb9BWEwXskMv5uMK2juQlRggn+nknRdTE0N4NbzS/6cVeyEZC+zP0Pmw6EFC1F9IXc51E4QO7mE+/WrU63QAupsinLsyRs/RD3tCbUX2tv5+6/2IwuKHcy73PY0sh3/Mx4/Zh86ctc935IaLVc3qrY5fkg/APmZlUQ== 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 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=JcB01EX+Kne+GnrqpXoo7+eKMlQeN5wi7mDAQJKfoJg=; b=wgewHxJ8ZBW8T+1zVa4l+2liPqOVHk+sQagRTrmuOwuwdeFEkEJqTrMF2ArOGlOn+xuPkyeD9+XYkNGQi8XDf4lsbBxK5faspSfpGbLnHxHEletBcO1acj9oawaCOcnsT7HsGNYzk4VMaCbNdsFMbv7vq4eyhR7Jwk/9h56xYPI= Received: from DS7PR03CA0270.namprd03.prod.outlook.com (2603:10b6:5:3b3::35) by LV3PR12MB9410.namprd12.prod.outlook.com (2603:10b6:408:212::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.24; Fri, 20 Oct 2023 06:28:32 +0000 Received: from CY4PEPF0000EDD2.namprd03.prod.outlook.com (2603:10b6:5:3b3:cafe::6f) by DS7PR03CA0270.outlook.office365.com (2603:10b6:5:3b3::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6886.35 via Frontend Transport; Fri, 20 Oct 2023 06:28:32 +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 CY4PEPF0000EDD2.mail.protection.outlook.com (10.167.241.206) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.22 via Frontend Transport; Fri, 20 Oct 2023 06:28:31 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.27; Fri, 20 Oct 2023 01:28:31 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 20 Oct 2023 01:28:28 -0500 From: Vijendar Mukunda To: CC: , , , Vijendar Mukunda , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Venkata Prasad Potturu , Marian Postevca , "open list" Subject: [PATCH 1/5] ASoC: amd: Add acpi machine id for acp6.3 version based platform Date: Fri, 20 Oct 2023 11:58:11 +0530 Message-ID: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD2:EE_|LV3PR12MB9410:EE_ X-MS-Office365-Filtering-Correlation-Id: b42f84be-544e-45df-d596-08dbd135c7ed X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4dX/tPwY6tjvPzUu1uFmv1OlaF79OMljws/fhFjllJWfWxWkmfnsFaM6JK7v2bFoZ0OQkoq2d2OyhCo8KSs0bXrdc0RZ40Vn7wTvqfIK+Zh44pBnoL3noDyIHGeccAOfHm3v4RnB0c7tVLfaaQzRbShRth8PcJdqTnyvGnh6ByL+Bf29tY3tnr1zoADIXTmWAyTA3gQvBSxfgqe8uY0KDNkRTQ1LV8CHBCu9OW6cCmoyJpnyhEfdVLMkG0gLM0P5G0iVZGzOuYotbnphMgJ12nCuNMRdnJwZgLAqNGN40TR9+YOv4v5HPH6urZ7qPfy0rkzUFzdoOKrvGlturvXZK7Th6RPddcIVlyr01rVp+bIM6B0hOsTeUC0FJYeRVfbfSrFrKO8f+3688u+zXulWxZxeCm9TcBwHfdX4qp32yfuPNWMLVH8s7bhpjrfOW+BncVSGADextvp4iCd1B+WMDF66o4x4uTMO3SYCjYiDZYeC6Vz33bIE1+xwX/NmTKjh1bPrfj+zSCFGegZIX2wmtreuY/t508lLuLlSSOXFrj7m49yZKWUHekl82jZDQutgpCC0q2QTxGonTWZBXE3ANd0cBy4qDoZmtO+jbt/hinmA2tsyPcVk+vKaklmBiYPziwXcQ+BH+6ihOIo7fT6FTaypJeUvbc/eAJLDiSTGtPvmiBpU++X98bc0GCR1/Nw8zYfXSnstdiP0ygFgrtmMEWYW4yDAHiER2nrMA0NPIOgXiVHRc4FGRNO3wROeUYidXCBwKpR4Ewy8xuC+Y6/Dzw== 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:(13230031)(4636009)(396003)(376002)(136003)(39860400002)(346002)(230922051799003)(186009)(64100799003)(451199024)(1800799009)(82310400011)(46966006)(40470700004)(36840700001)(40460700003)(4326008)(8936002)(40480700001)(47076005)(478600001)(36756003)(356005)(82740400003)(26005)(2616005)(1076003)(81166007)(336012)(426003)(70586007)(54906003)(5660300002)(86362001)(316002)(6666004)(6916009)(41300700001)(70206006)(7696005)(8676002)(2906002)(36860700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 06:28:31.9688 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b42f84be-544e-45df-d596-08dbd135c7ed 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: CY4PEPF0000EDD2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV3PR12MB9410 Message-ID-Hash: ZV6HFKUKRJAJRYI6T5S6IKCJ6VNYRJDO X-Message-ID-Hash: ZV6HFKUKRJAJRYI6T5S6IKCJ6VNYRJDO X-MailFrom: Vijendar.Mukunda@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.8 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 acpi machine id for ACP6.3 version based platform and configure driver data to enable SOF sound card support on newer boards. Signed-off-by: Vijendar Mukunda --- sound/soc/amd/acp-config.c | 12 ++++++++++++ sound/soc/amd/mach-config.h | 1 + 2 files changed, 13 insertions(+) diff --git a/sound/soc/amd/acp-config.c b/sound/soc/amd/acp-config.c index a58d646d28f6..20cee7104c2b 100644 --- a/sound/soc/amd/acp-config.c +++ b/sound/soc/amd/acp-config.c @@ -263,4 +263,16 @@ struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_sof_machines[] = { }; EXPORT_SYMBOL(snd_soc_acpi_amd_rmb_sof_machines); +struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_machines[] = { + { + .id = "AMDI1019", + .drv_name = "acp63-dsp", + .pdata = &acp_quirk_data, + .fw_filename = "sof-acp_6_3.ri", + .sof_tplg_filename = "sof-acp_6_3.tplg", + }, + {}, +}; +EXPORT_SYMBOL(snd_soc_acpi_amd_acp63_sof_machines); + MODULE_LICENSE("Dual BSD/GPL"); diff --git a/sound/soc/amd/mach-config.h b/sound/soc/amd/mach-config.h index d392e6d6e6e1..ce5d77639086 100644 --- a/sound/soc/amd/mach-config.h +++ b/sound/soc/amd/mach-config.h @@ -21,6 +21,7 @@ extern struct snd_soc_acpi_mach snd_soc_acpi_amd_sof_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_amd_rmb_sof_machines[]; extern struct snd_soc_acpi_mach snd_soc_acpi_amd_vangogh_sof_machines[]; +extern struct snd_soc_acpi_mach snd_soc_acpi_amd_acp63_sof_machines[]; struct config_entry { u32 flags; From patchwork Fri Oct 20 06:28:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13430110 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 56018CDB47E for ; Fri, 20 Oct 2023 06:33:46 +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 1CDF483B; Fri, 20 Oct 2023 08:32:54 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 1CDF483B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697783624; bh=5PEpzuTm66mGLJlEADAL5ush677c3dth4oNtAlAEOEQ=; 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=g94uEPY2rrVppaCRWuQ58w+Q7lKIctIRpcnfmEQZQpWD0mEOgodsVXcQqsislSDs1 9g5sojVXdjJj7npc1REjaxwKkM92PjNd26O6OLUuRiwqpw44MwfBPSl66b58fnYZlW VyM39W9yb3vxjWZ2kIlq5Qx3hdAC/rV1Sl8vP5os= Received: by alsa1.perex.cz (Postfix, from userid 50401) id E06C6F8025F; Fri, 20 Oct 2023 08:32:53 +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 55D64F8027B; Fri, 20 Oct 2023 08:32:53 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5EC68F8027B; Fri, 20 Oct 2023 08:29:27 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on20616.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe5b::616]) (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 6EC1BF8024E; Fri, 20 Oct 2023 08:29:08 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6EC1BF8024E 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=tI7bn0u3 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jkoJCCAXAP0g8RYt1HllZ9Btp0ntMALJHaeGv7rlMEBPSo+ppF3E6E79cBn7AcU5p4rBUdRoFZeLOpW0Hc5nzbY5E3kBcDyaBa2/oV3+6+wCFUs2wjAgh0cnvyF5i87ravPV/kSqS2O1R8SyEIDX4GcBvX8RsZIwp33lbnzoZ2tvi8QL9Aj1c0ErIDNoDnd/OkZkk9yHZ0sx5vUsGadcGGu/6CnL7IS/rifx57icv7n1c/78K9Ad2qFo6WcTXuaCk7CERQXKEdkk4s4MTFMuTziUoQ+HQK5I3pHrAatQ5DyPBf/tGIcjv/krd37CinU7bZOQoXJxpt8ZU8ruD7+qhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=XDCXCiZoqnjUxCvpDcsRrOWumgzb76V6UiN2QRKdBaY=; b=TDDEyujFTPhX6O8nLwEbDsoDlVJhMMg58tYoshGauFWmZgCqM2gMHee4yhAwOk0ATx80rhvT/cNWG9ZYu/CJkSDD90W3u0lx7lZhWOz0LraVBVsHYhtwgqr5qoYDEyjdP+OvhvgBUF0mvVmkBRAaPcfrlIuOHITg0LMj+u4lQC/mypEp5Y6rhaelYCU+s73IE4sHUTHiZ6CM714zhgIJ351PWfNTiKkFtopf4KAbJs95N+3j2Mv3vRzO5/R3WqrC/Yn0+7ChmkTIAfxLU/pDg+GfRJshesClMBpgrVFKd/lGqkBwKZJvfLY5TPhCZpOaAxV8m+1fDBfNsqD+x5+BwA== 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 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=XDCXCiZoqnjUxCvpDcsRrOWumgzb76V6UiN2QRKdBaY=; b=tI7bn0u30ZAKak3U3hAKqYeeKAZMQOJm7LlXyovaCVCxWlgOkCwaPqQyl/MdvuMxGCgUUAAjIcmTxLNMplRrHlqlqMhuvuoXqnKGmBicBrg1IVokc7Jc28dbUj4OKO+3Ka0maAnEFOE8aDZJ5JsxEcvbGQSBSoX0m9TgL/DSFcs= Received: from CY5PR15CA0103.namprd15.prod.outlook.com (2603:10b6:930:7::26) by CH3PR12MB8257.namprd12.prod.outlook.com (2603:10b6:610:121::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Fri, 20 Oct 2023 06:29:03 +0000 Received: from CY4PEPF0000EDD6.namprd03.prod.outlook.com (2603:10b6:930:7:cafe::5e) by CY5PR15CA0103.outlook.office365.com (2603:10b6:930:7::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26 via Frontend Transport; Fri, 20 Oct 2023 06:29: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=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000EDD6.mail.protection.outlook.com (10.167.241.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.22 via Frontend Transport; Fri, 20 Oct 2023 06:29:02 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.27; Fri, 20 Oct 2023 01:28:58 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 20 Oct 2023 01:28:53 -0500 From: Vijendar Mukunda To: CC: , , , Vijendar Mukunda , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , "Bard Liao" , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , V sujith kumar Reddy , Venkata Prasad Potturu , Mastan Katragadda , open list , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" Subject: [PATCH 2/5] ASoC: SOF: amd: add support for acp6.3 based platform Date: Fri, 20 Oct 2023 11:58:12 +0530 Message-ID: <20231020062822.3913760-2-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> References: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD6:EE_|CH3PR12MB8257:EE_ X-MS-Office365-Filtering-Correlation-Id: 3db75bb5-20eb-4dea-798a-08dbd135da4e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Msmx9nsmEhUrp2i9IZIPKkJ6cmWvynEB4Wh8k8Q0E5Y0uugBaqHnyLfCwEHzNNl04uyBi4VoJhnog20HXvBvOo3Mk+Fb1iOFcOU6kl7f8yCVkmIrAZDNUSlor8LDDA7gvzCbLq7TItbKMXh32u5XbFHXIyhyS/I+ZKVyyIXpxarWVNCH+Lgkx5UJXo0vsNlj2Unfc94+ItvP71bnavwRzT4B4zFfjtTFTIsfWl7Hq+VfGdBfpoOZFizSOQ16eo0EuCtkgwLAb8D3acrFcXwEEWNzi+bDylMSNtcbFXo6YxTyXYkjqpVxdxTDu+a2lvv9a3j21CblO5VeO8P1X1HYtN9u0P1P9DphT9ioF3fFSGiM+UQoLWQJ8N4O09bpVBG5S/+NAKLIOTy05fwkc7pQM3ayyQnimCRhB5qiNnVBBDItd0D+1QRuNegYLmQg1TK9vxiUAhDr+4eIKBUyWbqOtuO8YacLddF8ZJRbJximgely3t5K9aPIVWRrBpA2dwNmnyJwCmnqLB0TEcl88kNLKO6MA2NGDHA5EDNSmSYp9FeeKvRm8Rt0ZQWewD5p51+yiViEc9HXGCpdmT4Tqap97PpmIcslVvSot7blBIP8tM3epgId80saZzeI4CFFPge4F2LOsa0szTH/hTy6Y3WQs8qyTJAVGmHAd81tknfjjF0XfM/PyfwjqpkSK6ZMzzrWuGD/xcSaR0pgGpHfRIid3KXkKKuznBOGDlRcYQh9m202O7ZRU5zTuar36MUuasT3IVpglO34PL7fLFs1qfZa8A== 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:(13230031)(4636009)(346002)(136003)(376002)(39860400002)(396003)(230922051799003)(1800799009)(451199024)(64100799003)(82310400011)(186009)(46966006)(40470700004)(36840700001)(40460700003)(86362001)(40480700001)(6666004)(54906003)(70586007)(6916009)(316002)(478600001)(8936002)(70206006)(2906002)(5660300002)(8676002)(4326008)(36756003)(47076005)(36860700001)(2616005)(7416002)(336012)(41300700001)(426003)(26005)(81166007)(356005)(7696005)(1076003)(82740400003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 06:29:02.8167 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3db75bb5-20eb-4dea-798a-08dbd135da4e 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: CY4PEPF0000EDD6.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB8257 Message-ID-Hash: B5C2JQA5M5FRHW3EU7TQ32XUOMLMH3PF X-Message-ID-Hash: B5C2JQA5M5FRHW3EU7TQ32XUOMLMH3PF X-MailFrom: Vijendar.Mukunda@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.8 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 SOF support for ACP6.3 version based platform Signed-off-by: Vijendar Mukunda --- sound/soc/sof/amd/Kconfig | 9 +++ sound/soc/sof/amd/Makefile | 2 + sound/soc/sof/amd/acp.h | 4 + sound/soc/sof/amd/acp63.c | 146 ++++++++++++++++++++++++++++++++++ sound/soc/sof/amd/pci-acp63.c | 106 ++++++++++++++++++++++++ 5 files changed, 267 insertions(+) create mode 100644 sound/soc/sof/amd/acp63.c create mode 100644 sound/soc/sof/amd/pci-acp63.c diff --git a/sound/soc/sof/amd/Kconfig b/sound/soc/sof/amd/Kconfig index f2faa08f0c0e..19c5e27a193f 100644 --- a/sound/soc/sof/amd/Kconfig +++ b/sound/soc/sof/amd/Kconfig @@ -60,4 +60,13 @@ config SND_SOC_SOF_ACP_PROBES This option is not user-selectable but automatically handled by 'select' statements at a higher level +config SND_SOC_SOF_AMD_ACP63 + tristate "SOF support for ACP6.3 platform" + depends on SND_SOC_SOF_PCI + select SND_SOC_SOF_AMD_COMMON + help + Select this option for SOF support on + AMD ACP6.3 version based platforms. + Say Y if you want to enable SOF on ACP6.3 based platform. + If unsure select "N". endif diff --git a/sound/soc/sof/amd/Makefile b/sound/soc/sof/amd/Makefile index f3b375e67a6f..ad25f4206177 100644 --- a/sound/soc/sof/amd/Makefile +++ b/sound/soc/sof/amd/Makefile @@ -9,8 +9,10 @@ snd-sof-amd-acp-$(CONFIG_SND_SOC_SOF_ACP_PROBES) = acp-probes.o snd-sof-amd-renoir-objs := pci-rn.o renoir.o snd-sof-amd-rembrandt-objs := pci-rmb.o rembrandt.o snd-sof-amd-vangogh-objs := pci-vangogh.o vangogh.o +snd-sof-amd-acp63-objs := pci-acp63.o acp63.o obj-$(CONFIG_SND_SOC_SOF_AMD_COMMON) += snd-sof-amd-acp.o obj-$(CONFIG_SND_SOC_SOF_AMD_RENOIR) +=snd-sof-amd-renoir.o obj-$(CONFIG_SND_SOC_SOF_AMD_REMBRANDT) +=snd-sof-amd-rembrandt.o obj-$(CONFIG_SND_SOC_SOF_AMD_VANGOGH) +=snd-sof-amd-vangogh.o +obj-$(CONFIG_SND_SOC_SOF_AMD_ACP63) +=snd-sof-amd-acp63.o diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index 6814f2051104..3d2c5f07ed44 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -62,10 +62,12 @@ #define ACP_RN_PCI_ID 0x01 #define ACP_VANGOGH_PCI_ID 0x50 #define ACP_RMB_PCI_ID 0x6F +#define ACP63_PCI_ID 0x63 #define HOST_BRIDGE_CZN 0x1630 #define HOST_BRIDGE_VGH 0x1645 #define HOST_BRIDGE_RMB 0x14B5 +#define HOST_BRIDGE_ACP63 0x14E8 #define ACP_SHA_STAT 0x8000 #define ACP_PSP_TIMEOUT_US 1000000 #define ACP_EXT_INTR_ERROR_STAT 0x20000000 @@ -273,6 +275,8 @@ extern struct snd_sof_dsp_ops sof_vangogh_ops; int sof_vangogh_ops_init(struct snd_sof_dev *sdev); extern struct snd_sof_dsp_ops sof_rembrandt_ops; int sof_rembrandt_ops_init(struct snd_sof_dev *sdev); +extern struct snd_sof_dsp_ops sof_acp63_ops; +int sof_acp63_ops_init(struct snd_sof_dev *sdev); struct snd_soc_acpi_mach *amd_sof_machine_select(struct snd_sof_dev *sdev); /* Machine configuration */ diff --git a/sound/soc/sof/amd/acp63.c b/sound/soc/sof/amd/acp63.c new file mode 100644 index 000000000000..9fb645079c3a --- /dev/null +++ b/sound/soc/sof/amd/acp63.c @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) +// +// This file is provided under a dual BSD/GPLv2 license. When using or +// redistributing this file, you may do so under either license. +// +// Copyright(c) 2023 Advanced Micro Devices, Inc. +// +// Authors: Vijendar Mukunda + +/* + * Hardware interface for Audio DSP on ACP6.3 version based platform + */ + +#include +#include + +#include "../ops.h" +#include "../sof-audio.h" +#include "acp.h" +#include "acp-dsp-offset.h" + +#define I2S_HS_INSTANCE 0 +#define I2S_BT_INSTANCE 1 +#define I2S_SP_INSTANCE 2 +#define PDM_DMIC_INSTANCE 3 +#define I2S_HS_VIRTUAL_INSTANCE 4 + +static struct snd_soc_dai_driver acp63_sof_dai[] = { + [I2S_HS_INSTANCE] = { + .id = I2S_HS_INSTANCE, + .name = "acp-sof-hs", + .playback = { + .rates = SNDRV_PCM_RATE_8000_96000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE, + .channels_min = 2, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 96000, + }, + .capture = { + .rates = SNDRV_PCM_RATE_8000_48000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE, + /* Supporting only stereo for I2S HS controller capture */ + .channels_min = 2, + .channels_max = 2, + .rate_min = 8000, + .rate_max = 48000, + }, + }, + + [I2S_BT_INSTANCE] = { + .id = I2S_BT_INSTANCE, + .name = "acp-sof-bt", + .playback = { + .rates = SNDRV_PCM_RATE_8000_96000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE, + .channels_min = 2, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 96000, + }, + .capture = { + .rates = SNDRV_PCM_RATE_8000_48000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE, + /* Supporting only stereo for I2S BT controller capture */ + .channels_min = 2, + .channels_max = 2, + .rate_min = 8000, + .rate_max = 48000, + }, + }, + + [I2S_SP_INSTANCE] = { + .id = I2S_SP_INSTANCE, + .name = "acp-sof-sp", + .playback = { + .rates = SNDRV_PCM_RATE_8000_96000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE, + .channels_min = 2, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 96000, + }, + .capture = { + .rates = SNDRV_PCM_RATE_8000_48000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE, + /* Supporting only stereo for I2S SP controller capture */ + .channels_min = 2, + .channels_max = 2, + .rate_min = 8000, + .rate_max = 48000, + }, + }, + + [PDM_DMIC_INSTANCE] = { + .id = PDM_DMIC_INSTANCE, + .name = "acp-sof-dmic", + .capture = { + .rates = SNDRV_PCM_RATE_8000_48000, + .formats = SNDRV_PCM_FMTBIT_S32_LE, + .channels_min = 2, + .channels_max = 4, + .rate_min = 8000, + .rate_max = 48000, + }, + }, + + [I2S_HS_VIRTUAL_INSTANCE] = { + .id = I2S_HS_VIRTUAL_INSTANCE, + .name = "acp-sof-hs-virtual", + .playback = { + .rates = SNDRV_PCM_RATE_8000_96000, + .formats = SNDRV_PCM_FMTBIT_S16_LE | SNDRV_PCM_FMTBIT_S8 | + SNDRV_PCM_FMTBIT_U8 | SNDRV_PCM_FMTBIT_S32_LE, + .channels_min = 2, + .channels_max = 8, + .rate_min = 8000, + .rate_max = 96000, + }, + }, +}; + +/* Phoenix ops */ +struct snd_sof_dsp_ops sof_acp63_ops; +EXPORT_SYMBOL_NS(sof_acp63_ops, SND_SOC_SOF_AMD_COMMON); + +int sof_acp63_ops_init(struct snd_sof_dev *sdev) +{ + /* common defaults */ + memcpy(&sof_acp63_ops, &sof_acp_common_ops, sizeof(struct snd_sof_dsp_ops)); + + sof_acp63_ops.drv = acp63_sof_dai; + sof_acp63_ops.num_drv = ARRAY_SIZE(acp63_sof_dai); + + return 0; +} + +MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON); +MODULE_DESCRIPTION("ACP63 SOF Driver"); +MODULE_LICENSE("Dual BSD/GPL"); diff --git a/sound/soc/sof/amd/pci-acp63.c b/sound/soc/sof/amd/pci-acp63.c new file mode 100644 index 000000000000..bceb94ac80a9 --- /dev/null +++ b/sound/soc/sof/amd/pci-acp63.c @@ -0,0 +1,106 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) +// +// This file is provided under a dual BSD/GPLv2 license. When using or +// redistributing this file, you may do so under either license. +// +// Copyright(c) 2023 Advanced Micro Devices, Inc. All rights reserved. +// +// Authors: Vijendar Mukunda + +/*. + * PCI interface for ACP6.3 device + */ + +#include +#include +#include +#include +#include + +#include "../ops.h" +#include "../sof-pci-dev.h" +#include "../../amd/mach-config.h" +#include "acp.h" +#include "acp-dsp-offset.h" + +#define ACP6X_FUTURE_REG_ACLK_0 0x1854 +#define ACP6x_REG_START 0x1240000 +#define ACP6x_REG_END 0x125C000 + +static const struct sof_amd_acp_desc acp63_chip_info = { + .rev = 6, + .host_bridge_id = HOST_BRIDGE_ACP63, + .pgfsm_base = ACP6X_PGFSM_BASE, + .ext_intr_stat = ACP6X_EXT_INTR_STAT, + .dsp_intr_base = ACP6X_DSP_SW_INTR_BASE, + .sram_pte_offset = ACP6X_SRAM_PTE_OFFSET, + .hw_semaphore_offset = ACP6X_AXI2DAGB_SEM_0, + .fusion_dsp_offset = ACP6X_DSP_FUSION_RUNSTALL, + .probe_reg_offset = ACP6X_FUTURE_REG_ACLK_0, +}; + +static const struct sof_dev_desc acp63_desc = { + .machines = snd_soc_acpi_amd_acp63_sof_machines, + .resindex_lpe_base = 0, + .resindex_pcicfg_base = -1, + .resindex_imr_base = -1, + .irqindex_host_ipc = -1, + .chip_info = &acp63_chip_info, + .ipc_supported_mask = BIT(SOF_IPC_TYPE_3), + .ipc_default = SOF_IPC_TYPE_3, + .default_fw_path = { + [SOF_IPC_TYPE_3] = "amd/sof", + }, + .default_tplg_path = { + [SOF_IPC_TYPE_3] = "amd/sof-tplg", + }, + .default_fw_filename = { + [SOF_IPC_TYPE_3] = "sof-acp_6_3.ri", + }, + .nocodec_tplg_filename = "sof-acp.tplg", + .ops = &sof_acp63_ops, + .ops_init = sof_acp63_ops_init, +}; + +static int acp63_pci_probe(struct pci_dev *pci, const struct pci_device_id *pci_id) +{ + unsigned int flag; + + if (pci->revision != ACP63_PCI_ID) + return -ENODEV; + + flag = snd_amd_acp_find_config(pci); + if (flag != FLAG_AMD_SOF && flag != FLAG_AMD_SOF_ONLY_DMIC) + return -ENODEV; + + return sof_pci_probe(pci, pci_id); +}; + +static void acp63_pci_remove(struct pci_dev *pci) +{ + sof_pci_remove(pci); +} + +/* PCI IDs */ +static const struct pci_device_id acp63_pci_ids[] = { + { PCI_DEVICE(PCI_VENDOR_ID_AMD, ACP_PCI_DEV_ID), + .driver_data = (unsigned long)&acp63_desc}, + { 0, } +}; +MODULE_DEVICE_TABLE(pci, acp63_pci_ids); + +/* pci_driver definition */ +static struct pci_driver snd_sof_pci_amd_acp63_driver = { + .name = KBUILD_MODNAME, + .id_table = acp63_pci_ids, + .probe = acp63_pci_probe, + .remove = acp63_pci_remove, + .driver = { + .pm = &sof_pci_pm, + }, +}; +module_pci_driver(snd_sof_pci_amd_acp63_driver); + +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_IMPORT_NS(SND_SOC_SOF_AMD_COMMON); +MODULE_IMPORT_NS(SND_SOC_SOF_PCI_DEV); From patchwork Fri Oct 20 06:28:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13430111 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 7F075CDB47E for ; Fri, 20 Oct 2023 06:34:36 +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 C9F84A4C; Fri, 20 Oct 2023 08:33:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C9F84A4C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697783674; bh=gGe6T+4RwTixeO3Ujl16cSkpeqZgkIG5NSQsiBPXRdE=; 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=QvcJ9FjZx5n6XKowSPx2faQCEPagCUfAihigEaSsfqZfqbyWZge7MVqI3nXbYJ5B1 LInem1uoGUzmAXMG4YULyfFoc/kQfMDzLZUyjnRYGVheVexmKuGMAzDf30ushNM0+z ocmeGd86PCCotWxiFzhDnVkHmvfjE6oz3B/Pnxx4= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BF298F80558; Fri, 20 Oct 2023 08:32:59 +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 03B18F8055B; Fri, 20 Oct 2023 08:32:59 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 7097CF8027B; Fri, 20 Oct 2023 08:29:30 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on20610.outbound.protection.outlook.com [IPv6:2a01:111:f400:7eb2::610]) (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 7B1E3F80236; Fri, 20 Oct 2023 08:29:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7B1E3F80236 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=u8pWQ/Hh ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XD9XrwYlWBpkNoUIecZrzBL6f6zuUAUt1TRIPpjw0usLVgtgAGmTth6zQRdHtpibbNwwLXeJSCbQVG05WrkUmMt/3dvKCpi4eJLmoXDr2RSvLqsTe8xEM9CU2ELEZhEXhgA9OCkNgwCR+dMTNRq3lFgFfH6aRYgaxIqCKKQ63rBi6K/7iku60oD8atqEZ699t3t6/HUWGNvxnbVD/XNl7PvHzw1vIXTShPzFl6eFTQEPnG9XQZqXn+Zx1oCIf7B7DgNqWSOs6aw1eGnO3o2+f3936E8P/6bsuRorin/AnRM6qhPxPqvmYTV0vv2hCBw3ND38x7LXwdyYbXiYo7G0HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=DF3l17Y46tjLzoMfH6AT5Qo1MljznJ7mBGk/VDlhtDM=; b=CkrJNoL4jmzF0NB765KpCJgqPHqSwNxl4JUERwhOIeNY4zyNXWvgTM45vNT17fxQdrjeE5wELHB5e4ef5PUKiOg/5dCVYcGP6RIRkBVdhH2al+l0cUIrNR+U/gInlUljt9kZ/xl+MNAmi441LyPHkMQNQHta76a8erft6j+6ogg2TVS0QbCCeE3aEiPT8VYgvx3qXmM/HmT05JJ7v0Vgal3wHEZ+v47j83fZc4IlllNQuSxjbm9oqeNHjjMKEJqQkdk1uFGz/RFbrmFx5YA2MLmjsZ7Ly/aqQe1QGJr6NrlZbKYUXb8DzAlCwdfJzz9hPukMkXtVtzjNrt0C9J9jwQ== 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 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=DF3l17Y46tjLzoMfH6AT5Qo1MljznJ7mBGk/VDlhtDM=; b=u8pWQ/HhnTDpO9FUH/k8LHM/x5u9CZlMQ11ZJI8oa+ONAoZMvWDP+Ja/lW0Y2M83N7jWbmh0rzLM9LwKAtvn5yhl2oT03Wrm51VY2/0DIQNQvJzkLVRx1sl+cZOkgbX12VLO5StxamMFXVOHXeGHmJmC+b8jex5QnVYJf3UAk1Q= Received: from CY5PR15CA0255.namprd15.prod.outlook.com (2603:10b6:930:66::25) by CH0PR12MB5387.namprd12.prod.outlook.com (2603:10b6:610:d6::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.23; Fri, 20 Oct 2023 06:29:10 +0000 Received: from CY4PEPF0000EDD6.namprd03.prod.outlook.com (2603:10b6:930:66:cafe::79) by CY5PR15CA0255.outlook.office365.com (2603:10b6:930:66::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26 via Frontend Transport; Fri, 20 Oct 2023 06:29:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000EDD6.mail.protection.outlook.com (10.167.241.210) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.22 via Frontend Transport; Fri, 20 Oct 2023 06:29:10 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.27; Fri, 20 Oct 2023 01:29:10 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 20 Oct 2023 01:29:05 -0500 From: Vijendar Mukunda To: CC: , , , Vijendar Mukunda , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , "Bard Liao" , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , V sujith kumar Reddy , Venkata Prasad Potturu , Mastan Katragadda , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , open list Subject: [PATCH 3/5] ASoC: SOF: amd: increase DSP cache window range Date: Fri, 20 Oct 2023 11:58:13 +0530 Message-ID: <20231020062822.3913760-3-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> References: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD6:EE_|CH0PR12MB5387:EE_ X-MS-Office365-Filtering-Correlation-Id: 5310554f-188b-4db3-7fc0-08dbd135dee3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AtUAEBtCD9o86g8tdRKb6k9Bqx+QTqagwjyVNg70Qor9vJI2fHWHLcXIOKGhPKqUyHY+uN6sQbAS4GJnVfGS5x2dgVysR2S2yG5FF/Xfx2j6UqVbTUHtyVReipqPqZua+RMcsGLGaFN5LrDaUSEuRN24ZNG7/HY+3NEGKCihvK0i8w1lAT0FQ1ecO16l6kNKwIfu4XlHCgo3Pu/ZPy4qPnoQ5/YR7/woj9SR0ZGzmVCZxu8aFsI09WMgryiC0YFpCnRNypGhUxtBUEKzX7MIGNpDy7vjzhkFJSBK1471V5GlQlgri84NJcW4g1ZL3CW/4gMwsOotTmrXT1SblyPN36Chu6GozB32tGj5ueFIKuilXujWorjx5AdJUhT+eSgcT8fKrcE0S+vk4M+Xs5vJH/kel/dsfyLwboQeI4RVm1FX1AjWsKm+9HV60SP21yYYX0rUAB9Y+gYj1EAn8q4EcrbuiD1mSrG6QXT7ppX1zKqYRMy8CyEWtqxL765zfrWoT7HtY8pQ86tY/+qWeDXpljD01d9XAs5CA6Qkv22wv8wmKOgGUHIauOrhWm7YPJmkbbdcnWMDjHLk+cHFIJ+1eIKjIF5Bk4jeD4GRpMVwOPwKinDfFtS5Xf+ssYbR9j8ExpgVIve584bTZw97VTN+WMz5Ykue3vKfq6nOW6lsTh9m+RYVJYCCfIHDqSFT96ipbPMiA23rHveelgyqmGPJsXO1HZQqAxxDZV3ZUKfYu4rQGBSPY9SMTUj3YZvr3GZcovkpdjwjkRk8qO3Ivv+cPw== 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:(13230031)(4636009)(136003)(376002)(396003)(346002)(39860400002)(230922051799003)(64100799003)(186009)(451199024)(1800799009)(82310400011)(36840700001)(40470700004)(46966006)(86362001)(4326008)(40460700003)(47076005)(40480700001)(2616005)(336012)(36756003)(82740400003)(356005)(26005)(1076003)(81166007)(426003)(6916009)(5660300002)(2906002)(8676002)(478600001)(70206006)(70586007)(316002)(54906003)(7696005)(7416002)(83380400001)(41300700001)(8936002)(4744005)(6666004)(36860700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 06:29:10.4886 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 5310554f-188b-4db3-7fc0-08dbd135dee3 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: CY4PEPF0000EDD6.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5387 Message-ID-Hash: ECTDBRBROKZ6FWUBLKP4MK2IOG2A7YGG X-Message-ID-Hash: ECTDBRBROKZ6FWUBLKP4MK2IOG2A7YGG X-MailFrom: Vijendar.Mukunda@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.8 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: Increase DSP cache window range to 2.5MB to align with ACP memory. Signed-off-by: Vijendar Mukunda --- sound/soc/sof/amd/acp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index 3d2c5f07ed44..205b434f0872 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -84,7 +84,7 @@ #define EXCEPT_MAX_HDR_SIZE 0x400 #define AMD_STACK_DUMP_SIZE 32 -#define SRAM1_SIZE 0x13A000 +#define SRAM1_SIZE 0x280000 #define PROBE_STATUS_BIT BIT(31) #define ACP_FIRMWARE_SIGNATURE 0x100 From patchwork Fri Oct 20 06:28:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13430112 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 48140CDB47E for ; Fri, 20 Oct 2023 06:34:41 +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 C4052DEB; Fri, 20 Oct 2023 08:33:47 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz C4052DEB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697783677; bh=4eiADQtA15fN3Buh8pTyCL1I3ix9gK7hYsQdyLP7l8Y=; 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=dQcucHecOljKc8LLhkmb6gFQ88RuynfjlrDr9+XZADZzTOls+XHZ+Yt/Z1a6FWCVM 6ETnT3Wwrs9tjP9YHo6B/Ny1oKIz2b1Hr6IbTRsPL23CuxvNeW565hCvPABxPFUYgL +g9CIhDp8bRgsREblMe7/TrRQysqXG6i+Z0c1ePw= Received: by alsa1.perex.cz (Postfix, from userid 50401) id B8019F8058C; Fri, 20 Oct 2023 08:33:00 +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 03B23F80587; Fri, 20 Oct 2023 08:33:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 34E8EF8025F; Fri, 20 Oct 2023 08:29:37 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on20600.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe59::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 E95F8F800C9; Fri, 20 Oct 2023 08:29:26 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz E95F8F800C9 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=xZMqOro9 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TPM/luenBvayCvjd3obJJgza5ZvY91H6GxwKqC9RH+zfp0INAIbT4SKUFyZy1yGnj+wdD2ZIURaROCV5pG5VQm2LmPuikopt5v/6XdTaskwIUJucMvHVpeeU1ZgpS12YfE3tDrwsraDU7ZLCbjx5vSE6XdfXEDjoKHDL3Eddbc9oKCKvsAG5AOc4iBuoM+gTiZIqO+X1PoGgJaBY6AeFVBbrJjkWfbE1/CAy6aEbyDJ34xM5x/ht7mXlIn7xnntOZocCWBeWBYIex3bnWC3PIExPccEPlKK7GoByLcSfa2BeU7F2hfcjEpwgAX5tIPcOpfKE07gqO4epIRCVhxEGOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=64IlTLk9U7H3EHFVzimSbXahkhzsdMO0mNXW/M+XRUw=; b=CcbIHpcEDJP+j2DoJKiOPIQKHSwq+efy/HScVlHF9P8o5EgCZyOo6DiaCEW12cTweQlmIUeRx6pMAUBTjgjyNpoSc/LM+Ktm22snbbMPlYClMhfoadpineq0GNEl9DJkCILMuXlW5mty/3jReR3ru/hGMEU9wM1ZuRn7vfRGweaIYYNeet+DtwIJLU4BhA8udJjLVaHdvn8YaH9hJCkvqyHSSK/PwG/et7Y53dfpRDsMVNyI8VeL/kQk5w2+FITonteL/nrMSoEFuxgbSLL/S6X6bbOvM4p5YgILtdp7xMPb6W2Fvd89cT+cnqNa5vkrzFNLCEkt7CxS7zO0kxlizg== 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 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=64IlTLk9U7H3EHFVzimSbXahkhzsdMO0mNXW/M+XRUw=; b=xZMqOro9paMP3xfOOQxLh1NDSQgSpd0C6iGmkz0I3itZovuU3jH/+QMuE2tS6G5JCJIm00UEA27zG44mxOd3H6Dj9dVAf2MFQ3yGATaeaAC31sNhJvlrSsO8flb5OTEx6rTkehW1ttZ0AdWR/84haqn6Vh8JTnpgP5iAcRB2Vn0= Received: from CY5PR22CA0042.namprd22.prod.outlook.com (2603:10b6:930:1d::35) by CH3PR12MB7740.namprd12.prod.outlook.com (2603:10b6:610:145::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Fri, 20 Oct 2023 06:29:23 +0000 Received: from CY4PEPF0000EDD4.namprd03.prod.outlook.com (2603:10b6:930:1d:cafe::88) by CY5PR22CA0042.outlook.office365.com (2603:10b6:930:1d::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26 via Frontend Transport; Fri, 20 Oct 2023 06:29:23 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB03.amd.com; pr=C Received: from SATLEXMB03.amd.com (165.204.84.17) by CY4PEPF0000EDD4.mail.protection.outlook.com (10.167.241.208) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6838.22 via Frontend Transport; Fri, 20 Oct 2023 06:29:22 +0000 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.27; Fri, 20 Oct 2023 01:29:21 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 20 Oct 2023 01:29:16 -0500 From: Vijendar Mukunda To: CC: , , , Vijendar Mukunda , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , "Bard Liao" , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Venkata Prasad Potturu , V sujith kumar Reddy , Mastan Katragadda , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , open list Subject: [PATCH 4/5] ASoC: SOF: amd: refactor acp dram usage for data bin loading Date: Fri, 20 Oct 2023 11:58:14 +0530 Message-ID: <20231020062822.3913760-4-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> References: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD4:EE_|CH3PR12MB7740:EE_ X-MS-Office365-Filtering-Correlation-Id: 12ab3fc7-90ba-47ce-6cf3-08dbd135e632 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: TTe5kgBgsy/W91aPQgUNq+m0kKmdsZs717LzBFyVuIrHIGSTvn95sLTxXIWbACsykPZ/gaoXMrehgkoqgOtQdErvsXYaBwC9quuluXATK3wi1LSfTcmfBPKkxTxT53CRqJiLi/GFIC0NU1uXgA0NaKFb3f5KxY5LmvC01DhkDmVPCJberETmv5wRznJzWLr07ra9+4sveXrsQgCOZosDGulu/GuSWITwqWgacI1Nsz7lBB7+TpvL6Zq6+ajZUNw0Hl1SKkz+WaJW/CGTEczMzzJxy+lniez/5YnUYV2I2gKC/+iMBXdJt4HWa3kav0X/9xo/O+l7D0dxvLWRjmALvQA84+8Gq5QDHUJXfK3brWidbnjjDGTxv0tMXZYnhiMv+QdN7PlE+lrLn6RYxAvwHtCqs73+8A2vU79MKTx2NQgHpg/VIz7bYcPNBAmX5COnWtav4dhJfrL53TukwRm/Hz48Ov1ZUayzRhFUjVan2L8Sp+u2+ctebcJyQK4dBn3RMGCFJyjYUnaXQHMnsTIoD9eeO9Zl3lTH50jXN21BPnnOV+fv9hTRIrDo7iXRz3cVIKKT08y81692Ya3MWhTpswwFVTuTCUsom3e9tUJ9Ve7koMoo4fxRDHoDMt7UxKEkPAbaD/KvmyWUrJDMz1p1sFEw8LLXVO8ksBMBjIxnKjqUl2dDbyPZ2uhH4E40rit8Ns92dm4hHr0SS1ohR5UPUArymkMyMcmsF0w8KW9DUgRjHNlWdJXOp6d9/6AFqUdnT9p0ktpNX0JTvIh+iegHQw== 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:(13230031)(4636009)(136003)(39860400002)(376002)(396003)(346002)(230922051799003)(82310400011)(186009)(64100799003)(1800799009)(451199024)(46966006)(36840700001)(40470700004)(40460700003)(1076003)(2616005)(426003)(336012)(26005)(7696005)(36860700001)(83380400001)(47076005)(41300700001)(4326008)(8676002)(8936002)(7416002)(5660300002)(2906002)(478600001)(70206006)(70586007)(54906003)(6916009)(316002)(356005)(81166007)(82740400003)(86362001)(40480700001)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 06:29:22.5937 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 12ab3fc7-90ba-47ce-6cf3-08dbd135e632 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: CY4PEPF0000EDD4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB7740 Message-ID-Hash: 22YAJ5VGT4OLIBZ5HX3IYW3DTWCW5ZQQ X-Message-ID-Hash: 22YAJ5VGT4OLIBZ5HX3IYW3DTWCW5ZQQ X-MailFrom: Vijendar.Mukunda@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.8 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: DSP data bin can be loaded in to ACP DRAM or ACP SRAM. Add conditional check for ACP DRAM usage for data bin loading. Rename DRAM base address macro to have symmetry. Signed-off-by: Vijendar Mukunda --- sound/soc/sof/amd/acp-loader.c | 36 +++++++++++++++++++--------------- sound/soc/sof/amd/acp.h | 3 ++- 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/sound/soc/sof/amd/acp-loader.c b/sound/soc/sof/amd/acp-loader.c index a427673cfb03..d35d47d7e311 100644 --- a/sound/soc/sof/amd/acp-loader.c +++ b/sound/soc/sof/amd/acp-loader.c @@ -83,6 +83,7 @@ int acp_dsp_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_t } dest = adata->data_buf + offset; adata->fw_data_bin_size = size + offset; + adata->is_dram_in_use = true; break; case SOF_FW_BLK_TYPE_SRAM: offset = offset - desc->sram_pte_offset; @@ -153,7 +154,7 @@ int acp_dsp_pre_fw_run(struct snd_sof_dev *sdev) struct pci_dev *pci = to_pci_dev(sdev->dev); const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); struct acp_dev_data *adata; - unsigned int src_addr, size_fw; + unsigned int src_addr, size_fw, dest_addr; u32 page_count, dma_size; int ret; @@ -174,20 +175,21 @@ int acp_dsp_pre_fw_run(struct snd_sof_dev *sdev) dev_err(sdev->dev, "SHA DMA transfer failed status: %d\n", ret); return ret; } - configure_pte_for_fw_loading(FW_DATA_BIN, ACP_DRAM_PAGE_COUNT, adata); - - src_addr = ACP_SYSTEM_MEMORY_WINDOW + page_count * ACP_PAGE_SIZE; - ret = configure_and_run_dma(adata, src_addr, ACP_DATA_RAM_BASE_ADDRESS, - adata->fw_data_bin_size); - if (ret < 0) { - dev_err(sdev->dev, "acp dma configuration failed: %d\n", ret); - return ret; + if (adata->is_dram_in_use) { + configure_pte_for_fw_loading(FW_DATA_BIN, ACP_DRAM_PAGE_COUNT, adata); + src_addr = ACP_SYSTEM_MEMORY_WINDOW + (page_count * ACP_PAGE_SIZE); + dest_addr = ACP_DRAM_BASE_ADDRESS; + + ret = configure_and_run_dma(adata, src_addr, dest_addr, adata->fw_data_bin_size); + if (ret < 0) { + dev_err(sdev->dev, "acp dma configuration failed: %d\n", ret); + return ret; + } + ret = acp_dma_status(adata, 0); + if (ret < 0) + dev_err(sdev->dev, "acp dma transfer status: %d\n", ret); } - ret = acp_dma_status(adata, 0); - if (ret < 0) - dev_err(sdev->dev, "acp dma transfer status: %d\n", ret); - if (desc->rev > 3) { /* Cache Window enable */ snd_sof_dsp_write(sdev, ACP_DSP_BAR, ACP_DSP0_CACHE_OFFSET0, desc->sram_pte_offset); @@ -197,10 +199,12 @@ int acp_dsp_pre_fw_run(struct snd_sof_dev *sdev) /* Free memory once DMA is complete */ dma_size = (PAGE_ALIGN(sdev->basefw.fw->size) >> PAGE_SHIFT) * ACP_PAGE_SIZE; dma_free_coherent(&pci->dev, dma_size, adata->bin_buf, adata->sha_dma_addr); - dma_free_coherent(&pci->dev, ACP_DEFAULT_DRAM_LENGTH, adata->data_buf, adata->dma_addr); adata->bin_buf = NULL; - adata->data_buf = NULL; - + if (adata->is_dram_in_use) { + dma_free_coherent(&pci->dev, ACP_DEFAULT_DRAM_LENGTH, adata->data_buf, + adata->dma_addr); + adata->data_buf = NULL; + } return ret; } EXPORT_SYMBOL_NS(acp_dsp_pre_fw_run, SND_SOC_SOF_AMD_COMMON); diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index 205b434f0872..2d1f57e1365a 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -54,7 +54,7 @@ #define ACP3X_SCRATCH_MEMORY_ADDRESS 0x02050000 #define ACP_SYSTEM_MEMORY_WINDOW 0x4000000 #define ACP_IRAM_BASE_ADDRESS 0x000000 -#define ACP_DATA_RAM_BASE_ADDRESS 0x01000000 +#define ACP_DRAM_BASE_ADDRESS 0x01000000 #define ACP_DRAM_PAGE_COUNT 128 #define ACP_DSP_TO_HOST_IRQ 0x04 @@ -208,6 +208,7 @@ struct acp_dev_data { struct pci_dev *smn_dev; struct acp_dsp_stream *probe_stream; bool enable_fw_debug; + bool is_dram_in_use; }; void memcpy_to_scratch(struct snd_sof_dev *sdev, u32 offset, unsigned int *src, size_t bytes); From patchwork Fri Oct 20 06:28:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mukunda,Vijendar" X-Patchwork-Id: 13430113 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 A1583CDB474 for ; Fri, 20 Oct 2023 06:35:05 +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 AA04C857; Fri, 20 Oct 2023 08:34:13 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz AA04C857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1697783703; bh=kVcwWjeHrek0Bz2iT1y5FAowk7d0mGXcoljwHZ3LuWo=; 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=JPhBKrmzMkA3Vr7qyOxWkfWyM67H/g744b0hBJ/iTPNtCJuB52csEE66UYfke0kjh yqZnJtNRPFhQ9LUqqojupqfPwffSVACPoo4OMYnAsrK68lSM78xF1nnTl/YWgInGH5 xgCbMXZp0ozorctPUE25rXADHo/nlV0i9bBSglB8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id BF1C4F805B1; Fri, 20 Oct 2023 08:33: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 4E6C5F805A9; Fri, 20 Oct 2023 08:33:01 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 11EABF8025F; Fri, 20 Oct 2023 08:29:48 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on20614.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e8a::614]) (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 A39ECF800C9; Fri, 20 Oct 2023 08:29:39 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz A39ECF800C9 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=a+LUbgs/ ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VnpwQAidu+BeoP5zv3Re3xuC1SwKqi67i5aEF7qmvF63Z/vkMrrGQDXfVV3d1ghy7IcVu74geS0rexVVMHvM3kYvFBX4MTnXhNPIVKWq/ZaYKdXoY3lWuYFl7l3wWA0DaV8NQktUTiowAhqGWUF5uQv43ob3S2I+LiR0993krntTj538mIZkcWNCD+1XkKRWNjymw71DQWNa21GD8yY6GYSBEOoNzyZTSpJQaeB4x19ViHomrnsDdEalHqlhHCdVjD3+zxWewPWEPjUzLGwhVKdlD9I9TGbdLMnIRcDux0ehffUUS7xHt060lmNVkZhoxY+XaVpjAfktRlCLUwbzDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=dhvlEbtYPqsqSwqLx7qvx9U5elUq/N1zyRAd5QzxH80=; b=gYszyTr0MbEaQKA06xXticQ2WAHxKFS4iZc+Ao5PZ9ByblxUIr0BBKApF06/NbeCzroLLyScicUJPa+LDhI5lA74Expv2KxiR9SZ8qgrUjQA07H1h44cM2k1wn2CnaGmrWiEGSr+hfsJKn9SQ7E4O6MOVEvcHgEbIn2C7I7f0MRessjfUYnrnfGdF47aHSLmg7HHMXCxwiSvbhDJiJ4OweOkwrxazP+2NmLfN6dkd0Izne4FiUHNyC74wrgfLP0+uB82/iwVZVPFtXITrIr76+sSkojtI2V+jdkQXAK/ohbISfJWvrUB0NSNMrGwlIuXSsvPVKF7jPApF+ILRdLv3w== 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 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=dhvlEbtYPqsqSwqLx7qvx9U5elUq/N1zyRAd5QzxH80=; b=a+LUbgs//0/El/NCUxS/MvWyQKQkxyH6rJhV9KDTlvBiPAB/NBwSG/mfEOcMp5v0iqiYfX4oVQ1JwNmVElw8tg0sdolMY7FSJIVViGyhbVJTsEoWAoUYk1f5VM20IJKYEfKthFY69hZfjN5iQV/NIMirmWvzfWjCxAguXaRdWdk= Received: from SN7PR04CA0217.namprd04.prod.outlook.com (2603:10b6:806:127::12) by PH7PR12MB5617.namprd12.prod.outlook.com (2603:10b6:510:133::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.21; Fri, 20 Oct 2023 06:29:35 +0000 Received: from SA2PEPF00001506.namprd04.prod.outlook.com (2603:10b6:806:127:cafe::83) by SN7PR04CA0217.outlook.office365.com (2603:10b6:806:127::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26 via Frontend Transport; Fri, 20 Oct 2023 06:29:35 +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 SA2PEPF00001506.mail.protection.outlook.com (10.167.242.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6907.20 via Frontend Transport; Fri, 20 Oct 2023 06:29:35 +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.27; Fri, 20 Oct 2023 01:29:34 -0500 Received: from SATLEXMB03.amd.com (10.181.40.144) 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.27; Fri, 20 Oct 2023 01:29:33 -0500 Received: from vijendar-X570-GAMING-X.amd.com (10.180.168.240) by SATLEXMB03.amd.com (10.181.40.144) with Microsoft SMTP Server id 15.1.2507.27 via Frontend Transport; Fri, 20 Oct 2023 01:29:28 -0500 From: Vijendar Mukunda To: CC: , , , Vijendar Mukunda , Pierre-Louis Bossart , Liam Girdwood , Peter Ujfalusi , "Bard Liao" , Ranjani Sridharan , Daniel Baluta , Kai Vehmanen , Jaroslav Kysela , Takashi Iwai , Chao Song , Venkata Prasad Potturu , V sujith kumar Reddy , Mastan Katragadda , "moderated list:SOUND - SOUND OPEN FIRMWARE (SOF) DRIVERS" , open list Subject: [PATCH 5/5] ASoC: SOF: amd: add option to use sram for data bin loading Date: Fri, 20 Oct 2023 11:58:15 +0530 Message-ID: <20231020062822.3913760-5-Vijendar.Mukunda@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> References: <20231020062822.3913760-1-Vijendar.Mukunda@amd.com> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00001506:EE_|PH7PR12MB5617:EE_ X-MS-Office365-Filtering-Correlation-Id: ce8e0cf2-bd17-4976-9b4b-08dbd135eda7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: FX8pOiNwNG8QlUJjsJLFvF2EA3ku2qa6fH5S9xeBqYoe9zFps+wBwAKiMqHdgszl8REycTez/hc8N+DLtwsY4bQnqsINqtLKrKPQU5Y/6jyBzGh/lc9GYroWd1v7LiOf420l6KdL9KYDs7a+P9n3ml+35Rj5f8gTQdhtWiaDlrs0y8LRO+JjuUiiPGqhp8z/nLNGej+3oSkSqIasR3D+ci+NW1n+tJBqSlq/zsmX4JQRUVTcAwy36RCdyM+LFKQnroaVIppyvTYqFYDIWRbhuRDbO3XoXtyub/4GsC6g/KcLAGXYZR4CzJQsu0EWtNKdhI1qj+05d7PTgJURjAp/ylwA+og5e4yQdFuSOmNJ9dcBRfbp218i/BL+YLG45J8B7caIDcC33dgqcyNFqVpyvDchePg0UbhSuonSD3pgjR0UAopXd5EE79SD4af+E6cIff2v+a9s/+oTpWzmkMES3ZTKgBtXAPnnExtSRe/tjdMZXDo8wGJG6XTpaQek3jeLZGaOoSA5AN8jgiVVI1dN5x2iiUxddjS2BECWF8MoZyu5yia4IGHPiKovNnR8hmTvCMNoe/SsRwN55mekiZ/5NVLTwtTFacFs91gXBmv41bAi96Ea4N51dkFTJLLrouEDCeABz14tFJG27yXALeHFao3tVdBgOQhjEOCf0gjETzPHeR/R5nhSe3MkqF2ThHHVQy65cBI86kaF+sWE2Tgj56pSAOefGDm88mDInVshNiFPeqr42U1CZutlVbQl/39Mrvwvtml1GxnOgVVImE5j5A== 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:(13230031)(4636009)(136003)(376002)(396003)(39860400002)(346002)(230922051799003)(186009)(64100799003)(451199024)(1800799009)(82310400011)(36840700001)(40470700004)(46966006)(6916009)(6666004)(336012)(426003)(7696005)(478600001)(47076005)(36860700001)(70586007)(70206006)(316002)(26005)(36756003)(83380400001)(1076003)(2616005)(54906003)(41300700001)(81166007)(5660300002)(82740400003)(356005)(7416002)(40460700003)(8676002)(8936002)(4326008)(2906002)(40480700001)(86362001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Oct 2023 06:29:35.3088 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ce8e0cf2-bd17-4976-9b4b-08dbd135eda7 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: SA2PEPF00001506.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB5617 Message-ID-Hash: 3JQV2VP4Z7U45JL5BXWYNGOMVX4KW4OQ X-Message-ID-Hash: 3JQV2VP4Z7U45JL5BXWYNGOMVX4KW4OQ X-MailFrom: Vijendar.Mukunda@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.8 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: Provide an option to load DSP data bin to ACP SRAM. Signed-off-by: Vijendar Mukunda --- sound/soc/sof/amd/acp-loader.c | 46 +++++++++++++++++++++++++++++----- sound/soc/sof/amd/acp.h | 10 +++++++- 2 files changed, 49 insertions(+), 7 deletions(-) diff --git a/sound/soc/sof/amd/acp-loader.c b/sound/soc/sof/amd/acp-loader.c index d35d47d7e311..e05eb7a86dd4 100644 --- a/sound/soc/sof/amd/acp-loader.c +++ b/sound/soc/sof/amd/acp-loader.c @@ -19,8 +19,9 @@ #include "acp-dsp-offset.h" #include "acp.h" -#define FW_BIN 0 -#define FW_DATA_BIN 1 +#define FW_BIN 0 +#define FW_DATA_BIN 1 +#define FW_SRAM_DATA_BIN 2 #define FW_BIN_PTE_OFFSET 0x00 #define FW_DATA_BIN_PTE_OFFSET 0x08 @@ -49,7 +50,6 @@ int acp_dsp_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_t u32 offset, void *src, size_t size) { struct pci_dev *pci = to_pci_dev(sdev->dev); - const struct sof_amd_acp_desc *desc = get_chip_info(sdev->pdata); struct acp_dev_data *adata; void *dest; u32 dma_size, page_count; @@ -86,9 +86,18 @@ int acp_dsp_block_write(struct snd_sof_dev *sdev, enum snd_sof_fw_blk_type blk_t adata->is_dram_in_use = true; break; case SOF_FW_BLK_TYPE_SRAM: - offset = offset - desc->sram_pte_offset; - memcpy_to_scratch(sdev, offset, src, size); - return 0; + if (!adata->sram_data_buf) { + adata->sram_data_buf = dma_alloc_coherent(&pci->dev, + ACP_DEFAULT_SRAM_LENGTH, + &adata->sram_dma_addr, + GFP_ATOMIC); + if (!adata->sram_data_buf) + return -ENOMEM; + } + adata->fw_sram_data_bin_size = size + offset; + dest = adata->sram_data_buf + offset; + adata->is_sram_in_use = true; + break; default: dev_err(sdev->dev, "bad blk type 0x%x\n", blk_type); return -EINVAL; @@ -123,6 +132,10 @@ static void configure_pte_for_fw_loading(int type, int num_pages, struct acp_dev offset = adata->fw_bin_page_count * 8; addr = adata->dma_addr; break; + case FW_SRAM_DATA_BIN: + offset = (adata->fw_bin_page_count + ACP_DRAM_PAGE_COUNT) * 8; + addr = adata->sram_dma_addr; + break; default: dev_err(sdev->dev, "Invalid data type %x\n", type); return; @@ -189,6 +202,22 @@ int acp_dsp_pre_fw_run(struct snd_sof_dev *sdev) if (ret < 0) dev_err(sdev->dev, "acp dma transfer status: %d\n", ret); } + if (adata->is_sram_in_use) { + configure_pte_for_fw_loading(FW_SRAM_DATA_BIN, ACP_SRAM_PAGE_COUNT, adata); + src_addr = ACP_SYSTEM_MEMORY_WINDOW + ACP_DEFAULT_SRAM_LENGTH + + (page_count * ACP_PAGE_SIZE); + dest_addr = ACP_SRAM_BASE_ADDRESS; + + ret = configure_and_run_dma(adata, src_addr, dest_addr, + adata->fw_sram_data_bin_size); + if (ret < 0) { + dev_err(sdev->dev, "acp dma configuration failed: %d\n", ret); + return ret; + } + ret = acp_dma_status(adata, 0); + if (ret < 0) + dev_err(sdev->dev, "acp dma transfer status: %d\n", ret); + } if (desc->rev > 3) { /* Cache Window enable */ @@ -205,6 +234,11 @@ int acp_dsp_pre_fw_run(struct snd_sof_dev *sdev) adata->dma_addr); adata->data_buf = NULL; } + if (adata->is_sram_in_use) { + dma_free_coherent(&pci->dev, ACP_DEFAULT_SRAM_LENGTH, adata->sram_data_buf, + adata->sram_dma_addr); + adata->sram_data_buf = NULL; + } return ret; } EXPORT_SYMBOL_NS(acp_dsp_pre_fw_run, SND_SOC_SOF_AMD_COMMON); diff --git a/sound/soc/sof/amd/acp.h b/sound/soc/sof/amd/acp.h index 2d1f57e1365a..c536cfde0e44 100644 --- a/sound/soc/sof/amd/acp.h +++ b/sound/soc/sof/amd/acp.h @@ -56,7 +56,7 @@ #define ACP_IRAM_BASE_ADDRESS 0x000000 #define ACP_DRAM_BASE_ADDRESS 0x01000000 #define ACP_DRAM_PAGE_COUNT 128 - +#define ACP_SRAM_BASE_ADDRESS 0x3806000 #define ACP_DSP_TO_HOST_IRQ 0x04 #define ACP_RN_PCI_ID 0x01 @@ -88,6 +88,8 @@ #define PROBE_STATUS_BIT BIT(31) #define ACP_FIRMWARE_SIGNATURE 0x100 +#define ACP_DEFAULT_SRAM_LENGTH 0x00080000 +#define ACP_SRAM_PAGE_COUNT 128 enum clock_source { ACP_CLOCK_96M = 0, @@ -194,13 +196,18 @@ struct acp_dev_data { struct platform_device *dmic_dev; unsigned int fw_bin_size; unsigned int fw_data_bin_size; + unsigned int fw_sram_data_bin_size; const char *fw_code_bin; const char *fw_data_bin; + const char *fw_sram_data_bin; u32 fw_bin_page_count; + u32 fw_data_bin_page_count; dma_addr_t sha_dma_addr; u8 *bin_buf; dma_addr_t dma_addr; u8 *data_buf; + dma_addr_t sram_dma_addr; + u8 *sram_data_buf; bool signed_fw_image; struct dma_descriptor dscr_info[ACP_MAX_DESC]; struct acp_dsp_stream stream_buf[ACP_MAX_STREAM]; @@ -209,6 +216,7 @@ struct acp_dev_data { struct acp_dsp_stream *probe_stream; bool enable_fw_debug; bool is_dram_in_use; + bool is_sram_in_use; }; void memcpy_to_scratch(struct snd_sof_dev *sdev, u32 offset, unsigned int *src, size_t bytes);