# [SOLVED] Compiling ALSA directly into the Kernel

## FRIGN

Greetings fellow Gentoo-users!

I recently set up a new Gentoo-Machine and successfully set up ALSA for the soundcard

```
Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
```

by configuring the Kernel to use the Intel HD Audio-Drivers by Cirrus (CONFIG_SND_HDA_CODEC_CIRRUS) as a module.

You might call me crazy, but I am not happy with the solution having to probe the ALSA-modules including the driver on each boot with the possibility to directly compile this feature into the Kernel, as I don't need real flexibility for soundcard-hotplugging.

So I decided to dump the modules and configured the Kernel to compile the components in:

Following the extensive documentation in the Gentoo-Manual, it told me to skip the configuration and just set up the ALSA Init-Script.

Having set up everything provides me with the following error-message by alsasound:

```
alsasound     |sed: can't read /proc/asound/cards: No such file or directory
```

/dev/snd doesn't exist either, which leads me to believe that there might be a problem with my Kernel-configuration or missing options in either ALSA or udev.

If you need specific information, please let me know!

cheers

FRIGNLast edited by FRIGN on Fri Jan 18, 2013 6:14 am; edited 1 time in total

----------

## PaulBredbury

Distros pretty much all use external modules. So whilst it should work for you, I believe it gets almost zero testing by comparison.

 *FRIGN wrote:*   

> specific information

 

There is an easy way:

```
wget -O alsa-info.sh http://www.alsa-project.org/alsa-info.sh

bash alsa-info.sh --upload
```

Then show us the URL that the script shows at the end.

----------

## FRIGN

 *PaulBredbury wrote:*   

> Distros pretty much all use external modules. So whilst it should work for you, I believe it gets almost zero testing by comparison.
> 
>  *FRIGN wrote:*   specific information 
> 
> There is an easy way:
> ...

 

Thanks for warning me, but I will take the risk  :Wink: .

Ok, I used your provided script and it gives me the following URL:

http://www.alsa-project.org/db/?f=67d70af9a02981997fbf349c227961c005afe97d

edit:

Seemingly, the alsa-project.org is down. Here is the output:

```
upload=true&script=true&cardinfo=

!!################################

!!ALSA Information Script v 0.4.61

!!################################

!!Script ran on: Sat Jan 12 12:35:45 UTC 2013

!!Linux Distribution

!!------------------

Gentoo Base System release 2.2 NAME=Gentoo ID=gentoo PRETTY_NAME="Gentoo/Linux" HOME_URL="http://www.gentoo.org/" SUPPORT_URL="http://www.gentoo.org/main/en/support.xml" BUG_REPORT_URL="https://bugs.gentoo.org/"

!!DMI Information

!!---------------

Manufacturer:      Apple Inc.

Product Name:      Macmini6,2

Product Version:   1.0

Firmware Version:  MM61.88Z.0106.B03.1211161202

!!Kernel Information

!!------------------

Kernel release:    3.7.1-gentoo

Operating System:  GNU/Linux

Architecture:      x86_64

Processor:         Intel(R) Core(TM) i7-3720QM CPU @ 2.60GHz

SMP Enabled:       Yes

!!ALSA Version

!!------------

Driver version:

Library version:    1.0.26

Utilities version:  1.0.26

!!Loaded ALSA modules

!!-------------------

!!Sound Servers on this system

!!----------------------------

No sound servers found.

!!Soundcards recognised by ALSA

!!-----------------------------

!!PCI Soundcards installed in the system

!!--------------------------------------

00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)

!!Advanced information - PCI Vendor/Device/Subsystem ID's

!!-------------------------------------------------------

00:1b.0 0403: 8086:1e20 (rev 04)

        Subsystem: 8086:7270

!!Loaded sound module options

!!---------------------------

!!ALSA Device nodes

!!-----------------

!!Aplay/Arecord output

!!--------------------

APLAY

aplay: device_list:256: no soundcards found...

ARECORD

arecord: device_list:256: no soundcards found...

!!Amixer output

!!-------------

!!Alsactl output

!!--------------

--startcollapse--

--endcollapse--

!!All Loaded Modules

!!------------------

Module

tg3

!!ALSA/HDA dmesg

!!--------------

```

Note: tg3 is the Tigon3-driver v.3.124c for my recent Ethernet-Controller not yet natively supported by my current Kernel-version.

----------

## PaulBredbury

I suppose next check is:

```
zgrep SND /proc/config.gz | grep =
```

----------

## FRIGN

 *PaulBredbury wrote:*   

> I suppose next check is:
> 
> ```
> zgrep SND /proc/config.gz | grep =
> ```
> ...

 

As I don't have the config.gz-feature enabled in my Kernel-configs, I "grepped" my .config according to your check:

```
CONFIG_SND=y

CONFIG_SND_TIMER=y

CONFIG_SND_PCM=y

CONFIG_SND_HWDEP=y

CONFIG_SND_JACK=y

CONFIG_SND_SEQUENCER=y

CONFIG_SND_SEQ_DUMMY=y

CONFIG_SND_OSSEMUL=y

CONFIG_SND_MIXER_OSS=y

CONFIG_SND_PCM_OSS=y

CONFIG_SND_PCM_OSS_PLUGINS=y

CONFIG_SND_SEQUENCER_OSS=y

# CONFIG_SND_HRTIMER is not set

CONFIG_SND_RTCTIMER=y

CONFIG_SND_SEQ_RTCTIMER_DEFAULT=y

CONFIG_SND_DYNAMIC_MINORS=y

# CONFIG_SND_SUPPORT_OLD_API is not set

# CONFIG_SND_VERBOSE_PROCFS is not set

# CONFIG_SND_VERBOSE_PRINTK is not set

# CONFIG_SND_DEBUG is not set

CONFIG_SND_VMASTER=y

CONFIG_SND_KCTL_JACK=y

CONFIG_SND_DMA_SGBUF=y

# CONFIG_SND_RAWMIDI_SEQ is not set

# CONFIG_SND_OPL3_LIB_SEQ is not set

# CONFIG_SND_OPL4_LIB_SEQ is not set

# CONFIG_SND_SBAWE_SEQ is not set

# CONFIG_SND_EMU10K1_SEQ is not set

CONFIG_SND_DRIVERS=y

# CONFIG_SND_DUMMY is not set

# CONFIG_SND_ALOOP is not set

# CONFIG_SND_VIRMIDI is not set

# CONFIG_SND_MTPAV is not set

# CONFIG_SND_SERIAL_U16550 is not set

# CONFIG_SND_MPU401 is not set

CONFIG_SND_PCI=y

# CONFIG_SND_AD1889 is not set

# CONFIG_SND_ALS300 is not set

# CONFIG_SND_ALS4000 is not set

# CONFIG_SND_ALI5451 is not set

# CONFIG_SND_ASIHPI is not set

# CONFIG_SND_ATIIXP is not set

# CONFIG_SND_ATIIXP_MODEM is not set

# CONFIG_SND_AU8810 is not set

# CONFIG_SND_AU8820 is not set

# CONFIG_SND_AU8830 is not set

# CONFIG_SND_AW2 is not set

# CONFIG_SND_AZT3328 is not set

# CONFIG_SND_BT87X is not set

# CONFIG_SND_CA0106 is not set

# CONFIG_SND_CMIPCI is not set

# CONFIG_SND_OXYGEN is not set

# CONFIG_SND_CS4281 is not set

# CONFIG_SND_CS46XX is not set

# CONFIG_SND_CS5530 is not set

# CONFIG_SND_CS5535AUDIO is not set

# CONFIG_SND_CTXFI is not set

# CONFIG_SND_DARLA20 is not set

# CONFIG_SND_GINA20 is not set

# CONFIG_SND_LAYLA20 is not set

# CONFIG_SND_DARLA24 is not set

# CONFIG_SND_GINA24 is not set

# CONFIG_SND_LAYLA24 is not set

# CONFIG_SND_MONA is not set

# CONFIG_SND_MIA is not set

# CONFIG_SND_ECHO3G is not set

# CONFIG_SND_INDIGO is not set

# CONFIG_SND_INDIGOIO is not set

# CONFIG_SND_INDIGODJ is not set

# CONFIG_SND_INDIGOIOX is not set

# CONFIG_SND_INDIGODJX is not set

# CONFIG_SND_EMU10K1 is not set

# CONFIG_SND_EMU10K1X is not set

# CONFIG_SND_ENS1370 is not set

# CONFIG_SND_ENS1371 is not set

# CONFIG_SND_ES1938 is not set

# CONFIG_SND_ES1968 is not set

# CONFIG_SND_FM801 is not set

CONFIG_SND_HDA_INTEL=y

CONFIG_SND_HDA_PREALLOC_SIZE=64

CONFIG_SND_HDA_HWDEP=y

CONFIG_SND_HDA_INPUT_BEEP=y

CONFIG_SND_HDA_INPUT_BEEP_MODE=1

CONFIG_SND_HDA_INPUT_JACK=y

# CONFIG_SND_HDA_CODEC_REALTEK is not set

CONFIG_SND_HDA_CODEC_ANALOG=y

# CONFIG_SND_HDA_CODEC_SIGMATEL is not set

# CONFIG_SND_HDA_CODEC_VIA is not set

CONFIG_SND_HDA_CODEC_HDMI=y

CONFIG_SND_HDA_CODEC_CIRRUS=y

# CONFIG_SND_HDA_CODEC_CONEXANT is not set

# CONFIG_SND_HDA_CODEC_CA0110 is not set

# CONFIG_SND_HDA_CODEC_CA0132 is not set

# CONFIG_SND_HDA_CODEC_CMEDIA is not set

# CONFIG_SND_HDA_CODEC_SI3054 is not set

CONFIG_SND_HDA_GENERIC=y

CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0

# CONFIG_SND_HDSP is not set

# CONFIG_SND_HDSPM is not set

# CONFIG_SND_ICE1712 is not set

# CONFIG_SND_ICE1724 is not set

# CONFIG_SND_INTEL8X0 is not set

# CONFIG_SND_INTEL8X0M is not set

# CONFIG_SND_KORG1212 is not set

# CONFIG_SND_LOLA is not set

# CONFIG_SND_LX6464ES is not set

# CONFIG_SND_MAESTRO3 is not set

# CONFIG_SND_MIXART is not set

# CONFIG_SND_NM256 is not set

# CONFIG_SND_PCXHR is not set

# CONFIG_SND_RIPTIDE is not set

# CONFIG_SND_RME32 is not set

# CONFIG_SND_RME96 is not set

# CONFIG_SND_RME9652 is not set

# CONFIG_SND_SONICVIBES is not set

# CONFIG_SND_TRIDENT is not set

# CONFIG_SND_VIA82XX is not set

# CONFIG_SND_VIA82XX_MODEM is not set

# CONFIG_SND_VIRTUOSO is not set

# CONFIG_SND_VX222 is not set

# CONFIG_SND_YMFPCI is not set

# CONFIG_SND_USB is not set

# CONFIG_SND_FIREWIRE is not set

# CONFIG_SND_PCMCIA is not set

# CONFIG_SND_SOC is not set
```

----------

## FRIGN

 *PaulBredbury wrote:*   

> I suppose next check is:
> 
> ```
> zgrep SND /proc/config.gz | grep =
> ```
> ...

 

I don't want to be pushy, but do you have an idea where this problem might be situated?

----------

## PaulBredbury

Nope. Did you change the kernel version, when you recompiled? Maybe 3.7.1 has ALSA bugs.

Other than that, all I can suggest is to go back to the usual module method, unless you are willing and able to debug the kernel.

----------

## FRIGN

 *PaulBredbury wrote:*   

> Nope. Did you change the kernel version, when you recompiled? Maybe 3.7.1 has ALSA bugs.
> 
> Other than that, all I can suggest is to go back to the usual module method, unless you are willing and able to debug the kernel.

 

I reverted to using modules, but will try to set it up in the future. Thanks for your help!

----------

## FRIGN

 *PaulBredbury wrote:*   

> Nope. Did you change the kernel version, when you recompiled? Maybe 3.7.1 has ALSA bugs.
> 
> Other than that, all I can suggest is to go back to the usual module method, unless you are willing and able to debug the kernel.

 

Just a little, very pleasant update:

I finally got it to work by upgrading from 3.7.1-gentoo to 3.7.2-vanilla after reading about many similar problems concerning ALSA in Linux 3.7.x and many rants about how buggy this release was and experiencing problems (missing symbols) with the applesmc-sensor-driver.

I won't complain about this fact, because it is one of the things I have to cope with living on the bleeding edge with ~amd64.

On the contrary, finding out about those things is a very exciting and informative thing to do IMHO and it just doesn't get boring  :Wink: .

Talking about my computer, which is a Macintosh: Whenever I look back at the times I was inexperienced enough to compare OS X with Linux, I realize the situation changed fundamentally in the last few years: OS X (Mountain) Lion turns out to be so unstable and buggy, that I experience fewer problems using GNU/Linux these days.

This is an achievement the entire FOSS-community should be proud of, especially when we consider the broad range of hardware supported out of the box!

Best regards

FRIGN

----------

## FRIGN

Marked as solved.

----------

