fixeria has uploaded this change for review.
osmo-bts-trx: rx_tchh_fn(): fix HR SID detection (wrong offset)
For some reason, gsm0503_tch_hr_decode() outputs frames with length
of 15 bytes (120 bits), while according to TS 101 318, section 5.2
the GSM half rate codec has frame length of 14 bytes (112 bits).
osmo_hr_check_sid() follows TS 101 318 and expects a buffer of
14 bytes (112 bits), so we should skip the first octet prepended
by tch_hr_reassemble().
Change-Id: Ie5fa776dcb2b2203a97aed56ecbf2450af7d87c1
Related: SYS#5853
---
M src/osmo-bts-trx/sched_lchan_tchh.c
1 file changed, 2 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/30/27430/1
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 6252afd..afe68c4 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -147,8 +147,9 @@
*/
rc = gsm0503_tch_hr_decode(tch_data, *bursts_p,
fn_is_odd, &n_errors, &n_bits_total);
+ /* gsm0503_tch_hr_decode() prepends an additional 0x00 octet, skip it */
if (rc == (GSM_HR_BYTES + 1)) /* DTXu */
- lchan_set_marker(osmo_hr_check_sid(tch_data, rc), lchan);
+ lchan_set_marker(osmo_hr_check_sid(&tch_data[1], rc - 1), lchan);
break;
case GSM48_CMODE_SPEECH_AMR: /* AMR */
/* the first FN 0,8,17 or 1,9,18 defines that CMI is included
To view, visit change 27430. To unsubscribe, or for help writing mail filters, visit settings.