Skip to content

Commit

Permalink
ipc4: set fw_ready flag for host
Browse files Browse the repository at this point in the history
Like IPC3 path, set SOF_IPC_INFO_D3_PERSISTENT for fw_ready event to
host if IMR_CONTEXT_SAVE is supported so that host can sync up with
FW, .e.g. avoid library reload if IMR_CONTEXT_SAVE is supported.

Currently CAVS platforms don't support IMR_CONTEXT_SAVE but ACE
platforms support it. It doesn't affect windows driver since the
extension part is not used by host driver.

Signed-off-by: Rander Wang <[email protected]>
  • Loading branch information
RanderWang committed Oct 19, 2023
1 parent 1fc1d28 commit 2c46361
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/include/ipc4/header.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,6 @@ struct sof_ipc4_notify_module_data {
uint8_t event_data[];
} __attribute((packed, aligned(4)));

#define SOF_IPC4_FW_CONTEXT_SAVE 1

#endif
3 changes: 3 additions & 0 deletions src/ipc/ipc4/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -1326,6 +1326,9 @@ void ipc_boot_complete_msg(struct ipc_cmd_hdr *header, uint32_t data)
{
header->pri = SOF_IPC4_FW_READY;
header->ext = 0;

if (IS_ENABLED(CONFIG_ADSP_IMR_CONTEXT_SAVE))
header->ext |= SOF_IPC4_FW_CONTEXT_SAVE;
}

#if defined(CONFIG_PM_DEVICE) && defined(CONFIG_INTEL_ADSP_IPC)
Expand Down

0 comments on commit 2c46361

Please sign in to comment.