]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ASoC: cs35l56: Use vendor-specific qualifier in firmware file search
authorRichard Fitzgerald <rf@opensource.cirrus.com>
Wed, 21 Jan 2026 13:22:40 +0000 (13:22 +0000)
committerMark Brown <broonie@kernel.org>
Wed, 21 Jan 2026 13:41:21 +0000 (13:41 +0000)
commit51b069172a4ef2c6278c64c603a41a7f20329921
treea319a814a691172b74ca8f2fcd9b908460f7ee9e
parent00fd40bc7acecf9f41d645aa0b35ddc7fd7679b6
ASoC: cs35l56: Use vendor-specific qualifier in firmware file search

If cs_amp_devm_get_vendor_specific_variant_id() returns a string, use it
as part of the firmware filename. If this firmware isn't found, fall back
to the standard firmware name.

This re-uses the fwf_suffix fallback mechanism that was introduced in
commit e5d5b3aebdc8 ("ASoC: cs35l56: Use SoundWire address as alternate
firmware suffix on L56 B0").

This is for handling vendors that use the same PCI SSID on systems with
various audio hardware and have a custom vendor-specific way to identify
the hardware variant.

This is currently used on Dell laptops. Dell create a UEFI variable that
indicates varations to the base hardware. This variance can be any part
of the hardware (not necessarily affecting the audio). It would be
impractical to publish many aliases for the same firmware files to match
every possible variance to that base hardware. Hence the fallback to the
standard firmware name. This allows alternate firmware files to be
published only for variants that need it. For all other variants the
fallback will load the firmware for the base SSID.

This is not done for CS35L56 B0 because the fallback mechanism is already
used for a different purpose for these parts. None of the products with
the older L56 B0 silicon revision need the additional vendor-specific
descriptor.

For SoundWire the resulting firmware searches with a variant descriptor
will be:
1. cs35l??-dsp1-misc-SSID-VARIANT-l?u?.wmfw
2. cs35l??-dsp1-misc-SSID-VARIANT.wmfw
3. cs35l??-dsp1-misc-SSID-VARIANT-l?u?.bin
4. cs35l??-dsp1-misc-SSID-VARIANT.bin

If this doesn't find a wmfw and bin file it will then fallback to:
5. cs35l??-dsp1-misc-SSID-l?u?.wmfw
6. cs35l??-dsp1-misc-SSID.wmfw
7. cs35l??-dsp1-misc-SSID-l?u?.bin
8. cs35l??-dsp1-misc-SSID.bin

With the typical published firmware names and qualifiers (a single wmfw but
amp-specific bin file) this will load either:

 cs35l??-dsp1-misc-SSID-VARIANT.wmfw
   and cs35l??-dsp1-misc-SSID-VARIANT-l?u?.bin

or

 cs35l??-dsp1-misc-SSID.wmfw
   and cs35l??-dsp1-misc-SSID-l?u?.bin

For non-Soundwire (I2S/TDM) systems the searches and fallbacks are
as above except that the "l?u?" component of the name is instead the
ALSA name prefix, usually of the form "AMPn".

Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://patch.msgid.link/20260121132243.1256019-3-rf@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/cs35l56.c