Skip to content

Commit

Permalink
ASoC: SOF: Intel: reload library based on fw_image_flags
Browse files Browse the repository at this point in the history
If library reload is not defined by fw, driver can skip library reload on d3 exit,
or reload library.

Signed-off-by: Rander Wang <[email protected]>
  • Loading branch information
RanderWang committed Oct 27, 2023
1 parent 0a3fb4f commit e8f5012
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions sound/soc/sof/intel/hda-loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 library reload is not defined, skip the loading */
if (reload && hda->booted_from_imr && !ipc4_data->fw_image_flags & SOF_IPC4_LIBRARY_RELOAD)
return 0;

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

0 comments on commit e8f5012

Please sign in to comment.