Skip to content
Open
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
10 changes: 0 additions & 10 deletions src/audio/module_adapter/module_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,6 @@ int module_adapter_prepare(struct comp_dev *dev)
buff_size, memory_flags,
PLATFORM_DCACHE_ALIGN,
BUFFER_USAGE_NOT_SHARED);
uint32_t flags;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to follow the flow along the lines of:
ipc4_user_process_glb_message() ->
ipc4_set_pipeline_state() ->
ipc4_pipeline_prepare() ->
switch (status) {
case COMP_STATE_READY:
ipc4_pcm_params() ->
pipeline_prepare() ->
pipeline_comp_prepare() ->
comp_prepare() ->
module_adapter_prepare()...
so, yes, looks like this won't run if the pipeline is already running


if (!buffer) {
comp_err(dev, "failed to allocate local buffer");
Expand All @@ -650,9 +649,7 @@ int module_adapter_prepare(struct comp_dev *dev)

vregion_get(md->resources.alloc->vreg);

irq_local_disable(flags);
list_item_prepend(&buffer->buffers_list, &mod->raw_data_buffers_list);
irq_local_enable(flags);

buffer_set_params(buffer, mod->stream_params, BUFFER_UPDATE_FORCE);
audio_buffer_reset(&buffer->audio_buffer);
Expand Down Expand Up @@ -682,11 +679,8 @@ int module_adapter_prepare(struct comp_dev *dev)
list_for_item_safe(blist, _blist, &mod->raw_data_buffers_list) {
struct comp_buffer *buffer = container_of(blist, struct comp_buffer,
buffers_list);
uint32_t flags;

irq_local_disable(flags);
list_item_del(&buffer->buffers_list);
irq_local_enable(flags);
buffer_free(buffer);
}

Expand Down Expand Up @@ -1474,11 +1468,7 @@ void module_adapter_free(struct comp_dev *dev)
list_for_item_safe(blist, _blist, &mod->raw_data_buffers_list) {
struct comp_buffer *buffer = container_of(blist, struct comp_buffer,
buffers_list);
uint32_t flags;

irq_local_disable(flags);
list_item_del(&buffer->buffers_list);
irq_local_enable(flags);
buffer_free(buffer);
}

Expand Down
Loading