Commit 855a4772 authored by Rander Wang's avatar Rander Wang Committed by Mark Brown

ASoC: SOF: IPC4: query fw_context_save feature from fw

Driver queries fw_context_save feature when fw is ready and can skip
library reload with this feature since library is saved in persistent
memory. The default value of fw_context_save is true unless fw reports
false.
Signed-off-by: default avatarRander Wang <rander.wang@intel.com>
Reviewed-by: default avatarPéter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: default avatarRanjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://msgid.link/r/20231215083102.3064200-3-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 57cd29a8
...@@ -133,6 +133,8 @@ int sof_lnl_ops_init(struct snd_sof_dev *sdev) ...@@ -133,6 +133,8 @@ int sof_lnl_ops_init(struct snd_sof_dev *sdev)
ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2; ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2;
ipc4_data->fw_context_save = true;
/* External library loading support */ /* External library loading support */
ipc4_data->load_library = hda_dsp_ipc4_load_library; ipc4_data->load_library = hda_dsp_ipc4_load_library;
......
...@@ -718,6 +718,8 @@ int sof_mtl_ops_init(struct snd_sof_dev *sdev) ...@@ -718,6 +718,8 @@ int sof_mtl_ops_init(struct snd_sof_dev *sdev)
ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2; ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2;
ipc4_data->fw_context_save = true;
/* External library loading support */ /* External library loading support */
ipc4_data->load_library = hda_dsp_ipc4_load_library; ipc4_data->load_library = hda_dsp_ipc4_load_library;
......
...@@ -91,6 +91,8 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev) ...@@ -91,6 +91,8 @@ int sof_tgl_ops_init(struct snd_sof_dev *sdev)
ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2; ipc4_data->mtrace_type = SOF_IPC4_MTRACE_INTEL_CAVS_2;
ipc4_data->fw_context_save = true;
/* External library loading support */ /* External library loading support */
ipc4_data->load_library = hda_dsp_ipc4_load_library; ipc4_data->load_library = hda_dsp_ipc4_load_library;
......
...@@ -391,6 +391,9 @@ int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev) ...@@ -391,6 +391,9 @@ int sof_ipc4_query_fw_configuration(struct snd_sof_dev *sdev)
goto out; goto out;
} }
break; break;
case SOF_IPC4_FW_CONTEXT_SAVE:
ipc4_data->fw_context_save = *tuple->value;
break;
default: default:
break; break;
} }
......
...@@ -81,6 +81,7 @@ struct sof_ipc4_fw_data { ...@@ -81,6 +81,7 @@ struct sof_ipc4_fw_data {
u32 mtrace_log_bytes; u32 mtrace_log_bytes;
int max_num_pipelines; int max_num_pipelines;
u32 max_libs_count; u32 max_libs_count;
bool fw_context_save;
int (*load_library)(struct snd_sof_dev *sdev, int (*load_library)(struct snd_sof_dev *sdev,
struct sof_ipc4_fw_library *fw_lib, bool reload); struct sof_ipc4_fw_library *fw_lib, bool reload);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment