If a sound player tells you: "/dev/dsp busy"

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

If a sound player tells you: "/dev/dsp busy"

#1 Post by musher0 »

Hello all.

I spent 4 hours researching a solution to the following problem:

you want to play a music piece in wav or opus format, and your Puppy OS sends
you this message: "/dev/dsp busy".

Some suggest that you install alsa or pulse and redirect the sound output to those.
Well, I have alsa (default on most new Puppies) and I did also install the pulse driver,
but it did not help.

The solution was much simpler. There is no need to get all upset about OSS! I issued
the following one-liner directly in my console (one can do it with a bash script as well):

Code: Select all

chmod o+rw /dev/dsp;chmod o+rw /dev/dsp1
Source: Karoly Horvath,
https://stackoverflow.com/questions/924 ... ce-dev-dsp
Answer # 2, retrieved July 9, 2018, at 19:49.

Giving wider permission to /dev/dsp (and twin /dev/dsp1) solved the problem.
I can play wav, opus, and mp3 files again, with wavplay, opusdec, and madplay
respectively.
(Notes:

-- ogg123 and mpg321 do not seem to have this problem;

-- a workaround would be to have an error trap and ask ffplay, for example, to act as
the backup player when the player you want to use can't do the job. I mention ffplay
because it comes by default with the ffmpeg libraries.

-- But this "Horvath" solution solves the problem at the source. This is what I wanted.
This solution is much more elegant.)
Many thanks, Karoly Horvath! If we ever meet, I owe you at least one beer! :)

IHTH. Any comments on this subject are welcome.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#2 Post by Flash »

What if there's no /dev/dsp at all?

I just now booted a uPupbb-18.05+1 32-bit Bionic Beaver that used to play YouTube videos until I downloaded the 53 MB Firefox .sfs from Applications (NOT Menu) -> Internet -> Get Web Browser and fired it up. At first, the audio worked, but not very well. The volume control slider is there, but it's blank. If I rest the cursor on the speaker icon and turn the wheel in my trackball, the number that shows in the little square will go from 0 to +1 and that's it. So I tried checking every box I could find in Retrovol and turning up every slider to at least 2/3. (By the way, there's no "mute" box in Retrovol? Seems like there used to be, next to the "Master" slider.)

After that, the sound quit working altogether. :cry:

Then I ran across this thread and it made me look for /dev/dsp -- and not find it.

What's going on and is it Retrovol's fault or Firefox's?

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Hi Flash.

Woh. Your question is probably beyond my expertise.

I believe you should direct your question at peebee, the developer of BionicPup.

Also I think it's Mike_Walsh who mentioned that the new Firefoxes use pulse audio
rather than alsa or Jack or OSS, so the user has to download that driver. Maybe that is
the cause of your problem, if you do not have a pulse driver somewhere.

/dev/dsp is synonym with OSS. Same thing, from what I have read here and there on
various expert forums.

Me, I only discovered this /dev/dsp bug by accident. while working on a bash script using
CLI music players to play music files. By "CLI music players", I mean: madplay, wavplay,
mpg321, mpg123, ogg123, opusdec and the like.

The bigger guys, such as deadbeef, aqualung, mpv, ffplay, mplayer, also SoX (AFAICR),
do not have this /dev/dsp bug, because they can detect alsa or Jack, and use them
rather than OSS, it seems.

Finally I did my testing only on xenialPup-7.0.6. Sorry for not mentioning it earlier.

IHTH.

~~~~~~~~~~~~~~~~~~~
P.S. -- FWIW, I am having no problems with the sound of youtube vids on SeaMonkey-
2.49.2, with the Adobe Flash plug-in installed.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

Post Reply