Advanced Linux Sound Architecture drivers Debian-specific README file Last updated: 13 October 2005 During the installation of the alsa-source package you should have been asked several questions about build options for the modules. If you didn't get asked those questions or if you would like to review them then run 'dpkg-reconfigure alsa-source' as root. To see the result, look in /etc/alsa/alsa-source.conf. Before continuing, be sure you have the fakeroot utility installed $ sudo apt-get install fakeroot and that you have appropriate kernel sources available. You can use a stock Linux kernel source tree, a Debian 2.4-kernel headers tree, $ sudo apt-get install kernel-headers-2.4.27-2-k7 a Debian (or Ubuntu) 2.6-kernel headers tree, $ sudo apt-get install linux-headers-2.6.12-1-686 or a Debian kernel source tree $ sudo apt-get install linux-source-2.6.12 for this purpose. In the latter case you have to extract the tree from the tarball included in the package and you may have to configure the sources first. Make sure that CONFIG_SOUND is defined in the source tree's .config file. This package (alsa-source) includes a tarball in /usr/src/ named 'alsa-driver.tar.bz2'. Extract the ALSA driver sources from it. $ cd /usr/src $ rm -rf modules/alsa-driver $ tar jxf alsa-driver.tar.bz2 To build the ALSA modules using make-kpkg, cd into the root of the headers or source tree that you have prepared and run make-kpkg. $ cd /usr/src/kernel-headers-2.4.27-2-k7 $ make-kpkg --rootcmd=fakeroot modules-image This will result in the creation of a Debian package in the parent directory of the headers/source tree. If you use a 2.6 headers tree then you may run into trouble because the files in the header tree are all owned by root:root and have no world write permission, whereas make-kpkg wants to write to some files in the tree. The best thing to do is make a working copy of the tree somewhere else $ cp -rpL /usr/src/linux-headers-2.6.12-1-686 /tmp and run make-kpkg there $ cd /tmp/linux-headers-2.6.12-1-686 $ make-kpkg --rootcmd=fakeroot modules-image $ cd $ rm -rf /tmp/linux-headers-2.6.12-1-686 If you find that the package is not generated with the correct version suffix (as seems to happen with Linux 2.6 header trees but not with Linux 2.4 trees) then you need to add the "--append-to-version" option to the command line. $ make-kpkg --rootcmd=fakeroot --append-to-version=-1-686 modules-image To build the ALSA modules _not_ using make-kpkg you can do something like this: $ cd /usr/src/modules/alsa-driver $ fakeroot debian/rules binary_modules KSRC=/usr/src/kernel-headers-2.4.27-1-k7/ KVERS=2.4.27-1-k7