xmos / lib_i2s

I2S/TDM digital audio interface library
Other
20 stars 24 forks source link

backpressure_smoke test failure #28

Closed samchesney closed 6 years ago

samchesney commented 7 years ago

The back pressure test is failing with the following output:

Using divided reference clock
Backpressure breaks at receive delay ticks=185, send delay ticks=185
xross commented 6 years ago

Still failing.

ed-xmos commented 6 years ago

A bit more info:

Building backpressure_test/bin/192000_4_0_10/backpressure_test_192000_4_0_10.xe Using divided reference clock Backpressure breaks at receive delay ticks=185, send delay ticks=185 lib_i2s::i2s_backpressure_tests::backpressure_smoke[sample_rate=192000;num_channels=4;receive_increment=5;send_increment=5] FAIL

i.e. looks like it is failing on 4 I2S lines when incrementing the backpressure in the send callback.

Some extra debug info yields:

actual diff: 527, maximum (period + Jitter): 521

So it's missing the arbitrary overhead value assigned to the 3 callbacks by 6 timer ticks:

define OVERHEAD_TICKS 150

I think this must have just been passing in the past and a compiler update pushed it over the edge.

Changing the test optimisation to -O3 solves it, as does OVERHEAD_TICKS=160

ed-xmos commented 6 years ago

Fixed in https://github.com/xmos/lib_i2s/pull/46