From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: Maciej Strozek <mstrozek@opensource.cirrus.com>
Cc: broonie@kernel.org, lgirdwood@gmail.com,
yung-chuan.liao@linux.intel.com, pierre-louis.bossart@linux.dev,
perex@perex.cz, tiwai@suse.com, linux-sound@vger.kernel.org,
patches@opensource.cirrus.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ASoC: SDCA: Use Function Extension info for FDL
Date: Wed, 18 Nov 2026 10:54:28 +0000 [thread overview]
Message-ID: <av2D5PvUiopWIhFv@opensource.cirrus.com> (raw)
In-Reply-To: <20261117144853.2357660-1-mstrozek@opensource.cirrus.com>
On Tue, Nov 17, 2026 at 02:48:53PM +0000, Maciej Strozek wrote:
> Add additional way of selecting files for FDL using Function Extension
> ID and Function Extension Version, following Windows' SDCA driver usage
> of those controls for FDL.
> Make sure the introduced FEID/FEV search path is separate from the
> 'legacy' SSID-only search path in case some vendors choose to re-use
> SSIDs for different SKUs and identify them by Function Extension
> controls instead.
>
> Change-Id: I6ac1a5e5c85b67c2e9e0eaff930bfefd5e89afaf
> Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
> ---
> @@ -231,25 +263,21 @@ static int fdl_load_file(struct sdca_interrupt *interrupt,
> }
> }
>
> - disk_filename = fdl_get_sku_filename(dev, fdl_file);
> - if (!disk_filename)
> - return -ENOMEM;
> + ret = fdl_get_sku_filename(interrupt, fdl_file,
> + &disk_filename, &fallback_filename);
> + if (ret)
> + return ret;
>
> dev_dbg(dev, "FDL disk filename: %s\n", disk_filename);
We should probably drop these FDL disk filename prints since the
filename is now printed through source anyway.
> const struct firmware *firmware __free(firmware) = NULL;
> + disk_source = disk_filename;
> ret = firmware_request_nowarn(&firmware, disk_filename, dev);
> - kfree(disk_filename);
> if (ret) {
> - disk_filename = kasprintf(GFP_KERNEL, "sdca/%x/%x.bin",
> - fdl_file->vendor_id, fdl_file->file_id);
> - if (!disk_filename)
> - return -ENOMEM;
> + dev_dbg(dev, "FDL disk filename: %s\n", fallback_filename);
>
> - dev_dbg(dev, "FDL disk filename: %s\n", disk_filename);
> -
> - ret = firmware_request_nowarn(&firmware, disk_filename, dev);
> - kfree(disk_filename);
> + disk_source = fallback_filename;
> + ret = firmware_request_nowarn(&firmware, fallback_filename, dev);
> }
>
> if (!ret) {
> @@ -259,18 +287,19 @@ static int fdl_load_file(struct sdca_interrupt *interrupt,
> tmp->file_length != firmware->size) {
> dev_err(dev, "bad disk SWF size\n");
> } else if (!swf || swf->file_version <= tmp->file_version) {
> - dev_dbg(dev, "using SWF from disk\n");
> swf = tmp;
> + source = disk_source;
> }
> }
>
> if (!swf) {
> dev_err(dev, "failed to locate SWF\n");
> - return -ENOENT;
> + ret = -ENOENT;
> + goto out_free;
We shouldn't mix goto clean up with the __free clean up. Probably
better to use an else here for the UMP write.
Thanks,
Charles
> }
>
> - dev_info(dev, "loading SWF: %x-%x-%x\n",
> - swf->vendor_id, swf->file_id, swf->file_version);
> + dev_info(dev, "loading SWF: %x-%x-%x from %s\n",
> + swf->vendor_id, swf->file_id, swf->file_version, source);
prev parent reply other threads:[~2026-11-18 10:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-17 14:48 [PATCH] ASoC: SDCA: Use Function Extension info for FDL Maciej Strozek
2026-11-18 10:54 ` Charles Keepax [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=av2D5PvUiopWIhFv@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=mstrozek@opensource.cirrus.com \
--cc=patches@opensource.cirrus.com \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.