0

i have an external USB Sound Card connected on my Raspberry and i set it as default from raspi-config.

Then, i have a process that is always running and it use the USB external sound card:

root@testsvx:/home/pi# lsof /dev/snd/*
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
alertserv 586 root  mem    CHR  116,5           529 /dev/snd/pcmC1D0c
alertserv 586 root   11u   CHR  116,4      0t0  528 /dev/snd/pcmC1D0p
alertserv 586 root   12u   CHR  116,5      0t0  529 /dev/snd/pcmC1D0c

The service reproduce some audio informations when specific events occur. I need to reproduce an audio file with the same USB sound card with a simple script every hour, but if i run this ile with this command

aplay -D "plughw:CARD=Device,DEV=0" -q audio_file.wav

i get the error

audio open error: Device or resource busy

Is there a way to reproduce an audio file with the USB sound card while it is already used by another service?

I use Debian 12:

root@testsvx:/home/pi# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm

Thank you in advance Christian

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.