Change in osmo-trx[master]: LMSDevice: Print sample rate range + actual sample rate after setting it

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/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Jun 13 21:33:31 UTC 2018


Harald Welte has uploaded this change for review. ( https://gerrit.osmocom.org/9604


Change subject: LMSDevice: Print sample rate range + actual sample rate after setting it
......................................................................

LMSDevice: Print sample rate range + actual sample rate after setting it

Change-Id: I19c1a5b2d2431b8d39e277244e313f6e559e4d25
---
M Transceiver52M/device/lms/LMSDevice.cpp
1 file changed, 9 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/04/9604/1

diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index 0442e27..9301cf4 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -118,9 +118,18 @@
 		return -1;
 	}
 
+	lms_range_t range;
+	if (LMS_GetSampleRateRange(m_lms_dev, LMS_CH_RX, &range))
+		goto out_close;
+	LOG(DEBUG) << "Sample Rate: Min=" << range.min << " Max=" << range.max << " Step=" << range.step;
+
 	LOG(DEBUG) << "Setting sample rate to " << GSMRATE*sps << " " << sps;
 	if (LMS_SetSampleRate(m_lms_dev, GSMRATE*sps, 32) < 0)
 		goto out_close;
+	float_type sr_host, sr_rf;
+	if (LMS_GetSampleRate(m_lms_dev, LMS_CH_RX, 0, &sr_host, &sr_rf))
+		goto out_close;
+	LOG(DEBUG) << "Sample Rate: Host=" << sr_host << " RF=" << sr_rf;
 	/* FIXME: make this device/model dependent, like UHDDevice:dev_param_map! */
 	ts_offset = static_cast<TIMESTAMP>(8.9e-5 * GSMRATE);
 

-- 
To view, visit https://gerrit.osmocom.org/9604
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I19c1a5b2d2431b8d39e277244e313f6e559e4d25
Gerrit-Change-Number: 9604
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Pau Espin Pedrol <pespin at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180613/3b456de3/attachment.htm>


More information about the gerrit-log mailing list