From 29e9133084cb6a13c756e0231b96b8d293c307de Mon Sep 17 00:00:00 2001 From: Rander Wang Date: Wed, 1 Nov 2023 11:08:32 +0800 Subject: [PATCH] basefw: add support for fw config query for context save If CONFIG_ADSP_IMR_CONTEXT_SAVE is enabled, base fw will report fw_context_save is supported to host. Driver will assume fw doesn't support this feature if it is not reported. Signed-off-by: Rander Wang --- src/audio/base_fw.c | 4 ++++ src/include/ipc4/base_fw.h | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/audio/base_fw.c b/src/audio/base_fw.c index ce7b5ca7778e..c72cb6555aa0 100644 --- a/src/audio/base_fw.c +++ b/src/audio/base_fw.c @@ -111,6 +111,10 @@ static int basefw_config(uint32_t *data_offset, char *data) sche_cfg.sys_tick_source = SOF_SCHEDULE_LL_TIMER; tlv_value_set(tuple, IPC4_SCHEDULER_CONFIGURATION, sizeof(sche_cfg), &sche_cfg); + tuple = tlv_next(tuple); + tlv_value_uint32_set(tuple, IPC4_INTEL_RESRVED_31, + IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE)); + tuple = tlv_next(tuple); *data_offset = (int)((char *)tuple - data); diff --git a/src/include/ipc4/base_fw.h b/src/include/ipc4/base_fw.h index 4b6458ceecf1..6af45cbac566 100644 --- a/src/include/ipc4/base_fw.h +++ b/src/include/ipc4/base_fw.h @@ -365,6 +365,10 @@ enum ipc4_fw_config_params { IPC4_KPB_RT_SINK_COUNT = 27, /* Manual control of DMI L1 state */ IPC4_DMI_FORCE_L1_EXIT = 28, + /* Intel reserved */ + IPC4_INTEL_RESRVED_29 = 29, + IPC4_INTEL_RESRVED_30 = 30, + IPC4_INTEL_RESRVED_31 = 31, /* Total number of FW config parameters */ IPC4_FW_CFG_PARAMS_COUNT, /* Max config parameter id */