Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions src/drivers/intel/baytrail/ipc.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ static enum task_state ipc_platform_do_cmd(void *data)

static void ipc_platform_complete_cmd(void *data)
{
struct ipc *ipc = data;
uint32_t ipcxh;

/* clear BUSY bit and set DONE bit - accept new messages */
Expand All @@ -116,13 +115,6 @@ static void ipc_platform_complete_cmd(void *data)

/* unmask busy interrupt */
shim_write(SHIM_IMRD, shim_read(SHIM_IMRD) & ~SHIM_IMRD_BUSY);

// TODO: signal audio work to enter D3 in normal context
/* are we about to enter D3 ? */
if (ipc->pm_prepare_D3) {
while (1)
wait_for_interrupt(0);
}
}

void ipc_platform_send_msg(struct ipc *ipc)
Expand Down
2 changes: 2 additions & 0 deletions src/ipc/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,8 @@ static int ipc_pm_context_restore(uint32_t header)

trace_ipc("ipc: pm -> restore");

_ipc->pm_prepare_D3 = 0;

/* restore context placeholder */
//mailbox_hostbox_write(0, pm_ctx, sizeof(*pm_ctx));

Expand Down
11 changes: 9 additions & 2 deletions src/schedule/task.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
#include <ipc/trace.h>
#endif

extern struct ipc *_ipc;

typedef enum task_state (*task_main)(void *);

static void sys_module_init(void)
Expand All @@ -46,8 +48,13 @@ enum task_state task_main_master_core(void *data)
/* sleep until next IPC or DMA */
wait_for_interrupt(0);

/* now process any IPC messages to host */
ipc_process_msg_queue();
/*
* now process any IPC messages to host
* if we're not entering runtime suspend.
*/
if (_ipc && !_ipc->pm_prepare_D3)
ipc_process_msg_queue();

}

return SOF_TASK_STATE_COMPLETED;
Expand Down