Hello Jenkins Builder,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/osmo-bts/+/30523
to look at the new patch set (#7).
Change subject: l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
......................................................................
l1sap: Accept RFC5993 and TS 101.318 HR GSM payload
Unfotunately there are two different RTP formats for HR GSM specified
and it is unclear which should be used with GSM networks. Also esch BTS
model may have a preference for either one or the other format.
Lets set internal flags to determine the preference for each BTS model
and then lets use this information to convert incoming RTP packets into
the prefered format. Doing so we will make sure that always both formats
are accepted.
Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c
Related: OS#5688
---
M src/common/l1sap.c
M src/osmo-bts-lc15/main.c
M src/osmo-bts-oc2g/main.c
M src/osmo-bts-sysmo/main.c
M src/osmo-bts-trx/main.c
M src/osmo-bts-virtual/main.c
6 files changed, 66 insertions(+), 4 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/23/30523/7
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30523
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I17f0b546042fa333780fd2f5c315898ab0df574c
Gerrit-Change-Number: 30523
Gerrit-PatchSet: 7
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: newpatchset
dexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/30629 )
Change subject: rsl: allow configuration of HR GSM RTP format via CHANNEL ACTIVATE
......................................................................
rsl: allow configuration of HR GSM RTP format via CHANNEL ACTIVATE
Unfortunately there are two different RTP formats (RFC5993 and TS 101.318)
for HR GSM specified and it is unclear which should be used with GSM
networks. Also esch BTS model may have a preference for either one or the
other format. We already accept both formats but we do not have a way to
select the transmitting format yet. Lets add a new RSL IE to control which
format is used.
Change-Id: Id53ebebdf987fc59cf4e38bcddb75663fd7bb8fc
Related: OS#5688
---
M include/osmo-bts/bts.h
M include/osmo-bts/lchan.h
M src/common/l1sap.c
M src/common/rsl.c
4 files changed, 54 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/29/30629/1
diff --git a/include/osmo-bts/bts.h b/include/osmo-bts/bts.h
index bd66443..8b7bc57 100644
--- a/include/osmo-bts/bts.h
+++ b/include/osmo-bts/bts.h
@@ -65,6 +65,11 @@
#define BTS_INTERNAL_FLAG_NM_RCHANNEL_DEPENDS_RCARRIER (1 << 2)
/* Whether the BTS model reports interference measurements to L1SAP. */
#define BTS_INTERNAL_FLAG_INTERF_MEAS (1 << 3)
+/* Whether the BTS model supports HR GSM RTP payload in
+ * GSM ETSI TS.101.138 (TIPHON) format */
+#define BTS_INTERNAL_FLAG_SPEECH_H_V1_TS101318 (1 << 4)
+/* Whether the BTS model supports HR GSM RTP payload in RFC 5883 format */
+#define BTS_INTERNAL_FLAG_SPEECH_H_V1_RFC5993 (1 << 5)
/* BTS implementation flags (internal use, not exposed via OML) */
#define bts_internal_flag_get(bts, flag) \
diff --git a/include/osmo-bts/lchan.h b/include/osmo-bts/lchan.h
index d89aa1f..4a3215c 100644
--- a/include/osmo-bts/lchan.h
+++ b/include/osmo-bts/lchan.h
@@ -133,6 +133,12 @@
uint8_t current;
};
+enum hr_hsm_rtp_fmt {
+ RTP_FMT_NATIVE,
+ RTP_FMT_SPEECH_H_V1_TS101318,
+ RTP_FMT_SPEECH_H_V1_RFC5993,
+};
+
struct gsm_lchan {
/* The TS that we're part of */
struct gsm_bts_trx_ts *ts;
@@ -164,6 +170,7 @@
uint8_t rtp_payload;
uint8_t rtp_payload2;
uint8_t speech_mode;
+ bool rtp_hr_rfc5993;
struct {
bool use;
uint8_t local_cid;
@@ -311,6 +318,9 @@
struct abis_rsl_osmo_temp_ovp_acch_cap top_acch_cap;
bool top_acch_active;
+ /* HR GSM RTP format setting. This sets the RTP format the BTS emits. */
+ enum hr_hsm_rtp_fmt hr_hsm_rtp_fmt;
+
struct msgb *pending_rel_ind_msg;
/* ECU (Error Concealment Unit) state */
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 410fb91..d24161f 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1625,6 +1625,16 @@
msgb_pull_to_l2(msg);
+ /* Convert GSM HR RTP to the output format that was specified by the BSC via RSL */
+ if (lchan->tch_mode == GSM48_CMODE_SPEECH_V1 && lchan->type == GSM_LCHAN_TCH_H) {
+ if (lchan->hr_hsm_rtp_fmt == RTP_FMT_SPEECH_H_V1_TS101318 && msg->len == GSM_HR_BYTES + 1) {
+ msgb_pull(msg, 1);
+ } else if (lchan->hr_hsm_rtp_fmt == RTP_FMT_SPEECH_H_V1_RFC5993 && msg->len == GSM_HR_BYTES) {
+ msgb_push(msg, 1);
+ msg->data[0] = 0x00;
+ }
+ }
+
/* Low level layers always call us when TCH content is expected, even if
* the content is not available due to decoding issues. Content not
* available is expected as empty payload. We also check if quality is
diff --git a/src/common/rsl.c b/src/common/rsl.c
index 91af6cb..214cb51 100644
--- a/src/common/rsl.c
+++ b/src/common/rsl.c
@@ -1618,6 +1618,29 @@
return 0;
}
+/* Parse RSL_IE_OSMO_HR_GSM_RTP_FMT */
+static int parse_hr_gsm_fmt_setting(struct gsm_lchan *lchan, const struct tlv_parsed *tp)
+{
+ /* When the TLV is not present the BTS will emit RTP packets in the format it natively supports. (e.g. for
+ * osmo-bts-trx this will be RFC 5993) */
+ if (!TLVP_PRES_LEN(tp, RSL_IE_OSMO_HR_GSM_RTP_FMT, 1)) {
+ lchan->hr_hsm_rtp_fmt = RTP_FMT_NATIVE;
+ return 0;
+ }
+
+ if (TLVP_VAL(tp, RSL_IE_OSMO_HR_GSM_RTP_FMT)[0] == 0x00) {
+ lchan->hr_hsm_rtp_fmt = RTP_FMT_SPEECH_H_V1_TS101318;
+ } else if (TLVP_VAL(tp, RSL_IE_OSMO_HR_GSM_RTP_FMT)[0] == 0x01) {
+ lchan->hr_hsm_rtp_fmt = RTP_FMT_SPEECH_H_V1_RFC5993;
+ } else {
+ LOGP(DRSL, LOGL_ERROR, "ignoring unknown HR GSM RTP format %02x!\n",
+ TLVP_VAL(tp, RSL_IE_OSMO_HR_GSM_RTP_FMT)[0]);
+ lchan->hr_hsm_rtp_fmt = RTP_FMT_NATIVE;
+ }
+
+ return 0;
+}
+
/* Parse (O) MultiRate configuration IE (see 9.3.52) */
static int parse_multirate_config(struct gsm_lchan *lchan,
const struct tlv_parsed *tp)
@@ -1967,6 +1990,9 @@
rc = parse_temporary_overpower_acch_capability(lchan, &tp);
if (rc < 0)
return rsl_tx_chan_act_acknack(lchan, -rc);
+ rc = parse_hr_gsm_fmt_setting(lchan, &tp);
+ if (rc < 0)
+ return rsl_tx_chan_act_acknack(lchan, -rc);
/* Take the first ACCH overpower decision (if allowed): it can be
* enabled immediately if the RxQual threshold is disabled (0). */
@@ -2239,6 +2265,9 @@
rc = parse_temporary_overpower_acch_capability(lchan, &tp);
if (rc < 0)
return rsl_tx_mode_modif_nack(lchan, -rc);
+ rc = parse_hr_gsm_fmt_setting(lchan, &tp);
+ if (rc < 0)
+ return rsl_tx_mode_modif_nack(lchan, -rc);
/* Immediately disable ACCH overpower if the value is 0 dB,
* or enable if the RxQual threshold becomes disabled (0). */
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/30629
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: Id53ebebdf987fc59cf4e38bcddb75663fd7bb8fc
Gerrit-Change-Number: 30629
Gerrit-PatchSet: 1
Gerrit-Owner: dexter <pmaier(a)sysmocom.de>
Gerrit-MessageType: newchange
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30568 )
Change subject: Get rid of tbf->first_ts
......................................................................
Patch Set 2: Code-Review+2
(1 comment)
Commit Message:
https://gerrit.osmocom.org/c/osmo-pcu/+/30568/comment/ce26587c_84c67ce0
PS1, Line 9: quickly
> Yes, I checked this is not used in hot code paths. […]
Ok, thanks!
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30568
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I5d2f665f648f8637466bfdd3bf7b924cb61ede33
Gerrit-Change-Number: 30568
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Dec 2022 21:59:12 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-pcu/+/30620 )
Change subject: Convert tbf->control_ts to be a gprs_rlcmac_pdch*
......................................................................
Patch Set 2:
(2 comments)
File src/pdch.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/30620/comment/69110a5b_dbe74e5a
PS2, Line 1316: ts == pdch
Same here: comparing foo_ts to pdch may look confusing, so it's better to have a unified naming by doing s/_ts/_pdch/.
File tests/alloc/AllocTest.cpp:
https://gerrit.osmocom.org/c/osmo-pcu/+/30620/comment/d1481da6_22451d8d
PS2, Line 186: tbf->control_ts
Maybe move NULL checking to pdch_name()? This way one could pass PDCH pointers directly without worrying if it's NULL.
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/30620
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: I6a97b6528b2f9d78dfbca8fb97ab7c621f777fc7
Gerrit-Change-Number: 30620
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 15 Dec 2022 21:52:55 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment