Skip to content

Commit 3a0e7bb

Browse files
RanderWangbroonie
authored andcommitted
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>
1 parent 855a477 commit 3a0e7bb

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
@@ -519,14 +519,15 @@ int hda_dsp_ipc4_load_library(struct snd_sof_dev *sdev,
519519
struct sof_ipc4_fw_library *fw_lib, bool reload)
520520
{
521521
struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata;
522+
struct sof_ipc4_fw_data *ipc4_data = sdev->private;
522523
struct hdac_ext_stream *hext_stream;
523524
struct firmware stripped_firmware;
524525
struct sof_ipc4_msg msg = {};
525526
struct snd_dma_buffer dmab;
526527
int ret, ret1;
527528

528-
/* IMR booting will restore the libraries as well, skip the loading */
529-
if (reload && hda->booted_from_imr)
529+
/* if IMR booting is enabled and fw context is saved for D3 state, skip the loading */
530+
if (reload && hda->booted_from_imr && ipc4_data->fw_context_save)
530531
return 0;
531532

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

0 commit comments

Comments
 (0)