ALSA is the
ALSA provides efficient support for all types of audio interfaces, is fully
modularized, is SMP and thread-safe and provides a high-quality user space
library called
Gentoo provides an
First of all, before continuing, make sure your kernel has
If you use a 2.6 kernel you can skip the rest of this section and continue with
Users of 2.4 kernel sources will have to install the necessary ALSA drivers for
their soundcard. First find out what soundcard you have. An easy trick is to
search for "audio" in the output of the
# lspci | grep -i audio Multimedia audio controller: VIA Technologies, Inc. VT82C686 AC97 Audio Controller (rev 64).
Now go to the
Based on this information we can now install the
ALSA_CARDS="via82xx"
Now install
# emerge alsa-driver
If you want backwards compatibility with OSS, you need to install
# emerge alsa-oss
Now install the ALSA Utils on your system (this is mandatory):
# emerge alsa-utils
Now that the utils are installed, it is time to configure ALSA...
If you use a modular kernel (such as when using
alias snd-card-0 snd-via82xx# The following is only needed when you want OSS compatibility alias sound-slot-0 snd-card-0 alias /dev/mixer snd-mixer-oss alias /dev/dsp snd-pcm-oss alias /dev/midi snd-seq-oss
Now run
# modules-update
If you use DevFS (which is the default for Gentoo installations) make sure that
# ALSA/OSS stuff # Comment/change these if you want to change the permissions on # the audio devices LOOKUP snd MODLOAD ACTION snd LOOKUP dsp MODLOAD LOOKUP mixer MODLOAD LOOKUP midi MODLOAD REGISTER sound/.* PERMISSIONS root.audio 660 REGISTER snd/.* PERMISSIONS root.audio 660
To activate ALSA support at boot, add the
# rc-update add alsasound boot # /etc/init.d/alsasound start
By default, all sound channels are muted. To fix this, run
# amixer
If
Now unmute the
# amixer set Master 100 unmute # amixer set PCM 100 unmute(Only if the above isn't sufficient:) # amixer set Center 100 unmute # amixer set Surround 100 unmute # amixer set Headphone 100 unmute
To check if your sound works, play a wave file (using
To fine-tune the sound channel settings you can use the
Some soundcards come with onboard MIDI synthesizers. To use them, you must first
install the
# emerge awesfx
If you have a collection of sound fonts somewhere, place them in
After copying over the sound font, select them using
# asfxload /usr/share/sfbank/8MBGMSFX.SF2
You must have this command run every time you boot, so it is adviseable to add
it to
If you can't find soundfonts on your driver CD you can download some online from
If your sound card does not come with a hardware synthesizer (or you don't want
to use it), you can use
# emerge timidity++
For timidity to play sounds, it needs a soundfont. If you do not have any,
install
# emerge timidity-eawpatches
Don't forget to add
# rc-update add timidity default # /etc/init.d/timidity start
You can use
To see what MIDI output ports are available on your system, use the
# aplaymidi -l
If all looks fine, try playing a MIDI file to make sure everything works. With
the
# aplaymidi -p 65:0 "Final Fantasy 7 - Aerith' Theme.mid"
Some specific sound cards can benefit from certain tools provided by the
ALSA_TOOLS="as10k1 ac3dec"
Then install the
# emerge alsa-tools
If your soundcard has a joystick plug, you might be interested in activating
joystick support for your soundcard. If so, start by verifying if your soundcard
driver has a joystick parameter. You can verify this by running
# modinfo snd-via82xx
filename: /lib/modules/2.4.22-ck2/snd-via82xx.o
description: "VIA VT82xx audio"
author: "Jaroslav Kysela <perex@suse.cz>"
license: "GPL"
parm: index int array (min = 1, max = 8), description "Index value for
VIA 82xx bridge."
parm: id string array (min = 1, max = 8), description "ID string for VIA
82xx bridge."
parm: enable int array (min = 1, max = 8), description "Enable audio part
of VIA 82xx bridge."
parm: mpu_port long array (min = 1, max = 8), description "MPU-401 port.
(VT82C686x only)"
parm: joystick int array (min = 1, max = 8), description "Enable
joystick. (VT82C686x only)"
parm: ac97_clock int array (min = 1, max = 8), description "AC'97 codec
clock (default 48000Hz)."
parm: dxs_support int array (min = 1, max = 8), description "Support for
DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 =
no VRA)
If it has the
alias snd-card-0 snd-via82xx options snd-via82xx joystick=1