Human Readable   

 

     
   
     

A Slackware Desktop Enhancement Guide

Configuring Sound

© Copyright Darrell Anderson.

A common request by many new Slackware users is to configure sound. For many users the solution is simple and straightforward. Slackware is packaged with the Advanced Linux Sound Architecture (ALSA).

  1. Obtain root privileges, either by logging in as root or obtaining access through the su (substitute user) command.
  2. Verify that /etc/rc.d/rc.alsa is executable.

    • From within a GUI use the file manager to modify the executable (x) bits.
    • From the command line, type chmod +x /etc/rc.d/rc.alsa.
  3. Verify that you installed the alsa-utils package. That package is contained in the Slackware /ap series. Use pkgtool to verify that the ALSA package is installed.
  4. From the command line, run /usr/sbin/alsaconf.
  5. Run /usr/sbin/alsamixer. Unmute any levels and adjust the volume levels as desired.
  6. Run /usr/sbin/alsactl store.

Running alsaconf will modify the /etc/modules.conf file. A typical entry will look like this:

# --- BEGIN: Generated by ALSACONF, do not edit. ---
# --- ALSACONF version 1.0.7 ---
alias char-major-116 snd
alias char-major-14 soundcore
alias sound-service-0-0 snd-mixer-oss
alias sound-service-0-1 snd-seq-oss
alias sound-service-0-3 snd-pcm-oss
alias sound-service-0-8 snd-seq-oss
alias sound-service-0-12 snd-pcm-oss
alias snd-card-0 snd-sbawe
alias sound-slot-0 snd-sbawe
# --- END: Generated by ALSACONF, do not edit. ---

Running alsactl store is important to create a permanent configuration file at /etc/asound.state. Without that configuration file you likely will have to repeat this process every boot.

Additionally, be sure to run an appropriate sound mixer device from within your GUI. For KDE that tool is KMix.

Remember to plug in your speakers!

You can test ALSA without booting into X. Determine the location of a wave file and then from the command line type:

aplay /location/of/the/wave/file

Troubleshooting is beyond the scope of this short How-To, but after performing the previous steps a common malady is with on-board sound chips. Sometimes those kernel modules need to be added to the hotplug blacklist. Additionally, although Slackware and ALSA works fine with most standard sound cards, you might need to download some additional modules from the ALSA web site.

Caveats: Every time you update Slackware and the new release includes an updated ALSA package, you need to reconfigure sound. Dumb, yes, but that’s the way things are. Similarly, if you change from the 2.4.x series of kernels to the 2.6.x series, or vice-versa, you need to install the ALSA package for that series. Lastly, if you begin experimenting with compiling the kernel, know that the process of updating the kernel modules will delete the /lib/modules/linux/kernel/drivers/sound directory. That means you will need to reinstall the ALSA package. Dumb, yes, but that’s the way things are.

Finis.

Table of Contents