aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-litecell15/l1_if.c
diff options
context:
space:
mode:
authorMax <msuraev@sysmocom.de>2016-10-03 17:37:45 +0200
committerHarald Welte <laforge@gnumonks.org>2016-10-13 06:58:06 +0000
commitbabd05661d13b12234e848acf9c4bff909ef05f4 (patch)
tree656168076a94b5a430d2b0c1d856011e3b4c6a4d /src/osmo-bts-litecell15/l1_if.c
parentc09e5a44c3c1c2882339fe8822f373b1e12839ae (diff)
DTX DL: use FSM for AMR
Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - sync with corresponding changes in OpenBSC's - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31
Diffstat (limited to 'src/osmo-bts-litecell15/l1_if.c')
-rw-r--r--src/osmo-bts-litecell15/l1_if.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/osmo-bts-litecell15/l1_if.c b/src/osmo-bts-litecell15/l1_if.c
index 1c989518..f47634ed 100644
--- a/src/osmo-bts-litecell15/l1_if.c
+++ b/src/osmo-bts-litecell15/l1_if.c
@@ -426,7 +426,7 @@ static int ph_data_req(struct gsm_bts_trx *trx, struct msgb *msg,
}
static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
- struct osmo_phsap_prim *l1sap)
+ struct osmo_phsap_prim *l1sap, bool use_cache, bool marker)
{
struct lc15l1_hdl *fl1 = trx_lc15l1_hdl(trx);
struct gsm_lchan *lchan;
@@ -462,7 +462,7 @@ static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
rc = l1if_tch_encode(lchan,
l1p->u.phDataReq.msgUnitParam.u8Buffer,
&l1p->u.phDataReq.msgUnitParam.u8Size,
- msg->data, msg->len, u32Fn,
+ msg->data, msg->len, u32Fn, use_cache,
l1sap->u.tch.marker);
if (rc < 0) {
/* no data encoded for L1: smth will be generated below */
@@ -494,16 +494,14 @@ static int ph_tch_req(struct gsm_bts_trx *trx, struct msgb *msg,
} else {
/* empty frame */
if (trx->bts->dtxd && trx != trx->bts->c0)
- lchan->tch.dtxd_active = true;
+ lchan->tch.dtx.dl_active = true;
empty_req_from_l1sap(l1p, fl1, u8Tn, u32Fn, sapi, subCh, u8BlockNbr);
}
/* send message to DSP's queue */
osmo_wqueue_enqueue(&fl1->write_q[MQ_L1_WRITE], nmsg);
- if (l1sap->u.tch.marker) { /* DTX: send voice after ONSET was sent */
- l1sap->u.tch.marker = 0;
- return ph_tch_req(trx, l1sap->oph.msg, l1sap);
- }
+ if (rc > 0 && trx->bts->dtxd) /* DTX: send voice after ONSET was sent */
+ return ph_tch_req(trx, l1sap->oph.msg, l1sap, true, false);
return 0;
}
@@ -571,7 +569,7 @@ int bts_model_l1sap_down(struct gsm_bts_trx *trx, struct osmo_phsap_prim *l1sap)
rc = ph_data_req(trx, msg, l1sap);
break;
case OSMO_PRIM(PRIM_TCH, PRIM_OP_REQUEST):
- rc = ph_tch_req(trx, msg, l1sap);
+ rc = ph_tch_req(trx, msg, l1sap, false, l1sap->u.tch.marker);
break;
case OSMO_PRIM(PRIM_MPH_INFO, PRIM_OP_REQUEST):
rc = mph_info_req(trx, msg, l1sap);