Sound Open Firmware
Loading...
Searching...
No Matches
iir_df1.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 *
3 * Copyright(c) 2022 Intel Corporation. All rights reserved.
4 *
5 * Author: Andrula Song <andrula.song@intel.com>
6 */
7
8#ifndef __SOF_MATH_IIR_DF1_H__
9#define __SOF_MATH_IIR_DF1_H__
10
11#include <stddef.h>
12#include <stdint.h>
13#include <sof/common.h>
14
15#define IIR_DF1_NUM_STATE 4
16#define SOF_IIR_DF1_4TH_NUM_BIQUADS 2
17
19 unsigned int biquads; /* Number of IIR 2nd order sections total */
20 unsigned int biquads_in_series; /* Number of IIR 2nd order sections
21 * in series.
22 */
23 int32_t *coef; /* Pointer to IIR coefficients */
24 int32_t *delay; /* Pointer to IIR delay line */
25};
26
28
30 struct sof_eq_iir_header *config);
31
33
34void iir_init_delay_df1(struct iir_state_df1 *iir, int32_t **state);
35
36void iir_reset_df1(struct iir_state_df1 *iir);
37
44int32_t iir_df1(struct iir_state_df1 *iir, int32_t x);
45
54int32_t iir_df1_4th(struct iir_state_df1 *iir, int32_t x);
55
56/* Inline functions */
57#if SOF_USE_MIN_HIFI(3, FILTER)
58#include "iir_df1_hifi3.h"
59#else
60#include "iir_df1_generic.h"
61#endif
62
63#endif
int32_t iir_df1_4th(struct iir_state_df1 *iir, int32_t x)
Calculate IIR filter consisting of biquads, special simplified version for 4th order filter with two ...
void iir_init_delay_df1(struct iir_state_df1 *iir, int32_t **state)
int32_t iir_df1(struct iir_state_df1 *iir, int32_t x)
Calculate IIR filter consisting of biquads.
void iir_reset_df1(struct iir_state_df1 *iir)
int iir_init_coef_df1(struct iir_state_df1 *iir, struct sof_eq_iir_header *config)
int iir_delay_size_df1(struct sof_eq_iir_header *config)
Definition iir_df1.h:18
int32_t * coef
Definition iir_df1.h:23
unsigned int biquads_in_series
Definition iir_df1.h:20
int32_t * delay
Definition iir_df1.h:24
unsigned int biquads
Definition iir_df1.h:19
Definition eq.h:117