Setting up your sound card

From FBSD_tips

Jump to: navigation, search

DRAFT

Contents

[edit] If things go well

The nominal case for setting up your sound card is pretty simple:

> kldload snd_driver
> cat /dev/sndstat
FreeBSD Audio Driver (newpcm)
Installed devices:
pcm0: <Avance Logic ALS4000> at io 0x2400 irq 16 kld snd_als4000 (1p/1r/0v channels duplex default)

The kldload command loaded all the sound drivers in the system, then cat /dev/sndstat queried the kernel to see which one attached. Now you can set it to load the next time you boot by edditing /boot/loader.conf like this :

/boot/loader.conf :

snd_als4000_load="YES"

Of course, substituting your loaded driver for "snd_als4000".

[edit] If things don't go so well

If that does not find and attach a driver, fear not! All is not lost. 4front had a set of very good drivers, for pay. They open sourced them, and now they are in ports. Typically they ran higher end cards and features than the OS drivers. To install :

cd /usr/ports/audio/oss
make install clean
echo oss_enable=\"YES\" >> /etc/rc.conf

[edit] Issues

It seems that 4front's automatic device opening does not work on FBSD-7 (at least).

http://www.4front-tech.com/forum/viewtopic.php?p=5669&sid=2116c76cff46748fed7aecb6c04b4302

[edit] Discussion

Misbehaving Linux sound apps can sometimes the helped with this command : sysctl hw.snd.compat_linux_mmap=1 (thanks cgibin!)

List of 4front supported drivers : http://manuals.opensound.com/devlists/FreeBSD.html

Handbook : http://www.freebsd.org/doc/en/books/handbook/sound-setup.html

Personal tools