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
18
#include <
sof/audio/audio_stream.h
>
19
#include <
sof/audio/format.h
>
20
#include <
user/fir.h
>
21
#include <stdint.h>
22
23
struct
comp_buffer
;
24
struct
sof_eq_fir_coef_data;
25
26
struct
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
35
void
fir_reset(
struct
fir_state_32x16 *fir);
36
37
int
fir_delay_size(
struct
sof_fir_coef_data
*config);
38
39
int
fir_init_coef(
struct
fir_state_32x16 *fir,
40
struct
sof_fir_coef_data
*config);
41
42
void
fir_init_delay(
struct
fir_state_32x16 *fir, int32_t **
data
);
43
44
int32_t fir_32x16(
struct
fir_state_32x16 *fir, int32_t x);
45
46
void
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.h
Audio Stream API definition.
common.h
data
uint32_t data[]
Definition
debug_stream_slot.h:2
fir.h
fir_config.h
format.h
comp_buffer
Definition
buffer.h:130
sof_fir_coef_data
Definition
fir.h:15
length
uint32_t length
Definition
tlv.h:1
src
include
sof
math
fir_generic.h
Generated by
1.15.0