diff options
author | Tom Tsou <tom.tsou@ettus.com> | 2017-06-26 10:13:25 -0700 |
---|---|---|
committer | Tom Tsou <tom.tsou@ettus.com> | 2017-06-27 11:36:34 -0700 |
commit | f611569018f7456ff1fb7a0ffdfc2a76696702d7 (patch) | |
tree | e2d892c96120f2bc26df6c19097127b6ff6270a3 | |
parent | 354741326cc7b3de9daf7066ecb7793573e5bf15 (diff) |
uhd: Always specify samples-per-symbol for device lookup
Fix MCBTS device setup where the map access was failing on the wrong
assumption that all devices support 1-SPS TX-RX operation. Some devices
and/or configurations such as LIMESDR and MCBTS only support running
at 4-SPS.
Even though certain settings (e.g. number of physical channels or the
FPGA clocking rate) are not dependent on the SPS value, we still need to
specify because we use SPS as a parameter for device classification.
Fixes: OS#2341
Change-Id: I56e939285d585cc38efa6c329e30e3acebb734eb
Signed-off-by: Tom Tsou <tom.tsou@ettus.com>
-rw-r--r-- | Transceiver52M/UHDDevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Transceiver52M/UHDDevice.cpp b/Transceiver52M/UHDDevice.cpp index 833f02f..a766ddc 100644 --- a/Transceiver52M/UHDDevice.cpp +++ b/Transceiver52M/UHDDevice.cpp @@ -576,7 +576,7 @@ void uhd_device::set_channels(bool swap) chans = 1; } - if (chans > dev_param_map.at(dev_key(dev_type, 1, 1)).channels) + if (chans > dev_param_map.at(dev_key(dev_type, tx_sps, rx_sps)).channels) throw std::invalid_argument("Device does not support number of requested channels"); std::string subdev_string; @@ -1069,7 +1069,7 @@ uhd::tune_request_t uhd_device::select_freq(double freq, size_t chan, bool tx) /* Find center frequency between channels */ rf_spread = fabs(freqs[!chan] - freq); - if (rf_spread > dev_param_map.at(dev_key(B210, 1, 1)).mcr) { + if (rf_spread > dev_param_map.at(dev_key(B210, tx_sps, rx_sps)).mcr) { LOG(ALERT) << rf_spread << "Hz tuning spread not supported\n"; return treq; } |