[Sound-open-firmware] [PATCH v2 1/2] platform: add trace code for debug
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@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 */ }
fix typo error in mixer component
Signed-off-by: Wu Zhigang zhigang.wu@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/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/audio/mixer.c b/src/audio/mixer.c index ac6b7f9..3ddea0a 100644 --- a/src/audio/mixer.c +++ b/src/audio/mixer.c @@ -255,7 +255,7 @@ static int mixer_copy(struct comp_dev *dev) comp_underrun(dev, sources[i], sources[i]->avail, md->period_bytes); } else if (res > 0) { - trace_mixer_error("xru"); + trace_mixer_error("xro"); comp_overrun(dev, sources[i], sink->free, md->period_bytes); }
On Thu, 2018-06-21 at 09:27 +0800, Wu Zhigang wrote:
fix typo error in mixer component
Signed-off-by: Wu Zhigang zhigang.wu@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/mixer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/audio/mixer.c b/src/audio/mixer.c index ac6b7f9..3ddea0a 100644 --- a/src/audio/mixer.c +++ b/src/audio/mixer.c @@ -255,7 +255,7 @@ static int mixer_copy(struct comp_dev *dev) comp_underrun(dev, sources[i], sources[i]->avail, md->period_bytes); } else if (res > 0) {
trace_mixer_error("xru");
}trace_mixer_error("xro"); comp_overrun(dev, sources[i], sink->free, md->period_bytes);
Applied, 2/2 - I think we should wait until Rander has done his trace rework as this may cause some conflicts for him (and may not be needed since the trace data should already contain the ID).
Liam
participants (2)
-
Liam Girdwood
-
Wu Zhigang