FreeCalypso > hg > fc-tourmaline
annotate src/cs/services/fcbm/fcbm_reset_mode.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 | a5b00817a60f |
children |
rev | line source |
---|---|
230
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
1 /* |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
2 * In this module we are going to implement FCBM functions |
248
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
3 * for the reset or miscellaneous boot mode. |
230
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
4 */ |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
5 |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
6 #include "rv/rv_general.h" |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
7 #include "rvf/rvf_api.h" |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
8 #include "rvm/rvm_use_id_list.h" |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
9 #include "fcbm/fcbm_func_i.h" |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
10 #include "fcbm/fcbm_life_cycle.h" |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
11 #include "fcbm/fcbm_timer_i.h" |
243
35474f3a1782
FCBM: beginning of display output
Mychaela Falconia <falcon@freecalypso.org>
parents:
230
diff
changeset
|
12 #include "r2d/r2d.h" |
230
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
13 #include "r2d/r2d_blrr_api.h" |
243
35474f3a1782
FCBM: beginning of display output
Mychaela Falconia <falcon@freecalypso.org>
parents:
230
diff
changeset
|
14 |
248
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
15 extern char fcbm_prod_banner_string[]; |
245
3eccca3ac219
FCBM: charging state display implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
243
diff
changeset
|
16 |
248
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
17 void fcbm_process_msg_reset_mode(void) |
230
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
18 { |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
19 if (fcbm_life_cycle_state != FCBM_STATE_INACTIVE) { |
248
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
20 rvf_send_trace("FCBM got reset mode request in wrong state", |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
21 42, fcbm_life_cycle_state, |
230
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
22 RV_TRACE_LEVEL_ERROR, FCBM_USE_ID); |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
23 return; |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
24 } |
248
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
25 rvf_send_trace("Entering reset boot mode", 24, NULL_PARAM, |
230
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
26 RV_TRACE_LEVEL_DEBUG_HIGH, FCBM_USE_ID); |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
27 fcbm_subscribe_kpd(); |
243
35474f3a1782
FCBM: beginning of display output
Mychaela Falconia <falcon@freecalypso.org>
parents:
230
diff
changeset
|
28 fcbm_display_init(); |
35474f3a1782
FCBM: beginning of display output
Mychaela Falconia <falcon@freecalypso.org>
parents:
230
diff
changeset
|
29 fcbm_display_line(0, fcbm_prod_banner_string); |
248
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
30 fcbm_display_line(1, "Misc boot state"); |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
31 #ifdef LSCREEN |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
32 fcbm_display_line(3, "Long-press Power"); |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
33 fcbm_display_line(4, "button to turn off,"); |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
34 #else |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
35 fcbm_display_line(3, "Long-press PWR"); |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
36 fcbm_display_line(4, "button to OFF,"); |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
37 #endif |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
38 fcbm_display_line(5, "or send fc-tmsh"); |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
39 fcbm_display_line(6, "phone-on command"); |
a5b00817a60f
FCBM reset mode implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
245
diff
changeset
|
40 fcbm_display_line(7, "to boot phone."); |
243
35474f3a1782
FCBM: beginning of display output
Mychaela Falconia <falcon@freecalypso.org>
parents:
230
diff
changeset
|
41 r2d_flush(); |
230
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
42 blrr_display_ctrl(BLRR_DISPLAY_CHG_BOOT); |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
43 rvf_start_timer(FCBM_TIMER_DSPL_OFF, |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
44 RVF_SECS_TO_TICKS(FCBM_DISPLAY_SECS), FALSE); |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
45 fcbm_life_cycle_state = FCBM_STATE_ACTIVE; |
baa738eeb842
FCBM code implemented in first pass
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff
changeset
|
46 } |