comparison frtest/dlcap-gsmx.c @ 166:500f3e93964f

gsmfr-dlcap-gsmx: handle DSP flags consistently with EFR version
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 16 Dec 2022 08:23:32 +0000
parents ef3ea52a190f
children 6e39fc0134da
comparison
equal deleted inserted replaced
165:ef3ea52a190f 166:500f3e93964f
60 goto invalid; 60 goto invalid;
61 fn_mod_104 = strtoul(linebuf + 85, 0, 10); 61 fn_mod_104 = strtoul(linebuf + 85, 0, 10);
62 } else 62 } else
63 goto invalid; 63 goto invalid;
64 /* 64 /*
65 * Bit 15 of status word 0 is buffer validity flag, 65 * DSP flags will be documented in ../doc/Calypso-TCH-downlink
66 * bit 2 is BFI.
67 */ 66 */
68 if (!(status_words[0] & 0x8000) || (status_words[0] & 0x0004)) { 67 if ((status_words[0] & 0xC004) == 0xC000) {
68 gsm0610_tidsp_to_libgsm(tidsp_bytes, libgsm_bytes);
69 fwrite(libgsm_bytes, 1, 33, outf);
70 } else {
69 bfi[0] = 0xBF; 71 bfi[0] = 0xBF;
70 bfi[1] = fn_mod_104 == 60; 72 bfi[1] = fn_mod_104 == 60;
71 fwrite(bfi, 1, 2, outf); 73 fwrite(bfi, 1, 2, outf);
72 } else {
73 gsm0610_tidsp_to_libgsm(tidsp_bytes, libgsm_bytes);
74 fwrite(libgsm_bytes, 1, 33, outf);
75 } 74 }
76 } 75 }
77 exit(0); 76 exit(0);
78 } 77 }