Diagnosing and Fixing Sound Problems

Some Linux distributions, including Mandrake, Red Hat, and SuSE, attempt to detect and configure sound drivers upon system installation. Unfortunately, these attempts often fail. Desktop environments for such distributions sometimes include links to GUI utilities for configuring the sound card, but these tools seldom fare any better than the install-time detection and configuration. The result is that, if you don't get sound when you first start Linux, you'll almost certainly have to dig into the configuration files for sound modules, or perhaps even recompile your Linux kernel, as described in Chapter 15.

Before taking these drastic measures, though, you should take a few diagnostic steps. The most important of these steps relate to the presence of appropriate audio driver modules. Review the earlier section, "Taming Hardware via Drivers," and try installing drivers for your sound card using insmod or modprobe. If this step works and sound begins working, review your /etc/modules.conf file to be sure it includes appropriate alias lines for your hardware.

Be sure that /etc/modules.conf includes lines not just for the final sound driver, but for all those upon which it depends. Some sound card drivers depend upon many layers of sound-related drivers. This feature is particularly common with the Advanced Linux Sound Architecture (ALSA) drivers, which are described in more detail in the upcoming section, "ALSA Drivers."

Another common sound problem lies in mixer settings. A mixer is a tool that adjusts the volume of the various inputs and outputs on a sound card. It's possible that your system's sound drivers are loaded and working but that you're getting no sound because the mixer levels are set very low or the output channel is muted. Two common GUI mixers are KMix and GNOME Volume Control, which come with KDE and GNOME, respectively. Figure 1.5 shows the GNOME Volume Control mixer. Different sound cards and drivers support different inputs and outputs, so yours may not exactly match those shown the figure. The leftmost pair of sliders adjusts the master volume, and the other sliders adjust specific inputs and outputs. Be sure all levels are set high enough that they generate output and that the master, PCM, and any other levels are not muted. Similarly, be sure your speakers are plugged in, turned on, and (if applicable) that their volume knobs are set high enough for them to produce sound.

Figure 1.5: Mixers provide the means to adjust the volume coming from a sound card.

If you get output when you play a sound, but if it's too fast, too slow, or an obnoxious screech, it's likely that you're trying to play an audio file using a program that doesn't support the specific audio type. For instance, the audio player may not support the encoding bit rate, and so will play the sound back too fast or too slow. Try another program to play back the file; or if it's a test file, try another file, preferably from a different source. Sometimes, such problems can be caused by driver deficiencies. Switching drivers, as described in the next section, "When Standard Drivers Aren't Enough," may fix the problem.

0 0

Post a comment