quiniouben / vban

VBAN protocol open-source implementation
GNU General Public License v3.0
450 stars 63 forks source link

[Raspberry Pi] Crackling sound on old models (Prior 4) over ethernet #89

Open lamaland opened 3 months ago

lamaland commented 3 months ago

I've been struggling for a couple of days on this one, really hard to figure out.

When playing as receptor, sound was crackling with pops (a lot). No errors in logs, no buffer underrun.

The IMPORTANT information here is : every Raspberry Pi prior to model 4 was using USB to handle Ethernet connexion.

When playing a sound, hardware interruptions were VERY important on USB side (8k / second ....)

The solution here is to disable ALL usb ports, and using WiFi instead. It may sound counter intuitive, but this is the only way to get it to work.

To disable USB, enter the following command : (BEWARE : IT WILL STOP ETHERNET INTERFACE, WiFi will continue) echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/unbind

You can enable usb again with this command : (Or simply reboot) echo '1-1' | sudo tee /sys/bus/usb/drivers/usb/bind

Just use the -q param to a higher value, buffer will get bigger, latency too, but with a decent signal, it will work far better, and by that I mean "perfectly".

The best solution here is to move to a newer generation of Rpi.

Hope this helps someone !

lamaland commented 3 months ago

And thank you @quiniouben for this wonderful project !

xurei commented 3 months ago

Thanks for the information !

I'm planning to use VBAN and a USB microphone on a RPi 3 A+.

According to your post, to make it work correctly, you need to disable USB, which I cannot do.

Isn't there a way to keep USB on but disable Ethernet instead ?