ASoC: wm_adsp: Support DSPs that don't require firmware download
authorSimon Trimmer <simont@opensource.cirrus.com>
Mon, 20 Mar 2023 11:22:41 +0000 (11:22 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 21 Mar 2023 12:13:20 +0000 (12:13 +0000)
When a DSP can self-boot from ROM it is not necessary to download
firmware - when the DSP has the wmfw_optional flag set not finding a
wmfw firmware file is a successful outcome and not an error condition.

Signed-off-by: Simon Trimmer <simont@opensource.cirrus.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
Link: https://lore.kernel.org/r/167931140130.26.15590061696793062038@mailman-core.alsa-project.org
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c
sound/soc/codecs/wm_adsp.h

index 854d9366a745610afda1f7737f733d6bea3c209a..8176b6173de922aba9f9a3e7acb399888a13c552 100644 (file)
@@ -850,6 +850,9 @@ static int wm_adsp_request_firmware_files(struct wm_adsp *dsp,
                return 0;
        }
 
+       if (dsp->wmfw_optional)
+               return 0;
+
        adsp_err(dsp, "Failed to request firmware <%s>%s-%s-%s<-%s<%s>>.wmfw\n",
                 cirrus_dir, dsp->part, dsp->fwf_name, wm_adsp_fw[dsp->fw].file,
                 system_name, asoc_component_prefix);
index dc2f7a096e2667f2895f330e96d040bbe21103e3..173dcae2c260c866aff0ca60ad3748c6947abdc9 100644 (file)
@@ -34,6 +34,7 @@ struct wm_adsp {
        unsigned int sys_config_size;
 
        int fw;
+       bool wmfw_optional;
 
        struct work_struct boot_work;
        int (*pre_run)(struct wm_adsp *dsp);