Hits: 51,493
Home >> Hardware >> SB!Live

Linux SBLive Support

May, 2002
UPDATED: emu10k2 (Audigy2) page. (05/03/2003)

Linux has great support for Sound Blaster cards. Since the SBLive series of cards, Creative Labs has used a great chipset called Emu10k1. This advanced DSP (Digital Signal Processor) has lots of neat features and most of which are supported under Linux. This how-to is mostly for OSS (Open Sound System) that is included in almost all distrubtions. ALSA also supports it and requires no special setup! That's right, it just works. OSS will be replaced with ALSA in 2.6.x kernels so you might want to upgrade.

My setup includes:

  • SBLive 5.1 Card (Using Digital DIN out)
  • Cambridge Soundworks DTT3500 (DTS Dolby Receiver)
  • Linux Kernel 2.4.19
  • Emu-tools 0.9.4
  • Xine 0.9.13
  • xine-dvdnav 0.9.13
  • libdvdread 0.9.3
  • libdvdcss 1.2.2

Emu10k1

The newer 2.4.16+ kernels have the driver in the source tree. Most major distrubtions have it compiled as a module that you can just load if the installer doesn't find it. You should grab the emu10k1 tools and install them. If you are not using the lastest version you can grab that too when you are there. This will give you several very important tools needed. First, emu-config is used to set digital out which isn't on by default. Then emu-dspmgr is a very powerful tool used to program the Emu10k1 chip. Also very important to this package is the DSP code you need to load for AC3 passthrough.

AC3 Passthrough

There is a little trick to get AC3 Passthrough to work. By default, it isn't enabled and you need to load some microcode to the DSP. I setup the lines into my startup script so it loads on boot. You need to load the DSP code, in my case located in /usr/local/share/emu10k1/ directory. Map it to the left and right PCM channels.

Xine

xine screenshot

Once you have the OSS driver setup, installed the DSP code and enabled AC3 Passthrough you are ready to send it some Dolby Digital Surround Sound streams. Xine is a great player that works with lots of formats. You will need DVDNAV, LibDVDRead, and LibDVDCSS. Once you have all these, you should be ready to give it a try.

I also had to add audio.a52_pass_through:1 to the ~/.xine/config but I'm sure it's in one of those tabs in setup...if you feel like digging for it. And yes, it does work great in full screen too!

Config Files

Here are the configuration for files I used to get everything working on boot. Please note that these are ADDED to the files, not the entire files.

/etc/rc.d/rc.local
# Load SBLive Driver
/sbin/modprobe emu10k1

# Setup the default output for the sblive
# Note: I have a USB Plantronics headset so it is dsp0/mixer0
ln -sf /dev/dsp1 /dev/dsp
ln -sf /dev/mixer1 /dev/mixer
chmod a+rw /dev/mixer /dev/dsp

# Use Digital Out
/usr/local/bin/emu-config -d

# Enable AC3 Patch
/usr/local/bin/emu-dspmgr -l 'pcm l' \
 -l 'pcm r' -F /usr/local/share/emu10k1/ac3pass.bin

# Map routes for Line IN (Used to TV Audio input/output)
/usr/local/bin/emu-dspmgr -v "analog l:digital l"
/usr/local/bin/emu-dspmgr -v "analog r:digital r"

/etc/modules.conf
alias sound-slot-0 emu10k1
post-install sound-slot-0 \
 /bin/aumix-minimal -f /etc/.aumixrc -L >/dev/null 2>&1 || :
pre-remove sound-slot-0 \
 /bin/aumix-minimal -f /etc/.aumixrc -S >/dev/null 2>&1 || :

# Turn on IDE DMA Mode for smooth DVD playback
options ide-cd dma=1
~/.xine/config
audio.a52_pass_through:1

ALSA Notes

If you are using ALSA a few things are different. I'm using the DIN Digital out which means you cannot control the Master/PCM volumes as you would with analog out. These are controlled by Wave * mixer groups. This is actually better since you can control the volume for each speaker. Below is a default sound mapping matrix for them.

GroupLeftRightNotes
WaveLeft FrontRight Front
Wave CenterLockedLockedLocked single input
Wave SurroundLeft RearRight Rear
Wave LFELockedLockedLife Amount

But the best thing of all, is you don't have to turn digital output on at bootup, nor do you need to load DSP microcode into the EMU10k1 Chip to use AC3. Alsa is great, try it out if you are not using it already.

UPDATE:The developers have fixed the mixer controls in 1.0.0-rc2 so that PCM now controls PCM output for all channels. And Master controls all output volume. They also change AC97 to Analog Mix for my Audigy2.