[Sound-open-firmware] [PATCH v2 1/2] platform: add trace code for debug
Wu Zhigang
zhigang.wu at linux.intel.com
Thu Jun 21 03:27:14 CEST 2018
add the trace code for easy to debug the case:
when the xrun happen in capture/playback working at the same time.
we could confirm the xrun's direction easily.
Signed-off-by: Wu Zhigang <zhigang.wu at linux.intel.com>
---
test with:
apl-gpmrb with tdf8532 codec
linux topic/sof-dev: 0d51a5ed28c5
sof master: 48d2a1c551d7
soft master: 2cc3ad2a9287
pass the regression test:
Minnowboard Turbo
UP^2
CNL-RVP
---
src/audio/src.c | 4 ++++
src/audio/volume.c | 4 ++++
2 files changed, 8 insertions(+)
diff --git a/src/audio/src.c b/src/audio/src.c
index c19828a..3566976 100644
--- a/src/audio/src.c
+++ b/src/audio/src.c
@@ -800,10 +800,14 @@ static int src_copy(struct comp_dev *dev)
*/
if (source->avail < need_source) {
trace_src_error("xru");
+ trace_error_value(source->source->comp.id);
+ trace_error_value(sink->sink->comp.id);
return -EIO; /* xrun */
}
if (sink->free < need_sink) {
trace_src_error("xro");
+ trace_error_value(source->source->comp.id);
+ trace_error_value(sink->sink->comp.id);
return -EIO; /* xrun */
}
diff --git a/src/audio/volume.c b/src/audio/volume.c
index 9e2968d..64c5d39 100644
--- a/src/audio/volume.c
+++ b/src/audio/volume.c
@@ -356,11 +356,15 @@ static int volume_copy(struct comp_dev *dev)
*/
if (source->avail < cd->source_period_bytes) {
trace_volume_error("xru");
+ trace_error_value(source->source->comp.id);
+ trace_error_value(sink->sink->comp.id);
comp_underrun(dev, source, cd->source_period_bytes, 0);
return -EIO; /* xrun */
}
if (sink->free < cd->sink_period_bytes) {
trace_volume_error("xro");
+ trace_error_value(source->source->comp.id);
+ trace_error_value(sink->sink->comp.id);
comp_overrun(dev, sink, cd->sink_period_bytes, 0);
return -EIO; /* xrun */
}
--
2.17.1
More information about the Sound-open-firmware
mailing list