You are not logged in.

#1 2021-01-16 01:11:23

sormifnd
Member
Registered: 2019-12-09
Posts: 6

[Solved] Applications not picking up on microphone input

I'm trying to get voice chat and videoconferencing working on my laptop. Up to this point I've never needed the microphone for anything.

As far as physical input hardware, I'm not using a USB microphone - either the default one inside the laptop or an earbud microphone plugged into the 3.5mm jack, which I think are regarded as the same input device.

The main application I want to pass microphone input to is Firefox, and it gives me the normal prompt when a page asks permission to use the microphone. In this prompt, there is only one audio input device listed - "default". Firefox treats it as a valid input device, but no sound is picked up through it.

I have ALSA and out-of-the-box PulseAudio installed (ALSA was installed long ago and I just installed PulseAudio in the process of trying to get the microphone to work). I haven't been able to see any differences with PulseAudio running, though. I did notice that the first non-comment line in the unmodified /etc/pulse/default.pa is ".fail", but it says it's only used if PulseAudio is not running in system mode; not sure if that's relevant.

I know the microphone does actually work, because I can use it to record sound with arecord, e.g.

 arecord -d 4 test.wav && aplay test.wav 

Some further details:

$ lspci | grep -i audio
00:1f.3 Audio device: Intel Corporation Sunrise Point-LP HD Audio (rev 21)

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: PCH [HDA Intel PCH], device 0: ALC236 Analog [ALC236 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

$ pacmd list-sources
1 source(s) available.
  * index: 0
	name: <auto_null.monitor>
	driver: <module-null-sink.c>
	flags: DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: SUSPENDED
	suspend cause: IDLE
	priority: 1000
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 0.00 ms
	max rewind: 344 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 0.00 ms; range is 0.50 .. 2000.00 ms
	monitor_of: 0
	module: 11
	properties:
		device.description = "Monitor of Dummy Output"
		device.class = "monitor"
		device.icon_name = "audio-input-microphone"

Last edited by sormifnd (2021-01-21 02:56:16)

Offline

#2 2021-01-16 16:04:11

sormifnd
Member
Registered: 2019-12-09
Posts: 6

Re: [Solved] Applications not picking up on microphone input

Update: I've also installed the pulseaudio-alsa package and rebooted. I've noticed that Firefox is no longer producing any sound output, even when PulseAudio is not running.

This is how I'm running pulseaudio for the time being:

$ pulseaudio -v --daemonize=no --exit-idle-time=-1
I: [pulseaudio] main.c: setrlimit(RLIMIT_NICE, (31, 31)) failed: Operation not permitted
I: [pulseaudio] main.c: setrlimit(RLIMIT_RTPRIO, (9, 9)) failed: Operation not permitted
I: [pulseaudio] core-util.c: Successfully gained nice level -11.
I: [pulseaudio] main.c: This is PulseAudio 14.1
I: [pulseaudio] main.c: Page size is 4096 bytes
I: [pulseaudio] main.c: Machine ID is 7b92365f27ab48458031e92ac2c21fe9.
I: [pulseaudio] main.c: Session ID is 2.
I: [pulseaudio] main.c: Using runtime directory /run/user/1000/pulse.
I: [pulseaudio] main.c: Using state directory /home/sormifnd/.config/pulse.
I: [pulseaudio] main.c: Using modules directory /usr/lib/pulse-14.1/modules.
I: [pulseaudio] main.c: Running in system mode: no
I: [pulseaudio] main.c: System supports high resolution timers
I: [pulseaudio] cpu-x86.c: CPU flags: CMOV MMX SSE SSE2 SSE3 SSSE3 SSE4_1 SSE4_2 
I: [pulseaudio] svolume_mmx.c: Initialising MMX optimized volume functions.
I: [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I: [pulseaudio] svolume_sse.c: Initialising SSE2 optimized volume functions.
I: [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I: [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.
I: [pulseaudio] svolume_orc.c: Initialising ORC optimized volume functions.
I: [pulseaudio] alsa-util.c: Trying to disable ALSA period wakeups, using timers only
I: [pulseaudio] alsa-util.c: ALSA period wakeups disabled
I: [pulseaudio] alsa-source.c: Successfully opened device hw:0,0.
I: [pulseaudio] alsa-source.c: Successfully enabled mmap() mode.
I: [pulseaudio] alsa-source.c: Successfully enabled timer-based scheduling mode.
I: [pulseaudio] source.c: Created source 0 "alsa_input.hw_0_0" with sample spec s16le 2ch 44100Hz and channel map front-left,front-right
I: [pulseaudio] source.c:     alsa.resolution_bits = "16"
I: [pulseaudio] source.c:     device.api = "alsa"
I: [pulseaudio] source.c:     device.class = "sound"
I: [pulseaudio] source.c:     alsa.class = "generic"
I: [pulseaudio] source.c:     alsa.subclass = "generic-mix"
I: [pulseaudio] source.c:     alsa.name = "ALC236 Analog"
I: [pulseaudio] source.c:     alsa.id = "ALC236 Analog"
I: [pulseaudio] source.c:     alsa.subdevice = "0"
I: [pulseaudio] source.c:     alsa.subdevice_name = "subdevice #0"
I: [pulseaudio] source.c:     alsa.device = "0"
I: [pulseaudio] source.c:     alsa.card = "0"
I: [pulseaudio] source.c:     alsa.card_name = "HDA Intel PCH"
I: [pulseaudio] source.c:     alsa.long_card_name = "HDA Intel PCH at 0xb1228000 irq 130"
I: [pulseaudio] source.c:     alsa.driver_name = "snd_hda_intel"
I: [pulseaudio] source.c:     device.bus_path = "pci-0000:00:1f.3"
I: [pulseaudio] source.c:     sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
I: [pulseaudio] source.c:     device.bus = "pci"
I: [pulseaudio] source.c:     device.vendor.id = "8086"
I: [pulseaudio] source.c:     device.vendor.name = "Intel Corporation"
I: [pulseaudio] source.c:     device.product.id = "9d71"
I: [pulseaudio] source.c:     device.product.name = "Sunrise Point-LP HD Audio"
I: [pulseaudio] source.c:     device.form_factor = "internal"
I: [pulseaudio] source.c:     device.string = "hw:0,0"
I: [pulseaudio] source.c:     device.buffering.buffer_size = "352800"
I: [pulseaudio] source.c:     device.buffering.fragment_size = "176400"
I: [pulseaudio] source.c:     device.access_mode = "mmap+timer"
I: [pulseaudio] source.c:     device.description = "Built-in Audio"
I: [pulseaudio] source.c:     device.icon_name = "audio-input-microphone-pci"
I: [pulseaudio] alsa-source.c: Using 2.0 fragments of size 176400 bytes (1000.00ms), buffer size is 352800 bytes (2000.00ms)
I: [pulseaudio] alsa-source.c: Time scheduling watermark is 20.00ms
I: [alsa-source-ALC236 Analog] util.c: Successfully enabled SCHED_RR scheduling for thread, with priority 5.
I: [alsa-source-ALC236 Analog] alsa-source.c: Starting capture.
I: [pulseaudio] core.c: default_source: (unset) -> alsa_input.hw_0_0
I: [pulseaudio] module.c: Loaded "module-alsa-source" (index: #0; argument: "device=hw:0,0").
I: [pulseaudio] main.c: Daemon startup complete.

Though despite the last message this doesn't seem to run it as a daemon like pulseaudio -D does, because commands like "pacmd info" fail to connect to it. "pactl info" produces "Connection refused" whether or not I ran pulseaudio with -D.

Output of pacmd info:

$ pacmd info
Memory blocks currently allocated: 1, size: 63.9 KiB.
Memory blocks allocated during the whole lifetime: 14, size: 746.2 KiB.
Memory blocks imported from other processes: 0, size: 0 B.
Memory blocks exported to other processes: 0, size: 0 B.
Total sample cache size: 0 B.
Default sample spec: s16le 2ch 44100Hz
Default channel map: front-left,front-right
Default sink name: none
Default source name: alsa_input.hw_0_0
Memory blocks of type POOL: 1 allocated/1 accumulated.
Memory blocks of type POOL_EXTERNAL: 0 allocated/0 accumulated.
Memory blocks of type APPENDED: 0 allocated/0 accumulated.
Memory blocks of type USER: 0 allocated/0 accumulated.
Memory blocks of type FIXED: 0 allocated/13 accumulated.
Memory blocks of type IMPORTED: 0 allocated/0 accumulated.
2 module(s) loaded.
    index: 0
	name: <module-alsa-source>
	argument: <device=hw:0,0>
	used: 0
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "ALSA Source"
		module.version = "14.1"
    index: 1
	name: <module-cli-protocol-unix>
	argument: <>
	used: -1
	load once: no
	properties:
		module.author = "Lennart Poettering"
		module.description = "Command line interface protocol (UNIX sockets)"
		module.version = "14.1"
0 sink(s) available.
1 source(s) available.
  * index: 0
	name: <alsa_input.hw_0_0>
	driver: <module-alsa-source.c>
	flags: HARDWARE DECIBEL_VOLUME LATENCY DYNAMIC_LATENCY
	state: IDLE
	suspend cause: (none)
	priority: 9030
	volume: front-left: 65536 / 100% / 0.00 dB,   front-right: 65536 / 100% / 0.00 dB
	        balance 0.00
	base volume: 65536 / 100% / 0.00 dB
	volume steps: 65537
	muted: no
	current latency: 202.34 ms
	max rewind: 0 KiB
	sample spec: s16le 2ch 44100Hz
	channel map: front-left,front-right
	             Stereo
	used by: 0
	linked by: 0
	configured latency: 2000.00 ms; range is 0.50 .. 2000.00 ms
	module: 0
	properties:
		alsa.resolution_bits = "16"
		device.api = "alsa"
		device.class = "sound"
		alsa.class = "generic"
		alsa.subclass = "generic-mix"
		alsa.name = "ALC236 Analog"
		alsa.id = "ALC236 Analog"
		alsa.subdevice = "0"
		alsa.subdevice_name = "subdevice #0"
		alsa.device = "0"
		alsa.card = "0"
		alsa.card_name = "HDA Intel PCH"
		alsa.long_card_name = "HDA Intel PCH at 0xb1228000 irq 130"
		alsa.driver_name = "snd_hda_intel"
		device.bus_path = "pci-0000:00:1f.3"
		sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
		device.bus = "pci"
		device.vendor.id = "8086"
		device.vendor.name = "Intel Corporation"
		device.product.id = "9d71"
		device.product.name = "Sunrise Point-LP HD Audio"
		device.form_factor = "internal"
		device.string = "hw:0,0"
		device.buffering.buffer_size = "352800"
		device.buffering.fragment_size = "176400"
		device.access_mode = "mmap+timer"
		device.description = "Built-in Audio"
		device.icon_name = "audio-input-microphone-pci"
1 client(s) logged in.
    index: 0
	driver: <cli.c>
	owner module: 1
	properties:
		application.name = "UNIX socket client"
0 card(s) available.
0 sink input(s) available.
0 source output(s) available.
0 cache entrie(s) available.

Other things that I've turned up in help threads:

  • There's a lot of advice to use pavucontrol, which I have installed but which just hangs indefinitely at "Establishing connection to PulseAudio".

  • A number of threads mentioned /etc/asound.conf, which I don't have on my system. Is it necessary to have?

Offline

#3 2021-01-16 16:16:31

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 12,250

Re: [Solved] Applications not picking up on microphone input

How are you starting your session? It doesn't look like pulse gets access to the audio devices like it should. Post

sudo fuser -v /dev/snd/*
loginctl session-status

and there shouldn't be a need to start pulseaudio manually if the session were to be started properly.

If you use .xinitrc make sure you read the blue notes in https://wiki.archlinux.org/index.php/Xinit#xinitrc

Offline

#4 2021-01-21 02:55:57

sormifnd
Member
Registered: 2019-12-09
Posts: 6

Re: [Solved] Applications not picking up on microphone input

The problems resolved themselves after I cleared out the config files I'd created in ~/.config/pulse/, reverted any editing I'd done of /etc/pulse/ configs, and rebooted. Prior to reboot, I wasn't able to manually get pulseaudio.service running, but after the reboot they started normally and Firefox became able to detect mic input.

I didn't realize that ~/.config/pulse configs would completely override the ones in /etc (thereby averting the actual setup they were supposed to do), until I read something you had posted in a thread here four years ago! So thank you, V1del.

Not sure how I got my configuration into a bad state in the first place - perhaps after I installed PulseAudio I tried to get it working without restarting my X session and/or machine, then ended up adding something broken in ~/.config/pulse.

Offline

Board footer

Powered by FluxBB