Port some rough anc numbers from firmware dump

This commit is contained in:
Ben V. Brown 2023-07-04 23:00:09 +10:00 committed by Rudis Muiznieks
parent f12e474b2f
commit 1ac4814fdf
Signed by: rudism
GPG Key ID: CABF2F86EF7884F9
1 changed files with 247 additions and 176 deletions

View File

@ -226,8 +226,8 @@ HAL_IOMUX_PIN_PULLUP_ENABLE
};
*/
#define IIR_COUNTER_FF_L (6)
#define IIR_COUNTER_FF_R (6)
#define IIR_COUNTER_FF_L (8)
#define IIR_COUNTER_FF_R (8)
#define IIR_COUNTER_FB_L (5)
#define IIR_COUNTER_FB_R (5)
@ -712,43 +712,114 @@ Filter4_A=[ 134217728, -255575175, 122217496];
*/
static const struct_anc_cfg POSSIBLY_UNUSED
AncFirCoef_44p1k_mode0 =
{
AncFirCoef_44p1k_mode0 = {
.anc_cfg_ff_l =
{
.total_gain = 440,
.total_gain = 512,
// .total_gain = 312,
.iir_bypass_flag = 0,
.iir_counter = IIR_COUNTER_FF_L,
.iir_coef[0].coef_b = {42465729, -84858529, 42392831},
.iir_coef[0].coef_a = {134217728, -268346271, 134128558},
.iir_coef[0].coef_b = {47768463, -94743857, 46978979},
.iir_coef[0].coef_a = {134217728, -267027510, 132813804},
.iir_coef[1].coef_b = {136159949, -267039705, 130899919},
.iir_coef[1].coef_a = {134217728, -267039705, 132842140},
.iir_coef[1].coef_b = {95026887, -189952726, 94926080},
.iir_coef[1].coef_a = {134217728, -268315406, 134097919},
.iir_coef[2].coef_b = {132746107, -263254540, 130599907},
.iir_coef[2].coef_a = {134217728, -263254540, 129128286},
.iir_coef[2].coef_b = {137435276, -257412413, 120090247},
.iir_coef[2].coef_a = {134217728, -257446453, 123273755},
.iir_coef[3].coef_b = {131402980, -255575175, 125032243},
.iir_coef[3].coef_a = {134217728, -255575175, 122217496},
.iir_coef[3].coef_b = {118844778, -214442434, 98508661},
.iir_coef[3].coef_a = {134217728, -214442434, 83135711},
.iir_coef[4].coef_b = {0x8000000, 0, 0},
.iir_coef[4].coef_a = {0x8000000, 0, 0},
.iir_coef[4].coef_b = {117611223, -205468073, 95643298},
.iir_coef[4].coef_a = {134217728, -205468073, 79036793},
.iir_coef[5].coef_b = {0x8000000, 0, 0},
.iir_coef[5].coef_a = {0x8000000, 0, 0},
.iir_coef[5].coef_b = {133430657, -264618880, 131408063},
.iir_coef[5].coef_a = {134217728, -264618880, 130620992},
/* .fir_bypass_flag=1,
.fir_len = AUD_COEF_LEN,
.fir_coef =
.iir_coef[6].coef_b = {134829328, -266830863, 132034457},
.iir_coef[6].coef_a = {134217728, -266830863, 132646057},
.iir_coef[7].coef_b = {134236821, -268342876, 134106183},
.iir_coef[7].coef_a = {134217728, -268342908, 134125243},
// .fir_bypass_flag = 0,
// .fir_len = AUD_COEF_LEN,
// .fir_coef =
// {
// 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, -6144, 0, 0, 0,
// 1, 0, 2048, -13511, -4060, -9831, 2011, 0,
// 2048, -13511, -4060, -9831, 2011, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, -6144, 512, 0, 0, 6, -14642,
// 1154, -18440, -2296, -26004, 1140, 0, 2048,
// 22833, -4082, -11362, 2033, -6957, 2081, 2958,
// -4073, 24038, 1991, 0, 2048, 2958, -4073,
// 17081, 2025, 29362, 2050, 25335, -4088, 16424,
// 2037, 0, 2048, 23654, -4088, -21431, 2039,
// 28309, 1889, 16812, -3657, 3193, 1783, 0, 2048,
// 16812, -3657, 31503, 1624, 9636, 1982, -13421,
// -3875, 2188, 1895, 0, 2048, -13421, -3875,
// 11824, 1829, -11954, 2049, -20607, -4095, -32689,
// 2044, 0, 2048, -20607, -4095, 20894, 2046, 0,
// 0, 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, -6144, 0,
// 0, 0, 1, 0, 2048, -13511, -4060,
// -9831, 2011, 0, 2048, -13511, -4060, -9831,
// 2011, 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// 0, 0, 0, 0, 0, 0, 0, 0,
// },
.reserved_for_drc =
{
32767,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
},
*/
.dac_gain_offset = 0,
.adc_gain_offset = (2) * 4,
.adc_gain_offset = -24,
},
.anc_cfg_ff_r =
{
@ -805,28 +876,28 @@ static const struct_anc_cfg POSSIBLY_UNUSED
.anc_cfg_fb_l =
{
.total_gain = 511,
.total_gain = 512,
.iir_bypass_flag = 0,
.iir_counter = IIR_COUNTER_FB_L,
.iir_coef[0].coef_b = {26719020, -52852829, 26204379},
.iir_coef[0].coef_a = {134217728, -210410903, 76474119},
.iir_coef[0].coef_b = {75679438, -150423560, 74750572},
.iir_coef[0].coef_a = {134217728, -267495119, 133288862},
.iir_coef[1].coef_b = {138909433, -267471808, 128584365},
.iir_coef[1].coef_a = {134217728, -267471808, 133276071},
.iir_coef[1].coef_b = {136438995, -266925170, 130506214},
.iir_coef[1].coef_a = {134217728, -266925170, 132727481},
.iir_coef[2].coef_b = {134542733, -268138827, 133597115},
.iir_coef[2].coef_a = {134217728, -268138827, 133922120},
.iir_coef[2].coef_b = {134378162, -267885833, 133513256},
.iir_coef[2].coef_a = {134217728, -267887514, 133672009},
.iir_coef[3].coef_b = {133541379, -264235686, 130815458},
.iir_coef[3].coef_a = {134217728, -264235686, 130139109},
.iir_coef[3].coef_b = {123825813, -239648340, 116853881},
.iir_coef[3].coef_a = {134217728, -239648340, 106461967},
.iir_coef[4].coef_b = {0x8000000, 0, 0},
.iir_coef[4].coef_a = {0x8000000, 0, 0},
.iir_coef[4].coef_b = {129901988, -253899885, 124192908},
.iir_coef[4].coef_a = {134217728, -253899885, 119877168},
.iir_coef[5].coef_b = {0x8000000, 0, 0},
.iir_coef[5].coef_a = {0x8000000, 0, 0},
.iir_coef[5].coef_b = {134336846, -268324991, 133988431},
.iir_coef[5].coef_a = {134217728, -268324991, 134107550},
/* .fir_bypass_flag=1,
.fir_len = AUD_COEF_LEN,
@ -836,7 +907,7 @@ static const struct_anc_cfg POSSIBLY_UNUSED
},
*/
.dac_gain_offset = 0,
.adc_gain_offset = (2) * 4,
.adc_gain_offset = -24,
},
.anc_cfg_fb_r =
{