| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
| |
Fixes following warning:
control_cmd.c:294:16: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare]
if (cmd->type < 0 || cmd->type == CTRL_TYPE_UNKNOWN) {
Change-Id: I3df8a4f646222337927d9e3cac6d09a8a05cb20c
|
|
|
|
|
|
|
| |
Fixes following warning message:
abis_nm.c:101:2: warning: implicit conversion from enumeration type 'enum abis_nm_msgtype_bs11' to different enumeration type 'enum abis_nm_msgtype' [-Wenum-conversion]
Change-Id: Icb0ed423febf1ceb6626e256d32011b4118fc527
|
|
|
|
| |
Change-Id: I65b1ef6e4b9ba0bf0c3c2f03311250f31ddb308a
|
|
|
|
|
|
|
|
|
|
|
| |
gsm0411_utils.c:102:2: warning: #warning find a portable way to obtain timezone offset [-Wcpp]
#warning find a portable way to obtain timezone offset
gsm0411_utils.c: In function 'gsm338_get_sms_alphabet':
gsm0411_utils.c:260:4: warning: large integer implicitly truncated to unsigned type [-Woverflow]
return 0xffffffff;
Change-Id: I1d6cb31f38721f79e2cf93f9b8e4776f3720aa07
|
|
|
|
|
|
|
|
|
|
|
|
| |
utils.c: In function 'osmo_str2lower':
utils.c:277:3: warning: array subscript has type 'char' [-Wchar-subscripts]
out[i] = tolower(in[i]);
And according to man:
If c is neither an unsigned char value nor EOF, the behavior of these func‐
tions is undefined.
Change-Id: I3fed2ab6a4efba9f8a21fcf84a5b3a91e8df084f
|
|
|
|
| |
Change-Id: Ic1e3255800999669ca9619bfceb4124c773eff2d
|
|
|
|
|
|
|
|
|
|
|
| |
Recent commit 884ba0f2bcaf385cabee0b4228a2598d61fa406b adds function
gsm0808_chan_type_to_speech_codec() but adds a mismatching name in
libosmogsm.map. openbsc.git's aoip branch can't build with this.
This must have been an on-the-fly rename that wasn't properly tested. Always
test your patches!
Change-Id: I68feb14f7bcb2f62b89f9b2d8c085d6824b493bc
|
|
|
|
|
|
|
|
|
|
|
|
| |
Recent commit 3149b0d076477303a38df735fe579b1b06ee17b2 adds function
gsm0808_chan_type_to_speech_codec() but adds a completely mismatching name in
libosmogsm.map, as well as a definition with a typo in the name.
Fix the entry in libosmogsm.map.
Add the missing 'c' in gsm0808_utils.h
Change-Id: I5a621fa5ef6b632eabbe224f3dd383eacaffb695
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Considering the various styles and implications found in the sources, edit
scores of files to follow the same API doc guidelines around the doxygen
grouping and the \file tag.
Many files now show a short description in the generated API doc that was so
far only available as C comment.
The guidelines and reasoning behind it is documented at
https://osmocom.org/projects/cellular-infrastructure/wiki/Guidelines_for_API_documentation
In some instances, remove file comments and add to the corresponding group
instead, to be shared among several files (e.g. bitvec).
Change-Id: Ifa70e77e90462b5eb2b0457c70fd25275910c72b
|
|
|
|
|
|
|
|
|
|
| |
Especially for short descriptions, it is annoying to have to type \brief for
every single API doc.
Drop all \brief and enable the AUTOBRIEF feature of doxygen, which always takes
the first sentence of an API doc as the brief description.
Change-Id: I11a8a821b065a128108641a2a63fb5a2b1916e87
|
|
|
|
|
| |
Tweaked-by: nhofmeyr
Change-Id: I990dfe9eeaf96f377484b828143935240a937226
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The length check of the decoder functions is not entirely
correct. The check also checks for values below zero,
which does not make sense, since the length is encoded
as uint8_t.
For some elements a minimum length is known (in most cases
this is 1), so checking for zero is sufficient but in some
cases (e.g. channel type) the spec mentions a minimum and
maximum length. This is now also reflected in the code.
Tweaked-by: nhofmeyr
Change-Id: I78bc887f68d1963d28c6fcd631ac20ccd893d6d6
|
|
|
|
|
|
|
|
|
|
|
| |
fsm.c uses this function. When compiled with --enable-embedded, it
triggers a warning:
fsm.c: In function 'osmo_fsm_inst_alloc':
fsm.c:213:4: warning: implicit declaration of function 'talloc_asprintf' [-Wimplicit-function-declaration]
fi->name = talloc_asprintf(fi, "%s(%s)", fsm->name, id);
Change-Id: I61cd83d4c8570af1e452c945ac6f194baf7e6ac4
|
|
|
|
| |
Change-Id: I4c441b20b250c34656f1e8330d6bb4b1ce2b8423
|
|
|
|
|
|
|
|
|
| |
timer_gettimeofday.c: In function 'osmo_gettimeofday_override_add':
timer_gettimeofday.c:54:2: error: implicit declaration of function 'timeradd' [-Werror=implicit-function-declaration]
timeradd(&osmo_gettimeofday_override_time, &val,
^
Change-Id: Iced451be255cfde8a6cf38380bef71ef29673994
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The contents of the speech codec element (struct gsm0808_speech_codec),
that is also used in the speech codec list element (struct
gsm0808_speech_codec_list) can be generated directly from the
permitted speech parameter in the channel type field (struct
gsm0808_channel_type) when full AoIP with compressed speech via
RTP/UDP/IP is assumed and when the codec configuration on the air
interface exactly matches the codec configuration on the IP backhaul.
This patch adds a function that can be used as a helper to fill
out spech codec fields by only giving a permitted speech parameter
as input.
Change-Id: I257c972e9fdf0dfe940a8d483447085bd62e50a2
|
|
|
|
|
|
|
|
|
|
|
|
| |
The permitted speech field used in channel type element (struct
gsm0808_channel_type) uses a different representation as
the type field in the speech codec element (struct
gsm0808_speech_codec)
This patch adds a function to convert from permitted speech to
speech codec type.
Change-Id: Ib26a9c20864459b2baaa04f49b6e7902ba44b7cb
|
|
|
|
|
|
|
|
|
|
| |
The implementation of the parser/generator for the speech codec
information element slightly wrong, making it impossible to use
it properly.
(See also: 3GPP TS 48.008, 3.2.2.103)
Change-Id: Idabb0f9620659557672e1c6b90c75481192e5c89
|
|
|
|
|
|
|
|
|
| |
This allows passing 'make CFLAGS+="..."'
without breaking the build.
Suggested-by: zecke
Change-Id: I0628a9c739cded771605f5c55df7f21cb07beb3b
|
|
|
|
|
|
|
|
|
|
|
| |
Allocation of a new memory is an expensive operation, which
takes place when it's initially unknown, how much memory will
we need, or in order to decrease total memory usage.
The trellis struct wasn't require dynamic allocation itself,
so let's allocate one statically inside the vdecoder structure.
Change-Id: Ib8e448823ca5548a05a45824b0b1c06743dfe5a4
|
|
|
|
|
|
|
|
|
|
|
| |
Allocation of a new memory is an expensive operation, which
takes place when it's initially unknown, how much memory will
we need, or in order to decrease total memory usage.
The vdecoder struct wasn't require dynamic allocation itself,
so let's use static allocation in order to increase performance.
Change-Id: Id1b140d3cb61db7352dcfc217a8fc36091e945ab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently this implementation exposes nothing than
osmo_conv_decode_acc(), so it wasn't possible to call
reset_decoder() from outside.
The method itself was used to initialize accumulated
path metrics and the starting state of encoder. Now
this code is moved to generate_trellis().
Moreover, setting accumulated path metrics inside
existing loop is a bit faster that calling memset().
Change-Id: I8f17cebf468cf0106927ccee091cfb2896649cb2
|
|
|
|
| |
Change-Id: I81f7c35abf424f501ca53d6984c0d56f7936984b
|
|
|
|
| |
Change-Id: I00154776c8e7d346abcbaf9048ce04d9488bb458
|
|
|
|
|
|
|
|
|
|
| |
We already have generic convolutional transcoding implementation
written by Sylvain Munaut and named 'conv.c', so 'viterbi_*' names
looked a bit confusing.
Let's use a single naming scheme for Viterbi related code.
Change-Id: I61062a8d1fbf5f5fc85b4fac58dc4e9fa8b5ef90
|
|
|
|
|
|
|
|
|
| |
It's universally useful so it make sense to have it in the shared core:
* move macro from libosmocoding to libosmocore
* add OSMO_ prefix
* add doxygen docs
Change-Id: I5386ba3e1f1cc153ba96c29dc71c9075a052aa02
|
|
|
|
|
|
|
|
| |
This array of bytes is not yet used but is referring to some specs. They
may be used in the future, so leave it there but mark it explicitly as
unused.
Change-Id: I0a61d17f9989ecddafbc68d4b9446853e4c15159
|
|
|
|
| |
Change-Id: I96c1ba70e332199a4ca95e827a7562f953975af4
|
|
|
|
| |
Change-Id: Ia30b6481ee570c6cf3e3b38e7a78028c66c036b7
|
|
|
|
| |
Change-Id: I8c3aa5ec100abacf93da1493aa134e42bf612206
|
|
|
|
| |
Change-Id: I0c2aaf1ab462c923d62232f1a63fae1e4eb18b4d
|
|
|
|
| |
Change-Id: I3bfcabd80b57aeb7f110b306350802e6e82c847a
|
|
|
|
| |
Change-Id: I36012d4443d97470050cdf9638a9d4cf67ea3b40
|
|
|
|
|
|
|
|
|
| |
It's a pity that even with this patch we still are fare away from having
the whole API documented. However, at least we have a more solid
foundation. Updates not only extend the documentation, but also make
sure it is rendered properly in the doxygen HTML.
Change-Id: I1344bd1a6869fb00de7c1899a8db93bba9bafce3
|
|
|
|
|
|
|
| |
We should link to project homepage as well as put the library into the
wider Osmocom context.
Change-Id: I07ca57ecef0f36c87c9ebacc1e1507c217bdb25b
|
|
|
|
|
|
|
| |
The table describing the various MCS convolutional codes are constant
data and should be marked as such.
Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
|
|
|
|
|
|
|
| |
The interleaving/deinterleaving functions were missing 'const'
qualifiers on their input data buffers
Change-Id: I2118c34a6353167787b23f877f1d81d60151aaf9
|
|
|
|
|
|
|
| |
This adds the minimum amount of API documentation that we should have on
all our code, particularly new code merged into a library.
Change-Id: I526804f64313867913574e50e5b9e9205ad3aa74
|
|
|
|
|
|
|
|
| |
It is generally our coding style to mark pointers to constant input data
as 'const *'. For some reason the gsm0503 coding and mapping was not
adhering to this, so let's bring it into compliance.
Change-Id: Id8731d7ae6171dff94741b6ddbb95ab5f03bfd4e
|
|
|
|
| |
Change-Id: I1f4fc2761b55a4f83544c1c3793ab67fec9fc120
|
|
|
|
|
|
|
| |
failure to do so would prevent the compiler from catching
inconsistencies between declaration and definition.
Change-Id: I88617c97adcff328292e501fd5d254eeae96a660
|
|
|
|
| |
Change-Id: If779cce63f06a18d4f3b0cb3d6dd7a99aa52a646
|
|
|
|
|
|
|
|
| |
Based on ETSI TS 101 318 section 5.1.2 the 95 bits SID code word
is not detected correctly due to a wrongful offset in the bits
location indexes.
Change-Id: I45d98c6edf267f313883503a65385190ffbc65ca
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
According to GCC's wiki:
If you specify command-line switches such as -msse, the compiler
could use the extended instruction sets even if the built-ins are
not used explicitly in the program. For this reason, applications
that perform run-time CPU detection must compile separate files
for each supported architecture, using the appropriate flags. In
particular, the file containing the CPU detection code should be
compiled without these options.
So, this change introduces a separate Viterbi implementation,
which is almost the same as previous one, but is being compiled
with -mavx2. This implementation will be only used by CPUs with
both SSE and AVX support:
SSE3 and AVX2: viterbi_sse_avx.c
SSE3 only: viterbi_sse.c
Generic: viterbi_generic.c
Change-Id: I042cc76258df7e4c6c90a73af3d0a6e75999b2b0
|
|
|
|
|
|
|
| |
Let's avoid confusion with generated files which have
ending with _gen.* as well.
Change-Id: I3ecd8f9e73c05236f2cdc186f58b3d0ba552283f
|
|
|
|
|
|
| |
Will be used by osmo-bts-trx
Change-Id: I3c655a4af64fb80497a5aaa811cce8005dba9cd9
|
|
|
|
|
| |
Change-Id: Id664355eb8305fb287e4dae0800fb20dc2f9b8cd
Related: SYS#3610
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously MCS0 was incorrectly set for some of type1 header values
while according to 3GPP TS 44.060 it can only be set for type3. Fix
this:
* use EGPRS_MCS* constants instead of magic values
* do not set MCS0 for reserved bits values in EGPRS header type1
* return different error codes for invalid and unsupported MCS as well
as for other decoding errors
Note: there's no need to adjust tests because MCS0 decoding is not
supported but it's better to explicitly distinguish between unsupported
and invalid values nevertheless.
Change-Id: Id665d5c0cf50efa18b1bcbf4f17359418a380f9e
Related: OS#1524
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fast convolutional decoding is provided through x86 intrinsic based
SSE operations. SSE3, found on virtually all modern x86 processors,
is the minimal requirement. SSE4.1 and AVX2 are used if available.
Also, the original code was extended with runtime SIMD detection,
so only supported extensions will be used by target CPU. It makes
the library more partable, what is very important for binary
packages distribution. Runtime SIMD detection is currently
implemented through the __builtin_cpu_supports call.
Change-Id: I1da6d71ed0564f1d684f3a836e998d09de5f0351
|
|
|
|
|
|
|
|
|
| |
We have to #include <sys/select.h> inside the block protected by
HAVE_SYS_SELECT_H, otherwise it will fail on (embedded) builds where
that file doesn't exist, such as the arm-none-eabi target on Debian
stable and Ubuntu 16.04.
Change-Id: I82a2dcbc55b6ee0e914881c5e09b80506c5de4f2
|