Microphone stopped working in Frefox and Chrome

Tomasz CEDRO tomek at cedro.info
Sat Jan 23 13:35:42 UTC 2021


On 1/23/21 8:49 AM, Matthias Apitz wrote:
> and FF works with 'pulseaudio --start'. I do not say 'works fine'
> because I have to restart pulseaudio and FF after plug-in an USB headset
> to get it recognized as /dev/dsp2.

Hello Matthias :-) Yes the same here, I have to manually restart 
PulseAudio on hotplug. Maybe a system wide service with DEVD hooks would 
do the trick.. but I prefer to run it as user :-)

> $ cat /dev/sndstat
> Installed devices:
> pcm0: <Intel Haswell (HDMI/DP 8ch)> (play)
> pcm1: <Realtek ALC283 (Analog 2.0+HP/2.0)> (play/rec)
> pcm2: <USB audio> (play/rec) default
> No devices installed from userspace.
> 
> $ ls -C1 /dev/dsp*
> /dev/dsp0.1
> /dev/dsp1.0
> /dev/dsp1.1
> /dev/dsp1.2
> /dev/dsp1.3
> /dev/dsp1.4
> /dev/dsp2.0   <**** USB headset
> 
> Do you know if the above problem (restart of ....) could be solved?
> Do you have any special 'about:config' for FF with pulseaudio?

Not really with FF but you may want to take a look (man snd) and sysctl:

hw.snd.default_unit <- you can set the default unit
  Default sound card for systems with multiple sound cards.  When
  using devfs(5), the default device for /dev/dsp.  Equivalent to a
  symlink from /dev/dsp to /dev/dsp${hw.snd.default_unit}.

hw.snd.default_auto <- this is useful for hotplug (=2)
  Automatically assign the default sound unit.  The following
  values are supported (default is 1):
  0   Do not assign the default sound unit automatically.
  1   Use the best available sound device based on playing and
      recording capabilities of the device.
  2   Use the most recently attached device.

I usually set hw.snd.default_unit=3 in /etc/sysctl.conf to set default 
to my external USB SoundBlaster that is connected to a hifi audio system 
and loudspeakers.

I noticed that setting hw.snd.default_auto=2 switches sound to hotplug 
USB headphones that I use for online video conferecing :-)

But still I need to manually restart local user PulseAudio process after 
hardware setup changes so FF gets the updated info on available audio 
devices. I usually just run `pulseaudio -k` to make it stop and the 
Enligthenment starts is again for me.


Quick peak at PulseAudio homepage shows that we work on an outdated 
version. FreeBSD uses 13.0 from 2019-09-13 while the latest release is 
14.2 from 2021-01-16. There is a mention on hot plug in the manual page. 
Maybe we should update the port first and see if the issue is solved 
already in the upstream? :-)

https://www.freedesktop.org/wiki/Software/PulseAudio/.


> I found this echo test page https://janus.conf.meetecho.com/echotest.html
> extremely useful when trying to solve sound (and video) problems in FF.

This echotest is awsome because is also shows video :-) For audio 
testing I find visual audio waveform helpful:

https://www.onlinemictest.com/


Best regards :-)
Tomek

-- 
CeDeROM, SQ7MHZ, https://www.tomek.cedro.info


More information about the freebsd-questions mailing list