Skip to content

Commit 08cf3d2

Browse files
RanderWangkv2019i
authored andcommitted
Revert "ipc4: relax the IPC timeout checks and be nicer to other threads"
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 <rander.wang@intel.com>
1 parent 6a2eba1 commit 08cf3d2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/ipc/ipc4/handler.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,13 +510,12 @@ static void ipc_compound_msg_done(uint32_t msg_id, int error)
510510
}
511511
}
512512

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

518517
while (atomic_read(&msg_data.delayed_reply)) {
519-
k_sleep(Z_TIMEOUT_MS(10));
518+
k_sleep(Z_TIMEOUT_US(250));
520519

521520
if (!try_count--) {
522521
atomic_set(&msg_data.delayed_reply, 0);

0 commit comments

Comments
 (0)