laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32096 )
(
1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: sysmo: fix handling of SID in EFR ......................................................................
sysmo: fix handling of SID in EFR
Handling of SID in EFR mode was broken in osmo-bts-sysmo. l1_to_rtppayload_efr(), the function for UL Rx, was using completely bogus logic (passing bits in ETSI TS 101 318 EFR format to an AMR decoding function), whereas l1if_tch_encode(), the function for DL Tx, had missing SID logic for EFR while supporting SID detection for all other codecs. The fix is to use the new osmo_efr_check_sid() function in libosmocodec.
Change-Id: Ia56c1bb7432968685110456961d24a907b0a201f --- M src/osmo-bts-sysmo/tch.c 1 file changed, 23 insertions(+), 7 deletions(-)
Approvals: laforge: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified
diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index e901d47..832991f 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -131,12 +131,8 @@
cur[0] |= 0xC0; #endif /* USE_L1_RTP_MODE */ - enum osmo_amr_type ft; - enum osmo_amr_quality bfi; - uint8_t cmr; - int8_t sti, cmi; - osmo_amr_rtp_dec(l1_payload, payload_len, &cmr, &cmi, &ft, &bfi, &sti); - lchan_set_marker(ft == AMR_GSM_EFR_SID, lchan); + + lchan_set_marker(osmo_efr_check_sid(l1_payload, payload_len), lchan);
return msg; } @@ -403,7 +399,10 @@ *payload_type = GsmL1_TchPlType_Efr; rc = rtppayload_to_l1_efr(l1_payload, rtp_pl, rtp_pl_len); - /* FIXME: detect and save EFR SID */ + if (rc && lchan->ts->trx->bts->dtxd) + is_sid = osmo_efr_check_sid(rtp_pl, rtp_pl_len); + if (is_sid) + dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, -1); break; #endif case GSM48_CMODE_SPEECH_AMR: