From 8a666ee455fbed2c805c51348389636db70fe899 Mon Sep 17 00:00:00 2001 From: Xavier Arteaga Date: Fri, 3 Jan 2020 18:53:36 +0100 Subject: [PATCH] srsLTE: Increase UHD default sampling rate. Enables warning if USB2 is used. --- lib/src/phy/rf/rf_uhd_imp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/src/phy/rf/rf_uhd_imp.c b/lib/src/phy/rf/rf_uhd_imp.c index 7e801877f..1e3b08569 100644 --- a/lib/src/phy/rf/rf_uhd_imp.c +++ b/lib/src/phy/rf/rf_uhd_imp.c @@ -572,10 +572,11 @@ int rf_uhd_open_multi(char* args, void** h, uint32_t nof_channels) handler->nof_rx_channels = nof_channels; handler->nof_tx_channels = nof_channels; - /* Set default rate to avoid decimation warnings */ + /* Set default rate to avoid decimation warnings and warn about USB2 low throughput */ + double default_srate = (double)srslte_sampling_freq_hz(SRSLTE_MAX_PRB); // Consider standard rates for (int i = 0; i < nof_channels; i++) { - uhd_usrp_set_rx_rate(handler->usrp, 1.92e6, i); - uhd_usrp_set_tx_rate(handler->usrp, 1.92e6, i); + uhd_usrp_set_rx_rate(handler->usrp, default_srate, i); + uhd_usrp_set_tx_rate(handler->usrp, default_srate, i); } if (nof_channels > 1)