Skip to content

Commit

Permalink
basefw: add support for fw config query for context save
Browse files Browse the repository at this point in the history
If CONFIG_ADSP_IMR_CONTEXT_SAVE is enabled, base fw will report
fw_context_save is supported to host

Signed-off-by: Rander Wang <[email protected]>
  • Loading branch information
RanderWang committed Nov 1, 2023
1 parent e62e333 commit 28bd520
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/audio/base_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,11 @@ 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);

if (IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE)) {
tuple = tlv_next(tuple);
tlv_value_uint32_set(tuple, IPC4_FW_CONTEXT_SAVE, 1);
}

tuple = tlv_next(tuple);
*data_offset = (int)((char *)tuple - data);

Expand Down
4 changes: 3 additions & 1 deletion src/include/ipc4/base_fw.h
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,10 @@ enum ipc4_fw_config_params {
IPC4_BUS_HARDWARE_ID = 25,
/* Total number of FW config parameters */
IPC4_FW_CFG_PARAMS_COUNT,
/* FW context save on D3 entry */
IPC4_FW_CONTEXT_SAVE,
/* Max config parameter id */
IPC4_MAX_FW_CFG_PARAM = IPC4_FW_CFG_PARAMS_COUNT - 1,
IPC4_MAX_FW_CFG_PARAM = IPC4_FW_CONTEXT_SAVE - 1,
};

enum ipc4_hw_config_params {
Expand Down

0 comments on commit 28bd520

Please sign in to comment.