From 09e1b87b1089b2591adcff9ad35581e75e82a648 Mon Sep 17 00:00:00 2001 From: Seppo Ingalsuo Date: Thu, 5 Oct 2023 16:22:33 +0300 Subject: [PATCH] Audio: MFCC: Fix testbench xt build fail MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: d0cb478007 ("Audio: MFCC: Add HiFi3 implementation of MFCC") Signed-off-by: Seppo Ingalsuo --- src/audio/mfcc/mfcc_hifi3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/audio/mfcc/mfcc_hifi3.c b/src/audio/mfcc/mfcc_hifi3.c index 41062e014893..76f0a79da668 100644 --- a/src/audio/mfcc/mfcc_hifi3.c +++ b/src/audio/mfcc/mfcc_hifi3.c @@ -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, @@ -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) @@ -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;