251 lines
7.7 KiB
HTML
251 lines
7.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>Alsa-sound-mini-HOWTO: How to install ALSA sound drivers</TITLE>
|
|
<LINK HREF="Alsa-sound-5.html" REL=next>
|
|
<LINK HREF="Alsa-sound-3.html" REL=previous>
|
|
<LINK HREF="Alsa-sound.html#toc4" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Alsa-sound-5.html">Next</A>
|
|
<A HREF="Alsa-sound-3.html">Previous</A>
|
|
<A HREF="Alsa-sound.html#toc4">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s4">4. How to install ALSA sound drivers</A></H2>
|
|
|
|
<P>
|
|
<P>
|
|
<H2><A NAME="ss4.1">4.1 What you need</A>
|
|
</H2>
|
|
|
|
<P>
|
|
<P>
|
|
<UL>
|
|
<LI>a functional Linux system (e.g. the Slackware distribution), with the "Development"
|
|
packages installed (i.e. gcc, make etc.)</LI>
|
|
<LI>some knowledge about Linux (meaning you know how to use "ls", "cd", "tar"
|
|
etc.)</LI>
|
|
<LI>a root-account</LI>
|
|
</UL>
|
|
|
|
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).
|
|
<P>If you have a PnP card, you will also need:
|
|
<UL>
|
|
<LI>the isapnptools software package.</LI>
|
|
</UL>
|
|
|
|
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.
|
|
<P>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.
|
|
<P>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.
|
|
<P>
|
|
<H2><A NAME="ss4.2">4.2 Getting the drivers</A>
|
|
</H2>
|
|
|
|
<P>The ALSA drivers are available from
|
|
<A HREF="ftp://ftp.alsa-project.org/pub/">ftp://ftp.alsa-project.org/pub/</A>
|
|
and there are mirrors at
|
|
<UL>
|
|
<LI>US:
|
|
<A HREF="ftp://ftp.silug.org/pub/alsa">ftp://ftp.silug.org/pub/alsa</A></LI>
|
|
<LI>US:
|
|
<A HREF="ftp://ftp.eecs.umich.edu/pub/linux/alsa">ftp://ftp.eecs.umich.edu/pub/linux/alsa</A></LI>
|
|
<LI>Netherlands:
|
|
<A HREF="ftp://linux.a2000.nl/alsa">ftp://linux.a2000.nl/alsa</A></LI>
|
|
<LI>Poland:
|
|
<A HREF="ftp://ftp.task.gda.pl/pub/linux/misc/alsa">ftp://ftp.task.gda.pl/pub/linux/misc/alsa</A></LI>
|
|
<LI>Germany:
|
|
<A HREF="ftp://ftp.tu-clausthal.de/pub/linux/alsa">ftp://ftp.tu-clausthal.de/pub/linux/alsa</A></LI>
|
|
<LI>Slovakia:
|
|
<A HREF="ftp://ftp.phacka.sk/pub/alsa">ftp://ftp.phacka.sk/pub/alsa</A></LI>
|
|
<LI>Australia:
|
|
<A HREF="ftp://ftp.suburbia.com.au/pub/alsa">ftp://ftp.suburbia.com.au/pub/alsa</A></LI>
|
|
</UL>
|
|
<P>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
|
|
<P>
|
|
<H2><A NAME="ss4.3">4.3 ALSA versions</A>
|
|
</H2>
|
|
|
|
<P>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).
|
|
<P>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.
|
|
<P>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).
|
|
<P>
|
|
<H2><A NAME="ss4.4">4.4 Extracting</A>
|
|
</H2>
|
|
|
|
<P>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:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
cd /usr/src
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
tar -zxf ~/alsa-driver-0.4.1e.tar.gz
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
tar -zxf ~/alsa-lib-0.4.1d.tar.gz
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
tar -zxf ~/alsa-utils-0.4.1.tar.gz
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
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.
|
|
<H2><A NAME="ss4.5">4.5 Compiling</A>
|
|
</H2>
|
|
|
|
<P>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:
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
cd alsa-driver-0.4.1e
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
(and for those not so experienced: try typing a <tab> (the "tab"-key)
|
|
after "alsa-d". That's called <I>command line completion</I>.)
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
./configure
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
If you want to use the built-in PnP interfacing, you should use
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
./configure --with-isapnp=yes
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
make
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
Now you need to be 'root' to install the stuff (you probably were "root"
|
|
already)
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
make install
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
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
|
|
<CODE>make menuconfig</CODE>. (Actually, <CODE>make symlinks</CODE> may be enough).
|
|
Now compile the libraries:
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
cd ../alsa-lib-0.4.1d
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
./configure
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
make
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
make install
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
OK, you're getting it, the utilities:
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
cd ../alsa-utils-0.4.1
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
./configure
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
make
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
make install
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
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.
|
|
<H2><A NAME="ss4.6">4.6 Preparing the devices</A>
|
|
</H2>
|
|
|
|
<P>There is a script in the driver-directory that will install the ALSA-sound-devices
|
|
in your /dev directory. Type
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
./snddevices
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
|
|
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).
|
|
<P>Now you're ready to insert the driver, so please turn over to the next
|
|
paragraph.
|
|
<HR>
|
|
<A HREF="Alsa-sound-5.html">Next</A>
|
|
<A HREF="Alsa-sound-3.html">Previous</A>
|
|
<A HREF="Alsa-sound.html#toc4">Contents</A>
|
|
</BODY>
|
|
</HTML>
|