diff options
author | Mychaela N. Falconia <falcon@freecalypso.org> | 2023-04-01 21:51:57 +0000 |
---|---|---|
committer | falconia <falcon@freecalypso.org> | 2023-04-03 15:15:48 +0000 |
commit | 4ff6888a81be71ecf831fa10ebfff0738516a9fa (patch) | |
tree | 534a81ec22e275e93f59f64c4761482a1a3a8ae5 | |
parent | 5f556af2328062e2e17686ecf04d3f1198787a83 (diff) |
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
-rw-r--r-- | src/common/msg_utils.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index bd2c4b76..3a9611d3 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -380,15 +380,19 @@ static inline bool dtx_sched_optional(struct gsm_lchan *lchan, uint32_t fn) 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 @@ void dtx_int_signal(struct gsm_lchan *lchan) */ 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; |