mirror of https://github.com/thesofproject/sof.git
pipeline: only schedule playback streams at pipeline start.
Capture pipelines must wait for the DAI to fill one period of data before they can be scheduled. This avoids underruning the pipeline. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
b408ad4c88
commit
771d118275
|
@ -208,13 +208,19 @@ static void pipeline_cmd_update(struct pipeline *p, struct comp_dev *comp,
|
||||||
case COMP_CMD_RELEASE:
|
case COMP_CMD_RELEASE:
|
||||||
p->xrun_bytes = 0;
|
p->xrun_bytes = 0;
|
||||||
|
|
||||||
/* schedule initial pipeline fill when next idle */
|
/* playback pipelines need scheduled now, capture pipelines are
|
||||||
pipeline_schedule_copy_idle(p);
|
* scheduled once their initial DMA period is filled by the DAI */
|
||||||
|
if (comp->params.direction == SOF_IPC_STREAM_PLAYBACK) {
|
||||||
|
|
||||||
/* schedule pipeline */
|
/* pipelines are either scheduled by timers or DAI/DMA interrupts */
|
||||||
if (p->ipc_pipe.timer)
|
if (p->ipc_pipe.timer) {
|
||||||
|
/* timer - schedule initial copy */
|
||||||
pipeline_schedule_copy(p, 0);
|
pipeline_schedule_copy(p, 0);
|
||||||
|
} else {
|
||||||
|
/* DAI - schedule initial pipeline fill when next idle */
|
||||||
|
pipeline_schedule_copy_idle(p);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case COMP_CMD_SUSPEND:
|
case COMP_CMD_SUSPEND:
|
||||||
case COMP_CMD_RESUME:
|
case COMP_CMD_RESUME:
|
||||||
|
|
Loading…
Reference in New Issue