# ALSA acting up

## swizec

Recently I've installed a new soundcard and when LASA wouldn't work properly I thought I solved my problems by telling XMMS and some other stuff to use arts, but this appears to not be true.

et always keeps reporting a problem:

 *Quote:*   

> 
> 
> ------- sound initialization -------
> 
> /dev/dsp: Device or resource busy
> ...

 

and worst of all, flash player also does not have sound, which is very very disturbing

now, I have the kernel modules built properly, alsa starts just fine and all the mixer levels are set correctly, also the speakers are plugged into the right hole (I know this because arts does play sound well)

There are two possible courses of action, I fix ALSA or I tell everything to use arts.... I don't know how to do either so I've come here to get help from you knowledgable people.

----------

## TheCarNinja

Sounds to me (pardon the pun) that your old sound card had a builtin mixer to handle all the audio streams and that this one, while supported by alsa, might not, or rather, might not function as you would like.

I would suggest trying this HowTo. That might help.

Personally i have had similar issues over the years with different sound cards. For instance, my laptop doesn't natively have mixing on its sound card. My desktop does. It simply worked.

Oh and see if you find anything that sounds suspicious (Can't help it, Sorry!) in your logs. /var/log/ and dmesg

Arts and esound are daemons that do mixing. That howto i have up there is for hardware mixing without a daemon. If you use arts, (and it seems that you do on some things) it might just be best to make arts do it all. Supposedly it works. I can't stand it tho.  :Smile: 

Another thing, you said et (im presuming enemy-territory) gives /dev/dsp as busy. 

look at this thread. Thats a 5 second search on the forums.

Good luck.

----------

## swizec

Ok, neither of those two helped

the first one, I got this output and no sound with as little as the first sound testing command:

 *Quote:*   

> 
> 
> ALSA lib pcm.c:2090:(snd_pcm_open_noupdate) Unknown PCM ossmix
> 
> snd_pcm_open: No such file or directory (ossmix)
> ...

 

and the second yielded no results at all

----------

## TheCarNinja

Please give me the output of

```
# equery l|grep -i alsa
```

It should look something like this:

```
# equery l|grep -i alsa

media-libs/alsa-lib-1.0.9

media-libs/alsa-oss-1.0.8-r1

media-plugins/xmms-alsa-1.2.10-r2

media-sound/alsa-headers-1.0.9b

media-sound/alsa-utils-1.0.9a

media-sound/alsa-driver-1.0.9b

```

Also, did you follow the gento ALSA setup guide for your sound?

and try this for et

```

#artsdsp -m et

```

----------

## swizec

yes I followed the guide

the output

 *Quote:*   

> 
> 
> media-libs/alsa-lib-1.0.9
> 
> media-libs/alsa-oss-1.0.10_rc2
> ...

 

that command says it's not found...

----------

## TheCarNinja

alsa-driver is built into your kernel? Whats your kernel version?

Also, what did dmesg say when you tried alsaplayer? /var/log/messages? 

what are your USE flags in make.conf?

Heres something you could try. If i recall when arts runs it takes over /dev/dsp. Try stoping the daemon and running et.

----------

## swizec

alsa-driver as modules in a kernel-2.6.13-gentoo-r5

how do I find that out, cat-ing it takes a really long time and a bunch of incoherent stuff is printed

my USE flags are:

```

USE="X gtk -gnome alsa kde qt cdr scanner usb avi cups divx4linux ftp

mp3 opengl xvid ppds apache2 mysql pam ssl

xml xml2 session dba gd jpeg png

gif doc debug flatfile bcmath bzlib mm php java mpc pascal sql zip rar

bzip2 browserplugin mozilla 3dfx 3dnow

javascipt dlloader gdbm hal posix win32codecs musepack wmv wma nvidia flash -wxgtk1 pcre tiff nptl nptlonly dvd dvdr mmap"

```

how do I stop the daemon?

----------

## TheCarNinja

using the grep command you can get output containing what ever word or words you wish.

so say you do:

```

dmesg | grep alsa 
```

That ought to give you anything pertaining to alsa. Similar with the cat command...

```
# cat blah |grep word #(add -i to make it upper or lowercase)
```

The thing with dmesg is that the last lines are the newest. So that means that say you run alsaplayer and do something, the last lines correspond (probably) to what you did.

Okay, your alsa driver is built as a module but you didn't emerge the driver so we'll do that.

```

emerge alsa-driver

```

that should install the latest version of the alsa driver and not the kernel compiled one. Hell, that may even fix the problem but i doubt it.

Your init scripts in /etc/init.d/ are how you start and stop many programs like xdm cron ect.  You should see /etc/init.d/arts or some such.

```

# /etc/init.d/arts stop #stops arts

# /etc/init.d/arts start #starts arts

```

and if i recall correctly (it has been quite a while, i dont use KDE anymore) there should be an option within kde... perhaps looking in the multimedia options or something will reveal how to turn off arts from the gui. 

Also, i noticed in your use flags that you dont have 'arts' in there. Even though arts is a dependancy for KDE it still helps to have the use flag for other programs so that they know to build it in. So what i would do is put the arts flag in USE and recompile those programs that are giving you trouble, assuming of course we can't get them to run without it.

If this doesn't fix it, there are other things we can try.

----------

## swizec

ok, I installed alsa-driver by following the howto again

and I don't get alsa related errors anywhere anymore (except for the device is busy in et)

the problem now is that no sound comes out of the soundcard, all the mixer thingies are unmutted and set to 75%, the speakers are plugged in as before, so that shouldn't be a problem

not even arts plays sound anymore

:S

edit: from some strange reason a reboot helped and sound via ALSA works now, but it still doesn't work for flash and et...

but it seem sthat "mixing" does work because I can have both XMMS and KPlayer playing sound at the same time, both through ALSA...

ok, by stopping arts and using that other thread, et sound works now... 

and flash sound still doesn't work  :Sad: 

----------

## TheCarNinja

So everything but flash works? Great!  :Smile:  Almost there i guess. Sadly I'm not really sure what to do about sound for flash...

I assume you're using firefox with the flash plugin ... but if mixing works you should have sound... very odd indeed.   :Confused: 

Try running a flash whatever with no other sound streams and programs that use sound running. Does it work then?

----------

## swizec

I'm using opera with the plugin, but it doesn't work in firefox either

and no, it doesn't play if there are no other sounds...

maybe if I reinstaleld the plugin, but i don't  know how to do that, will look into it  :Smile: 

----------

## TheCarNinja

Hehe, yeah i dont use Opera so i can't help you with that. Try searching through the forums for it. Google too. Glad everything else works.  :Smile: 

----------

