[PATCH] osmo-bts[master]: l1sap.c: fn_ms_adj: Add err logging and always return GSM_RT...

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

Pau Espin Pedrol gerrit-no-reply at lists.osmocom.org
Fri Jun 30 17:13:50 UTC 2017


Hello Jenkins Builder,

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

    https://gerrit.osmocom.org/3084

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

l1sap.c: fn_ms_adj: Add err logging and always return GSM_RTP_DURATION

After latest changes, l2 expects to receive an event for every TCH
frame, that is, no TCH frame event should be lost on that layer. We
should now then be safe returning always GSM_RTP_DURATION.

The code which used to calculate the variable duration is left there to
assert that indeed we are not longer having this kind of issues.

Change-Id: I9d112c6db142be138e71393e77129e6d069d9973
---
M src/common/l1sap.c
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/84/3084/2

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 410e1d3..7b7c15e 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -27,6 +27,7 @@
 #include <stdbool.h>
 #include <sys/types.h>
 #include <sys/stat.h>
+#include <inttypes.h>
 
 #include <osmocom/core/msgb.h>
 #include <osmocom/gsm/l1sap.h>
@@ -87,10 +88,6 @@
 {
 	uint32_t samples_passed, r;
 
-	/* don't adjust duration when DTX is not enabled */
-	if (lchan->ts->trx->bts->dtxu == GSM48_DTX_SHALL_NOT_BE_USED)
-		return GSM_RTP_DURATION;
-
 	if (lchan->tch.last_fn != LCHAN_FN_DUMMY) {
 		/* 12/13 frames usable for audio in TCH,
 		   160 samples per RTP packet,
@@ -100,7 +97,11 @@
 		   GSM_RTP_DURATION */
 		r = samples_passed + GSM_RTP_DURATION / 2;
 		r -= r % GSM_RTP_DURATION;
-		return r;
+
+		if (r != GSM_RTP_DURATION)
+			LOGP(DL1P, LOGL_ERROR, "RTP clock out of sync with lower layer:"
+				" %"PRIu32" vs %d (%"PRIu32"->%"PRIu32")\n",
+				r, GSM_RTP_DURATION, lchan->tch.last_fn, fn);
 	}
 	return GSM_RTP_DURATION;
 }

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I9d112c6db142be138e71393e77129e6d069d9973
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pespin at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max <msuraev at sysmocom.de>



More information about the gerrit-log mailing list