Enabling Sound

Before beginning this section, it would be best for you to know what chipset your soundcard (or onboad sound) uses. If you don't however, you'll have a chance to do some experimentation to figure it out.

less /boot/defaults/loader.conf

Less is a text viewer. You can just scroll down with the arrows, and type "q" to quit. Scroll down to where it says Sound modules. Look at the right side and hopefully you recognize your card/chipset. If not take note of the bottom one which says all sound drivers. When in doubt, try them all! For the immediate test type (as root):

kldload snd_via8233

Replacing my sound card with yours of course (unless it happens to be the same). Give it a whirl, play something with BMP (you did install it right?). Hopefully you're welcomed with some good sound. I reccommend trying some Disturbed or something with heavy distortion, on other unnamed systems the quality of it wasn't so great...so it's a good test. If you used all of the sound modules with:

kldload snd_driver

You can either try and deduce your way through the list to figure out which one is yours, or you can just do all of them, and suffer a slightly longer boot time (pretty negligable). If loading them all didn't work, then you probably won't be able to use FreeBSD's default sound. Make sure you typed everything correctly before giving up though. Now it's time to make those changes permanent. Add this line to /boot/loader.conf:

snd_via8233_load="YES"

Or:

snd_driver_load="YES"

Obviously replacing snd_via8233 with whatever your card is.

Up to this point we can only have one program using sound at a time. In order to enable four virtual channels you would type the following two commands:

sysctl hw.snd.pcm0.vchans=4
sysctl hw.snd.maxautovchans=4

We will want to make this change permanent.

vi /boot/loader.conf

Add the following lines:

hw.snd.pcm0.vchans=4
hw.snd.maxautovchans=4