pipeline: return SOF_TASK_STATE_COMPLETED on xrun

Returns SOF_TASK_STATE_COMPLETED on xrun. Otherwise if
the xrun happens during playback preload phase, we'll end up
in the infinitely processed task.

Signed-off-by: Tomasz Lauda <tomasz.lauda@linux.intel.com>
This commit is contained in:
Tomasz Lauda 2019-08-09 12:25:47 +02:00 committed by Tomasz Lauda
parent 9f4a893845
commit de23c27ad2
1 changed files with 4 additions and 2 deletions

View File

@ -979,7 +979,8 @@ static enum task_state pipeline_task(void *arg)
/* try to recover */
err = pipeline_xrun_recover(p);
if (err < 0)
return 0;/* skip copy if still in xrun */
/* skip copy if still in xrun */
return SOF_TASK_STATE_COMPLETED;
}
err = pipeline_copy(p);
@ -990,7 +991,8 @@ static enum task_state pipeline_task(void *arg)
trace_pipe_error_with_ids(p, "pipeline_task(): xrun "
"recover failed! pipeline "
"will be stopped!");
return 0; /* failed - host will stop this pipeline */
/* failed - host will stop this pipeline */
return SOF_TASK_STATE_COMPLETED;
}
}