changeset 903:a7ad6b39e01b

tchtools/fc-tch2fr.c: update big header comment for new reality
author Mychaela Falconia <falcon@freecalypso.org>
date Wed, 28 Dec 2022 08:34:19 +0000
parents 8ddb16a37273
children 5041bcb8140f
files tchtools/fc-tch2fr.c
diffstat 1 files changed, 18 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/tchtools/fc-tch2fr.c	Wed Dec 28 07:52:30 2022 +0000
+++ b/tchtools/fc-tch2fr.c	Wed Dec 28 08:34:19 2022 +0000
@@ -1,27 +1,24 @@
 /*
- * Our experimental Calypso firmware enables us to capture the output of
- * the GSM 05.03 channel decoder in the DSP, i.e., the bits leaving the
- * channel decoder and going into the speech decoder.  Our fc-shell utility
- * allows saving this capture to a file; the captured booty includes not only
- * the expected 260 bits per frame, but also some DSP status words which are
- * not fully understood, but which are believed to contain indications as to
- * whether the decoded speech frame is good or bad.
+ * This program reads TCH downlink capture files in the old format from 2016
+ * (the format which fc-shell tch record will write if the firmware running
+ * on the Calypso GSM device is an old version that emits TCH DL bits in
+ * the old format from 2016), completely *disregards* all 3 status words
+ * including the essential word of control flags, converts the 260-bit
+ * payload portion of each frame into standard libgsm/RTP format, and
+ * writes the result into a .gsm binary file.
  *
- * My first naive thought was to save the captured speech frames in libgsm
- * format so I could then play them with the 'play' command (SoX package)
- * under Linux, but the problem with this naive approach is that the bad frames
- * indication is lost, and some of the saved "speech" frames will contain
- * utter garbage, resulting in very unkind-on-ears noises if that file is
- * then played.  I don't know what the proper solution should be; I don't know
- * what the commercial cellphone implementations of the GSM 06.10 speech decoder
- * (buried in black box DSPs) do when they get bad frames from the channel
- * decoder.
+ * This program was written in 2016, at that time we (FreeCalypso team)
+ * did not have a proper understanding of how the complete TCH DL processing
+ * chain works - we particularly missed the Rx DTX handler block that MUST
+ * be present between the output of the GSM 05.03 channel decoder and the
+ * input to the GSM 06.10 speech decoder - and therefore the function
+ * performed by this program is a bogo-transform.
  *
- * The present utility reproduces the naive behaviour of my previous
- * implementation of fc-shell's tch record command: it takes hex files written
- * by the current implementation of tch record in fc-shell, DISREGARDS the
- * DSP status words, and blindly converts each 260-bit frame (good or bad)
- * into libgsm format.
+ * This bogo-transform program is kept as part of FC host tools package
+ * only for backward compatibility - for actual decoding of TCH DL captures,
+ * please use our new gsmfr-dlcap-* and gsmefr-dlcap-* utilities that are
+ * maintained as part of Themyscira Wireless GSM codec libraries & utilities
+ * package.
  */
 
 #include <sys/types.h>