Skip to content
Open
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions src/audio/dcblock/dcblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ static int dcblock_process(struct processing_module *mod,
size_t source_frame_bytes = source_get_frame_bytes(source);
size_t sink_frame_bytes = sink_get_frame_bytes(sink);
size_t source_bytes, sink_bytes, bytes;
uint32_t frames = source_get_data_frames_available(source);
uint32_t sink_frames = sink_get_free_frames(sink);
size_t frames = source_get_data_frames_available(source);
size_t sink_frames = sink_get_free_frames(sink);
int ret;

comp_dbg(dev, "entry");
Expand Down
6 changes: 3 additions & 3 deletions src/audio/dcblock/dcblock.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct comp_data;
typedef int (*dcblock_func)(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames);
size_t frames);

/* DC Blocking Filter component private data */
struct comp_data {
Expand All @@ -54,7 +54,7 @@ struct comp_data {

enum sof_ipc_frame source_format;
enum sof_ipc_frame sink_format;
int channels; /**< number of channels */
unsigned int channels; /**< number of channels */
dcblock_func dcblock_func; /**< processing function */
};

Expand All @@ -77,7 +77,7 @@ extern const size_t dcblock_fncount;
*/
static inline dcblock_func dcblock_find_func(enum sof_ipc_frame src_fmt)
{
int i;
size_t i;

/* Find suitable processing function from map */
for (i = 0; i < dcblock_fncount; i++) {
Expand Down
36 changes: 18 additions & 18 deletions src/audio/dcblock/dcblock_arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@ static inline int32_t dcblock_arm_process(struct dcblock_state *state, int64_t R
static int dcblock_s16_arm(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const int16_t *x = source->ptr;
int16_t *y = sink->ptr;
int samples_without_wrap;
int nch = cd->channels;
int remaining_samples = frames * nch;
size_t samples_without_wrap;
unsigned int nch = cd->channels;
size_t remaining_samples = frames * nch;
int32_t tmp;
int ch = 0;
int i;
unsigned int ch = 0;
size_t i;

while (remaining_samples) {
samples_without_wrap = cir_buf_samples_without_wrap_s16(x, source->buf_end);
Expand Down Expand Up @@ -72,16 +72,16 @@ static int dcblock_s16_arm(struct comp_data *cd,
static int dcblock_s24_arm(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const int32_t *x = source->ptr;
int32_t *y = sink->ptr;
int samples_without_wrap;
int nch = cd->channels;
int remaining_samples = frames * nch;
size_t samples_without_wrap;
unsigned int nch = cd->channels;
size_t remaining_samples = frames * nch;
int32_t tmp;
int ch = 0;
int i;
unsigned int ch = 0;
size_t i;

while (remaining_samples) {
samples_without_wrap = cir_buf_samples_without_wrap_s32(x, source->buf_end);
Expand Down Expand Up @@ -109,15 +109,15 @@ static int dcblock_s24_arm(struct comp_data *cd,
static int dcblock_s32_arm(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const int32_t *x = source->ptr;
int32_t *y = sink->ptr;
int samples_without_wrap;
int nch = cd->channels;
int remaining_samples = frames * nch;
int ch = 0;
int i;
size_t samples_without_wrap;
unsigned int nch = cd->channels;
size_t remaining_samples = frames * nch;
unsigned int ch = 0;
size_t i;

while (remaining_samples) {
samples_without_wrap = cir_buf_samples_without_wrap_s32(x, source->buf_end);
Expand Down
18 changes: 9 additions & 9 deletions src/audio/dcblock/dcblock_generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,15 @@ static int32_t dcblock_generic(struct dcblock_state *state,
static int dcblock_s16_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const int16_t *x = source->ptr;
int16_t *y = sink->ptr;
size_t samples_without_wrap;
int nch = cd->channels;
unsigned int nch = cd->channels;
size_t remaining_samples = frames * nch;
int32_t tmp;
int ch = 0;
unsigned int ch = 0;
size_t i;

while (remaining_samples) {
Expand Down Expand Up @@ -96,15 +96,15 @@ static int dcblock_s16_default(struct comp_data *cd,
static int dcblock_s24_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const int32_t *x = source->ptr;
int32_t *y = sink->ptr;
size_t samples_without_wrap;
int nch = cd->channels;
unsigned int nch = cd->channels;
size_t remaining_samples = frames * nch;
int32_t tmp;
int ch = 0;
unsigned int ch = 0;
size_t i;

while (remaining_samples) {
Expand Down Expand Up @@ -143,14 +143,14 @@ static int dcblock_s24_default(struct comp_data *cd,
static int dcblock_s32_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const int32_t *x = source->ptr;
int32_t *y = sink->ptr;
size_t samples_without_wrap;
int nch = cd->channels;
unsigned int nch = cd->channels;
size_t remaining_samples = frames * nch;
int ch = 0;
unsigned int ch = 0;
size_t i;

while (remaining_samples) {
Expand Down
27 changes: 15 additions & 12 deletions src/audio/dcblock/dcblock_hifi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static inline void dcblock_set_circular(const void *src_begin, const void *src_e
static int dcblock_s16_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const ae_int16 *src = source->ptr;
ae_int16 *dst = (ae_int16 *)sink->ptr;
Expand All @@ -55,10 +55,11 @@ static int dcblock_s16_default(struct comp_data *cd,
ae_int16x4 in_sample, out_sample;
int x_size = x_end - x_start;
int y_size = y_end - y_start;
int nch = cd->channels;
int remaining = frames * nch;
unsigned int nch = cd->channels;
size_t remaining = frames * nch;
const int inc = nch * sizeof(ae_int16);
int ch, i, n;
unsigned int ch;
size_t i, n;

/* Set source as circular buffer 0 for the strided per-channel reads */
dcblock_set_circular(x_start, x_end);
Expand Down Expand Up @@ -105,7 +106,7 @@ static int dcblock_s16_default(struct comp_data *cd,
static int dcblock_s24_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const ae_int32 *src = source->ptr;
ae_int32 *dst = (ae_int32 *)sink->ptr;
Expand All @@ -119,10 +120,11 @@ static int dcblock_s24_default(struct comp_data *cd,
ae_int32x2 in_sample, out_sample;
int x_size = x_end - x_start;
int y_size = y_end - y_start;
int nch = cd->channels;
int remaining = frames * nch;
unsigned int nch = cd->channels;
size_t remaining = frames * nch;
const int inc = nch * sizeof(ae_int32);
int ch, i, n;
unsigned int ch;
size_t i, n;

dcblock_set_circular(x_start, x_end);

Expand Down Expand Up @@ -165,7 +167,7 @@ static int dcblock_s24_default(struct comp_data *cd,
static int dcblock_s32_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const ae_int32 *src = source->ptr;
ae_int32 *dst = (ae_int32 *)sink->ptr;
Expand All @@ -179,10 +181,11 @@ static int dcblock_s32_default(struct comp_data *cd,
ae_int32x2 in_sample;
int x_size = x_end - x_start;
int y_size = y_end - y_start;
int nch = cd->channels;
int remaining = frames * nch;
unsigned int nch = cd->channels;
size_t remaining = frames * nch;
const int inc = nch * sizeof(ae_int32);
int ch, i, n;
unsigned int ch;
size_t i, n;

dcblock_set_circular(x_start, x_end);

Expand Down
21 changes: 12 additions & 9 deletions src/audio/dcblock/dcblock_hifi4.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static inline void dcblock_set_circular(const void *src_begin, const void *src_e
static int dcblock_s16_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const ae_int16 *src = source->ptr;
ae_int16 *dst = (ae_int16 *)sink->ptr;
Expand All @@ -56,9 +56,10 @@ static int dcblock_s16_default(struct comp_data *cd,
ae_int16 *out;
ae_int32x2 R, state_x, state_y, sample;
ae_int16x4 in_sample, out_sample;
int nch = cd->channels;
unsigned int nch = cd->channels;
const int inc = nch * sizeof(ae_int16);
int ch, i;
unsigned int ch;
size_t i;

dcblock_set_circular(x_start, x_end, y_start, y_end);

Expand Down Expand Up @@ -90,7 +91,7 @@ static int dcblock_s16_default(struct comp_data *cd,
static int dcblock_s24_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const ae_int32 *src = source->ptr;
ae_int32 *dst = (ae_int32 *)sink->ptr;
Expand All @@ -102,9 +103,10 @@ static int dcblock_s24_default(struct comp_data *cd,
ae_int32 *out;
ae_int32x2 R, state_x, state_y;
ae_int32x2 in_sample, out_sample;
int nch = cd->channels;
unsigned int nch = cd->channels;
const int inc = nch * sizeof(ae_int32);
int ch, i;
unsigned int ch;
size_t i;

dcblock_set_circular(x_start, x_end, y_start, y_end);

Expand Down Expand Up @@ -136,7 +138,7 @@ static int dcblock_s24_default(struct comp_data *cd,
static int dcblock_s32_default(struct comp_data *cd,
struct cir_buf_source *source,
struct cir_buf_sink *sink,
uint32_t frames)
size_t frames)
{
const ae_int32 *src = source->ptr;
ae_int32 *dst = (ae_int32 *)sink->ptr;
Expand All @@ -148,9 +150,10 @@ static int dcblock_s32_default(struct comp_data *cd,
ae_int32 *out;
ae_int32x2 R, state_x, state_y;
ae_int32x2 in_sample;
int nch = cd->channels;
unsigned int nch = cd->channels;
const int inc = nch * sizeof(ae_int32);
int ch, i;
unsigned int ch;
size_t i;

dcblock_set_circular(x_start, x_end, y_start, y_end);

Expand Down
Loading