A real _underrun_ happens if the RIFO is empty (depth == 0)
and should be counted different from a mere frame substition
due to packet loss.
Change-Id: I5448430b09ec10a16decdfd0a4a40850fe2ed1a6
Because we poke at some of the internals we need to make
sure to maintain the internal state consistent.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I5d9397be391c60f732c89f158d25660e1f32cfac
This shows that rifo_depth is off-by-one for all but the 'empty'
case. It is intended that 'make check' will fail after this commit,
before the next commit with the fix is introduced.
Change-Id: I1be1889800c83d251d17801f31040c137c06a46d
This tests exactly one frame before and one frame after what
should be accepted to make sure those are rejected
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I048e1b8c2b918f7ca4b4327b89bf04430a2838bc
This commit adds 2 new tests:
- too old frames (which should get dropped)
- already correct frames (which shouldn't be touched)
In addition, every test will now be run twice.
Once at frame number 0 and once very close to the wrap-around of
the internal frame counter in order to observe the behaviour.
Change-Id: I930b4361924b2e8bcb566eb7ee64f36e06bc7745
In the past, we used a FIFO structure (first in, first out) - which
obviously cannot deal with packet re-ordering on the IP side.
This patch introduces a new "RIFO" as a replacement for the FIFO.
The RIFO is able to reconstruct E1 frame ordering by using the
reduced frame number from the TDMoIP messages, at least as long
as the related frame number range is within the current RIFO depth.
Change-Id: I22256870114cb85e4e10932554478be7061e086b