Skip to content

Commit

Permalink
remove sparse
Browse files Browse the repository at this point in the history
  • Loading branch information
marcinszkudlinski committed Sep 6, 2023
1 parent 8a9c445 commit 0f1286a
Show file tree
Hide file tree
Showing 124 changed files with 1,140 additions and 1,140 deletions.
10 changes: 5 additions & 5 deletions src/audio/aria/aria.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ static int aria_algo_init(struct aria_data *cd, void *buffer_desc,
}

static inline void aria_process_data(struct processing_module *mod,
struct audio_stream __sparse_cache *source,
struct audio_stream __sparse_cache *sink,
struct audio_stream *source,
struct audio_stream *sink,
size_t frames)
{
struct aria_data *cd = module_get_private_data(mod);
Expand Down Expand Up @@ -153,7 +153,7 @@ static int aria_free(struct processing_module *mod)
static void aria_set_stream_params(struct comp_buffer *buffer,
struct processing_module *mod)
{
struct comp_buffer __sparse_cache *buffer_c;
struct comp_buffer *buffer_c;
const struct ipc4_audio_format *audio_fmt = &mod->priv.cfg.base_cfg.audio_fmt;

buffer_c = buffer_acquire(buffer);
Expand All @@ -169,8 +169,8 @@ static void aria_set_stream_params(struct comp_buffer *buffer,
}

static int aria_prepare(struct processing_module *mod,
struct sof_source __sparse_cache **sources, int num_of_sources,
struct sof_sink __sparse_cache **sinks, int num_of_sinks)
struct sof_source **sources, int num_of_sources,
struct sof_sink **sinks, int num_of_sinks)
{
int ret;
struct comp_buffer *source, *sink;
Expand Down
4 changes: 2 additions & 2 deletions src/audio/aria/aria_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const uint8_t INDEX_TAB[] = {
};

inline void aria_algo_calc_gain(struct aria_data *cd, size_t gain_idx,
struct audio_stream __sparse_cache *source, int frames)
struct audio_stream *source, int frames)
{
int32_t max_data = 0;
int32_t sample_abs;
Expand Down Expand Up @@ -50,7 +50,7 @@ inline void aria_algo_calc_gain(struct aria_data *cd, size_t gain_idx,
}

void aria_algo_get_data(struct processing_module *mod,
struct audio_stream __sparse_cache *sink, int frames)
struct audio_stream *sink, int frames)
{
struct aria_data *cd = module_get_private_data(mod);
int32_t step, in_sample;
Expand Down
6 changes: 3 additions & 3 deletions src/audio/aria/aria_hifi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const uint8_t INDEX_TAB[] = {
};

inline void aria_algo_calc_gain(struct aria_data *cd, size_t gain_idx,
struct audio_stream __sparse_cache *source, int frames)
struct audio_stream *source, int frames)
{
/* detecting maximum value in data chunk */
ae_int32x2 in_sample;
Expand Down Expand Up @@ -61,7 +61,7 @@ inline void aria_algo_calc_gain(struct aria_data *cd, size_t gain_idx,
}

void aria_algo_get_data_odd_channel(struct processing_module *mod,
struct audio_stream __sparse_cache *sink,
struct audio_stream *sink,
int frames)
{
struct aria_data *cd = module_get_private_data(mod);
Expand Down Expand Up @@ -118,7 +118,7 @@ void aria_algo_get_data_odd_channel(struct processing_module *mod,
}

void aria_algo_get_data_even_channel(struct processing_module *mod,
struct audio_stream __sparse_cache *sink,
struct audio_stream *sink,
int frames)
{
struct aria_data *cd = module_get_private_data(mod);
Expand Down
24 changes: 12 additions & 12 deletions src/audio/asrc/asrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
#define COEF_C2 Q_CONVERT_FLOAT(0.99, 30)

typedef void (*asrc_proc_func)(struct comp_dev *dev,
const struct audio_stream __sparse_cache *source,
struct audio_stream __sparse_cache *sink,
const struct audio_stream *source,
struct audio_stream *sink,
int *consumed,
int *produced);

Expand Down Expand Up @@ -122,8 +122,8 @@ static inline void src_inc_wrap_s16(int16_t **ptr, int16_t *end, size_t size)

/* A fast copy function for same in and out rate */
static void src_copy_s32(struct comp_dev *dev,
const struct audio_stream __sparse_cache *source,
struct audio_stream __sparse_cache *sink,
const struct audio_stream *source,
struct audio_stream *sink,
int *n_read, int *n_written)
{
struct comp_data *cd = comp_get_drvdata(dev);
Expand Down Expand Up @@ -194,8 +194,8 @@ static void src_copy_s32(struct comp_dev *dev,
}

static void src_copy_s16(struct comp_dev *dev,
const struct audio_stream __sparse_cache *source,
struct audio_stream __sparse_cache *sink,
const struct audio_stream *source,
struct audio_stream *sink,
int *n_read, int *n_written)
{
struct comp_data *cd = comp_get_drvdata(dev);
Expand Down Expand Up @@ -534,7 +534,7 @@ static int asrc_params(struct comp_dev *dev,
{
struct comp_data *cd = comp_get_drvdata(dev);
struct comp_buffer *sourceb, *sinkb;
struct comp_buffer __sparse_cache *source_c, *sink_c;
struct comp_buffer *source_c, *sink_c;
int err;

comp_info(dev, "asrc_params()");
Expand Down Expand Up @@ -604,7 +604,7 @@ static int asrc_params(struct comp_dev *dev,
static int asrc_dai_find(struct comp_dev *dev, struct comp_data *cd)
{
struct comp_buffer *sourceb, *sinkb;
struct comp_buffer __sparse_cache *source_c, *sink_c;
struct comp_buffer *source_c, *sink_c;
int pid;

/* Get current pipeline ID and walk to find the DAI */
Expand Down Expand Up @@ -722,7 +722,7 @@ static int asrc_prepare(struct comp_dev *dev)
{
struct comp_data *cd = comp_get_drvdata(dev);
struct comp_buffer *sourceb, *sinkb;
struct comp_buffer __sparse_cache *source_c, *sink_c;
struct comp_buffer *source_c, *sink_c;
uint32_t source_period_bytes;
uint32_t sink_period_bytes;
int sample_bytes;
Expand Down Expand Up @@ -978,8 +978,8 @@ static int asrc_control_loop(struct comp_dev *dev, struct comp_data *cd)
return 0;
}

static void asrc_process(struct comp_dev *dev, struct comp_buffer __sparse_cache *source,
struct comp_buffer __sparse_cache *sink)
static void asrc_process(struct comp_dev *dev, struct comp_buffer *source,
struct comp_buffer *sink)
{
struct comp_data *cd = comp_get_drvdata(dev);
int consumed = 0;
Expand All @@ -1005,7 +1005,7 @@ static int asrc_copy(struct comp_dev *dev)
{
struct comp_data *cd = comp_get_drvdata(dev);
struct comp_buffer *source, *sink;
struct comp_buffer __sparse_cache *source_c, *sink_c;
struct comp_buffer *source_c, *sink_c;
int frames_src;
int frames_snk;
int ret;
Expand Down
78 changes: 39 additions & 39 deletions src/audio/audio_stream.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,20 @@
#include <sof/audio/audio_stream.h>
#include <sof/audio/buffer.h>

static size_t audio_stream_get_free_size(struct sof_sink __sparse_cache *sink)
static size_t audio_stream_get_free_size(struct sof_sink *sink)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(sink, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(sink, struct audio_stream,
sink_api, __sparse_cache);

return audio_stream_get_free_bytes(audio_stream);
}

static int audio_stream_get_buffer(struct sof_sink __sparse_cache *sink, size_t req_size,
static int audio_stream_get_buffer(struct sof_sink *sink, size_t req_size,
void **data_ptr, void **buffer_start, size_t *buffer_size)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(sink, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(sink, struct audio_stream,
sink_api, __sparse_cache);

if (req_size > audio_stream_get_free_size(sink))
Expand All @@ -32,13 +32,13 @@ static int audio_stream_get_buffer(struct sof_sink __sparse_cache *sink, size_t
return 0;
}

static int audio_stream_commit_buffer(struct sof_sink __sparse_cache *sink, size_t commit_size)
static int audio_stream_commit_buffer(struct sof_sink *sink, size_t commit_size)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(sink, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(sink, struct audio_stream,
sink_api, __sparse_cache);
struct comp_buffer __sparse_cache *buffer_c =
attr_container_of(audio_stream, struct comp_buffer __sparse_cache,
struct comp_buffer *buffer_c =
attr_container_of(audio_stream, struct comp_buffer,
stream, __sparse_cache);

if (commit_size) {
Expand All @@ -49,24 +49,24 @@ static int audio_stream_commit_buffer(struct sof_sink __sparse_cache *sink, size
return 0;
}

static size_t audio_stream_get_data_available(struct sof_source __sparse_cache *source)
static size_t audio_stream_get_data_available(struct sof_source *source)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(source, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(source, struct audio_stream,
source_api, __sparse_cache);

return audio_stream_get_avail_bytes(audio_stream);
}

static int audio_stream_get_data(struct sof_source __sparse_cache *source, size_t req_size,
static int audio_stream_get_data(struct sof_source *source, size_t req_size,
void **data_ptr, void **buffer_start, size_t *buffer_size)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(source, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(source, struct audio_stream,
source_api, __sparse_cache);

struct comp_buffer __sparse_cache *buffer_c =
attr_container_of(audio_stream, struct comp_buffer __sparse_cache,
struct comp_buffer *buffer_c =
attr_container_of(audio_stream, struct comp_buffer,
stream, __sparse_cache);

if (req_size > audio_stream_get_data_available(source))
Expand All @@ -81,10 +81,10 @@ static int audio_stream_get_data(struct sof_source __sparse_cache *source, size_
return 0;
}

static int audio_stream_release_data(struct sof_source __sparse_cache *source, size_t free_size)
static int audio_stream_release_data(struct sof_source *source, size_t free_size)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(source, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(source, struct audio_stream,
source_api, __sparse_cache);

if (free_size)
Expand All @@ -93,53 +93,53 @@ static int audio_stream_release_data(struct sof_source __sparse_cache *source, s
return 0;
}

static int audio_stream_set_ipc_params_source(struct sof_source __sparse_cache *source,
static int audio_stream_set_ipc_params_source(struct sof_source *source,
struct sof_ipc_stream_params *params,
bool force_update)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(source, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(source, struct audio_stream,
source_api, __sparse_cache);
struct comp_buffer __sparse_cache *buffer =
attr_container_of(audio_stream, struct comp_buffer __sparse_cache,
struct comp_buffer *buffer =
attr_container_of(audio_stream, struct comp_buffer,
stream, __sparse_cache);

return buffer_set_params(buffer, params, force_update);
}

static int audio_stream_set_ipc_params_sink(struct sof_sink __sparse_cache *sink,
static int audio_stream_set_ipc_params_sink(struct sof_sink *sink,
struct sof_ipc_stream_params *params,
bool force_update)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(sink, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(sink, struct audio_stream,
sink_api, __sparse_cache);
struct comp_buffer __sparse_cache *buffer =
attr_container_of(audio_stream, struct comp_buffer __sparse_cache,
struct comp_buffer *buffer =
attr_container_of(audio_stream, struct comp_buffer,
stream, __sparse_cache);

return buffer_set_params(buffer, params, force_update);
}

static int audio_stream_source_set_alignment_constants(struct sof_source __sparse_cache *source,
static int audio_stream_source_set_alignment_constants(struct sof_source *source,
const uint32_t byte_align,
const uint32_t frame_align_req)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(source, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(source, struct audio_stream,
source_api, __sparse_cache);

audio_stream_init_alignment_constants(byte_align, frame_align_req, audio_stream);

return 0;
}

static int audio_stream_sink_set_alignment_constants(struct sof_sink __sparse_cache *sink,
static int audio_stream_sink_set_alignment_constants(struct sof_sink *sink,
const uint32_t byte_align,
const uint32_t frame_align_req)
{
struct audio_stream __sparse_cache *audio_stream =
attr_container_of(sink, struct audio_stream __sparse_cache,
struct audio_stream *audio_stream =
attr_container_of(sink, struct audio_stream,
sink_api, __sparse_cache);

audio_stream_init_alignment_constants(byte_align, frame_align_req, audio_stream);
Expand All @@ -163,7 +163,7 @@ static const struct sink_ops audio_stream_sink_ops = {
.set_alignment_constants = audio_stream_sink_set_alignment_constants
};

void audio_stream_init(struct audio_stream __sparse_cache *audio_stream,
void audio_stream_init(struct audio_stream *audio_stream,
void *buff_addr, uint32_t size)
{
audio_stream->size = size;
Expand Down
14 changes: 7 additions & 7 deletions src/audio/buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct comp_buffer *buffer_alloc(uint32_t size, uint32_t caps, uint32_t flags, u
bool is_shared)
{
struct comp_buffer *buffer;
struct comp_buffer __sparse_cache *buffer_c;
struct comp_buffer *buffer_c;
void *stream_addr;

tr_dbg(&buffer_tr, "buffer_alloc()");
Expand Down Expand Up @@ -79,7 +79,7 @@ struct comp_buffer *buffer_alloc(uint32_t size, uint32_t caps, uint32_t flags, u
return buffer;
}

void buffer_zero(struct comp_buffer __sparse_cache *buffer)
void buffer_zero(struct comp_buffer *buffer)
{
buf_dbg(buffer, "stream_zero()");
CORE_CHECK_STRUCT(buffer);
Expand All @@ -91,7 +91,7 @@ void buffer_zero(struct comp_buffer __sparse_cache *buffer)
audio_stream_get_size(&buffer->stream));
}

int buffer_set_size(struct comp_buffer __sparse_cache *buffer, uint32_t size, uint32_t alignment)
int buffer_set_size(struct comp_buffer *buffer, uint32_t size, uint32_t alignment)
{
void *new_ptr = NULL;

Expand Down Expand Up @@ -129,7 +129,7 @@ int buffer_set_size(struct comp_buffer __sparse_cache *buffer, uint32_t size, ui
return 0;
}

int buffer_set_params(struct comp_buffer __sparse_cache *buffer,
int buffer_set_params(struct comp_buffer *buffer,
struct sof_ipc_stream_params *params, bool force_update)
{
int ret;
Expand Down Expand Up @@ -160,7 +160,7 @@ int buffer_set_params(struct comp_buffer __sparse_cache *buffer,
return 0;
}

bool buffer_params_match(struct comp_buffer __sparse_cache *buffer,
bool buffer_params_match(struct comp_buffer *buffer,
struct sof_ipc_stream_params *params, uint32_t flag)
{
assert(params);
Expand Down Expand Up @@ -217,7 +217,7 @@ void buffer_free(struct comp_buffer *buffer)
* choice but to use our knowledge of the local notifier behaviour and pass
* locked buffers to notification recipients.
*/
void comp_update_buffer_produce(struct comp_buffer __sparse_cache *buffer, uint32_t bytes)
void comp_update_buffer_produce(struct comp_buffer *buffer, uint32_t bytes)
{
struct buffer_cb_transact cb_data = {
.buffer = buffer,
Expand Down Expand Up @@ -256,7 +256,7 @@ void comp_update_buffer_produce(struct comp_buffer __sparse_cache *buffer, uint3
#endif
}

void comp_update_buffer_consume(struct comp_buffer __sparse_cache *buffer, uint32_t bytes)
void comp_update_buffer_consume(struct comp_buffer *buffer, uint32_t bytes)
{
struct buffer_cb_transact cb_data = {
.buffer = buffer,
Expand Down
Loading

0 comments on commit 0f1286a

Please sign in to comment.