# Unable to get audio + microphone simultaneously.



## ergpopler (Jan 6, 2021)

Hi -- my audio and microphone are picked up as seperate devices. 

/dev/dsp4 is my microphone.
/dev/dsp3 is my headset output.

If i set pcm3 as my default device in mixertui, i get headset output but no mic.
if i set pcm4 it uses my PC's built in speaker, but the microphone works.

If i use pulseaudio, I can make Firefox use /dev/dsp4 as the input, but not chromium, or any other applications.

I've attempted to get "virtual_oss" working.. Couldn't get it to work, at all. 

the thing i was reading ( i lost it  ...) didn't explain much... 

I set something up in my rc.conf (pastebin: https://paste.rs/YuL )

i've tried tinkering in mixertui and in pavucontrol, to no avail. 

with pulseaudio, it uses the incorrect microphone by default, and changing it with pacmd did absolutely nothing.

Any help is appreciated, thank you.


----------



## PMc (Jan 7, 2021)

Never tried mixertui, and didn't use a microphone yet, but I went for jack, and there are two separate options for input and output device. What I need (vlc, audacious, firefox) works with jack. At least the output can be openend as 8-channel, and then there are 8 jacks to plug in whatever and route it to different speakers. I suppose input can do similar.
jack is no mixer, it is just plugging cables with a graphical tool (can be automated). If a mixer is needed, it can be cabled in between, like a monitor or tape machine would be cabled in on a conventional stereo (this is also nice for capturing live streams with a harddisk recorder).


----------



## George (Jan 7, 2021)

This wiki article recommends virtual_oss for such a setup. 



			Sound - FreeBSD Wiki


----------



## ergpopler (Jan 7, 2021)

Elazar said:


> This wiki article recommends virtual_oss for such a setup.
> 
> 
> 
> Sound - FreeBSD Wiki


ah yes that was what i looked at. I couldn't get it to work, i set it up and it simply did nothing. in fact, when i do cat /dev/sndstat it doesn't say anything was added in userspace.


----------



## George (Jan 7, 2021)

I couldn't make it work either, but blamed it on myself haha xd.


----------



## PMc (Jan 8, 2021)

This one works.
(Yes, maybe ardour is a bit big for a mixer, but then, I did like the big 11" open-reels as well.)

This is the rc.conf:

```
jackd_enable="YES"
jackd_user="pmc"
jackd_rtprio="YES"
jackd_args="-r -d oss -r48000 -p1024 -n3 -w16 -o8 -C /dev/dsp7 -P /dev/dsp0"
```

This is needed in firefox about:config


media.cubeb.backendjack


And this is a little patch for firefox to get proper labels:/usr/ports/www/firefox-esr/files/patch-xa-jackname

```
*** media/libcubeb/src/cubeb_jack.cpp.orig      Wed Sep 30 18:04:14 2020
--- media/libcubeb/src/cubeb_jack.cpp   Mon Oct 19 00:22:00 2020
***************
*** 612,618 ****
    }
  
    const char * jack_client_name = "cubeb";
!   if (context_name)
      jack_client_name = context_name;
  
    ctx->jack_client = api_jack_client_open(jack_client_name,
--- 612,618 ----
    }
  
    const char * jack_client_name = "cubeb";
!   if (context_name && context_name[0] != '\0')
      jack_client_name = context_name;
  
    ctx->jack_client = api_jack_client_open(jack_client_name,
```


----------

