You are not logged in.

#1 2020-01-24 10:57:06

Delgan
Member
Registered: 2020-01-24
Posts: 3

Firefox doesn't detect microphone without PulseAudio (sound is OK)

Hi.

I know that Firefox depends on PulseAudio since version 52 and that it won't work very well with an ALSA-only system (see bug 1345661).

I don't have "pulseaudio" installed, yet audio on Firefox is working well. However, there is no microphone detected by Firefox on this test page: https://mozilla.github.io/webrtc-landing/gum_test.html

The output of "arecord -lL" is:

null
    Discard all samples (playback) or generate zero samples (capture)
jack
    JACK Audio Connection Kit
default:CARD=PCH
    HDA Intel PCH, ALC256 Analog
    Default Audio Device
sysdefault:CARD=PCH
    HDA Intel PCH, ALC256 Analog
    Default Audio Device
front:CARD=PCH,DEV=0
    HDA Intel PCH, ALC256 Analog
    Front speakers
usbstream:CARD=PCH
    HDA Intel PCH
    USB Stream Output
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC256 Analog [ALC256 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

Installed packages:

~ λ pacman -Q firefox libpulse alsa-lib pulseaudio
firefox 72.0.2-1
libpulse 13.0-3
alsa-lib 1.2.1.2-3
error: package 'pulseaudio' was not found

The microphone is working well when I test it with "arecord --duration 3 --format=dat test-mic.wav". If I install "pulseaudio" and reboot my system, the microphone is properly detected and usable by Firefox.

I have a few questions:
* Why is audio working well although I don't have "pulseaudio" installed? Is it thanks to "libpulse", which is required while installing firefox from repo?
* Why is microphone not detected while audio is working well? Is microphone support not implemented by libpulse?
* Is there any known solution to solve this problem without the need to install pulseaudio? I have found a lot of problems related to audio on Firefox, but few about the microphone.

Thanks in advance for your help.

Last edited by Delgan (2020-01-24 11:09:04)

Offline

#2 2020-01-24 12:01:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,704

Re: Firefox doesn't detect microphone without PulseAudio (sound is OK)

The Arch Firefox package has alsa enabled still, contrary to upstream suggestions/support. No libpulse doesn't matter,   at all, that's for implementing (surprise) pulse support. It doesn't factor into play when you are using just ALSA. When just using ALSA alsa-lib is what's likely being used.

Firefox always had a weird logic to detecting the sound card using ALSA FWIW you might want to check in a terminal whether you get any information and maybe post your

about:support

from firefox. Do you have any custom asound.conf /ALSA config? Post them as well.

Last edited by V1del (2020-01-24 12:06:59)

Online

#3 2020-01-24 13:04:05

Delgan
Member
Registered: 2020-01-24
Posts: 3

Re: Firefox doesn't detect microphone without PulseAudio (sound is OK)

Thanks for the answers!

My ALSA configuration is the default one, I have not changed any settings afaik.

When PulseAudio is not installed, I see that:

PulseAudio OFF - Microphone
PulseAudio OFF - Support

Media
-----

Audio Backend: alsa
Max Channels: 10000
Preferred Sample Rate: 48000
Output Devices
Name: Group
default: default
Input Devices
Name: Group
default: default

When Pulseaudio is installed:

PulseAudio ON - Microphone
PulseAudio ON - Support

Media
-----

Audio Backend: pulse-rust
Max Channels: 2
Preferred Sample Rate: 44100
Output Devices
Name: Group
Built-in Audio Analog Stereo: /devices/pci0000:00/0000:00:0e.0/sound/card0
Input Devices
Name: Group
Monitor of Built-in Audio Analog Stereo: /devices/pci0000:00/0000:00:0e.0/sound/card0
Built-in Audio Analog Stereo: /devices/pci0000:00/0000:00:0e.0/sound/card0

So, I probably need to somehow give a hint to Firefox about my audio interfaces.

Last edited by Delgan (2020-01-24 16:45:38)

Offline

#4 2020-01-24 15:36:02

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 8,704

Re: Firefox doesn't detect microphone without PulseAudio (sound is OK)

"default" should be the device to use, does that strictly not work? You aren't going to have a "pretty name" as Firefox strictly enumerates on the PCMs (which is why I asked you if you've set up any config, as one can easily "break" the config in a way that will work with most tools that aren't dead set on expecting a PCM from the aplay -L listing like firefox). Do you care about a pretty name? Does

arecord -Ddefault test-mic.wav

not work?

Also please post only thumbnails or links of the images.

Last edited by V1del (2020-01-24 15:54:32)

Online

#5 2020-01-24 17:14:16

Delgan
Member
Registered: 2020-01-24
Posts: 3

Re: Firefox doesn't detect microphone without PulseAudio (sound is OK)

V1del wrote:

"default" should be the device to use, does that strictly not work? You aren't going to have a "pretty name" as Firefox strictly enumerates on the PCMs (which is why I asked you if you've set up any config, as one can easily "break" the config in a way that will work with most tools that aren't dead set on expecting a PCM from the aplay -L listing like firefox). Do you care about a pretty name? Does

arecord -Ddefault test-mic.wav

not work?

Well, "pretty names" would be better of course, but I don't care much for now, getting the microphone to work is the most important.

The "arecord -Ddefault test-mic.wav" command works fine, my voice is properly recorded. However, Firefox does not seem to receive any sound while using the "default" microphone.

I made a test with another website and observed something curious : https://online-voice-recorder.com/
See the result here: https://i.imgur.com/v0dGzTK.gifv
Although I'm waiting more than 10 seconds, the output only looks to last for 0.5 seconds.
So, maybe that the microphone is actually correctly detected, but Firefox does not use the proper configuration for sampling or something?

V1del wrote:

Also please post only thumbnails or links of the images.

Sorry, I edited the post accordingly.

Offline

Board footer

Powered by FluxBB