falconia has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/32182 ) Change subject: bts-{lc15,oc2g,sysmo}: support EFR in repeat_last_sid() ...................................................................... bts-{lc15,oc2g,sysmo}: support EFR in repeat_last_sid() The function repeat_last_sid() is implemented in the common part, but is only used by osmo-bts-{lc15,oc2g,sysmo} models. These BTS models call this function when they are looking to see if a previously cached SID frame needs to retransmitted on the DL because it is that time according to the SACCH multiframe. Out of non-AMR codecs, this function previously supported only FR1 and HR1, but failed to support EFR. Fix that omission. Change-Id: Iebcd28e65af889254740757eed9c579392eb1c33 --- M src/common/msg_utils.c 1 file changed, 23 insertions(+), 6 deletions(-) Approvals: fixeria: Looks good to me, approved pespin: Looks good to me, but someone else must approve Jenkins Builder: Verified diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index bd2c4b7..3a9611d 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -380,15 +380,19 @@ static const uint8_t f[] = { 52, 53, 54, 55, 56, 57, 58, 59 }, h0[] = { 0, 2, 4, 6, 52, 54, 56, 58 }, h1[] = { 14, 16, 18, 20, 66, 68, 70, 72 }; - if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1) { + switch (lchan->tch_mode) { + case GSM48_CMODE_SPEECH_V1: if (lchan->type == GSM_LCHAN_TCH_F) return fn_chk(f, fn, ARRAY_SIZE(f)); else return fn_chk(lchan->nr ? h1 : h0, fn, lchan->nr ? ARRAY_SIZE(h1) : ARRAY_SIZE(h0)); + case GSM48_CMODE_SPEECH_EFR: + return fn_chk(f, fn, ARRAY_SIZE(f)); + default: + return false; } - return false; } /*! \brief Check if DTX DL AMR is enabled for a given lchan (it have proper type, @@ -466,10 +470,6 @@ */ uint8_t repeat_last_sid(struct gsm_lchan *lchan, uint8_t *dst, uint32_t fn) { - /* FIXME: add EFR support */ - if (lchan->tch_mode == GSM48_CMODE_SPEECH_EFR) - return 0; - if (lchan->tch_mode != GSM48_CMODE_SPEECH_AMR) { if (dtx_sched_optional(lchan, fn)) return 0; -- To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32182 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bts Gerrit-Branch: master Gerrit-Change-Id: Iebcd28e65af889254740757eed9c579392eb1c33 Gerrit-Change-Number: 32182 Gerrit-PatchSet: 3 Gerrit-Owner: falconia <falcon@freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon@freecalypso.org> Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: pespin <pespin@sysmocom.de> Gerrit-MessageType: merged