From 3e5f75ea79ac7f37be8b4adf4ed7a561094809e4 Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Wed, 18 Oct 2023 11:06:36 +0800 Subject: [PATCH] ASoC: SOF: Intel: check fw boot config for library reload If fw supports both IMR booting and D3 context save, library reload can be skipped, or library should be reloaded. Signed-off-by: Rander Wang --- sound/soc/sof/intel/hda-loader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/sof/intel/hda-loader.c b/sound/soc/sof/intel/hda-loader.c index 9d50652cc3f45e..981814d3e62a09 100644 --- a/sound/soc/sof/intel/hda-loader.c +++ b/sound/soc/sof/intel/hda-loader.c @@ -525,8 +525,8 @@ int hda_dsp_ipc4_load_library(struct snd_sof_dev *sdev, 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 and D3 context save are supported, skip the loading */ + if (reload && hda->booted_from_imr && sdev->fw_ready.flags & SOF_IPC_INFO_D3_PERSISTENT) return 0; /* the fw_lib has been verified during loading, we can trust the validity here */