# alsa

## Cryptix

I have a problem getting sound on my computer. i have an onboard card that uses the via82xx driver according to "lspci | grep -i audio" and i installed the card the way it states here: http://www.gentoo.org/doc/en/alsa-guide.xml#alsa-utils but i can't seem to get sound working. also how do i change the permissions for playing sound? i tested playing mp3's as root and it didnt work so i know that's not the problem but i want to be able to play sound as a reg user afterwards. any ideas on gettin sound to work would help alot.... i really miss my music.

----------

## RayDude

 *Cryptix wrote:*   

> I have a problem getting sound on my computer. i have an onboard card that uses the via82xx driver according to "lspci | grep -i audio" and i installed the card the way it states here: http://www.gentoo.org/doc/en/alsa-guide.xml#alsa-utils but i can't seem to get sound working. also how do i change the permissions for playing sound? i tested playing mp3's as root and it didnt work so i know that's not the problem but i want to be able to play sound as a reg user afterwards. any ideas on gettin sound to work would help alot.... i really miss my music.

 

Any error messages?

Have you unmuted the card? You can use alsamixer from the command line or alsamixergui in X.

What does your use look like?  USE="alsa? oss? arts?..."

What is the output of lsmod?

If you're configured for ALSA, does /dev/snd exist and have stuff in it?

That's a start...

Raydude

----------

## Cryptix

no error messages, im missing oss and arts from USE, i have unmuted my card with alsamixer,  lsmod says alot of stuff but i think ur looking for snd_via82xx and i says used by: 0. /dev/snd is not a directory....

----------

## Ma3oxuct

This sounds alittle bit like the problem I had with getting my sound working...Did you include ALSA support in your Kernel? If you did, then take it out. i.e. No modules or *.

----------

## RayDude

 *Cryptix wrote:*   

> no error messages, im missing oss and arts from USE, i have unmuted my card with alsamixer,  lsmod says alot of stuff but i think ur looking for snd_via82xx and i says used by: 0. /dev/snd is not a directory....

 

So when you say "missing," do you mean: USE="alsa -oss -arts"?

That's how I'm currently configured on my laptop, I'm setting it up on my work machine as I type. Its the best because it gets rid of all the old sound system cruft.

Here's how I configured my sound:  Alsa Software Mixer Install Guide

As for debugging your current problem, if the module is loading, there should be some indication of what its doing in `dmesg.` If its loading but you aren't getting /dev/snd/pcm*, then its not working. It may be the wrong module or there may be an interrupt conflict. I've seen this in windows with Via Crap (pardon me, I mean Via hardware). You might try assigning its IRQ in the bios to see if that helps. Its a long shot...

You have emerged hotplug and coldplug, right?

You have rc-update add (hotplug, coldplug) default and add alsasound boot, right?

You can also check /var/log/messages to see if there are any more clues. Keep in mind you want to look at the last log to see the results of the current boot.

Raydude

----------

## Cryptix

i have added alsa too boot... how do u get rid of this module and start from scratch?

----------

## Cryptix

bump

----------

## RayDude

 *Cryptix wrote:*   

> ... how do u get rid of this module and start from scratch?

 

Have you read the ALSA guide I linked you to? It answers exactly this question...

But if you didn't have alsasound added to boot before, that would explain why the module wasn't being used. Does it work now? What's the error message you are getting?

Or are you still getting zero sound?

Do you have hotplug and coldplug installed?

Raydude

----------

## Cryptix

hotplug and coldplug are installed.... alsa starts when computer boots up i saw it. still no sound. i have added audio permissions to the user and still no audio.

----------

## Cryptix

im following that guide but im stuck near the beginning were it says to compile your kernel (after the mrproper thing). i have genkernel... is there a single command i can use or do i have to make the script as shown in the guide?

----------

## RayDude

 *Cryptix wrote:*   

> im following that guide but im stuck near the beginning were it says to compile your kernel (after the mrproper thing). i have genkernel... is there a single command i can use or do i have to make the script as shown in the guide?

 

I don't know how to use genkernel.

Feel adventurous? Learn the make menuconfig way:

First, did you make a backup of your .config file before the make mrproper?

I hope so...

I'm not sure this will help you though, there is some fundamental problem that we're not understanding.

```
cd /usr/src/linux

cp config_backup_file .config

make menuconfig

[Remove alsasound as it says in the guide, step through Device Drivers ---> Sound ----> Alsa, then with the highlight over the ALSA top item press "N" to remove all ALSA related drivers.]

Exit

Exit

Exit

Save Changes? YES

cp .config backup.config

make mrproper

cp backup.config .config

make

make modules_install

mount /boot

make install
```

If you have already set ALSA_CARDS="via..." in your /etc/make.conf and emerged the ~x86 alsa-drivers, alsa-lib, alsa-utils, alsa-tools, then you should be able to reboot and use the new sound system.

I'm curious, before you do all that run mplayer on an ogg file (/usr/kde/3.4/share/sounds/KDE_Startup_2.ogg) and see what it says. Maybe that will give us a clue as to what's going on.

Raydude

----------

## Ma3oxuct

Thats a bit too much work. When I used to use genkernel this worked:

```
genkernel --menuconfig --udev all
```

Then all you do is navigate as already has been stated.

----------

## Cryptix

muahahahhaha.... too late to run the ogg thing it already recompiled the kernel

----------

## Cryptix

after i finish this guide will alsa boot at startup? or do i have to add it in as with the other guides?

----------

## Cryptix

k i followed the guide and now it says when i try to play a file "/dev/dsp: no such file or directory"

and i get a bunch of errors at boot time... so basically im alot worse off than i was before... how do i undo what this guide did?

----------

## RayDude

 *Cryptix wrote:*   

> k i followed the guide and now it says when i try to play a file "/dev/dsp: no such file or directory"
> 
> and i get a bunch of errors at boot time... so basically im alot worse off than i was before... how do i undo what this guide did?

 

I don't think you should undo what the guide did. The new alsa rocks. Its worth a bit of trouble to get working.

What does lsmod show? What does it say during bootup when trying to start alsasound?

/dev/dsp is OSS, it is not alsa. So that application configuration is wrong.

Change your USE to this, I've been playing the last few days with KDE 3.4.1 and have come to the conclusion that I have to include ARTS, but not use it to get KDE sounds to work with ALSA. Once the new alsa is working most applications find it and use it.

[code]USE="... alsa arts -oss ..."[code]

Then do this:

[code]emerge --deep --newuse --update world -p[/code]

See how much stuff would change. I believe mplayer, xine, xmms and many audio apps will recompile. That should remove any oss support you have, then you just have to make sure that the apps don't try to use arts. I disable arts in KDE by running the Control Center, choosing "Sound & Multimedia" "Sound System" and uncheck the "Enable the sound system" box at the top of the screen.

Once you see what's going to change, remove the -p from the end and let it rebuild all that stuff (mostly KDE I'll bet).

Raydude

----------

## Cryptix

ls mod shows alot of stuff relating to sound 

```
snd_via82xx used by: 0

snd_ac97_codec used by:2 snd via82xx, snd ax97_codec

```

theres alot more but i think u get the idea... the only sound thing what doesnt have a number under the used  by column is snd_via82xx 

im running fluxbox so i dont beleive i have those options to disable arts... why dont i just put "-arts" in USE variables?

----------

## Cryptix

if i try to play a file now it still lookes for /dev/dsp

----------

## RayDude

 *Cryptix wrote:*   

> ls mod shows alot of stuff relating to sound 
> 
> ```
> snd_via82xx used by: 0
> 
> ...

 

Don't disable arts. KDE sound won't work without it. It sucks, IMO, but that's the way it is.

alsa -oss arts is how I do it.

Do this for me:

```
/etc/init.d/alsasound status
```

Does it say "started"?

----------

## RayDude

 *Cryptix wrote:*   

> if i try to play a file now it still lookes for /dev/dsp

 

Did you emerge --deep --newuse --update world with -oss in your USE statement in /etc/make.conf?

If so, there's a config file causing you problems...

Which program is giving you that error message?

Raydude

----------

## Cryptix

rhythmbox, and mplayer are giving me that error... i havent tried with xmms but i suspect the saem error... 

```
/etc/init.d/alsasound status
```

 says that it has started. when i followed the guide u showed me earlier i had "-arts" in my USE variables but i changed it to "arts" afterwords and did the emerge --deep --newuse --update world -p. i dont have kde on my system.

p.s. -oss was in my use variables when i executed "emerge --deep --newuse --update worl -p"

----------

## RayDude

 *Cryptix wrote:*   

> rhythmbox, and mplayer are giving me that error... i havent tried with xmms but i suspect the saem error... 
> 
> ```
> /etc/init.d/alsasound status
> ```
> ...

 

You need to configure those apps to use alsa. Its that way by default on my systems... I suggest you check out the man pages, google and the gentoo forums to figure out how to configure them.

I know for mplayer, there is a .mplayer/config file to edit in your home directory. See what it points to.

I'm really baffled by this.

Raydude

----------

## Cryptix

yah its real wierd.... oh and by the way ... just so i dont have to bug u if i get stuck how do i undo what i did in the guide? and also if i have ALSA_CARDS="via82xx" in /etc/make.conf ... is it supposed to be just "via82xx" or "snd_via82xx"?

----------

## Cryptix

bump

----------

## RayDude

 *Cryptix wrote:*   

> yah its real wierd.... oh and by the way ... just so i dont have to bug u if i get stuck how do i undo what i did in the guide? and also if i have ALSA_CARDS="via82xx" in /etc/make.conf ... is it supposed to be just "via82xx" or "snd_via82xx"?

 

To remove the installed drivers:

```
emerge -C alsa-drivers

Edit your kernel config (via what ever method) to re-enable alsa sound in the kernel as a module)

Recompile the kernel, install it and install modules...

Reboot
```

As for the name of the driver, getting it right in the make.conf file just prevents the emerge from installing all the drivers. From what I can see in the kernel, the second one is correct, although you could list both just in case you didn't want to experiment to figure it out.

Raydude

----------

