You are not logged in.

#1 2023-02-09 10:45:00

mobin
Member
Registered: 2023-02-09
Posts: 3

Playback open error: -16,Device or resource busy

I am trying alsa speaker-test utility after playing a .mp3 file using gst-play-1.0 in my customized Linux Os.but the speaker-test utility is unable to produce the sound over any channel and its producing a following error message given below.

speaker-test -p 1000 -t wav -c 6 -s 6

speaker-test 1.2.1

Playback device is default Stream parameters are 48000Hz, S16_LE, 6 channels WAV file(s) Playback open error: -16,Device or resource busy.

Based on my analysis, I found that the audio card/device "/dev/snd/pcmC0D0p" was used by gst-play-1.0 and its is not released even after gst-play-1.0 command execution.

I could see the result of lsof /dev/snd/* as

root 29u CHR 116,16 0t0 13359 /dev/snd/pcmC0D0p

Is anyone know how to release this resource so that I can use it for speaker-test ?

Offline

#2 2023-02-09 11:19:16

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,919

Re: Playback open error: -16,Device or resource busy

if it's not freed then the relevant process must still live somewhere. You can kill 13359 explicitly. Are you sure the gst play command has ended?

Offline

#3 2023-02-10 08:21:33

mobin
Member
Registered: 2023-02-09
Posts: 3

Re: Playback open error: -16,Device or resource busy

Yes. gst-play-1.0 command has ended and I am getting the command prompt. After killing 13359,  not producing any result for lsof /dev/snd/*. Both "/dev/snd/controlC0" and "/dev/snd/pcmC0D0p" process are killed. Now the speaker-test works as expected but the gst-play-1.0 command not working, its not able to play the audio file. I need both commands should work one after another. Could you please help on this ?

Offline

#4 2023-02-10 09:48:36

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,919

Re: Playback open error: -16,Device or resource busy

What's your use case/intention behind "having both of them work"? And what exactly is the lingering process? Is it gst-play-1.0 or actually some sound server implicitly started by gstreamer like pulse or pipewire?

Offline

Board footer

Powered by FluxBB