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
This commit is contained in:
parent
e1e204fae3
commit
32682c63f6
|
@ -131,12 +131,8 @@ static struct msgb *l1_to_rtppayload_efr(uint8_t *l1_payload,
|
|||
|
||||
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 @@ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len,
|
|||
*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:
|
||||
|
|
Loading…
Reference in New Issue