old-www/HOWTO/Alsa-sound-5.html

400 lines
17 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
<TITLE>Alsa-sound-mini-HOWTO: Loading the driver</TITLE>
<LINK HREF="Alsa-sound-6.html" REL=next>
<LINK HREF="Alsa-sound-4.html" REL=previous>
<LINK HREF="Alsa-sound.html#toc5" REL=contents>
</HEAD>
<BODY>
<A HREF="Alsa-sound-6.html">Next</A>
<A HREF="Alsa-sound-4.html">Previous</A>
<A HREF="Alsa-sound.html#toc5">Contents</A>
<HR>
<H2><A NAME="s5">5. Loading the driver</A></H2>
<P>There are two ways to use the ALSA-sound-modules. I personally prefer using
the manual method, meaning that I insert the driver at startup. The ALSA-drivers
were designed as loadable/unloadable modules - for instance they do not
reset the mixer after loading - so you can easily use the kerneld approach.
<P>Please do read the section
<A HREF="#backw-compat">Backwards Compatibility</A>.
You need it to have sound support ``the old way''.
<H2><A NAME="ss5.1">5.1 Inserting with modprobe</A>
</H2>
<P>Note: If you have a PnP audio-card, you first need to set it to the right
(or at least some known) IO/IRQ/DMA. See the Plug-and-Play-HOWTO. Did
you configure your Plug-and-Play-soundcard? Ok, then read on please.
The main part is: do a "modprobe snd-card-&lt;soundcard>". This should do
the trick. Please note that not all distributions do include /sbin in your path.
If you get a "bash: modprobe: command not found", this will most
likely mean that modprobe is not in your path. Try ``/sbin/modprobe snd-card-sb16'',
or try to find the modprobe utility elsewhere.
<P>The most important difficulty is with the Crystal chipsets, for these
the ALSA-drivers are not auto probing. More recent information may be acquired
from the INSTALL file in the driver-directory. Two examples, then a list:
Gravis UltraSound (GUS) and compatibles:
<BLOCKQUOTE><CODE>
<PRE>
/sbin/modprobe snd-card-gusclassic
</PRE>
</CODE></BLOCKQUOTE>
For all 16-bit Soundblaster-cards (SoundBlaster 16 (PnP), SoundBlaster
AWE 32 (PnP), SoundBlaster AWE 64 (PnP):
<BLOCKQUOTE><CODE>
<PRE>
/sbin/modprobe snd-card-sb16
</PRE>
</CODE></BLOCKQUOTE>
However, if you have a 0.3.0-pre4 package, the GUS Classic driver is called ``snd-gusclassic'' and the
SoundBlaster 16 module is called ``snd-sb16'' (so, without the ``card'' part).
<P>
<H2><A NAME="which-modul"></A> <A NAME="ss5.2">5.2 Which module for which card?</A>
</H2>
<P>Please note that ALSA versions before 0.4.x sometimes had different names. You need to leave out the ``card'' part for those
drivers. This is indicated by an asterisk (*).
<P>
<H3>Gravis UltraSound Extreme <A HREF="#no-card">(*)</A></H3>
<P>
<P><CODE>modprobe snd-card-gusextreme</CODE>
<H3>Gravis UltraSound MAX <A HREF="#no-card">(*)</A></H3>
<P>
<P><CODE>modprobe snd-card-gusmax</CODE>
<P>
<H3>ESS AudioDrive <A HREF="#no-card">(*)</A></H3>
<P>ESS AudioDrive ES-1688 and ES-688 soundcards
<P><CODE>modprobe snd-card-audiodrive1688</CODE>
<P>
<H3>ESS AudioDrive 18xx <A HREF="#no-card">(*)</A></H3>
<P>ESS AudioDrive ES-18xx based soundcards
<P><CODE>modprobe snd-card-audiodrive18xx</CODE>
<P>
<H3>Gravis UltraSound PnP <A HREF="#no-card">(*)</A></H3>
<P>Gravis UltraSound PnP, Dynasonic 3-D/Pro, STB Sound Rage 32, ExpertColor MED3201 and other
soundcards based on AMD InterWave&trade; chip.
<P><CODE>modprobe snd-card-interwave</CODE>
<H3>UltraSound 32-Pro <A HREF="#no-card">(*)</A></H3>
<P>UltraSound 32-Pro (soundcard from STB used by Compaq) and other soundcards
based on AMD InterWave (tm) chip with TEA6330T circuit for extended control
of bass, treble and master volume
<P><CODE>modprobe snd-card-interwave-stb</CODE>
<H3>Soundblaster <A HREF="#no-card">(*)</A></H3>
<P>8-bit Soundblaster cards (SoundBlaster 1.0, SoundBlaster 2.0, SoundBlaster
Pro)
<P><CODE>modprobe snd-card-sb8</CODE>
<H3>Soundblaster 16 <A HREF="#no-card">(*)</A></H3>
<P>16-bit SoundBlaster cards (SoundBlaster 16 (PnP), SoundBlaster AWE
32 (PnP), SoundBlaster AWE 64 (PnP). Please note: this module does not support the SoundBlaster VibraX16 soundcard.
<P><CODE>modprobe snd-card-sb16</CODE>
<H3>OAK Mozart <A HREF="#no-card">(*)</A></H3>
<P>
<P><CODE>modprobe snd-mozart</CODE>
<H3>OPTi 82C9xx <A HREF="#no-card">(*)</A></H3>
<P>Various sound cards that use the OPTi 82C9xx chipset, like Audio 16 Pro EPC-SOUN9301 (82C930 based),
ExpertColor MED-3931 v2.0 (82C931 based), ExpertMedia Sound 16 MED-1600 (82C928 based - AD1848),
Mozart S601206-G (OPTI601 based - CS4231) and Sound Player S-928
<P><CODE>modprobe snd-card-opti9xx</CODE>
<H3>AD1847/48 and CS4248</H3>
<P>
<P><CODE>modprobe snd-card-ad1848</CODE>
<H3>Yamaha OPL3-SA2/SA3 soundcards <A HREF="#no-card">(*)</A></H3>
<P>Just "modprobe snd-opl3sa" will not work, this driver does not do autoprobing.
See below.
<H3>S3 SonicVibes <A HREF="#no-card">(*)</A></H3>
<P>S3 SonicVibes PCI soundcards. (PINE Schubert 32 PCI)
<P><CODE>modprobe snd-card-sonicvibes</CODE>
<P>
<H3>Ensoniq/Soundblaster PCI64 <A HREF="#no-card">(*)</A></H3>
<P>Ensoniq AudioPCI ES1370/1371 PCI soundcards. (SoundBlaster PCI 64)
<P><CODE>modprobe snd-card-audiopci</CODE>
<H3>CS4231</H3>
<P>Just ``modprobe snd-card-cs4231'' will not work, no auto-probing. See below.
<H3>CS4232/4232A</H3>
<P>All soundcards based on CS4232/CS4232A chips.
Just "modprobe snd-card-cs4232" will not work, no auto-probing. See
below.
<P>
<H3>4235 and higher</H3>
<P>All soundcards based on CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips.
Just "modprobe snd-card-cs4236" will not work, no auto-probing. See below.
<P>
<H3>4610/4612/4615 and 4680</H3>
<P>
<P><CODE>modprobe snd-card-cs461x</CODE>
<H3>ESS Solo 1 <A HREF="#no-card">(*)</A></H3>
<P>ESS Solo-1, 128iPCI card (es1938, ESS-SOLO-1). Jonas Lofwander sent me a link to a document that will help you installing
this card - which is, basically, nothing more than
<CODE>modprobe snd-card-esssolo1</CODE>
... but
<A HREF="http://dice.shopcenter.nu/alsa/">http://dice.shopcenter.nu/alsa/</A>
can be of help. If you have an IBM Thinkpad 1412 you can also refer to
<A HREF="http://www.geocities.com/SiliconValley/Peaks/3649/1412.html">http://www.geocities.com/SiliconValley/Peaks/3649/1412.html</A>, thanks to Kumar Sankaran.
<H3>Trident 4DWave DX/NX <A HREF="#trident">(**)</A></H3>
<P>Best Union Miss Melody 4DWave PCI, HIS 4DWave PCI, Warpspeed ONSpeed 4DWave PCI,
AzTech PCI 64-Q3D, Addonics SV 750, CHIC True Sound 4Dwave, Shark Predator4D-PCI,
Jaton SonicWave 4D.
<P><CODE>modprobe snd-card-trident</CODE>
<H3>ForteMedia FM801</H3>
<P>These are PCI cards based on the FM801 chip.
<P><CODE>modprobe snd-card-fm801</CODE>
<P><B>(*)</B>
<A NAME="no-card"></A>
For ALSA version 0.3.0-pre4, you need to leave out the ``card-'' part in most (not all!) of the drivernames.
So ``snd-card-sb16'' becomes ``snd-sb16'', however, ``snd-card-cs4232'' remains ``snd-card-cs4232''
(modprobe snd-cs4232 will do something, but it will not produce any sound!)
<P><B>(**)</B>
<A NAME="trident"></A>
In older ALSA versions this driver was called ``snd-card-trid4wave'' and ``snd-trid4wave''.
<P>
<P>
<H2><A NAME="ss5.3">5.3 modprobe for drivers without auto-probing</A>
</H2>
<P>If you have a non-autoprobing driver, you need to supply additional info
at startup to have the driver work. More information can be found in the
file INSTALL in the driver directory.
<H3>OPL3-SA2 and OPL3-SA3</H3>
<P>According to the INSTALL file you need to supply all the information for
this driver. If you initialized the card with the isapnp-tools, you can
probably get info from the /etc/isapnp.conf file for the following values:
<BLOCKQUOTE><CODE>
<PRE>
snd_port - control port # for OPL3-SA chip
snd_wss_port - WSS port # for OPL3-SA chip (0x530,0xe80,0xf40,0x604)
snd_midi_port - port # for MPU-401 UART (0x300,0x330), -1 = disable
snd_fm_port - FM port # for OPL3-SA chip (0x388), -1 = disable
snd_irq - IRQ # for OPL3-SA chip (5,7,9,10)
snd_dma1 - first DMA # for Yamaha OPL3-SA chip (0,1,3)
snd_dma1_size - max first DMA size in kB (4-64kB)
snd_dma2 - second DMA # for Yamaha OPL3-SA chip (0,1,3), -1 = disable
snd_dma2_size - max second DMA size in kB (4-64kB)
</PRE>
</CODE></BLOCKQUOTE>
You would do a "modprobe snd-card-opl3sa snd_port=0xNNN snd_wss_port=0x530 snd_midi_port=-1
snd_fm_port=0x388 snd_irq=5 snd_dma1=0 snd_dma1_size=NN snd_dma2=1 snd_dma2_size=NN"
to load this driver (without midi-support. I am still convinced that midi-support
is the thing you need when you have synthesizers and stuff and want to
connect them to your Linux box. Never needed Midi-support even to play
midi-files.)
<P>Note that the "NN" values need to be supplied, only I do not know what
would be reasonable values. I do not know if the dma size option is really required.
<P>If you happen to have an IBM Thinkpad with this chipset, then
<A HREF="http://www.cirs.org/patrick/index.html">http://www.cirs.org/patrick/index.html</A> might be of help.
<P>If you use the driver from 0.3.0-pre4, then leave out the ``card-'' part in the name.
<P>
<H3>CS4231 chips</H3>
<P>According to the INSTALL file you need to supply the main port for this
card. Note that with the driver for 3235/6/7/8/9 cards, the one below,
I ended up supplying all information (except DMA-size), otherwise the driver did not work.
So you may as well use the whole command line to insert the driver. If
you initialized the card with the isapnp-tools, you can probably get info
from the /etc/isapnp.conf file for the following values:
<BLOCKQUOTE><CODE>
<PRE>
snd_port - port # for CS4232 chip (PnP setup - 0x534)
snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
snd_dma1 - first DMA # for CS4232 chip (0,1,3)
snd_dma1_size - max first DMA size in kB (4-64kB)
snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
snd_dma2_size - max second DMA size in kB (4-64kB)
</PRE>
</CODE></BLOCKQUOTE>
You would do a "modprobe snd-card-cs4231 snd_port=0x534
snd_mpu_port=-1 snd_irq=5 snd_dma1=0 snd_dma1_size=NN
snd_dma2=1 snd_dma2_size=NN" to load the driver for a "standard configured"
soundcard. (Without midi-support, see the note at Yamaha OPL-3).
If you used different values in /etc/isapnp.conf, then
you would use the values here also (Note: it can be wise to use your brains
anyway ;)
<P>Note that the "NN" values need to be supplied, only I do not know what
would be reasonable values. I do not know if the dma size option is really required.
<P>
<H3>CS4232/CS4232A chips</H3>
<P>According to the INSTALL file you need to supply the main port for this
card. Note that with the driver for 3235/6/7/8/9 cards, the one below,
I ended up supplying all information (except DMA-size), otherwise the driver did not work.
So you may as well use the whole command line to insert the driver. If
you initialized the card with the isapnp-tools, you can probably get info
from the /etc/isapnp.conf file for the following values:
<BLOCKQUOTE><CODE>
<PRE>
snd_port - port # for CS4232 chip (PnP setup - 0x534)
snd_cport - control port # for CS4232 chip (PnP setup - 0x120)
snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
snd_fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable
snd_jport - joystick port for CS4232 chip (PnP setup - 0x200), -1 =
disable
snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
snd_dma1 - first DMA # for CS4232 chip (0,1,3)
snd_dma1_size - max first DMA size in kB (4-64kB)
snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
snd_dma2_size - max second DMA size in kB (4-64kB)
</PRE>
</CODE></BLOCKQUOTE>
You would do a "modprobe snd-card-cs4232 snd_port=0x534 snd_cport=0x120
snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1 snd_irq=5 snd_dma1=0 snd_dma1_size=NN
snd_dma2=1 snd_dma2_size=NN" to load the driver for a "standard configured"
soundcard. (Without midi-support, see the note at Yamaha OPL-3, and no
joystick support). If you used different values in /etc/isapnp.conf, then
you would use the values here also (Note: it can be wise to use your brains
anyway ;)
<P>Note that the "NN" values need to be supplied, only I do not know what
would be reasonable values. I do not know if the dma size option is really required.
<H3>CS4235/CS4236/CS4236B/CS4237B/CS4238B/CS4239 chips</H3>
<P>According to the INSTALL file you need to supply the main port and control
ports for this card. Note that with a CS4237B card, I ended up supplying
all information (except DMA-size), otherwise the driver did not work. So you may as well
use the whole command line to insert the driver, and not only supply snd_port
and snd_cport. If you initialized the card with the isapnp-tools, you can
probably get info from the /etc/isapnp.conf file for the following values:
<BLOCKQUOTE><CODE>
<PRE>
snd_port - port # for CS4232 chip (PnP setup - 0x534)
snd_cport - control port # for CS4232 chip (PnP setup - 0x120)
snd_mpu_port - port # for MPU-401 UART (PnP setup - 0x300), -1 = disable
snd_fm_port - FM port # for CS4232 chip (PnP setup - 0x388), -1 = disable
snd_jport - joystick port for CS4232 chip (PnP setup - 0x200), -1 = disable
snd_irq - IRQ # for CS4232 chip (5,7,9,11,12,15)
snd_mpu_irq - IRQ # for MPU-401 UART (9,11,12,15)
snd_dma1 - first DMA # for CS4232 chip (0,1,3)
snd_dma1_size - max first DMA size in kB (4-64kB)
snd_dma2 - second DMA # for Yamaha CS4232 chip (0,1,3), -1 = disable
snd_dma2_size - max second DMA size in kB (4-64kB)
</PRE>
</CODE></BLOCKQUOTE>
You would do a "modprobe snd-card-cs4236 snd_port=0x534 snd_cport=0x120
snd_mpu_port=-1 snd_fm_port=0x388 snd_jport=-1 snd_irq=5 snd_dma1=0 snd_dma1_size=NN
snd_dma2=1 snd_dma2_size=NN" to load the driver. (Without midi-support,
see the note at Yamaha OPL-3, and no joystick support).
Notes:
<UL>
<LI>the "NN" values need to be supplied, only I do not know what
would be reasonable values.</LI>
<LI>my CS4237B works fine without explicit dma size option.</LI>
</UL>
<H2><A NAME="ss5.4">5.4 The kerneld approach</A>
</H2>
<P><CODE>kerneld</CODE> is a daemon that inserts modules on request, and unloads them once
they are not in use anymore. Since I have no experience with kerneld, I
do not know if the information below is accurate. The info comes from the
INSTALL file in the ALSA-drivers package. Excellent information about kerneld
can be found in the kerneld-mini-HOWTO.
<P>Follow these steps:
<UL>
<LI>Edit your /etc/conf.modules (see below for examples)</LI>
<LI>Run 'modprobe snd-card' where card is name of your card [Which I find rather
strange, since kerneld is supposed to load them? VS]</LI>
</UL>
Example for /etc/conf.modules for Gravis UltraSound PnP soundcard:
<BLOCKQUOTE><CODE>
<PRE>
alias char-major-14 snd
alias snd-minor-oss-0 snd-interwave
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-interwave
options snd snd_major=14 snd_cards_limit=1
options snd-interwave snd_index=1 snd_id="guspnp" snd_port=0x220 snd_irq=5
snd_dma1=5 snd_dma2=6
</PRE>
</CODE></BLOCKQUOTE>
Example if you want use more soundcards in one machine (configuration below
is for Sound Blaster 16 and Gravis UltraSound Classic):
<BLOCKQUOTE><CODE>
<PRE>
alias char-major-14 snd
alias snd-minor-oss-0 snd-mixer
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-sb16
alias snd-card-1 snd-gusclassic
options snd snd_major=14 snd_cards_limit=2
options snd-sb16 snd_index=1 snd_port=0x220 snd_irq=5 snd_dma8=1 snd_dma16=5
options snd-gusclassic snd_index=2 snd_irq=11 snd_dma1=6 snd_dma2=7
</PRE>
</CODE></BLOCKQUOTE>
Example if two Gravis UltraSound Classic soundcards are present in system:
<BLOCKQUOTE><CODE>
<PRE>
alias char-major-14 snd
alias snd-minor-oss-0 snd-mixer
alias snd-minor-oss-3 snd-pcm1-oss
alias snd-minor-oss-4 snd-pcm1-oss
alias snd-minor-oss-5 snd-pcm1-oss
alias snd-minor-oss-12 snd-pcm1-oss
alias snd-card-0 snd-gusclassic
alias snd-card-1 snd-gusclassic
options snd snd_major=14 snd_cards_limit=2
options snd-gusclassic snd_index=1,2 snd_port=0x220,0x260 snd_irq=5,11
snd_dma1=5,6 snd_dma2=7,3
</PRE>
</CODE></BLOCKQUOTE>
<P>
<H2><A NAME="backw-compat"></A> <A NAME="ss5.5">5.5 Backwards compatibility</A>
</H2>
<P>If you want to preserve OSS/Free or OSS/Linux compatibility, you need to
insert one more driver: the snd-pcm1-oss driver for OSS-compatibility.
Issue a
<BLOCKQUOTE><CODE>
<PRE>
modprobe snd-pcm1-oss
</PRE>
</CODE></BLOCKQUOTE>
This will give you /dev/audio and /dev/dsp-support, just as the OSS/Free
(kernel) drivers and OSS/Linux (the $25 ones) do. Note that this is only
an emulation.
<P>
<HR>
<A HREF="Alsa-sound-6.html">Next</A>
<A HREF="Alsa-sound-4.html">Previous</A>
<A HREF="Alsa-sound.html#toc5">Contents</A>
</BODY>
</HTML>