From e393c7be3ac2553aa3f9c0b8527fffc9e6dc9fc7 Mon Sep 17 00:00:00 2001 From: Marcin Szkudlinski Date: Fri, 1 Sep 2023 10:09:42 +0200 Subject: [PATCH] tez do wywalenia --- src/audio/module_adapter/module_adapter.c | 12 ++++++------ .../audio/module_adapter/module/module_interface.h | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/audio/module_adapter/module_adapter.c b/src/audio/module_adapter/module_adapter.c index b2f98d224c63..53b11fb5980c 100644 --- a/src/audio/module_adapter/module_adapter.c +++ b/src/audio/module_adapter/module_adapter.c @@ -405,7 +405,7 @@ int module_adapter_prepare(struct comp_dev *dev) size_t size = MAX(mod->deep_buff_bytes, mod->period_bytes); mod->input_buffers[i].data = - (void *)rballoc(0, SOF_MEM_CAPS_RAM, size); + (__sparse_force void __sparse_cache *)rballoc(0, SOF_MEM_CAPS_RAM, size); if (!mod->input_buffers[i].data) { comp_err(mod->dev, "module_adapter_prepare(): Failed to alloc input buffer data"); ret = -ENOMEM; @@ -418,7 +418,7 @@ int module_adapter_prepare(struct comp_dev *dev) i = 0; list_for_item(blist, &dev->bsink_list) { mod->output_buffers[i].data = - (void *)rballoc(0, SOF_MEM_CAPS_RAM, + (__sparse_force void __sparse_cache *)rballoc(0, SOF_MEM_CAPS_RAM, md->mpd.out_buff_size); if (!mod->output_buffers[i].data) { comp_err(mod->dev, "module_adapter_prepare(): Failed to alloc output buffer data"); @@ -545,8 +545,8 @@ int module_adapter_params(struct comp_dev *dev, struct sof_ipc_stream_params *pa * @bytes: number of bytes available in the source buffer */ static void -ca_copy_from_source_to_module(const struct audio_stream *source, - void *buff, uint32_t buff_size, size_t bytes) +ca_copy_from_source_to_module(const struct audio_stream __sparse_cache *source, + void __sparse_cache *buff, uint32_t buff_size, size_t bytes) { /* head_size - available data until end of source buffer */ const int without_wrap = audio_stream_bytes_without_wrap(source, @@ -573,8 +573,8 @@ ca_copy_from_source_to_module(const struct audio_stream *source, * @bytes: number of bytes available in the module output buffer */ static void -ca_copy_from_module_to_sink(const struct audio_stream *sink, - void *buff, size_t bytes) +ca_copy_from_module_to_sink(const struct audio_stream __sparse_cache *sink, + void __sparse_cache *buff, size_t bytes) { /* head_size - free space until end of sink buffer */ const int without_wrap = audio_stream_bytes_without_wrap(sink, audio_stream_get_wptr(sink)); diff --git a/src/include/sof/audio/module_adapter/module/module_interface.h b/src/include/sof/audio/module_adapter/module/module_interface.h index fab3cefdc0ef..5a4e27c354f7 100644 --- a/src/include/sof/audio/module_adapter/module/module_interface.h +++ b/src/include/sof/audio/module_adapter/module/module_interface.h @@ -50,7 +50,7 @@ enum module_processing_mode { * \brief Input stream buffer */ struct input_stream_buffer { - void *data; /* data stream buffer */ + void __sparse_cache *data; /* data stream buffer */ uint32_t size; /* size of data in the buffer */ uint32_t consumed; /* number of bytes consumed by the module */ @@ -63,7 +63,7 @@ struct input_stream_buffer { * \brief Output stream buffer */ struct output_stream_buffer { - void *data; /* data stream buffer */ + void __sparse_cache *data; /* data stream buffer */ uint32_t size; /* size of data in the buffer */ };