You are not logged in.

#1 2023-03-02 00:16:51

sieste
Member
Registered: 2013-06-04
Posts: 6

Setting correct default device for built-in mic

Trying to get the built-in mic working properly on a new Arch install. The command `arecord -d 3 test.wav` does not work (records only crackling noise), but `arecord -d 3 -f S16_LE --device=plughw:0,7 test.wav` records sound in good quality. How do I now tell the system to use that device and sampling rate by default? If possible without having to install pulseaudio just for that purpose.

Offline

#2 2023-03-02 02:52:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,627

Re: Setting correct default device for built-in mic

defaults.pcm.dsnoop.device 7

in an /etc/asound.conf or a ~/.asoundrc should be the most minimal, least invasive way to have this effect. https://wiki.archlinux.org/title/Advanc … ure_device has another method that's abit more involved and will break the default pcm for applications relying on the PCM listing presented in aplay -L (e.g. firefox is a good candidate that will run into issues here)

Last edited by V1del (2023-03-02 02:55:48)

Offline

#3 2023-03-02 18:22:07

sieste
Member
Registered: 2013-06-04
Posts: 6

Re: Setting correct default device for built-in mic

I put that line into an otherwise empty ~/.asoundrc. (There is no /etc/asound). I get the following error

$ arecord -d 3 test.wav
ALSA lib conf.c:1219:(parse_value) device is not an integer
ALSA lib conf.c:2007:(_snd_config_load_with_include) _toplevel_:2:0:Invalid argument
ALSA lib conf.c:4096:(config_file_open) /home/stefan/.asoundrc may be old or corrupted: consider to remove or fix it
ALSA lib conf.c:4018:(snd_config_hooks_call) function snd_config_hook_load returned error: Invalid argument
ALSA lib conf.c:4625:(snd_config_update_r) hooks failed, removing configuration
arecord: main:831: audio open error: Invalid argument

Same error when I try `arecord -d 3 -f S16_LE --device=plughw:0,7 test.wav`. Any other ideas?

Offline

Board footer

Powered by FluxBB