My SB Live! Experience w/ ALSA

Jason Clinton clintonj at umkc.edu
Mon Nov 4 17:19:25 CST 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Though I'd share my recent experience with my soundcard (SoundBlaster Live!) in
case anyone else has the same questions.

I usually compile my kernel w/o modules as one big kernel customized to my
hardware. I'd been using OSS for some time to drive my SB Live! but I decided
that I'd give ALSA a whirl since I've seen so many install guides pushing people
towards it.

First thing I did was to recomplile my kernel using modules this time. I'd never
done this before so it took a recheck of the Gentoo install guide and I found
that I only needed to select the items I wanted as modules in menuconfig and then:

/usr/src/linux # make dep && make clean bzImage modules modules_install

First the new kernel is compiled with modules support and placed in
arch/i386/bzImage. Then the modules are compiled and linked to each other. Then
they are installed to /lib/modules/2.4.19/kernel/drivers/sound/.

To make sure everything was successful, I decided to load the OSS modules as
though I were not switching to ALSA. I edited /etc/modules.autoload and added
the three required modules to the file at the end of the file on lines by
themselves:

- ---------
#Blahblahblaha Gentoo modules.autoload
...[ethernet drivers here]
sound  #this is the OSS core
ac97_codec #required for SB Live!
emu10k1 #the model number of the SigmalTel chip that runs SB Live! Cards
- ---------

ALSA required the build of sound support in the kernel. After it was compiled, I
mounted my /boot partition and copied from /usr/src/linux/arch/i385/bzImage to
/boot/bzImage. I'm using grub so no need to run the lilo command. Rebooted.
Started X. Played some games. Sound is okay.

Now, in Gentoo, installing ALSA requires only one command:

~# emerge alsa-driver alsa-oss alsa-utils

After it downloaded and compiled, it installed itself to
/lib/modules/2.4.19/kernel/drivers/sound/snd-* Where snd-* files are all the
ALSA drivers.

I commented out the sound drivers I added to modules.autoload earlier so that I
can easily turn OSS back on later. According to the ALSA docs, the only thing I
needed to do now was to edit /etc/modules.d/alsa . This varries from card to
card so I'll leave it up to the docs to describe this part. The one thing I will
mention, however, is that the 2.4.19 kernel apparently compiles what used to be
'soundcore.o' as just 'sound.o' so I change all references to 'soundcore' to
'sound' to get OSS emulation working.

One more set of commands:

# rmmod sound ac_97codec emu10k1
# update-modules
# /etc/init.d/alsa start
# rc-update add alsa default

The first command unloaded OSS, the second updated modules.conf from
/etc/modules.d/alsa, the third started ALSA and loaded all the ALSA modules and
the fourth added ALSA to my boot sequence. That's it!

Now, once ALSA was working I discovered some major caveats. OSS emulation takes
a bit of overhead off of applications that are using sound so my framerate
dropped ever so slightly in Quake3 and WineX games.

I have a full 4.1 suround speaker system attached to my sound card and heretofor
Dolby Digital movies in Xine have played in full surround sound if 'o-gain' was
turned all the way up in the OSS mixer. In ALSA, however, I could never get
suround sound to work properly. The best I could manage was 2.1 stereo mirrored
to 4.1 which just sn't the same.

After much twidling I descide to stumble back to the less complicated OSS:

# /etc/init.d/alsa stop
# rc-update del alsa default
# rm /etc/modules.d/alsa
# modules-update
# emerge unmerge alsa-driver alsa-utils alsa-oss

Then I just simply uncommented the OSS drivers in modules.autoload and
everything went back to normal.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQE9xqxGtSqjk42zvwkRAkdHAJ98gTsiIHXIcYPThvfOHd6taqgz8ACdH9fN
lsRVEGH1bIs4mzKPRbFosNk=
=Blxj
-----END PGP SIGNATURE-----




More information about the Kclug mailing list