aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMychaela N. Falconia <falcon@freecalypso.org>2023-05-23 19:36:07 +0000
committerlaforge <laforge@osmocom.org>2023-05-27 10:24:09 +0000
commit44d47b2cddfdab738ad91a8e94f8eb78cd8e23f9 (patch)
tree51f174214bc2ace5d23dc6f384bfbb2f4f073c99
parent4b945ec3279a4d95516979da05f02fa76f153eb6 (diff)
trx, HR1 codec: change UL PHY output format to TS 101 318
As a preliminary step before making the RTP output format from OsmoBTS configurable with a vty option, we need to make the internal format consistent across all models. The "natural" output from a "pure" GSM 05.03 channel decoder is TS 101 318, which is also the output format of all currently supported proprietary PHYs - adopt it as our internal format. Related: OS#5688 Depends: I6e75ca95409b5c368e8e04d0e0aba41e0331d9e6 (libosmocore) Change-Id: I41bce6226964975cb85aea89e4c0f9e11e4929b8
-rw-r--r--TODO-RELEASE3
-rw-r--r--src/osmo-bts-trx/sched_lchan_tchh.c13
2 files changed, 7 insertions, 9 deletions
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 676f1484..47947da5 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -10,4 +10,5 @@
libosmocodec >1.8.0 osmo_efr_check_sid() new function
libosmogsm >1.8.0 <osmocom/gsm/protocol/gsm_44_060.h> added
libosmocoding >1.8.0 gsm0503_tch_hr_encode() extended to accept
- TS 101 318 format
+ TS 101 318 format;
+ gsm0503_tch_hr_decode2() new function
diff --git a/src/osmo-bts-trx/sched_lchan_tchh.c b/src/osmo-bts-trx/sched_lchan_tchh.c
index 5872c33e..c6c2cd02 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -181,14 +181,11 @@ int rx_tchh_fn(struct l1sched_ts *l1ts, const struct trx_ul_burst_ind *bi)
meas_avg_mode = SCHED_MEAS_AVG_M_S6N6;
/* fall-through */
case GSM48_CMODE_SPEECH_V1: /* HR or signalling */
- rc = gsm0503_tch_hr_decode(tch_data, *bursts_p,
- !sched_tchh_ul_facch_map[bi->fn % 26],
- &n_errors, &n_bits_total);
- if (rc == GSM_HR_BYTES_RTP_RFC5993) { /* only for valid *speech* frames */
- /* gsm0503_tch_hr_decode() prepends a ToC octet (see RFC5993), skip it */
- bool is_sid = osmo_hr_check_sid(&tch_data[1], GSM_HR_BYTES);
- if (is_sid) /* Mark SID frames as such: F = 0, FT = 010 */
- tch_data[0] = (0x02 << 4);
+ rc = gsm0503_tch_hr_decode2(tch_data, *bursts_p,
+ !sched_tchh_ul_facch_map[bi->fn % 26],
+ &n_errors, &n_bits_total);
+ if (rc == GSM_HR_BYTES) { /* only for valid *speech* frames */
+ bool is_sid = osmo_hr_check_sid(tch_data, GSM_HR_BYTES);
lchan_set_marker(is_sid, lchan); /* DTXu */
}
break;