lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

September 2024

  • 1 participants
  • 1983 discussions
[M] Change in libosmo-abis[master]: trau2rtp: add CSD support
by laforge 15 Sep '24

15 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38132?usp=email ) Change subject: trau2rtp: add CSD support ...................................................................... trau2rtp: add CSD support TRAU frame formats are defined for both speech and data; classic E1 BTSes implement CSD with TRAU data frames on Abis. Support converting these TRAU data frames to RTP clearmode representation, essentially replicating the Rate Adaptor part of standard TRAU. Change-Id: Ibc062c7297899fab106b3dbab301e665422a0d8b --- M src/trau/trau_rtp_conv.c 1 file changed, 120 insertions(+), 1 deletion(-) Approvals: fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/trau/trau_rtp_conv.c b/src/trau/trau_rtp_conv.c index d149264..9113f10 100644 --- a/src/trau/trau_rtp_conv.c +++ b/src/trau/trau_rtp_conv.c @@ -31,6 +31,9 @@ #include <osmocom/trau/trau_frame.h> #include <osmocom/trau/trau_rtp.h> +/* RFC4040 "clearmode" RTP payload length */ +#define RFC4040_RTP_PLEN 160 + /* this corresponds to the bit-lengths of the individual codec * parameters as indicated in Table 1.1 of TS 46.010 */ static const uint8_t gsm_fr_map[] = { @@ -46,7 +49,6 @@ 3, 3, 3, 3 }; - /* * EFR TRAU parity (also used for HR) * @@ -942,6 +944,117 @@ } #endif +/* + * CSD support: converting TRAU frames of type 'data' to 64 kbit/s + * like the RA part of TRAU, using RTP clearmode representation. + */ + +static void trau2v110_bits(ubit_t *out, const ubit_t *in) +{ + int i; + + /* the first 8 bits are sync zeros */ + memset(out, 0, 8); + out += 8; + /* for the rest, we have to expand 63 bits into 72 */ + for (i = 0; i < 9; i++) { + *out++ = 1; + memcpy(out, in, 7); + in += 7; + out += 7; + } +} + +/* intermediate rate 8 kbit/s */ +static void trau2v110_ir8(uint8_t *out, const ubit_t *in) +{ + ubit_t ra_bits[80]; + int i; + + trau2v110_bits(ra_bits, in); + + /* RA2: 1 bit per output byte */ + for (i = 0; i < 80; i++) + out[i] = 0x7F | (ra_bits[i] << 7); +} + +/* intermediate rate 16 kbit/s */ +static void trau2v110_ir16(uint8_t *out, const ubit_t *in) +{ + ubit_t ra_bits[80]; + int i, o; + uint8_t b; + + trau2v110_bits(ra_bits, in); + + /* RA2: 2 bits per output byte */ + i = 0; + for (o = 0; o < 40; o++) { + b = 0x3F; + b |= (ra_bits[i++] << 7); + b |= (ra_bits[i++] << 6); + out[o] = b; + } +} + +static int trau2rtp_data_fr(uint8_t *out, size_t out_len, + const struct osmo_trau_frame *tf) +{ + /* function interface preliminaries */ + if (tf->type != OSMO_TRAU16_FT_DATA) + return -EINVAL; + if (out_len < RFC4040_RTP_PLEN) + return -ENOSPC; + + /* Is it TCH/F9.6 with 16 kbit/s IR, + * or TCH/F4.8 or TCH/F2.4 with 8 kbit/s IR? */ + if (tf->c_bits[5]) { + trau2v110_ir16(out, tf->d_bits); + trau2v110_ir16(out + 40, tf->d_bits + 63); + trau2v110_ir16(out + 80, tf->d_bits + 63 * 2); + trau2v110_ir16(out + 120, tf->d_bits + 63 * 3); + } else { + trau2v110_ir8(out, tf->d_bits); + trau2v110_ir8(out + 80, tf->d_bits + 63 * 2); + } + + return RFC4040_RTP_PLEN; +} + +static int trau2rtp_data_hr16(uint8_t *out, size_t out_len, + const struct osmo_trau_frame *tf) +{ + /* function interface preliminaries */ + if (tf->type != OSMO_TRAU16_FT_DATA_HR) + return -EINVAL; + if (out_len < RFC4040_RTP_PLEN) + return -ENOSPC; + + /* Note that Osmocom trau_frame decoding and encoding API + * puts the second reduced V.110 frame at d_bits position 63, + * unlike 8 kbit/s IR in FR-data frame type where it resides + * at d_bits position 63 * 2. */ + trau2v110_ir8(out, tf->d_bits); + trau2v110_ir8(out + 80, tf->d_bits + 63); + + return RFC4040_RTP_PLEN; +} + +static int trau2rtp_data_hr8(uint8_t *out, size_t out_len, + const struct osmo_trau_frame *tf) +{ + /* function interface preliminaries */ + if (tf->type != OSMO_TRAU8_DATA) + return -EINVAL; + if (out_len < RFC4040_RTP_PLEN) + return -ENOSPC; + + trau2v110_ir8(out, tf->d_bits); + trau2v110_ir8(out + 80, tf->d_bits + 63); + + return RFC4040_RTP_PLEN; +} + static inline bool check_twts001(struct osmo_trau2rtp_state *st) { if (st->rtp_extensions & OSMO_RTP_EXT_TWTS001) @@ -968,8 +1081,14 @@ return trau2rtp_efr(out, out_len, tf, check_twts001(st)); case OSMO_TRAU16_FT_HR: return trau2rtp_hr16(out, out_len, tf, check_twts002(st)); + case OSMO_TRAU16_FT_DATA: + return trau2rtp_data_fr(out, out_len, tf); + case OSMO_TRAU16_FT_DATA_HR: + return trau2rtp_data_hr16(out, out_len, tf); case OSMO_TRAU8_SPEECH: return trau2rtp_hr8(out, out_len, tf, check_twts002(st)); + case OSMO_TRAU8_DATA: + return trau2rtp_data_hr8(out, out_len, tf); default: return -EINVAL; } -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38132?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ibc062c7297899fab106b3dbab301e665422a0d8b Gerrit-Change-Number: 38132 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
1 0
0 0
[XS] Change in libosmo-abis[master]: tests: fix for --disable-ortp
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38137?usp=email ) Change subject: tests: fix for --disable-ortp ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38137?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I3c59cfab78f58935a5ab6ce7b5f0ed8aadd853a8 Gerrit-Change-Number: 38137 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:26:07 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: rtp2trau: add CSD support
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38133?usp=email ) Change subject: rtp2trau: add CSD support ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38133?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ifa1a671f3797a22523bef4b5712d91d0131cdef7 Gerrit-Change-Number: 38133 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:25:48 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[M] Change in libosmo-abis[master]: trau2rtp: add CSD support
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38132?usp=email ) Change subject: trau2rtp: add CSD support ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38132?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: Ibc062c7297899fab106b3dbab301e665422a0d8b Gerrit-Change-Number: 38132 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:25:33 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-abis[master]: osmo_trau_frame_decode_8k: check all sync bits
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: falconia, fixeria. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38130?usp=email ) Change subject: osmo_trau_frame_decode_8k: check all sync bits ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38130?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I47b055b4d3b92f018508fd7baa0784dfcabe6262 Gerrit-Change-Number: 38130 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:24:58 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-abis[master]: osmo_trau_frame_decode_8k: fix recognition of O&M UL
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38131?usp=email ) Change subject: osmo_trau_frame_decode_8k: fix recognition of O&M UL ...................................................................... Patch Set 2: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38131?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I16c6b598ce5c843b5306aa69592a7d66723622d4 Gerrit-Change-Number: 38131 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:24:50 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[XS] Change in libosmo-abis[master]: osmo_trau_frame_decode_8k: check all sync bits
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: falconia, fixeria. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38130?usp=email ) Change subject: osmo_trau_frame_decode_8k: check all sync bits ...................................................................... Patch Set 2: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38130?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I47b055b4d3b92f018508fd7baa0784dfcabe6262 Gerrit-Change-Number: 38130 Gerrit-PatchSet: 2 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:22:44 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-abis[master]: trau_frame: fix de/encoding of HR-data-8k frames
by laforge 15 Sep '24

15 Sep '24
laforge has submitted this change. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38129?usp=email ) Change subject: trau_frame: fix de/encoding of HR-data-8k frames ...................................................................... trau_frame: fix de/encoding of HR-data-8k frames Functions for decoding and encoding HR-data TRAU frames in 8 kbit/s submultiplexing, accessible via osmo_trau_frame_encode() and osmo_trau_frame_decode_8k() public APIs, were broken: movement of data bits was wrong, and in the encoding direction the setting of the last sync bit was missed. Change-Id: I051b0b70adffcc473dcbb42a555c19088973cc90 --- M src/trau/trau_frame.c 1 file changed, 9 insertions(+), 7 deletions(-) Approvals: Jenkins Builder: Verified fixeria: Looks good to me, but someone else must approve laforge: Looks good to me, approved diff --git a/src/trau/trau_frame.c b/src/trau/trau_frame.c index 98e26da..509021d 100644 --- a/src/trau/trau_frame.c +++ b/src/trau/trau_frame.c @@ -1110,12 +1110,13 @@ d_idx += 2; /* D3 .. D8 */ memcpy(fr->d_bits + d_idx, trau_bits + 2 * 8 + 2, 6); - /* D9 .. D57 + D'1 .. D'57 */ - for (i = 3; i < 20; i++) { + d_idx += 6; + /* D9 .. D63 + D'1 .. D'57 */ + for (i = 3; i < 19; i++) { memcpy(fr->d_bits + d_idx, trau_bits + i * 8 + 1, 7); d_idx += 7; } - /* D'58 .. D'62 */ + /* D'58 .. D'63 */ memcpy(fr->d_bits + d_idx, trau_bits + 19 * 8 + 1, 6); d_idx += 6; @@ -1132,7 +1133,7 @@ trau_bits[1 * 8] = 1; trau_bits[2 * 8] = 0; trau_bits[2 * 8 + 1] = 1; - for (i = 3; i < 19; i++) + for (i = 3; i < 20; i++) trau_bits[i * 8] = 1; trau_bits[19 * 8 + 7] = 1; @@ -1143,12 +1144,13 @@ d_idx += 2; /* D3 .. D8 */ memcpy(trau_bits + 2 * 8 + 2, fr->d_bits + d_idx, 6); - /* D9 .. D57 + D'1 .. D'57 */ - for (i = 3; i < 20; i++) { + d_idx += 6; + /* D9 .. D63 + D'1 .. D'57 */ + for (i = 3; i < 19; i++) { memcpy(trau_bits + i * 8 + 1, fr->d_bits + d_idx, 7); d_idx += 7; } - /* D'58 .. D'62 */ + /* D'58 .. D'63 */ memcpy(trau_bits + 19 * 8 + 1, fr->d_bits + d_idx, 6); d_idx += 6; -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38129?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I051b0b70adffcc473dcbb42a555c19088973cc90 Gerrit-Change-Number: 38129 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de>
1 0
0 0
[S] Change in libosmo-abis[master]: trau_frame: fix de/encoding of HR-data-8k frames
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: dexter, falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38129?usp=email ) Change subject: trau_frame: fix de/encoding of HR-data-8k frames ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38129?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I051b0b70adffcc473dcbb42a555c19088973cc90 Gerrit-Change-Number: 38129 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:21:49 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
[S] Change in libosmo-abis[master]: trau_frame: fix de/encoding of HR-data-8k frames
by laforge 15 Sep '24

15 Sep '24
Attention is currently required from: dexter, falconia. laforge has posted comments on this change by falconia. ( https://gerrit.osmocom.org/c/libosmo-abis/+/38129?usp=email ) Change subject: trau_frame: fix de/encoding of HR-data-8k frames ...................................................................... Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.osmocom.org/c/libosmo-abis/+/38129?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: comment Gerrit-Project: libosmo-abis Gerrit-Branch: master Gerrit-Change-Id: I051b0b70adffcc473dcbb42a555c19088973cc90 Gerrit-Change-Number: 38129 Gerrit-PatchSet: 1 Gerrit-Owner: falconia <falcon(a)freecalypso.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de> Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-CC: pespin <pespin(a)sysmocom.de> Gerrit-Attention: falconia <falcon(a)freecalypso.org> Gerrit-Attention: dexter <pmaier(a)sysmocom.de> Gerrit-Comment-Date: Sun, 15 Sep 2024 13:20:17 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • ...
  • 199
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.