Solved Use USB-camera microphone and audio output from rear

I have a Realtek sound card where I have plugged in my speakers (rear input).

I have also a create livecam usb web-camera with an integrated microphone. The camera is working fine and the microphone is also recognized both in dmesg and /dev/sdnstat:
Code:
pcm0: <Realtek ALC889A (Rear Analog 7.1/2.0)> (play/rec) default
pcm1: <Realtek ALC889A (Front Analog)> (play/rec)
pcm2: <Realtek ALC889A (Rear Digital)> (play/rec)
pcm3: <USB audio> (rec)
No devices installed from userspace.
If I plug a microphone at the rear, I can use it. But I haven't found a way to use the webcam microphone.

This is from my mixer (default):
Code:
Mixer vol      is currently set to  24:24
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to  74:74
Mixer line     is currently set to   0:0
Mixer mic      is currently set to 100:100
Mixer mix      is currently set to  74:74
Mixer rec      is currently set to 100:100
Mixer igain    is currently set to   0:0
Recording source: mic
And this is from /dev/mixer3:
Code:
Mixer mic      is currently set to 100:100
How can I use the usb webcam microphone together with my rear-plugged speakers?
 
How can I use the usb webcam microphone together with my rear-plugged speakers?
It's going to depend on the application you use. You may be able to configure that application to use a different device for the microphone.
 
My current need is to use it with chrome but I do not see any other option than "Default Speaker" and "Default Microphone".
 
Leave the default speaker setting as-is, that already works as you wanted. Set the default microphone to /dev/pcm3 (I assume that's your webcam).
 
Thank you for your suggestion. It seems that this is a solution but the problem is now how to run virtual_oss properly. I have tried with many different options but none worked so far.

1) What is the name of the device? I have tried and get same error:
# virtual_oss -R /dev/mixer3 -r 44100 -s 256
virtual_oss: Missing -r or -s parameters

# virtual_oss -R /dev/usbus4/uadio0 -r 44100 -s 256
virtual_oss: Missing -r or -s parameters

-seems the program reports wrong requirements

2) Is it mandatory to specify also an output device? If yes, than what is the name of the device:
/dev/dsp0.0 (no other dsp available) ?
/dev/mixer0 ?

3) Is it mandatory to specify all options? I tried with different options, all I get is "Missing -r or -s parameters"...

Thanks again for the help.
 
Thank you very much for your answer, this worked for recording using for example cat and ffmpeg but for Chrome I had to run first:

# sndiod

and then run the command.

For anyone bumping on this thread, to make it permanent just do:
# service sndiod enable
# service sndiod start
# nano /usr/local/etc/rc.d/virtual_oss
virtual_oss_default_args="-C 2 -c 2 -r 48000 -b 16 -s 5ms -P /dev/dsp0 -R /dev/dsp3 -d dsp -Q 0"

# service virtual_oss enable
# service virtual_oss start
 
Back
Top