Sound Open Firmware
Loading...
Searching...
No Matches
fir_generic.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2017 Intel Corporation. All rights reserved.
4 *
5 * Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
6 * Liam Girdwood <liam.r.girdwood@linux.intel.com>
7 * Keyon Jie <yang.jie@linux.intel.com>
8 */
9
10#ifndef __SOF_MATH_FIR_GENERIC_H__
11#define __SOF_MATH_FIR_GENERIC_H__
12
13#include <sof/math/fir_config.h>
14#include <sof/common.h>
15
16#if SOF_USE_HIFI(NONE, FILTER)
17
19#include <sof/audio/format.h>
20#include <user/fir.h>
21#include <stdint.h>
22
23struct comp_buffer;
24struct sof_eq_fir_coef_data;
25
26struct fir_state_32x16 {
27 int rwi; /* Circular read and write index */
28 int taps; /* Number of FIR taps */
29 int length; /* Number of FIR taps plus input length (even) */
30 int out_shift; /* Amount of right shifts at output */
31 int16_t *coef; /* Pointer to FIR coefficients */
32 int32_t *delay; /* Pointer to FIR delay line */
33};
34
35void fir_reset(struct fir_state_32x16 *fir);
36
37int fir_delay_size(struct sof_fir_coef_data *config);
38
39int fir_init_coef(struct fir_state_32x16 *fir,
40 struct sof_fir_coef_data *config);
41
42void fir_init_delay(struct fir_state_32x16 *fir, int32_t **data);
43
44int32_t fir_32x16(struct fir_state_32x16 *fir, int32_t x);
45
46void fir_32x16_2x(struct fir_state_32x16 *fir, int32_t x0, int32_t x1, int32_t *y0, int32_t *y1);
47
48#endif
49#endif /* __SOF_MATH_FIR_GENERIC_H__ */
Audio Stream API definition.
uint32_t data[]
Definition debug_stream_slot.h:2
Definition buffer.h:130
Definition fir.h:15
uint32_t length
Definition tlv.h:1