Change in osmo-trx[master]: lms: Use same timestamp offset like when using LimeSDR via UHD

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:34 UTC 2018


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


Change subject: lms: Use same timestamp offset like when using LimeSDR via UHD
......................................................................

lms: Use same timestamp offset like when using LimeSDR via UHD

The tx timestamp offset was not set. We set it to the same value as it
was in UHD interface for LimeSDR

Change-Id: I78bc40cd575097f71a5f82b63467fa81c3f8d837
---
M Transceiver52M/device/lms/LMSDevice.cpp
1 file changed, 2 insertions(+), 5 deletions(-)



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

diff --git a/Transceiver52M/device/lms/LMSDevice.cpp b/Transceiver52M/device/lms/LMSDevice.cpp
index d9b5ba6..3e3c5f6 100644
--- a/Transceiver52M/device/lms/LMSDevice.cpp
+++ b/Transceiver52M/device/lms/LMSDevice.cpp
@@ -139,8 +139,7 @@
 	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);
-	ts_offset = 0;
+	ts_offset = static_cast<TIMESTAMP>(8.9e-5 * GSMRATE * sps); /* time * sample_rate */
 
 	switch (ref) {
 	case REF_INTERNAL:
@@ -489,8 +488,6 @@
 	lms_stream_meta_t rx_metadata = {};
 	rx_metadata.flushPartialPacket = false;
 	rx_metadata.waitForTimestamp = false;
-	/* Shift read time with respect to transmit clock */
-	timestamp += ts_offset;
 	rx_metadata.timestamp = 0;
 
 	if (bufs.size() != chans) {
@@ -539,7 +536,7 @@
 	lms_stream_meta_t tx_metadata = {};
 	tx_metadata.flushPartialPacket = false;
 	tx_metadata.waitForTimestamp = true;
-	tx_metadata.timestamp = timestamp;
+	tx_metadata.timestamp = timestamp - ts_offset;	/* Shift Tx time by offset */
 
 	if (isControl) {
 		LOG(ERR) << "Control packets not supported";

-- 
To view, visit https://gerrit.osmocom.org/9614
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: I78bc40cd575097f71a5f82b63467fa81c3f8d837
Gerrit-Change-Number: 9614
Gerrit-PatchSet: 1
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20180613/9153decf/attachment.htm>


More information about the gerrit-log mailing list