xmos / sw_usb_audio

XMOS USB Audio reference design
Other
32 stars 16 forks source link

Short (less than a frame) I2S loopback discontinuity #188

Open danielpieczko opened 1 year ago

danielpieczko commented 1 year ago

xk_316_mc configs 2SMi8o8xxxxxx and 2SSi8o8xxxxxx have seen short discontinuities which are shorter than a frame's worth of samples. Collecting the failures over a week, this has been seen on the Windows 10 and 11 agents, but not on the Mac. It happens after about three minutes of the output stream, so isn't seen in short tests.

Seen often at 176400, and once at 88200.

Discontinuity from xsig

E                       Channel 0: discontinuity (samples 371643, 0 do not differ by 3 but by -371643) (sample 33683089)
E                       Channel 0: discontinuity offset 0: 0 0 0 0 0 0 0 0
E                       Channel 0: discontinuity offset 8: 0 0 0 0 0 0 0 0
E                       Channel 0: discontinuity offset 16: 0 0 0 0 0 371646 371649 371652
E                       Channel 0: discontinuity offset 24: 371655 371658 371661 371664 371667 371670 371673 371676

There are 21 zeros, which is shorter than the 22 or 23 samples per frame that we would expect at 176400.

danielpieczko commented 1 year ago

USB protocol trace

In this capture the last good sample value on channel 0 is 371643 = 0x05abbb which is:

The next sample value is 371646 = 0x05abbe, which is:

There are then zero values on all channels for remainder of IN 59675 (8 samples), and first 13 samples of IN 59683 (then correct ramp from sample value 0x05abbe)

danielpieczko commented 1 year ago

Analysing the lengths of packets in the complete five minute trace:

Gap between pairs of consecutive 736 len packets should be 20, so 19x704 then 1x736, ... There were 598 gaps of 21 (out of the 122196 longer packets)

OUT transactions had similar results in terms of packet lengths.

danielpieczko commented 1 year ago

Adding a conditional exception on outUnderflow being true here fired during my latest test run.

xross commented 1 year ago

Just to clarify, this is with Theyscon driver, correct?

danielpieczko commented 1 year ago

Just to clarify, this is with Theyscon driver, correct?

Yes