annotate src/cs/drivers/drv_app/r2d/r2d_blrr_api.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 bb1f572ac098
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
217
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This module implements the blrr_display_ctrl() function defined
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * in r2d_blrr_api.h; this implementation consists of posting the
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * necessary internal message to the R2D task.
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 */
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include "r2d/r2d_blrr_api.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 #include "r2d/r2d_i.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 #include "r2d/r2d_messages.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 #include "rv/rv_general.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 #include "rvf/rvf_api.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include "rvm/rvm_use_id_list.h"
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 T_RV_RET blrr_display_ctrl(enum blrr_display_state arg)
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15 {
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 T_R2D_EVT *msg;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
224
bb1f572ac098 BLRR display control: emit debug trace
Mychaela Falconia <falcon@freecalypso.org>
parents: 217
diff changeset
18 rvf_send_trace("BLRR display state change", 25, arg,
bb1f572ac098 BLRR display control: emit debug trace
Mychaela Falconia <falcon@freecalypso.org>
parents: 217
diff changeset
19 RV_TRACE_LEVEL_DEBUG_HIGH, R2D_USE_ID);
217
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 if (rvf_get_buf(r2d_mb_id, sizeof(T_R2D_EVT), (T_RVF_BUFFER **)&msg)
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 == RVF_RED) {
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 rvf_send_trace(
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 "rvf_get_buf() failed in blrr_display_ctrl()", 43,
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 NULL_PARAM, RV_TRACE_LEVEL_ERROR, R2D_USE_ID);
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 return RV_MEMORY_ERR;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 }
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 msg->os_hdr.msg_id = R2D_MESSAGE_ONOFF;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 msg->os_hdr.src_addr_id = r2d_addr_id;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 msg->os_hdr.dest_addr_id = r2d_addr_id;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 msg->os_hdr.callback_func = NULL;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 msg->status = arg;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 if (rvf_send_msg(r2d_addr_id, msg) != RV_OK) {
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 rvf_send_trace("blrr_display_ctrl(): Send failed!", 33,
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 NULL_PARAM, RV_TRACE_LEVEL_ERROR, R2D_USE_ID);
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 rvf_free_buf(msg);
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 return RV_INTERNAL_ERR;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 }
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 return RV_OK;
6541e43f88e5 R2D display on/off control implemented
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 }