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: with additional information: 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:
 # pacman -Sy alsa-lib alsa-utils
  1. Required for 2.4 kernels:
 # pacman -S alsa-driver
 # depmod -a
  1. Recommended but not required:
 # pacman -S alsa-oss

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: The module will be prefixed with 'snd-' (for example: 'snd-via82xx'). Optionally, run 'alsaconf' as root.
  1. Load modules:
 # modprobe snd-NAME-OF-MODULE
 # modprobe snd-pcm-oss
  1. Unmute Soundcard
 # amixer set Master 100 unmute
 # amixer set PCM 100 unmute
 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:
 # aplay mywav.wav
  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:
 # gpasswd -a USERNAME audio
  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'
 alsactl store
  1. Edit '/etc/rc.conf' and add 'alsa' to the list of daemons to start on bootup

KDE settings

  1. Start up KDE:
 # startx
  1. Setup the volumes as you want them for this user (each user has their own settings):
 # alsamixer
  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.