Skip to content
Success

Changes

Summary

  1. FR/HR/EFR: centralize TCH UL SID classification (details)
Commit 4e823987a80e4337f59406b5d2c1ca021468a45d by falcon
FR/HR/EFR: centralize TCH UL SID classification

In any environment where GSM MS may exercise DTXu on TCH/FS, TCH/HS or
TCH/EFS, the BTS receiving this TCH UL has to classify each received
traffic frame as valid SID, invalid SID or non-SID speech.  For E1 BTS
this SID classification requirement is explicit as there are dedicated
bits in TRAU-UL frames carrying the SID code.  For an IP BTS the need
for this classification is less obvious as most RTP payload formats
omit SID indicator bits - however:

* For HR codec, RTP output in RFC 5993 and TW-TS-002 formats does
  include explicit SID classification;

* Also for HR output in both TS 101 318 and RFC 5993 formats
  (but not TW-TS-002), SID classification must be considered in order
  to turn valid SID with some bit errors into perfect SID codeword;

* OsmoBTS already had logic for all 3 of FR/HR/EFR whereby if a frame
  is received that is an accepted SID frame in GSM 06.31/06.41/06.81
  definition, a flag is set so that the next good speech frame will
  be emitted in RTP with marker bit set.  This logic implies SID
  classification in TCH UL path.

Prior to this patch, OsmoBTS performed limited, non-consolidated
SID classification:

* For FR and EFR, the only SID classification in TCH UL path was done
  for RTP marker purposes by way of osmo_{fr,efr}_is_any_sid() Boolean
  result fed to lchan_set_marker();

* For the same RTP marker logic with HR codec, only perfect, error-free
  SID frames were detected;

* The same limitation applied to SID classification for RFC 5993 output.

Centralize this SID classification by moving it from BTS model to common
l1sap code and unifying it across all 3 codecs.  Immediate functional
effects from this change are:

* On TCH/HS we now detect imperfect (partially corrupted) SID frames
  and classify them as valid or invalid SID as intended by ETSI,
  like we already did for TCH/FS and TCH/EFS;

* When emitting TS 101 318 or RFC 5993, we apply the inherent limitations
  of those RTP formats to valid and invalid SID;

* With all 3 codecs, the check for a good speech frame as exit criterion
  from DTXu state now happens after the link quality check in l1sap,
  rather than before.

AMR speech mode is not affected at all by these changes: AMR DTX model
is completely different from that of FR/HR/EFR.

Related: OS#6036
Change-Id: Id6c8c146962de2f173760889eb232693bb4229d3
The file was modifiedinclude/osmo-bts/msg_utils.h
The file was modifiedsrc/common/l1sap.c
The file was modifiedsrc/osmo-bts-sysmo/tch.c
The file was modifiedsrc/osmo-bts-lc15/tch.c
The file was modifiedsrc/osmo-bts-trx/sched_lchan_tchf.c
The file was modifiedsrc/osmo-bts-oc2g/tch.c
The file was modifiedsrc/osmo-bts-trx/sched_lchan_tchh.c