mirror of https://github.com/thesofproject/sof.git
Drivers: DMIC: Move decimation factors 5 and 10 to less preferred
This patch changes FIR decimation factors preference from "2, 3, 4, 5, 6, 8, 10, 12" to "2, 3, 4, 6, 5, 8, 12, 10". The prime number factor 5 and 10 (2*5) are less preferred because when used for decimate for fist started FIR they restrict more the configuration choices for the second FIR. If e.g. capture at 16 kHz is started first with decimation factor 6, the 48 kHz stream can be decimated from common 96 kHz CIC rate by 2. Earlier the driver selected decimation by 5 to 16 kHz. There is no integer decimation factor to decimate from 80 kHz to 48 kHz. Similarly if decimate to 8 kHz programmed FIR to decimate by 10, the same 80 kHz rate prevents 48 kHz for the other DAI. Decimation factor 12 sets up CIC to 96 kHz that is compatible with many other sample rates. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
This commit is contained in:
parent
f5de034636
commit
190ce8bf7a
|
@ -40,9 +40,17 @@
|
||||||
#include "pdm_decim_int32_12_4156_5345_010_090.h"
|
#include "pdm_decim_int32_12_4156_5345_010_090.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Note: Higher spec filter must be before lower spec filter
|
/* Note 1: Higher spec filter must be before lower spec filter
|
||||||
* if there are multiple filters for a decimation factor. The naming
|
* if there are multiple filters for a decimation factor. The first
|
||||||
* scheme of coefficients set is:
|
* filter is skipped if the length is too much vs. overrun limit. If
|
||||||
|
* other order the better filter would be never selected.
|
||||||
|
*
|
||||||
|
* Note 2: The introduction order of FIR decimation factors is the selection
|
||||||
|
* preference order. The decimation factor 5 and 10 (2*5) cause a often less
|
||||||
|
* compatible output sample rate for CIC so they are not used if there other
|
||||||
|
* suitable nearby values.
|
||||||
|
*
|
||||||
|
* The naming scheme of coefficients set is:
|
||||||
* <type>_<decim factor>_<rel passband>_<rel stopband>_<ripple>_<attenuation>
|
* <type>_<decim factor>_<rel passband>_<rel stopband>_<ripple>_<attenuation>
|
||||||
*/
|
*/
|
||||||
struct pdm_decim *fir_list[] = {
|
struct pdm_decim *fir_list[] = {
|
||||||
|
@ -56,20 +64,20 @@ struct pdm_decim *fir_list[] = {
|
||||||
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_4
|
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_4
|
||||||
&pdm_decim_int32_04_4318_5100_010_095,
|
&pdm_decim_int32_04_4318_5100_010_095,
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_5
|
|
||||||
&pdm_decim_int32_05_4325_5100_010_095,
|
|
||||||
#endif
|
|
||||||
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_6
|
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_6
|
||||||
&pdm_decim_int32_06_4172_5100_010_095,
|
&pdm_decim_int32_06_4172_5100_010_095,
|
||||||
#endif
|
#endif
|
||||||
|
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_5
|
||||||
|
&pdm_decim_int32_05_4325_5100_010_095,
|
||||||
|
#endif
|
||||||
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_8
|
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_8
|
||||||
&pdm_decim_int32_08_4156_5301_010_090,
|
&pdm_decim_int32_08_4156_5301_010_090,
|
||||||
#endif
|
#endif
|
||||||
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_10
|
|
||||||
&pdm_decim_int32_10_4156_5345_010_090,
|
|
||||||
#endif
|
|
||||||
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_12
|
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_12
|
||||||
&pdm_decim_int32_12_4156_5345_010_090,
|
&pdm_decim_int32_12_4156_5345_010_090,
|
||||||
|
#endif
|
||||||
|
#if CONFIG_INTEL_DMIC_FIR_DECIMATE_BY_10
|
||||||
|
&pdm_decim_int32_10_4156_5345_010_090,
|
||||||
#endif
|
#endif
|
||||||
NULL, /* This marks the end of coefficients */
|
NULL, /* This marks the end of coefficients */
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue