Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jan 2021 14:35:37 +0100
From:      Tomasz CEDRO <tomek@cedro.info>
To:        guru@unixarea.de
Cc:        FreeBSD Questions Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Microphone stopped working in Frefox and Chrome
Message-ID:  <c7977a22-7b9b-fd85-8909-a2b9998a3003@cedro.info>
In-Reply-To: <YAvU9jMqfPeKSb7Y@c720-r368166.fritz.box>
References:  <CAM8r67BLs%2BXWuWB-eqVWang=5MKZ0_9L5J%2BhsM2HO6yJCUJwHQ@mail.gmail.com> <9025f616-ba3f-ef44-603a-824bd8e4e20a@cedro.info> <YAvU9jMqfPeKSb7Y@c720-r368166.fritz.box>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?c7977a22-7b9b-fd85-8909-a2b9998a3003>