Soundblaster Audigy / Audigy 2

David L dlodeiro at inspired.net.au
Thu Sep 11 05:49:37 PDT 2003


It took me a while to get sound to work on my System as I was unfamiliar with 
the modular kernel, so I wrote this howto. I hope it helps anyone that may be 
having some problems getting it to work. If you see something that you 
beleive I have done wrong, please let me know and I will make the 
adjustments, or feel free to make the adjustments yourself and forward me a 
copy.

Thanks

David
-------------- next part --------------
Getting sound on FreeBSD 5.1-Release with a Creative Audigy Sound Card.

I switched my main workstaion over to FreeBSD and found out that the Audigy card wasnt supported by any of the drivers as specified in the handbook.

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/sound-setup.html

After a bit of searching on Google, I came across some promising finds. Firstly there is the OSS drivers, however there not free, then I also came across this site

http://chibis.persons.gfk.ru/audigy/

from where I downloaded the file emu10kx-22-june-2003.tar.gz into my user directory. 

Then I opened up a terminal and logged in as root.

I coppied the archive to my /tmp directory

# cp /home/myuseraccount/emu10kx-22-june-2003.tar.gz /tmp

and unzipped the archive

# tar -xvzf emu10kx-22-june-2003.tar.gz

then I changed into the directory that had just been unzipped

# cd /tmp/emu10kx

I then had to compile the driver and install it

# make install clean

This finished with no errors, and after reading some of the output I noticed it placed a module in /boot/kernel  ( I didnt exactly know that the file was a module, but I found this out by Google )

I rebooted thinking that maybe on reboot it would load the driver.

After the reboot I did pciconf -l -v which gives me a list of all my pci devices and what driver there using

# pciconf -l -v 

Amongst other information it gave me this

none2 at pci0:10:0:	class=0x040100 card=0x00511102 chip=0x00041102
rev=0x03 hdr=0x00
       vendor 	   =  'Creative Labs'
       device      =   'EMU10K2 Audio Chipset  ( SB Audigy )
       class         =   multimedia
       subclass   =   audio
the part that Im interested in is  none2 at pci0:10:0 because this tells me that there is no driver attached to the card yet.

I remembered reading somewhere that the drivers got loaded as modules, so I found out how to load a module, and I found out what the name of the module was by looking through /boot/kernel until I found the right one , in this case the file is snd_emu10kx.ko, so to load the module I did:

# kldload -v snd_emu10kx.ko

and to see if the card now had a driver attached I did 

# pciconf -l -v

this time it had

emu10kx0 at pci0:10:0:     class=0x040100 card=0x00511102 chip=0x00041102 rev=0x03 hdr=0x00
    vendor   = 'Creative Labs'
    device   = 'EMU10K2 Audio Chipset (SB Audigy)'
    class    = multimedia
    subclass = audio

see this time we can see that the driver is attached to the card. So I rebooted to see if it loaded up at boot. After I rebooted I did pciconf -l -v again, but to my dissapointment it wasnt loaded. After looking for help, I found out that you need to set up /boot/loader.conf file in order for the module to be loaded at boot.

There are to versions of the file, one in /boot/ and one in /boot/defaults. The one in /boot is completely empty, so I removed it. Make sure it is empty before you remove it

# edit loader.conf			file is empty therefore:
# cd /boot
# rm loader.conf
# cp /boot/defaults/loader.conf /boot/

This gives us a file with most of the possible options commented out. This file is similar to /etc/rc.conf in layout, and in the same way that /etc/rc.conf is read by /etc/rc, loader.conf is read by /boot/loader.4th. However by default /boot/loader.4th points to /boot/defaults/loader.conf , so the copy that you made into /boot/ stays unedited whilst the one in /boot/defaults/ is the one that you modify.

This is basically the contents of my /boot/defaults/loader.conf file in order to get the Audigy card working 

exec=".( Loading /boot/loader.conf ) cr"

kernel="kernel"         # /boot sub-directory containing kernel and modules
bootfile="kernel"       # Kernel name (possibly absolute path)
kernel_options=""

userconfig_script_load="NO"
userconfig_script_name="/boot/kernel.conf"
userconfig_script_type="userconfig_script"

loader_conf_files="/boot/device.hints /boot/loader.conf /boot/loader.conf.local /boot/defaults/loader.conf"
nextboot_conf="/boot/nextboot.conf"
nextboot_enable="NO"

verbose_loading="NO"            # Set to YES for verbose loader output

#autoboot_delay="10"            # Delay in seconds before autobooting
#console="vidconsole"           # Set the current console
#currdev="disk1s1a"             # Set the current device
module_path="/boot/kernel;/boot/modules"        # Set the module search path
#prompt="\\${interpret}"        # Set the command prompt
#root_disk_unit="0"             # Force the root disk unit number
#rootdev="disk1s1a"             # Set the root filesystem

snd_emu10kx_load="YES"

Note that each has its section in the loader.conf file , anything else in the file I left commented out.

After editing the file, I rebooted my system, and when it finished booting I logged in as root and did

# pciconf -l -v

and the output I received was 

emu10kx0 at pci0:10:0:     class=0x040100 card=0x00511102 chip=0x00041102 rev=0x03 hdr=0x00
    vendor   = 'Creative Labs'
    device   = 'EMU10K2 Audio Chipset (SB Audigy)'
    class    = multimedia
    subclass = audio

However I still didnt have sound, when I did a dmesg I found that my Audigy card was attached to the pcm1 device node, this is because I had until now been using the onboard sound wich was attached to pcm0. All I did to fix this was reboot and go into the bios settings and disable onboard sound, when it rebooted and went into FreeBSD I had sound through my Audigy card.

-------------------------------------------------------------------------------------

 This How to was written by David Lodeiro.
 Whilst I make every effort to ensure the accuracy of this document,
 I take no responsibility for damage caused whilst attempting to work
 through this.


More information about the freebsd-questions mailing list