forked from thesofproject/sof
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfir_generic.h
More file actions
49 lines (36 loc) · 1.36 KB
/
fir_generic.h
File metadata and controls
49 lines (36 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* SPDX-License-Identifier: BSD-3-Clause
*
* Copyright(c) 2017 Intel Corporation. All rights reserved.
*
* Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
* Liam Girdwood <liam.r.girdwood@linux.intel.com>
* Keyon Jie <yang.jie@linux.intel.com>
*/
#ifndef __SOF_MATH_FIR_GENERIC_H__
#define __SOF_MATH_FIR_GENERIC_H__
#include <sof/math/fir_config.h>
#include <sof/common.h>
#if SOF_USE_HIFI(NONE, FILTER)
#include <sof/audio/audio_stream.h>
#include <sof/audio/format.h>
#include <user/fir.h>
#include <stdint.h>
struct comp_buffer;
struct sof_eq_fir_coef_data;
struct fir_state_32x16 {
int rwi; /* Circular read and write index */
int taps; /* Number of FIR taps */
int length; /* Number of FIR taps plus input length (even) */
int out_shift; /* Amount of right shifts at output */
int16_t *coef; /* Pointer to FIR coefficients */
int32_t *delay; /* Pointer to FIR delay line */
};
void fir_reset(struct fir_state_32x16 *fir);
int fir_delay_size(struct sof_fir_coef_data *config);
int fir_init_coef(struct fir_state_32x16 *fir,
struct sof_fir_coef_data *config);
void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data);
int32_t fir_32x16(struct fir_state_32x16 *fir, int32_t x);
void fir_32x16_2x(struct fir_state_32x16 *fir, int32_t x0, int32_t x1, int32_t *y0, int32_t *y1);
#endif
#endif /* __SOF_MATH_FIR_GENERIC_H__ */