pipeline: remove tracing invalid pipe/comp ids

In functions pipeline_buffer_connect and pipeline_comp_connect
I have removed possibility to make log with pipe/comp ids, because
pipeline ptr in struct comp_dev is not initialize until
connect_upstream or connect_downstream invocation.

fixes #562

Signed-off-by: Bartosz Kokoszko <bartoszx.kokoszko@linux.intel.com>
This commit is contained in:
Bartosz Kokoszko 2018-11-14 12:02:41 +01:00
parent 977fdd5701
commit db6d9fc3bb
3 changed files with 14 additions and 22 deletions

View File

@ -312,10 +312,11 @@ int pipeline_complete(struct pipeline *p)
}
/* connect component -> buffer */
int pipeline_comp_connect(struct pipeline *p, struct comp_dev *source_comp,
struct comp_buffer *sink_buffer)
int pipeline_comp_connect(struct comp_dev *source_comp,
struct comp_buffer *sink_buffer)
{
trace_pipe_with_ids(p, "pipeline_comp_connect()");
trace_pipe("pipeline: connect source comp %d -> sink buffer %d",
source_comp->comp.id, sink_buffer->ipc_buffer.comp.id);
/* connect source to buffer */
spin_lock(&source_comp->lock);
@ -327,18 +328,15 @@ int pipeline_comp_connect(struct pipeline *p, struct comp_dev *source_comp,
if (sink_buffer->source && sink_buffer->sink)
sink_buffer->connected = 1;
tracev_pipe_with_ids(p, "pipeline_comp_connect(), (source_comp->comp.id"
" << 16) | sink_buffer->ipc_buffer.comp.id = %08x",
(source_comp->comp.id << 16) |
sink_buffer->ipc_buffer.comp.id);
return 0;
}
/* connect buffer -> component */
int pipeline_buffer_connect(struct pipeline *p,
struct comp_buffer *source_buffer, struct comp_dev *sink_comp)
int pipeline_buffer_connect(struct comp_buffer *source_buffer,
struct comp_dev *sink_comp)
{
trace_pipe_with_ids(p, "pipeline_buffer_connect()");
trace_pipe("pipeline: connect source buffer %d -> sink comp %d",
source_buffer->ipc_buffer.comp.id, sink_comp->comp.id);
/* connect sink to buffer */
spin_lock(&sink_comp->lock);
@ -350,10 +348,6 @@ int pipeline_buffer_connect(struct pipeline *p,
if (source_buffer->source && source_buffer->sink)
source_buffer->connected = 1;
tracev_pipe_with_ids(p, "pipeline_buffer_connect(), (source_buffer->"
"ipc_buffer.comp.id << 16) | sink_comp->comp.id = "
"%08x", (source_buffer->ipc_buffer.comp.id << 16) |
sink_comp->comp.id);
return 0;
}

View File

@ -107,10 +107,10 @@ struct comp_buffer *buffer_new(struct sof_ipc_buffer *desc);
void buffer_free(struct comp_buffer *buffer);
/* insert component in pipeline */
int pipeline_comp_connect(struct pipeline *p, struct comp_dev *source_comp,
struct comp_buffer *sink_buffer);
int pipeline_buffer_connect(struct pipeline *p,
struct comp_buffer *source_buffer, struct comp_dev *sink_comp);
int pipeline_comp_connect(struct comp_dev *source_comp,
struct comp_buffer *sink_buffer);
int pipeline_buffer_connect(struct comp_buffer *source_buffer,
struct comp_dev *sink_comp);
int pipeline_complete(struct pipeline *p);
/* pipeline parameters */

View File

@ -230,12 +230,10 @@ int ipc_comp_connect(struct ipc *ipc,
/* check source and sink types */
if (icd_source->type == COMP_TYPE_BUFFER &&
icd_sink->type == COMP_TYPE_COMPONENT)
return pipeline_buffer_connect(icd_source->pipeline,
icd_source->cb, icd_sink->cd);
return pipeline_buffer_connect(icd_source->cb, icd_sink->cd);
else if (icd_source->type == COMP_TYPE_COMPONENT &&
icd_sink->type == COMP_TYPE_BUFFER)
return pipeline_comp_connect(icd_source->pipeline,
icd_source->cd, icd_sink->cb);
return pipeline_comp_connect(icd_source->cd, icd_sink->cb);
else {
trace_ipc_error("eCt");
trace_error_value(connect->source_id);