So, I have an important news,
but let me reply in order.
Preamble
Yes, I used it intensively. It is, at least, a bit more easier to navigate the ioreg tree. Even if sometimes crashes.
IORegistryExplorer.app
I think that, in a certain way, we have finally agreed on the audio latency aspects. We are in a R&D phase, so we are experimenting latencies lower than what the market offers: 0.5 to 1ms roundtrip . But, if you want me to provide you a spec. I would tell you 1.8ms roundtrip.
So, as I already mentioned in my previous reply, I don't think that OS scheduling or overall system load matter to a significant extent in this investigation, and measurements under load prove it. Clearly, the concurrent DDR access will cause jitter in read/write operation, but these seem to be inside the margins that I already considered.
Now, the Plot Twist
I decided to extensively log ioreg changes and console output during the issue occurrences and, completely unexpectedly, I discovered these kind of events.
kernel [ACIO2:high_speed_lane.c:289] Gen2/3 link error. lane=0, error=83
kernel [ACIO2:high_speed_lane.c:289] Gen2/3 link error. lane=1, error=83
I therefore tried to improve my statistics by logging longer, and I discovered that those kinds of errors always preceded missed reading deadlines. No missed deadlines, no link errors – and vice versa. This means that the cause is much more lower level than what we expected. Perhaps, ironically, the cursed spectre of my previous job as a signal integrity engineer at CERN.
The question now is, does this happen between FPGA to USB4 Controller or USB4 Controller to Mac? I don't think that I saw this high_speed_lane.c code into the open source IOPCI, but I might be wrong. Do you know something about it?
I also didn't designed the PCB myself, this will be performed in the upcoming future. So, I don't really have control of what and how well things were managed there. This was just an AliExpress ADT-UT3G adapter that we adopted between a good PCIe FPGA card and the Mac (and, perhaps not insignificantly ^^, with the cable that came free of charge).
I still require more time to investigate it but I noticed that, even a hard abruption of the FPGA does not produce such a kind of error. Instead, disconnecting the USB-C does. At the moment, I decided to try running with an older USB3.2 cable, which force negotiation to 20Gbps instead of 40Gbps, while still keeping the PCIe tunnelling alive. With that I did not see such issues anymore. Hence, the problem was probably due to a SI issue in the cable or between USB4 controller to USB-C connector.
It’s been quite a turbulent story, but perhaps we’ve managed to find some answers. I’d like to summarise the whole strategy I used and include it in this post for future reference.
Topic:
App & System Services
SubTopic:
Drivers
Tags: