diff --git a/src/audio/buffers/comp_buffer.c b/src/audio/buffers/comp_buffer.c index 62f90bd2b5c9..64c3e089a110 100644 --- a/src/audio/buffers/comp_buffer.c +++ b/src/audio/buffers/comp_buffer.c @@ -212,8 +212,8 @@ static struct comp_buffer *buffer_alloc_struct(void *stream_addr, size_t size, u audio_stream_set_underrun(&buffer->stream, !!(flags & SOF_BUF_UNDERRUN_PERMITTED)); audio_stream_set_overrun(&buffer->stream, !!(flags & SOF_BUF_OVERRUN_PERMITTED)); - list_init(&buffer->source_list); - list_init(&buffer->sink_list); + list_init(&buffer->Xsource_list); + list_init(&buffer->Xsink_list); return buffer; } diff --git a/src/audio/module_adapter/module_adapter.c b/src/audio/module_adapter/module_adapter.c index 116a744c4113..8cae6f0b92cc 100644 --- a/src/audio/module_adapter/module_adapter.c +++ b/src/audio/module_adapter/module_adapter.c @@ -230,7 +230,7 @@ int module_adapter_prepare(struct comp_dev *dev) /* Get period_bytes first on prepare(). At this point it is guaranteed that the stream * parameter from sink buffer is settled, and still prior to all references to period_bytes. */ - sink = list_first_item(&dev->bsink_list, struct comp_buffer, source_list); + sink = list_first_item(&dev->bsink_list, struct comp_buffer, Xsource_list); mod->period_bytes = audio_stream_period_bytes(&sink->stream, dev->frames); comp_dbg(dev, "module_adapter_prepare(): got period_bytes = %u", mod->period_bytes); @@ -390,7 +390,7 @@ int module_adapter_prepare(struct comp_dev *dev) } else { list_for_item(blist, &mod->sink_buffer_list) { struct comp_buffer *buffer = container_of(blist, struct comp_buffer, - sink_list); + Xsink_list); ret = buffer_set_size(buffer, buff_size, 0); if (ret < 0) { @@ -411,7 +411,7 @@ int module_adapter_prepare(struct comp_dev *dev) free: list_for_item_safe(blist, _blist, &mod->sink_buffer_list) { struct comp_buffer *buffer = container_of(blist, struct comp_buffer, - sink_list); + Xsink_list); uint32_t flags; irq_local_disable(flags); @@ -610,7 +610,7 @@ static void module_adapter_process_output(struct comp_dev *dev) if (mod->output_buffers[i].size > 0) { struct comp_buffer *buffer; - buffer = container_of(blist, struct comp_buffer, sink_list); + buffer = container_of(blist, struct comp_buffer, Xsink_list); ca_copy_from_module_to_sink(&buffer->stream, mod->output_buffers[i].data, mod->output_buffers[i].size); @@ -629,8 +629,8 @@ static void module_adapter_process_output(struct comp_dev *dev) if (i == j) { struct comp_buffer *source; - sink = container_of(blist, struct comp_buffer, source_list); - source = container_of(_blist, struct comp_buffer, sink_list); + sink = container_of(blist, struct comp_buffer, Xsource_list); + source = container_of(_blist, struct comp_buffer, Xsink_list); module_copy_samples(dev, source, sink, mod->output_buffers[i].size); @@ -756,7 +756,7 @@ static int module_adapter_audio_stream_copy_1to1(struct comp_dev *dev) /* Note: Source buffer state is not checked to enable mixout to generate zero * PCM codes when source is not active. */ - if (mod->sink_comp_buffer->sink->state == dev->state) + if (mod->sink_comp_buffer->sinkX->state == dev->state) num_output_buffers = 1; ret = module_process_legacy(mod, mod->input_buffers, 1, @@ -799,7 +799,7 @@ static int module_adapter_audio_stream_type_copy(struct comp_dev *dev) list_for_item(blist, &dev->bsink_list) { struct comp_buffer *sink; - sink = container_of(blist, struct comp_buffer, source_list); + sink = container_of(blist, struct comp_buffer, Xsource_list); sinks[i++] = sink; } num_output_buffers = i; @@ -812,7 +812,7 @@ static int module_adapter_audio_stream_type_copy(struct comp_dev *dev) list_for_item(blist, &dev->bsource_list) { struct comp_buffer *source; - source = container_of(blist, struct comp_buffer, sink_list); + source = container_of(blist, struct comp_buffer, Xsink_list); sources[i++] = source; } num_input_buffers = i; @@ -824,11 +824,11 @@ static int module_adapter_audio_stream_type_copy(struct comp_dev *dev) /* setup active input/output buffers for processing */ if (num_output_buffers == 1) { module_single_sink_setup(dev, sources, sinks); - if (sinks[0]->sink->state != dev->state) + if (sinks[0]->sinkX->state != dev->state) num_output_buffers = 0; } else if (num_input_buffers == 1) { module_single_source_setup(dev, sources, sinks); - if (sources[0]->source->state != dev->state) { + if (sources[0]->sourceX->state != dev->state) { num_input_buffers = 0; } } else { @@ -918,7 +918,7 @@ static int module_adapter_copy_ring_buffers(struct comp_dev *dev) * to ring_buffer (as sink) */ struct comp_buffer *buffer = - container_of(blist, struct comp_buffer, sink_list); + container_of(blist, struct comp_buffer, Xsink_list); err = audio_buffer_sync_secondary_buffer(&buffer->audio_buffer, UINT_MAX); if (err) { @@ -944,7 +944,7 @@ static int module_adapter_copy_ring_buffers(struct comp_dev *dev) * FIX: copy only the following module's IBS in each LL cycle */ struct comp_buffer *buffer = - container_of(blist, struct comp_buffer, source_list); + container_of(blist, struct comp_buffer, Xsource_list); struct sof_source *following_mod_data_source = audio_buffer_get_source(&buffer->audio_buffer); @@ -1014,7 +1014,7 @@ static int module_adapter_raw_data_type_copy(struct comp_dev *dev) comp_dbg(dev, "module_adapter_raw_data_type_copy(): start"); list_for_item(blist, &mod->sink_buffer_list) { - sink = container_of(blist, struct comp_buffer, sink_list); + sink = container_of(blist, struct comp_buffer, Xsink_list); min_free_frames = MIN(min_free_frames, audio_stream_get_free_frames(&sink->stream)); @@ -1025,10 +1025,10 @@ static int module_adapter_raw_data_type_copy(struct comp_dev *dev) uint32_t bytes_to_process; int frames, source_frame_bytes; - source = container_of(blist, struct comp_buffer, sink_list); + source = container_of(blist, struct comp_buffer, Xsink_list); /* check if the source dev is in the same state as the dev */ - if (!source->source || source->source->state != dev->state) + if (!source->sourceX || source->sourceX->state != dev->state) continue; frames = MIN(min_free_frames, @@ -1063,7 +1063,7 @@ static int module_adapter_raw_data_type_copy(struct comp_dev *dev) /* consume from all input buffers */ list_for_item(blist, &dev->bsource_list) { - source = container_of(blist, struct comp_buffer, sink_list); + source = container_of(blist, struct comp_buffer, Xsink_list); comp_update_buffer_consume(source, mod->input_buffers[i].consumed); @@ -1181,7 +1181,7 @@ int module_adapter_reset(struct comp_dev *dev) list_for_item(blist, &mod->sink_buffer_list) { struct comp_buffer *buffer = container_of(blist, struct comp_buffer, - sink_list); + Xsink_list); buffer_zero(buffer); } @@ -1208,7 +1208,7 @@ void module_adapter_free(struct comp_dev *dev) list_for_item_safe(blist, _blist, &mod->sink_buffer_list) { struct comp_buffer *buffer = container_of(blist, struct comp_buffer, - sink_list); + Xsink_list); uint32_t flags; irq_local_disable(flags); diff --git a/src/audio/module_adapter/module_adapter_ipc3.c b/src/audio/module_adapter/module_adapter_ipc3.c index 5adc3079708c..52dadd4fd9f0 100644 --- a/src/audio/module_adapter/module_adapter_ipc3.c +++ b/src/audio/module_adapter/module_adapter_ipc3.c @@ -122,7 +122,7 @@ void module_adapter_check_data(struct processing_module *mod, struct comp_dev *d if (IS_PROCESSING_MODE_AUDIO_STREAM(mod) && mod->num_of_sources == 1 && mod->num_of_sinks == 1) { mod->source_comp_buffer = list_first_item(&dev->bsource_list, - struct comp_buffer, sink_list); + struct comp_buffer, Xsink_list); mod->sink_comp_buffer = sink; mod->stream_copy_single_to_single = true; } @@ -147,9 +147,9 @@ static int module_source_status_count(struct comp_dev *dev, uint32_t status) * current one. */ struct comp_buffer *source = container_of(blist, struct comp_buffer, - sink_list); + Xsink_list); - if (source->source && source->source->state == status) + if (source->sourceX && source->sourceX->state == status) count++; } @@ -332,7 +332,7 @@ int module_adapter_sink_src_prepare(struct comp_dev *dev) i = 0; list_for_item(blist, &dev->bsink_list) { struct comp_buffer *sink_buffer = - container_of(blist, struct comp_buffer, source_list); + container_of(blist, struct comp_buffer, Xsource_list); mod->sinks[i] = audio_buffer_get_sink(&sink_buffer->audio_buffer); i++; } @@ -341,7 +341,7 @@ int module_adapter_sink_src_prepare(struct comp_dev *dev) i = 0; list_for_item(blist, &dev->bsource_list) { struct comp_buffer *source_buffer = - container_of(blist, struct comp_buffer, sink_list); + container_of(blist, struct comp_buffer, Xsink_list); mod->sources[i] = audio_buffer_get_source(&source_buffer->audio_buffer); i++; diff --git a/src/audio/module_adapter/module_adapter_ipc4.c b/src/audio/module_adapter/module_adapter_ipc4.c index 060cef446f73..4c7ef2aa76bf 100644 --- a/src/audio/module_adapter/module_adapter_ipc4.c +++ b/src/audio/module_adapter/module_adapter_ipc4.c @@ -194,7 +194,7 @@ static bool module_adapter_multi_sink_source_prepare(struct comp_dev *dev) i = 0; list_for_item(blist, &dev->bsink_list) { struct comp_buffer *sink_buffer = - container_of(blist, struct comp_buffer, source_list); + container_of(blist, struct comp_buffer, Xsource_list); mod->sinks[i] = audio_buffer_get_sink(&sink_buffer->audio_buffer); i++; } @@ -203,7 +203,7 @@ static bool module_adapter_multi_sink_source_prepare(struct comp_dev *dev) i = 0; list_for_item(blist, &dev->bsource_list) { struct comp_buffer *source_buffer = - container_of(blist, struct comp_buffer, sink_list); + container_of(blist, struct comp_buffer, Xsink_list); mod->sources[i] = audio_buffer_get_source(&source_buffer->audio_buffer); i++; @@ -216,9 +216,9 @@ static bool module_adapter_multi_sink_source_prepare(struct comp_dev *dev) return true; /* re-assign the source/sink modules */ - mod->sink_comp_buffer = list_first_item(&dev->bsink_list, struct comp_buffer, source_list); + mod->sink_comp_buffer = list_first_item(&dev->bsink_list, struct comp_buffer, Xsource_list); mod->source_comp_buffer = list_first_item(&dev->bsource_list, - struct comp_buffer, sink_list); + struct comp_buffer, Xsink_list); return false; } diff --git a/src/audio/pipeline/pipeline-graph.c b/src/audio/pipeline/pipeline-graph.c index 7abc5ed8c461..ff87dd5f75cc 100644 --- a/src/audio/pipeline/pipeline-graph.c +++ b/src/audio/pipeline/pipeline-graph.c @@ -167,9 +167,9 @@ static void buffer_set_comp(struct comp_buffer *buffer, struct comp_dev *comp, int dir) { if (dir == PPL_CONN_DIR_COMP_TO_BUFFER) - buffer->source = comp; + buffer->sourceX = comp; else - buffer->sink = comp; + buffer->sinkX = comp; } int pipeline_connect(struct comp_dev *comp, struct comp_buffer *buffer, diff --git a/src/include/sof/audio/buffer.h b/src/include/sof/audio/buffer.h index eafe9d1cd190..cf1fde6a3662 100644 --- a/src/include/sof/audio/buffer.h +++ b/src/include/sof/audio/buffer.h @@ -135,12 +135,12 @@ struct comp_buffer { struct tr_ctx tctx; /* trace settings */ /* connected components */ - struct comp_dev *source; /* source component */ - struct comp_dev *sink; /* sink component */ + struct comp_dev *sourceX; /* source component */ + struct comp_dev *sinkX; /* sink component */ /* lists */ - struct list_item source_list; /* list in comp buffers */ - struct list_item sink_list; /* list in comp buffers */ + struct list_item Xsource_list; /* list in comp buffers */ + struct list_item Xsink_list; /* list in comp buffers */ }; /* @@ -148,7 +148,7 @@ struct comp_buffer { */ static inline struct comp_dev *comp_buffer_get_source_component(const struct comp_buffer *buffer) { - return buffer->source; + return buffer->sourceX; } /* @@ -156,7 +156,7 @@ static inline struct comp_dev *comp_buffer_get_source_component(const struct com */ static inline struct comp_dev *comp_buffer_get_sink_component(const struct comp_buffer *buffer) { - return buffer->sink; + return buffer->sinkX; } /* Only to be used for synchronous same-core notifications! */ @@ -171,13 +171,13 @@ struct buffer_cb_free { }; #define buffer_comp_list(buffer, dir) \ - ((dir) == PPL_DIR_DOWNSTREAM ? &buffer->source_list : \ - &buffer->sink_list) + ((dir) == PPL_DIR_DOWNSTREAM ? &buffer->Xsource_list : \ + &buffer->Xsink_list) #define buffer_from_list(ptr, dir) \ ((dir) == PPL_DIR_DOWNSTREAM ? \ - container_of(ptr, struct comp_buffer, source_list) : \ - container_of(ptr, struct comp_buffer, sink_list)) + container_of(ptr, struct comp_buffer, Xsource_list) : \ + container_of(ptr, struct comp_buffer, Xsink_list)) #define buffer_set_cb(buffer, func, data, type) \ do { \ diff --git a/src/include/sof/audio/component.h b/src/include/sof/audio/component.h index eb5253bffa15..632c1168b9e4 100644 --- a/src/include/sof/audio/component.h +++ b/src/include/sof/audio/component.h @@ -643,7 +643,7 @@ struct comp_dev { static inline struct comp_buffer *comp_dev_get_first_data_producer(struct comp_dev *component) { return list_is_empty(&component->bsource_list) ? NULL : - list_first_item(&component->bsource_list, struct comp_buffer, sink_list); + list_first_item(&component->bsource_list, struct comp_buffer, Xsink_list); } /** @@ -653,8 +653,8 @@ static inline struct comp_buffer *comp_dev_get_first_data_producer(struct comp_d static inline struct comp_buffer *comp_dev_get_next_data_producer(struct comp_dev *component, struct comp_buffer *producer) { - return producer->sink_list.next == &component->bsource_list ? NULL : - list_item(producer->sink_list.next, struct comp_buffer, sink_list); + return producer->Xsink_list.next == &component->bsource_list ? NULL : + list_item(producer->Xsink_list.next, struct comp_buffer, Xsink_list); } /** @@ -664,7 +664,7 @@ static inline struct comp_buffer *comp_dev_get_next_data_producer(struct comp_de static inline struct comp_buffer *comp_dev_get_first_data_consumer(struct comp_dev *component) { return list_is_empty(&component->bsink_list) ? NULL : - list_first_item(&component->bsink_list, struct comp_buffer, source_list); + list_first_item(&component->bsink_list, struct comp_buffer, Xsource_list); } /** @@ -674,8 +674,8 @@ static inline struct comp_buffer *comp_dev_get_first_data_consumer(struct comp_d static inline struct comp_buffer *comp_dev_get_next_data_consumer(struct comp_dev *component, struct comp_buffer *consumer) { - return consumer->source_list.next == &component->bsink_list ? NULL : - list_item(consumer->source_list.next, struct comp_buffer, source_list); + return consumer->Xsource_list.next == &component->bsink_list ? NULL : + list_item(consumer->Xsource_list.next, struct comp_buffer, Xsource_list); } /* diff --git a/src/ipc/ipc-helper.c b/src/ipc/ipc-helper.c index 1e27c701899f..cde144ed0cdf 100644 --- a/src/ipc/ipc-helper.c +++ b/src/ipc/ipc-helper.c @@ -138,11 +138,11 @@ int comp_verify_params(struct comp_dev *dev, uint32_t flag, if (list_is_empty(sink_list)) buf = list_first_item(source_list, struct comp_buffer, - sink_list); + Xsink_list); else buf = list_first_item(sink_list, struct comp_buffer, - source_list); + Xsource_list); /* update specific pcm parameter with buffer parameter if * specific flag is set. @@ -170,7 +170,7 @@ int comp_verify_params(struct comp_dev *dev, uint32_t flag, /* fetch sink buffer in order to calculate period frames */ sinkb = list_first_item(&dev->bsink_list, struct comp_buffer, - source_list); + Xsource_list); component_set_nearest_period_frames(dev, audio_stream_get_rate(&sinkb->stream)); } @@ -306,9 +306,9 @@ int ipc_comp_free(struct ipc *ipc, uint32_t comp_id) irq_local_disable(flags); list_for_item_safe(clist, tmp, &icd->cd->bsource_list) { - struct comp_buffer *buffer = container_of(clist, struct comp_buffer, sink_list); + struct comp_buffer *buffer = container_of(clist, struct comp_buffer, Xsink_list); - buffer->sink = NULL; + buffer->sinkX = NULL; /* Also if it isn't shared - we are about to modify uncached data */ dcache_writeback_invalidate_region(uncache_to_cache(buffer), sizeof(*buffer)); @@ -317,9 +317,9 @@ int ipc_comp_free(struct ipc *ipc, uint32_t comp_id) } list_for_item_safe(clist, tmp, &icd->cd->bsink_list) { - struct comp_buffer *buffer = container_of(clist, struct comp_buffer, source_list); + struct comp_buffer *buffer = container_of(clist, struct comp_buffer, Xsource_list); - buffer->source = NULL; + buffer->sourceX = NULL; /* Also if it isn't shared - we are about to modify uncached data */ dcache_writeback_invalidate_region(uncache_to_cache(buffer), sizeof(*buffer)); diff --git a/src/ipc/ipc3/handler.c b/src/ipc/ipc3/handler.c index 1a4ca43d70fe..32be1cf5e154 100644 --- a/src/ipc/ipc3/handler.c +++ b/src/ipc/ipc3/handler.c @@ -148,19 +148,19 @@ static bool is_hostless_downstream(struct comp_dev *current) list_for_item(clist, ¤t->bsink_list) { struct comp_buffer *buffer; - buffer = container_of(clist, struct comp_buffer, source_list); + buffer = container_of(clist, struct comp_buffer, Xsource_list); /* don't go downstream if this component is not connected */ - if (!buffer->sink) + if (!buffer->sinkX) continue; /* dont go downstream if this comp belongs to another pipe */ - if (buffer->sink->ipc_config.pipeline_id != + if (buffer->sinkX->ipc_config.pipeline_id != current->ipc_config.pipeline_id) continue; /* return if there's a host comp downstream */ - if (!is_hostless_downstream(buffer->sink)) + if (!is_hostless_downstream(buffer->sinkX)) return false; } @@ -181,19 +181,19 @@ static bool is_hostless_upstream(struct comp_dev *current) list_for_item(clist, ¤t->bsource_list) { struct comp_buffer *buffer; - buffer = container_of(clist, struct comp_buffer, sink_list); + buffer = container_of(clist, struct comp_buffer, Xsink_list); /* don't go upstream if this component is not connected */ - if (!buffer->source) + if (!buffer->sourceX) continue; /* dont go upstream if this comp belongs to another pipeline */ - if (buffer->source->ipc_config.pipeline_id != + if (buffer->sourceX->ipc_config.pipeline_id != current->ipc_config.pipeline_id) continue; /* return if there is a host comp upstream */ - if (!is_hostless_upstream(buffer->source)) + if (!is_hostless_upstream(buffer->sourceX)) return false; } diff --git a/src/ipc/ipc3/helper.c b/src/ipc/ipc3/helper.c index 678d3306e4b1..b4e045198f9e 100644 --- a/src/ipc/ipc3/helper.c +++ b/src/ipc/ipc3/helper.c @@ -535,15 +535,15 @@ int ipc_buffer_free(struct ipc *ipc, uint32_t buffer_id) continue; /* check comp state if sink and source are valid */ - if (ibd->cb->sink == icd->cd) { - sink = ibd->cb->sink; - if (ibd->cb->sink->state != COMP_STATE_READY) + if (ibd->cb->sinkX == icd->cd) { + sink = ibd->cb->sinkX; + if (ibd->cb->sinkX->state != COMP_STATE_READY) sink_active = true; } - if (ibd->cb->source == icd->cd) { - source = ibd->cb->source; - if (ibd->cb->source->state != COMP_STATE_READY) + if (ibd->cb->sourceX == icd->cd) { + source = ibd->cb->sourceX; + if (ibd->cb->sourceX->state != COMP_STATE_READY) source_active = true; } } diff --git a/src/ipc/ipc4/helper.c b/src/ipc/ipc4/helper.c index eb08414b323f..18d01812edf3 100644 --- a/src/ipc/ipc4/helper.c +++ b/src/ipc/ipc4/helper.c @@ -303,9 +303,9 @@ static int ipc_pipeline_module_free(uint32_t pipeline_id) list_for_item_safe(list, _list, &icd->cd->bsink_list) { struct comp_dev *sink; - buffer = container_of(list, struct comp_buffer, source_list); + buffer = container_of(list, struct comp_buffer, Xsource_list); pipeline_disconnect(icd->cd, buffer, PPL_CONN_DIR_COMP_TO_BUFFER); - sink = buffer->sink; + sink = buffer->sinkX; /* free the buffer only when the sink module has also been disconnected */ if (!sink) @@ -316,9 +316,9 @@ static int ipc_pipeline_module_free(uint32_t pipeline_id) list_for_item_safe(list, _list, &icd->cd->bsource_list) { struct comp_dev *source; - buffer = container_of(list, struct comp_buffer, sink_list); + buffer = container_of(list, struct comp_buffer, Xsink_list); pipeline_disconnect(icd->cd, buffer, PPL_CONN_DIR_BUFFER_TO_COMP); - source = buffer->source; + source = buffer->sourceX; /* free the buffer only when the source module has also been disconnected */ if (!source) @@ -709,7 +709,7 @@ int ipc_comp_disconnect(struct ipc *ipc, ipc_pipe_comp_connect *_connect) buffer_id = IPC4_COMP_ID(bu->extension.r.src_queue, bu->extension.r.dst_queue); list_for_item(sink_list, &src->bsink_list) { - struct comp_buffer *buf = container_of(sink_list, struct comp_buffer, source_list); + struct comp_buffer *buf = container_of(sink_list, struct comp_buffer, Xsource_list); bool found = buf_get_id(buf) == buffer_id; if (found) { @@ -851,9 +851,9 @@ static int ipc4_update_comps_direction(struct ipc *ipc, uint32_t ppl_id) if (list_is_empty(&icd->cd->bsource_list)) continue; - src_buf = list_first_item(&icd->cd->bsource_list, struct comp_buffer, sink_list); - if (src_buf->source->direction_set) { - icd->cd->direction = src_buf->source->direction; + src_buf = list_first_item(&icd->cd->bsource_list, struct comp_buffer, Xsink_list); + if (src_buf->sourceX->direction_set) { + icd->cd->direction = src_buf->sourceX->direction; icd->cd->direction_set = true; continue; }