How to get sound from a SB16-compatible soundcard in FreeBSD


This is the simple steps I used to get an ESS1869-based 16-bits PnP soundcard to work.
First, let's look at the man pages for the pcm and sbc devices:

The pcm device

NAME
     pcm - FreeBSD PCM audio device driver

SYNOPSIS
     For a card with bridge driver support, and a PnP card:
     device pcm

     For a card without bridge driver support, and a non-PnP card:
     device pcm0 at isa? port? irq 5 drq 1 flags 0x15

DESCRIPTION
     The pcm driver provides support for PCM audio play and capture.  This
     driver also supports various PCI and WSS/MSS compatible ISA sound cards,
     and AC97 mixer.  True full duplex operation is available on most cards.

     If your sound card is supported by a bridge driver, pcm driver works in
     conjunction with the bridge driver.

The sbc device

NAME
     sbc - Creative Sound Blaster ISA and compatible bridge device driver

SYNOPSIS
     For PnP cards:
     device sbc

     For non-PnP cards:
     device sbc0 at isa? port 0x220 irq 5 drq 1 flags 0x15
(The sbc man page also lists the soundcards the sbc driver covers:
DESCRIPTION
     The sbc bridge driver allows the generic audio drivers including pcm(4)
     to attach to the following ISA sound cards:

     o   Creative SB16, SB32, SB AWE64 (including Gold) and ViBRA16

     o   Advance Asound 100, 110 and Logic ALS120

     o   ESS ES1868, ES1869, ES1879 and ES1888

Note the "device"-lines under SYNOPSIS. These go into your kernel configuration file in a minute.

Install the soundcard

Obviously. Open your computer and insert the soundcard in an empty slot.
Then, I restarted FreeBSD (upon which your card should be detected, try dmesg | less to see if it is) and added these lines to my kernel file:

device pcm
device sbc

- and recompiled and installed the kernel. Refer to the FreeBSD handbook for instructions on how to do this.

After that is done, make the snd device node, like this:

# cd /dev
# sh MAKEDEV snd0 
(The snd device is, as the MAKEDEV script says:)

# snd* various sound cards

Testing the sound

# cat /dev/sndstat

FreeBSD Audio Driver (newpcm) May 25 2000 21:32:05
Installed devices:
pcm0: ESS 1869 DSP at io 0x220 irq 5 drq 1:0 (1p/1r channels)


# cat somesound.au >/dev/dsp

# cat somewav.wav >/dev/dsp