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) || SOF_USE_ARM_SIMD(FILTER) || SOF_USE_RISCV_SIMD(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__ */
uint8_t data[0]
Binary byte payload for raw controls.
Definition header.h:5
Audio Stream API definition.
Audio component interconnect buffer connecting two pipeline components.
Definition buffer.h:150
Definition fir.h:15