pavement

Sound card

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(FreeBSD5.4 and above Sound)
Line 17: Line 17:
 
   freebsd# kldload snd_ich
 
   freebsd# kldload snd_ich
  
Too find out what driver will work with your sound board/chip have a look at the NOTES file in
+
To find out what driver will work with your sound board/chip have a look at the NOTES file in
/usr/src/sys/conf/NOTES
+
/usr/src/sys/conf/NOTES - search for 'snd' and you will find descriptions of all the different sound drivers. (The impatient may want to try running [[Sound_card:_checking_drivers|this shell script]] instead, which will automatically check each sound driver installed on the system to see if it works, and let you know what it found out.)
 
+
search for 'snd' and you will find descriptions of all the different sound drivers.
+
  
 
Then when I had tested this and it worked I entered the following into my kernel:
 
Then when I had tested this and it worked I entered the following into my kernel:
  
device sound
+
 
+
# Base sound driver - required for all cards
device snd_ich
+
device sound
 
+
and recompiled
+
# Device-specific driver - may be different on other systems besides mine!
 +
device snd_ich
  
OR
+
and recompiled.  However, recompiling the kernel is absolutely NOT necessary for sound support, as you can just dynamically load the modules for sound support at boot time, by adding lines to /boot/loader.conf:
  
Add the following lines to /boot/loader.conf
+
sound_load="YES"
 +
snd_ich_load="YES"
  
sound_load="YES"
+
Of course remember to replace snd_ich_load with whatever your individual device is.
snd_ich_load="YES"
+
  
 
== External Links ==
 
== External Links ==

Revision as of 09:42, 3 August 2005

In order to get sound out of your FreeBSD box, you'll need to either load your sound driver module or compile sound support in your kernel -- it's not installed by default. For this you need to use kldload to load your sound driver. If you don't know which sound card you have -- and therefore don't know which driver to use -- you can load the generic snd_driver module (in 5.x systems -- in 4.x you need to load the snd module), which works for most cards, like so:

samizdata# kldload snd_driver 

If that works, you'll probably want it to load automatically at boot time. To do so, you'll want to append a line about snd_driver to your loader.conf:

samizdata# echo snd_driver_load="YES" >> /boot/loader.conf

And presto, when booting, your system will always try to load snd_driver.


FreeBSD5.4 and above Sound

Since 27/07/04 the sound system has changed a lot and now to install sound under FreeBSD you have to do the following:

 freebsd# kldload sound

Then find out your sound card. I'm using an ASUS A7N8X motherboard with Nvidia onboard sound so I typed

 freebsd# kldload snd_ich

To find out what driver will work with your sound board/chip have a look at the NOTES file in /usr/src/sys/conf/NOTES - search for 'snd' and you will find descriptions of all the different sound drivers. (The impatient may want to try running this shell script instead, which will automatically check each sound driver installed on the system to see if it works, and let you know what it found out.)

Then when I had tested this and it worked I entered the following into my kernel:


# Base sound driver - required for all cards
device sound

# Device-specific driver - may be different on other systems besides mine!
device snd_ich

and recompiled. However, recompiling the kernel is absolutely NOT necessary for sound support, as you can just dynamically load the modules for sound support at boot time, by adding lines to /boot/loader.conf:

sound_load="YES"
snd_ich_load="YES"

Of course remember to replace snd_ich_load with whatever your individual device is.

External Links

FreeBSD Handbook

Personal tools