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
This commit is contained in:
Mychaela N. Falconia 2023-05-23 19:36:07 +00:00 committed by laforge
parent 4b945ec327
commit 44d47b2cdd
2 changed files with 7 additions and 9 deletions

View File

@ -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

View File

@ -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;