# Can't get my Sound Card working.

## RobinVossen

Well, I installed Gentoo and I am happy with it.

Everything works and everything is quick.. but well I said everything works. Well thats not the case..

I cant get my Sound Card Driver to work.

So I wonder, any advice?

I tried to emerge alsa-driver and he just Crashed.

The error is the following:

```

var/tmp/portage/media-sound/alsa-driver-1.0.14-r1/work/alsa-driver-1.0.14/acore/sound.c: In function 'alsa_sound_exit':

/var/tmp/portage/media-sound/alsa-driver-1.0.14-r1/work/alsa-driver-1.0.14/acore/sound.c:552: error: void value not ignored as it ought to be

make[4]: *** [/var/tmp/portage/media-sound/alsa-driver-1.0.14-r1/work/alsa-driver-1.0.14/acore/sound.o] Error 1

make[3]: *** [/var/tmp/portage/media-sound/alsa-driver-1.0.14-r1/work/alsa-driver-1.0.14/acore] Error 2

make[2]: *** [_module_/var/tmp/portage/media-sound/alsa-driver-1.0.14-r1/work/alsa-driver-1.0.14] Error 2

make[1]: *** [modules] Error 2

make[1]: Leaving directory `/usr/src/linux-2.6.23-gentoo-r9'

make: *** [compile] Error 2

 * 

 * ERROR: media-sound/alsa-driver-1.0.14-r1 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_compile

 *             environment, line 3912:  Called die

 * The specific snippet of code:

 *       emake LDFLAGS="$(raw-ldflags)" HOSTCC="$(tc-getBUILD_CC)" CC="$(tc-getCC)" || die "Make Failed";

 *  The die message:

 *   Make Failed

 * 

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/media-sound/alsa-driver-1.0.14-r1/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/media-sound/alsa-driver-1.0.14-r1/temp/environment'.

```

And I just have NO idea what the problem is.

I have according to lspci a nVidia MCP55 High Definition Audio (rev a2)

----------

## NeddySeagoon

RobinVossen,

That version of alsa-drivers is out of step with your kernel.

Use the in kernel alsa support, built as modules instead.

You still need everything else from the ALSA guide, except emerge alsa-drivers

----------

## RobinVossen

oh, kinda forgot the mention that..

I tryed that but then I got when I tryed to start alsamixer

function snd_ctl_open faild for default: No such device

So, then i thought..

Lets enable the deamon.

/etc/init.d/alsasound start

And it fails with the error cant find driver.

----------

## rahulthewall

Did you select the correct sound card model in the Kernel Configuration. I had the same issues and it turned out I simply had the wrong sound card selected in the Kernel Configuration menu.

----------

## RobinVossen

Ah, Ill try more cards  :Wink:  Its a On-Board card thus it should be in the PCI-Devices list right?

Well, ill just try them all.

Thanks.

Cheers,

Robin

----------

## NeddySeagoon

RobinVossen,

Its Intel HDA

Don't enable them all. I suspect you have messed up your kernel install after you made ALSA.

Does the time and date in 

```
uname -a
```

match your most recent kernel build time and date ?

----------

## rahulthewall

Yeah, well if it is Intel HDA (as it is inbuilt) then there is a specific driver for it in the PCI section of ALSA.

Aside from this, if someone is not sure about his card and all he knows that it is a PCI card, then if he builds all the drivers as modules, it should still work.  :Razz: 

----------

## RobinVossen

Hello all =)

Thanks for all the help.

It card is found now, but doesnt make any sound.

AlsaMixer sees the card and enables me to put all the settings high.

But, well YouTube and Exaile cant make any noise yet..

Any ideas?

----------

## NeddySeagoon

RobinVossen,

A few things ...

1. Unmute only PCM and Master (if you have it) and set the sliders to 70%

Intel HDA cab do both SPDI/F and Analogue audio but not both at the same time. It works in Digital (SPDI/F) mode if any non Analogue options are unmuted.

2. Intel HDA is poorly specified and poorly implemented by a number of vendors. This is fixed in the driver but you may need a module parameter when you load the module. See the HDA section of  /usr/src/linux/Documentation/sound/alsa/ALSA-Configuration.txt

----------

## RobinVossen

Neddy, Thanks a lot.

I did put everything up in Alsa-Mixer.

But I still dont have any sound.

I did put the PCM (whatever that is) on 71 and Master Wasnt there.

Everything is Zero now...(apart from the PCM then) I put the Channel on 6. Hoping I was smart.

At this point I am looking at that Kernel Help file.

But, I don't understand this at all.

I think I have:

    Module for Intel ICH (i8x0) chipset MC97 modems.

			* Intel i810/810E, i815, i820, i830, i84x, MX440

				ICH5, ICH6, ICH7

			* SiS 7013 (SiS 735)

			* NVidia NForce, NForce2, NForce2s, NForce3

			* AMD AMD8111

			* ALi m5455

    ac97_clock	  - AC'97 codec clock base (0 = auto-detect)

    This module supports one card and autoprobe.

    Note: The default index value of this module is -2, i.e. the first

          slot is excluded.

    The power-management is supported.

But I ain't sure.

I love Computer science.  But with Sound Cards its the same as network cables for me.

I dont care how they work. As long that they  work =P

I have no idea what most of this means.

I have Front in Alsa-Mixer on Zero.

And I do RUN the Alsa Deamon..

Should I maybe also be part of a group of somekind?

I am in the group Audio..

Well, thats for all the help.

But can yu maybe give me some Tiny bit more?  :Wink: 

Cheers, 'nd thanks a lot already.

Robin

----------

## meisteris

I am rly happy that i managed to get my nVidia Corporation MCP61 High Definition Audio (rev a2) card to sing   :Twisted Evil:   so now i think this thread is right place to share how i did that, so here we go. 

First i off course tried to get it working with kernel i got from emerge (kernel-2.6.23-r9), i compiled in snd_hda_intel driver for alsa, then emerged alsa-lib and alsa-utils, and had rly no luck, tried all kinds of stuff, compiled that kernel over and over again, then i grabbed my old creative card which i know works well with Linux, then i compiled driver for it and once again had no luck, alsa detected my card but there was only this error:

```
 alsamixer 

alsamixer: function snd_ctl_open failed for default: No such device
```

So my friend offered me to try with vanilla kernel from kernel.org, so as i had nothing more to try i grabbed 2.6.24.3 vanilla kernel, in the Alsa section picked up these options (as i did with gentoo kernel):

```
<*> Advanced Linux Sound Architecture                                         │ │  

  │ │        <*>   Sequencer support                                                       │ │  

  │ │        < >     Sequencer dummy client                                                │ │  

  │ │        <*>   OSS Mixer API                                                           │ │  

  │ │        <*>   OSS PCM (digital audio) API                                             │ │  

  │ │        [*]     OSS PCM (digital audio) API - Include plugin system                   │ │  

  │ │        [*]   OSS Sequencer API                                                       │ │  

  │ │        <*>   RTC Timer support                                                       │ │  

  │ │        [*]     Use RTC as default sequencer timer                                    │ │  

  │ │        [ ]   Dynamic device file minor numbers                                       │ │  

  │ │        [*]   Support old ALSA API                                                    │ │  

  │ │        [*]   Verbose procfs contents                                                 │ │  

  │ │        [ ]   Verbose printk                                                          │ │  

  │ │        [ ]   Debug                                                                   │ │  

  │ │              Generic devices  --->                                                   │ │  

  │ │            PCI devices  --->
```

then in PCI devices, i saw whole new section for intel HD audio which is correct driver to use for MCP55 and newer cards, so i selected all like this:

```
<M> Intel HD Audio                                                            │ │  

  │ │        [*]   Build hwdep interface for HD-audio driver                               │ │  

  │ │        [*]   Build Realtek HD-audio codec support                                    │ │  

  │ │        [*]   Build Analog Device HD-audio codec support                              │ │  

  │ │        [*]   Build IDT/Sigmatel HD-audio codec support                               │ │  

  │ │        [*]   Build VIA HD-audio codec support                                        │ │  

  │ │        [*]   Build ATI HDMI HD-audio codec support                                   │ │  

  │ │        [*]   Build Conexant HD-audio codec support                                   │ │  

  │ │        [*]   Build C-Media HD-audio codec support                                    │ │  

  │ │        [*]   Build Silicon Labs 3054 HD-modem codec support                          │ │  

  │ │        [*]   Enable generic HD-audio codec parser                                    │ │  

  │ │        [ ]   Aggressive power-saving on HD-audio
```

** Tho i think (but don't take my word too seriuosly for this tho) for MCP cards you only need to have these two selected:

```
<M> Intel HD Audio                                                            │ │  

  │ │        [*]   Build hwdep interface for HD-audio driver                               │ │
```

Compiled the kernel, and well well what do you know, just had to run alsamixer and woila, i hear my MCP61 singing like a bird (and that other old creative card started to work too).

So in short: you get vanilla kernel, emerge alsa-lib and alsa-utils, add alsasound daemon to init.d (rc-update add alsasound default) and make sure you are in audio group. Thats it.

So i rly dunno what to blame here, it seems to me, that someone overdone with gentoo kernel patches, but it is only a gues.

P.S.

For ollder than MCP55 card you do not need Intel HD audio, those work with "Intel/SiS/nVidia/AMD/ALi AC97 Controller" driver.

P.P.S.

For those who do not know how to use vanilla, here is quick tip:

You extract your kernel to /usr/src/linux-2.6.**.* then you need to place symlink ln -s /usr/src/linux-2.6.**.* /usr/src/linux (be sure to remove old "linux" symlink), then cd to /usr/src/linux-2.6.**.* and don't forget to run "make mrproper" first, after this it is done in the usual way. And if you are using nvidia graphics card you will have to reemerge nvidia-drivers after you boot into the new kernel (thats why symlink "linux" is needed).

Cheers, hope this will help

----------

## RobinVossen

Ok, that did Kill my system..

Umm, thanks though. But it didnt work for me. 

Any other ideas?

Else ill just have to buy a Gentoo-Compatible-Sound-Card

I mean, how expensive can they be?

Cheers,

Robin

----------

## meisteris

Well you need to configure all the other options properly too in vanilla kernel  :Wink: 

----------

## RobinVossen

I did understand that  :Wink: 

I copied my .config file.

And, well I emerged my drivers again/wifi/nvidea.

Then I did a reboot

and I got in my system. looked fine. Tryed Alsa-Mixer.

Bad Luck no sound...

Then I got back to the Rescue Kernel.

And I forgot to Emerge everything before that

so I didnt have any driver or inet  :Wink: 

Its fine now, but still no sound.  :Sad: 

----------

## meisteris

Then maybe you could post some of dmesg output? other errors you get when running alsamixer, lsmod output, and try to run alsasoud daemon by hand (/etc/init.d/alsasound start) to see if it is complaining, and if you were using alsa-drivers package, you should remove it, couse it is only useful when you do not use in kernel drivers, basically you need to have only correct kernel setup, alsa-lib and alsa-utils packages installed.

----------

## RobinVossen

Ah, will do that in a couple of days.

Since I am almost off now to fly to Britian for a week.

Thanks again, Ill do this stuggle  :Wink: 

----------

## blackwire

I would also(alsa)  :Wink:  like to know how to get my sound card working. lspci returns Realtek AC'97 ICH4.. and other things. So its definately seeing the sound card but not installing the drivers i guess. Alsaconf does nothing but complain about not being able to find any ISA cards. And /etc/init.d/alsasound complains about not being able to find drivers. And trying to emerge alsa-driver doesnt work. And im sure i have OSS and alsa enabled in the kernel. I dont know what im doing wrong, any assistance would be helpful...

----------

## meisteris

 *blackwire wrote:*   

> And im sure i have OSS and alsa enabled in the kernel. I dont know what im doing wrong, any assistance would be helpful...

 

Did you enabled whole OSS section? or just OSS support in alsa section? The thing is you can't use OSS drivers and ALSA drivers at the same time, so you have to choose, most people can safely turn off OSS section, and use ALSA instead (can also enable OSS emulation in ALSA section for backwards compability for various older programs). As i said above, basically you need to do these few things to get sound cards to work under Linux:

a) Properly configure kernel (enable alsa support and driver for your sound card)

b) install alsa-lib and alsa-util packages. (if not already installed)

c) rc-update add alsasound default

d) reboot the system then use alsamixer to adjust volume levels

e) store configuration as root: alsactl store

In most cases problem is not selecting right driver in kernels ALSA section. (if not sure which driver is right for your card, you can compile all drivers as modules "M", and affter rebooting run alsaconf, then ALSA should pick the right one  :Wink:  )

----------

## Dominique_71

A possibility is that you messed up /lib/modules/<your_kernel_modules>. So, before you run "make modules_install" from the kernel sources delete /lib/modules/<your_kernel_modules>. You must first also uninstall the alsa-driver package.

If that still doesn't work, read and re-read the gentoo linux alsa guide. If that doesn't help, please post you .config here (without the comments == the output of 

```
cat /usr/src/linux/.config | grep -v "#"
```

).

----------

## blackwire

well i hope RobinVosson finds a solution, i found mine @ https://forums.gentoo.org/viewtopic-t-678101-highlight-.html

good luck

----------

