First time audio record show Device or resource busy

Hi

I am able to record from the mic however I noticed that first time running arecord it given me device or resource busy. second time run most of the time it works. any suggestions ??

amixer -c tegrasndt210ref cset name=‘ADMAIF1 Mux’ I2S4
arecord -D hw:tegrasndt210ref,0 -r 48000 -f S32_LE -c 2 -d 10 test.wav

Thanks

Hello!

It is most likely that pulseaudio is using the device. To see if it is pulseaudio you can try temporarily disabling it by …

$ echo "autospawn = no" > ${HOME}/.config/pulse/client.conf
$ pulseaudio --kill

To re-enable pulseaudio simply …

$ rm ${HOME}/.config/pulse/client.conf
$ pulseaudio --start

If it is pulseaudio and you do not need it then you can always uninstall it.

Regards,
Jon

hI Job,

seems not
vaitl@11223301010003f9:~ pulseaudio --kill E: [pulseaudio] main.c: Failed to kill daemon: No such process vaitl@11223301010003f9:~ sudo pulseaudio --kill
[sudo] password for vaitl:
E: [pulseaudio] core-util.c: Home directory not accessible: Permission denied
E: [pulseaudio] main.c: Failed to kill daemon: No such file or directory

Hello!

Please note that you only need to kill the daemon if it is running. In other words, once you have created the ‘.config/pulse/client.conf’ file on the next reboot pulseaudio should no longer be running. So do you see any pulseaudio processes runing at all?

$ ps aux | grep pulseaudio

Looks like I still see an instance running for gdm. If you don’t need pulseaudio at all you could try uninstalling …

$ sudo apt remove pulseaudio

Alternatively, if you need pulseaudio, you can always use pacmd to play the file …

$ pacmd list-sinks | grep name:
        name: <alsa_output.platform-70030000.hda.hdmi-stereo>
        name: <alsa_output.platform-sound.analog-stereo>
$ pacmd play-file <wav-file> alsa_output.platform-sound.analog-stereo

Regards,
Jon