# How to set default sound input device



## byrnejb (Mar 3, 2022)

FreeBSD-12.3p2

I am trying to set up an A/V capability for `chrome`.  Unlike `firefox` the chrome browser does not enumerate all of the available sound input devices.  It only lists _*default*_ as the available device.

The input device I have configured is a _Microsoft-Microsoft-LifeCam-HD-3000_ .  The system I have has a builtin audio but I want to use the mic in the (USB) webcam. 

```
[root@vhost01 ~ (master)]# cat /dev/sndstat
Installed devices:
pcm0: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm1: <NVIDIA (0x0051) (HDMI/DP 8ch)> (play)
pcm2: <Realtek ALC892 (Rear Analog 5.1/2.0)> (play/rec) default
pcm3: <Realtek ALC892 (Front Analog)> (play/rec)
pcm4: <Realtek ALC892 (Rear Digital)> (play)
pcm5: <USB audio> (rec)
No devices installed from userspace.
```

If I do a mic test in Firefox it allows me to select which of the three input devices to use.  And the test works with the USB audio.  However, Chrome only shows default as the available.  I cannot find in setting in Chrome that allows me to set the device to use. So my question is how to set the USB webcam as the default recording device.  I realize that this likely will not work but it seems worth a try.


----------



## grahamperrin@ (Mar 3, 2022)

Google Chrome for Linux, or www/chromium?



byrnejb said:


> …  I cannot find in setting in Chrome that allows me to set the device …











						Chromium audio
					

With Teams, neither the microphone nor the speaker can be changed.  Is this normal?    www/chromium only in this topic, please.




					forums.freebsd.org
				






> neither the _microphone_ nor the _speaker_ can be changed.


----------



## argwings (Mar 3, 2022)

Maybe check out `man mixer` and/or virtual_oss's -R option


----------



## byrnejb (Mar 3, 2022)

grahamperrin said:


> Google Chrome for Linux, or www/chromium?
> 
> 
> 
> ...




Chromium.  I do not use it usually and forgot the name.  The web site we had to access required either Edge or Chrome.  It would not accept Firefox.  I probably should have just modified the user agent string.

Anyway, the microphone worked in the conference webapp despite not responding at the mic test website.  All is good ATM.


----------



## Geezer (Mar 4, 2022)

Build the port with pulse audio enabled.


----------



## grahamperrin@ (Mar 4, 2022)

www/chromium



Geezer said:


> Build the port with pulse audio enabled.



True, however this requires disabling support for sndio(7). 

Also:



cederom said:


> This requires tremendous port rebuild. …



Like, for www/chromium alone a FreeBSD Project server took *more than twenty-two hours* for a recent build <http://beefy18.nyi.freebsd.org/buil...amd64-default&build=pff8f3a1b75aa_s1b602f641a>. 

Plus around 280 dependencies (172 of which might be fetched, if poudriere is used), including llvm, rust and so on:


----------



## George (Mar 5, 2022)

`mixer =rec pcm5`
This should set the current recording device.

I didn't test it, but it should be possible via mixer(), somehow.. Mixer was rewritten, so there might be new ways to do this..

To list the current recording device:
`mixer rcsrc`
To add your device to the list of possible recording devices:
`mixer +rec pcm5`

It might require a restart of chrome.


----------



## grahamperrin@ (Mar 5, 2022)

George said:


> there might be new ways to do this..



Yep, see the earlier (linked) topic for an example.


----------

