LinuxDevCenter.com
oreilly.comSafari Books Online.Conferences.

advertisement


Finding and Installing Drivers

by Dave Phillips
05/17/2001

The specific CPU architecture addressed throughout this article is the Intel x86 series (and its competition from AMD and Cyrix). My apologies to interested readers running other Linux systems, and I would be happy to hear of your experience if you are running Linux sound drivers on systems such as LinuxPPC and 64-bit machines.

Finding the Right Driver

Drivers for many soundcards and audio chipsets are included with the regular Linux kernel sources. More cards and more features are supported by the driver packages from ALSA and 4Front (OSS/Linux). These three are the main sources of Linux soundcard drivers. A few other independently maintained drivers are listed on the Linux Music and Sound Applications site, and a very few manufacturers offer native Linux drivers of their own making.

If you're lucky your soundcard was detected automatically by your distribution's hardware probe, and if you're even luckier the distribution will install and configure the correct driver for you. In many cases, your card may be correctly identified, but the configuration routine may prompt you for more information, so be sure to keep the card's documentation handy.

The Kernel Modules

If you plan to use the kernel sound driver, read the documentation in /usr/src/linux/Documentation/sound, or run one of the kernel configuration scripts ('make [config|menuconfig|xconfig]') and study the selections and help files in the sound configuration section. Kernel developer Alan Cox sporadically maintains Linux Sound System, an information page that includes a listing of cards and chipsets supported by the kernel modules; unfortunately, it is out of date and does not include information for the sound system in kernels beyond the 2.2.x series. More information about using the kernel modules is occasionally available on the linux.dev.sound newsgroup.

 
Figure 1: Configuring the kernel sound system with xconfig  

Most modern Linux distributions include sound configuration utilities for managing the kernel sound modules. Red Hat's sndconfig is a typical sound system utility, detecting PnP (Plug and Play) and PCI cards or presenting a list of supported cards if no card is detected. The user acknowledges or makes the proper selection, sndconfig responds by prompting for any special information, the user completes the configuration, and the utility plays a short soundfile to verify a successful installation. Similar sound configuration tools are found in the SuSE and Mandrake distributions. Check your distribution's documentation for the name of your sound system configuration utility, then run it to see if your card or chipset is listed.

 
Figure 2: Red Hat's sndconfig detects my SB Live  

ALSA

The ALSA project maintains a well-organized soundcard matrix with listings by vendor, product name, and chipset. The recommended ALSA driver is also indicated. If your card is listed in the matrix, you may want to try the ALSA driver. The ALSA project has many virtues, including a very active community of users and developers. The drivers are free and open source, and a wide variety of cards and chipsets are supported. Drivers, libraries, and utilities must be compiled and installed locally (which may require root privileges). Installation and configuration can be tricky at times, although I had no problems with the recent drivers for my SBLive Value and my SB PCI128. As it nears the 1.0 release ALSA is a fast-moving target, but I must emphasize that the user community is very active and helpful. If you have trouble with your ALSA setup, someone on the users mailing list should be able to lend a helping hand.

OSS/Linux

4Front Technologies maintains a list of soundcards and chipsets supported by the company's commercially available OSS/Linux drivers. Check that list to see if your card is included; if it is, you can try OSS/Linux by downloading 4Front's limited-time demo package. The drivers are binary-only (sorry, no source code here); you install them by using 4Front's excellent soundconf utility, a straightforward text-based program that lets you easily install and uninstall the drivers, enable and disable card capabilities, and manage complex multiple card setups.

 
Figure 3: Selecting a soundcard with OSS/Linux soundconf  

Other Sources

Very few companies supply native Linux drivers for their soundcards, but the notable exception is Creative Labs. They have generously released the source code for their popular SBLive under the GPL, and development of a native driver has been steady and fruitful. Please see the Creative Open Source page for more information regarding the current availability and development status of the SBLive driver.

Aureal also ventured into the native Linux driver development world, supplying users with mixed binary/source drivers for their popular Vortex chipsets. Alas, Aureal no longer exists, though independent work on the drivers continues at the Linux Aureal Driver site on SourceForge.

The Zefiro ZA2 is a somewhat dated ISA digital audio card with some nice features, including the company's support for Linux driver developers. Peter Wahl has written a driver and control panel for the ZA2 available from his ZA2 Driver for Linux page. Peter has also written an alpha ZA2 driver for ALSA, but the current version is compatible only with the API for the ALSA 0.5.x release series.

What If ...

If your card is supported by one or another of the preceding sources, you should have little or no difficulty with the installation and configuration procedures. Things may become more difficult if your situation falls into one of these scenarios:

• You want to replace an existing card with a new one.

In this case, if you're lucky you can simply take out the old card, put in the new one, reboot and let your distribution's hardware probe detect the change in your system. However, your luck will depend on how well you do your initial homework, so check for Linux support before you purchase the new board (or any new hardware for a Linux system).

•You have a card you want to install, but you have no documentation for it.

This can usually be resolved by searching for a tech support section on the manufacturer's site. You may be able to order a new set of docs, or you might find an online manual. Failing either of those solutions, use Google or Deja search engines to find other people who own the same card and ask for assistance. Although it's unlikely to contain Linux-specific information, the card's documentation may contain everything you need to know in order to identify the correct Linux driver for your card. Many audio chipsets appear on a variety of differently named cards, and you should know the names of the audio chipset and the card itself. That information should be found in your card's documentation; if it isn't (or if you have no documentation), you must search the card for any product identification and to find what chipsets are used.

•You have a card installed but your present kernel has no sound support and you need to recompile it with the sound system enabled.

This scenario presents no real difficulty. Simply enable sound support during the kernel configuration and specify the correct driver module for your soundcard (if you want to use the kernel sound modules; make no selection if you intend to use the ALSA driver). Complete the kernel configuration and compiling process, reboot, then configure the sound system as needed.

•You can't get the performance you desire from the current driver and want to try another one.

The Linux Soundcard Driver

Introduction

Inside the Driver

The Future of Linux Audio Driver Support

This is potentially the trickiest scenario to manage. Each of the available driver packages maintains a different presence in your system startup and filesystem. If your existing driver is modular you can simply remove it from /lib/modules/linux-version/sound; however, if the driver is hardcoded into the kernel you will to recompile the kernel for modular sound support. You must have a kernel set up for modular sound if you want to use the ALSA drivers (just don't select any specific driver when configuring the kernel). The 4Front package installation routine can be directed to uninstall any kernel sound modules (but not ALSA modules) before installing OSS/Linux; a reboot is not required.

•You have a laptop/notebook, it has a soundchip, and you don't know much more than that.

Take a look at the Linux On Laptops and Sound Card Support for Linux with Laptops sites. Both indicate Linux sound support for specific laptops and chipsets; driver recommendations and configuration instructions can also be found on those pages. I was pleasantly surprised to see how many laptops and notebooks will work with Linux, but the surprise is mixed. Indeed, many laptops can be configured for Linux sound; unfortunately it can be a difficult and frustrating task. Nevertheless, Linux laptop sound support has seen great improvement in the last few years, and the recommended web sites keep up with the evolving status of Linux laptop and notebook audio support.

Pages: 1, 2

Next Pagearrow




Linux Online Certification

Linux/Unix System Administration Certificate Series
Linux/Unix System Administration Certificate Series — This course series targets both beginning and intermediate Linux/Unix users who want to acquire advanced system administration skills, and to back those skills up with a Certificate from the University of Illinois Office of Continuing Education.

Enroll today!


Linux Resources
  • Linux Online
  • The Linux FAQ
  • linux.java.net
  • Linux Kernel Archives
  • Kernel Traffic
  • DistroWatch.com


  • Sponsored by: