falconia has uploaded this change for review.

View Change

rtp continuous-streaming: fix BFI in the quality-suppressed case

The check for (tch_ind->lqual_cb >= bts->min_qual_norm) in
l1sap_tch_ind() has the intent of suppressing valid-seeming
speech frame output from lower layers when the link quality is
too low; this check is particularly important for FR1 codec
where the intrinsic validity check is only a 3-bit CRC which has
1/8 probability of indicating "correct" when decoding radio noise
during DTXu silence.

However, this check is effectively defeated in the current
implementation of rtp continuous-streaming, at least when
themyscira-bfi extension is not used or when it doesn't apply
because the codec is not FR or EFR: the RTP packet being output
is the presumed-bogus speech frame from lower layers, rather than
the intended zero-length payload. Fix this bug.

Related: OS#5975
Change-Id: Icee0f57be289a0592a0197469432a012d15f224c
---
M src/common/l1sap.c
1 file changed, 27 insertions(+), 2 deletions(-)

git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/28/32128/1
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index bb19524..0664816 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1645,7 +1645,7 @@
return 1;
}
} else {
- /* Are we in rtp continuous-stream special mode? If so, send
+ /* Are we in rtp continuous-streaming special mode? If so, send
* out a BFI packet as zero-length RTP payload, or in Themyscira
* BFI format if that option is also enabled and the codec is
* FR or EFR. */
@@ -1658,7 +1658,7 @@
bfi[1] = (fn % 104 == 52); /* TAF */
send_ul_rtp_packet(lchan, fn, bfi, 2);
} else
- send_ul_rtp_packet(lchan, fn, msg->data, msg->len);
+ send_ul_rtp_packet(lchan, fn, bfi, 0);
} else {
DEBUGPGT(DRTP, &g_time, "Skipping RTP frame with lost payload (chan_nr=0x%02x)\n",
chan_nr);

To view, visit change 32128. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Icee0f57be289a0592a0197469432a012d15f224c
Gerrit-Change-Number: 32128
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon@freecalypso.org>
Gerrit-MessageType: newchange