diff options
author | Vadim Yanitskiy <axilirator@gmail.com> | 2018-08-13 04:19:04 +0700 |
---|---|---|
committer | Vadim Yanitskiy <axilirator@gmail.com> | 2018-08-15 08:22:14 +0700 |
commit | 7c4151ae52688d46894f3a5dc99464412ae802da (patch) | |
tree | d9a5f43b516867172042dc03c89d14038c38cdff /src | |
parent | 3cbbe81b632c3ae16a070951336cb6052cb56126 (diff) |
trxcon/scheduler: fix: properly generate BFI for TCH/H
When relying on GSM 04.08 channel mode (GSM48_CMODE_*), one should
distinguish between Bm (full rate) and Lm (half rate) channels.
This change prevents the scheduler from generating TCH/F BFI
instead of TCH/H BFI on the corresponding channels.
Change-Id: I4547aa7f6d38637692fef8a0122e85fb52039a46
Diffstat (limited to 'src')
-rw-r--r-- | src/host/trxcon/sched_lchan_common.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/host/trxcon/sched_lchan_common.c b/src/host/trxcon/sched_lchan_common.c index 03cdc67c..76a32fe0 100644 --- a/src/host/trxcon/sched_lchan_common.c +++ b/src/host/trxcon/sched_lchan_common.c @@ -151,10 +151,16 @@ size_t sched_bad_frame_ind(uint8_t *l2, struct trx_lchan_state *lchan) switch (lchan->tch_mode) { case GSM48_CMODE_SIGN: - case GSM48_CMODE_SPEECH_V1: /* Full Rate */ - memset(l2, 0x00, GSM_FR_BYTES); - l2[0] = 0xd0; - return GSM_FR_BYTES; + case GSM48_CMODE_SPEECH_V1: + if (lchan->type == TRXC_TCHF) { /* Full Rate */ + memset(l2, 0x00, GSM_FR_BYTES); + l2[0] = 0xd0; + return GSM_FR_BYTES; + } else { /* Half Rate */ + memset(l2 + 1, 0x00, GSM_HR_BYTES); + l2[0] = 0x70; /* F = 0, FT = 111 */ + return GSM_HR_BYTES + 1; + } case GSM48_CMODE_SPEECH_EFR: /* Enhanced Full Rate */ memset(l2, 0x00, GSM_EFR_BYTES); l2[0] = 0xc0; |