aboutsummaryrefslogtreecommitdiffstats
path: root/src
AgeCommit message (Collapse)AuthorFilesLines
2017-01-06fix: dyn ts: uplink measurement reportNeels Hofmeyr1-1/+1
Fix pchan value used for uplink measurement decisions for dynamic channels in TCH mode. Fixes this error log message flooding the osmo-bts log when a dyn ts is serving a voice call: <0004> ../../../src/common/measurement.c:104 (bts=0,trx=0,ts=3,ss=0) no space for uplink measurement Change-Id: Id19316701fd8de6f295eeae0272eea0c315ab1b7
2017-01-04DTX AMR HR: fix inhibitionMax8-40/+130
* Unlike in AMR FR, in AMR HR incoming ONSET have to be treated differently depending on whether we've recently sent SID UPDATE or EMPTY frame. Split ST_SID_U FSM state into 2 states to accommodate for that and make sure that additional states specific to AMR HR are not used for AMR FR. * Avoid sending E_VOICE and E_SID_U in corresponding states as those do not initiate FSM state transitions anyway. This decrease extra load from FSM signalling which otherwise would be triggered on per-frame basis. * Introduce separate signal for SID First P1 -> P2 transition to avoid confusion with E_COMPL and E_SID_U initiated transitions from P1 state. * Don't init DTX FSM for SDCCH channels. Change-Id: I229ba39a38a223fada4881fc9aca35d3639371f8 Related: OS#1801
2016-12-22Fix some spelling errorsRuben Undheim1-1/+1
Change-Id: I5b57102f961f8fd7fb0689ceeaa37dd021535b17
2016-12-22DTX: don't always perform AMR HR specific checkJean-Francois Dionne1-6/+8
Disable check specific to AMR HR if not DTX is enabled. Change-Id: I8af1daffbd7e59fef6e671dbd9b820497f82d354 Fixes: OS#1892
2016-12-16Optionally use adaptive RTP jitter bufferingMax3-9/+33
* add vty option to manually enable adaptive RTP jitter buffering (disabled by default) on per-bts level * use this setting on per-lchan level when setting jitter parameters via vty at runtime * check and log result of osmo_rtp_socket_set_param() * note: older libosmo-abis will ignore this setting which will be properly detected via return value * if jitter buffer is disabled by configuring "rtp jitter-buffer 0" than adaptive buffering is disabled as well but it will be used if jitter buffer is set to different value for a givel lchan via vty Change-Id: I489f3c419039f40b57c2ef0641c176478b8d3566
2016-12-15DTX: fix TS adjustment for ONSETMax1-5/+15
Previously timestamp was always adjusted according to FN difference. In case of ONSET event this causes unnecessary TS gap with subsequent speech packet. Fix this by checking Marker bit before performing adjustment. Change-Id: I9bf4b45aa990dd4014334dd846f43f793366056c Related: OS#1801
2016-12-12osmo-bts-trx: fix lchan deactivationMax1-2/+4
Use chan_nr for deactivating lchan instead of lchan->nr: chan_nr is the RSL Channel Number IE value, a bitfield aggregation of lchan type bits (cbits) and lchan number (lowest three bits). The error was introduced in 36153239bfd0b633c4d259a9de0a759f41197a2b. Change-Id: I6dd7060422ab9d18743c1ff2ab419e3e7299d74d
2016-12-09Save RTP metadata in Control BufferMax1-2/+11
Having RTP metadata is useful for debugging - save Sequence Number and Timestamp next to Marker bit from RTP header. Change-Id: I359b3bcb74fbfc071547fe2f9d837829374fe997
2016-12-08DTX: add explicit check if DTX enabledMax1-0/+3
Check explicitly if DTX is enabled for AMR before checking if SID frame repetition is optional. Change-Id: I660688d56505798cade1495c30338fd6806a3259 Related: OS#1801
2016-12-05TRX: prevent segfault upon phy initMax2-7/+13
Previously if multiply phy instances were configured but not used osmo-bts-trx would segfault. Terminate with clear error message instead so user can correct configuration. Example configuration which caused problem: ... phy 0 instance 0 instance 1 ... trx 0 phy 0 instance 0 Note the 2nd instance of phy 0 which is not used in trx later on. Change-Id: Id979506731ea92401458f1060e87aeb690901539
2016-12-01Fix AGCH/PCH proportional allocationMax8-49/+42
Do not assume that 1 == BS_AG_BLKS_RES but take that information from SI3. Note: due to current implementation quirks we activate channels before SI3 obtained, than we deactivate channels upon receiving SI3 and activate them again. This might not be necessary once we migrate to proper OML state machines. This affects lc15 and sysmo hw. Change-Id: I11377b12680ac3b2f77f80e742b6f0af63fc9c1e Related: OS#1575
2016-12-01cosmetic: vty prompts: add space after '#'Neels Hofmeyr1-4/+4
Typically, our VTY prompts have space after the '#', but some of the osmo-bts VTY prompts don't: OsmoBTS# configure terminal OsmoBTS(config)# bts 0 OsmoBTS(bts)#gsmtap-sapi ccch Add spaces after the '#' to yield e.g. OsmoBTS(bts)# gsmtap-sapi ccch Change-Id: If0591a359e77f01abb76c4113181af7a7733ddd4
2016-12-01Remove duplicated codeMax7-21/+36
Remove lchan deactivation related code duplication to facilitate future use for dynamic CCCH re-activation. Change-Id: Id0d3b19dbfaa16d1734321a07a6eb0355bfd77c9
2016-12-01DTX DL AMR: rewrite FSM recursionMax6-136/+264
Add explicit state for recursion (sending the different payload data in response to the RTS request for same FN) and corresponding transition. Remove ST_FACCH_V as with new explicit recursion handling it becomes unreacheable. This makes it easier to maintain preemption (interruption of current procedure due to FACCH or Inhibition). This also reduces the number of possible transitions out of each state thus reducing graph's cyclomatic complexity. Change-Id: If39b68083d23a4a35f468a5d75f54eb733ebfd14
2016-12-01trx: Add "maxdlynb" VTY command to control max TA for Normal Bursts.Alexander Chemeris5-1/+68
Originally `maxdly` command in osmo-trx was contrlling max TA for Normal Bursts. This was not a proper behaviour, because it was used to "control maximum distance a handset can attach from" which is controlled by Access Bursts max TA. Osmo-trx was corrected to apply `maxdly` to Access Bursts and a new command was introduced to contrl max TA for Normal Bursts - `maxdlynb`. This patch adds support for this configuration command into osmo-bts-trx. If you wonder why would you need that - some test equipment (namely R&S CMD57) has really bad timing sync and can generate signal a few symbols off. That prevents osmo-trx from properly receiving otherwise perfectly good bursts generated by CMD57. This configuration is a solution for this. Change-Id: Ib5d255299668ac1ef9f0ce95e016f55ba3c82277
2016-11-29osmo-bts-trx: remove obsolete include of netif/rtp.hNeels Hofmeyr1-2/+0
Change-Id: Idf364fd7d69446a7a996062f71d701d9c6cca84c
2016-11-25vty: Ensure to not use negative (error) sapi valueHarald Welte1-0/+2
Change-Id: I282311de8514c1cc0a1b716e97e90ddf48863bb4 Fixes: Coverity CID 57617 Fixes: Coverity CID 57618
2016-11-16vty: Add commands to manually activate/deactivate a channel.Alexander Chemeris1-0/+60
This is the easiest way I found to make BTS level loopback to work. Another way to implement this is to have BSC/NITB to send the OML command, but it's a longer path with no clear benefits. Note, that the current code hardcodes the channel to be TCH/F with v1 speech, which is what we need for the basic BER testing. We may want to extend this later to support more channel types. Change-Id: Ia2734afeff023e5b3d6b934c7e8b1ed95a071b72
2016-11-14l1sap: Fix use-after-free in loopback mode.Alexander Chemeris1-0/+3
By default l1sap_tch_ind() returns 0 which signals to its caller that message has been processed and can be freed. In case of loopback we're forwarding the message to dl_tch_queue who will free it later. Returning 1 from l1sap_tch_ind() prevents caller from freeing message. Change-Id: I1e065075baa51c88fa717f132e1f0a83df68be02
2016-11-11Replace link_id constant with defineMax5-52/+52
Instead of using constant for link_id directly, use shared define value. Change-Id: Ibf3d439d8893bd994ba089796175b6c635db2cf8
2016-11-11Remove duplicated codeMax1-13/+11
Having duplicated code to fill in fn & tn values makes it harder to read and modify static gsmtap_p* functions. Fix this by removing the duplication and moving the common code one level up. Change-Id: I0e67bf7423424cc11435bc0a5a1110297eeee383
2016-11-09fix 'osmo-bts-* --version' segfaultNeels Hofmeyr1-1/+1
Call vty_init() before handle_options() to make sure the host.app_info is populated before --version potentially tries to print it. Change-Id: Ic87b5498b57b2f0f876171a15e769b74c28348c1
2016-11-08Add libosmocodec for octphy buildMax1-2/+2
Similar to 45822227577cba5c6c4a4d4d61a7a9e8b4992c25 fix build by linking with libosmocodec explicitly. Change-Id: Ib52135936ae02d804b60f61088b4bdd227a71aa0
2016-11-08DTX: wrap FSM signal dispatchingMax2-6/+10
Make wrapper function which checks that DTX is enabled for lchan before dispatching any events. Change-Id: Id8b519c4af6d505ec9a4b9aadd5107bf7af53d66
2016-11-08DTX DL: tighten check for enabled operationMax6-9/+18
Introduce dtx_dl_amr_enabled() function which checks that DTX is enabled and FSM is allocated and use it for all corresponding checks. Change-Id: Ifa68b641265ed14f242765c85e40da2d1021a541
2016-11-08Initialize parameters in osmo-trx for 11bit RACHbhargava1-0/+4
The parameters related to support 11bit RACH are initialized in osmo-trx. These parameter determaine the type of the RACH received in osmo-pcu. Change-Id: I164d449303373d0757719d5204f4716975fb517a
2016-11-03DTX fix ONSET handlingMax8-32/+65
* re-introduce ST_ONSET_F to guard from repetitive ONSET messages in case multiple FACCH occur duriing DTX silence period. * produce ONSET event after both SID FIRST and UPDATE in case of AMR FR. * always dispatch E_SID_F (SID FIRST) signal if in talkspurt. * allow E_SID_* right after ONSET (zero-length talkspurt). * add missing E_ONSET signal description. * fix FSM transitions for AMR HR *Inhibited and First P*. * fix incorrect return from l1if_tch_encode() in ONSET FACCH with incoming SID UPDATE Change-Id: I0e9033c5f169da46aed9a0d1295faff489778dcf Related: OS#1801
2016-10-28DTX DL: split ONSET state handlingMax6-34/+120
Handle ONSET cause by Voice and FACCH separately. In case of Voice we have RTP payload which we have to cache and send later on in next response to L1 RTS. FACCH have higher priority so it preempts both voice and silence alike - hence we can send ONSET immediately but still have to track previous state in order to get back to it gracefully. This affects lc15 and sysmo hw as there's no FSM-based DTX implementation for other models yet. Note: this requires patch for OpenBSC which adds FACCH buffer to tch.dtx struct. Change-Id: Idba14dcd0cb12cd7aee86391fcc152c49fcd7052 Related: OS#1802
2016-10-2711bit RACH support for osmo-bts-litecell15bhargava1-3/+40
Based on the indication from L1, number of bits in RACH and burst type is determined. Appropriate parameters are filled in osmo-bts-litecell15. These parameters are sent to osmo-pcu for processing of the RACH. Change-Id: Ie5207a15424fb287febf74e830297531232accde
2016-10-24Fix DTX DL AMR SIDscheduling logicMax1-9/+14
Previously SID UPDATE was sometimes scheduled incorrectly. Fix this by: * avoid rounding error when computing scheduling time difference from FN * properly saving and updating cached SID type and FN Change-Id: I7acffae4792e7bddc2ae19a2f04ee921dc194c36 Related: OS#1801
2016-10-24DTX HR - fix array size calculationMax1-1/+2
Use ARRAY_SIZE macro for each pointer separately. Fix suggested by Neels Hofmeyr <nhofmeyr@sysmocom.de>. Change-Id: I68ec1be33fb743977121d654187d85d6b8451e2b Fixes: Coverity CID 150132
2016-10-21Extend RTP RX callback parametersMax1-1/+2
Adopt to change in libosmo-abis to accept additional parameters in RTP RX callback function. Change-Id: Icf41e568f041e87b38e6192af0be90c42362bfee
2016-10-18Fix lc15 buildMax1-1/+1
The error seems to be introduced in 21142f789812553b56f493d79184f5a31ab7b1cd Change-Id: I620ac6774fb47479d74bc4470ccc6edd379600ba
2016-10-18Replace magic number with defineMax6-12/+15
SDCCH occupy lchan 0..3 in combined configuration so for CCCH we've always used lchan[4] - replace it with CCCH_LCHAN define and add comment. Change-Id: Ic5d742c292d638f119c6b4672120c1950adeb7f0
2016-10-17DTX AMR - fix buffer length checkMax1-1/+2
Consider AMR-specific prefix in computing max length to avoid triggering coverity check. Change-Id: I2fbc468caedf08f26893457db7c7fbacef5b860c Fixes: Coverity CID 150133
2016-10-14msgb ctx: use new msgb_talloc_ctx_init() in various main()sNeels Hofmeyr3-9/+3
Change-Id: I31d62d5e1f0b272985fdef5013270d385c4b988a
2016-10-13DTX: fix array size calculationMax1-4/+5
Compute array size in-place and pass it to function. Change-Id: I4cd480ceb20efc69df1b00e3c7359fcbd14c19cd Fixes: coverity CID 1357844.
2016-10-13TRX: fix building with latest DTX changesMax1-2/+2
Bring up-to-speed with latest changes in OpenBSC. Change-Id: I16b24b2cd09600e215de163e7b5baae329887c9e
2016-10-13DTX DL: use FSM for AMRMax11-132/+634
Use dedicated FSM to handle all DTX DL related events: - add explicit checks if DTX DL is enabled (fixes regression for non-DTX setup introduced in 654175f33bd412671e3ef8cdd65c0689d10f278c) - fix handling of AMR CMI for SPEECH frames - add FSM for DTX DL - sync with corresponding changes in OpenBSC's - handle FACCH-related DTX ONSET events This affects both lc15 and sysmobts and requires corresponding change in OpenBSC (Change-Id: Idac8609faf9b5ced818fde899ccfc6ed0c42e8fd). Change-Id: I74a0b42cb34d525b8a70d264135e82994ca70d31
2016-10-12rsl: improving the log outputPhilipp1-7/+20
to show more details about the payload type and the connection Change-Id: Ifaa253e5baed5ca364dfbc046a7cb559f106bfbd
2016-10-12octphy: prevent mismatch between dsp-firmware and octphy headersPhilipp1-6/+20
in its current statue l1_oml.c does not check if the version number in the header files (octvc1_main_version.h) matches up the version that is reported from the DSP during startip. This patch ads a check to make sure that the currently loaded firmware and the headers used during compile time match. If a mismatch is detected, osmo-bts exits immediately. Change-Id: Icba5756517d632d53b129c5ce1a1dab4936dab91
2016-10-12Move copy-pasted array into shared headerMax3-18/+0
Change-Id: I377ece2845830e3defab2d515f44b629ce5aed8e
2016-10-11DTX: fix conversion from fn to msMax1-2/+4
Previously FN was converted to millisecondss incorrectly due to wrong conversion between FN and a number of voice samples. The conversion should be based on following: * there are 12/13 useful frames for audio in TCH * there is 1 RTP packet per 4 frame * there are 160 samples per RTP packet Fixes: OS#1801 Change-Id: I9cc70cacabde98621aa892cee74f4ac461645093
2016-10-11DTX: fix 1st RTP packet dropYves Godin2-1/+2
Use "impossible" dummy value to initialize last_fn to prevent dropping of 1st RTP frame due to timestamp jump. Fixes: OS#1803 Change-Id: I485af21f6761048d12dc7f5552fcdd46daf786ed
2016-10-06octopy: fixing renamed constantPhilipp2-0/+15
The constant cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_UNUSED in header file octvc1/hw/octvc1_hw_api.h has been renamed to cOCTVC1_HW_CLOCK_SYNC_MGR_STATE_ENUM_IDLE. This commit adds an ifdef decision in to code to ensure that older header files will still work. Change-Id: I4c0b976d29689ace06741c5943434fc33ee2df14
2016-10-06octphy: reintroducing multi-trx supportPhilipp1-1/+19
The multi-trx had to be removed because of build conflicts with octphy header that lack the struct members for needed to support multi-trx. For details see the following revert-commits: ed6b48e4a5fba07c3ecccf689991799ae13a2aaa c9a1f284acf518cb4e62c3898e20398ed53807c3 This commit reintroduces multi trx support and ads an ifdef decision to ensure that header files without multi-trx support still work. Change-Id: I7f9b2906cc149c817183745b4c96bcc7f9ebdad0
2016-09-30DTX: send AMR voice alongside with ONSETMax6-20/+32
When ONSET event happens (either via Marker bit or due to unmarked talkspurt) we should first send Onset event to L1 and than send voice data in response to the same PH-RTS.ind. Change-Id: I2a7b89430ca49eee4a350c5f980bd6bcbc386347
2016-09-30DTX: move ONSET detection into separate functionMax3-74/+93
Move code from tch.c (lc15, sysmo) into generic function which: - check if talkspurt is happening - cache SID if necessary or invalidate cache - fill in CMR & CMI prefix This also fixes the problem when SID FIRST was cached without sending just like SID UPDATE instead of being sent right away. Change-Id: I6c7016a54749abadeef4fd4f5b6f750b256fb916
2016-09-30DTX: further AMR SID cache fixes (lc15, sysmo)Max4-170/+128
* consolidate AMR CMR and CMI handling in common/amr.c * use it in save_last_sid() * remove dead code * properly compute RTP payload length for AMR * use save_last_sid() for FR & HR as well * invalidate cached SID if SPEECH frame is received Fixes: OS #1800, #1801 Change-Id: I5a1c1ad0b0a295a50e67775a4db85f1d331755ed
2016-09-30DTX: move scheduling check inside repeat_last_sidMax5-75/+57
Note: this also require changes to properly link against libosmocodec - see 2bb65be159dfdabf664fec569b343320301701b0 in libosmocore. Change-Id: I96594cf3aa1013d505bd20069d5bf261d9a2aefb