# /dev/dsp: No such device    - but gaim plays sound ?

## Scott Thornley

System is a Shuttle  SN25P

I've followed the Gentoo ALSA guide, and used kernel support.

Kernel is 2.6.14-r5 genkernel + menuconfig to add support for the ice1724 audio chip

The module loads just fine:

```
gentoo64 ~ # lsmod

Module                  Size  Used by

nvidia               4856656  12

snd_ice1724            76416  0

snd_ice17xx_ak4xxx      4992  1 snd_ice1724

snd_ac97_codec        107224  1 snd_ice1724

snd_ac97_bus            3072  1 snd_ac97_codec

snd_ak4114             10496  1 snd_ice1724

snd_pcm                96652  3 snd_ice1724,snd_ac97_codec,snd_ak4114

snd_timer              25480  1 snd_pcm

snd_page_alloc         12176  1 snd_pcm

snd_ak4xxx_adda         7552  2 snd_ice1724,snd_ice17xx_ak4xxx

snd_mpu401_uart         8320  1 snd_ice1724

snd_rawmidi            25728  1 snd_mpu401_uart

snd                    54192  8 snd_ice1724,snd_ac97_codec,snd_ak4114,snd_pcm,snd_timer,snd_ak4xxx_adda,snd_mpu401_uart,snd_rawmidi

```

But when I go to test:

```
scott@gentoo64 ~ $ sudo cat /dev/urandom > /dev/dsp

bash: /dev/dsp: No such device

scott@gentoo64 ~ $ sudo cat /dev/urandom > /dev/dsp1

bash: /dev/dsp1: No such device

scott@gentoo64 ~ $ sudo cat /dev/urandom > /dev/dsp2

bash: /dev/dsp2: No such device

scott@gentoo64 ~ $ sudo cat /dev/urandom > /dev/dsp3

bash: /dev/dsp3: No such device

scott@gentoo64 ~ $ sudo cat /dev/urandom > /dev/audio

bash: /dev/audio: No such device

gentoo64 ~ # cat /etc/group | grep audio

audio:x:18:scott

gentoo64 ~ # ls -la /dev/audio

crw-rw----  1 root audio 14, 4 Jul 27 09:18 /dev/audio

gentoo64 ~ # ls -la /dev/dsp*

crw-rw----  1 root audio 14,  3 Jul 27 09:18 /dev/dsp

crw-rw----  1 root audio 14, 19 Jul 27 09:18 /dev/dsp1

crw-rw----  1 root audio 14, 35 Jul 27 09:18 /dev/dsp2

crw-rw----  1 root audio 14, 51 Jul 27 09:18 /dev/dsp3

gentoo64 ~ # ls -la /dev/so*

brw-rw----  1 root cdrom 15, 0 Jul 27 09:17 /dev/sonycd

```

So, there is no /dev/sound/dsp device. So that may be the cause of my problem.

Only, how come gaim is actually able to play sounds ?

Oh, and:

```
scott@gentoo64 ~ $ madplay ~/Downloads/vertigo.mp3

MPEG Audio Decoder 0.15.2 (beta) - Copyright Â© 2000-2004 Robert Leslie et al.

audio: /dev/dsp: No such device

```

I've done a fair amount of googling, and searching here, but must be using the wrong terms, cuz I've not come across anything that shouts "here is your answer"

Scott

----------

## NeddySeagoon

Scott Thornley,

There are two sound systems in Linux, the orignal Open Sound System (OSS) is being displaced my ALSA.

All your real alsa sound device files are in /dev/snd

You may not install both OSS and ALSA at the same time because trhe fight over the hardware. However, ALSA provides OSS emulation. This populates /dev/sound, just as applications that want OSS expect.

You sem to have missed loading the OSS emulation modules.

```
modprobe -l | grep oss
```

will show if you have build them as modules, if so, modprobe them.

If not, thats the way ahead - build them as modules.

Gaim probably uses ALSA directly.

----------

## Scott Thornley

Aarrgh....

I am aware of ALSA vs OSS.  And the likely need for OSS emulation, and when I built the kernel, I thought I built those modules.  

Nope, not there. I'll build them in.

From your obviously better perspective than mine, does this look about right ? Or do I need to get the  CONFIG_SND_SEQUENCER_OSS set ?

```
CONFIG_SOUND=y

#

# Advanced Linux Sound Architecture

#

CONFIG_SND=m

CONFIG_SND_TIMER=m

CONFIG_SND_PCM=m

CONFIG_SND_RAWMIDI=m

CONFIG_SND_SEQUENCER=m

# CONFIG_SND_SEQ_DUMMY is not set

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=m

CONFIG_SND_PCM_OSS=m

# CONFIG_SND_SEQUENCER_OSS is not set

CONFIG_SND_RTCTIMER=m

CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

# CONFIG_SND_VERBOSE_PRINTK is not set

# CONFIG_SND_DEBUG is not set

```

Lastly, what is the concensus of compiling in the ALSA and OSS modules, and loading the ones you desire at boot ? This is how many of the mainstream distros do it/did it. But is ALSA support to the point where it's no longer needed ?

Regards,

Scott

----------

## NeddySeagoon

Scott Thornley,

That looks OK - you only need do

```
make modules

make modules_install
```

then modprobe them.

I always reccomend ALSA with OSS emulation as modules. Its slightly more difficult to set up, since you need to get /etc/modules.d/alsa right or alsasound will not the the modules for you but its much easier to debug.

The major binary distros make it modular - they have fully modular kernel to the point were an initrd is essential for booting.

The alternative is to build all the sound modules in, which is bloat when each user will only need one or two. 

I'm not suggesting that you build all the PCI and all the ISA modules.

CONFIG_SND_SEQUENCER_OSS is needed for applications that want to play midi files via OSS.

If you use an app like that you need it.

You can't drop OSS totally yet - not all apps support ALSA

----------

## xbmodder

"modprobe snd-pcm-oss"

----------

## synss

without the modules, aoss (from emerge alsa-oss) should work as well:

aoss madplay *mp3

can be aliased or put in a script in /usr/local/bin

----------

