2020 choice of USB/audio bridge

Was it no feedback packets or feedback packets with zeros? Slow would mean below nominal rate (i.e. fewer than 48 frames every 1ms packet). I have never seen that, it would make no sense. The initial rate is nominal and the feedback packets tweak the momentary rate from the nominal one. If no packets arrive, no tweaking.
 
  • Like
Reactions: 1 user
I do not see how windows could run faster than linux on the same hardware if both output nominal rate and why they would not output nominal rate if no feedback was available...

Also how it would happen that windows fits the device rate almost exactly to run OK for hours, especially with the short device buffers..
 
I vaguely recall some xhci controller had a register for slight tweaking the PLL to generate the internal clock. Theoretically windows could have set this register differently than linux, resulting in faster USB speed.But that's wildly guessing, I looked at that very long time ago.
 
  • Like
Reactions: 1 user
Look at Frame Length Adjustment (FLADJ) - page 12 of https://www.mindshare.com/files/resources/mindshare_ehci_whitepaper.pdf , table 5-6 page 375 of https://www.intel.com/content/dam/w...ensible-host-controler-interface-usb-xhci.pdf . IIUC that register allows tweaking SOF length enumerated by 480MHz cycles (60k ticks => 125us). I could not find any access to register 0x61 in linux kernel in uhci/xhci/ehci, this register is not defined in headers and is not listed in debugfs. IMO linux does not touch this reg, therefore the default value of 0x20 (= 60k ticks) should be preserved. I read somewhere that bios could be setting this too. Theoretically windows could be setting the default 0x20, while linux could preserve some non-default value set by the bios, many ways, all quite unlikely...
 
How does windows know what speed different from the nominal value to send to fit your device clock for hours? IMO there had to be some different reason. Did you check the packets with wireshark?
I rechecked this with Wireshark. Turned out there was something fishy happening at enumeration. This was caused by PulseAudio which wanted to use my device as default sink and source. After disabling PulseAudio the issue seems to be gone. Now both Linux and Windows act the same. Depending on the clocks both can run for tens of minutes (maybe hours) with no async feedback without causing buffer over/underruns in my device.

I only use Linux (Ubuntu) occasionally for testing but IMO the audio system is somewhat messy. This may also be due to Ubuntu distro.
 
  • Like
Reactions: 1 user
IMHO PA just tried opening your device in various samplerates, that the driver reported your device supports. It opens a device shortly at startup. It's one of the reasons I implemented debouncing in https://github.com/pavhofman/gaudio_ctl#debouncing

PA has no special access to alsa devices, it uses standard alsa-lib like any other audio app.
Depending on the clocks both can run for tens of minutes (maybe hours) with no async feedback without causing buffer over/underruns in my device.
Well then you are lucky your PC and STM clocks fit perfectly. In my tests of RTX6001 without enabled implicit feedback in the linux driver the XMOS buffer glitched every 10 secs, a different combination did so every several minutes. Pure coincidence, IMO.
 
In my tests of RTX6001 without enabled implicit feedback in the linux driver the XMOS buffer glitched every 10 secs, a different combination did so every several minutes. Pure coincidence, IMO.
Yes, pure coincidence. But assuming async feedback is not working those recurring glitches may explain why some people complain about noise with USB-I2S boards.
 
Actually enumeration failed quite frequently as PulseAudio kept playing at some samplerate.
Hm, what do you mean by failed enumeration? PA supports only standard rates and it runs in a pre-configured rate, like windows audio subsystem. If your device does not support that rate, PA fails to use the device. But I do not see any way how the host could feed your device with a stream just slightly higher/lower than the pace expected by your device at the given samplerate. It would maybe hint at some issue in your firmware like it would not handle the short playback properly, not resetting some variables for new non-zero altsetting, something like that, I do not know.