srsLTE: Increase UHD default sampling rate. Enables warning if USB2 is used.

This commit is contained in:
Xavier Arteaga 2020-01-03 18:53:36 +01:00 committed by Andre Puschmann
parent be4ba504bd
commit 8a666ee455
1 changed files with 4 additions and 3 deletions

View File

@ -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)