Welcome to Linux Knowledge Base and Tutorial
"The place where you learn linux"
Let The Music Play: Join EFF Today

 Create an AccountHome | Submit News | Your Account  

Tutorial Menu
Linux Tutorial Home
Table of Contents

· Introduction to Operating Systems
· Linux Basics
· Working with the System
· Shells and Utilities
· Editing Files
· Basic Administration
· The Operating System
· The X Windowing System
· The Computer Itself
· Networking
· System Monitoring
· Solving Problems
· Security
· Installing and Upgrading
· Linux and Windows

Glossary
MoreInfo
Man Pages
Linux Topics
Test Your Knowledge

Site Menu
Site Map
FAQ
Copyright Info
Terms of Use
Privacy Info
Disclaimer
WorkBoard
Thanks
Donations
Advertising
Masthead / Impressum
Your Account

Communication
Feedback
Forums
Private Messages
Surveys

Features
HOWTOs
News Archive
Submit News
Topics
User Articles
Web Links

Google
Google


The Web
linux-tutorial.info

Who's Online
There are currently, 266 guest(s) and 0 member(s) that are online.

You are an Anonymous user. You can register for free by clicking here

  

HOWTO Home

Current HOWTO: Alsa-sound-mini-HOWTO


Alsa-sound-mini-HOWTO: How to install ALSA sound drivers Next Previous Contents

4. How to install ALSA sound drivers

4.1 What you need

  • a functional Linux system (e.g. the Slackware distribution), with the "Development" packages installed (i.e. gcc, make etc.)
  • some knowledge about Linux (meaning you know how to use "ls", "cd", "tar" etc.)
  • a root-account
The great thing is: you don't need a supported sound card anymore, as ALSA now has a dummy driver that does nothing! (No, it really does nothing, but some programs will work now that they believe there is a sound card available).

If you have a PnP card, you will also need:

  • the isapnptools software package.
The INSTALL text in the driver directory suggests that for some cards, PnP support is native. I also received a suggestion from Jaroslav about this. When I get further information about this topic I will add it to this mini-HOWTO.

Please note that you should not have any sound drivers active when you want to use the ALSA drivers. If you have a kernel with sound drivers compiled in, you'll need a kernel recompilation. If you have the old "sound.o" module active, you need to deactivate it. If you use kerneld, this probably means deleting sound.o from the /lib/modules/<kernel_version>/misc directory. Newer RedHat systems have a different sound approach, with several sound modules active. You need to deactivate them all.

The 2.2 series kernel has a new approach to sound. You should include sound support here ! Yep, that's right: you add sound support to the kernel, but do not include any sound card. Then compile and install the kernel and after that, compile the ALSA-drivers.

4.2 Getting the drivers

The ALSA drivers are available from ftp://ftp.alsa-project.org/pub/ and there are mirrors at

For a fully functional ALSA-installation, you will need the driver, the libs and the utilities; e.g if you chose the A2000 mirror you would get ftp://linux.a2000.nl/alsa/driver/alsa-driver-0.4.1e.tar.gz, ftp://linux.a2000.nl/alsa/lib/alsa-lib-0.4.1d.tar.gz and ftp://linux.a2000.nl/alsa/utils/alsa-utils-0.4.1.tar.gz

4.3 ALSA versions

The ALSA drivers have come a long way. Development started during the 2.0 version kernel, then the 2.2 series showed up (with their own sound kernel).

As the 0.4 versions work perfectly for me, I think it is safe to use 0.4.1e (or newer, if you want). If you have a 2.0.x kernel, you will definately not want to use 0.3.0 or later. Instead, use alsa-driver-0.3.0-pre4, alsa-lib-0.3.0-pre4 and alsa-utils-0.3.0-pre3.

The older versions, 0.2.0-pre10p3 and older do work under 2.0.x, but I cannot get them to work under 2.2.x (probably due to the lack of interfacing with the soundcore module of the kernel).

4.4 Extracting

You extract the drivers by some reasonable command, like the all-time tar -zxf <file>. Most likely you would do that in the /usr/src directory, so you need root priviliges for this. Type ``su'' and then the root password to become root. But please note: it is unwise to use your system as the ``root'' user if it is not necessary. So:

cd /usr/src

tar -zxf ~/alsa-driver-0.4.1e.tar.gz

tar -zxf ~/alsa-lib-0.4.1d.tar.gz

tar -zxf ~/alsa-utils-0.4.1.tar.gz
Also working and more fun: find ~ -name alsa* -exec tar -zxf {} \; (Don't try this at home kids, it's just an example). Note that when downloading the drivers with Netscape, you may accidentally get unpacked drivers with a ".tgz" extension. If tar complains about the file format, you may get better results by leaving off the "z" in the tar options.

4.5 Compiling

You need the drivers before you can compile and use the libs. You need the libs before you can compile or use the utils. So let's begin:

cd alsa-driver-0.4.1e
(and for those not so experienced: try typing a <tab> (the "tab"-key) after "alsa-d". That's called command line completion.)
./configure
If you want to use the built-in PnP interfacing, you should use
./configure --with-isapnp=yes

make
Now you need to be 'root' to install the stuff (you probably were "root" already)
make install
If this tells you that something like ``version.h'' cannot be found, then you probably do not have a proper kernel source tree. You need a couple of files of your kernel source to be able to compile the ALSA-drivers. Unpack your favorite linux-2.x.y.tar.gz in /usr/src, and issue a make menuconfig. (Actually, make symlinks may be enough). Now compile the libraries:
cd ../alsa-lib-0.4.1d

./configure

make

make install
OK, you're getting it, the utilities:
cd ../alsa-utils-0.4.1

./configure

make

make install
Note: you can leave out the "make install" for the utilities at first. You could even leave out the whole library-making and utility-making, just to check if the driver works.

4.6 Preparing the devices

There is a script in the driver-directory that will install the ALSA-sound-devices in your /dev directory. Type

./snddevices
from the driver-directory. There should be a /dev/snd subdirectory now (test if it is there. If you are not familiar with even the "ls" command, please consider reading other HOWTO's first. You should have some basic Linux knowledge to install these drivers).

Now you're ready to insert the driver, so please turn over to the next paragraph.


Next Previous Contents

The Linux Tutorial completely respects the rights of authors and artists to decide for themselves if and how their works can be used, independent of any existing licenses. This means if you are the author of any document presented on this site and do no wish it to be displayed as it is on this site or do not wish it to be displayed at all, please contact us and we will do our very best to accommodate you. If we are unable to accommodate you, we will, at your request, remove your document as quickly as possible.

If you are the author of any document presented on this site and would like a share of the advertising revenue, please contact us using the standard Feedback Form.


  




Login
Nickname

Password

Security Code
Security Code
Type Security Code


Don't have an account yet? You can create one. As a registered user you have some advantages like theme manager, comments configuration and post comments with your name.

Help if you can!


Amazon Wish List

Did You Know?
You can choose larger fonts by selecting a different themes.


Friends



Tell a Friend About Us

Bookmark and Share



Web site powered by PHP-Nuke

Is this information useful? At the very least you can help by spreading the word to your favorite newsgroups, mailing lists and forums.
All logos and trademarks in this site are property of their respective owner. The comments are property of their posters. Articles are the property of their respective owners. Unless otherwise stated in the body of the article, article content (C) 1994-2013 by James Mohr. All rights reserved. The stylized page/paper, as well as the terms "The Linux Tutorial", "The Linux Server Tutorial", "The Linux Knowledge Base and Tutorial" and "The place where you learn Linux" are service marks of James Mohr. All rights reserved.
The Linux Knowledge Base and Tutorial may contain links to sites on the Internet, which are owned and operated by third parties. The Linux Tutorial is not responsible for the content of any such third-party site. By viewing/utilizing this web site, you have agreed to our disclaimer, terms of use and privacy policy. Use of automated download software ("harvesters") such as wget, httrack, etc. causes the site to quickly exceed its bandwidth limitation and are therefore expressly prohibited. For more details on this, take a look here

PHP-Nuke Copyright © 2004 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.53 Seconds