Skip to content

Commit 28bd520

Browse files
committed
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 Signed-off-by: Rander Wang <rander.wang@intel.com>
1 parent e62e333 commit 28bd520

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

src/audio/base_fw.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,11 @@ static int basefw_config(uint32_t *data_offset, char *data)
111111
sche_cfg.sys_tick_source = SOF_SCHEDULE_LL_TIMER;
112112
tlv_value_set(tuple, IPC4_SCHEDULER_CONFIGURATION, sizeof(sche_cfg), &sche_cfg);
113113

114+
if (IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE)) {
115+
tuple = tlv_next(tuple);
116+
tlv_value_uint32_set(tuple, IPC4_FW_CONTEXT_SAVE, 1);
117+
}
118+
114119
tuple = tlv_next(tuple);
115120
*data_offset = (int)((char *)tuple - data);
116121

src/include/ipc4/base_fw.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,10 @@ enum ipc4_fw_config_params {
361361
IPC4_BUS_HARDWARE_ID = 25,
362362
/* Total number of FW config parameters */
363363
IPC4_FW_CFG_PARAMS_COUNT,
364+
/* FW context save on D3 entry */
365+
IPC4_FW_CONTEXT_SAVE,
364366
/* Max config parameter id */
365-
IPC4_MAX_FW_CFG_PARAM = IPC4_FW_CFG_PARAMS_COUNT - 1,
367+
IPC4_MAX_FW_CFG_PARAM = IPC4_FW_CONTEXT_SAVE - 1,
366368
};
367369

368370
enum ipc4_hw_config_params {

0 commit comments

Comments
 (0)