mirror of https://github.com/thesofproject/sof.git
comp: volume: use XRUN handler to report XRUNs
Use the new XRUN API to report XRUNs to host and trace. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
bc83a0e147
commit
9ec831b137
|
@ -467,9 +467,12 @@ static int volume_copy(struct comp_dev *dev)
|
|||
copy_bytes = comp_buffer_get_copy_bytes(dev, source, sink);
|
||||
|
||||
/* Run volume if buffers have enough room */
|
||||
if (copy_bytes < cd->source_period_bytes ||
|
||||
copy_bytes < cd->sink_period_bytes) {
|
||||
trace_volume_error("xru");
|
||||
if (copy_bytes < cd->source_period_bytes) {
|
||||
comp_underrun(dev, source, cd->source_period_bytes);
|
||||
return 0;
|
||||
}
|
||||
if (copy_bytes < cd->sink_period_bytes) {
|
||||
comp_overrun(dev, source, cd->sink_period_bytes);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue