6. Other Devices

6.1. Sound

6.1.1. Kernel Configuration

In the 2.6.29 kernel, everything you need is actually compiled in by default. But alsaconf from ALSA utilities expects some stuff to be compiled as modules. I didn't bother to find a way to get around this, and instead simply compiled the necessary stuff as a module:

Device Drivers  --->
<*> Sound card support  --->
    <*> Advanced Linux Sound Architecture  --->
        ...
        <*> OSS Mixer API
        [*]   OSS PCM (digital audio) API - include plugin [sic!] system
        <*> OSS Sequencer API
        ...
        [*] Support old ALSA API
        ...
        [*] PCI sound devices  --->
            ...
            <M> Intel HDA Audio  -->
                [*] Build hwdep interface for HD-audio driver
                [ ]  Allow dynamic codec reconfiguration (EXPERIMENTAL)
                [ ] Support digital beep via input layer
                [*] 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 NVIDIA HDMI HD-audio codec support
                [*] Build INTEL 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

This looks a little like a debianesque christmas tree kernel configuration. You can experiment with different code support but this setup works. In any case, be sure to build the "Intel HDA Audio" driver as a module!

It is probably a good idea to also disable the obsolete OSS layer in favor of ALSA:

Device Drivers  --->
<*> Sound card support  --->
    <*> Advanced Linux Sound Architecture  --->
    < > Open Sound System (DEPRECATED)  -->

Compile the new kernel, install it, and reboot.

6.1.2. ALSA Configuration

Make sure that you have alsa-utils merged and run alsaconf as root:

# emerge --update alsa-utils
# alsaconf

You can safely ignore a warning "modinfo: could not find module snd". I think that the problem is caused by alsaconf assuming that most of the sound architecture has been built as a module. However, if that is not the first time that you configure your sound system, shut down all applications that use the sound system.

Unless you want to re-configure your sound configuration whenever you use it, you should make the configuration persistant:

# rc-update add alsa boot

You should add the init script to the boot runlevel, not to default!

Important: Every user that is supposed to use the sound device (what about yourself?) must be member of the group "audio"! This is often overlooked and hard to debug because the vast majority of multimedia applications have very poor error reporting practice.

6.1.3. Troubleshooting

If alsaconf complains "No supported PnP or PCI card found. Would you like to probe legacy ISA sound cards/chips?", there are basically two possibilities. Either you haven't configured your kernel to compile the sound card/chip driver as a module (see above), or you did not compile any driver for your device. Check your kernel configuration.

Sound works for root but not for other users? Make sure that the user that tries to access the sound system is member of the group "audio" (see above).

Your system hangs during shut down, and the last thing you see is "Unloading ALSA modules"? See Gentoo bug 253535. Setting UNLOAD_ON_STOP to "no" in /etc/conf.d/alsasound will probably fix it.

TuxMobil - Linux on Laptops, Notebooks, PDAs and Mobile Phones