USB Soundcard

Discussions about using Windows guests in VirtualBox.
Post Reply
jklinge
Posts: 4
Joined: 15. Nov 2016, 11:39
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10/various linux distros

USB Soundcard

Post by jklinge »

Hi,

I am trying to get an external soundcard working using:
- Dell Revolve G1 Laptop
- host OS: Ubuntu 16.04
- VirtualBox 5.1.8 (with extension pack installed)
- guest OS: Windows 10 64-bit w all updates installed
- soundcard: Focusrite Scarlett 2i4 USB 2.0

I confirmed that the soundcard is working with the Ubuntu host using jack (just plug it in and connect via jack - amazingly good!). The soundcard is also working well on Win10 in a non-virtual machine.

My main problem is that on the surface everything seems to be working well. I can connect the Focusrite to the VM guest via a USB filter in VirtualBox. I have installed (and re-installed) the appropriate Focusrite ASIO drivers in the guest. After connecting the soundcard to the guest it is shown in the Windows device manager which reports it is working. Only problem is there is no sound coming out of it.

Is this a VirtualBox problem - I find some older posts on external soundcards that talk about limited support for USB Audio. I am fairly new to VirtualBox so any suggestions on ways to troubleshoot or fix this issue would be greatly appreciated.

BR, Johan
Last edited by jklinge on 16. Nov 2016, 20:28, edited 1 time in total.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: USB Soundcard

Post by michaln »

It only has a chance of working when using xHCI USB emulation (you didn't specify what you're using). But it's not guaranteed, because some high-end USB audio devices use questionable techniques that won't work in a VM.

For example, Roland Quad-Capture is known to work. E-MU 0202 is known not to work.

In general, it's probably a bad idea anyway. If you need to do audio work with very low latency, do not use a VM.
jklinge
Posts: 4
Joined: 15. Nov 2016, 11:39
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10/various linux distros

Re: USB Soundcard

Post by jklinge »

Thanks for the info. I had not considered switching the USB Emulations options. Had glanced at them but since xHCI is labeled USB3 and my device is USB2 I never tried switching.

I can report that after changing to xHCI the soundcard is working well!

I cannot set audio buffer to anything lower than 440 samples (guess this is the price for running it in a VM), but this still gives me a latency that is good enough for my purposes.
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: USB Soundcard

Post by michaln »

jklinge wrote:Thanks for the info. I had not considered switching the USB Emulations options. Had glanced at them but since xHCI is labeled USB3 and my device is USB2 I never tried switching.
Yeah, it's a bit funny. The thing is that xHCI is required for USB3, but it improves performance across the board. It's a much more modern controller architecture compared to the horrible old ones (UHCI/OHCI/EHCI).
I can report that after changing to xHCI the soundcard is working well!
I'm very happy to heard that. My experience is that there are two classes of USB audio devices. There are the common devices which conform to the standard USB audio class, and those work pretty well. Then there are high-end/professional audio devices with their own drivers, and those are hit and miss. Some work great, some not at all, and it's completely unpredictable because it's all custom hardware and software.
I cannot set audio buffer to anything lower than 440 samples (guess this is the price for running it in a VM), but this still gives me a latency that is good enough for my purposes.
How much is that in milliseconds? About 10 msec?
jklinge
Posts: 4
Joined: 15. Nov 2016, 11:39
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10/various linux distros

Re: USB Soundcard

Post by jklinge »

Latency - you're pretty much spot on! With audio buffer set to 440 samples the latency varies from about 9,5 to 10,5 msec depending on sampling rate used.

I intend to plugin a guitar to the soundcard and play a guitar live with ampsim software in the VM. And for that - at least to me - 10 msec latency is so little that I do not notice it.

Btw, are there are any settings to configure that would allow setting the audio buffer to even lower values?
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: Any and all
Contact:

Re: USB Soundcard

Post by michaln »

Not really, no. At that point it starts depending on the host hardware and OS, but the latency in a VM can't be realistically brought under several milliseconds in the best case, and the ASIO drivers etc. will add to that.
jklinge
Posts: 4
Joined: 15. Nov 2016, 11:39
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows 10/various linux distros

Re: USB Soundcard

Post by jklinge »

OK. I can understand that. Really happy I got it working and thanks for your support!
Post Reply