summaryrefslogtreecommitdiff
path: root/sound/soc/sof/intel/hda-loader.c
diff options
context:
space:
mode:
authorRander Wang <rander.wang@intel.com>2023-12-15 16:31:02 +0800
committerMark Brown <broonie@kernel.org>2023-12-15 12:57:57 +0000
commit3a0e7bb86f8728d94d55c56fb73e86be7976c163 (patch)
tree79588c3e75668b6b09a03c35fa6a1e60bfe8eff4 /sound/soc/sof/intel/hda-loader.c
parent855a4772be9dc777cbcd580c8a07d9c54908219b (diff)
ASoC: SOF: Intel: check fw_context_save for library reload
If fw_context_save is defined by fw, driver can skip library reload on d3 exit or reload library. Signed-off-by: Rander Wang <rander.wang@intel.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Link: https://msgid.link/r/20231215083102.3064200-4-yung-chuan.liao@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/sof/intel/hda-loader.c')
-rw-r--r--sound/soc/sof/intel/hda-loader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c
index 1805cf754beb..b81f231abee3 100644
--- a/sound/soc/sof/intel/hda-loader.c
+++ b/sound/soc/sof/intel/hda-loader.c
@@ -519,14 +519,15 @@ int hda_dsp_ipc4_load_library(struct snd_sof_dev *sdev,
struct sof_ipc4_fw_library *fw_lib, bool reload)
{
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
+ struct sof_ipc4_fw_data *ipc4_data = sdev->private;
struct hdac_ext_stream *hext_stream;
struct firmware stripped_firmware;
struct sof_ipc4_msg msg = {};
struct snd_dma_buffer dmab;
int ret, ret1;
- /* IMR booting will restore the libraries as well, skip the loading */
- if (reload && hda->booted_from_imr)
+ /* if IMR booting is enabled and fw context is saved for D3 state, skip the loading */
+ if (reload && hda->booted_from_imr && ipc4_data->fw_context_save)
return 0;
/* the fw_lib has been verified during loading, we can trust the validity here */