Support for Focusrite Scarlett, and in general usb soundcards

Discussions related to using VirtualBox on Linux hosts.
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

fth0 wrote:
edufissure wrote:I made that test and still without sound. Speakers turns on, and level of sound suggest some output from soundcard, but no sound is heared.
Thanks for trying, which sorts out several potential problems. What did the Windows Sound Output settings dialog show? Was the Focusrite 4i4 Scarlett still displayed as the standard communications device? If so, this could indicate the problem, because some communication devices (e.g. phones) do not accept audio input/output before a communication connection (e.g. phone call) has been established.
Sorry for the delay ive been busy these days.
Captura de pantalla 2022-04-26 194852.jpg
Captura de pantalla 2022-04-26 194852.jpg (92.77 KiB) Viewed 3206 times
Anotación 2020-09-08 183754.jpg
Anotación 2020-09-08 183754.jpg (114.38 KiB) Viewed 3206 times
As you said with audio disabled in vm.

No sound is heared. Some times a little crackle or noise is heard.

As you can see, now Focusrite is detected as audio device ( no more communication device)

Thanks for your help....
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by fth0 »

Ok, now you have a clean (simplified) setup:

1) On one side, you have the Windows guest OS with sound drivers from Windows and/or Focusrite, which are supposed to send audio data to the (virtual) USB device.

2) In the middle, VirtualBox provides a physical USB device (Focusrite 4i4 Scarlett), which is connected to the host, as a virtual USB device to the guest. VirtualBox doesn't (have to) know that the USB device is an audio device, and the VirtualBox audio implementation is not involved at all.

3) On the other side, you have a Linux host OS, which should not have any logical access to the physical USB device (Focusrite 4i4 Scarlett), which has been captured by VirtualBox.

Now the question is: What to analyze next? Some ideas:

In the Windows guest, you could use some sound utilities (e.g. mixer) to verify if the audio data is sent to the USB audio device.

In the Windows guest, you could use Wireshark to capture the USB traffic (Google how to do that). This could also be done on the Linux host OS, and both USB captures could be compared to see if the audio data is coming that far.
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

I think i would need some help, about what do you want to capture...
This is my device and i have wireshark installed but dont know if its usbmon1 or usbmon2, or what filters to add..

Bus 001 Device 002: ID 1235:8212 Focusrite-Novation Scarlett 4i4 USB

Could you please write what filters do you need i capture in host and in guest ?
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by fth0 »

I'm not sure about it either, but I think there should be a usbmon0 which encompasses all the other usbmon<1-n>.
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

Hi, just a test, you wanted this ??

https://drive.google.com/file/d/11TwbDJ ... sp=sharing

Its the usb traffic capture of my usbmon1 in the host machine ( without any guest vm started). If this is what you need id try to do it in the guest vm machine.

@fth0 ??
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

?? any ideas ? was that what you needed ??
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by fth0 »

Yes, the USB trace is fine. Start a new USB capture on the host, then start the guest, start an USB capture inside the guest and try to play some sound.
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

Thanks i think i got it...
wiresharkhost as name suggests is the capture of the usb in host without guest, and launching guest machine.
https://drive.google.com/file/d/1IcEPfv ... sp=sharing

wiresharguest is the guest when playing some spotify playlist.
https://drive.google.com/file/d/1rbZTx4 ... sp=sharing

Hope helps, if you need any more advice you ask and id try do my best

ps. we can make a meet if you need.....
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

???? Is that what you wanted ? @fth0 ??
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

???? Is that what you wanted ? @fth0 ??
fth0
Volunteer
Posts: 5677
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by fth0 »

I needed to learn some USB concepts for a few hours, just to understand the basics. I can tell you what I see in the PCAPs, but not the reason for it, and I cannot attribute the seemingly wrong behavior to the host, the guest or to VirtualBox:

18:37:57 The host stops using the USB device.
18:38:34 The guest initializes USB device.
18:38:58 The guest selects one of the USB device's audio streaming interfaces, but does not transfer any audio data.
18:39:00 The host selects one of the USB device's audio streaming interfaces, and immediately starts transferring audio data.
18:39:11 The guest aborts its USB audio connection.

I don't know why the host can and does access the USB audio device while the guest is running. I also don't know how a working setup would behave. One could spend days or weeks for further detailed investigations, but I'm not willing to do that in my spare time, sorry for that.

You could create a ticket in the Bugtracker pointing to this thread, but I wouldn't hold my breath.
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

Re: Support for Focusrite Scarlett, and in general usb soundcards

Post by edufissure »

Thanks for your help....very apreciated....
Post Reply