Skip to content

Commit 0e7d82c

Browse files
simontrimmerbroonie
authored andcommitted
ASoC: wm_adsp: Add support for loading bin files without wmfw
A self-booted DSP may have a file of coefficients to apply to the device even when there is no firmware to download. Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Link: https://lore.kernel.org/r/20230320112245.115720-7-rf@opensource.cirrus.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 11520b8 commit 0e7d82c

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

sound/soc/codecs/wm_adsp.c

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -850,8 +850,29 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
850850
return 0;
851851
}
852852

853-
if (dsp->wmfw_optional)
853+
if (dsp->wmfw_optional) {
854+
if (system_name) {
855+
if (asoc_component_prefix)
856+
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
857+
cirrus_dir, system_name,
858+
asoc_component_prefix, "bin");
859+
860+
if (!*coeff_firmware)
861+
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
862+
cirrus_dir, system_name,
863+
NULL, "bin");
864+
}
865+
866+
if (!*coeff_firmware)
867+
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
868+
"", NULL, NULL, "bin");
869+
870+
if (!*coeff_firmware)
871+
wm_adsp_request_firmware_file(dsp, coeff_firmware, coeff_filename,
872+
cirrus_dir, NULL, NULL, "bin");
873+
854874
return 0;
875+
}
855876

856877
adsp_err(dsp, "Failed to request firmware <%s>%s-%s-%s<-%s<%s>>.wmfw\n",
857878
cirrus_dir, dsp->part, dsp->fwf_name, wm_adsp_fw[dsp->fw].file,

0 commit comments

Comments
 (0)