FreeCalypso > hg > fc-tourmaline
view src/cs/drivers/drv_app/fchg/fchg_default_batt.c @ 273:5caa86ee2cfa
enable L1_NEW_AEC in l1_confg.h (bold change)
The AEC function implemented in DSP ROM 3606 on the Calypso silicon
we work with is the one that corresponds to L1_NEW_AEC; the same holds
for DSP 34 and even for DSP 33 with more recent patch versions.
However, TI shipped their TCS211 reference fw with L1_NEW_AEC set to 0,
thus driving AEC the old way if anyone tried to enable it, either via
AT%Nxxxx or via the audio mode facility. As a result, the fw would
try to control features which no longer exist in the DSP (long vs short
echo and the old echo suppression level bits), while providing no way
to tune the 8 new parameter words added to the DSP's NDB page.
The only sensible solution is to bite the bullet and enable L1_NEW_AEC
in L1 config, with fallout propagating into RiViera Audio Service
T_AUDIO_AEC_CFG structure and into /aud/*.cfg binary file format.
The latter fallout will be addressed in further code changes.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Thu, 29 Jul 2021 18:32:40 +0000 |
parents | 75067af48bfd |
children |
line wrap: on
line source
/* * This module provides the default table of battery State-of-Charge * thresholds in the absence of a customized table in FFS. * * The present default table has been taken from Pirelli's firmware. */ #include "fchg/fchg_env.h" #include "fchg/fchg_func_i.h" #include "rv/rv_general.h" #include <string.h> static const T_PWR_THRESHOLDS default_batt_table[] = { {4170, 100}, {4120, 95}, {4070, 90}, {4030, 85}, {3964, 80}, {3930, 75}, {3900, 70}, /* 4 bars */ {3882, 65}, {3847, 60}, {3805, 55}, {3786, 50}, /* 3 bars */ {3771, 45}, {3759, 40}, {3750, 35}, {3745, 30}, {3737, 25}, /* 2 bars */ {3719, 20}, {3688, 15}, {3663, 10}, {3539, 5}, /* 1 bar */ {3370, 0} }; static const UINT8 default_batt_bars_table[NB_BARS_THRESH] = {6, 10, 15, 19}; void pwr_set_default_batt_table(void) { memcpy(pwr_ctrl->batt.percent_thresh, default_batt_table, sizeof default_batt_table); pwr_ctrl->nb_percent_thresh = sizeof(default_batt_table) / sizeof(T_PWR_THRESHOLDS); memcpy(pwr_ctrl->batt.bars_thresh, default_batt_bars_table, sizeof default_batt_bars_table); }