Skip to content

Commit

Permalink
Audio: MFCC: Fix testbench xt build fail
Browse files Browse the repository at this point in the history
Build with "scripts/rebuild-testbench -p tgl" fails to error:

src/audio/mfcc/mfcc_hifi3.c: In function ‘mfcc_source_copy_s16’:
src/audio/mfcc/mfcc_hifi3.c:91: warning:
assignment from incompatible pointer type

src/audio/mfcc/mfcc_hifi3.c: In function ‘mfcc_fill_prev_samples’:
src/audio/mfcc/mfcc_hifi3.c:124: warning:
assignment from incompatible pointer type

src/audio/mfcc/mfcc_hifi3.c: In function ‘mfcc_fill_fft_buffer’:
src/audio/mfcc/mfcc_hifi3.c:159: warning:
assignment from incompatible pointer type

fixes: d0cb478 ("Audio: MFCC: Add HiFi3 implementation of MFCC")

Signed-off-by: Seppo Ingalsuo <[email protected]>
  • Loading branch information
singalsu authored and kv2019i committed Oct 6, 2023
1 parent cada950 commit 09e1b87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/audio/mfcc/mfcc_hifi3.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ void mfcc_source_copy_s16(struct input_stream_buffer *bsource, struct mfcc_buffe
}
buf->s_avail += copied;
buf->s_free -= copied;
buf->w_ptr = out;
buf->w_ptr = (int16_t *)out;
}

void mfcc_fill_prev_samples(struct mfcc_buffer *buf, int16_t *prev_data,
Expand Down Expand Up @@ -121,7 +121,7 @@ void mfcc_fill_prev_samples(struct mfcc_buffer *buf, int16_t *prev_data,

buf->s_avail -= prev_data_length;
buf->s_free += prev_data_length;
buf->r_ptr = in;
buf->r_ptr = (void *)in; /* int16_t pointer but direct cast is not possible */
}

void mfcc_fill_fft_buffer(struct mfcc_state *state)
Expand Down Expand Up @@ -156,7 +156,7 @@ void mfcc_fill_fft_buffer(struct mfcc_state *state)

buf->s_avail -= fft->fft_hop_size;
buf->s_free += fft->fft_hop_size;
buf->r_ptr = in;
buf->r_ptr = (int16_t *)in;

/* Copy for next time data back to overlap buffer */
idx = fft->fft_fill_start_idx + fft->fft_hop_size;
Expand Down

0 comments on commit 09e1b87

Please sign in to comment.