Skip to content

Commit 0769156

Browse files
andyrossmarc-hb
authored andcommitted
[PANIC TEST] dai_zephyr: Silence benign warnings
Trying to reproduce DSP panic #8621 ------- The DAI emits a flood of warnings when presented with empty buffers at copy time. That's not really a reasonable warning condition. There are multiple situations where components upstream may be paused or asynchronous, leading to starvation in any given cycle. Earlier code has hit this with paused components, where the log messages are merely annoying. One new situation is that when using the DP scheduler, updates are async and may happen at a different cadence than the pipeline the DAI is on; the upstream component will be presented with data in a (for example) 1ms pipeline tick, but then send it to a different component (echo cancellation, say) that batches it up into larger buffers (10ms) and releases it downstream only at the slower cadence. In that situation the flood of messages is being emitted during an active stream, and tends to cause glitches all by itself after a few seconds (and even where it doesn't, it floods the Zephyr log backend to the extent that literally every message is dropped). (I don't know that all such warnigns are removed by this patch. These are only the ones I've seen in practice.) Fixes #4672 Signed-off-by: Andy Ross <andyross@google.com> (cherry picked from commit 514576e)
1 parent d11f724 commit 0769156

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

src/audio/dai-zephyr.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1286,8 +1286,6 @@ int dai_zephyr_multi_endpoint_copy(struct dai_data **dd, struct comp_dev *dev,
12861286

12871287
/* return if nothing to copy */
12881288
if (!frames) {
1289-
comp_warn(dev, "dai_zephyr_multi_endpoint_copy(): nothing to copy");
1290-
12911289
for (i = 0; i < num_endpoints; i++) {
12921290
ret = dma_reload(dd[i]->chan->dma->z_dev, dd[i]->chan->index, 0, 0, 0);
12931291
if (ret < 0) {
@@ -1460,19 +1458,8 @@ int dai_common_copy(struct dai_data *dd, struct comp_dev *dev, pcm_converter_fun
14601458
comp_dbg(dev, "dai_common_copy(), dir: %d copy_bytes= 0x%x",
14611459
dev->direction, copy_bytes);
14621460

1463-
/* Check possibility of glitch occurrence */
1464-
if (dev->direction == SOF_IPC_STREAM_PLAYBACK &&
1465-
copy_bytes + avail_bytes < dd->period_bytes)
1466-
comp_warn(dev, "dai_common_copy(): Copy_bytes %d + avail bytes %d < period bytes %d, possible glitch",
1467-
copy_bytes, avail_bytes, dd->period_bytes);
1468-
else if (dev->direction == SOF_IPC_STREAM_CAPTURE &&
1469-
copy_bytes + free_bytes < dd->period_bytes)
1470-
comp_warn(dev, "dai_common_copy(): Copy_bytes %d + free bytes %d < period bytes %d, possible glitch",
1471-
copy_bytes, free_bytes, dd->period_bytes);
1472-
14731461
/* return if nothing to copy */
14741462
if (!copy_bytes) {
1475-
comp_warn(dev, "dai_zephyr_copy(): nothing to copy");
14761463
dma_reload(dd->chan->dma->z_dev, dd->chan->index, 0, 0, 0);
14771464
return 0;
14781465
}

0 commit comments

Comments
 (0)