falconia has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/37180?usp=email )
Change subject: rtp2trau_hr16: set CRC bits correctly ......................................................................
rtp2trau_hr16: set CRC bits correctly
The code previously failed to set the CRC bits in the TRAU frame output, containing a misleading comment that this operation is done by the TRAU frame encoding function (it isn't). Set these bits correctly in the rtp2trau step, like we do for EFR.
Change-Id: I5c8aa5891e3862f978f14093bff46bd00b6702a5 --- M src/trau/trau_rtp_conv.c 1 file changed, 17 insertions(+), 2 deletions(-)
Approvals: Jenkins Builder: Verified pespin: Looks good to me, but someone else must approve fixeria: Looks good to me, approved
diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index 21322fc..b8f554c 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -47,7 +47,7 @@
/* - * EFR TRAU parity + * EFR TRAU parity (also used for HR) * * g(x) = x^3 + x^1 + 1 */ @@ -461,11 +461,12 @@ tf->ufi = 0; else tf->ufi = 1; - /* CRC is computed by TRAU frame encoder */ if (data_len) osmo_pbit2ubit(tf->d_bits, data, GSM_HR_BYTES * 8); else memset(tf->d_bits, 0, GSM_HR_BYTES * 8); + /* CRC is *not* computed by TRAU frame encoder - we have to do it */ + osmo_crc8gen_set_bits(&gsm0860_efr_crc3, tf->d_bits, 44, tf->crc_bits);
return 0; }