Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinszkudlinski committed Nov 18, 2024
1 parent d5a0785 commit 7072bcc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 23 deletions.
1 change: 0 additions & 1 deletion src/ipc/ipc4/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,6 @@ int ipc_comp_disconnect(struct ipc *ipc, ipc_pipe_comp_connect *_connect)
struct comp_buffer *buffer = NULL;
struct comp_buffer *buf;
struct comp_dev *src, *sink;
struct list_item *sink_list;
uint32_t src_id, sink_id, buffer_id;
uint32_t flags = 0;
int ret, ret1;
Expand Down
24 changes: 12 additions & 12 deletions test/cmocka/src/audio/pipeline/pipeline_connect_upstream.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ static void test_audio_pipeline_complete_connect_downstream_ignore_sink
*and first has no upstream components
*/
list_item_append(&result.sched_comp->bsink_list,
&test_data->b1->source_list);
list_item_append(&test_data->b1->source_list,
&test_data->b1->Xsource_list);
list_item_append(&test_data->b1->Xsource_list,
&result.sched_comp->bsink_list);
list_item_append(&test_data->b1->sink_list,
list_item_append(&test_data->b1->Xsink_list,
&test_data->second->bsource_list);

/*Testing component*/
Expand All @@ -128,13 +128,13 @@ static void test_audio_pipeline_complete_connect_upstream_ignore_source
*and first has no downstream components
*/
list_item_append(&result.sched_comp->bsource_list,
&test_data->b1->sink_list);
&test_data->b1->Xsink_list);
test_data->b1->sink = result.sched_comp;
test_data->b1->source = test_data->second;
list_item_append(&test_data->b1->source_list,
list_item_append(&test_data->b1->Xsource_list,
&test_data->second->bsink_list);
list_item_append(&test_data->second->bsource_list,
&test_data->b2->sink_list);
&test_data->b2->Xsink_list);
test_data->b2->sink = test_data->second;

/*Testing component*/
Expand All @@ -157,12 +157,12 @@ static void test_audio_pipeline_complete_connect_downstream_full(void **state)
comp = &test_data->second->ipc_config;
comp->pipeline_id = PIPELINE_ID_SAME;
list_item_append(&result.sched_comp->bsink_list,
&test_data->b1->source_list);
&test_data->b1->Xsource_list);
test_data->b1->source = result.sched_comp;
list_item_append(&test_data->b1->source_list,
list_item_append(&test_data->b1->Xsource_list,
&result.sched_comp->bsink_list);
test_data->b1->sink = test_data->second;
list_item_append(&test_data->b1->sink_list,
list_item_append(&test_data->b1->Xsink_list,
&test_data->second->bsource_list);

test_data->first->frames = 0;
Expand All @@ -188,7 +188,7 @@ static void test_audio_pipeline_complete_connect_upstream_full(void **state)
comp = &test_data->second->ipc_config;
comp->pipeline_id = PIPELINE_ID_SAME;
list_item_append(&result.sched_comp->bsource_list,
&test_data->b1->sink_list);
&test_data->b1->Xsink_list);
test_data->b1->sink = test_data->first;
test_data->b1->source = test_data->second;

Expand All @@ -213,11 +213,11 @@ static void test_audio_pipeline_complete_connect_upstream_other_pipeline
comp = &test_data->second->ipc_config;
comp->pipeline_id = PIPELINE_ID_DIFFERENT;
list_item_append(&result.sched_comp->bsource_list,
&test_data->b1->sink_list);
&test_data->b1->Xsink_list);
test_data->b1->sink = test_data->first;
test_data->b1->source = test_data->second;
list_item_append(&test_data->second->bsource_list,
&test_data->b1->source_list);
&test_data->b1->Xsource_list);

/*Testing component*/
pipeline_complete(&result, test_data->first, test_data->second);
Expand Down
16 changes: 8 additions & 8 deletions test/cmocka/src/audio/pipeline/pipeline_connection_mocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ void cleanup_test_data(struct pipeline_connect_data *data)
{
list_init(&data->first->bsource_list);
list_init(&data->second->bsource_list);
list_init(&data->b1->sink_list);
list_init(&data->b1->source_list);
list_init(&data->b1->Xsink_list);
list_init(&data->b1->Xsource_list);
list_init(&data->first->bsink_list);
list_init(&data->second->bsink_list);
list_init(&data->b2->sink_list);
list_init(&data->b2->source_list);
list_init(&data->b2->Xsink_list);
list_init(&data->b2->Xsource_list);
}

struct pipeline_connect_data *get_standard_connect_objects(void)
Expand Down Expand Up @@ -72,15 +72,15 @@ struct pipeline_connect_data *get_standard_connect_objects(void)

buffer->source = first;
buffer->sink = second;
list_init(&buffer->sink_list);
list_init(&buffer->source_list);
list_init(&buffer->Xsink_list);
list_init(&buffer->Xsource_list);
pipeline_connect_data->b1 = buffer;

struct comp_buffer *buffer_2 = calloc(sizeof(struct comp_buffer), 1);

buffer_2->source = second;
list_init(&buffer_2->sink_list);
list_init(&buffer_2->source_list);
list_init(&buffer_2->Xsink_list);
list_init(&buffer_2->Xsource_list);
pipeline_connect_data->b2 = buffer_2;

pipeline_connect_data->p = *pipe;
Expand Down
4 changes: 2 additions & 2 deletions test/cmocka/src/util.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static inline struct comp_buffer *create_test_sink(struct comp_dev *dev,

/* set bsink list */
if (dev)
list_item_append(&buffer->source_list, &dev->bsink_list);
list_item_append(&buffer->Xsource_list, &dev->bsink_list);

/* alloc sink and set default parameters */
buffer->sink = calloc(1, sizeof(struct comp_dev));
Expand Down Expand Up @@ -64,7 +64,7 @@ static inline struct comp_buffer *create_test_source(struct comp_dev *dev,

/*set bsource list */
if (dev)
list_item_append(&buffer->sink_list, &dev->bsource_list);
list_item_append(&buffer->Xsink_list, &dev->bsource_list);

/* alloc source and set default parameters */
buffer->source = calloc(1, sizeof(struct comp_dev));
Expand Down

0 comments on commit 7072bcc

Please sign in to comment.