changeset 304:58c7961bd0b0 default tip

TCH tap: extend DL sniffing feature to support CSD modes Our debug feature for TCH DL sniffing reads the content of the DSP's a_dd_0 buffer (or a_dd_1 for TCH/H subchannel 1) at appropriate times and forwards captured bits to the host. This feature was originally implemented for TCH/FS, TCH/EFS and TCH/HS - now extend it to cover TCH/F data modes too.
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 25 Nov 2024 23:33:27 +0000
parents f76436d19a7a
children
files src/cs/layer1/cfile/l1_cmplx.c
diffstat 1 files changed, 29 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/layer1/cfile/l1_cmplx.c	Thu Jun 08 08:23:37 2023 +0000
+++ b/src/cs/layer1/cfile/l1_cmplx.c	Mon Nov 25 23:33:27 2024 +0000
@@ -9284,11 +9284,19 @@
               || channel_mode == TCH_EFR_MODE))
             play_trace();
         #endif
-        if (tch_dl_sniff_mode &&
-            (channel_mode == TCH_FS_MODE || channel_mode == TCH_EFR_MODE))
+        if (tch_dl_sniff_mode)
         {
-            tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 20,
-                                   channel_mode, fn_mod_104);
+          switch (channel_mode) {
+            case TCH_FS_MODE:
+            case TCH_EFR_MODE:
+              tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 20,
+                                     channel_mode, fn_mod_104);
+              break;
+            case TCH_24F_MODE:
+              tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 8,
+                                     channel_mode, fn_mod_104);
+              break;
+          }
         }
 
         // FACCH: Check A_FD information block.
@@ -9541,6 +9549,23 @@
              (channel_mode == TCH_48F_MODE || channel_mode == TCH_96_MODE || channel_mode == TCH_144_MODE))
             play_trace();
         #endif
+        if (tch_dl_sniff_mode)
+        {
+          switch (channel_mode) {
+            case TCH_48F_MODE:
+              tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 11,
+                                     channel_mode, fn_mod_104);
+              break;
+            case TCH_96_MODE:
+              tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 18,
+                                     channel_mode, fn_mod_104);
+              break;
+            case TCH_144_MODE:
+              tch_send_downlink_bits(l1s_dsp_com.dsp_ndb_ptr->a_dd_0, 22,
+                                     channel_mode, fn_mod_104);
+              break;
+          }
+        }
 
         // Check A_DD_0 information block only if no FACCH.
         b_blud = (l1s_dsp_com.dsp_ndb_ptr->a_dd_0[0] & (1<<B_BLUD)) >> B_BLUD;