diff options
author | Jean-Francois Dionne <jf.dionne@nutaq.com> | 2017-01-24 12:10:13 -0500 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2017-02-01 19:13:16 +0000 |
commit | a760a043c4153770fe9577259989169cb2286a82 (patch) | |
tree | c9eae9c50a3e6bc6124f7e5c6a1b304d699c6bf1 /src/osmo-bts-litecell15/l1_if.c | |
parent | 16b4179fbeaf3289e7aa41e4f9a0ac5d9d6206f6 (diff) |
Fix AMR HR DTX FSM logic.
Fix SID_FIRST_INH detection during speech and when SID_FIRST is interrupted by FACCH.
Fix SID_UPDATE_INH detection during silence and when SID_UPDATE is interrupted by FACCH.
Add a delay for SID_FIRST to appear at the right time after FACCH.
Fix extra byte sent in downlink for SID_FIRST and SID_UPDATE.
Change-Id: Ia811305e15541f2376005df736bd610e8b0d2f69
Diffstat (limited to 'src/osmo-bts-litecell15/l1_if.c')
-rw-r--r-- | src/osmo-bts-litecell15/l1_if.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c index e1dcecfd..5977aa9f 100644 --- a/src/osmo-bts-litecell15/l1_if.c +++ b/src/osmo-bts-litecell15/l1_if.c @@ -410,7 +410,9 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, memcpy(l1p->u.phDataReq.msgUnitParam.u8Buffer, lchan->tch.dtx.facch, msgb_l2len(msg)); else if (dtx_dl_amr_enabled(lchan) && - lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) { + ((lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) || + (lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F) || + (lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F))) { if (sapi == GsmL1_Sapi_FacchF) { sapi = GsmL1_Sapi_TchF; } @@ -424,9 +426,16 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg, /* cache FACCH data */ memcpy(lchan->tch.dtx.facch, msg->l2h, msgb_l2len(msg)); - /* prepare ONSET message */ - l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = - GsmL1_TchPlType_Amr_Onset; + /* prepare ONSET or INH message */ + if(lchan->tch.dtx.dl_amr_fsm->state == ST_ONSET_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_Onset; + else if(lchan->tch.dtx.dl_amr_fsm->state == ST_U_INH_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_SidUpdateInH; + else if(lchan->tch.dtx.dl_amr_fsm->state == ST_F1_INH_F) + l1p->u.phDataReq.msgUnitParam.u8Buffer[0] = + GsmL1_TchPlType_Amr_SidFirstInH; /* ignored CMR/CMI pair */ l1p->u.phDataReq.msgUnitParam.u8Buffer[1] = 0; l1p->u.phDataReq.msgUnitParam.u8Buffer[2] = 0; |