Advanced Linux Sound Architecture

From ArchWiki
Revision as of 17:09, 23 July 2005 by Xerxes2 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

ALSA setup

This document tells how to get Alsa working with both the 2.4 and 2.6 kernels

Based on the Alsa Setup howto by Arjan Timmerman: http://www.soulfly.nl/~arjan/archlinux/alsa-setup.html with additional information: http://bbs.archlinux.org/viewtopic.php?t=2544 If you have a Dell computer equipped with a Creative Labs Sound Blaster Live! card, you will need to compile ALSA manually. CompilingALSA

Install Packages

  1. Required for both 2.4 and 2.6 kernels:
 <verbatim>
 # pacman -Sy alsa-lib alsa-utils
 </verbatim>
  1. Required for 2.4 kernels:
 <verbatim>
 # pacman -S alsa-driver
 # depmod -a
 </verbatim>
  1. Recommended but not required:
 <verbatim>
 # pacman -S alsa-oss
 </verbatim>

Note that the 'alsa-driver' package includes the necessary modules based on the Arch stock kernel! If you compiled your own 2.4 kernel, these will most likely not work, and you should compile a new 'alsa-driver' package with ABS while running your custom kernel, and install the resulting package instead.

Configure Alsa

Note: If hotplug detects your soundcard correctly, you don't need to load the modules manually. If that's the case you only need to do step 3 (and 4). If you are unsure if your soundcard is detected, as root type \"lsmod\". You should see several modules loaded that starts with \"snd-\".

  1. Locate the module for your soundcard: http://www.alsa-project.org/alsa-doc/ The module will be prefixed with 'snd-' (for example: 'snd-via82xx'). Optionally, run 'alsaconf' as root.
  1. Load modules:
 <verbatim>
 # modprobe snd-NAME-OF-MODULE
 # modprobe snd-pcm-oss
 </verbatim>
  1. Unmute Soundcard
 <verbatim>
 # amixer set Master 100 unmute
 # amixer set PCM 100 unmute
 </verbatim>
 Or you can do this graphically using 'alsamixer'
NOTE When using 'alsamixer', be sure to unmute (push M) as well as bring volumes up.


  1. Test on a wave file on your system:
 <verbatim>
 # aplay mywav.wav
 </verbatim>
  1. Add snd-pcm-oss and 'snd-NAME-OF-MODULE' to the list of MODULES in '/etc/rc.conf'

Still Getting No Sound?

Even though your drivers are installed correctly, and your volume is right, and nothing is muted, you might not hear anything! Adding the following line to /etc/modprobe.conf fixes this problem (with the via82xx driver, at least). <verbatim> options snd-NAME-OF-MODULE ac97_quirk=0 </verbatim>

Setup Permissions

  1. Add your user to the audio group:
 <verbatim>
 # gpasswd -a USERNAME audio
 </verbatim>
  1. Log your user out and back in to ensure the audio group is loaded.

Restore Alsa Mixer settings at Startup

  1. Run 'alsactl' once to create '/etc/asound.state'
 <verbatim>
 alsactl store
 </verbatim>
  1. Edit '/etc/rc.conf' and add 'alsa' to the list of daemons to start on bootup

KDE settings

  1. Start up KDE:
 <verbatim>
 # startx
 </verbatim>
  1. Setup the volumes as you want them for this user (each user has their own settings):
 <verbatim>
 # alsamixer
 </verbatim>
  1. KDE 3.3 Go to the K Menu > Multimedia > KMix
    1. Choose Settings > Configure KMix...
    2. Un-check the option \"Restore volumes on logon\"
    3. Press OK, and you should be all set. Now your volumes will be the same from the command line or within KDE.