mirror of https://github.com/thesofproject/sof.git
ipc4: helper: use pipeline_disconnect during unbinding
Use pipeline_disconnect() to disconnect the source and sink components from the buffer between them to do this properly. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
This commit is contained in:
parent
0b7b3a5c7e
commit
d47add305d
|
@ -374,7 +374,6 @@ int ipc_comp_disconnect(struct ipc *ipc, ipc_pipe_comp_connect *_connect)
|
||||||
struct comp_dev *src, *sink;
|
struct comp_dev *src, *sink;
|
||||||
struct list_item *sink_list;
|
struct list_item *sink_list;
|
||||||
uint32_t src_id, sink_id, buffer_id;
|
uint32_t src_id, sink_id, buffer_id;
|
||||||
uint32_t flags;
|
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
bu = (struct ipc4_module_bind_unbind *)_connect;
|
bu = (struct ipc4_module_bind_unbind *)_connect;
|
||||||
|
@ -409,10 +408,8 @@ int ipc_comp_disconnect(struct ipc *ipc, ipc_pipe_comp_connect *_connect)
|
||||||
if (!buffer)
|
if (!buffer)
|
||||||
return IPC4_INVALID_RESOURCE_ID;
|
return IPC4_INVALID_RESOURCE_ID;
|
||||||
|
|
||||||
irq_local_disable(flags);
|
pipeline_disconnect(src, buffer, PPL_CONN_DIR_COMP_TO_BUFFER);
|
||||||
list_item_del(buffer_comp_list(buffer, PPL_CONN_DIR_COMP_TO_BUFFER));
|
pipeline_disconnect(sink, buffer, PPL_CONN_DIR_BUFFER_TO_COMP);
|
||||||
list_item_del(buffer_comp_list(buffer, PPL_CONN_DIR_BUFFER_TO_COMP));
|
|
||||||
irq_local_enable(flags);
|
|
||||||
|
|
||||||
buffer_free(buffer);
|
buffer_free(buffer);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue