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:
Liam Girdwood 2017-12-09 21:55:38 +00:00
parent b408ad4c88
commit 771d118275
1 changed files with 12 additions and 6 deletions

View File

@ -208,13 +208,19 @@ static void pipeline_cmd_update(struct pipeline *p, struct comp_dev *comp,
case COMP_CMD_RELEASE:
p->xrun_bytes = 0;
/* schedule initial pipeline fill when next idle */
pipeline_schedule_copy_idle(p);
/* playback pipelines need scheduled now, capture pipelines are
* scheduled once their initial DMA period is filled by the DAI */
if (comp->params.direction == SOF_IPC_STREAM_PLAYBACK) {
/* schedule pipeline */
if (p->ipc_pipe.timer)
/* pipelines are either scheduled by timers or DAI/DMA interrupts */
if (p->ipc_pipe.timer) {
/* timer - schedule initial copy */
pipeline_schedule_copy(p, 0);
} else {
/* DAI - schedule initial pipeline fill when next idle */
pipeline_schedule_copy_idle(p);
}
}
break;
case COMP_CMD_SUSPEND:
case COMP_CMD_RESUME: