[Sound-open-firmware] [PATCH] pipeline: remove preloader.
Liam Girdwood
liam.r.girdwood at linux.intel.com
Fri Nov 10 21:24:38 CET 2017
preloader can cause some out of order pipeline periods and timestamps
wrt to host so remove.
Signed-off-by: Liam Girdwood <liam.r.girdwood at linux.intel.com>
---
src/audio/pipeline.c | 63 ----------------------------------------------------
1 file changed, 63 deletions(-)
diff --git a/src/audio/pipeline.c b/src/audio/pipeline.c
index 61d80b4..2b6f59e 100644
--- a/src/audio/pipeline.c
+++ b/src/audio/pipeline.c
@@ -478,57 +478,11 @@ static int component_op_upstream(struct op_data *op_data,
return err;
}
-/* preload all downstream components - locks held by caller */
-static int preload_downstream(struct comp_dev *start, struct comp_dev *current)
-{
- struct sof_ipc_comp_config *config = COMP_GET_CONFIG(current);
- struct list_item *clist;
- int i;
- int total = 0;
- int count = 0;
-
- tracev_pipe("PR-");
- tracev_value(current->comp.id);
-
- /* reached endpoint ? */
- if (current != start && current->is_endpoint)
- return 0;
-
- /* now preload the buffers */
- for (i = 0; i < config->preload_count; i++) {
- count = comp_preload(current);
-
- if (count < 0)
- return count;
- total += count;
- }
-
- /* now run this operation downstream */
- list_for_item(clist, ¤t->bsink_list) {
- struct comp_buffer *buffer;
-
- buffer = container_of(clist, struct comp_buffer, source_list);
-
- /* don't go downstream if this component is not connected */
- if (!buffer->connected)
- continue;
-
- count = preload_downstream(start, buffer->sink);
- if (count < 0)
- return count;
-
- total += count;
- }
-
- return total;
-}
-
/* prepare the pipeline for usage - preload host buffers here */
int pipeline_prepare(struct pipeline *p, struct comp_dev *dev)
{
struct op_data op_data;
int ret = -1;
- int i;
trace_pipe("pre");
@@ -540,27 +494,10 @@ int pipeline_prepare(struct pipeline *p, struct comp_dev *dev)
/* playback pipelines can be preloaded from host before trigger */
if (dev->params.direction == SOF_IPC_STREAM_PLAYBACK) {
- /* first of all prepare the pipeline */
ret = component_op_downstream(&op_data, dev, dev, NULL);
if (ret < 0)
goto out;
- /* then preload buffers - the buffers must be moved
- * downstream so that every component has full buffers for
- * trigger start */
- for (i = 0; i < MAX_PRELOAD_SIZE; i++) {
-
- ret = preload_downstream(dev, dev);
-
- /* errors or complete ? */
- if (ret <= 0)
- break;
- }
- if (ret < 0) {
- /* failed to preload */
- trace_pipe_error("epl");
- ret = -EIO;
- }
} else {
ret = component_op_upstream(&op_data, dev, dev, NULL);
}
--
2.11.0
More information about the Sound-open-firmware
mailing list