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 18, 2023
1 parent 1fc1d28 commit 41844a4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ipc/ipc4/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include <sof/trace/trace.h>
#include <ipc4/error_status.h>
#include <ipc/header.h>
#include <ipc/info.h>
#include <ipc4/module.h>
#include <ipc4/pipeline.h>
#include <ipc4/notification.h>
Expand Down Expand Up @@ -1325,7 +1326,11 @@ struct ipc_cmd_hdr *ipc_prepare_to_send(const struct ipc_msg *msg)
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_IPC_INFO_D3_PERSISTENT;
else
header->ext = 0;
}

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

0 comments on commit 41844a4

Please sign in to comment.