* FIFO target level :
- The '8 * 16' makes no sense as the FIFO was 128 so this
is the "full" case and could never be that high.
- We tighten up the margin around 5 * 16 which is the "target"
level for the FIFO
* FIFO size :
We also increase the FIFO size to 256 frames. This doesn't
actually affect latency since the target level is the same,
but it allows more leeway to recover without data loss in
case something goes wrong.
* Ticks :
We don't bother using ticks ... the current algo wasn't
working (or rather not doing anything all that useful),
because the difference between USB clock and E1 clock is
tiny and measured over 1 ms, it's not meaningful.
So for the time being we just sent the nominal rate biased
with the FIFO level to keep it on target and this seems
to work fine.
It'd be nice to have a good long term estimate of the rate
to minimize the jitter, but it doesn't seem to be strictly
required for operation for now.
* Misc cleanup :
Just do all in one function instead of splitting the check
if BD needs refill and the actual refill.
This gets rid of sporadic 'TX FIFO Overflow' conditions
by properly handling the case where we have a bit too much
data.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: Ibd3bc9080961cc56093e43ab9a824840e84c24d2
Currently all the users of those function just statically use port 0
only.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Change-Id: I17671be65543f5a2bf3d16ba2b5a5081eb38ebdf
Scan over every odd E1 frame TS0 byte to check if the A-bit is set,
indicating a remote alarm. If so, set yellow LED and report via the
error flags communicated to the host by USB interrupt transfer.
Change-Id: Ic4f57cf79bd32cf75f81ef3073cb8d4a2d1857d8
This introduces a number of vendor-specific control requests for
configuration of the icE1usb from the host software.
Closes: OS#4675
Change-Id: I9d28566ba21a2a78def5e4a0ba07ecbc4a583aa9
Those clear bits are only set once at start-up and then later
explicitly. They shouldn't be stored with the user configuration
in state variables.
Change-Id: If38e86aefea7f1be4e1ff5a88860f8be593eeedc
Whenever Rx is aligned, the green LED is permanently on.
Whenever Rx is not aligned, the green LED is blinking.
What's missing is to check for E1 clock ticks and turn the LED off
completely if there are no clock ticks.
Change-Id: I42d53544858dbbbae5206d9a62b08672966c9ebf
The position indicates where we are in terms of frame and multiframe.
The related code was ported over from e1-tracer.
Related: OS#4674
Change-Id: I9e59d86a2e8f4e85ca84c592438ad79966b49448
Currently only the icE1usb-proto is supported. Adaptation for the
final production hardware is yet to be done.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>