Installing ALSA for the Yamaha DS-XG Sound
By Todd Davis
This tutorial is specifically tailored towards installing ASLA and getting
it configured for the Yamaha DS-XG card, however many of the concepts
involved in ALSA's installation the configuration are similar for most
sound cards. I will attempt, whenever possible, to leave some notes to
help users of other cards to properly setup ALSA for their cards as well.
This tutorial is meant to supplement, not replace, ALSA's own
ASLA stands for Advanced Linux Sound Architecture, and was developed as a
method of modularizing and standardizing sound for Linux. If your Linux
distribution already supports your sound card, then you don't need ALSA.
Those of us with Yamaha DS-XG cards have been unable to produce sound in
Linux for a long time, because Yamaha has been slow to release the
necessary information needed to develop drivers for the DS- XG. The only
solution up until now was a retail driver package known as OSS. With the
release of ALSA v0.5.8a, the XG is now supported, and in the "open source"
This tutorial assumes several things:
* You have Linux installed and working
* You are using an X based desktop, such as KDE or Gnome
* You are logged in as Root, or have used 'su'
* You know what a terminal window is, and can enter commands
* You have been able to acquire the ALSA 0.5.8a (or newer) source files,
and that they reside in your home directory
* You have a Yamaha DS-XG card (and no other installed sound cards)
There are 3 packages available for ALSA:
The only package that we need for sound, and the only one that we be
covered here, is the driver package. It is assumed that this file is in
your home directory, if not you will need to 'cd' to wherever it is
located. Let's begin.
Start by opening a terminal window. Type:
This should give you a listing of all the files and folders in your home
directory. You should see the asla-driver-0.5.8a.tar.gz file in this list.
If you have a newer version of this file, then note down that name, as you
will be using it in place of the 0.5.8 references made here. Type:
bzip2 -d alsa-driver-0.5.8a.tar.bz2
This will uncompress the zipped up file, leaving you with a file called
asla-driver-0.5.8a.tar. Now we can extract those files by typing:
tar xvf alsa-driver-0.5.8a.tar
At this point, a directory called alsa-driver-0.5.8a has been created, and
the source code has been placed in the directory. Switch to the new
directory by typing:
You may wish to type an ls command to make sure that there are files in this directory. I
recommend that you read any README and INSTALL files to make sure there is no new
information necessary to install ALSA.
ALSA will configure the source code for your system automatically by
Note that the "./" is part of the command and is necessary. The 'configure' script has
several options that can assist you in customizing the source to your system and sound card.
For the DS-XG, you will not need them. Those of you with an older, ISAPNP sound card may
need to run configure with this switch (./configure --with--isapnp=yes). Read the included
docs for other options available.
Once configure is complete, we need to compile the source to produce the binary files. This
is done by typing:
The compile process can take a while, depending on the speed of your computer. It is normal
for small 'warnings' to come up during the compile process, which should not stop the
compile, and should not alarm you. If the process encounters a fatal error, the compile will
halt and alert you. At that point, you will need determine the problem and try to resolve it
Assuming the process was successful, type:
to install the ALSA binaries. We are now halfway done (roughly). Incidentally, if you have
downloaded the ALSA lib and utils packages, you may follow the same basic above procedure
to install those packages as well, but they are not needed for sound.
ALSA has provided a script file that will create the new sound devices for us, and it will
put them in the /dev directory. To run this script, type:
This is the part of the install that causes the most confusion for people, and the
documentation provided by ALSA is sparse and confusing. It is necessary to modify Modprobe's
configuration file with the necessary ALSA information. This file resides under the /etc
directory, and depending on what version of Modprobe you have installed, it may be called
either 'conf.modules', or 'modules.conf'. For newbies, the easiest way to
locate and edit this file is to use the graphical file manager in KDE or Gnome (or whatever)
to locate this file, and click on it to open up a text editor. There may already be a few
lines of text in there, which we don't want to disturb.
Let me take a moment here to recommend that you make a backup copy of this file before
proceeding. A backup 'should' automatically be created later, but just to be safe, do it by
hand. Name it conf.modules.old or something similar to that, and put it in a safe place,
just in case. Always backup any file you edit by hand.
Once you have the conf.modules file open in your text editor, move the text cursor to the
line after any other existing entries, and add these lines to the file:
# ALSA native device support
alias char-major-116 snd
options snd snd_major=116 snd_cards_limit=1
alias snd-card-0 snd-card-ymfpci
options snd-card-interwave snd_index=0 snd_id="YMF724"
# OSS/Free setup
alias char-major-14 soundcore
alias sound-slot-0 snd-card-0
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
Save this file under the same name. If you are attempting to install ALSA for a card other
than the DS-XG, then the lines containing "snd-card-ymfpci" and "YMF724" will
be different. You will need to search the ALSA documentation for the proper file names. In
the case of the DS-XG, these were not listed in the docs yet, so I had to search the sound
card config files that came with the source code, and keep trying variations until it
Almost done now. Switch back to the console, and enter the following
For all intents and purposes, your ALSA driver is now setup and ready to go, but there are a
few things you should be aware of. First of all, reboot. I know that Linux users hate that
word, but I like to take the side of caution and make sure that everything loads and works
as it should. Besides, on my system, I needed to reboot, even though the driver loaded, it
still really didn't activate.
NOTE: This is important. When the driver is first installed, it sets all the mixer
channels to "Mute". You must use a mixer app of some sort to turn the volume up on the
various sound channels. I use KDE, and the mixer app built into the status bar works just
fine. If you downloaded the ALSA utils also, there is a mixer app in there that you can use
Finally, you may want or need to setup "aslasound" as a startup service. It is beyond
the scope of this document to discuss each distro's method of doing this. However, most
distros now come with utilities to help you setup your startup services using a GUI of some
sort. If not, you may need to edit your /etc/rc.local file by hand.
Have fun with ALSA. So far, it has worked 100% with my KDE sounds, playing CD's and MP3's,
and even Quake III and Unreal Tournament had sound with no problems.