Skip to content

Commit

Permalink
Revert "ipc4: relax the IPC timeout checks and be nicer to other thre…
Browse files Browse the repository at this point in the history
…ads"

When a stream is triggered to start, host kernel first sendis trigger
start ipc message to fw and then start host dma for this stream.
Ipc_wait_for_compound_msg is used to wait for all pipelines in the
stream to be complete and need to be done fast since it blocks host
to start hda dma. The reverted commit adds a 10 ms delay and results
to host copier xrun warning for it can't get data from host dma.

   And this commit also makes a negative effect for stream_start_offset
calculation which is for the difference between dai gateway and
host gateway. We calculate it in host start function but host dma is
started 10ms later, so there will be at least 10ms data error.

This reverts commit 909a327.

Signed-off-by: Rander Wang <[email protected]>
  • Loading branch information
RanderWang committed Jan 18, 2024
1 parent 14237ed commit c142b7d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/ipc/ipc4/handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,12 @@ static void ipc_compound_msg_done(uint32_t msg_id, int error)
}
}

/* wait for IPCs to complete on other cores and be nice to any LL work */
static int ipc_wait_for_compound_msg(void)
{
int try_count = 30; /* timeout out is 30 x 10ms so 300ms for IPC */
int try_count = 30;

while (atomic_read(&msg_data.delayed_reply)) {
k_sleep(Z_TIMEOUT_MS(10));
k_sleep(Z_TIMEOUT_US(250));

if (!try_count--) {
atomic_set(&msg_data.delayed_reply, 0);
Expand Down

0 comments on commit c142b7d

Please sign in to comment.