Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Debian Stretch Am Confused about /dev/dsp

43 views
Skip to first unread message

Martin McCormick

unread,
Aug 30, 2018, 1:20:04 PM8/30/18
to
After successfully installing stretch on a system, there
was no /dev/dsp. I needed to play some mp3 files and so
installed mplayer. The mp3's played and I also discovered
/dev/dsp for the on-board sound chip and /dev/dsp1 for a USB card
which began to work when used with an application I wrote that is
a few years old and makes use of /dev/dsp.

I was thankful that the install of mplayer and several
dependent libraries seemed to have restored the dsp devices so I
powered down the system and have brought it up today to find that
once again, no /dev/dsp. Something got turned on during the
installation process that doesn't default to on. Where should I
look as I can do that quicker than I can rewrite the application
to do whatever you must do these days to speak to a sound device.

The system has alsa-utils but I was under the impression
that these days, one should not install alsa-base. As I
reported, this system is capable of /dev/dsp but it seems to have
lost it again. That is why I am confused.

Thanks for any constructive suggestions.
Martin McCormick

Greg Wooledge

unread,
Aug 30, 2018, 1:20:04 PM8/30/18
to
On Thu, Aug 30, 2018 at 12:14:57PM -0500, Martin McCormick wrote:
> After successfully installing stretch on a system, there
> was no /dev/dsp. I needed to play some mp3 files and so
> installed mplayer. [...]

/dev/dsp is part of the legacy OSS (Open Sound System) interface. If
you play audio using only ALSA, or ALSA + Pulse, you do not need this
older interface.

If your software requires the /dev/dsp interface (because it predates
ALSA), you can try loading the snd-pcm-oss module. At least, that's
what the IRC bot says to do.

It also pointed me to <http://wiki.debian.org/ReleaseGoals/NoLinuxDevDsp>,
if that's of any help.

Martin McCormick

unread,
Aug 30, 2018, 4:20:04 PM8/30/18
to
Greg Wooledge <woo...@eeg.ccf.org> writes:
> /dev/dsp is part of the legacy OSS (Open Sound System) interface. If
> you play audio using only ALSA, or ALSA + Pulse, you do not need this
> older interface.
>
> If your software requires the /dev/dsp interface (because it predates
> ALSA), you can try loading the snd-pcm-oss module. At least, that's
> what the IRC bot says to do.

Thank you. I am happy to report that adding snd-pcm-oss to
/etc/modules brought the /dev/dsp interfaces back.

I never did a lsmod on the system a week or so ago to see
what was there when I first saw /dev/dsp and /dev/dsp1 and it
could be that the snd-pcm-oss module was loaded as a result of
installing mplayer although mplayer does not need /dev/dsp and
works fine without it.

When I shut down the system and restarted it today, i did
do lsmod looking for snd-pcm-oss and it was not there. After
placingthe name of the module in /etc/modules, I rebooted so as
to start from scratch and it was there along with /dev/dsp and
/dev/dsp1 for the usb device which now works like a charm.

I must read up on how to code for not needing /dev/dspx
to fix the real issue here.

The software I wrote doesn't predate oss but some
documentation I red years ago that probably does predate oss was
what I used to wrige some C routines that send and receive sound
plus use ioctl to set, say, /dev/dsp or /dev/dsp1 for stereo at
32000 samples per second.

I used that to make a stereo sound card record 2
independent 8-K 8-bit audio channels from two radio scanners

Music stinks when recorded that way but scanner audio has
such a limited pass band that it sounds pretty decent.

Many thanks.

> It also pointed me to <http://wiki.debian.org/ReleaseGoals/NoLinuxDevDsp>,
> if that's of any help.

I will save this message and also learn the correct way
to send and receive audio these days.

Martin

Dan Ritter

unread,
Aug 30, 2018, 6:10:05 PM8/30/18
to
On Thu, Aug 30, 2018 at 03:10:24PM -0500, Martin McCormick wrote:
> The software I wrote doesn't predate oss but some
> documentation I red years ago that probably does predate oss was
> what I used to wrige some C routines that send and receive sound
> plus use ioctl to set, say, /dev/dsp or /dev/dsp1 for stereo at
> 32000 samples per second.
>
> I used that to make a stereo sound card record 2
> independent 8-K 8-bit audio channels from two radio scanners
>
> Music stinks when recorded that way but scanner audio has
> such a limited pass band that it sounds pretty decent.
>
> Many thanks.
>
> > It also pointed me to <http://wiki.debian.org/ReleaseGoals/NoLinuxDevDsp>,
> > if that's of any help.
>
> I will save this message and also learn the correct way
> to send and receive audio these days.

I think that 'sox' which can also be called as 'play' or 'rec'
is what you want.

Use rec to record from sound-input, and sox to split it by
channel into two files.

-dsr-

didier gaumet

unread,
Aug 31, 2018, 4:00:05 AM8/31/18
to
Hello,

from what I understand, using alsa-oss would be better than using the
OSS emulation module, partircularly if one is to use sound plug-ins?
https://packages.debian.org/stretch/alsa-oss

Ric Moore

unread,
Aug 31, 2018, 4:20:03 AM8/31/18
to
If you use pulse you can execute your program using the prefix "padsp"
Kino still requires /dev/dsp so you would launch it using padsp kino
Works a charm. Ric

--
My father, Victor Moore (Vic) used to say:
"There are two Great Sins in the world...
..the Sin of Ignorance, and the Sin of Stupidity.
Only the former may be overcome." R.I.P. Dad.
http://linuxcounter.net/user/44256.html
0 new messages