FreeCalypso > hg > fc-tourmaline
diff src/cs/layer1/cfile/l1_cmplx.c @ 300:edcb8364d45b
L1: resurrect TCH tap feature
In this new incarnation of our TCH tap feature, we support DL sniffing
in all 3 of FR1, HR1 and EFR, and the new implementation will capture
every 20 ms frame where the old one silently skipped a frame (sent
nothing) during FACCH stealing. The wire interface on RVTMUX changed
slightly, and fc-shell tch record will need to be updated to support
the new version.
TCH UL play or substitution is supported for FR1 and EFR only;
support for HR1 can be added later if needed.
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 13 Dec 2022 02:44:01 +0000 |
parents | 4e78acac3d88 |
children |
line wrap: on
line diff
--- a/src/cs/layer1/cfile/l1_cmplx.c Tue Mar 29 04:41:25 2022 +0000 +++ b/src/cs/layer1/cfile/l1_cmplx.c Tue Dec 13 02:44:01 2022 +0000 @@ -233,6 +233,11 @@ UWORD8 input_level_flag, UWORD8 input_level, UWORD16 radio_freq, UWORD8 if_threshold); #endif +/* FreeCalypso added feature: TCH tap */ +extern BOOL tch_dl_sniff_mode, tch_ul_play_mode; +extern void tch_send_downlink_bits(API *dsp_buffer, UWORD8 nwords, + UWORD8 chan_mode, UWORD8 fn_mod_104); +extern void tchf_substitute_uplink(API *dsp_buffer); //#pragma DUPLICATE_FOR_INTERNAL_RAM_END @@ -5115,6 +5120,11 @@ } #endif } + else if (tch_ul_play_mode && + (channel_mode == TCH_FS_MODE || channel_mode == TCH_EFR_MODE)) + { + tchf_substitute_uplink(l1s_dsp_com.dsp_ndb_ptr->a_du_1); + } } } @@ -8659,6 +8669,15 @@ (channel_mode == TCH_HS_MODE)) play_trace(); #endif + if (tch_dl_sniff_mode && channel_mode == TCH_HS_MODE) + { + if (subchannel == 0) + tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 11, + channel_mode, fn_mod_104); + else if (subchannel == 1) + tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_1, 11, + channel_mode, fn_mod_104); + } // Check A_DD_0 information block only if no FACCH. if (subchannel==0) @@ -9265,6 +9284,12 @@ || channel_mode == TCH_EFR_MODE)) play_trace(); #endif + if (tch_dl_sniff_mode && + (channel_mode == TCH_FS_MODE || channel_mode == TCH_EFR_MODE)) + { + tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 20, + channel_mode, fn_mod_104); + } // FACCH: Check A_FD information block. //-------------------------------------