volume: fix xrun direction reporting

Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
Liam Girdwood 2017-12-08 19:38:00 +00:00
parent 340b9e56db
commit 85f893f291
1 changed files with 2 additions and 2 deletions

View File

@ -573,12 +573,12 @@ static int volume_copy(struct comp_dev *dev)
* check for XRUNs */
if (source->avail < cd->source_period_bytes) {
trace_volume_error("xru");
comp_overrun(dev, source, cd->source_period_bytes, 0);
comp_underrun(dev, source, cd->source_period_bytes, 0);
return -EIO; /* xrun */
}
if (sink->free < cd->sink_period_bytes) {
trace_volume_error("xro");
comp_underrun(dev, sink, cd->sink_period_bytes, 0);
comp_overrun(dev, sink, cd->sink_period_bytes, 0);
return -EIO; /* xrun */
}