summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* gsm0808: add function gsm0808_speech_codec_from_chan_type()Philipp Maier2017-06-223-0/+57
| | | | | | | | | | | | | | | | 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
* gsm0808: add function gsm0808_chan_type_to_speech_code()Philipp Maier2017-06-223-0/+40
| | | | | | | | | | | | 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
* gsm0808: add default speech codec configurationPhilipp Maier2017-06-221-0/+21
| | | | | | | | | In an AoIP scenario, the speech codec list field specifies the codecs used in the RTP interface. This patch adds a table with default codec configurations that match the codec configurations that are also used on the air interface. Change-Id: I9dc0165d76a022b2c1b7418bc3133407e61b7261
* gsm0808: fix AoIP speech codec element parser/generatorPhilipp Maier2017-06-223-61/+118
| | | | | | | | | | 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
* abis_test.c: Fix warning appearing on some buggy gcc versionsPau Espin Pedrol2017-06-221-2/+4
| | | | Change-Id: I31d5ffc0cf461d207d6c3d43aa0a25a5448d7000
* gsm0808: add speech codec type constantsPhilipp Maier2017-06-211-0/+18
| | | | | | | | The codec type to be set in member type in struct gsm0808_speech_codec has its own coding scheme to reference the used codec types. This patch declares an enum with valid speech codec types. Change-Id: Icaa768071d4364e671bc7e6d48b82d1f07f93f93
* cosmetic: Add info about coresponding codecs to permitted speech constsPhilipp Maier2017-06-211-7/+8
| | | | | | | The constants in enum gsm0808_permitted_speech are not very expressive. Add comments indicating each constant's corresponding codec. Change-Id: I9734f7c261becffe38ffd41c304d006d08530c1a
* gsm0408: update bearer capability speech versionPhilipp Maier2017-06-211-1/+6
| | | | | | | | 3GPP TS 24.008 specifies two new speech versions for half rate and two new speech modes for full rate. This patch adds the relevant constants to enum gsm48_bcap_speech_ver in gsm_04_08.h Change-Id: Id2835384c855f924332d38f01c73bd1cfdb62549
* cosmetic: Add codec references to Speech Version IndicationPhilipp Maier2017-06-211-6/+6
| | | | | | | Add the information which GSM Speech codec version coresponds to which bearer capability speech version. Change-Id: Ic9493fea139420a52c32b17d00ac7d0b2bf86967
* lapd_test.c: Convert compilation warning to level messagePau Espin Pedrol2017-06-211-1/+1
| | | | | | | This way we clean the build of warnings completely and we can enable -Werror but we still see this FIXME message while compiling. Change-Id: I24c11226cd5bb5b6032f4ece7d1a0695dc82f0dd
* vty: additional nodes for sccp-address configurationPhilipp Maier2017-06-212-2/+3
| | | | | | | | | | The planned sccp-addressbook implementation in libosmo-sccp requires two additional VTY nodes. See also in libosmo-sccp.git: Change-Id I068ed7f7d113dab88424a9d47bab7fc703bb7942 Change-Id: I42aa29c0cccc97f284b85801c5329b015b189640
* src/Makefile.am: fix build: use AM_CFLAGS, not CFLAGSNeels Hofmeyr2017-06-191-4/+4
| | | | | | | | | This allows passing 'make CFLAGS+="..."' without breaking the build. Suggested-by: zecke Change-Id: I0628a9c739cded771605f5c55df7f21cb07beb3b
* core/conv/conv_acc.c: use static allocation for trellisVadim Yanitskiy2017-06-191-27/+23
| | | | | | | | | | | 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
* core/conv/conv_acc.c: use static allocation for vdecoderVadim Yanitskiy2017-06-191-23/+19
| | | | | | | | | | | 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
* core/conv/conv_acc.c: delete reset_decoder()Vadim Yanitskiy2017-06-191-20/+13
| | | | | | | | | | | | | | | 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
* core/conv/conv_acc.c: drop unused structure memberVadim Yanitskiy2017-06-191-2/+0
| | | | Change-Id: I81f7c35abf424f501ca53d6984c0d56f7936984b
* core/conv: update description headers for conv_acc_*Vadim Yanitskiy2017-06-195-5/+10
| | | | Change-Id: I00154776c8e7d346abcbaf9048ce04d9488bb458
* core/conv: use proper filenamesVadim Yanitskiy2017-06-196-10/+10
| | | | | | | | | | 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
* Move NUM_BYTES macro to core libraryMax2017-06-193-2/+3
| | | | | | | | | 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
* tlv_test.c: Fix compilation warningsPau Espin Pedrol2017-06-181-19/+25
| | | | | | | | Several warnings like the one below are fixed: warning: array subscript is below array bounds [-Warray-bounds] uint8_t *unchanged_ptr = buf - 1; Change-Id: I35d7d926939c14700cbca732bd64e588c75424b4
* gprs_ns_test.c: Remove unused byte arraysPau Espin Pedrol2017-06-181-49/+0
| | | | | | | | | | Commit 0d4e949e229a649ffd0503d8e930dba8be7dd34d changed the code to use functions with local variables holding the bytes, but forgot to remove the old global variables. This test fixes compilation warnings. Change-Id: I140de30038222b0419423d8c4f9da1946651a4e7
* sms_test.c: Remove test of deprecated wrapper functionPau Espin Pedrol2017-06-182-27/+0
| | | | | | | The deprecated function is just a wrapper, and it triggers a compilation warning. Change-Id: Iaac701bdf0c0e66c343f68cc31d82550a024ef57
* card_fs_uicc.c: Fix unused compilation warningPau Espin Pedrol2017-06-181-1/+1
| | | | | | | | 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
* Fix compilation warning on deprecated macroPau Espin Pedrol2017-06-183-2/+11
| | | | | | | | | A warning was printed even if the deprecation didn't apply to libosmocore because it is still allowed to use it internally. This patch fixes this case while still printing a warning if external projects build using libosmocore headers. Change-Id: I32212f20756f828af1017482a71e29e4b3adbad4
* ctrl_test.c: fix build with GCC 7.1.1Vadim Yanitskiy2017-06-131-1/+1
| | | | | | | | | | | | | | | | According to GCC's online docs: When an inline function is not static, then the compiler must assume that there may be calls from other source files; since a global symbol can be defined only once in any program, the function must not be defined in the other source files, so the calls therein cannot be integrated. Therefore, a non-static inline function is always compiled on its own in the usual fashion. There is no any (performance or size) benefit from 'inline' keyword in this particular file, so let's replace one by 'static'. Change-Id: I11e1f1cfea09c6f0cf8225239e782b551d3eb52f
* gsm/gsm48.c: drop useless assignmentVadim Yanitskiy2017-06-131-1/+0
| | | | Change-Id: I96c1ba70e332199a4ca95e827a7562f953975af4
* vty/command.c: drop useless assignmentVadim Yanitskiy2017-06-131-1/+1
| | | | Change-Id: Ia30b6481ee570c6cf3e3b38e7a78028c66c036b7
* core/conv/conv.c: drop useless assignmentVadim Yanitskiy2017-06-131-1/+1
| | | | Change-Id: I8c3aa5ec100abacf93da1493aa134e42bf612206
* gb/gprs_bssgp.c: avoid valueless goto usageVadim Yanitskiy2017-06-131-10/+3
| | | | Change-Id: I0c2aaf1ab462c923d62232f1a63fae1e4eb18b4d
* sim/core.c: drop useless double assignmentVadim Yanitskiy2017-06-131-1/+1
| | | | Change-Id: I3bfcabd80b57aeb7f110b306350802e6e82c847a
* core/conv/viterbi.c: fix possible NULL-pointer referenceVadim Yanitskiy2017-06-131-3/+16
| | | | Change-Id: I36012d4443d97470050cdf9638a9d4cf67ea3b40
* update/extend doxygen documentationHarald Welte2017-06-1263-157/+827
| | | | | | | | | 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
* Update doxygen main page for libosmo{core,gsm,vty}Harald Welte2017-06-123-0/+36
| | | | | | | We should link to project homepage as well as put the library into the wider Osmocom context. Change-Id: I07ca57ecef0f36c87c9ebacc1e1507c217bdb25b
* gsm0503_coding: Mark gsm0503_mcs_{ul,dl}_codes as constHarald Welte2017-06-121-6/+6
| | | | | | | The table describing the various MCS convolutional codes are constant data and should be marked as such. Change-Id: I4918521ee4572a67cbee5f9b49257fc5bfcde511
* gsm0503_interleaving: Mark input arguments as 'const *'Harald Welte2017-06-122-10/+10
| | | | | | | The interleaving/deinterleaving functions were missing 'const' qualifiers on their input data buffers Change-Id: I2118c34a6353167787b23f877f1d81d60151aaf9
* Add doxygen documentation to libosmocodingHarald Welte2017-06-1211-31/+465
| | | | | | | 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
* gsm0503_{coding,mapping}: Mark input arguments as 'const'Harald Welte2017-06-124-76/+75
| | | | | | | | 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
* Add header file with definitions for GSM TS 04.14 / 3GPP TS 44.014Harald Welte2017-06-125-1/+125
| | | | Change-Id: I1f4fc2761b55a4f83544c1c3793ab67fec9fc120
* Include codec.h file from codec C filesHarald Welte2017-06-093-0/+3
| | | | | | | failure to do so would prevent the compiler from catching inconsistencies between declaration and definition. Change-Id: I88617c97adcff328292e501fd5d254eeae96a660
* Update L3 protocol discriminator definitionsHarald Welte2017-06-091-3/+5
| | | | Change-Id: Ia699d3494b93b7f88c36338e4960b35c42a29b9c
* osmo_{fr,hr}_check_sid(): Use const input argumentHarald Welte2017-06-093-6/+6
| | | | Change-Id: If779cce63f06a18d4f3b0cb3d6dd7a99aa52a646
* Fix wrongful GSM FR codec SID frame detection in DTX.Jean-Francois Dionne2017-06-093-11/+27
| | | | | | | | 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
* introduce proper test case for GSM FR detectionHarald Welte2017-06-092-0/+98
| | | | | | | our code is actually wrong, so let's skip the test until the fix is applied in a follow-up patch. Change-Id: I710c7871f959671deb3d18ab9062588f3056fd7c
* core/conv: do not mix up AVX and SSE codeVadim Yanitskiy2017-05-296-570/+740
| | | | | | | | | | | | | | | | | | | | | | | 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
* core/conv: rename viterbi_gen.c to viterbi_generic.cVadim Yanitskiy2017-05-292-1/+1
| | | | | | | Let's avoid confusion with generated files which have ending with _gen.* as well. Change-Id: I3ecd8f9e73c05236f2cdc186f58b3d0ba552283f
* socket: Add osmo_sock_init2_ofd() functionPau Espin Pedrol2017-05-262-0/+27
| | | | | | Will be used by osmo-bts-trx Change-Id: I3c655a4af64fb80497a5aaa811cce8005dba9cd9
* Introduce build script for arm-none-eabi cross-compilationsblobb2017-05-261-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a necessary step to use libosmocore-arm dep in OsmocomBB. After this patch is submitted the "./contrib/jenkins.sh" line in libosmocore jenkins jobs [1][2] needs to be replaced with: if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]] then ./contrib/jenkins-arm.sh else # (FreeBSD && debian8)_amd64 builds ./contrib/jenkins.sh fi Furthermore, the "arch" matrix-build axis has to be created, holding "arm-none-eabi" and "amd64". Following combination filter is necessary to skip cross-compilations on FreeBSD buildslave: !(arch=="arm-none-eabi" && label=="FreeBSD_amd64") [1] https://jenkins.osmocom.org/jenkins/job/libosmocore/ [2] https://jenkins.osmocom.org/jenkins/job/libosmocore-gerrit/ Change-Id: I0db83ad2c94ada65c00fd1bcf867830dec80085d
* Revert "Introduce build script for arm-none-eabi cross-compilations"blobb2017-05-261-33/+0
| | | | | | | | | | | | "--enable-sanitize" does not work on jenkins build slave (debian8), although it worked out locally for me. Following patch will introduce corrected arm build script without "--enable-sanitize" option: https://gerrit.osmocom.org/#/c/2742/ This reverts commit ba58167e1bf6ff8815c4e9e0d7b0b63ba1c529f8. Change-Id: I644114679db1394e75ff12b0203ae8e568aff82c
* Introduce build script for arm-none-eabi cross-compilationsblobb2017-05-251-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a necessary step to use libosmocore-arm dep in OsmocomBB. After this patch is submitted the "./contrib/jenkins.sh" line in libosmocore jenkins jobs [1][2] needs to be replaced with: if [[ "$JOB_NAME" == *"arch=arm-none-eabi,label=linux_amd64_debian8"* ]] then ./contrib/jenkins-arm.sh else # (FreeBSD && debian8)_amd64 builds ./contrib/jenkins.sh fi Furthermore, the "arch" matrix-build axis has to be created, holding "arm-none-eabi". Following combination filter is necessary to skip cross-compilations on FreeBSD buildslave: !(arch=="arm-none-eabi" && label=="FreeBSD_amd64") [1] https://jenkins.osmocom.org/jenkins/job/libosmocore/ [2] https://jenkins.osmocom.org/jenkins/job/libosmocore-gerrit/ Change-Id: I9e07fb9e60830dbd585f22d9c658c46252ce399f
* Add human-readable names for signal_nsMax2017-05-243-0/+13
| | | | | Change-Id: Id664355eb8305fb287e4dae0800fb20dc2f9b8cd Related: SYS#3610