# Can't open /dev/dsp

## yayien

Hi,

I tried to install ALSA not in my kernel, all passed fine I can listen my mp3 with mplayer but if I use mpg123 I got the message "Can't open /dev/dsp"... Of course, this file doesn't exist on my system!! What can I do??

[edit] I see that the sound work only if I use aoss !! [/edit]

Thx

----------

## erik258

all the programs that use sound may need to be compiled with the 'alsa' USE flag.  AOSS is an oss wrapper so that oss programs work with ALSA (i think...)

----------

## yayien

ok but I compiled this last year and i did not need to use aoss. Anf for mpg123 there is no alsa flags...

----------

## bLUEbYTE84

 *yayien wrote:*   

> Hi,
> 
> I tried to install ALSA not in my kernel, all passed fine I can listen my mp3 with mplayer but if I use mpg123 I got the message "Can't open /dev/dsp"... Of course, this file doesn't exist on my system!! What can I do??
> 
> [edit] I see that the sound work only if I use aoss !! [/edit]
> ...

 

/dev/dsp is(were) the device node used by OSS...

I don't understand what you are trying to say,

 *Quote:*   

> I tried to install ALSA not in my kernel

 

But DON'T install alsa driver + compile in kernel at the same time. Follow the great Gentoo ALSA guide, I recommend you go ALSA as kernel modules route.

And for your problem; you need the OSS compatibility stuff. Enable OSS modules in kernel config, or if you go the other route (installing alsa-driver) also install alsa-oss.

----------

## yayien

I do as the gentoo guide sais but I have this problem

----------

## erik258

are you sure you have OSS Emulation support compiled in to your kernel?

----------

## yayien

In "great Gentoo ALSA guide" it says only:

# grep SOUND .config

(1. is true)

CONFIG_SOUND=y

(2. is true)

CONFIG_SOUND_PRIME is not set

# grep SND .config

(and 3. is true)

CONFIG_SND is not set

so I don't enable oss support in my kernel

----------

## bLUEbYTE84

 *yayien wrote:*   

> In "great Gentoo ALSA guide" it says only:
> 
> # grep SOUND .config
> 
> (1. is true)
> ...

 

OK now do this:

log in as root

emerge -C alsa-driver alsa-oss

after that go to kernel source dir (/usr/src/linux)

make clean

make menuconfig

go to device drivers-> sound

sound card support : M

open sound system (OSS) : NO

advanced linux sound arc. (ALSA) everything M

from there sound cards -> PCI everything M

then recompile your kernel & boot

then

emerge alsa-util

then alsaconf

finally rc-update add alsasound boot

reboot and it shouldd work

----------

## yayien

Now I get errors when loading.....

My dmesg:

```

snd_hda_intel: Unknown symbol snd_pcm_new

snd_hda_intel: Unknown symbol snd_pcm_limit_hw_rates

snd_hda_intel: Unknown symbol snd_card_register

snd_hda_intel: Unknown symbol snd_card_free

snd_hda_intel: Unknown symbol snd_pcm_lib_preallocate_pages_for_all

snd_hda_intel: Unknown symbol snd_hda_bus_new

snd_hda_intel: Unknown symbol snd_hda_build_pcms

snd_hda_intel: Unknown symbol snd_verbose_printk

snd_hda_intel: Unknown symbol snd_hda_codec_new

snd_hda_intel: Unknown symbol snd_hda_queue_unsol_event

snd_hda_intel: Unknown symbol snd_card_new

snd_hda_intel: Unknown symbol snd_pcm_lib_malloc_pages

snd_hda_intel: Unknown symbol snd_pcm_lib_ioctl

snd_hda_intel: Unknown symbol snd_pcm_lib_free_pages

snd_hda_intel: Unknown symbol snd_hda_calc_stream_format

snd_hda_intel: Unknown symbol snd_pcm_set_ops

snd_hda_intel: Unknown symbol snd_hda_suspend

snd_hda_intel: Unknown symbol snd_device_new

snd_hda_intel: Unknown symbol snd_pcm_suspend_all

snd_hda_intel: Unknown symbol snd_hda_resume

snd_hda_intel: Unknown symbol snd_pcm_hw_constraint_integer

snd_hda_intel: Unknown symbol snd_hda_build_controls

snd_hda_intel: Unknown symbol snd_pcm_period_elapsed

```

it is only the last lines...

----------

## bLUEbYTE84

 *yayien wrote:*   

> Now I get errors when loading.....
> 
> My dmesg:
> 
> ```
> ...

 

I think we have made a little mistake...

Again, go do make menuconfig

go device drivers -> sound -> sound card support -> Change it from M to * (say yes)

compile & reboot

post again the result

----------

## erik258

try loading whichever module you compilied instead of recompiling it into the kernel .  you can find the module name in the help section under the kernel option in  menuconfig.

----------

## bLUEbYTE84

Let him recompile. It might be confusing to mess with modules. I also thought this.

----------

## yayien

Ok so I recompliled my kernel with alsa & my drivers into and it work but I have 2 questions:

- How can I do so as to install my 2 cards? (I just have to modify the alsa conf file (I already compiled the drivers into my kernel)?)

- Why can't I use the alsa "standalone" version ?

Thx a lot

----------

## bLUEbYTE84

 *yayien wrote:*   

> Ok so I recompliled my kernel with alsa & my drivers into and it work but I have 2 questions:
> 
> - How can I do so as to install my 2 cards? (I just have to modify the alsa conf file (I already compiled the drivers into my kernel)?)
> 
> - Why can't I use the alsa "standalone" version ?
> ...

 

There's nothing keeping you from using standalone alsa drivers but I want to help you to get it working in the quickest way possible (and the method I was most sure of, because I do it like this myself)

For two cards, alsaconf should detect them I guess. But maybe someone more knowledgeble about multi-card stuff can tell better.

By the way, are the two cards identical?

----------

## bLUEbYTE84

For standalone ALSA drivers:

menuconfig -> sound card support * (yes)

ALSA & OSS NO

then emerge alsa-driver alsa-oss should work.

Be sure that you have /usr/src/linux pointing to the right kernel tree.

----------

