lists.osmocom.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
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
List overview
Download
gerrit-log
September 2024
----- 2025 -----
June 2025
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
gerrit-log@lists.osmocom.org
1 participants
1983 discussions
Start a n
N
ew thread
[M] Change in libosmo-abis[master]: trau2rtp: add CSD support
by laforge
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>
9 months, 2 weeks
1
0
0
0
[XS] Change in libosmo-abis[master]: tests: fix for --disable-ortp
by laforge
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
9 months, 2 weeks
1
0
0
0
[M] Change in libosmo-abis[master]: rtp2trau: add CSD support
by laforge
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
9 months, 2 weeks
1
0
0
0
[M] Change in libosmo-abis[master]: trau2rtp: add CSD support
by laforge
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
9 months, 2 weeks
1
0
0
0
[XS] Change in libosmo-abis[master]: osmo_trau_frame_decode_8k: check all sync bits
by laforge
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
9 months, 2 weeks
1
0
0
0
[XS] Change in libosmo-abis[master]: osmo_trau_frame_decode_8k: fix recognition of O&M UL
by laforge
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
9 months, 2 weeks
1
0
0
0
[XS] Change in libosmo-abis[master]: osmo_trau_frame_decode_8k: check all sync bits
by laforge
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
9 months, 2 weeks
1
0
0
0
[S] Change in libosmo-abis[master]: trau_frame: fix de/encoding of HR-data-8k frames
by laforge
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>
9 months, 2 weeks
1
0
0
0
[S] Change in libosmo-abis[master]: trau_frame: fix de/encoding of HR-data-8k frames
by laforge
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
9 months, 2 weeks
1
0
0
0
[S] Change in libosmo-abis[master]: trau_frame: fix de/encoding of HR-data-8k frames
by laforge
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
9 months, 2 weeks
1
0
0
0
← Newer
1
...
103
104
105
106
107
108
109
...
199
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
Results per page:
10
25
50
100
200