DAC issues with XMOS usb chipset and Roon on Linux

Not sure. We probably won’t actually be able to know because we don’t have visibility into how XMOS packages their stuff or what modifications are being made to that on a product-by-product basis by DAC vendors.

Every indication here is that the bug is on the DAC side–that is fairly easy to see from the failure mode. The DAC plays invalid sounds, ends up hung, and the entire relationship between the DAC and OS is broken from that point until the DAC is power cycled.

It’s impossible for a piece of software like Roon to cause behavior like this on its own without an underlying bug in the device, kernel, or OS. In our QA experiments, the bad state survives restarting everything but the DAC, which almost 100% isolates the problem to the DAC and almost 100% exonerates Linux/Driver/Roon.

I made an assumption that it was a problem with newer firmware because this issue has not taken shape into a clear pattern until fairly recently, and the products that we have reproduced with are more recent, so the explanation made sense. It’s not something we are 100% sure of, just a theory. We will probably never be totally sure.

We’ve also noticed that the appearance of this bug is wildly inconsistent from system to system. Some systems can accomplish hundreds of format transitions without trouble, and others fail within a few transitions.

Maybe it’s a timing bug–this is a common class of mis-implementation on USB devices that is consistent with all of the above. Some DACs assume that software->driver will exercise state transitions at a slow pace, and run into race conditions/failures when ending a stream + starting a new one in rapid succession (which is the best thing for user experience, and an area that we have put work into optimizing).

If that’s the case, the workaround is straightforward, but distasteful–artificially waste some time at these transition points so that the DAC isn’t overwhelmed. Yuck. But it wouldn’t be the first time we have found a bug like this in a USB DAC. Then there’s a question of whether everyone gets slowed down, or if we can somehow detect devices with this bug. None of this is very pretty…

1 Like