diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2022-04-17 07:41:52 +0000 |
---|---|---|
committer | Harald Welte <laforge@osmocom.org> | 2022-04-19 19:31:18 +0200 |
commit | 8a2e82560cda0727fb468add0a5117782fe463b4 (patch) | |
tree | 08b8ad225a0a66d779ed49580f2cdc73236fafcb /src/octoi/e1oip.c | |
parent | 99161f1423234e3a253e59d9b99650306596c9bd (diff) |
octoi: Simple RX priming / pre-filling
This was not an issue with the original FIFO code, which dynamically
substituted frames and always created the minimal required backlog.
The RIFO can by principle not operate this way, so we really have to
prime / pre-fill it with a number of TDM frames. That initial fill
level has to be sufficient to cover RTT jitter of the OCTOI link as
well as clock drift between (GPS synced) receiver and transmitter.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I3a4b3846d3dbd1c99989e994ad95e609f2757219
Diffstat (limited to 'src/octoi/e1oip.c')
-rw-r--r-- | src/octoi/e1oip.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/octoi/e1oip.c b/src/octoi/e1oip.c index 5dd3bbf..6a5a240 100644 --- a/src/octoi/e1oip.c +++ b/src/octoi/e1oip.c @@ -286,7 +286,7 @@ struct e1oip_line *e1oip_line_alloc(struct octoi_peer *peer) e1oip_line_set_name(iline, peer->name); iline->cfg.batching_factor = 32; - iline->cfg.prefill_frame_count = 400; /* 50ms */ + iline->cfg.prefill_frame_count = 200; /* 25ms */ e1oip_line_reset(iline); @@ -305,6 +305,7 @@ void e1oip_line_reset(struct e1oip_line *iline) frame_rifo_init(&iline->e1t.rifo); memset(&iline->e1t.last_frame, 0xff, sizeof(iline->e1t.last_frame)); iline->e1t.next_fn32 = 0; + iline->e1t.primed_rx_tdm = false; } void e1oip_line_destroy(struct e1oip_line *iline) |