By default, FreeBSD does not load any sound card drivers for you.
However, almost all soundcards are supported. First you need to identify your soundcard. You can do this with:
pciconf -lv | more
This shows a list of PCI devices in your system. You are looking for a device which has a “class” of “multimedia”.
Mine, for example, shows the following:
none0@pci0:0:27:0: card=0x022e1028 chip=0x284b8086 rev=0x02 hdr=0x00
vendor = ‘Intel Corporation’
device = ‘Intel audio controller embedded with the 82801H chipset ( ICH8 chipset ) (82801H)’
class = multimedia
subclass = HDA
If “subclass” says “HDA” (most new soundcards do) then the driver you will need later is snd_hda. If not, most likely you will want the snd_ich driver. If your system is really old, you may need another driver – check the list of drivers available by typing:
ls -al /boot/kernel/snd_*.ko
and select the one that looks most promising.
To test the driver is correct, we need to manually load it. Do this with the following command:
kldload snd_hda
(substitute snd_hda with your required driver)
If all is well, your console screen (or type tail /var/log/messages if you’re not using the console – e.g. if you’re using SSH) will show a few messages about “pcm”. If the driver is incorrect, nothing will be shown.
If you’re happy with your selection, we need to tell FreeBSD to load the driver on boot every time. Edit the file /boot/loader.conf and add:
snd_hda_load=”YES”
If you’re using another driver (e.g. snd_ich) then alter the above line to match the driver name followed by _load=”YES”
Everytime you reboot, your computer will load the driver automatically.
Dan, I’m using PCBSD 9.1 and I have no sound. I have onboard intel (ICH8, subclass HDA) on my abit 9 pro motherboard. I also have sound through my HDMI nvidia graphics card, and PCBSD seems to be aware of this, but still produces no sound through my flat screen.
I followed the instructions above (I prefer to have the intel sound working), and after typing “kldload snd_had”, the terminal showed,
“kldload: can’t load snd_hda: File exists”
Do you have any ideas how I should proceed from here?
i’m really not sure… it’s possible that the OS has detected your sound devices in a different order (e.g. dsp0 is a hdmi port) – or could just be your volumes (check ‘mixer’ command).