Solved Chrome audio problem mic seems to record but will not play back 13.1 amd64

Code:
I have hp z240 desktop and I want to record a webcam video.
Cam works fine but external mic does not work.
I am using chrome.
https://online-voice-recorder.com/ I am using to try and record+play.

I hope this is the right place to post.
I can play movies and youtube no problem, I find Fbsd mixer easier than
archlinux.

Any tips on what to tweak to get the mic going?

root@dagon:~ # cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC221 (Analog)> (play/rec) default
pcm1: <Realtek ALC221 (Analog 2.0+HP)> (play)
pcm2: <Intel Skylake (HDMI/DP 8ch)> (play)
pcm3: <USB audio> (rec)
No devices installed from userspace.

g@dagon:~ $ mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to 100:100
Mixer mic      is currently set to 100:100
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer igain    is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: line
 
Code:
Ok did that and playback still not work on
https://online-voice-recorder.com/

g@dagon:~ $ mixer =rec mic
Recording source: mic
g@dagon:~ $ mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to 100:100
Mixer mic      is currently set to 100:100
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer igain    is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: mic
 
Code:
I get this when I try the playback which is just low static.

g@dagon:~ $ [14984:266428160:0120/052909.325595:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[14984:266428160:0120/052909.325716:ERROR:bus.cc(399)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
 
Tried other mic jack in back, had to set to mic from line again, same result no playback.
 
Code:
root@dagon:~ # service sndiod restart
Stopping sndiod.
Waiting for PIDS: 15124 15126.
Starting sndiod.


root@dagon:~ # cat /etc/rc.conf
webcamd_enable="YES"
hostname="dagon"
ifconfig_em0="DHCP"
sshd_enable="YES"
ntpd_enable="YES"
sndiod_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="NO"
sendmail_submit_enable="NO"
sendmail_msp_queue_enable="NO"
sendmail_enable="NO"
sendmail_outbound_enable="NO"
kld_list="fusefs"
 
Code:
uaudio0 on uhub0
uaudio0: <vendor 0x046d product 0x0824, class 239/2, rev 2.00/0.10, addr 1> on usbus0
uaudio0: No playback.
uaudio0: Record[0]: 48000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record[0]: 32000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record[0]: 24000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: Record[0]: 16000 Hz, 1 ch, 16-bit S-LE PCM format, 2x8ms buffer.
uaudio0: No MIDI sequencer.
pcm3: <USB audio> on uaudio0
uaudio0: No HID volume keys found.
 
Code:
root@dagon:~ # sysctl hw.snd.default_unit
hw.snd.default_unit: 0

root@dagon:~ # sysctl dev.pcm.0.play.vchans
dev.pcm.0.play.vchans: 1
root@dagon:~ # sysctl dev.pcm.0.rec.vchans
dev.pcm.0.rec.vchans: 1
root@dagon:~ # sysctl hw.snd.maxautovchans
hw.snd.maxautovchans: 16

root@dagon:~ # cat /dev/sndstat
Installed devices:
pcm0: <Realtek ALC221 (Analog)> (play/rec) default
pcm1: <Realtek ALC221 (Analog 2.0+HP)> (play)
pcm2: <Intel Skylake (HDMI/DP 8ch)> (play)
pcm3: <USB audio> (rec)
No devices installed from userspace

g@dagon:~ $ mixer
Mixer vol      is currently set to 100:100
Mixer pcm      is currently set to 100:100
Mixer speaker  is currently set to 100:100
Mixer line     is currently set to   0:0
Mixer mic      is currently set to 100:100
Mixer mix      is currently set to 100:100
Mixer rec      is currently set to 100:100
Mixer igain    is currently set to 100:100
Mixer ogain    is currently set to 100:100
Recording source: mic
 
Code:
root@dagon:~ # ls /dev
acpi                    cuau0                   devctl2                 kbd0                    music0                  sequencer0              ttyv1                   ugen0.5
ada0                    cuau0.init              devstat                 kbd1                    netdump                 ses0                    ttyv2                   ugen0.6
ada0p1                  cuau0.lock              dri                     kbd2                    netmap                  ses1                    ttyv3                   ugen0.7
ada0p2                  cuau2                   drm                     kbdmux0                 null                    sndstat                 ttyv4                   uinput
ada0p3                  cuau2.init              dsp0.0                  klog                    pass0                   stderr                  ttyv5                   ukbd0
apm                     cuau2.lock              efi                     kmem                    pass1                   stdin                   ttyv6                   ums0
apmctl                  cuse                    enc@n3061686369656d30   led                     pass2                   stdout                  ttyv7                   urandom
atkbd0                  da0                     fd                      log                     pass3                   sysmouse                ttyv8                   usb
audit                   da0p1                   fido                    mdctl                   pass4                   tcp_log                 ttyv9                   usbctl
auditpipe               da1                     full                    mem                     pass5                   ttyu0                   ttyva                   video0
bpf                     da1p1                   fuse                    midistat                pass6                   ttyu0.init              ttyvb                   video1
bpf0                    da1p2                   geom.ctl                mixer0                  pci                     ttyu0.lock              ufssuspend              wmistat0
cd0                     da1p3                   gptid                   mixer1                  pfil                    ttyu2                   ugen0.1                 wmistat1
console                 da2                     hpet0                   mixer2                  pts                     ttyu2.init              ugen0.2                 wmistat2
consolectl              da2p1                   input                   mixer3                  random                  ttyu2.lock              ugen0.3                 xpt0
ctty                    devctl                  io                      mlx5ctl                 reroot                  ttyv0                   ugen0.4                 zero
 
I see something where you can set variables for Chrome.
When I try, it says camera in use...
Does anyone have and example of setting the recording device for pcm3?

Also I notice realtek on pcm0 says play and rec, could it be that I can record without the external mic??
Any help appreciated.
 
I see something here that might help.... but can't quite get it going.

Code:
https://forums.freebsd.org/threads/chromium-audio.83892/page-2

Dec 5, 2022
Add bookmark
#31
I'll just leave it here. Chromium works if launching with environment variables explicitly setting which sndio device to use for input and output. In my case I do this in my verison of /usr/local/bin/chrome:

Code:
export AUDIODEVICE="rsnd/0"
export AUDIORECDEVICE="rsnd/2"
mixer -f /dev/mixer2 mic 50

rsnd/0 is the built-in sound card for output, rsnd/2 is the Logitech webcam connected via USB. Mixer setting below sets a reasonable mic level. Now I have Zoom, Teams and Google Meet in FreeBSD. Nice.
 
Code:
g@dagon:~ $ export AUDIODEVICE="rsnd/0"
g@dagon:~ $ export AUDIORECDEVICE="rsnd/3"

amazingly this worked
I set those and started chrome in same xterm.


https://webcamera.io/
 
Code:
g@dagon:~ $ cat bin/c
export AUDIODEVICE="rsnd/0"
export AUDIORECDEVICE="rsnd/3"
mixer =rec mic
mixer vol 100
mixer pcm 100
mixer speaker 100
mixer line 100
mixer mic 100
mixer rec 100
mixer igain 100
mixer ogain 100
chrome&
 
Back
Top