src/audio/eq_fir/eq_fir_hifi2ep.c
/* For even frame lengths use FIR filter that processes two sequential
 * sample per call.
 */
For even frame lengths use FIR filter that processes two sequential
sample per call.
For even frame lengths use FIR filter that processes two sequential sample per call .
void eq_fir_2x_s32(struct fir_state_32x16 fir[], const struct audio_stream *source,
		   struct audio_stream *sink, int frames, int nch)
{
	struct fir_state_32x16 *f;
	int32_t *src = (int32_t *)source->r_ptr;
	int32_t *snk = (int32_t *)sink->w_ptr;
	int32_t *x0;
	int32_t *y0;
	int32_t *x1;
	int32_t *y1;
	int ch;
	int i;
	int rshift;
	int lshift;
	int inc = nch << 1;
	for (ch = 0; ch < nch; ch++) {
		f = &fir[ch];
		fir_get_lrshifts(f, &lshift, &rshift);
		fir_hifiep_setup_circular(f);
		x0 = src++;
		y0 = snk++;
		for (i = 0; i < (frames >> 1); i++) {
			x1 = x0 + nch;
			y1 = y0 + nch;
			fir_32x16_2x_hifiep(f, *x0, *x1, y0, y1,
					    lshift, rshift);
			x0 += inc;
			y0 += inc;
		}
	}
}
void eq_fir_2x_s32 ( struct fir_state_32x16 fir [ ] , const struct audio_stream * source , struct audio_stream * sink , int frames , int nch ) { struct fir_state_32x16 * f ; int32_t * src = ( int32_t * ) source -> r_ptr ; int32_t * snk = ( int32_t * ) sink -> w_ptr ; int32_t * x0 ; int32_t * y0 ; int32_t * x1 ; int32_t * y1 ; int ch ; int i ; int rshift ; int lshift ; int inc = nch << 1 ; for ( ch = 0 ; ch < nch ; ch ++ ) { f = & fir [ ch ] ; fir_get_lrshifts ( f , & lshift , & rshift ) ; fir_hifiep_setup_circular ( f ) ; x0 = src ++ ; y0 = snk ++ ; for ( i = 0 ; i < ( frames >> 1 ) ; i ++ ) { x1 = x0 + nch ; y1 = y0 + nch ; fir_32x16_2x_hifiep ( f , * x0 , * x1 , y0 , y1 , lshift , rshift ) ; x0 += inc ; y0 += inc ; } } }
For even frame lengths use FIR filter that processes two sequential
 sample per call.
For even frame lengths use FIR filter that processes two sequential sample per call .
/* Get FIR instance and get shifts to e.g. apply mute
		 * without overhead.
		 */ /* Setup circular buffer for FIR input data delay */