Skip to content

Commit f0e5f81

Browse files
committed
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>
1 parent 6bc3d8d commit f0e5f81

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

sound/soc/sof/intel/hda-loader.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,14 +551,15 @@ int hda_dsp_ipc4_load_library(struct snd_sof_dev *sdev,
551551
struct sof_ipc4_fw_library *fw_lib, bool reload)
552552
{
553553
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
554+
struct sof_ipc4_fw_data *ipc4_data = sdev->private;
554555
struct hdac_ext_stream *hext_stream;
555556
struct firmware stripped_firmware;
556557
struct sof_ipc4_msg msg = {};
557558
struct snd_dma_buffer dmab;
558559
int ret, ret1;
559560

560-
/* IMR booting will restore the libraries as well, skip the loading */
561-
if (reload && hda->booted_from_imr)
561+
/* if IMR booting is enabled and fw context is saved for D3 state, skip the loading */
562+
if (reload && hda->booted_from_imr && ipc4_data->fw_context_save)
562563
return 0;
563564

564565
/* the fw_lib has been verified during loading, we can trust the validity here */

0 commit comments

Comments
 (0)