Hi all,
I am unable to record, or use the microphone, in several applications under ALSA.
My config:
Code:
[hammett][/home/hammett]$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: Generic [HD-Audio Generic], device 0: ALC892 Analog [ALC892 Analog]
Subdevices: 0/1
Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: Generic Digital [Generic Digital]
Subdevices: 1/1
Subdevice #0: subdevice #0
Code:
[hammett][/home/hammett]$ lsmod | grep snd
snd_hda_codec_realtek 102400 1
snd_hda_codec_generic 77824 2 snd_hda_codec_realtek
snd_hda_intel 28672 7
snd_intel_dspcfg 16384 1 snd_hda_intel
snd_hda_codec 102400 3 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core 61440 4 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_pcm 98304 6 snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer 32768 3 snd_pcm
snd 81920 14 snd_hda_codec_generic,snd_hda_intel,snd_hda_codec,snd_timer,snd_pcm
soundcore 16384 1 snd
Code:
[hammett][/home/hammett]$ cat .asoundrc
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
bindings {
0 0
1 1
}
}
#This is the microphone
pcm.dsnooped {
ipc_key 1027
ipc_key_add_uid true
type dsnoop
slave {
pcm "hw:0,0"
channels 2
}
}
#This makes both channels work together.
pcm.asymed {
type asym
playback.pcm "dmixer"
capture.pcm "dsnooped"
}
pcm.!default {
type plug
slave.pcm "asymed"
}
I normally have skype (skypeforlinux) open and running at all times, and microphone works fine there, but If I want to use the microphone for any other purpose, I cannot with the following error:
Code:
[hammett][/home/hammett]$ arecord test.wav
ALSA lib /var/tmp/portage/media-libs/alsa-lib-1.2.1.2/work/alsa-lib-1.2.1.2/src/pcm/pcm_dsnoop.c:641:(snd_pcm_dsnoop_open) unable to open slave
arecord: main:828: audio open error: Device or resource busy
This is the output of arecord -L
Code:
[hammett][/home/hammett]$ arecord -L
null
Discard all samples (playback) or generate zero samples (capture)
sysdefault:CARD=Generic
HD-Audio Generic, ALC892 Analog
Default Audio Device
front:CARD=Generic,DEV=0
HD-Audio Generic, ALC892 Analog
Front speakers
usbstream:CARD=Generic
HD-Audio Generic
USB Stream Output
usbstream:CARD=NVidia
HDA NVidia
USB Stream Output
where it seems I am lacking the plugin (or not enabled)
I have been searching over the web for a solution, and I have tried many different .asdoundrc configs, none of them seem to work for dsnoop
ALSA related packages installed:
Code:
[hammett][/home/hammett]$ eix -I alsa
[I] media-libs/alsa-lib
Available versions: 1.2.1.2 ~1.2.2 {alisp debug doc python +thread-safety ABI_MIPS="n32 n64 o32" ABI_RISCV="lp64 lp64d" ABI_S390="32 64" ABI_X86="32 64 x32" ELIBC="uclibc" PYTHON_SINGLE_TARGET="python2_7 python3_6 python3_7"}
Installed versions: 1.2.1.2(21:53:32 13/02/20)(thread-safety -alisp -debug -doc -python ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" ELIBC="-uclibc" PYTHON_SINGLE_TARGET="python3_7 -python2_7 -python3_6")
Homepage: https://alsa-project.org/
Description: Advanced Linux Sound Architecture Library
[I] media-plugins/alsa-plugins
Available versions: 1.2.1 ~1.2.2 {arcam_av debug ffmpeg jack libav libsamplerate +mix oss pulseaudio speex +usb_stream}
Installed versions: 1.2.1(14:13:21 31/03/20)(ffmpeg mix usb_stream -arcam_av -debug -jack -libav -libsamplerate -oss -pulseaudio -speex ABI_MIPS="-n32 -n64 -o32" ABI_RISCV="-lp64 -lp64d" ABI_S390="-32 -64" ABI_X86="64 -32 -x32")
Homepage: http://www.alsa-project.org/
Description: ALSA extra plugins
[I] media-sound/alsa-utils
Available versions: (0.9) 1.2.1 ~1.2.2
{bat doc +libsamplerate +ncurses nls selinux}
Installed versions: 1.2.1(0.9)(19:05:58 20/01/20)(libsamplerate ncurses nls -bat -doc -selinux)
Homepage: https://alsa-project.org/
Description: Advanced Linux Sound Architecture Utils (alsactl, alsamixer, etc.)
Any help deeply apreciated!