Re: [PATCH v2] ASoC: tas2783: Update loaded firmware names to linux-firmware 20260519
From: Mark Brown
Date: Tue Jun 16 2026 - 12:29:32 EST
On Sun, Jun 07, 2026 at 11:30:23AM +0200, Bartosz Juraszewski wrote:
> 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.
> @@ -800,6 +815,11 @@ static void tas2783_fw_ready(const struct firmware *fmw, 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);
> + }
> }
>
This will unconditionally wake fw_wait even if we've gone for the
fallback, meaning that the rest of the driver will think the firmware
is ready when it isn't.
> 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 = false;
> #if IS_ENABLED(CONFIG_PCI)
> struct device *dev = &slave->dev;
> + struct tas2783_prv *tas_dev = dev_get_drvdata(&slave->dev);
> struct pci_dev *pci = NULL;
> + const char *fw_uid_prefix = tas_dev->fw_using_fallback ? "" : "0x";
>
> for (; dev; dev = dev->parent) {
> if (dev->bus == &pci_bus_type) {
> pci = 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 = 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);
>
> + tas_dev->fw_using_fallback = false;
> init_waitqueue_head(&tas_dev->fw_wait);
> dev_set_drvdata(dev, tas_dev);
> regmap = devm_regmap_init_sdw_mbq_cfg(&peripheral->dev,
> --
> 2.54.0
>
Attachment:
signature.asc
Description: PGP signature