# Drivers

## ps2cho

Ok looks like my audio on gentoo doesnt work...

i have found the audio driver for it, but how do i install it ?

Thanks, ps2cho

----------

## adsmith

I don't understand your question...

0) did you read the gentoo sound guide, http://www.gentoo.org/doc/en/alsa-guide.xml?

1A) did you compile ALSA support into your kernel? 

OR

1B) did you emerge the alsa packages?

----------

## ps2cho

ok just did that and no luck....  :Sad: 

----------

## UncleTom

 *ps2cho wrote:*   

> ok just did that and no luck.... 

 

Please be more specific, otherwise we will not be able to help you. You did what?

----------

## ps2cho

I added all of the ALSA options in the kernel then did  *Quote:*   

> make && make modules_install

 , reboot and doesnt work...

Oh and my sound card is :

 Analog Devices AD1918B AC'97 Compatible Audio

help  :Sad: 

----------

## bob_111

you did copy over the new bzImage and System.map didn't you  :Question:  Do you have it compiled in or as a module (loaded ?).

- bob_111

----------

## ps2cho

I used genkernel and it said copying the bzImage. I dont understand the second question  :Sad: 

----------

## UncleTom

 *bob_111 wrote:*   

> you did copy over the new bzImage and System.map didn't you  Do you have it compiled in or as a module (loaded ?).

 

Let me translate.  :Wink: 

In your kernel configuration, does it say

```
<M> Intel/SiS/nVidia/AMD/ALi AC97 Controller 
```

meaning the driver "is compiled as a module"

or

```
<*> Intel/SiS/nVidia/AMD/ALi AC97 Controller 
```

meaning the driver is "compiled into the kernel"?

The difference in short is that if something is not "in the kernel", it must first be loaded to take effect. But the alsasound startup script should take care of that for you and in my experience it should really work either way. The startup script assumes that your driver is compiled as a module and will complain if it isn't, so I usually do that. I also compile all the other ALSA related stuff into the kernel.

What driver did you select under Device Drivers -> Sound -> Advanced Linux Sound Architecture -> PCI Devices? The "Intel/SiS/nVidia/AMD/ALi AC97 Controller" ?

If you did, did you change the alias snd-card-0 line in your /etc/modules.d/alsa file as follows?

```

alias snd-card-0 snd-intel8x0

```

If you did all that and added alsasound to your boot runlevel, than you should get some messages about loading sound drivers, etc. If you get these messages, do you also get any errors?

Sorry, a lot of questions, but I'm sure we'll get there.  :Smile: 

----------

## ps2cho

i did everything there when i followed the alsa guide.

still no work

----------

## UncleTom

Did you try what the "Sound Check!" and "Issues?" sections of the ALSA Guide suggest? What was the result?

----------

## ps2cho

http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=Intel&card=.&chip=440MX%2C+i810%2C+i810%2C+i810E%2C+i820%2C+i820&module=intel8x0

Thats what i followed.

How can i find out what my sound card is exactly? I wanna be 100% sure im using the right driver here...

----------

## UncleTom

 *ps2cho wrote:*   

> http://www.alsa-project.org/alsa-doc/doc-php/template.php?company=Intel&card=.&chip=440MX%2C+i810%2C+i810%2C+i810E%2C+i820%2C+i820&module=intel8x0
> 
> Thats what i followed.
> 
> How can i find out what my sound card is exactly? I wanna be 100% sure im using the right driver here...

 

You should read and use the Gentoo Sound Guide http://www.gentoo.org/doc/en/alsa-guide.xml like adsmith suggested. It explains the whole process step by step and also shows how to find out what sound card you have.

----------

## ps2cho

Ok my sound card is :

Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 03)

I dont think ALSA supports it...It only supports:

Chipset(s):

i810

i810

i810E

i820

i820 	

Driver: 

(intel8x0) 	(1)

Am i right?Please say no..  :Sad: 

----------

## ps2cho

Just for the heck of it i did it and when it gets to the point where i have to start it i get this:

 *Quote:*   

> Starting sound driver: snd-intel8x0 done
> 
> /usr/sbin/alsactl: load_state:1236: No soundcards found...
> 
> Setting default volumes...
> ...

 

Hmm  :Sad: 

----------

## UncleTom

The i8x0 driver should be right for your sound card and there are reports on the internet that people got it working.

Which alsa drivers do you use? The ones in the kernel, the ones you downloaded from the alsa site or the alsa-driver ebuild?  

Do you find anything in the output of "dmesg" about alsa and the sound card?

----------

## ps2cho

i just emerged alsa-drivers

it doesnt show up in the dmesg

----------

## UncleTom

Sorry if I state the obvious, but you have to re-emerge alsa-drivers every time you compile your kernel. Did you do that? 

Normally, you should get something like that in dmesg (I use the same driver with a slightly different chip set):

```

...

Advanced Linux Sound Architecture Driver Version 1.0.8 (Thu Jan 13 09:39:32 2005 UTC).

...

intel8x0_measure_ac97_clock: measured 49913 usecs

intel8x0: clocking to 48000

ALSA device list:

  #0: Intel 82801CA-ICH3 with YMF753 at 0x1c00, irq 9

...

```

----------

## ps2cho

 *Quote:*   

> Linux version 2.6.12-gentoo-r6 (root@RobLaptop) (gcc version 3.3.5 (Gentoo Linux 3.3.5-r1, ssp-3.3.2-3, pie-8.7.7.1)) #1 SMP Tue Jul 26 11:18:55 Local time zone must be set--see zic
> 
> intel8x0_measure_ac97_clock: measured 49337 usecs
> 
> intel8x0: clocking to 48000
> ...

 

Ok i emerged it again and now its showing up. I dont get that ALSA Device list in it..

Still no sound either

----------

## ps2cho

IT WORKS !!!

I just rebooted, did alsa-mixer again as it had muted everything and it works!!!

Thank you so much Uncle_Tom.

I really appreciate it  :Smile: 

Thanks again !

----------

## UncleTom

Yup, but that's only part of it. Somehow you only get a message from your driver, but no ALSA messages. You have disabled all the alsa stuff in the kernel, have you? You only need the basic sound card support for alsa-drivers, nothing else.

If that is not the problem, would you be willing to give the kernel drivers a go? Unmerge alsa-driver and then configure the kernel with ALSA support and the intel driver.

----------

## UncleTom

Ooops, then disregard my last post.

Glad it works!

----------

## ps2cho

Hmm one more slight problem.

Everytime i reboot, the alsamixer mutes everything and i have to go into it and unmute everythign each time.

Is there a way i can keep the settings i do ?

When i unmute i press M on the first one(forgot its name) and the PCM then i press escape. Is this the correct way to do it?

Thanks again, ps2cho

----------

## UncleTom

The newest version of alsa-utils has options in /etc/conf.d/alsasound for saving the mixer levels (SAVE_ON_STOP) and restoring them (RESTORE_ON_START). The alsasound init script should then handle this correctly.

----------

## ps2cho

It's already correct...

 *Quote:*   

> # ENABLE_OSS_EMUL:
> 
> # Do you want to enable in-kernel oss emulation?
> 
> # no - Do not load oss emul drivers
> ...

 

----------

## UncleTom

Do you have alsasound in your boot runlevel?

If you do, you could try to manually save the state and see if that helps:

```
/usr/sbin/alsactl -f /etc/asound.state store
```

Oddly enough I just found that on my notebook, I don't have this, and the sound still works.  :Shocked: 

----------

## ps2cho

 *Quote:*   

> bash-2.05b# rc-update add alsasound boot
> 
>  * alsasound already installed in runlevel boot; skipping
> 
> bash-2.05b# /usr/sbin/alsactl -f /etc/asound.state.store
> ...

 

Did it do it?

----------

## UncleTom

Nope, there should be a space between "asound.state" and "store", not a period.

----------

## ps2cho

ok wierd...suddenly i rebooted this morning and i got this error:

http://img.photobucket.com/albums/v229/microg00mba/artsmessage.jpg

when i do alsamixer i get this:

 *Quote:*   

> bash-2.05b# alsamixer
> 
> alsamixer: function snd_ctl_open failed for default: No such device or address

 

----------

## ps2cho

bump?

----------

## UncleTom

Have you changed anything or did you just reboot? Remember that you have to re-emerge alsa-driver when you compile a kernel.

----------

## ps2cho

every single time? do i have to re-emerge everything that i emerge after a kernel write?

----------

## F-0_ICE

yes but only the alsa-driver thats why i use the alsa drivers in the kernel in order to avoid that problem. it doesn't seem alsasound has been started lets just clear up a few things...

make sure its started during bootup

```
rc-update add alsasound boot
```

and to start alsa

```
/etc/init.d/alsasound start
```

see how that works.

----------

