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 »

Boom is software that helps to get a better equalizer and average sound output.
https://www.globaldelight.com/boom/

So you can apply equalization to whatever output you use ( HDAD or Focusrite). inside boom you can select with source you want to use and what equalization apply.
I cant disable it if necessary or If you want i can uninstall it, but i tested it before installing Boom and the problem is the same.

I dont think its problem of windows, because with same configuration in other laptop with Windows it works as expected.
Also if you have read my post, with guest machine Ubuntu the same happens. Would be strange to have two vm from different OS with setup or configuration problem

I dont know where you get that Focusrite is taken as a mobile device. Perhaps guest additions doesnt work properly and gets and usb soundcard as phone device or whatever device, and as a consecuence the sound is not goint out the right way -> no sound in speakers.

Any ideas or tests i can make ? Thanks for your time and effort
fth0
Volunteer
Posts: 5668
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 »

edufissure wrote:I dont know where you get that Focusrite is taken as a mobile device.
I looked at your "better" screenshot, where it is clearly shown with a green overlay icon and the text which translates to "Standard communications device".
edufissure wrote:Perhaps guest additions doesnt work properly and gets and usb soundcard as phone device or whatever device
Neither VirtualBox nor the VirtualBox Guest Additions know much about the type of USB devices. I could imagine issues if the Focusrite device would present itself as several USB devices, though.

From your descriptions, I still don't understand where the audio data is supposed to come along: Inside the guest OS, you play some audio. To which of the three audio output devices first? Where does this audio device send the audio next? To the speakers on the host, or are we talking about another set of speakers? Why do you expect the audio to be output on the speakers?

Try to describe the wanted audio processing chain from the audio source (e.g. disk file) to the audio sink (e.g. speakers), especially the role of the Focusrite device. Either by picture or with text.

Another thing: From your postings so far, I'm not sure if you are an audio professional or an audio beginner. I'm definitely the latter, so it's possible that we're misunderstanding each other a bit. ;)
edufissure wrote:Would be strange to have two vm from different OS with setup or configuration problem
Not necessarily, if the setup was done by the same person. I can tell that from my own experience. ;)
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

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

Post by edufissure »

I looked at your "better" screenshot, where it is clearly shown with a green overlay icon and the text which translates to "Standard communications device".
You are right i didnt notice ;). But dont know how to change it....

Id try to answer again, sorry my english is not good and im a beginner with audio.

I told my history quicly. I have a linux host computer with two pioneer speakers connected to it and i want to try virtualdj and other djs software. So they dont have linux version, they have mac or windows. I have or you can get easily windows vms. So i want to play virtualdj in my guest computer windows10, and that sound comes out in the speakers from the host.

I bought Focursirte as usb soundcard. Obviously i have the default HD Audio integrated in my motherboard. So in my host computer i can get sound from standard output and the usb soundcard.
Everything ok. I can select fro with output i want the speakers hear from

Then i have the vm. Installed drivers and it seems recognized. So i can choose between lets say standard output ( High Definition Audio Device -> device in motherboard of the host) and the usb soundcard output ( self-explanatory). So if i use HDAD all is fine. I play an audio file in the vm and it gets the sound by the pioneer speakers in the host....works as expected.
Problem comes when i change the output sound of vm to usb souncard. Then seems thats is something there ( green level in Altavoces) but you get no sound by speakers and sometimes you hear some cracks.

Hope it would be clearer to you...if not id try to explain better.
Not necessarily, if the setup was done by the same person. I can tell that from my own experience.
Again its difficult because in windows you dont have to touch anything, just install the drivers. Same process i made with my laptop that has only windows10 and everything works fine.

Any ideas would be apreciated...
fth0
Volunteer
Posts: 5668
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 »

Thanks for your explanations so far. I still do not understand some crucial details. Before I ask further questions, let me explain why I have difficulties understanding your setup:

The Focusrite Scarlett is rather an audio interface device than a soundcard. AFAIU, the typical application is to attach some physical input devices (e.g. microphone, guitar), some physical output devices (e.g. speakers, amplifiers), and a PC via USB. Audio originating from the input devices can go over the USB interface to the PC, and audio originating from the USB interface (PC) can go to the output devices. On the PC you have some audio processing software. That's the mindset from which I start (which could be wrong in your case).

Let's first discuss your setup without any VM:
edufissure wrote:I bought Focursirte as usb soundcard. Obviously i have the default HD Audio integrated in my motherboard. So in my host computer i can get sound from standard output and the usb soundcard.
Everything ok. I can select fro with output i want the speakers hear from
What is physically attached to the Focusrite device in your setup?

What do you use it for?

What do you mean with "get sound from standard output"? I'm asking because normally you'd "put sound to standard output". Or do you mean to say that you "hear sound from standard output"? If you meant the latter, than "get sound from the usb soundcard" doesn't make sense to me.

I would ask you to write in your native language (and let Google Translate help us), but I have the impression that our (mis-)understanding issues have more to do with the language agnostic terminology like "input" and "output".

To give an example for a possible graphical and textual description of an audio chain/routing:

File >---> Speakers >---> Ears

Audio data is output from a File, input to the Speakers, output from the Speakers, input to the Ears. The audio source is the File, the audio sink are the Ears, and intermediate nodes (the Speakers) have input and output.

The Focusrite device can have many inputs and outputs, and I'm trying to understand what works on your host and what doesn't work in your VM ...
I need to understand
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

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

Post by edufissure »

Hope this help:
Selection_689.png
Selection_689.png (96.31 KiB) Viewed 3622 times
As said i want to use for example VirtualDj with is only in Windows and Mac. So i installed it in a vm with Windows10.
So in my Host, i have a vm with Windows 10, using virtualbox 6.1.32 and in the guest the guest additions.

So my usb soundcard produces or reproduces the sound and gives the output through the motherboard line output ( hd audio color green)

Audio source is only disk files from hard disk or spotify. No input from micro or other devices.

If you have any doubts just let me know, but im running out of ideas ;)

Thank for your help
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

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

Post by scottgus1 »

One idea I have, from the picture:
edufissure wrote:Focusrite...attached by USB 2.0
Attach the Focusrite to a 3.0 port, the blue ones. VirtualBox's USB 3.0 implementation is reported to be more robust than its USB 2.0 implementation. Keeping the device in the 3.0 channel, as in the VM where the xhci 3.0 'device' is used, might help the connection.

One other thing to keep in mind: when a USB device is passed into the VM it is no longer usable by the host OS. Just something to keep in mind while diagnosing. Your Focusrite is being run directly by the Windows 10 OS, and the host Linux does not have any contact with the Focusrite.
fth0 wrote:FWIW, this is a red herring. VBoxManage showvminfo decodes the Revision (USB standard: bcdDevice) incorrectly.
Thanks, fth0! I did not know this. Sorry, edufissure, about my making an issue about the revision number! :oops:
fth0
Volunteer
Posts: 5668
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 »

Thanks again for the picture and the explanations. In both of your setups (Windows host; Linux host + Windows guest), I see three possible audio routing variants (I've also marked where the digital/analog conversion would take place IMO):

Code: Select all

1) Audio to speakers only:

         SATA     D/A                                      Line              Air
   File >-----> Windows >---------------------------------------> Speakers >-----> Ears


2) Audio through Focusrite to speakers:

         SATA             USB               USB     D/A    Line              Air
   File >-----> Windows >-----> Focusrite >-----> Windows >-----> Speakers >-----> Ears


3) Audio to Focusrite and speakers in parallel:

         SATA             USB                              Line              Air
   File >-----> Windows >-----> Focusrite x
                  D/A   >---------------------------------------> Speakers >-----> Ears
Variant 1 works in both of your setups. How did you switch to variant 2 or 3 in your setups? I'm asking because Focusrite drivers and/or software perhaps have their own settings to do that.

If your aiming for variant 2, how did you configure the Focusrite device so that it plays back the audio, which it receives over USB, over USB again? Is this a kind of loopback setting, and what would be the purpose of it?

If you're aiming for variant 3, how and what did you configure to duplicate the audio data?

Why do you expect the audio to be played back on the speakers in variants 2 and 3?

I think that either you or me or both of us are having a misconception somewhere. But in the end we'll find out. ;)
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

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

Post by edufissure »

scottgus1 wrote:One idea I have, from the picture:
edufissure wrote:Focusrite...attached by USB 2.0
Attach the Focusrite to a 3.0 port, the blue ones. VirtualBox's USB 3.0 implementation is reported to be more robust than its USB 2.0 implementation. Keeping the device in the 3.0 channel, as in the VM where the xhci 3.0 'device' is used, might help the connection.
Thanks i have this setup:
Selection_690.png
Selection_690.png (75.62 KiB) Viewed 3570 times
I use a usb2.0 because Focusrite official web recommends to use usb2.0..as example:
https://support.focusrite.com/hc/en-gb/ ... t-USB-3-0-
scottgus1 wrote: One other thing to keep in mind: when a USB device is passed into the VM it is no longer usable by the host OS. Just something to keep in mind while diagnosing. Your Focusrite is being run directly by the Windows 10 OS, and the host Linux does not have any contact with the Focusrite.
Just is what im sure the physical connection and setup works ok. Because when no vm is running in the host, the sound comes ok from usb soundcard. And as you said when i start the vm with Windows10 is when theres no output. This is expected behaviour till you play some sounds in the guest vm,so it could be hear from the speakers ( the same way that default integrated soundcard in the motherboard works without problems).
fth0 wrote:FWIW, this is a red herring. VBoxManage showvminfo decodes the Revision (USB standard: bcdDevice) incorrectly.
Thanks, fth0! I did not know this. Sorry, edufissure, about my making an issue about the revision number! :oops:
Well no problem at all
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

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

Post by edufissure »

fth0 wrote:Thanks again for the picture and the explanations. In both of your setups (Windows host; Linux host + Windows guest), I see three possible audio routing variants (I've also marked where the digital/analog conversion would take place IMO):

Code: Select all

1) Audio to speakers only:

         SATA     D/A                                      Line              Air
   File >-----> Windows >---------------------------------------> Speakers >-----> Ears


2) Audio through Focusrite to speakers:

         SATA             USB               USB     D/A    Line              Air
   File >-----> Windows >-----> Focusrite >-----> Windows >-----> Speakers >-----> Ears


3) Audio to Focusrite and speakers in parallel:

         SATA             USB                              Line              Air
   File >-----> Windows >-----> Focusrite x
                  D/A   >---------------------------------------> Speakers >-----> Ears
Variant 1 works in both of your setups. How did you switch to variant 2 or 3 in your setups? I'm asking because Focusrite drivers and/or software perhaps have their own settings to do that.
[/quote=]
[/quote="fth0"]

One thing to point out is that you use here the soundcard integrated in the motherboard. Which is a cheap and poor one. So this is recognized and works fine in the host and in the guest machines.
fth0 wrote: If your aiming for variant 2, how did you configure the Focusrite device so that it plays back the audio, which it receives over USB, over USB again? Is this a kind of loopback setting, and what would be the purpose of it?

If you're aiming for variant 3, how and what did you configure to duplicate the audio data?

Why do you expect the audio to be played back on the speakers in variants 2 and 3?

I think that either you or me or both of us are having a misconception somewhere. But in the end we'll find out. ;)
Another perhaps error: i think variant 3 doesnt exist. As you can see and point out @scottgutt, when i start the vm with Windows10, then the soundcard "is passed from linux host to virtual guest windows10 machine" and this is the problem. So the vm should act as if i had an windows computer with a usb soundcard connected to it. And outputs/inputs should work ok ( ex: mic input from motherboard, output line in motherboard, usb ports in motherboard...). And this is the problem. With default soundcard of motherboard everything works. But virtualbox can reproduce sounds or hearable the usb soundcard in a virtual machine.

I think you have a concept problem the sound card "makes the sound"/"mixes the sound"/"reproduces sound in high quality" -> but the hardware item that takes this sound out is the motherboard with in my concrete case the 5 audio hd connectors. As focusrite is high quality soundcard their offer the possibility to connect a micro and headphones directly to the soundcard. But main sound output, the one to goest to speakers, is made through connectors in motherboard...

Hope we can be a little close......thanks for your patience

By the way i spoke to focusrite general support and their were open to forgive or gift a soundcard to development purposes and to help to make it work in virtualbox or virtualization software. Suppose that if their borrow or gift a usb soundcard they would claim for some results.
fth0
Volunteer
Posts: 5668
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 »

edufissure wrote:Another perhaps error: i think variant 3 doesnt exist. As you can see and point out @scottgutt, when i start the vm with Windows10, then the soundcard "is passed from linux host to virtual guest windows10 machine" and this is the problem. So the vm should act as if i had an windows computer with a usb soundcard connected to it. And outputs/inputs should work ok ( ex: mic input from motherboard, output line in motherboard, usb ports in motherboard...). And this is the problem. With default soundcard of motherboard everything works. But virtualbox can reproduce sounds or hearable the usb soundcard in a virtual machine.

I think you have a concept problem the sound card "makes the sound"/"mixes the sound"/"reproduces sound in high quality" -> but the hardware item that takes this sound out is the motherboard with in my concrete case the 5 audio hd connectors. As focusrite is high quality soundcard their offer the possibility to connect a micro and headphones directly to the soundcard. But main sound output, the one to goest to speakers, is made through connectors in motherboard...
I couldn't fully understand what you tried to explain with these (English language) sentences. Can you please rephrase it again in your own language?
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

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

Post by edufissure »

@scottgut do you understand the problem any ideas ??

@fth0
Creo que la variante 3 no existe. La tarjeta de sonido normalmente se conecta al host por usb y reproduce sonido por los altavoces como indique en el grafico.
Una vez encendida la maquina virtual, el problema es que no sale el sonido por los altavoces como se espera.
Tal como indico @scottgut en un post anterior, cuando enciendo la vm la tarjeta de sonido "pasa del host al guest", y por lo tanto es el guest con W10 el que trata con la tarjeta de sonido.
Aqui esta el problema. Virtualbox no hace funcionar la salida de sonido bien. Parece ser que la tarjeta de sonido es reconocida de alguna manera ( aunque sea como communication device) y los niveles de sonido se mueven ( indica actividad) cuando se reproduce algun sonido en windows ( fichero, web, sonidos del so etc...). El problema es que este sonido que parece que windows gestiona no sale por los altavoces. Parece ser que virtualbox o la maquina virtual reconoce la tarjeta de sonido como communication device.
Si utilizo la tarjeta de sonido incorporada en la placa madre todo funciona de forma correcta. O sea el problema diria que es con las tarjetas usb.

Alguien comento que el problema es de configuracion del windows y no de virtualbox.
Yo creo que problema es con la virtualizacion porque tengo otro equipo ( portatil), solo con windows, y lo unico que se necesita es instalar los controladores y conectar la tarjeta de sonido, y funcina todo correcto. Cosa que en la maquina virtual no funciona.

Para casi asegurar que el error es de virtualizacion, si en mi equipo host, en vez de una cliente con windows pongo una cliente con linux...Tampoco funciona. Entonces es dificil pensar que el host es linux y la tarjeta funciona de forma correcta, pero cuando enciendes una vm cliente con linux tb, entonces deja de funcionar y no se escucha nada, con lo misma configuracion que tiene el host. ( tanto host como guest son Ubuntu 20.04.4 LTS).

Gracias

If you need we can meet using Teamviewer and see what happens....
fth0
Volunteer
Posts: 5668
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, I understood what you were saying, but I don't agree with your expectations. You can stay with the English language, BTW. Just try to be even more precise in your statements than before, to leave even less room to interpretation. ;)

1. The MSI Z270-A PRO mainboard has an HD Audio Processor and 6 audio connectors. The Pioneer DM40BT speakers are connected to the green audio out connector.

2. The Focusrite 4i4 Scarlett is an external audio interface (external soundcard), connected via USB to the mainboard, with its own input and output connectors, with a headset and a microphone connected to them.

3. In the Windows Sound setup, you can select where Windows and Windows applications shall send its sound output to by default. However, Windows applications can send their sound output to any subset of the sound output devices.

Do we agree on 1. - 3.?

a) When the High Definition Audio Device is selected as the default sound output device and you play back an audio file from within a Windows application that hasn't individual sound output settings, I'd expect the sound to be hearable on the speakers, but not on the headphone.

b) When the 3- Focusrite Usb Audio is selected as the default sound output device and you play back an audio file from within a Windows application that hasn't individual sound output settings, I'd expect the sound to be hearable on the headphone, but not on the speakers.

As far as I understood what you were saying so far, you'll disagree on my statement b). Is this true?

Why do you think that sound output directed to the Focusrite device should be hearable on the Pioneer speakers?

What happens if you connect the Pioneer speakers to the Focusrite device?

PS: Note that I deliberately didn't mention the term VM above, because my description is supposed to be VM-agnostic so far.
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

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

Post by edufissure »

1. The MSI Z270-A PRO mainboard has an HD Audio Processor and 6 audio connectors. The Pioneer DM40BT speakers are connected to the green audio out connector.

2. The Focusrite 4i4 Scarlett is an external audio interface (external soundcard), connected via USB to the mainboard, with its own input and output connectors, with a headset and a microphone connected to them.

3. In the Windows Sound setup, you can select where Windows and Windows applications shall send its sound output to by default. However, Windows applications can send their sound output to any subset of the sound output devices.

Do we agree on 1. - 3.?
Yes, but i have to point out that in Sound Setup in Windows, you can select which device manages the sound, you can select between HDAudioDevice ( soundcard integrated in the motherboard) or USBDevice ( Focusrite in my case).

As i had this setup many months ago, i didnt remember some things the right way....Here you can find an updated version with my setup. Sorry, i was focused in writing english and my memory is not the same as when i was younger :)

https://lucid.app/lucidchart/2bfc1855-b ... 06980da3f9
a) When the High Definition Audio Device is selected as the default sound output device and you play back an audio file from within a Windows application that hasn't individual sound output settings, I'd expect the sound to be hearable on the speakers, but not on the headphone.
The sound usually is configured at SO level not an application level. Here you are confusing things in my opinion. When you select the HDAudio device, you can use whatever outputs/inputs has. You can use line out, the headphones out,mic in etc.. Is not one thing or another ( i use headphones or i use speakers). Usuarlly in sound panel you can select the volume level of outputs, inputs and also enable disable them if you want.
b) When the 3- Focusrite Usb Audio is selected as the default sound output device and you play back an audio file from within a Windows application that hasn't individual sound output settings, I'd expect the sound to be hearable on the headphone, but not on the speakers.
The sound usually is configured at SO level not an application level. Here you are confusing things in my opinion. When you select the USB soundcard device, you can use whatever outputs/inputs has. You can see that mic has its own volume, also headphones. At SO level you can silence or disable the things at your taste.
Why do you think that sound output directed to the Focusrite device should be hearable on the Pioneer speakers?
Because it works in the host when no vm is started. I have setup my linux that the default sound device for ouput sound, would be the focusrite usb soundcard line 1-2

What happens if you connect the Pioneer speakers to the Focusrite device?
Sorry ive told you before, ive updated my graphics, The focusrite is still connected to speakers..

Sorry again for my bad memory and my bad english.
Thanks for your help....
fth0
Volunteer
Posts: 5668
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 willing to provide personal information to Lucidchart. Please attach the picture to your post (e.g. as a zip file), or provide it where I can access it without creating an account.
edufissure
Posts: 79
Joined: 8. Sep 2018, 19:27

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

Post by edufissure »

Sorry i thought that you didnt need to register to view the image.

The image is too big to upload here....here you dont need to register:
https://imagebin.ca/v/6eGKgO6uQyQL
( use zoom if you need to read the letters )

Thanks for you patience
Post Reply