falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32969 )
Change subject: trx, HR1 codec: change UL PHY output format to TS 101 318
......................................................................
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
---
M TODO-RELEASE
M src/osmo-bts-trx/sched_lchan_tchh.c
2 files changed, 25 insertions(+), 9 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/69/32969/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 676f148..47947da 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 5872c33..c6c2cd0 100644
--- a/src/osmo-bts-trx/sched_lchan_tchh.c
+++ b/src/osmo-bts-trx/sched_lchan_tchh.c
@@ -181,14 +181,11 @@
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;
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32969
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I41bce6226964975cb85aea89e4c0f9e11e4929b8
Gerrit-Change-Number: 32969
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newchange
falconia has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/32968 )
Change subject: all models, HR1 codec: accept both TS101318 and RFC5993 formats
......................................................................
all models, HR1 codec: accept both TS101318 and RFC5993 formats
There exist two different RTP encoding formats for HR1 codec: one
"simple" format defined in ETSI TS 101 318, and an extended format
(adding a ToC octet) defined in IETF RFC 5993. Following the
liberal-accept clause of Postel's law, we would like to accept
both formats. Implement this feature by first converting all HR1
RTP inputs to the more basic TS 101 318 format at the point of
input preening, and then consistently using this basic format
internally.
Related: OS#5688
Depends: I13eaad366f9f68615b9e9e4a5f87396a0e9dea0f (libosmocore)
Change-Id: I702e26c3ad5b9d8347e73c6cd23efa38a3a3407e
---
M TODO-RELEASE
M src/common/l1sap.c
2 files changed, 46 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/68/32968/1
diff --git a/TODO-RELEASE b/TODO-RELEASE
index 88ad00d..676f148 100644
--- a/TODO-RELEASE
+++ b/TODO-RELEASE
@@ -9,3 +9,5 @@
#library what description / commit summary line
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
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index f24bc2f..75bc795 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1261,6 +1261,29 @@
return osmo_efr_sid_preen(msg->data);
}
+static bool rtppayload_validate_hr(struct msgb *msg)
+{
+ switch (msg->len) {
+ case GSM_HR_BYTES:
+ /* RTP input matches our internal format - we are good */
+ return true;
+ case GSM_HR_BYTES_RTP_RFC5993:
+ /* Strip ToC octet, leaving only "pure" TS 101 318 payload.
+ * Unfortunately the obvious way of msgb_pull(msg, 1);
+ * does not work: the code in l1sap_tch_rts_ind() will
+ * add a struct osmo_phsap_prim header with msgb_push(),
+ * and if we were to remove the ToC octet with msgb_pull(),
+ * that l1sap header will become misaligned, causing severe
+ * performance problems at least on sysmoBTS.
+ * Thus we have to do it in a convoluted way instead. */
+ memmove(msg->data, msg->data + 1, GSM_HR_BYTES);
+ msgb_get(msg, 1);
+ return true;
+ default:
+ return false;
+ }
+}
+
static bool rtppayload_is_valid(struct gsm_lchan *lchan, struct msgb *resp_msg)
{
/* If rtp continuous-streaming is enabled, we shall emit RTP packets
@@ -1280,7 +1303,7 @@
if (lchan->type == GSM_LCHAN_TCH_F)
return rtppayload_validate_fr(resp_msg);
else
- return true; /* FIXME: implement preening for HR1 */
+ return rtppayload_validate_hr(resp_msg);
case GSM48_CMODE_SPEECH_EFR:
return rtppayload_validate_efr(resp_msg);
case GSM48_CMODE_SPEECH_AMR:
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/32968
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I702e26c3ad5b9d8347e73c6cd23efa38a3a3407e
Gerrit-Change-Number: 32968
Gerrit-PatchSet: 1
Gerrit-Owner: falconia <falcon(a)freecalypso.org>
Gerrit-MessageType: newchange
Attention is currently required from: jolly, laforge, pespin.
fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647 )
Change subject: GSM_RR_Types: Add support for VBS/VGCS related L3 RR messages
......................................................................
Patch Set 2: Code-Review-1
(8 comments)
Patchset:
PS2:
CR-1 due to missing `PRESENCE` attributes.
File library/GSM_RR_Types.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/763acc1f_f998…
PS2, Line 590: HEX1
Below in `UplinkAccessIndTV` you're using `uint4_t`. Maybe use it here too or use HEX1 everywhere for the sake of consistency?
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/da7a5d1e_72e1…
PS2, Line 597: } with { variant "TAG(cksn, tag = 'B'H)" };
> doesn't this belong in line 592?
No, it's correct. This reads as: the optional `cksn` TV field is present if the `tag` field within this field is equal to 'B'H. Alternatively, you could have defined this as follows:
```
type record CipheringKeySeqNrTV {
HEX1 tag,
CipheringKeySeqNr cksn
} with { variant "PRESENCE(tag = 'B'H)" };
```
I find this a bit more readable and less confusing.
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/72a46853_7c59…
PS2, Line 650: } with { variant (len) "LENGTHTO(es,spare,uai_rach,priority)" };
Please add `variant "PRESENCE(iei = '31'O)"`.
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/ea1f5abb_ec16…
PS2, Line 656: } with { variant "" };
Missing `variant "PRESENCE(iei = '32'O)"`.
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/2b058380_1592…
PS2, Line 663: } with { variant (len) "LENGTHTO(talker_id)" };
Missing `variant "PRESENCE(iei = '33'O)"`.
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/281270bd_31dd…
PS2, Line 670: } with { variant "" };
Missing `variant "PRESENCE(iei = 8)"`.
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/da299fa9_74cb…
PS2, Line 690:
ws
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I79ca7ee2b94bb370cd7162cfd9db436049998041
Gerrit-Change-Number: 32647
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Tue, 23 May 2023 21:00:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: jolly, laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/32933 )
Change subject: Add support for sending Bter UI frames at lapdm.c
......................................................................
Patch Set 1:
(1 comment)
File src/gsm/lapdm.c:
https://gerrit.osmocom.org/c/libosmocore/+/32933/comment/05ec2dd3_ab1d2c62
PS1, Line 1032: int len
> pespin: please don't resolve with ack!
sorry, gerrit just marks it automatically and sometimes I forget to unmark it :/
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/32933
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia3a25c009d1ff09f83258bdb226a85b81466d7a1
Gerrit-Change-Number: 32933
Gerrit-PatchSet: 1
Gerrit-Owner: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 23 May 2023 20:13:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: jolly, laforge.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647 )
Change subject: GSM_RR_Types: Add support for VBS/VGCS related L3 RR messages
......................................................................
Patch Set 2:
(1 comment)
File library/GSM_RR_Types.ttcn:
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647/comment/f362c93c_ceb1…
PS2, Line 597: } with { variant "TAG(cksn, tag = 'B'H)" };
doesn't this belong in line 592?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/32647
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I79ca7ee2b94bb370cd7162cfd9db436049998041
Gerrit-Change-Number: 32647
Gerrit-PatchSet: 2
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: jolly <andreas(a)eversberg.eu>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: jolly <andreas(a)eversberg.eu>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Comment-Date: Tue, 23 May 2023 20:10:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment