1 /* SPDX-License-Identifier: BSD-3-Clause
2  *
3  * Copyright(c) 2018 Intel Corporation. All rights reserved.
4  *
5  * Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
6  */
7 
8 /* PDM decimation FIR filters */
9 
10 #ifndef __SOF_AUDIO_COEFFICIENTS_PDM_DECIM_PDM_DECIM_TABLE_H__
11 #define __SOF_AUDIO_COEFFICIENTS_PDM_DECIM_PDM_DECIM_TABLE_H__
12 
13 #include "pdm_decim_fir.h"
14 
15 #include <stddef.h>
16 
17 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_2
18 #include "pdm_decim_int32_02_4323_5100_010_095.h"
19 #include "pdm_decim_int32_02_4375_5100_010_095.h"
20 #endif
21 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_3
22 #include "pdm_decim_int32_03_4375_5100_010_095.h"
23 #endif
24 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_4
25 #include "pdm_decim_int32_04_4318_5100_010_095.h"
26 #endif
27 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_5
28 #include "pdm_decim_int32_05_4325_5100_010_095.h"
29 #endif
30 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_6
31 #include "pdm_decim_int32_06_4172_5100_010_095.h"
32 #endif
33 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_8
34 #include "pdm_decim_int32_08_4156_5301_010_090.h"
35 #endif
36 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_10
37 #include "pdm_decim_int32_10_4156_5345_010_090.h"
38 #endif
39 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_12
40 #include "pdm_decim_int32_12_4156_5345_010_090.h"
41 #endif
42 
43 /* Note 1: Higher spec filter must be before lower spec filter
44  * if there are multiple filters for a decimation factor. The first
45  * filter is skipped if the length is too much vs. overrun limit. If
46  * other order the better filter would be never selected.
47  *
48  * Note 2: The introduction order of FIR decimation factors is the selection
49  * preference order. The decimation factor 5 and 10 (2*5) cause a often less
50  * compatible output sample rate for CIC so they are not used if there other
51  * suitable nearby values.
52  *
53  * The naming scheme of coefficients set is:
54  * <type>_<decim factor>_<rel passband>_<rel stopband>_<ripple>_<attenuation>
55  */
56 struct pdm_decim *fir_list[] = {
57 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_2
58 	&pdm_decim_int32_02_4375_5100_010_095,
59 	&pdm_decim_int32_02_4323_5100_010_095,
60 #endif
61 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_3
62 	&pdm_decim_int32_03_4375_5100_010_095,
63 #endif
64 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_4
65 	&pdm_decim_int32_04_4318_5100_010_095,
66 #endif
67 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_6
68 	&pdm_decim_int32_06_4172_5100_010_095,
69 #endif
70 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_5
71 	&pdm_decim_int32_05_4325_5100_010_095,
72 #endif
73 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_8
74 	&pdm_decim_int32_08_4156_5301_010_090,
75 #endif
76 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_12
77 	&pdm_decim_int32_12_4156_5345_010_090,
78 #endif
79 #if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_10
80 	&pdm_decim_int32_10_4156_5345_010_090,
81 #endif
82 	NULL, /* This marks the end of coefficients */
83 };
84 
85 #endif /* __SOF_AUDIO_COEFFICIENTS_PDM_DECIM_PDM_DECIM_TABLE_H__ */
86