next up previous
Next: Creating apt-enabled RedHat or Up: Appendixes that should not Previous: Recompiling the kernel rpms


Recompiling the alsa sound driver rpms

If you choose to use a different kernel than the one provided in the Planet CCRMA repository and want to install the alsa 0.9 sound driver anyway you have to rebuild the alsa rpms. The driver binary modules actually become part of the kernel when they are loaded so they have to be compiled with exactly the same options as the kernel (otherwise they will refuse to load).

NOTE: these instructions will only work unchanged if your kernel is installed from an rpm. If you have a custom built kernel and it is NOT an rpm then it will not be able to provide the dependencies that the alsa packages need and you will not be able to install them.

You have to have the kernel sources installed (or at least the headers for the kernel sources). They are needed for compiling the alsa-driver source rpm. Your kernel has to be compiled with module versioning enabled and has to have the kernel sound driver core module compiled as a module (the alsa driver use this module for the OSS emulation layer).

  1. download the alsa source rpms

  2. install the alsa source rpms. Use the normal rpm upgrade command to install the rpms:

    rpm -Uvh alsa-*ALSA_VERSION.src.rpm

    This will install the spec files in /usr/src/redhat/SPECS and the sources in /usr/src/redhat/SOURCES.

  3. compile and install the alsa driver. This will compile and then install the kernel binary modules for the kernel you are currently running and the alsa driver auxilliary files package. The driver packages have to be installed before the library can be compiled (the wildcards in the commands assume you only have one spec file around, otherwise substitute the proper version number).

    You have to build the alsa-driver packages with the proper kernel architecture. It must match the architecture of the kernel you want alsa to run on (which should probably be the kernel you are booted into now). So first find out what kernel version you are running:

    uname -r

    This will print the version and release of the kernel you are running. Now let's find the architecture of the kernel. If the kernel is a single processor kernel type (VERSION is the output of the uname command):

    rpm -q -qf "%ARCH" kernel-VERSION

    If the kernel is a multiprocessor kernel (the version ends in ``smp'') then type (VERSION is the output of the uname command without the trailing ``smp''):

    rpm -q -qf "%ARCH" kernel-smp-VERSION

    Anyway, the command should print either i386, i586, i686 or athlon, that is the architecture you should use for the build.

    After running the following command two binary rpms will be created, one containing the kernel modules and the other the rest of the driver files. Replace ``i686'' in the command below with the architecture of your target kernel:

    Note: if you are compiling the driver rpms for a regular redhat kernel set the variable ``buildforredhatkernel'' to 1 in the alsa-driver spec file before starting the rebuild process. Otherwise the alsa-kernel package will not have the proper dependencies and you will not be able to install it.

    cd /usr/src/redhat/SPECS
    rpmbuild -bb --target i686 alsa-driver-ALSA_VERSION.spec

    Now install the alsa kernel modules and driver packages for your kernel (change i386 in the command below to the architecture of your target kernel):

    rpm -Uvh ../RPMS/i386/alsa-kernel*ALSA_VERSION.i386.rpm ../RPMS/i386/alsa-driver*ALSA_VERSION.i386.rpm

  4. compile and install the alsa library.

    rpmbuild -bb alsa-lib-ALSA_VERSION.spec
    rpm -Uvh ../RPMS/i386/alsa-lib-ALSA_VERSION.i386.rpm

  5. compile and install the alsa utilities.

    rpmbuild -bb alsa-utils-ALSA_VERSION.spec
    rpm -Uvh ../RPMS/i386/alsa-utils-ALSA_VERSION.i386.rpm

  6. compile and install the alsa tools. (optional, at this point the rpm includes the envy24control control panel and several other utilities. Envy24control is very useful for tweaking the internals of the ice1712 chipset, use this for Midiman Delta or Terratec cards).

    rpmbuild -bb alsa-tools-ALSA_VERSION.spec
    rpm -Uvh ../RPMS/i386/alsa-tools-ALSA_VERSION.i386.rpm

  7. configure the alsa driver. Follow the directions in the previous section.


next up previous
Next: Creating apt-enabled RedHat or Up: Appendixes that should not Previous: Recompiling the kernel rpms

© Copyright 2001...2019 Fernando Lopez-Lezcano, CCRMA, Stanford University.
All rights reserved.