aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2019-05-14Add C/I computationtnt/ciSylvain Munaut1-4/+30
Change-Id: Ib4ceec553f2e5f77bf3f6777724968456a180f5e Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-05-06lms: Use smpl_buf to recover from timestamp jumpsPau Espin Pedrol3-13/+67
Also take the chance to make sure we handle properly short reads (keep reading again). Both scenarios can be tested by running osmo-trx-lms and then using on a terminal: sudo kill -STOP `pidof osmo-trx-lms`; sleep 0.5; sudo kill -CONT `pidof osmo-trx-lms` Fixes: OS#3339 Change-Id: Idfc4e69acc30afb11440b6b9cbdcfa09ff920265
2019-05-06smpl_buf: Move it to device/common and create libdevice_common.laPau Espin Pedrol10-8/+20
Since in next commit osmo-trx-lms starts using smpl_buf.cpp, it seems some automake step doesn't like including a cpp file twice from a different directory, since race conditions can occur building it. Instead we define the dependency by first building a static lib and then using it on each libdevice.la (one per device type). We already do the similar under arch/ subdir, where we have a common/ subdir and then one subdir and lib per architecture. Change-Id: I465ad0f6d5569bb3006d711c8fd0df14391fcf35
2019-05-06Introduce LOGCHAN macro to standarize logging channel infoPau Espin Pedrol3-36/+39
Change-Id: I67d869499aa16af58c863ca7b74c356bcd979936
2019-05-04smpl_buf: Remove dbg log line with duplicated infoPau Espin Pedrol1-4/+4
Change-Id: Ia2423707210a364fa6827b92cca087ced99b088b
2019-05-04smpl_buf: Remove unused clk_rt variable (fixup)Pau Espin Pedrol1-2/+0
Last commit removed use of the clkr_rt variable but forgot to remove the variable itself. Fixes: 580c48b7d5ae931b5ceb7ffa2a1ae39f89b31080 Fixes: Coverity CID 198370 Change-Id: Ida1fc5b7b338fbeb2a7c6258f36b02da93ff2186
2019-05-03smpl_buf: Remove unused clk_rt variablePau Espin Pedrol3-8/+7
During 87b7d098e517470fec53ac13a28d1d0fa7b16bb4 we dropped support for UHD specific functionalitites, and so clk_rt is not needed anymore. Change-Id: I37403e085ed6a541bbdecf64f1f9a821ff2753a4
2019-05-03device: Drop unused numberRead/numberWritten APIsPau Espin Pedrol7-33/+1
It's really not used, so let's drop unused code and simplify work for new to come device drivers implementation. Change-Id: I0d18f9c2584771e2f7b3d5c6b016e764e02855ff
2019-05-03Move smpl_buf out of uhd dir to re-use it in other devicesPau Espin Pedrol4-3/+3
Change-Id: I39ac8435072cff8d4dac786b31ff4af9b61a77fe
2019-05-03uhd: Avoid reallocation of buffers every readPau Espin Pedrol2-15/+10
Buffer size is based on num of chans and rxBuffer size is based on num of chans and rx_spp, and both are available and set during open(), so no need to waste time allocating and freeing them everytime we read from the device. Change-Id: I8c881c9c303c80f323825d85a924d74b76d2ce47
2019-05-03cosmetic: uhd: Use loglevel ERROR instead of ERRPau Espin Pedrol1-11/+11
ERR is osmo-trx legacy level, which actually converts to osmocom's ERROR, so let's use that one directly. Change-Id: I82f6f89a725bea7f7acfa455c20cf922cc3f8a00
2019-05-03uhd: smpl_buf: Use TIMESTAMP type in str_statusPau Espin Pedrol2-3/+3
Other related functions use "TIMESTAMP timestamp" so let's use same stuff in that function. Change-Id: I016b1a7f8db379caebc1409ca11e5ae8b759d2d4
2019-05-03uhd: smpl_buf: Drop UHD specifics out back to UHDDevicePau Espin Pedrol3-25/+4
This way smpl_buf can be re-used later by other non-UHD drivers. Change-Id: I94061328d46a550d4147121d85baffa29c700c45
2019-05-03cosmetic: uhd: Move smpl_buf out of UHDDevice, move UHDDevice class ↵Pau Espin Pedrol5-362/+455
definition to .h * move class definition to .h file, like we do for other devices. * move smpl_buf class to a different file inside uhd/. * Preparation work to have smpl_buf being used in a generic way for devices other than UHD (LMS). Change-Id: Ib4594320da9bb7f6e9f52e7d70d11ecd11106aae
2019-04-25lms: Catch and log dropped packets by HW during recvPau Espin Pedrol2-0/+9
Change-Id: I23554d95b0aff585024610fc12920c9da4f3ba9e
2019-04-25lms: Remove unused var m_last_tx_overrunsPau Espin Pedrol2-2/+0
Change-Id: I2104205b2af7cd6c86075d5cc4f0f36bde5e5311
2019-04-25lms: Remove references to ALERT loglevelPau Espin Pedrol1-21/+21
ALERT log level is not Osmocom standard level, it's just a define in osmo-trx to keep compatibility with old code. Same goes for one reference to "ERR" intead of "ERROR". Change-Id: I0e171a8ac8a8bfa804ac97fba3d73efcfa6424b4
2019-04-25lms: Log underrun/overrun eventsPau Espin Pedrol1-2/+10
Change-Id: I8c6b1d3e8515153e5d4079cc6620901ef8ce2449
2019-04-25Move duplicated thread_enable_cancel to CommonLibsPau Espin Pedrol4-12/+7
Change-Id: I1a479b59bdda01233273dfa919bd678edbe34708
2019-04-25cosmetic: Threads.h: Remove trailing whitespacePau Espin Pedrol1-2/+2
Change-Id: I0ae6e435a7f0480c3eaa08dccfe824456f33b015
2019-04-25lms: Improve log during flush recv errorPau Espin Pedrol1-1/+1
Change-Id: Id45d42599738efd6a5d89787c75779838a979330
2019-04-25lms: flush_recv: alloc buf on stack instead of heapPau Espin Pedrol1-3/+1
No need to use the heap here since buffer is only used as a temporary trash. Using the stack is quicker. Change-Id: Iede8dc0903ee3865a52c8e2fd811bcde444fee33
2019-04-17lms: properly call close if set_antennas() fails, add some commentsJoachim Steiger1-1/+4
Change-Id: I9ebe986ee3a15842a15853424ee98e9a2fa6a5df
2019-04-17lms: add device type detection and device specific gainsJoachim Steiger3-58/+40
add device dependant max gain setup - limesdr mini and limenet micro need slightly reduced maximum gains to get a PASS on phase error measurements rework clock reference setup - external clock needs to be selected before calling LMS_Init(), internal can only be set after. remove now unused compat_LMS_VCTCXO* functions - we do not set the VCTXCO directly anymore Change-Id: I3cf905b0a84bc1ec200891762a6646141ee37181
2019-04-17lms: move LMS_GetLPFBWRange and LMS_Calibrate calls from open to startJoachim Steiger2-27/+50
bandwidth, freqency, gain stages need to be set before calibration can be successful Change-Id: I1090effdf0f43e5183a402e4c1a1ffe5abdefd37
2019-04-17lms: move LMS_EnableChannel from Start/Stop to Open/Close deviceJoachim Steiger1-8/+14
move enable: it is important that channels are actually enabled before applying any configuration (besides external clock) move disable: move to close, so channels are not disabled and not enabled again while osmotrx is active. Change-Id: I82878913254ce15a85db8d006e13d5eb639793e9
2019-04-17lms: Remove wrong unused code copied from -uhdJoachim Steiger1-5/+2
Change-Id: I2bc7fcfa429d1f82c2d8e95d31dfed367f2b3f9d
2019-04-16use BSC_FD_READ and not OSMO_FD_READHarald Welte1-1/+1
We haven't even released any tagged version of libosmocore yet which includes support for the renamed OSMO_FD_READ constant. Let's avoid any breakage and use the new constants only with considerable delay, at the very least only when released libosmocore versions provide it. Change-Id: Idb57077b2a4b2a71dd5d75a24ded8bb5887da188
2019-04-11doc/configuration.adoc: fix incorrect number of physical RF channels for B210Vadim Yanitskiy1-1/+1
Change-Id: I58e2bf5dd99e1655ebd2ad80f6ed2bb178f0e88d
2019-04-11multi-ARFCN: fix maximum number of carriers limitationTom Tsou3-4/+16
Maximum number of carriers is fixed to 3 channels on a single physical RF channel in multi-ARFCN mode. For some reason, it was limited to 5. Let's fix this, and also follow this limitation in the following VTY command handlers: - cfg_multi_arfcn_cmd, - cfg_chan_cmd. Change-Id: I66a1462f368458afd313ee6f0bc0abc496dde817
2019-04-02osmo-trx: Check return code of osmo_fd_registerPau Espin Pedrol1-1/+4
Fixes Coverity CID 197513. Change-Id: I93fbcb062439a547379aaecba283d107fdc9cb59
2019-03-29osmo-trx: Use signalfd to serialize signals in main thread ctxPau Espin Pedrol1-5/+46
This should avoid prolematic scenarios where different signal handlers are running on different thread in parallel. Furthermore, we make sure those signals are always run by main loop thread. Change-Id: I9b9d9793be9af11dbe433e0ce09b7ac57a3bdfb5
2019-03-29osmo-trx: Avoid handling signals after shutdown triggeredPau Espin Pedrol1-0/+6
Recently a blocked osmo-trx process was found after ending SIGTERM to it. Apparently one thread was handling SIGTERM and calling fprintf() (grabbing libc lock) while another thread was handling another signal and also grabbing similar lock. Both thread looked deadlocked there. Probably this change doesn't fix the block on its own, but at least simplifies scenarios inside signal ctx which can go wrong. Change-Id: If91621913b8b03d8a0f4c863be0b0d479f97e8a1
2019-01-24tests: Re-enable the convolve_test by defaultSylvain Munaut1-2/+0
Change-Id: Ia26ef75bb11482fc0db3b790db1c93c8b74229d1 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-01-24tests: Rework the convolve_testSylvain Munaut4-167/+925
Besides just general cleanup, the major changes are : - Fully internal generation of reference data that doesn't depend on glibc or even on any floating point math - Golden results are included in a .h Due to varying precision of different implementation or architecture, any kind of textual compare is impossible, so we include golden values and compare results of both the 'base' implementation the potentially 'optimized' one again this set of values with a small error tolerance Change-Id: I4e203d2c4b778af77d630ed15d4cef6b0c0eb76d Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-01-24VTY: add extended (11-bit) RACH detection toggleVadim Yanitskiy5-10/+36
Since I838c21db29c54f1924dd478c2b34b46b70aab2cd we have both TS1 and TS2 synch. sequences, in addition to "default" TS0. Let's finally introduce the VTY configuration parameter, that can be used to toggle optional detection of both TS1 and TS2. Note: we keep this optional because of potentially bad impact on performance. There's no point in paying the performance penalty unless upper levels (BTS, PCU) actually make use of it. Change-Id: I1aee998d83b06692d76a83f79748f9129a2547e8 Related: OS#3054
2019-01-21convolve: Remove support for step, offset parametersSylvain Munaut11-166/+124
- Those are not used any where - Those are not supported by the sse/neon accelerated versions - And I see very little use cases for those. Change-Id: Ic850269a0ed5d98c0ea68980afd31016ed555b48 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-01-21arm/convolve: Fix the vfp4 real convolution for h_len=12Sylvain Munaut1-2/+2
Change-Id: Ic73f0746edd3f1f22bb1d79d4c64aa740691dd48 Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2019-01-20Bump version: 0.4.0.125-7c78 → 1.0.01.0.0Harald Welte1-0/+146
Change-Id: Ibb888f55a1ab27088d5f21ee8ad699f4f747abde
2019-01-11cosmetic: Don't call the SDR "USRP" in error messageHarald Welte1-1/+1
Transceiver.cpp is used for all SDR hardware we support, not just USRP. Change-Id: I9b7ddb0d679f111407704048ef3ddd964db49441
2019-01-11usrp1: Fix formatting of log message (missing space)Harald Welte1-2/+2
Change-Id: I378a8081a224acda3ee2af9b6aa0d680de884695
2019-01-11usrp1: Remove uninitialized skipRx logicHarald Welte2-9/+3
There appears to have been some logic to operate a USRP1 in transmit-only GSM mode. This is achieved using the skipRx member of the transceiver object. However, there's nobody that ever initializes it properly, and hence the feature is not possible to use anyway. I don't think this has any valid use case, so let's remove it. Change-Id: I616193f1e9aaefbf4ceb26761657811093f28b6f
2018-12-17LMSDeviceTest: fix link errors on OBSOliver Smith1-1/+2
Link LMSDeviceTest against LMS_LIBS, so it does not only compile on Debian, but also on Ubuntu and openSUSE. Thanks to roox for figuring this out. Related: OS#3654 Change-Id: I6980d4290f623485a77db10fea6d17de0321c092
2018-12-14configure.ac: check boost only if USRP1 support is enabledPau Espin Pedrol1-3/+2
boost is only used in USRPDevice class. It looks like it can be removed entirely quite easily, since only boost::shared_ptr is used for 2 variables. That's left for somebody with the device and willingness to test the changes. Change-Id: I4c3fa3ff58fd552d0cb4c4cf2033615d84c07c96
2018-12-14lms: Fix build against LimeSuite > 18.10Pau Espin Pedrol2-2/+34
LimeSuite dc124e4e2ed9b549b142410af172f0592f9f0c23 > 18.10 broke API compatibility. OS#3729 Change-Id: Idf500a5b39a857233f728c6a4316c00a99374556
2018-12-13TimevalTest: Make test deterministic with fake timePau Espin Pedrol1-7/+18
Change-Id: I74e577a0142fb6d1ef3630e02aff9910b191bff9
2018-12-13Timeval: Move to osmo_clock_gettimePau Espin Pedrol2-1/+10
Change-Id: I24da3e1136c5396062662be1d10b07b4d97cfc2e
2018-12-13Timeval: Move implementation to use clock_gettime and timespecPau Espin Pedrol2-28/+28
According to gettimeofday manual: "Applications should use the clock_gettime() function instead of the obsolescent gettimeofday() function." Furthermore, it may be desirable in the future to use other clocks such as monotonic. Change-Id: I2286998c5eefbf3c3dfb105c223daec7a1083803
2018-12-13Timeval: passed() returns true if time is equalPau Espin Pedrol1-1/+1
Change-Id: I96a9d26657f85447609693bc6932d218d354b84a
2018-12-13LMSDevice: make use of dev-args in osmo-trx.cfgOliver Smith5-2/+98
Allow selecting a specific LimeSDR device by setting dev-args in the config file. Split up the given dev-args address by comma and select the device where all substrings can be found. I could not test this with real hardware, but I have added a test case to make sure this works as expected. Related: OS#3654 Change-Id: Ib9aaa066a01bf9de3f78234d7ada884d6f28c852