Context
I have been running archlinux
on my laptop for years and never needed the microphone. Now I need it but cannot find a way to configure it properly.
I use alsa
and pulseadio
.
Running alsamixer
as a user I have two gauges:
|| ||
Master Capture
I have both of them unmuted and enabled to sensible (~50%) values.
Running alsamixer
as root I have several gauges:
|| || || || || ||
Master Headphones Speaker PCM Microphone MIC Boot
|| || || || ||
Beep Loopback Internal Internal Capture
If I enable the Loopback
as root I can hear the microphone back through the speakers.
If I explicitly select my sound card in alsamixer
as a user I get the same commands as running as root (and if I enable Loopback
here I do hear the microphone from the speakers as well). I get the following:
(To the right are two more Internal
gauges, the Loopback
(enable/disable) and a mutable Off-hook
)
Yet, no matter what I do and how much I meddle with the alsa gauges I never manage to pass the microphone to the user application. In essence, every time I run arecord
I get the following output:
$ arecord -vv -f dat /dev/null
Recording WAVE '/dev/null' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo
ALSA <-> PulseAudio PCM I/O Plugin
Its setup is:
stream : CAPTURE
access : RW_INTERLEAVED
format : S16_LE
subformat : STD
channels : 2
rate : 48000
exact rate : 48000 (48000/1)
msbits : 16
buffer_size : 24000
period_size : 6000
period_time : 125000
tstamp_mode : NONE
tstamp_type : GETTIMEOFDAY
period_step : 1
avail_min : 6000
period_event : 0
start_threshold : 1
stop_threshold : 24000
silence_threshold: 0
silence_size : 0
boundary : 6755399441055744000
#+ | 00%
aplay
, on the other hand, works perfectly.
My sound card is (lspci
):
# lspci| grep -i audio
00:14.2 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] SBx00 Azalia (Intel HDA)
I looked at the arch wiki and tried setting the following in /etc/modprobe.d/modprobe.conf
(and rebooted the machine):
options snd-hda-intel model=dell-m6-dmic
(I cannot get the microphone to send data to the user application with or without that configuration.)
My current hda
modules are:
# lsmod |grep hda
snd_hda_codec_si3054 16384 1
snd_hda_codec_realtek 69632 1
snd_hda_codec_generic 69632 1 snd_hda_codec_realtek
snd_hda_intel 32768 5
snd_hda_codec 106496 4 snd_hda_codec_realtek,snd_hda_codec_si3054,snd_hda_codec_generic,snd_hda_intel
snd_hda_core 61440 5 snd_hda_codec_realtek,snd_hda_codec_si3054,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
snd_hwdep 16384 1 snd_hda_codec
snd_pcm 86016 4 snd_hda_codec_si3054,snd_hda_codec,snd_hda_intel,snd_hda_core
snd 65536 18 snd_hda_codec_realtek,snd_hda_codec_si3054,snd_hwdep,snd_timer,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
For completeness, this is my pulseaudio
config (I have not tried meddling with it):
$ pulseaudio --dump-conf
### Read from configuration file: /etc/pulse/daemon.conf ###
daemonize = no
fail = yes
high-priority = yes
nice-level = -11
realtime-scheduling = yes
realtime-priority = 5
allow-module-loading = yes
allow-exit = yes
use-pid-file = yes
system-instance = no
local-server-type = user
cpu-limit = no
enable-shm = yes
flat-volumes = no
lock-memory = no
exit-idle-time = 20
scache-idle-time = 20
dl-search-path = /usr/lib/pulse-9.0/modules
default-script-file = /etc/pulse/default.pa
load-default-script-file = yes
log-target =
log-level = notice
resample-method = auto
enable-remixing = yes
enable-lfe-remixing = no
lfe-crossover-freq = 0
default-sample-format = s16le
default-sample-rate = 44100
alternate-sample-rate = 48000
default-sample-channels = 2
default-channel-map = front-left,front-right
default-fragments = 4
default-fragment-size-msec = 25
enable-deferred-volume = yes
deferred-volume-safety-margin-usec = 8000
deferred-volume-extra-delay-usec = 0
shm-size-bytes = 0
log-meta = no
log-time = no
log-backtrace = 0
rlimit-fsize = -1
rlimit-data = -1
rlimit-stack = -1
rlimit-core = -1
rlimit-rss = -1
rlimit-as = -1
rlimit-nproc = -1
rlimit-nofile = 256
rlimit-memlock = -1
rlimit-locks = -1
rlimit-sigpending = -1
rlimit-msgqueue = -1
rlimit-nice = 31
rlimit-rtprio = 9
rlimit-rttime = 200000
As per Faheem Mitha's comment, I'm confident the pulseaudio
tmpfs
has the right permissions:
# ls -la /run/user/861213/pulse/
total 4
drwx------ 2 grochmal users 80 Jul 4 21:44 .
drwx------ 5 grochmal users 120 Jul 4 21:46 ..
srw-rw-rw- 1 grochmal users 0 Jul 4 21:44 native
-rw------- 1 grochmal users 4 Jul 4 21:44 pid
And pavucontrol
was muted. I was not aware of pavucontrol
which resulted in the issue in the first place:
Question
I'm out of ideas. I believe that the Loopback
audio interface exists in kernel space, therefore my problem is that I cannot bring the microphone data into user space. Yet, I'm not 100% sure of it.
What other options can I give to snd-hda-intel
(or the other modules) that might be relevant for a microphone that works on the loopback interface but does not propagate to the application layer?
Could I be doing something wrong with pulseaudio
? But then again, pulseaudio
worked correctly (together with alsa
) for all that time, and I use audacity
quite often.
Best Answer
Based on correspondence with the poster (see comments), it turned out that the sound card was muted inside
pavucontrol
.