Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/audio/asrc/asrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,11 +452,14 @@ static int asrc_dai_find(struct comp_dev *dev, struct comp_data *cd)
/* In push mode check if sink component is DAI */
do {
sinkb = comp_dev_get_first_data_consumer(dev);
if (!sinkb) {
comp_err(asrc_dev, "At end: NULL buffer, no DAI found.");
return -EINVAL;
}

dev = comp_buffer_get_sink_component(sinkb);

if (!dev) {
comp_err(asrc_dev, "At end, no DAI found.");
comp_err(asrc_dev, "At end: NULL device, no DAI found.");
return -EINVAL;
}

Expand All @@ -470,11 +473,14 @@ static int asrc_dai_find(struct comp_dev *dev, struct comp_data *cd)
/* In pull mode check if source component is DAI */
do {
sourceb = comp_dev_get_first_data_producer(dev);
if (!sourceb) {
comp_err(asrc_dev, "At beginning: NULL buffer, no DAI found.");
return -EINVAL;
}

dev = comp_buffer_get_source_component(sourceb);

if (!dev) {
comp_err(asrc_dev, "At beginning, no DAI found.");
comp_err(asrc_dev, "At beginning: NULL device, no DAI found.");
return -EINVAL;
}

Expand Down
6 changes: 6 additions & 0 deletions src/audio/selector/selector.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,8 +344,14 @@ static int selector_trigger(struct comp_dev *dev, int cmd)
comp_dbg(dev, "selector_trigger()");

sourceb = comp_dev_get_first_data_producer(dev);
if (!sourceb) {
comp_err(dev, "source disconnected");
return -ENODEV;
}

ret = comp_set_state(dev, cmd);
if (ret == COMP_STATUS_STATE_ALREADY_SET)
ret = 0;

/* TODO: remove in the future after adding support for case when
* kpb_init_draining() and kpb_draining_task() are interrupted by
Expand Down
8 changes: 7 additions & 1 deletion src/ipc/ipc3/helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,13 @@ int ipc_buffer_free(struct ipc *ipc, uint32_t buffer_id)
* core, the free must be run in the context of the active
* pipeline.
*/
active_comp = sink_active ? sink : source;
if (sink_active)
active_comp = sink;
else if (source_active)
active_comp = source;
else
active_comp = NULL;

if (active_comp) {
core = active_comp->ipc_config.core;

Expand Down
Loading