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>
This commit is contained in:
parent
354741326c
commit
f611569018
|
@ -576,7 +576,7 @@ void uhd_device::set_channels(bool swap)
|
||||||
chans = 1;
|
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");
|
throw std::invalid_argument("Device does not support number of requested channels");
|
||||||
|
|
||||||
std::string subdev_string;
|
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 */
|
/* Find center frequency between channels */
|
||||||
rf_spread = fabs(freqs[!chan] - freq);
|
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";
|
LOG(ALERT) << rf_spread << "Hz tuning spread not supported\n";
|
||||||
return treq;
|
return treq;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue