From nobody Fri Oct 10 21:13:59 2025 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A640872627; Thu, 12 Jun 2025 12:15:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.152.168 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749730504; cv=fail; b=DT9l3escGXM74YqqE+CRLw/YrrN0e4wcnRYORNhosRYiegW1bsyByu7+y1fJVbEr3yJggWuX+rlpIqtYfoyJW2A1UIS8+EvTSnXQtgasrcHylNbLghqyloXj7GreSP+urQ1702ObYPGQSJTG/3YjLX+7cqXuQ2FmQVOCoOPrrAs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749730504; c=relaxed/simple; bh=znKSWpsGwTJ8rDRzDUJtDCvY56ISvK3k8AsZJh9pah4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=j6QPF4D5i0sLxMQ+tZskTVyzLKyXoNTG0FbF4bJqjQagUE8GGzp3VUT9hmv8ePRKeQHO7EIknNKMA9Zngs2sPsR+XBjYXfFmVBrE3/C+KIdLvrwaRaUjv7iQtcan1SYwW4VNRNdLQYRklUM5v6w09dV9D8Rvgigk4MIvoHRlKWY= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=JHHoFUk3; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b=srCK5NSF; arc=fail smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="JHHoFUk3"; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b="srCK5NSF" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55C6kldP019124; Thu, 12 Jun 2025 07:14:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=hEIerm8p0GkwE7rzzTaafUUGqdx1KDi/wZ2PiX2qL9M=; b= JHHoFUk3ClUupUfnGuAkfIfa4T5I2fL/4t0zJrx6ufbcKSWsPg9Eog78woYknvJi Eb7P+s2RG1h0tp53ihC8bcv7Ykr/azdRWLjhKHzbnyMw4H1smHBYz3pxDWjETa96 6ccUQQIRX9i/8lfrEqeX2o7wPZhWqTO5/Yfpn8q3iIVnCTXrYBQKdMoGejE1h1Lf f+CzpY/bnIqLXgHZeYdE04Nyxi4HvQVsITsWvsAV+PPDf862C+gitbVy63Bp2/Vb X2EOuCywrl3d9PIumNIYddzZERavPDvFxpgvcnnrqs0vfcpgQQJjVgPQBt8f0b5i d4HDa6RSebNN4IwcPOFssQ== Received: from nam04-bn8-obe.outbound.protection.outlook.com (mail-bn8nam04on2130.outbound.protection.outlook.com [40.107.100.130]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 4760mww0sa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jun 2025 07:14:48 -0500 (CDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=FJdLkdHQtfSgQi4Tvq6iUjUW794+8pWXp1d7czj5vduYgwLGpQ5xFF+RQ4aajsu42C76dGJap/lIDlTi/+bawe+visIQ+XJ1tl8TzmkB5uXSGgj3QwoMJyrsgvP9DT0eP6R6JtmyrjkTVVuOqgci7lqzuVYnHqYb5ZRlqkBlmJ1EcwQJ1Fa6QwO4aorWNGrWJQHix/xzulTibbeD2J2wu2OBnmjd3aRrwD5LJh/XoB+lvndJupLcv2sg36CQHxDec0ZyqC/XGbiCs9m2rmTxl6rp0I013b/LSHBwULwxrUQDNsoHu3RyoVV9JGvAILacW1zusNtD8hwfRJO9MyF2TA== 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=hEIerm8p0GkwE7rzzTaafUUGqdx1KDi/wZ2PiX2qL9M=; b=bIS1yZ1E0h8bMllZD6K1X2RCMbAqfxgNIh4j7/ejUwzU4SYfbqrIe5wIWjbtUj63p9n2HwQijLuOlNmq0O0LVS5co3PITj0x6BV4aJcVRXND4mGSkZrV9nDBX7YmXr/YsMx0B9vwqnseU/BsBzV8WC3EsUaPs8Cff2SOcfYkNmAJwql289E+fGkVuh9ACbRsOPGYAORAK/XsRIom+YcQ+QVVWI2XS9eFvl0v7cfvKYAebAbffMShAL0Ig/coceV20gFzl25fXvE1Lo2sT3zuFVmJy0uYu/gB3IzkN4vbiVV3Q5XRgnLCvBqu8JodMOc8pEjzJxWEUFGpG+lgtO99eA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 84.19.233.75) smtp.rcpttodomain=cirrus.com smtp.mailfrom=opensource.cirrus.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=opensource.cirrus.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus4.onmicrosoft.com; s=selector2-cirrus4-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hEIerm8p0GkwE7rzzTaafUUGqdx1KDi/wZ2PiX2qL9M=; b=srCK5NSF29bAqTnX+AGC1uXqoocF9Qgj8zYupJP82aYC4q/aJErIe5kjUrcGgzZ08LA/d4E9TagD766acNCDSuCKglRFKffnbCqfv5gtxOWPsrOWqXaRwB8ttYT0WyA+yOneK0Zec2nA24AbZz7lCXw6qvUbXxKir1h9fyAc0qE= Received: from SN6PR01CA0020.prod.exchangelabs.com (2603:10b6:805:b6::33) by DS7PR19MB5853.namprd19.prod.outlook.com (2603:10b6:8:78::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8835.13; Thu, 12 Jun 2025 12:14:44 +0000 Received: from SN1PEPF0002529D.namprd05.prod.outlook.com (2603:10b6:805:b6:cafe::93) by SN6PR01CA0020.outlook.office365.com (2603:10b6:805:b6::33) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8792.35 via Frontend Transport; Thu, 12 Jun 2025 12:14:43 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 84.19.233.75) smtp.mailfrom=opensource.cirrus.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=opensource.cirrus.com; Received-SPF: Fail (protection.outlook.com: domain of opensource.cirrus.com does not designate 84.19.233.75 as permitted sender) receiver=protection.outlook.com; client-ip=84.19.233.75; helo=edirelay1.ad.cirrus.com; Received: from edirelay1.ad.cirrus.com (84.19.233.75) by SN1PEPF0002529D.mail.protection.outlook.com (10.167.242.4) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8835.15 via Frontend Transport; Thu, 12 Jun 2025 12:14:44 +0000 Received: from ediswmail9.ad.cirrus.com (ediswmail9.ad.cirrus.com [198.61.86.93]) by edirelay1.ad.cirrus.com (Postfix) with ESMTPS id 8CC29406555; Thu, 12 Jun 2025 12:14:42 +0000 (UTC) Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.68.186]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTPSA id 81AB882024A; Thu, 12 Jun 2025 12:14:41 +0000 (UTC) From: Richard Fitzgerald To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 1/3] ASoC: cs35l56: Use SoundWire address as firmware name suffix for new silicon Date: Thu, 12 Jun 2025 13:14:26 +0100 Message-ID: <20250612121428.1667-2-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250612121428.1667-1-rf@opensource.cirrus.com> References: <20250612121428.1667-1-rf@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF0002529D:EE_|DS7PR19MB5853:EE_ X-MS-Office365-Filtering-Correlation-Id: c1fe97e1-eb5a-4ce5-9bec-08dda9aab76c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700013|376014|61400799027|34020700016; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?Um2U3keLskdShq/+lXer5fBTyw5pqvUK6GE7sRLiwzvdYGzZVWKbe6Cj8K4n?= =?us-ascii?Q?QCJ1Ic9ZaNgk4osSvXWH1iyDhCpYu7tqoSIX5MjXCbOjcTgEVv39BnDZEuij?= =?us-ascii?Q?nBJqe7cgveeanURlRVsBu5vUIcrqL2eUEdcrK4OwA1nWuXOXYba/o7nSAjSN?= =?us-ascii?Q?Eww33lZ4ADzQt1ib4SmYB9BZ7ICzxjSS49mbYkjnsKSd5UsspLAFCVhqAypt?= =?us-ascii?Q?CiKDVMYl5WU7pFKvmo2++ZnOzy8yhI+Gs6451QLXIx+2JYOyNwN/GqgLpIVB?= =?us-ascii?Q?gudsnW4aqhrdtHmwkuVv0e0Mr0pftb7hwwsnI8jUPR9jbqnebtyGbKi7sBLU?= =?us-ascii?Q?i89twelvzfG1dHiGfRtJThg+v1nm4aqqMdaFzuKQtMGjGc0vHW2EmnG50cXp?= =?us-ascii?Q?w7ZKICE6jZ2uCjc5YP6UAQ+KyjzSfHeDk/NC7TnpSm7AvKK/cLuw4Qu0yAjR?= =?us-ascii?Q?yWAMqGDZFioWPyeEZBXPXlXvNIe9ukeeyqYaIEzr9/CF+xWCdsj0CZDuN0T6?= =?us-ascii?Q?yKNJoli8gl0/O3mm1SDooMT2gmFSskrZJwpsRBYyhbHDEb51xj0KQbv5ZoRS?= =?us-ascii?Q?EV4GAVcN7xQp8FE5dMovhGkuZxnLFLhsxdNzuEXGwxfAGtCoOyLPVExALIfK?= =?us-ascii?Q?5URWoumR23H26GtCnc8jBtw/pJh41rU4VxJcucY1OCHdtOLRdOos1gNMoXuH?= =?us-ascii?Q?7hdCSGkTo3gTGuc30YmY/ect153J93fK7hNoy33DmXyHRj9L3xoyacDR/4zQ?= =?us-ascii?Q?XjE+wFk7G2JqXoYKeJ9xlNbDh6Gqo5wUMNuVYAJ/jkJRnp1XLSk55t/Wpmz6?= =?us-ascii?Q?e/KXffedHfnYlBKfex2cCJRuZR0k4o2t0lqgp7JJEA+TWXOmntDlL+G/3OMY?= =?us-ascii?Q?NUs8zwoiEJdSgynnTocosn8PxqpXfR8dhkFGkE8QiU+g+0bmJj7D2MNASRwK?= =?us-ascii?Q?PJYnq/D+QZcP/5/u6LkOIoNgKzqn6oAm2h7Ne02bKOPE+2KxXtHlAQJd9T3V?= =?us-ascii?Q?59Y5yHN0dp3cJL7JD/0WBVLkt4eIV9LT3uadWLW5RioHzV2awVgxgEjNDKLP?= =?us-ascii?Q?f3TwP+cr51Dal6l7swelveVbnojhrWcSXX3zLS/sE34KPu4cwdgB5TD/F+3I?= =?us-ascii?Q?azR9N9oJuTF/OGZigNhYwp8nm1+0EKDVG5iJKo/ToUH2ZiU0ubLSzI4NqyZV?= =?us-ascii?Q?wpUpRdzjn1qSWX6tVJsDPeBO5ZB0Xr0FIqOfQ8ZJYGyOpGhEDXu1Rg8wTANz?= =?us-ascii?Q?5nYW9rgWyQTPWBsj5T49a2ldAxkXEsrxeyuzpaeYGA0Okc7GtAIfskZ4FNQL?= =?us-ascii?Q?hqKgJj8uSCMyQ0D48DBGutr1YwKPZDHC2vxEUecDxIK55E5ZLhL3oYw+9kj/?= =?us-ascii?Q?Mc2vSAujPeLn4wO6pOlDXN/RneQJFUshKBl/tc9GcGu3AyMVc4koeZ0DaS4L?= =?us-ascii?Q?JCOo25LoOMrVThy1vnb24/ciJC5DEjCp9a4Ul1anWD3PI0SDYaNUkXdGeW8L?= =?us-ascii?Q?3+88Vy6hSkEgjSSu8iFeTQtvJ88AvyrGcAyo?= X-Forefront-Antispam-Report: CIP:84.19.233.75;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edirelay1.ad.cirrus.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700013)(376014)(61400799027)(34020700016);DIR:OUT;SFP:1102; X-OriginatorOrg: opensource.cirrus.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2025 12:14:44.0609 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1fe97e1-eb5a-4ce5-9bec-08dda9aab76c X-MS-Exchange-CrossTenant-Id: bec09025-e5bc-40d1-a355-8e955c307de8 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bec09025-e5bc-40d1-a355-8e955c307de8;Ip=[84.19.233.75];Helo=[edirelay1.ad.cirrus.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF0002529D.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR19MB5853 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEyMDA5MyBTYWx0ZWRfXwN5lhB5fkONo VcLt4VNtba2Y8BdLtKTZHMwQUQvntSr9DJeo5HWrGx6StPSxQmLRNWFyCNVe9gbuYp1NSJfDizk 0OkL6jSKX/zN8y01jMQ3IF4VxdPVxoL+r/LJy+Dc47tL/uq2X+JkojLsWhvqPEbAbbD1wPk7AMc FFAPriCv015UkXI78bWrkwhXmcZK6UgRUPJ1tN3ZELJK9whPSICsXOQFYbzV9jAY/0bByX+gbnO 1aQRejjTdpNxffHd/5J4QTinIqDfiDLP49ZbYGhwQcAAPkLEXcC9CdyUrGBwxOG1r3qOuuMesmh d6tnRKSQBVI7H10W+VTBGUP8E9esvJdKBeEh0229pb/meusY3Tf/zjWuDB6a8MMndc+XVRlvNI4 hmJH17OP70jNU+l1A/048xOgRGQ/DTXTisiKAkPw/2dN+y4pfLZuk+jLHlez1aZS307UTXd+ X-Authority-Analysis: v=2.4 cv=coCbk04i c=1 sm=1 tr=0 ts=684ac4b8 cx=c_pps a=YkgjLxFAvzeADdmzKhTo2Q==:117 a=h1hSm8JtM9GN1ddwPAif2w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=6IFa9wvqVegA:10 a=s63m1ICgrNkA:10 a=RWc_ulEos4gA:10 a=w1d2syhTAAAA:8 a=Q2azG0amzhrUqwU4_OsA:9 X-Proofpoint-ORIG-GUID: qduRMvcncjyhqD74MM7-j7yla-2mhq8v X-Proofpoint-GUID: qduRMvcncjyhqD74MM7-j7yla-2mhq8v X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset="utf-8" Use the SoundWire link number and device unique ID as the firmware file qualifier suffix on CS35L57, CS35L63 and revisions of CS35L56 after B0. The change in wm_adsp needed to support this has been included in this patch because it is fairly trivial. Originally, the firmware file names indicated which amplifier instance they were for by appending the ALSA prefix string. This is the standard ASoC way of distinguishing different instances of the same device. However, on SoundWire systems the SoundWire physical unique address is available as a unique identifier for each amp, and this address is hardwired by a pin on the amp. The firmware files are specific for each physical amp so they must be applied to that amp. Using the ALSA prefix for the filename qualifier means that to name a firmware file it must be determined what prefix string the machine driver will assign to each device and then use that to name the firmware file correctly. This is straightforward in traditional ASoC systems where the machine driver is specific to a particular piece of hardware. But on SoundWire the machine driver is generic and can handle a very wide range of hardware. It is more difficult to determine exactly what the prefix will be on any particular production device, and more prone to mistakes. Also, when the machine driver switches to generating this automatically from SDCA properties in ACPI, there is an additional layer of complexity in determining the mapping. This uncertainty is unnecessary because the firmware is built for a specific amp. with known address, so we can use that directly instead of introducing the redundant intermediate alias. This ensures the firmware is applied to the amp it was intended for. There have not been any firmwares published for CS35L57 or CS35L63, so these can safely be switched to using the SoundWire unique address as the suffix string. Also note that the machine driver in older kernel version only has match entries for the CS35L56 Soundwire identity so any future product with a cs35L57 or CS35L63 would require a new kernel anyway. There are already many published firmware for CS35L56 B0 silicon so this keeps the original naming scheme on those, to preserve backward compatibility. Note that although sdw_slave.id contains a unique_id field, this cannot be trusted because the SoundWire core code also puts magic values into it that it uses as a flag. So the unique ID is read from the chip register. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56-sdw.c | 18 ++++++++++-------- sound/soc/codecs/cs35l56.c | 29 +++++++++++++++++++++++++++++ sound/soc/codecs/cs35l56.h | 2 ++ sound/soc/codecs/wm_adsp.c | 21 ++++++++++++--------- sound/soc/codecs/wm_adsp.h | 1 + 5 files changed, 54 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c index 13f602f51bf3..fa9693af3722 100644 --- a/sound/soc/codecs/cs35l56-sdw.c +++ b/sound/soc/codecs/cs35l56-sdw.c @@ -238,16 +238,15 @@ static const struct regmap_bus cs35l56_regmap_bus_sdw= =3D { .val_format_endian_default =3D REGMAP_ENDIAN_BIG, }; =20 -static int cs35l56_sdw_set_cal_index(struct cs35l56_private *cs35l56) +static int cs35l56_sdw_get_unique_id(struct cs35l56_private *cs35l56) { int ret; =20 - /* SoundWire UniqueId is used to index the calibration array */ ret =3D sdw_read_no_pm(cs35l56->sdw_peripheral, SDW_SCP_DEVID_0); if (ret < 0) return ret; =20 - cs35l56->base.cal_index =3D ret & 0xf; + cs35l56->sdw_unique_id =3D ret & 0xf; =20 return 0; } @@ -259,11 +258,13 @@ static void cs35l56_sdw_init(struct sdw_slave *periph= eral) =20 pm_runtime_get_noresume(cs35l56->base.dev); =20 - if (cs35l56->base.cal_index < 0) { - ret =3D cs35l56_sdw_set_cal_index(cs35l56); - if (ret < 0) - goto out; - } + ret =3D cs35l56_sdw_get_unique_id(cs35l56); + if (ret) + goto out; + + /* SoundWire UniqueId is used to index the calibration array */ + if (cs35l56->base.cal_index < 0) + cs35l56->base.cal_index =3D cs35l56->sdw_unique_id; =20 ret =3D cs35l56_init(cs35l56); if (ret < 0) { @@ -587,6 +588,7 @@ static int cs35l56_sdw_probe(struct sdw_slave *peripher= al, const struct sdw_devi =20 cs35l56->base.dev =3D dev; cs35l56->sdw_peripheral =3D peripheral; + cs35l56->sdw_link_num =3D peripheral->bus->link_id; INIT_WORK(&cs35l56->sdw_irq_work, cs35l56_sdw_irq_work); =20 dev_set_drvdata(dev, cs35l56); diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index c78e4746e428..6e6120c39965 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -853,6 +853,31 @@ static void cs35l56_dsp_work(struct work_struct *work) pm_runtime_put_autosuspend(cs35l56->base.dev); } =20 +static int cs35l56_set_fw_suffix(struct cs35l56_private *cs35l56) +{ + if (cs35l56->dsp.fwf_suffix) + return 0; + + if (!cs35l56->sdw_peripheral) + return 0; + + /* + * There are published firmware files for L56 B0 silicon using + * the default wm_adsp name suffixing so don't change those. + */ + if ((cs35l56->base.type =3D=3D 0x56) && (cs35l56->base.rev =3D=3D 0xb0)) + return 0; + + cs35l56->dsp.fwf_suffix =3D devm_kasprintf(cs35l56->base.dev, GFP_KERNEL, + "l%uu%u", + cs35l56->sdw_link_num, + cs35l56->sdw_unique_id); + if (!cs35l56->dsp.fwf_suffix) + return -ENOMEM; + + return 0; +} + static int cs35l56_component_probe(struct snd_soc_component *component) { struct cs35l56_private *cs35l56 =3D snd_soc_component_get_drvdata(compone= nt); @@ -891,6 +916,10 @@ static int cs35l56_component_probe(struct snd_soc_comp= onent *component) if (!cs35l56->dsp.part) return -ENOMEM; =20 + ret =3D cs35l56_set_fw_suffix(cs35l56); + if (ret) + return ret; + cs35l56->component =3D component; wm_adsp2_component_probe(&cs35l56->dsp, component); =20 diff --git a/sound/soc/codecs/cs35l56.h b/sound/soc/codecs/cs35l56.h index 200f695efca3..a84c83eb2d7c 100644 --- a/sound/soc/codecs/cs35l56.h +++ b/sound/soc/codecs/cs35l56.h @@ -52,6 +52,8 @@ struct cs35l56_private { bool tdm_mode; bool sysclk_set; u8 old_sdw_clock_scale; + u8 sdw_link_num; + u8 sdw_unique_id; }; =20 extern const struct dev_pm_ops cs35l56_pm_ops_i2c_spi; diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 3c580faab3b7..13db9c6650d5 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -783,16 +783,19 @@ static int wm_adsp_request_firmware_files(struct wm_a= dsp *dsp, char **coeff_filename) { const char *system_name =3D dsp->system_name; - const char *asoc_component_prefix =3D dsp->component->name_prefix; + const char *suffix =3D dsp->component->name_prefix; int ret =3D 0; =20 - if (system_name && asoc_component_prefix) { + if (dsp->fwf_suffix) + suffix =3D dsp->fwf_suffix; + + if (system_name && suffix) { if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename, cirrus_dir, system_name, - asoc_component_prefix, "wmfw")) { + suffix, "wmfw")) { wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, cirrus_dir, system_name, - asoc_component_prefix, "bin"); + suffix, "bin"); return 0; } } @@ -801,10 +804,10 @@ static int wm_adsp_request_firmware_files(struct wm_a= dsp *dsp, if (!wm_adsp_request_firmware_file(dsp, wmfw_firmware, wmfw_filename, cirrus_dir, system_name, NULL, "wmfw")) { - if (asoc_component_prefix) + if (suffix) wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, cirrus_dir, system_name, - asoc_component_prefix, "bin"); + suffix, "bin"); =20 if (!*coeff_firmware) wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, @@ -816,10 +819,10 @@ static int wm_adsp_request_firmware_files(struct wm_a= dsp *dsp, =20 /* Check system-specific bin without wmfw before falling back to generic = */ if (dsp->wmfw_optional && system_name) { - if (asoc_component_prefix) + if (suffix) wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, cirrus_dir, system_name, - asoc_component_prefix, "bin"); + suffix, "bin"); =20 if (!*coeff_firmware) wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename, @@ -850,7 +853,7 @@ static int wm_adsp_request_firmware_files(struct wm_ads= p *dsp, adsp_err(dsp, "Failed to request firmware <%s>%s-%s-%s<-%s<%s>>.wmfw\n", cirrus_dir, dsp->part, dsp->fwf_name ? dsp->fwf_name : dsp->cs_dsp.name, - wm_adsp_fw[dsp->fw].file, system_name, asoc_component_prefix); + wm_adsp_fw[dsp->fw].file, system_name, suffix); =20 return -ENOENT; } diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h index edc5b02ae765..075ea0bd06eb 100644 --- a/sound/soc/codecs/wm_adsp.h +++ b/sound/soc/codecs/wm_adsp.h @@ -29,6 +29,7 @@ struct wm_adsp { const char *part; const char *fwf_name; const char *system_name; + const char *fwf_suffix; struct snd_soc_component *component; =20 unsigned int sys_config_size; --=20 2.43.0 From nobody Fri Oct 10 21:13:59 2025 Received: from mx0b-001ae601.pphosted.com (mx0a-001ae601.pphosted.com [67.231.149.25]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3DDFF18FDBD; Thu, 12 Jun 2025 12:15:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.149.25 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749730504; cv=fail; b=Hdlf36c4ho5/5bexuoap7FmXVJR4QJm2TBmOUcd1CZ79ORAIjVaXf1MCWVCIH5O6JJQbFhHvwlxd4lnu5j0XP7c/mJvzW1MJHd8Gey5u6f1ORgCnG3n9WQpEZ4xkJ+OytckB9o2Y6EokoX21vbCJNbjU6uQ1oFKyQ10zq5izOGY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749730504; c=relaxed/simple; bh=B4FvSXMj2gRcCut40A28e9lyVdCFg5TSY6f/5A+39eY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=TzlRtYjlMStWmjkKE2mmQnSkDQgIW48Rf2gppuvCL+LuYnkYQjtX5FYHPw+7tnpbmw6cgMdXaZLF3hbSn09FKCwzM22FtPcqwEkKQcMOXnyAZxXsMk+WMII4y8DMnXvBduRFkRHFtu1tKAV+L2dDT8x6m7kqOj8ax+dTLt9fNNc= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=Jaxu3aE3; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b=j9m+tKde; arc=fail smtp.client-ip=67.231.149.25 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="Jaxu3aE3"; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b="j9m+tKde" Received: from pps.filterd (m0077473.ppops.net [127.0.0.1]) by mx0a-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55C4KWxp023474; Thu, 12 Jun 2025 07:14:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=sAOuE8JnIU1IEOg2g710ClzWETBnpl9kqckl2ya/OZs=; b= Jaxu3aE3m8xF3DLiftwMUAQPdsTSUDMZhQ9Vn1+JV+iqAozRLqneBU8/+B9+RBuf fvncS5+7RV89TYi5KdfDr20IuOv/FbE0qiHnNG1OxkdoJiABnol1MNa3eiBNRcVk QieruFbSPnbri7DDtvJO8uo0ZveAl4UDSlPowoAx2ssMbuq2PQMPoum2q86uG5B0 alaxhJbRUzpnJcHJWutl3ErKgb/PL69m2YpwABZAVVPNbHYOJRVWr85YfO+hV6Dk XK43EhkuFWdbb6dxwLxiC/q9xPEtDOSgvKMpxMP6xABiSd3cCd0RHRBW//B73FwI 829SFTMRV0Yq/PdRLCM49A== Received: from nam10-bn7-obe.outbound.protection.outlook.com (mail-bn7nam10on2137.outbound.protection.outlook.com [40.107.92.137]) by mx0a-001ae601.pphosted.com (PPS) with ESMTPS id 476ksdbsng-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jun 2025 07:14:58 -0500 (CDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=N485GkJwXD3BRMatdqMpG7Is/gY43U7OQ3e63ff+49lChay5gifKn+a/EIHBKEV09NoC1oNxhR/tNmku1pVOBfQmQ1bJwKB+sNpMHt1VaFBsaR0Wj/ofMutjA7epvKqlFU6fLO42iY9Df7Gs9irrJceATpwoWCgMyIQnYrFF0pnKgbXOeBM/tyaJy6i4RaDOertXzX8RhfFIZCXgUnDf/AnpMdJRnZFx8Y5slMXahlRuwufhLgdmtcew4F79pWB3HzHJGvWelHHyZLPHXrDbMV9vTT+bYQsh7ncRXqlC1SiPvEagJ714EWVZ0VgGJq79p39HwRQdMazlOw4dM905RA== 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=sAOuE8JnIU1IEOg2g710ClzWETBnpl9kqckl2ya/OZs=; b=ZYGfsaVqx290WFj4zkCEZMNprksMLu6KV8po9Kjc+O0JaEpY11JXY8yVUb51JOui+DBa9pA6ea/HCI4hEi9P0NryRsTdyg2JAPaCv3Ec/CmrpvcXjW6Lc42Av65E4bgIJiwqA1Q3cVt3100wpH4JFgFTtZeG7yAGzUi6qgddixdSFjrgoaTTcTl/z67auS4mZWxuMc8Lut+gVzXxAydV1dxg1yR0OsM/Hkx8P7Ub4xR5Y07thcArszQ0cnLDFXFbuvGAHhLyNRqsRAnYTKEchp8G5v8Go91Qhi8gYdJpnnoTcNWVuxkyJV6s4gjztsnJ3U7Ppr+ltF/yw0/OnCUQBw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 84.19.233.75) smtp.rcpttodomain=cirrus.com smtp.mailfrom=opensource.cirrus.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=opensource.cirrus.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus4.onmicrosoft.com; s=selector2-cirrus4-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=sAOuE8JnIU1IEOg2g710ClzWETBnpl9kqckl2ya/OZs=; b=j9m+tKdeFR9nNo3NoVRYWgD6OREHgBsEppQ6Gkg/saPONoFlDslF2f/Mc/wTksZx+fE4jEJ8g32FWiX6ANcOheUB87thyRQw54Qg5spPXZhwcsJiOzmX2SwdculvOxfncfrYtMUdFx+751TVxcNM9p5/k2UkPJJcNG6vX7uZRtM= Received: from BL1P222CA0023.NAMP222.PROD.OUTLOOK.COM (2603:10b6:208:2c7::28) by SA6PR19MB8632.namprd19.prod.outlook.com (2603:10b6:806:41a::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8835.19; Thu, 12 Jun 2025 12:14:46 +0000 Received: from BL6PEPF00020E61.namprd04.prod.outlook.com (2603:10b6:208:2c7:cafe::5b) by BL1P222CA0023.outlook.office365.com (2603:10b6:208:2c7::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8835.23 via Frontend Transport; Thu, 12 Jun 2025 12:14:45 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 84.19.233.75) smtp.mailfrom=opensource.cirrus.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=opensource.cirrus.com; Received-SPF: Fail (protection.outlook.com: domain of opensource.cirrus.com does not designate 84.19.233.75 as permitted sender) receiver=protection.outlook.com; client-ip=84.19.233.75; helo=edirelay1.ad.cirrus.com; Received: from edirelay1.ad.cirrus.com (84.19.233.75) by BL6PEPF00020E61.mail.protection.outlook.com (10.167.249.22) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8835.15 via Frontend Transport; Thu, 12 Jun 2025 12:14:44 +0000 Received: from ediswmail9.ad.cirrus.com (ediswmail9.ad.cirrus.com [198.61.86.93]) by edirelay1.ad.cirrus.com (Postfix) with ESMTPS id A40A0406541; Thu, 12 Jun 2025 12:14:43 +0000 (UTC) Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.68.186]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTPSA id B1DC782024A; Thu, 12 Jun 2025 12:14:42 +0000 (UTC) From: Richard Fitzgerald To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 2/3] ASoC: cs35l56: Use SoundWire address as alternate firmware suffix on L56 B0 Date: Thu, 12 Jun 2025 13:14:27 +0100 Message-ID: <20250612121428.1667-3-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250612121428.1667-1-rf@opensource.cirrus.com> References: <20250612121428.1667-1-rf@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BL6PEPF00020E61:EE_|SA6PR19MB8632:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ed79f7c-2aa3-4804-7108-08dda9aab7e1 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|34020700016|61400799027|36860700013|82310400026; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?gdXLdVSfseeAe5520TiwD/kVCEfss06coyf2QxtVFJRy9pndLnwkdlbWfG9K?= =?us-ascii?Q?6AwSBULe/QNTQP8CMjtnud8ZTz27aUy7gELtfql/qQR4gGZSrRx1wOFcHbcp?= =?us-ascii?Q?LlJt59+SyEsoiGX3KvyMGLWc+4eBlBrCjIugoaKBRcBeok2beMjof0szbdlx?= =?us-ascii?Q?nslt7+Mfb3jnEhytOHT5sMhPPJdYYkQpznmja0fZczROJFqAQKH1ly45aNz3?= =?us-ascii?Q?ZkhSsUUeGEGZFEeqXraE8QvM0mvCT78YLswRULHeLf65CCraK7E4ptX5CrFk?= =?us-ascii?Q?FWlRR4PTgY/hCNhEUyqFVGyEhnCH8bT7qYYk2jhyfxGpjNB/QJh6b9Q9JUsn?= =?us-ascii?Q?euJjKROW71mj8rdqKj66iIVWXH8BcnRNZ/4XzbpkxbJLXMdEizsoj/YGwy/V?= =?us-ascii?Q?7eQVZeqjAnMEkCjhH0Ttsz3Z2ruK5w1jbX943NR4BYO4qfeydMZzp1wBqQVT?= =?us-ascii?Q?eReFapvqcbZtLDpTwvoMY+x5UflibQnZ8LLVILgN3QMZJKzLL+UOqTzhh3Ab?= =?us-ascii?Q?UybKiT7fgZPISqcw1wdp9Hv6iihMAAteIYbKesYP1XAp+DcjA9kcC9KO1JQb?= =?us-ascii?Q?Rgn7srSfNc8SrbSVGtGEpHjQSB/V/ETxeHka68NZowHQHDA0oWwZ/8MlopqR?= =?us-ascii?Q?0LzZudQmhtJngPocQvkruChgGInXaMxW6EB3XVP3ewYhcLoFbMF3/986r6uz?= =?us-ascii?Q?oXS9U96WVB3TTPy50xSPtQYvSzdTRZf5C+Z2wd+vChn0VhFMcpRWOkm42PPk?= =?us-ascii?Q?M9bWYNhoXuunGqTQ063ELKWb9VBKrorIlSeBCaNw4Q/mDuxOqytjrenxpePn?= =?us-ascii?Q?gALnktph+7S+Ae43r9PRHRob5p11DrB1Cm9Hgj/ghyLdk2xsCm6UiA98lQwd?= =?us-ascii?Q?Ht+nh9HspKBQ1ywH+SvpUhxaEFy+B2mxqSvlIV0NZl4i9N0f+WsIdQvU5ACQ?= =?us-ascii?Q?DLyOI7mnu8MFHBvEJ+ki4n+1pQXDtRSo70p6nPCO/xiefkq47VBC3PRWN343?= =?us-ascii?Q?98dizVZuJQCpYwfvU67tJTQ8s6r4BF9wlNQKEyVAeCPN/q0mbJ2fZ1X/VtYc?= =?us-ascii?Q?ioCW/0azMx31/bBGNaArzzTRBxgomMqk8zI9TbAsm+CP6AOJSW5cdPsuUEv2?= =?us-ascii?Q?MDFAHOClOszCjLKxZf16+VTQ0HDTXwDBRAZiZpLhvhc79OriI275RlFeFWdJ?= =?us-ascii?Q?6o18WIVlb+wZuRWDzRMPr4ZwSbgKlPtUnWWA1qMLAEByMKtxxnEkolniPr4p?= =?us-ascii?Q?V0IJFFttoM6JC7dMv9rLC9NHwXyCmwG6P8T0PJEFv7yve3L+tHb4HPqb0OMM?= =?us-ascii?Q?QE4usRxmpvjDTBjqsQIOO44cUoUvus9QQf/vEWmQVpHse/yjCLQTwTMaQAf+?= =?us-ascii?Q?oPOJk8xFDk7L4cN6gJFnV20DN9ZvCO1XFy3PakP36gk9Gt3jciDj56Ct+zHA?= =?us-ascii?Q?Btx71egODmC/3LKJNiVrE7oiwqX3TXDUqK1YuwK0G6c5UufKjeaPAMy+KJVU?= =?us-ascii?Q?YDCqNi9a5HdpJRiMrjrLyVpTP+Z0Rpq+6LRD?= X-Forefront-Antispam-Report: CIP:84.19.233.75;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edirelay1.ad.cirrus.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(376014)(34020700016)(61400799027)(36860700013)(82310400026);DIR:OUT;SFP:1102; X-OriginatorOrg: opensource.cirrus.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2025 12:14:44.8935 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 1ed79f7c-2aa3-4804-7108-08dda9aab7e1 X-MS-Exchange-CrossTenant-Id: bec09025-e5bc-40d1-a355-8e955c307de8 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bec09025-e5bc-40d1-a355-8e955c307de8;Ip=[84.19.233.75];Helo=[edirelay1.ad.cirrus.com] X-MS-Exchange-CrossTenant-AuthSource: BL6PEPF00020E61.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA6PR19MB8632 X-Proofpoint-GUID: Na_0o-o0G0i_PZvyF4cMf7BDlC6JTgAP X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEyMDA5NCBTYWx0ZWRfX9TD8YCiLg03/ Q2GW7CHQQIcnrYcv+mXdndxEEWDIcoGJ21O6p6mFetnulxMKaF70cOh+pqR8h620/T/9L2y1BtL WDjHacWc4kKo7PRlJk0kF5R/8jukbm4vDaIzFRQytt8cw2dd+4NnSrQC9sdHmIbxil5l/rXLTzk x9c4pbB4JPLreJlsSFxogE3ta1xfjtnkfWLera3rhAqSYAz/LlOQQT8UR2DKFKqPNFyTiKLQCJm SABSmYIDC9xMRBExuVGIbpizhar5PcXYpD7BrLJQWxcBLMCBJ2HstfT92CosOVPleDuaXV2E2kM qUXvnYcV4b+Hud4O0/C+WaDlECAfcCTRNtnVAYLW75pfdnWbMmUJDvQkTbopCQTudg7oX1vL7eL mHnIcMSW5aWidpYNPxKK5PB+83RJg950iCP7zXI8jFjmha9oGoDj/qWrsWJKitmwdmWuzt7h X-Authority-Analysis: v=2.4 cv=c5OrQQ9l c=1 sm=1 tr=0 ts=684ac4c2 cx=c_pps a=0JauUCTfv4ZtrXH65XOUZw==:117 a=h1hSm8JtM9GN1ddwPAif2w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=6IFa9wvqVegA:10 a=s63m1ICgrNkA:10 a=RWc_ulEos4gA:10 a=w1d2syhTAAAA:8 a=naRZMb3kKIbd9dW_DT0A:9 X-Proofpoint-ORIG-GUID: Na_0o-o0G0i_PZvyF4cMf7BDlC6JTgAP X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset="utf-8" Use the SoundWire link number and device unique ID as the firmware file qualifier suffix on CS35L56 B0 if .bin files are not found with the older suffix. Some changes in wm_adsp needed to support this have been included in this patch because they are trivial. The allows future products with CS35L56 B0 silicon to use the same firmware file naming as CS35L57 and cs35L63, while retaining backward compatibility for firmware that has already been published with the old naming scheme. The old suffix is searched first, partly because there are already many files using that naming scheme, but also because they are a smaller subset of all the possible fallback name options offered by wm_adsp so we know that it will either find the qualified files or fail. All the firmware files already published have the wmfw qualified with only the ACPI SSID and the bin files qualified with both SSID and the suffix. Originally, the firmware file names indicated which amplifier instance they were for by appending the ALSA prefix string. This is the standard ASoC way of distinguishing different instances of the same device. However, on SoundWire systems the SoundWire physical unique address is available as a unique identifier for each amp, and this address is hardwired by the address pin on the amp. The firmware files are specific for each physical amp so they must be applied to that amp. Using the ALSA prefix for the filename qualifier means that to name a firmware file it must be determined what prefix string the machine driver will assign to each device and then use that to name the firmware file correctly. This is straightforward in traditional ASoC systems where the machine driver is specific to a particular piece of hardware. But on SoundWire the machine driver is generic and can handle a very wide range of hardware. It is more difficult to determine exactly what the prefix will be on any particular production device, and more prone to mistakes. Also, when the machine driver switches to generating this automatically from SDCA properties in ACPI, there is an additional layer of complexity in determining the mapping. This uncertainty is unnecessary because the firmware is built for a specific amp. with known address, so we can use that directly instead of introducing a redundant intermediate alias. This ensures the firmware is applied to the amp it was intended for. There are already many published firmware for CS35L56 B0 silicon so this first looks for the original name suffix, to keep backward compatibility. If this doesn't find .bin files it will switch to using the new name suffix so that future products using CS35L56 B0 can start to use the new suffix. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56.c | 59 +++++++++++++++++++++++++++----------- sound/soc/codecs/cs35l56.h | 1 + sound/soc/codecs/wm_adsp.c | 6 ++++ sound/soc/codecs/wm_adsp.h | 1 + 4 files changed, 50 insertions(+), 17 deletions(-) diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index 6e6120c39965..1b42586794ad 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -706,16 +706,40 @@ static int cs35l56_write_cal(struct cs35l56_private *= cs35l56) return ret; } =20 +static int cs35l56_dsp_download_and_power_up(struct cs35l56_private *cs35l= 56, + bool load_firmware) +{ + int ret; + + /* + * Abort the first load if it didn't find the suffixed bins and + * we have an alternate fallback suffix. + */ + cs35l56->dsp.bin_mandatory =3D (load_firmware && cs35l56->fallback_fw_suf= fix); + + ret =3D wm_adsp_power_up(&cs35l56->dsp, load_firmware); + if ((ret =3D=3D -ENOENT) && cs35l56->dsp.bin_mandatory) { + cs35l56->dsp.fwf_suffix =3D cs35l56->fallback_fw_suffix; + cs35l56->fallback_fw_suffix =3D NULL; + cs35l56->dsp.bin_mandatory =3D false; + ret =3D wm_adsp_power_up(&cs35l56->dsp, load_firmware); + } + + if (ret) { + dev_dbg(cs35l56->base.dev, "wm_adsp_power_up ret %d\n", ret); + return ret; + } + + return 0; +} + static void cs35l56_reinit_patch(struct cs35l56_private *cs35l56) { int ret; =20 - /* Use wm_adsp to load and apply the firmware patch and coefficient files= */ - ret =3D wm_adsp_power_up(&cs35l56->dsp, true); - if (ret) { - dev_dbg(cs35l56->base.dev, "%s: wm_adsp_power_up ret %d\n", __func__, re= t); + ret =3D cs35l56_dsp_download_and_power_up(cs35l56, true); + if (ret) return; - } =20 cs35l56_write_cal(cs35l56); =20 @@ -750,11 +774,9 @@ static void cs35l56_patch(struct cs35l56_private *cs35= l56, bool firmware_missing * but only if firmware is missing. If firmware is already patched just * power-up wm_adsp without downloading firmware. */ - ret =3D wm_adsp_power_up(&cs35l56->dsp, !!firmware_missing); - if (ret) { - dev_dbg(cs35l56->base.dev, "%s: wm_adsp_power_up ret %d\n", __func__, re= t); + ret =3D cs35l56_dsp_download_and_power_up(cs35l56, firmware_missing); + if (ret) goto err; - } =20 mutex_lock(&cs35l56->base.irq_lock); =20 @@ -861,13 +883,6 @@ static int cs35l56_set_fw_suffix(struct cs35l56_privat= e *cs35l56) if (!cs35l56->sdw_peripheral) return 0; =20 - /* - * There are published firmware files for L56 B0 silicon using - * the default wm_adsp name suffixing so don't change those. - */ - if ((cs35l56->base.type =3D=3D 0x56) && (cs35l56->base.rev =3D=3D 0xb0)) - return 0; - cs35l56->dsp.fwf_suffix =3D devm_kasprintf(cs35l56->base.dev, GFP_KERNEL, "l%uu%u", cs35l56->sdw_link_num, @@ -875,6 +890,16 @@ static int cs35l56_set_fw_suffix(struct cs35l56_privat= e *cs35l56) if (!cs35l56->dsp.fwf_suffix) return -ENOMEM; =20 + /* + * There are published firmware files for L56 B0 silicon using + * the ALSA prefix as the filename suffix. Default to trying these + * first, with the new name as an alternate. + */ + if ((cs35l56->base.type =3D=3D 0x56) && (cs35l56->base.rev =3D=3D 0xb0)) { + cs35l56->fallback_fw_suffix =3D cs35l56->dsp.fwf_suffix; + cs35l56->dsp.fwf_suffix =3D cs35l56->component->name_prefix; + } + return 0; } =20 @@ -916,11 +941,11 @@ static int cs35l56_component_probe(struct snd_soc_com= ponent *component) if (!cs35l56->dsp.part) return -ENOMEM; =20 + cs35l56->component =3D component; ret =3D cs35l56_set_fw_suffix(cs35l56); if (ret) return ret; =20 - cs35l56->component =3D component; wm_adsp2_component_probe(&cs35l56->dsp, component); =20 debugfs_create_bool("init_done", 0444, debugfs_root, &cs35l56->base.init_= done); diff --git a/sound/soc/codecs/cs35l56.h b/sound/soc/codecs/cs35l56.h index a84c83eb2d7c..bd77a57249d7 100644 --- a/sound/soc/codecs/cs35l56.h +++ b/sound/soc/codecs/cs35l56.h @@ -38,6 +38,7 @@ struct cs35l56_private { struct snd_soc_component *component; struct regulator_bulk_data supplies[CS35L56_NUM_BULK_SUPPLIES]; struct sdw_slave *sdw_peripheral; + const char *fallback_fw_suffix; struct work_struct sdw_irq_work; bool sdw_irq_no_unmask; bool soft_resetting; diff --git a/sound/soc/codecs/wm_adsp.c b/sound/soc/codecs/wm_adsp.c index 13db9c6650d5..8a1d5cc75d6c 100644 --- a/sound/soc/codecs/wm_adsp.c +++ b/sound/soc/codecs/wm_adsp.c @@ -1000,11 +1000,17 @@ int wm_adsp_power_up(struct wm_adsp *dsp, bool load= _firmware) return ret; } =20 + if (dsp->bin_mandatory && !coeff_firmware) { + ret =3D -ENOENT; + goto err; + } + ret =3D cs_dsp_power_up(&dsp->cs_dsp, wmfw_firmware, wmfw_filename, coeff_firmware, coeff_filename, wm_adsp_fw_text[dsp->fw]); =20 +err: wm_adsp_release_firmware_files(dsp, wmfw_firmware, wmfw_filename, coeff_firmware, coeff_filename); diff --git a/sound/soc/codecs/wm_adsp.h b/sound/soc/codecs/wm_adsp.h index 075ea0bd06eb..25210d404bf1 100644 --- a/sound/soc/codecs/wm_adsp.h +++ b/sound/soc/codecs/wm_adsp.h @@ -36,6 +36,7 @@ struct wm_adsp { =20 int fw; bool wmfw_optional; + bool bin_mandatory; =20 struct work_struct boot_work; int (*control_add)(struct wm_adsp *dsp, struct cs_dsp_coeff_ctl *cs_ctl); --=20 2.43.0 From nobody Fri Oct 10 21:13:59 2025 Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C22301EBA09; Thu, 12 Jun 2025 12:15:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=67.231.152.168 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749730506; cv=fail; b=M4N3R3JIin8hPKxieq+3hl9gNE7lpLJYJeJcw5x6akdo24kTnYob/6cGoeX1/+k4ZxbgjWfIqvmaKJnmKSvAlr2OZnuNc34QDEbMtMigQnMSXwqwq0+buxJMscA5wXCB8sCe35OuX+lJx02hTDEwLGajR7BA7FkiDz6N96kvxXU= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1749730506; c=relaxed/simple; bh=hVzQjOnWAylHZCM2NtDyuh5EXBiUgWWARKregXu3dF4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=fKxyDay+1eEGjKjIHgCHVuHH0i4Cw+XeAUR4rL2+OwFSrpbDefQagVTi/zwOp4WxxEixUWchjyf1AnS5VTtzyaZV1ftUb3xLtFZ/n6uf5ymsNiR3nNqM0XTL7rJk97Plx6y/030klsLN/3YiGGwF02+F6Wlw/SM7gAYSp/Vuz7U= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com; spf=pass smtp.mailfrom=opensource.cirrus.com; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b=LUeSE7qv; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b=FysGpBOM; arc=fail smtp.client-ip=67.231.152.168 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=opensource.cirrus.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cirrus.com header.i=@cirrus.com header.b="LUeSE7qv"; dkim=pass (1024-bit key) header.d=cirrus4.onmicrosoft.com header.i=@cirrus4.onmicrosoft.com header.b="FysGpBOM" Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 55C6kldQ019124; Thu, 12 Jun 2025 07:14:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=cc :content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s= PODMain02222019; bh=58+oi1NiXmvBpHayH9rBKKQhTNDNxP8hMy/HrjcPkX8=; b= LUeSE7qvzu8obWmUEMTKAt+Y2OdbPYAhb1+18JpAAMvhVjHqLIapUHWLJqtgTEA3 tO/RafrAiG9P+G3G7TdxpD+B3ftA8wS/UQoLYtepuWrwYTHZIK94lmSk1Hty9fvd 8wgASBIqd+5d3K2oWGaOgT2Eu7afg1GljahufICnrMOPFaOAsq/ZMuL9L2Tk/QEO gfFcd534v8xWZIp1RUHo+l7BqTqp54acCRY+XFHyK7XUPGk9ia/KaxNcjsMMOof2 IuelE97yOQGPqp5KKyb/L96BXhp/ozp3/+RsDEUINAFLVLGQjfR5sBsbn9nqNbqH CnJjaN6ZWx9zGm+lDxSg2w== Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10on2104.outbound.protection.outlook.com [40.107.93.104]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 4760mww0sc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Jun 2025 07:14:49 -0500 (CDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=VVjpUYir5S0NpLRPpEuWHsfZYxaq9Dz4N+hQKzV29XYppK9wh4wlrkGZsY4fIm6SBBDuavA961cZttf+VLQA0E9rsFNucBhrrExLPsMI2HmOsu6FVmXg7ASZRLKWqn/v51HwlO9+Dlheb+S6Fv1DJfhdHZZ3N6y3nYb6RdBknygdvtn9qvKUU4yL80wVba1fFcVfzaeRn1LCqc7Je+HgGMkX1trwpQ/HAFvgrifTcWZJq4E8RTx/aYiPwk8f3ypHoa3BfeA1j8TqZd7BhlefrOeGvl0cwwC/RAoZglFCsRAz9hl3ouzdxJZoy8FS+cif5qpKmpT8HqU+M1f0WYdpZQ== 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=58+oi1NiXmvBpHayH9rBKKQhTNDNxP8hMy/HrjcPkX8=; b=FD/J3MKJwh9HrVWFrTQJYpT279IUB6UHTNXv2nn91PtuK+u6O6ajdXjEfeFApWTUD3SPFohda2H7HdLmuzqOYUH52hOAfLDj/MeD0ynsKMMVffhsA/n/b8mU9z8DCQcPdN9xs9nktlw6VkYeJvBo5MLKaOQBI/5dG/q+OM4y/pmmiUL0JINhMnoz58pZPCwMjRqCIrXX5B4mEAkibZUko9hrM1N8Wnz+esbftuvAi9H3pVvt7YhiaTAmr9I9ke9PRLJEAEHQk3shO3IC5/BY0gWxwE+2QOZ9sTJtSHNOzAnuFC+95ZifgyDMy9+9VFzaEh0w6qW9BRz9E3SZHe465Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 84.19.233.75) smtp.rcpttodomain=cirrus.com smtp.mailfrom=opensource.cirrus.com; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=opensource.cirrus.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus4.onmicrosoft.com; s=selector2-cirrus4-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=58+oi1NiXmvBpHayH9rBKKQhTNDNxP8hMy/HrjcPkX8=; b=FysGpBOM62IdRIB/nbRtyUsQEOfAsjEsZOQyN2XJsVKvIMfyHN3pmsc0PDL9WI698BF0sm6vtMdpEFI95YribyP/GWR+PKMMFgl0zRb77yQhqs4uRDbsfto0e4Zi94PmhWWTCRrXyBk08VZcGAfXJUqgX8LhIeNkXMuU6zJ1nJs= Received: from CH0PR03CA0384.namprd03.prod.outlook.com (2603:10b6:610:119::26) by CH2PR19MB4054.namprd19.prod.outlook.com (2603:10b6:610:99::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8835.23; Thu, 12 Jun 2025 12:14:45 +0000 Received: from CH1PEPF0000AD76.namprd04.prod.outlook.com (2603:10b6:610:119:cafe::13) by CH0PR03CA0384.outlook.office365.com (2603:10b6:610:119::26) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8835.23 via Frontend Transport; Thu, 12 Jun 2025 12:14:45 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 84.19.233.75) smtp.mailfrom=opensource.cirrus.com; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=opensource.cirrus.com; Received-SPF: Fail (protection.outlook.com: domain of opensource.cirrus.com does not designate 84.19.233.75 as permitted sender) receiver=protection.outlook.com; client-ip=84.19.233.75; helo=edirelay1.ad.cirrus.com; Received: from edirelay1.ad.cirrus.com (84.19.233.75) by CH1PEPF0000AD76.mail.protection.outlook.com (10.167.244.53) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.8835.15 via Frontend Transport; Thu, 12 Jun 2025 12:14:45 +0000 Received: from ediswmail9.ad.cirrus.com (ediswmail9.ad.cirrus.com [198.61.86.93]) by edirelay1.ad.cirrus.com (Postfix) with ESMTPS id 2BA39406559; Thu, 12 Jun 2025 12:14:44 +0000 (UTC) Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.68.186]) by ediswmail9.ad.cirrus.com (Postfix) with ESMTPSA id B596282024A; Thu, 12 Jun 2025 12:14:43 +0000 (UTC) From: Richard Fitzgerald To: broonie@kernel.org Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: [PATCH 3/3] ASoC: doc: cs35l56: Update to add new SoundWire firmware filename suffix Date: Thu, 12 Jun 2025 13:14:28 +0100 Message-ID: <20250612121428.1667-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250612121428.1667-1-rf@opensource.cirrus.com> References: <20250612121428.1667-1-rf@opensource.cirrus.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH1PEPF0000AD76:EE_|CH2PR19MB4054:EE_ X-MS-Office365-Filtering-Correlation-Id: 74616fdf-4e83-4b75-9b6c-08dda9aab802 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|61400799027|36860700013|34020700016|376014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?5XsQPM3ycsFvN4JvyzIwxe0fCUSjYUmvavNQb+VroPM5AO1UeF/VjiYMnHX+?= =?us-ascii?Q?D2qFWXSA9hJdHx9yNPIQOhkp7vno93gfVl7VAIao3k4xAJgnboQrVxQ/MMxw?= =?us-ascii?Q?U85QnPUd1WA1XDYb3pT7oduiV5SplhDCg0AVr1N3TTxehU2E7B7A4Rd0BlMF?= =?us-ascii?Q?NJPsekB1c0HGCvd5+8ibnye0yYlF0TjFZxNKZLYEKXrJalLH06ecSeZsC/Jx?= =?us-ascii?Q?ihEzEYR5dCYLn60sg84sPboVuOaXW3EmhjwxKLG8rKU+44zYBq9G2OFB3ght?= =?us-ascii?Q?rfeRzAVOv6LxrxXLMEIO4ikjHWvE4EfQ/XvJkDFABG2v8ByJOSbQ1gjQSS97?= =?us-ascii?Q?knhvU2do48imUfShCwUb65PeFYXcleRCBUP3YfVKFIqbaUA2RbfF5IA+hdEE?= =?us-ascii?Q?B+efq9DsugnPw4BkOG2k69d0DKY7mlJ6NJI/a3wyYNJpeZ2UDD+sDDuefQwe?= =?us-ascii?Q?ri36el71E7Xznsf2AoXuJJgtbb12/DOoa3pEMJz+Cpwxl3RPRbpDuDzx6bL/?= =?us-ascii?Q?nFxllRVFW7qaFVMjeC9yjzoQ2lB+3PFBxTQapWXy4lgp4rDsnGwr19gEXVoe?= =?us-ascii?Q?Vfd4K/O28IOQ0mGZi0tY95b+M+kLo1keqd9fV2T7SbJB38t6HBF7KMDSnTZK?= =?us-ascii?Q?jk9gYEmb6XZwtVcvIwe0m/J48i6pyMQLefOzBkABe+4toG5m0Pbju4fOeSdG?= =?us-ascii?Q?pqqxiaY7Jvq1Jub4u+D5+HZZO+KZg82iGkA/MyrWixFmcT62zWXQ+hiQ9BLB?= =?us-ascii?Q?Yq1hUGwjJ/4Ss6ZJ4PtJv700qVXvvkJwFMed34IEOwGXndidpAa6h5Huf36p?= =?us-ascii?Q?lfTEsiuKiLMVqNYa0udtnwLOcvAgfJ84UoaFQg6xKY9NmO6/I8+7bI6agaVB?= =?us-ascii?Q?uaesKSeUVWa+VdDj11OGd0UPQ/ORicXGd/msjYEPavBDLLsHWTD1VrkKgJeU?= =?us-ascii?Q?S9L7lhMCGodzsmkatXrm1FtXx3T9+Cq5jXzL/2k/oeq4ZnEMqk5I4fvzFwqG?= =?us-ascii?Q?hZDWPQHyLqvjiOuA7BL7eTuIcDXdylBHDFCOMxQorye4IxpSk7//9G86w505?= =?us-ascii?Q?s5jJJG6Y57L9qgvoWPkkmefKcXNLDiIo7OTtkVJqjI422X15mnjL0fG1mzV8?= =?us-ascii?Q?Wudn+kiBjppZ8YWblsMjeFpV3XSkqx0Yi7mqeg/1NTopx3XpJRjg/P0oBetB?= =?us-ascii?Q?cFcysqjqq1pU3S8sLJAF1Q/36/UO3ejlU0YAsqjlBKlO5JsHDnhHfiFN3q3k?= =?us-ascii?Q?dcIJVheEGvESdgWFvIdkTuGv3NiX7UNoBWr5yji26jIvZQ6Seh4yvFwkWMFc?= =?us-ascii?Q?WmVT9/TexaVLM9Oy/42kNpuso8JJAv8GY2XLfRoJ5sM+cTTEKEPod5b271j4?= =?us-ascii?Q?rMryVqaLYR4UGiPfVQnEyGtPI0/AjoNwBL2D9sq/nGfL7pcTidHg+lNd6j1g?= =?us-ascii?Q?QbyB8a1+IoUMJI2r0wUfce1TBPP8/O1fTsRE5QpQUBXlo4SpEFafDuCC6Wok?= =?us-ascii?Q?g7iYZyDRrSC+mIyfGRKqyRKK0gn3tGk9gvOV?= X-Forefront-Antispam-Report: CIP:84.19.233.75;CTRY:GB;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:edirelay1.ad.cirrus.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(61400799027)(36860700013)(34020700016)(376014);DIR:OUT;SFP:1102; X-OriginatorOrg: opensource.cirrus.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jun 2025 12:14:45.0818 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 74616fdf-4e83-4b75-9b6c-08dda9aab802 X-MS-Exchange-CrossTenant-Id: bec09025-e5bc-40d1-a355-8e955c307de8 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bec09025-e5bc-40d1-a355-8e955c307de8;Ip=[84.19.233.75];Helo=[edirelay1.ad.cirrus.com] X-MS-Exchange-CrossTenant-AuthSource: CH1PEPF0000AD76.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR19MB4054 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwNjEyMDA5MyBTYWx0ZWRfXxnAoI+WfRee5 4lLslC/Arn7MytJyDOm8Md915jH8mrlrGgUasX1gx/bQUoFq5Z3tpfAtbp9I5P5bx8yO5qkkm9O R0FhdMggt1dgAfLogMD32mCb7+4+XxXvglJFdBprTrWoIAUS6IPgdqVJAPhjGroOXvaknsOmGcR tfo+Kp2sa4kF352XuOk4nkShzCYLGUwWO7qPi2sHy6PW1BPSRe+1TB3VwLW97iRsRGt3DGJhrHd zj8qIWiGGVA23Z6eJUgHo5zbbsbNAmUOldRRKTS4XbHq3HvoyfY85ARgTuf6boOdt+lbJxY1LR3 6ULA2QvBuma9EyE8jgVABaYbb8g6R9BXAQdp6rFbcrCIxugXGDeXNNy5k56iGMkZrs/w1jBICgp vrz7VbnHn2bYGmui1JBiAU/gxtDtmUbV1ZDuCVSffvRYq0XCV5GhLGcjD87WHK0kMg2S/NPu X-Authority-Analysis: v=2.4 cv=coCbk04i c=1 sm=1 tr=0 ts=684ac4b9 cx=c_pps a=lLx7hvauRx8h/FN40cw3Kw==:117 a=h1hSm8JtM9GN1ddwPAif2w==:17 a=6eWqkTHjU83fiwn7nKZWdM+Sl24=:19 a=wKuvFiaSGQ0qltdbU6+NXLB8nM8=:19 a=Ol13hO9ccFRV9qXi2t6ftBPywas=:19 a=6IFa9wvqVegA:10 a=s63m1ICgrNkA:10 a=RWc_ulEos4gA:10 a=w1d2syhTAAAA:8 a=5UCGEzhdddBMGRpfffEA:9 X-Proofpoint-ORIG-GUID: 7gRvXVIPzhr0ol2dcaOSnbGSCBO1QQAu X-Proofpoint-GUID: 7gRvXVIPzhr0ol2dcaOSnbGSCBO1QQAu X-Proofpoint-Spam-Reason: safe Content-Type: text/plain; charset="utf-8" Add the new firmware filename suffix used for SoundWire systems with CS35L57, CS35L63 or CS35L56 later than B0 silicon. This uses the SoundWire physical address of the amp to identify which firmware file to load on that amp. Signed-off-by: Richard Fitzgerald --- Documentation/sound/codecs/cs35l56.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Documentation/sound/codecs/cs35l56.rst b/Documentation/sound/c= odecs/cs35l56.rst index 98c6f6c74394..7db9f93d9be5 100644 --- a/Documentation/sound/codecs/cs35l56.rst +++ b/Documentation/sound/codecs/cs35l56.rst @@ -104,6 +104,13 @@ In this example the SSID is 10280c63. =20 The format of the firmware file names is: =20 +SoundWire (except CS35L56 Rev B0): + cs35lxx-b0-dsp1-misc-SSID[-spkidX]-l?u? + +SoundWire CS35L56 Rev B0: + cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN + +Non-SoundWire (HDA and I2S): cs35lxx-b0-dsp1-misc-SSID[-spkidX]-ampN =20 Where: @@ -111,12 +118,18 @@ Where: * cs35lxx-b0 is the amplifier model and silicon revision. This informati= on is logged by the driver during initialization. * SSID is the 8-digit hexadecimal SSID value. + * l?u? is the physical address on the SoundWire bus of the amp this + file applies to. * ampN is the amplifier number (for example amp1). This is the same as the prefix on the ALSA control names except that it is always lower-ca= se in the file name. * spkidX is an optional part, used for laptops that have firmware configurations for different makes and models of internal speakers. =20 +The CS35L56 Rev B0 continues to use the old filename scheme because a +large number of firmware files have already been published with these +names. + Sound Open Firmware and ALSA topology files ------------------------------------------- =20 --=20 2.43.0