Review at  https://gerrit.osmocom.org/3084

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, 3 insertions(+), 5 deletions(-)


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

diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 80fafb8..a2aef9f 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -77,10 +77,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,
@@ -90,7 +86,9 @@
                   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!\n");
        }
        return GSM_RTP_DURATION;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d112c6db142be138e71393e77129e6d069d9973
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol <pes...@sysmocom.de>

Reply via email to