FR/HR/EFR: implement SID filter in TCH UL path

As a result of how FR/HR/EFR DTX interacts with block diagonal
interleaving, at the beginning and end of each DTX pause a
correctly functioning TCH receiver will always pick up an
artifact consisting of 4 received bursts (2 for TCH/HS)
and same number of omitted bursts.  Standard channel decoding
of this Rx artifact will produce a "half-block" in which half
of the bits prior to convolutional decoding will come from
a SID repetition whose Tx was notionally suppressed, while
the other half will be garbage.  As a result of convolutional
decoding, the result will often appear as valid SID per
classification rules - but passing it as such to the Rx DTX
handler is wrong.  Classic E1 BTS and GSM MS implementations
include a kind of SID filter at this point, setting BFI on
these received half-blocks, so that the Rx DTX handler will
see an invalid SID condition.  Invalid SID means that comfort
noise generation is to be continued, but no updated CN
parameters are available - which is the truth in half-block
Rx situations.  Implement the same filter.

Additional background info can be found here:

https://osmocom.org/projects/retro-gsm/wiki/DTXu_half-blocks

Change-Id: I46c62312316b04567bcadf6050597673f071247d
This commit is contained in:
Mychaela N. Falconia
2025-09-05 19:38:55 +00:00
parent d9b456ce6d
commit cb5b10e7b7
2 changed files with 58 additions and 8 deletions

View File

@@ -292,6 +292,9 @@ struct gsm_lchan {
bool dl_sid_transmitted;
/* The current frame in the DL is taken up by FACCH */
bool dl_facch_stealing;
/* UL SID filter to catch DTXu half-blocks,
* see tch_ul_fr_hr_efr() function. */
bool ul_sid_filter;
} dtx_fr_hr_efr;
uint8_t last_cmr;
uint32_t last_fn;