[PATCH] osmo-trx[master]: uhd: Always specify samples-per-symbol for device lookup

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Tom Tsou gerrit-no-reply at lists.osmocom.org
Tue Jun 27 18:37:12 UTC 2017


Hello Max, Alexander Chemeris, Jenkins Builder,

I'd like you to reexamine a change.  Please visit

    https://gerrit.osmocom.org/3062

to look at the new patch set (#2).

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 at ettus.com>
---
M Transceiver52M/UHDDevice.cpp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/62/3062/2

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 @@
 		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 @@
 
 	/* 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;
 	}

-- 
To view, visit https://gerrit.osmocom.org/3062
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I56e939285d585cc38efa6c329e30e3acebb734eb
Gerrit-PatchSet: 2
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Tom Tsou <tom at tsou.cc>
Gerrit-Reviewer: Alexander Chemeris <Alexander.Chemeris at gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>
Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr at sysmocom.de>



More information about the gerrit-log mailing list