From nobody Mon Jun 8 05:24:55 2026 Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 915FE5B21A for ; Sun, 7 Jun 2026 09:30:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.43 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780824644; cv=none; b=haE2gizMXXypSPqkfbmLLCzwE9V2Vf9oH0LOPtG41OMF3TjNV6EOzHD0wj2JdIDIgPqeUp1IPsr4Aia4yMKuwpJriHc5wodwje2zW/78zyslq3PHCWiKC8GEXWfpg4zVKi/7RDbBWR5F1bfDHZ8B7bpkjVK48NPe8KBz/8QdJ2c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780824644; c=relaxed/simple; bh=+mvW7uXSXb+7n9JpAKdJIpv+KlzXW0NXNvUV490/q/U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=D0Ra1K9AbRKhkJ4s/3yCDkmRJ33XyMeTLEbU9xW6B2xEuCGFZutomsovQHTNahaxI5wU9nsRTW9OZ9gfSGhFzO0njS1ajea9ZugkdmOBCMOPtDJQ9Vwb0HOXuR+hTia+PLlQcgKldxZCldhna4RiiZfBRED/INb5zz93/QERGow= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SwGEi96g; arc=none smtp.client-ip=209.85.128.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SwGEi96g" Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-49068493267so23878415e9.1 for ; Sun, 07 Jun 2026 02:30:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1780824640; x=1781429440; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=a/KqJm/1uevdryicvlm2SbjfdBXlxEmq9Z6UjHBhip0=; b=SwGEi96g9P7fa1NtJtZDo+KqF9SpODeU6flV5qrPVfOBAksd2tp6QoaNxndT5caerF mPcxTxo4bnfE6W49YWXpn9aWXxr0k2E1K+WLyS29qZWRWuImIBkfMkHuQV15u/0Oemun vs5q01gPKozcAvgLxl+TZK3G99fYZDXtj17lBE8i5fRSxcGBk5bkSCupQwv4/CuptUzo 1qAnQgJWyi+wEnRD/mMbB7WMMD8aEzypfeGqOiVypHl6qWf3Z+5EFmsUIxIp6K+E8o7Q ZU/SetvR9CZZi3YSDv0afnHJgH9umETU4xsHovecBzWTI1Ses0hGLEtM3dsuU7MUbNR8 wnWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780824640; x=1781429440; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=a/KqJm/1uevdryicvlm2SbjfdBXlxEmq9Z6UjHBhip0=; b=BvHovWR7rkku74FWGSeGK3FgzXaECpO4+br3g5rviKuDTkdXvtZyZyphR6wyRN81I7 SAafzfkzyn0nP5MBCUnUZskS1wp/i+ECN1euyRCAz25MlU6DK5d117EZr/28S6P+l+wi FMAPRtiPQzgqZUnuo3Ebq+ZsqEwpyCDYrRO+Kys58ikbjRNom6HtXYOiaietADjiyT7z QxBJ0aBON4KY2MFJ0whsUbgsM827Tb4uL7VC8mkdRUcj6116kmo4GspgqhvWBndD/M1i yjIO2RC1mijVgLXl1KGPf0wwVRBaxh4G91oIu/9xibfl0Gc7PLB9WIdT4ba0Tq1/Mm4d p7fQ== X-Forwarded-Encrypted: i=1; AFNElJ8MSNslXEaYBsBDL3cUpgaJj1CfSD6k/r/r45ep8opgsKAHz47CnqZvqsW1biKCPa7lWObFWKxeG8t5BPM=@vger.kernel.org X-Gm-Message-State: AOJu0Yw6Vm2qwxK/Dt9ESzOrG9/AZ5uosa5VY2SaYON8QS0OPmb4HDwy MaGANJqtdUrONsh3rISohn8CwK54JSA5fOSSD5/elZFyxwxlv6Kcymxq X-Gm-Gg: Acq92OFc+AT/AyMXiTvviSEmlrfAsanaJNfzi7dqZjgDWsMy1KpvAMKfo+/G+0gbG3t 1ius1+83+etsgBudyu0OUgFuNWtAlRB/dhvO60RuLHubbh0yyRpxQRxcecs4RbyDyLpTxzmgqqr jPIZXatQj48vFAtZQAmnejF0eqswQc6EAV8TgAP60kv3Fnc18FTTAypqQvL8hreVLJGWVJKox5M 3nTfhXtY+wHm8A749Ao8gRcJ1EXogtrIxS3W7AZCvEOViMZoBaT3JE9x8HXkla00LyGZ1r/xsc+ hzzDDZXhwnfpxnFOOvFpEMbJiacUzrkUMpd9O8Eirc4RZUIRfub4OMzDuU1LEtzQ+1CLqR9oGhD doQTeaXkdywAh1tKYTrQOPJqXOgCI5jpiI9uN06znbq0oB1Ztoy9FAoaZDpQ2pZGgmnTC/DGPrN 8RaM1TT8CAb7Ssb6OMjB9DDDOu7mEdTSRldsK6ITGtvM3Im73XXvWNalgqUWS7X34dNtuh7n+xF GQY/KsNnbNTdmPqnd7oaAizAHGRn/qon4zySqAQpG4k9TdZDA== X-Received: by 2002:a05:600c:8712:b0:490:958f:2a5c with SMTP id 5b1f17b1804b1-490c25f17dfmr191462155e9.17.1780824639851; Sun, 07 Jun 2026 02:30:39 -0700 (PDT) Received: from fedora (89-67-127-240.dynamic.play.pl. [89.67.127.240]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-490bc3d6c65sm287509315e9.12.2026.06.07.02.30.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Jun 2026 02:30:39 -0700 (PDT) From: Bartosz Juraszewski To: Mark Brown Cc: Bartosz Juraszewski , Shenghao Ding , Kevin Lu , Baojun Xu , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2] ASoC: tas2783: Update loaded firmware names to linux-firmware 20260519 Date: Sun, 7 Jun 2026 11:30:23 +0200 Message-ID: <20260607093023.42070-1-bjuraszewski@gmail.com> X-Mailer: git-send-email 2.54.0 In-Reply-To: <15efa76a-aab8-4a21-ac91-ed6698cb958a@sirena.org.uk> References: <15efa76a-aab8-4a21-ac91-ed6698cb958a@sirena.org.uk> 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 Content-Type: text/plain; charset="utf-8" In linux-firmware commit from 2026-05-19 `2f90f4fe5c67f51a8410907a...` `ASoC: tas2783: Add Firmware files for tas2783A projects` by Baojun Xu 138 new firmware files for tas2783 were added, none of which are loaded by the kernel. Kernel expects files to be named with the following convention: "%04X-%1X-%1X.bin". However the added firmware files follow "-0x%1X.bin" naming instead with `0x` hex prefix, which fails to load resulting in following dmesg log: slave-tas2783 sdw:0:1:0102:0000:01:8: Direct firmware load for 1714-1-8.b= in failed with error -2 slave-tas2783 sdw:0:1:0102:0000:01:8: Failed to read fw binary 1714-1-8.b= in slave-tas2783 sdw:0:1:0102:0000:01:b: Direct firmware load for 1714-1-B.b= in failed with error -2 slave-tas2783 sdw:0:1:0102:0000:01:b: Failed to read fw binary 1714-1-B.b= in slave-tas2783 sdw:0:1:0102:0000:01:8: error playback without fw download slave-tas2783 sdw:0:1:0102:0000:01:8: ASoC error (-22): at snd_soc_dai_hw= _params() on tas2783-codec This same commit removes all 22 symlinks from WHENCE, that used naming without the '0x' prefix to only 6 prevoiusly existing .bin files. This patch adds `0x` prefix explicitly to the generated firmware name allowing file to successfully load. In case prefixed firmware is missing due to out of date linux-firmware, we set the fallback flag and attempt to load firmware again based on the old file names. This prefix change results in functioning firmware loading on ASUS ProArt PX13 HN7306EAC, which uses 1714-1-0x8.bin and 1714-1-0xB.bin firmware files. Tested on top of 7.1.0-rc6, but no changes exist in newest linux-next. Signed-off-by: Bartosz Juraszewski --- Hi Mark, > This will only use the new name, meaning that an existing working > install will be broken when upgrading the kernel unless linux-firmware > is also updated. We should try both names, assuming the change in name > stays, so that existing installs continue to work. You're right, I've added a fallback to try old name if new one fails. v2: - new fw_using_fallback device flag; set when new format fw not present - if !fw_using_fallback and load fails, set flag and try reloading - when fw_using_fallback - generate fw name with old format string sound/soc/codecs/tas2783-sdw.c | 36 ++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tas2783-sdw.c b/sound/soc/codecs/tas2783-sdw.c index 90008d2d06e2..8c64af82b094 100644 --- a/sound/soc/codecs/tas2783-sdw.c +++ b/sound/soc/codecs/tas2783-sdw.c @@ -100,6 +100,8 @@ struct tas2783_prv { wait_queue_head_t fw_wait; bool fw_dl_task_done; bool fw_dl_success; + /* use fallback fw name */ + bool fw_using_fallback; }; =20 static const struct reg_default tas2783_reg_default[] =3D { @@ -725,6 +727,8 @@ static s32 tas_fw_get_next_file(const u8 *data, struct = tas_fw_file *file) return file->length + sizeof(u32) * 5; } =20 +static s32 tas_io_init(struct device *dev, struct sdw_slave *slave); + static void tas2783_fw_ready(const struct firmware *fmw, void *context) { struct tas2783_prv *tas_dev =3D @@ -732,6 +736,7 @@ static void tas2783_fw_ready(const struct firmware *fmw= , void *context) const u8 *buf =3D NULL; s32 img_sz, ret =3D 0, cur_file =3D 0; s32 offset =3D 0; + bool try_load_fallback =3D false; =20 struct tas_fw_hdr *hdr __free(kfree) =3D kzalloc_obj(*hdr); struct tas_fw_file *file __free(kfree) =3D kzalloc_obj(*file); @@ -740,11 +745,21 @@ static void tas2783_fw_ready(const struct firmware *f= mw, void *context) goto out; } =20 + /* firmware binary not found*/ if (!fmw || !fmw->data) { - /* firmware binary not found*/ - dev_err(tas_dev->dev, - "Failed to read fw binary %s\n", - tas_dev->rca_binaryname); + if (!tas_dev->fw_using_fallback) { + tas_dev->fw_using_fallback =3D true; + try_load_fallback =3D true; + + dev_info(tas_dev->dev, + "Failed to read preferred fw binary: %s\n", + tas_dev->rca_binaryname); + } else { + dev_err(tas_dev->dev, + "Failed to read fallback fw binary %s\n", + tas_dev->rca_binaryname); + } + ret =3D -EINVAL; goto out; } @@ -800,6 +815,11 @@ static void tas2783_fw_ready(const struct firmware *fm= w, void *context) wake_up(&tas_dev->fw_wait); if (fmw) release_firmware(fmw); + + if (try_load_fallback) { + dev_info(tas_dev->dev, "Attempting fallback fw load\n"); + tas_io_init(tas_dev->dev, tas_dev->sdw_peripheral); + } } =20 static inline s32 tas_clear_latch(struct tas2783_prv *priv) @@ -1115,13 +1135,16 @@ static void tas_generate_fw_name(struct sdw_slave *= slave, char *name, size_t siz bool pci_found =3D false; #if IS_ENABLED(CONFIG_PCI) struct device *dev =3D &slave->dev; + struct tas2783_prv *tas_dev =3D dev_get_drvdata(&slave->dev); struct pci_dev *pci =3D NULL; + const char *fw_uid_prefix =3D tas_dev->fw_using_fallback ? "" : "0x"; =20 for (; dev; dev =3D dev->parent) { if (dev->bus =3D=3D &pci_bus_type) { pci =3D to_pci_dev(dev); - scnprintf(name, size, "%04X-%1X-%1X.bin", - pci->subsystem_device, bus->link_id, unique_id); + scnprintf(name, size, "%04X-%1X-%s%1X.bin", + pci->subsystem_device, bus->link_id, + fw_uid_prefix, unique_id); pci_found =3D true; break; } @@ -1326,6 +1349,7 @@ static s32 tas_sdw_probe(struct sdw_slave *peripheral, mutex_init(&tas_dev->calib_lock); mutex_init(&tas_dev->pde_lock); =20 + tas_dev->fw_using_fallback =3D false; init_waitqueue_head(&tas_dev->fw_wait); dev_set_drvdata(dev, tas_dev); regmap =3D devm_regmap_init_sdw_mbq_cfg(&peripheral->dev, --=20 2.54.0