Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Apr 2000 04:48:21 -0400
From:      Otter <otter@otter.cc>
To:        frank@exit.com
Cc:        Brandon Fosdick <bfoz@glue.umd.edu>, Walter Brameld <brameld@twave.net>, freebsd-questions@FreeBSD.ORG, freebsd-stable@FreeBSD.ORG, diskiller@borg-cube.com, ghostrdr@defcon1.org, torqued@pobox.com
Subject:   Re: SBLive! on FreeBSD 4.0 & 5.0 HOWTOs
Message-ID:  <38EEF255.FDFD4A6F@otter.cc>
References:  <200004080030.RAA06933@realtime.exit.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------2FEFDB8BF862C3E547A49F5D
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Ok gang... here's the delivery as I promised. I've split up the info for
both 4.0 and 5.0 versions. I've tested both of these, and source
references are in the text. I hope this helps owners of the SB Live!
cards. I'm sending these to the webmasters of http://www.defcon1.org and
http://defcon1.erudition.net for posting in case anyone needs them at a
later date.

Regards, 
-Otter
--------------2FEFDB8BF862C3E547A49F5D
Content-Type: text/html; charset=us-ascii;
 name="sblive-4.x-HOWTO.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="sblive-4.x-HOWTO.html"

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; I; FreeBSD 5.0-CURRENT i386) [Netscape]">
</head>
<body>

<center><b><u>Support for Your SBLive! Sound Card on FreeBSD 4.0</u></b></center>

<p>&nbsp;First, I'd like to thank Luigi Rizzo and Cameron Grant for cranking
out a
<br>working pcm sound driver that supports the SB LIVE!, as well as Seigo
<br>Tanimura for documenting their work in the pcm man page. Thanks guys!
<br>&nbsp;Second, thanks to Martin Miskin, Walter Brameld, and Frank for
spanking
<br>me on the mailing lists. My first HOWTO for the SB Live should not
have had any
<br>parts assumed. I was running 5.0-current and assumed that the pcm driver
<br>would be about the same since the 5.0 branch from 4.0 was so recent.
This
<br>HOWTO is strictly for FreeBSD 4.0-RELEASE (if you run -stable, YMMV)
and
<br>most of it was documented by Walter. I've installed 4.0-R just to
<br>test the sound card to verify it works here too. Walter, thanks for
the
<br>input!
<p>Now, on to the good stuff...
<p>1) Make sure you have source files on your hard drive. Then:
<p><b>cd /usr/src/sys/dev/sound/pci</b>
<p>Now add a few files to our present working directory that we just changed
<br>to. Fetch the two files, emu10k1.c and emu10k1.h from:
<p><b>ftp://ftp.freebsd.org/pub/FreeBSD/FreeBSD-current/src/sys/dev/sound/pci/</b>;
<p>2) Edit emu10k1.c. Look for the following line (somewhere around line
1163):
<p><b>codec = ac97_create(dev, sc, NULL, emu_rdcd, emu_wrcd);</b>
<p>Remove the NULL entry. It should now say:
<p><b>codec = ac97_create(dev, sc, emu_rdcd, emu_wrcd);</b>
<p>3) Place these files in /usr/src/sys/dev/sound/pci. You may also wish
<br>to keep a backup so your first CVSUP doesn't flush them down the
<br>toilet.
<p>4) Edit /usr/src/sys/conf/files and insert the following line in the
<br>appropriate place (alphabetically, around line 980):
<p><b>dev/sound/pci/emu10k1.c optional pcm pci</b>
<p>5) Edit your kernel config file and make sure it has the following two
<br>devices:
<p><b>device pcm</b>
<br><b>device pci</b>
<p>6) Recompile your kernel and reboot. dmesg should show the following:
<p><b>pcm0: &lt;Creative EMU10K1> port 0xe400-0xe41f irq 10 at device 9.0
on pci0</b>
<br><b>pci0: &lt;unknown card> (vendor=0x1102, dev=0x7002) at 9.1</b>
<p>Cat /dev/sndstat should show:
<p><b>FreeBSD Audio Driver (newpcm) Apr 7 2000 13:12:21</b>
<br><b>Installed devices:</b>
<br><b>pcm0: &lt;Creative EMU10K1> at io 0xe400 irq 10 (1p/0r channels
duplex)</b><b></b>
<p>or something similar, io and irq may vary.
<p>7) Finally, make the sound device in your /dev directory:
<p><b>/dev/MAKEDEV snd0</b>
<p>8) Reboot.
<p>9) Start your favorite audio application. It's time to rock and roll.
<p>Some people have reported "DAC not ready" errors and/or problems with
the
<br>AC_97 references. This HOWTO was tested on a clean ftp install of 4.0-R
on
<br>todays date, April 8, 2000. Good Luck with your system(s)!
<p>-Christopher D. Holden
<br>christopher.holden@sbt.siemens.com
<br>&nbsp;
<br>&nbsp;
</body>
</html>

--------------2FEFDB8BF862C3E547A49F5D
Content-Type: text/html; charset=us-ascii;
 name="sblive-5.x-HOWTO.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="sblive-5.x-HOWTO.html"

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; I; FreeBSD 5.0-CURRENT i386) [Netscape]">
   <title>Title</title>
<!--Created by Applixware HTML Author, Release 4.42 (1021.522) on Thu Apr  6 12:11:53 2000-->
<!--Ax:WP:DocVar:HTMLOriginalPath@:"/tmp/ex00289p.aw"-->
</head>
<body>

<center><b><tt><u><font face="courier, courier new"><font size=+2>Support
for your SB Live! Sound Card in FreeBSD 5.0 (April 7,2000)</font></font></u></tt></b></center>

<p><tt><font face="courier, courier new">This work is documented and tested
from source code which was updated (via cvsup) on April 6, 2000. You can
start the process by adding support in your kernel for devices pcm. Detailed
info on building custom kernels can be found at</font></tt>
<p><b>http://www.freebsd.org/handbook/kernelconfig.html</b>;
<p><tt><font face="courier, courier new">So you can see what little I added
to my kernel, here is my sound support:</font></tt>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
device pcm</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
device pci</font></font></tt></b>
<p><tt><font face="courier, courier new">The last line is a generic driver
required so that the programs we use will work with PCI configuration registers.
The SB Live! cards are PCI. Make sure you have this device option in the
kernel. No, I'm no wiz on this topic. I just pulled that from the first
line of "man pci" to state its purpose. Now that we've got support in the
kernel, we can complete rebuilding the kernel as needed. Let's move on
to making our audio device.</font></tt>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cd /dev</font></font></tt></b>
<p><tt><font face="courier, courier new">This is where I'm a little questionable
to the exact step of "what to do". I had older legacy devices working in
here before i got to this point. If I remember correctly, i think I did:</font></tt>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
./MAKEDEV snd0</font></font></tt></b>
<p><tt><font face="courier, courier new">to get my audio device made. In
my /dev directory, I do have the following which should help you in what
to look for:</font></tt>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
kashmir# ls -la /dev/audio*</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lrwxrwxrwx 1 root wheel 6 Feb 21 11:05 /dev/audio -> audio0</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
crw-rw-rw- 1 root wheel 30, 4 Feb 21 11:05 /dev/audio0</font></font></tt></b>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
kashmir# ls -la /dev/dsp*</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lrwxrwxrwx 1 root wheel 4 Feb 21 11:05 /dev/dsp -> dsp0</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
crw-rw-rw- 1 root wheel 30, 3 Apr 6 11:52 /dev/dsp0</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
lrwxrwxrwx 1 root wheel 5 Feb 21 11:05 /dev/dspW -> dspW0</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
crw-rw-rw- 1 root wheel 30, 5 Feb 21 11:05 /dev/dsp</font></font></tt></b>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
kashmir# cat sndstat</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
FreeBSD Audio Driver (newpcm) Apr 6 2000 10:54:54</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Installed devices:</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
pcm0: &lt;Creative EMU10K1> at io 0xdc00 irq 11 (1p/0r channels duplex)</font></font></tt></b>
<p><tt><font face="courier, courier new">Now we need to check a file in
the sound driver. Make sure that the SB Live! chipset is available to the
pcm driver. Look in the file:</font></tt>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/usr/src/sys/conf/files</font></font></tt></b>
<p><tt><font face="courier, courier new">by making sure that the line</font></tt>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
dev/sound/pci/emu10k1.c optional pcm pci</font></font></tt></b>
<p><tt><font face="courier, courier new">is <b>NOT </b>commented out in
the file. OK. Save the file to the same name that you opened it as. And
reboot!</font></tt>
<p><tt><font face="courier, courier new">Upon rebooting, watch your dmesg
output. You should see something similar to:</font></tt>
<p><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
pcm0: &lt;Creative EMU10K1> port 0xdc00-0xdc1f irq 11 at device 12.0 on
pci0</font></font></tt></b>
<br><b><tt><font face="courier, courier new"><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
pci0: &lt;unknown card> (vendor=0x1102, dev=0x7002) at 12.1</font></font></tt></b>
<p><tt><font face="courier, courier new">If it went too fast, you can always
do a</font></tt>
<p><tt><font face="courier, courier new"><b><font size=-1>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
/sbin/dmesg | grep pc </font></b>or <b><font size=-1>/sbin/dmesg | grep
pcm</font></b></font></tt>
<p><tt><font face="courier, courier new">The latter will narrow down your
report if you have other PCI devices.</font></tt>
<p><tt><font face="courier, courier new">Now put it to the test. Fire up
your favorite audio application and crank up the music loud enough to upset
the neighbors.</font></tt>
<p><tt><font face="courier, courier new">-Christopher D. Holden</font></tt>
<br>christopher.holden@sbt.siemens.com
</body>
</html>

--------------2FEFDB8BF862C3E547A49F5D--



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38EEF255.FDFD4A6F>