annotate rvinterf/lowlevel/tchhide.c @ 1014:961efadd530a default tip

fc-shell TCH DL handler: add support for CSD modes TCH DL capture mechanism in FC Tourmaline firmware has been extended to support CSD modes in addition to speech - add the necessary support on the host tools side. It needs to be noted that this mechanism in its present state does NOT provide the debug utility value that was sought: as we learned only after the code was implemented, TI's DSP has a misfeature in that the buffer we are reading (a_dd_0[]) is zeroed out when the IDS block is enabled, i.e., we are reading all zeros and not the real DL bits we were after. But since the code has already been written, we are keeping it - perhaps we can do some tests with IDS disabled.
author Mychaela Falconia <falcon@freecalypso.org>
date Tue, 26 Nov 2024 06:27:43 +0000
parents a1065c17429c
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
899
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * One of several FreeCalypso extensions to RVTMUX is TCH bit access
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 * logical channel, and we would like to handle it specially in rvinterf
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 * because it's extremely chatty, sending a frame every 20 ms. If we
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 * were to output every TCH frame in our regular log, that log output
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 * becomes useless as everything else is drowned out. Therefore, we
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 * implement a hiding mode by default: we only count how many TCH packets
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 * were exchanged in between other messages of interest, and report these
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 * counts.
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10 */
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 #include <stdio.h>
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 extern void (*output_hook)();
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 unsigned tch_rx_count, tch_tx_count;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 static void
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 tch_report_hook()
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 {
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 char msgbuf[80];
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 output_hook = 0;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 if (tch_rx_count) {
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 sprintf(msgbuf, "TCH: received %u packet%s", tch_rx_count,
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 tch_rx_count != 1 ? "s" : "");
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 output_line(msgbuf);
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 tch_rx_count = 0;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 }
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 if (tch_tx_count) {
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 sprintf(msgbuf, "TCH: sent %u packet%s", tch_tx_count,
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 tch_tx_count != 1 ? "s" : "");
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 output_line(msgbuf);
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 tch_tx_count = 0;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 }
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 }
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 void
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 tch_inc_count_rx()
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 {
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 tch_rx_count++;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 output_hook = tch_report_hook;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 }
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 void
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 tch_inc_count_tx()
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 {
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 tch_tx_count++;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49 output_hook = tch_report_hook;
a1065c17429c rvinterf: implement TCH hiding mode and -v option for verbose
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 }