Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module_adapter: Fix compilation error with Xtensa toolchain #7841

Closed
wants to merge 1 commit into from
Closed
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
12 changes: 6 additions & 6 deletions src/audio/module_adapter/module_adapter.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ static int module_adapter_sink_src_prepare(struct comp_dev *dev)
struct list_item *blist;
uint32_t num_of_sources = 0;
uint32_t num_of_sinks = 0;
int ret;
int ret, i;

/* acquire all sink and source buffers, get handlers to sink/source API */
list_for_item(blist, &dev->bsink_list) {
Expand Down Expand Up @@ -204,11 +204,11 @@ static int module_adapter_sink_src_prepare(struct comp_dev *dev)
ret = module_prepare(mod, audio_src, num_of_sources, audio_sink, num_of_sinks);

/* release all source buffers in reverse order */
for (int i = num_of_sources - 1; i >= 0; i--)
for (i = num_of_sources - 1; i >= 0; i--)
buffer_release(source_buffers_c[i]);

/* release all sink buffers in reverse order */
for (int i = num_of_sinks - 1; i >= 0 ; i--)
for (i = num_of_sinks - 1; i >= 0 ; i--)
buffer_release(sinks_buffers_c[i]);

return ret;
Expand Down Expand Up @@ -911,7 +911,7 @@ static int module_adapter_sink_source_copy(struct comp_dev *dev)
struct list_item *blist;
uint32_t num_of_sources = 0;
uint32_t num_of_sinks = 0;
int ret;
int ret, i;

comp_dbg(dev, "module_adapter_sink_source_copy(): start");

Expand Down Expand Up @@ -946,13 +946,13 @@ static int module_adapter_sink_source_copy(struct comp_dev *dev)
}

/* release all source buffers in reverse order */
for (int i = num_of_sources - 1; i >= 0; i--) {
for (i = num_of_sources - 1; i >= 0; i--) {
mod->total_data_consumed += source_get_num_of_processed_bytes(audio_src[i]);
buffer_release(source_buffers_c[i]);
}

/* release all sink buffers in reverse order */
for (int i = num_of_sinks - 1; i >= 0 ; i--) {
for (i = num_of_sinks - 1; i >= 0 ; i--) {
mod->total_data_produced += sink_get_num_of_processed_bytes(audio_sink[i]);
buffer_release(sinks_buffers_c[i]);
}
Expand Down