Saturday, June 30, 2007

Troubleshooting Linux Audio, Part 1

I have a friend who has had nothing but nightmares result from his attempts at setting up the fabled low-latency high-performance Linux audio system. In sympathy with his plight I present here a primer in three parts for troubleshooting common and uncommon problems with the Linux sound system. Parts 1 & 2 will present programs used to analyze and configure your audio setup. Part 3 will list the most frequently encountered problems along with their suggested solutions.

This week, Part 1 introduces some useful system analysis tools and utilities with graphic user interfaces.

First Steps

The Linux audio system is a complex beast, and ALSA is its beating heart. Well, it's supposed to be, but what do you do when it's not beating ?

First, consider the critical parts of a typical computer sound system. Three main stages exist for possible malfunction :

1. Connections between soundcard and external equipment.
2. The soundcard and its configuration.
3. Your system software configuration.

Stage 1 should be checked for proper connections, power status, cable integrity, and other hardware aspects. Consumer-grade sound devices usually provide poor-quality connectors, though some cards from Creative include more durable connection points on their "Live Drive" control panels. If your external equipment includes an amplifier or powered speakers, be sure the power is turned on (and double-check those flimsy connectors between speakers). Cords and cables can be damaged easily, causing static-like noise and other discontinuities in the sound, and their connectors should be solidly attached. You don't need to buy cables with gold-plated hardware, but you should avoid cheap cords with molded plastic connectors. Remember, your audio system is a chain of parts, and like any chain it's only as strong as its links. Avoid weak links.

The soundcard itself may cause audio problems if it is not seated completely in its slot. It may also be a noise source if placed next to certain video or network cards. I'll discuss card and system configuration details later in this article, but first I have some advice to help you avoid some predictable problems.

Doing It Right The First Time

I can't over-emphasize the need to do your homework before purchasing hardware for audio with Linux. If you're coming from Windows into the Linux audio world you must not assume that your equipment will be supported. For that information your first stop should be the new & improved ALSA Soundcard Matrix, and if you can't find what you need there you should proceed to the LAU mail-list and its archives. These steps are increasingly necessary as Linux itself broadens support for USB, Firewire, and other i/o devices and protocols. For the most up-to-date information on recommended (and not-so-recommended) hardware, search the LAU archives and ask on the mail-list.

Typical recommendations for professional-quality audio work include the RME Hammerfall and the M-Audio Delta systems. However, potential buyers are well-advised to ask on the LAU list before purchasing any hardware, even the recommended items. Sensitive points include firmware versions, preamp requirements, available sample rates, and so forth.

ALSA supports a greater variety of consumer-grade cards, so recommendations are easier to make. Most cards from Creative Labs are well-supported, though again I also advise checking the ALSA Soundcard Matrix and the LAU mail-lists for current reports on your potential purchase.

USB audio devices are generally supported if they are truly standards-compliant. The LAU mail-list archive contains some valuable threads regarding USB devices and their performance under Linux, it won't hurt to consult the archive before buying a USB sound device. Firewire support has only recently come to the Linux audio world, thanks primarily to the work of the FFADO (formerly FreeBOB) project. Consult the FFADO Web site and the LAU list for current usability reports.

On-board desktop and laptop chipsets are generally not recommended for serious recording, at least not for multitrack/multichannel CD-quality digital audio I/O. They may be desirable for audio features for CD/DVD playback, but they are not sufficiently robust for serious audio production. The hda_intel chipsets are especially prone to difficulties; see the LAU archive for details regarding that and other fractious laptop & notebook audio chipsets.

Tools & Utilities: GUI

The Windows Control Panel has been a mixed blessing for users, but it does succeed at putting a lot of information about your system into one handy utility. Linux per se does not provide such a utility, but many Linux distributions and desktop environments now supply some kind of GUI for investigating and configuring your system and its various devices. For example, openSUSE includes yast ("yet another system tool"), an excellent utility that reports a wealth of detail regarding your machine and its operating system.

The screenshots in Figures 1 through 4 indicate the breadth and depth of information and control available from yast. Figure 1 shows off the yast (yast2, actually) GUI. The left-hand panel lists the general categories, and each category displays its own set of available devices and services. Figure 2 displays the results from selecting the Hardware category and then clicking on the Hardware Information icon. Figure 3 shows the same panel with the sound device information fully revealed.

More... http://www.linuxjournal.com
Source : http://www.linuxjournal.com

0 comments: