From bce25a60f4bbd798b98727e66b25bf343031f7bc Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 26 Oct 2016 17:28:42 +0200 Subject: DTX DL: split ONSET state handling Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Note: this requires patch for OpenBSC which adds FACCH buffer to tch.dtx struct. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802 --- src/osmo-bts-litecell15/tch.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/osmo-bts-litecell15/tch.c') diff --git a/src/osmo-bts-litecell15/tch.c b/src/osmo-bts-litecell15/tch.c index b2513887..70764f5f 100644 --- a/src/osmo-bts-litecell15/tch.c +++ b/src/osmo-bts-litecell15/tch.c @@ -285,10 +285,9 @@ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, /* DTX DL-specific logic below: */ switch (lchan->tch.dtx.dl_amr_fsm->state) { case ST_ONSET_V: - case ST_ONSET_F: *payload_type = GsmL1_TchPlType_Amr_Onset; dtx_cache_payload(lchan, rtp_pl, rtp_pl_len, fn, 0); - *len = 1; + *len = 3; return 1; case ST_VOICE: *payload_type = GsmL1_TchPlType_Amr; @@ -306,6 +305,9 @@ int l1if_tch_encode(struct gsm_lchan *lchan, uint8_t *data, uint8_t *len, *payload_type = GsmL1_TchPlType_Amr; rtppayload_to_l1_amr(l1_payload + 2, rtp_pl, rtp_pl_len, ft); + /* force STI bit to 0 to make sure resume after FACCH + works properly */ + l1_payload[6 + 2] &= ~16; return 0; case ST_SID_F2: *payload_type = GsmL1_TchPlType_Amr; -- cgit v1.2.3