Support for Your SBLive! Sound Card on FreeBSD 4.0

 First, I'd like to thank Luigi Rizzo and Cameron Grant for cranking out a working pcm sound driver that supports the SB LIVE!, as well as Seigo Tanimura for documenting their work in the pcm man  page. Thanks guys!  Second, thanks to Martin Miskin, Walter Brameld, and Frank  for spanking me on the mailing lists. My first HOWTO for the SB Live should not  have had any parts assumed. I was running 5.0-current and assumed that the pcm  driver  would be about the same since the 5.0 branch from 4.0 was so recent.  This HOWTO is strictly for FreeBSD 4.0-RELEASE (if you run -stable, YMMV) and  most of it was documented by Walter. I've installed 4.0-R just to test the sound card to verify it works here too. Walter, thanks for the input!

 

Now, on to the good stuff...

1) Make sure you have source files on your hard drive. Then:

cd /usr/src/sys/dev/sound/pci

Now add a few files to our present working directory that we just  changed

to. Fetch the two files, emu10k1.c and emu10k1.h from:

ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/sys/gnu/dev/sound/pci/

2) Edit emu10k1.c. Look for the following line (somewhere around line 1163):

codec = ac97_create(dev, sc, NULL, emu_rdcd, emu_wrcd);

Remove the NULL entry. It should now say:

codec = ac97_create(dev, sc, emu_rdcd, emu_wrcd);


3) Place these files in /usr/src/sys/dev/sound/pci. You may  also wish to keep a backup so your first CVSUP doesn't flush them down the  toilet.


4) Edit /usr/src/sys/conf/files and insert the following line  in the appropriate place (alphabetically, around line 980):

dev/sound/pci/emu10k1.c optional pcm pci

 

5) Edit your kernel config file and make sure it has the following two devices:

device pcm

device pci

 

6) Recompile your kernel and reboot. dmesg should show the following:

pcm0: <Creative EMU10K1> port 0xe400-0xe41f irq 10 at device 9.0 on pci0

pci0: <unknown card> (vendor=0x1102, dev=0x7002) at 9.1

Cat /dev/sndstat should show:

FreeBSD Audio Driver (newpcm) Apr 7 2000 13:12:21

Installed devices:

pcm0: <Creative EMU10K1> at io 0xe400 irq 10 (1p/0r channels duplex)

or something similar, io and irq may vary.

 

7) Finally, make the sound device in your  /dev directory:

/dev/MAKEDEV snd0

 

8) Reboot.

9) Start your favorite audio application. It's time to rock and  roll.

Some people have reported "DAC not ready" errors and/or problems with the AC_97 references. This HOWTO was tested on a clean ftp install of 4.0-R  on todays date, April 8, 2000. Good Luck with your system(s)!

 

-Christopher D. Holden

christopher.holden@sbt.siemens.com

April 08, 2000   -  Updated: 10/16/2000