laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/42244?usp=email )
Change subject: tch: fix RTP clock not ticking for unhandled payload types ......................................................................
tch: fix RTP clock not ticking for unhandled payload types
When the payload type from the DSP is not handled by the switch in l1if_tch_rx(), rmsg stays NULL and we return 0 without calling add_l1sap_header(), silently dropping a 20ms RTP tick.
Always allocate an empty RTP frame when rmsg is NULL so the RTP clock keeps ticking.
Related: OS#5974
Change-Id: I202522ea6f83d77872a2f84d9a2622b87e829a0c --- M src/osmo-bts-sysmo/tch.c 1 file changed, 14 insertions(+), 8 deletions(-)
Approvals: pespin: Looks good to me, approved falconia: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified
diff --git a/src/osmo-bts-sysmo/tch.c b/src/osmo-bts-sysmo/tch.c index b5bf04b..6a431d0 100644 --- a/src/osmo-bts-sysmo/tch.c +++ b/src/osmo-bts-sysmo/tch.c @@ -601,15 +601,21 @@ /* FIXME: what about GsmL1_TchPlType_Amr_SidBad? not well documented. */ }
- if (rmsg) - return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, - data_ind->measParam.fBer * 10000, - data_ind->measParam.fLinkQuality * 10, - data_ind->measParam.fRssi, - data_ind->measParam.i16BurstTiming * 64, - 0); + if (!rmsg) { + LOGPLCFN(lchan, data_ind->u32Fn, DL1P, LOGL_NOTICE, + "Unhandled payload type %s, generating empty RTP tick\n", + get_value_string(femtobts_tch_pl_names, payload_type)); + rmsg = msgb_alloc_headroom(256, 128, "L1P-to-RTP"); + if (!rmsg) + return -ENOMEM; + }
- return 0; + return add_l1sap_header(trx, rmsg, lchan, chan_nr, data_ind->u32Fn, + data_ind->measParam.fBer * 10000, + data_ind->measParam.fLinkQuality * 10, + data_ind->measParam.fRssi, + data_ind->measParam.i16BurstTiming * 64, + 0);
err_payload_match: LOGPLCFN(lchan, data_ind->u32Fn, DL1P, LOGL_ERROR, "%s Rx Payload Type %s incompatible with lchan\n",