:: Setting up ALSA Drivers on RH 9.0 ::
HOME

Click Here for Comparison Chart for different VPN solutions


Setting up ALSA drivers on RH 9.0
  1. This receipe discusses the steps that I took to install the ALSA drivers on my RedHat 9.0 Linux System. The documentation that is provided on the ALSA website is not enough, in my opinion, and a few things need to be done before you can sail safely through getting the sound.
  2. If you are using Red Hat 9.0, the kernel which comes with it will probably have some EXTRAVERSION (for e.g. 2.4.20-13-9). It is not necessary to compile this kernel, since it most probably comes with soundcore module. Do a modinfo soundcore. If this returns some message:
    [shashank@mia alsa]# modinfo soundcore
    filename:    /lib/modules/2.4.20/kernel/drivers/sound/soundcore.o
    description: "Core sound module"
    author:      "Alan Cox"
    license:     "GPL"
    
    then you are safe, and you do not have to download/recompile the kernel. But I prefer to use the stock linux kernel, hence all the below instructions will apply to a stock kernel (v2.4.20). You can download this from www.kernel.org.
  3. After downloading the kernel, put it in /usr/src/ and untar/unzip it using tar -xvjf linux-2.4.20.tar.bz2. You will get a directory /usr/src/linux-2.4.20. Make a link to this directory using the following command:
    #>ln -s /usr/src/linux-2.4.20 /usr/src/linux
    
  4. Now start compiling the kernel. I have mentioned the detailed instructions here, but you need to make a few changes in some steps.
    #>cd /usr/src/linux-2.4.20
    #>make clean; make mrproper
    #>cp /boot/config-2.4.20-13.9 .config
    #>make menuconfig
    
    Turn off the following option (If you want to have philips camera too. In my case, i had)
    
    Loadable Module Support --> Set Version Information on All module Symbols
    sound --> Sound Card Support
    
    (I have also kept everything else as Modules, as my camera refused to work for some unknown reasons.)
    In addition check if the following options are selected. (Most probably they are)
    USB support --> Support of USB
                --> UHCI (Intel PIIX4, VIA, ...)
                --> USB Audio support
                --> USB Philips Cameras
    
    Then complete the final step as :
    #>make dep; make bzImage; make modules; make modules_install; make install
    
    When the compilation is complete, reboot the system in the new kernel (2.4.20).
  5. The first thing to do now is to identify the sound card that you have. In my case, I had a sound card integrated on my motherboard. However an lspci -vvv command will give u much detail of your sound card.
    #>lspci -vvv
    --SNIP--
    00:1f.5 Multimedia audio controller: Intel Corp. 82801DB AC'97 Audio (rev 01)
            Subsystem: Dell Computer Corporation: Unknown device 0132
            Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
            Status: Cap+ 66Mhz- UDF- FastB2B+ ParErr- DEVSEL=medium TAbort- TAbort- MAbort- SERR- PERR-
            Latency: 0
            Interrupt: pin B routed to IRQ 3
            Region 0: I/O ports at e400 [size=256]
            Region 1: I/O ports at e080 [size=64]
            Region 2: Memory at ffaff800 (32-bit, non-prefetchable) [size=512]
            Region 3: Memory at ffaff400 (32-bit, non-prefetchable) [size=256]
            Capabilities: [50] Power Management version 2
                    Flags: PMEClk- DSI- D1- D2- AuxCurrent=375mA PME(D0+,D1-,D2-,D3hot+,D3cold+)
                    Status: D0 PME-Enable- DSel=0 DScale=0 PME-
    --SNIP--
    
    Thus from the above output you can see that I have an Intel Corp. 82801DB AC'97 Audio Controller. This information should be sufficient for installing alsa-drivers.
  6. Now make a directory /usr/src/alsa and copy the following script install.sh to that directory. Since this is a simple bash script, make appropriate changes to the version. I am using the latest version (0.9.4 at the time of this writing). NOTE: I am using --with-cards=intel8x0 while configuring the alsa-drivers.
    [shashank@mia alsa]# cat install.sh
    #!/bin/sh
    clear
    echo "Downloading alsa packages..."
    wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-0.9.4.tar.bz2
    wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-0.9.4.tar.bz2
    wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-0.9.4.tar.bz2
    wget ftp://ftp.alsa-project.org/pub/tools/alsa-tools-0.9.4.tar.bz2
    wget ftp://ftp.alsa-project.org/pub/oss-lib/alsa-oss-0.9.4.tar.bz2
    #exit 0
    echo 
    echo 
    echo "Making ALSA drivers" 
    echo 
    echo 
    tar -xjf alsa-driver*.tar.bz2 
    cd alsa-driver-* 
    ./configure --with-isapnp=no --with-sequencer=yes --with-oss=yes --with-cards=intel8x0 --with-debug=full 
    make 
    make install 
    ./snddevices 
    chmod 666 /dev/dsp* /dev/mixer* /dev/sequencer* /dev/midi* 
    cd .. 
    #find . -name alsa-driver\* -a -type d -exec rm -rf {} \; 
    exit 0
    
    echo 
    echo 
    echo "Making ALSA libraries" 
    echo 
    echo 
    tar -xjf alsa-lib*.tar.bz2
    cd alsa-lib* 
    ./configure 
    make 
    make install 
    cd .. 
    
    echo 
    echo 
    echo "Making ALSA OSS compatibility" 
    echo 
    echo 
    tar -xjf alsa-oss*.tar.bz2 
    cd alsa-oss* 
    ./configure 
    make 
    make install 
    cd .. 
    
    echo 
    echo 
    echo "Making ALSA tools" 
    echo 
    echo 
    tar -xjf alsa-tools*.tar.bz2 
    cd alsa-tools* 
    cd envy24* 
    ./configure 
    make 
    make install 
    cd ../as10k1 
    ./configure 
    make install 
    cd ../.. 
      
    
    echo 
    echo 
    echo "Making ALSA utilities" 
    echo 
    echo 
    tar -xjf alsa-utils*.tar.bz2
    cd alsa-utils* 
    ./configure 
    make 
    make install 
    cd .. 
    
    
  7. Install all the ALSA related stuff by using the command
    #/usr/src/alsa> sh -x ./install.sh
    
    It will take some time before everything is compiled.
  8. Now add the following lines to the /etc./modules.conf
    --SNIP--
    # ALSA portion
    alias char-major-116 snd
    alias snd-card-0 snd-intel8x0
    alias char-major-14 soundcore
    alias sound-slot-0 snd-card-0
    # card #0
    alias sound-service-0-0 snd-mixer-oss
    alias sound-service-0-1 snd-seq-oss
    alias sound-service-0-3 snd-pcm-oss
    alias sound-service-0-8 snd-seq-oss
    alias sound-service-0-12 snd-pcm-oss
    --SNIP--
    
    Now reboot the system.
  9. After the system comes back, run alsamixer. Now ummute the channels by increasing the sliders with the UP arrow and then pressing "m" to unmute them. Make sure that there are no "MM" symbols at the top of the silders
  10. Use aplay somefile.wav to verify that the sound is coming.
  11. Need to experiment more with gnomemeeting.

Comments and corrections are appreciated and can be sent to papers@mia.ece.uic.edu. Click here for ©opyright information.