patch-2.2.11 linux/Documentation/sound/Introduction

Next file: linux/Documentation/sound/OPL3-SA2
Previous file: linux/Documentation/sound/AWE32
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.10/linux/Documentation/sound/Introduction linux/Documentation/sound/Introduction
@@ -1,6 +1,6 @@
-Soundcore	Notes on Modular Sound Drivers and Soundcore
+Introduction	Notes on Modular Sound Drivers and Soundcore
 Wade Hampton 
-11/20/1998
+6/30/1999
 
 Purpose:  
 ========
@@ -10,13 +10,21 @@
 
 Note, some of this probably should be added to the Sound-HOWTO!
 
+
 Copying:
 ========
 none
 
+
 History:
 ========
-0.1.0  11/20/1998  First version
+0.1.0  11/20/1998  First version, draft
+1.0.0  11/1998     Alan Cox changes, incorporation in 2.2.0
+                   as /usr/src/linux/Documentation/sound/Introduction
+1.1.0  6/30/1999   Second version, added notes on making the drivers,
+                   added info on multiple sound cards of similar types,]
+                   added more diagnostics info, added info about esd.
+                   added info on OSS and ALSA.
 
 
 Modular Sound Drivers:
@@ -58,6 +66,53 @@
 for the same or a similar feature (dma1= versus dma16=).  As a last 
 resort, inspect the code (search for MODULE_PARM).
 
+Notes:
+
+1.  There is a new OpenSource sound driver called ALSA which is
+    currently under development:  http://www.alsa-project.org/
+    I have not tried it nor am I aware of its status, but it is
+    currently under development.
+
+2.  The commercial OSS driver may be obtained from the site:
+    http://www/opensound.com.  This may be used for cards that
+    are unsupported by the kernel driver, or may be used
+    by other operating systems.  
+
+3.  The enlightenment sound daemon may be used for playing
+    multiple sounds at the same time via a single card, eliminating
+    some of the requirements for multiple sound card systems.  For
+    more information, see:  http://www.tux.org/~ricdude/EsounD.html  
+    The "esd" program may be used with the real-player and mpeg 
+    players like mpg123 and x11amp.
+
+
+Building the Modules:
+=====================
+
+This document does not provide full details on building the 
+kernel, etc.  The notes below apply only to making the kernel
+sound modules.   If this conflicts with the kernel's README,
+the README takes precedence. 
+
+1.  To make the kernel sound modules, cd to your /usr/src/linux
+    directory (typically) and type make config, make menuconfig, 
+    or make xconfig (to start the command line, dialog, or x-based
+    configuration tool).  
+
+2.  Select the Sound option and a dialog will be displayed.  
+
+3.  Select M (module) for "Sound card support".
+
+4.  Select your sound driver(s) as a module.  For ProAudio, Sound
+    Blaster, etc., select M (module) for OSS sound modules.
+    [thanks to marvin stodolsky <stodolsk@erols.com>]A
+
+5.  Make the kernel (e.g., make dep ; make bzImage), and install
+    the kernel.
+
+6.  Make the modules and install them (make modules; make modules_install).
+
+
 
 INSMOD:
 =======
@@ -82,6 +137,9 @@
 /sbin/insmod uart401
 /sbin/insmod sb io=$SB_BASE irq=$SB_IRQ dma=$SB_DMA dma16=$SB_DMA2 mpu_io=$SB_MP
 
+When using sound as a module, I typically put these commands
+in a file such as /root/soundon.sh.
+
 
 MODPROBE:
 =========
@@ -117,8 +175,8 @@
 	soundcore               1968   8  [sb sound]
 
 
-Removing Sound:
-===============
+Removing Sound: 
+=============== 
 
 Sound may be removed by using /sbin/rmmod in the reverse order
 in which you load the modules.  Note, if a program has a sound device
@@ -134,6 +192,25 @@
 /sbin/rmmod soundlow
 /sbin/rmmod soundcore
 
+When using sound as a module, I typically put these commands
+in a script such as /root/soundoff.sh.
+
+
+Removing Sound for use with OSS: 
+================================ 
+
+If you get really stuck or have a card that the kernel modules
+will not support, you can get a commercial sound driver from
+http://www.opensound.com.  Before loading the commercial sound
+driver, you should do the following:
+
+1.  remove sound modules (detailed above)
+2.  remove the sound modules from /etc/conf.modules
+3.  move the sound modules from /lib/modules/<kernel>/misc
+    (for example, I make a /lib/modules/<kernel>/misc/tmp
+    directory and copy the sound module files to that 
+    directory).
+
 
 Multiple Sound Cards:
 =====================
@@ -154,11 +231,30 @@
 first (in my case "sb") and then load the other one
 (in my case "cs4232").
 
+If you have two cards of the same type that are jumpered 
+cards or different PnP revisions, you may load the same 
+module twice.  For example, I have a SoundBlaster vibra 16
+and an older SoundBlaster 16 (jumpers).  To load the module
+twice, you need to do the following:
+
+1.  Copy the sound modules to a new name.  For example
+    sb.o could be copied (or symlinked) to sb1.o for the
+    second SoundBlaster.
+
+2.  Make a second entry in /etc/conf.modules, for example,
+    sound1 or sb1.  This second entry should refer to the
+    new module names for example sb1, and should include
+    the I/O, etc. for the second sound card.
+
+3.  Update your soundon.sh script, etc.
+
 Warning:  I have never been able to get two PnP sound cards of the
 same type to load at the same time.  I have tried this several times
 with the Soundblaster Vibra 16 cards.  OSS has indicated that this
 is a PnP problem....  If anyone has any luck doing this, please 
-send me an E-MAIL.  PCI sound cards should not have this problem.
+send me an E-MAIL.  PCI sound cards should not have this problem.a
+Since this was originally release, I have received a couple of 
+mails from people who have accomplished this!
 
 
 Sound Problems:
@@ -175,6 +271,8 @@
       write down what addresses, IRQ, and DMA channels
       those were using for the same hardware.  You probably 
       can use these addresses, IRQs, and DMA channels.
+      You should really do this BEFORE attempting to get
+      sound working!
   
   B)  Check (cat) /proc/interrupts, /proc/ioports,
       and /proc/dma.  Are you trying to use an address,
@@ -184,22 +282,44 @@
       may need a kernel patch to get this device).
   
   D)  Inspect your /var/log/messages file.  Often that will 
-      indicate what IRQ or IO port could not be obtained
+      indicate what IRQ or IO port could not be obtained.
   
   E)  Try another port or IRQ.  Note this may involve 
       using the PnP tools to move the sound card to 
-      another location.
+      another location.  Sometimes this is the only way 
+      and it is more or less trial and error.
 
-2)  If you get motorboating (the same sound or part of a 
+2)  If you get motor-boating (the same sound or part of a 
     sound clip repeated), you probably have either an IRQ
-    or DMA conflict.  Move the card to another address.  This
-    has happened to me when playing long files when I had 
-    an IRQ conflict.
+    or DMA conflict.  Move the card to another IRQ or DMA
+    port.  This has happened to me when playing long files 
+    when I had an IRQ conflict.
+
+3.  If you get dropouts or pauses when playing high sample
+    rate files such as using mpg123 or x11amp/xmms, you may 
+    have too slow of a CPU and may have to use the options to 
+    play the files at 1/2 speed.  For example, you may use
+    the -2 or -4 option on mpg123.  You may also get this
+    when trying to play mpeg files stored on a CD-ROM
+    (my Toshiba T8000 PII/366 sometimes has this problem).
+
+4.  If you get "cannot access device" errors, your /dev/dsp
+    files, etc. may be set to owner root, mode 600.  You 
+    may have to use the command:
+      chmod 666 /dev/dsp /dev/mixer /dev/audio
+
+5.  If you get "device busy" errors, another program has the
+    sound device open.  For example, if using the Enlightenment
+    sound daemon "esd", the "esd" program has the sound device.
+    If using "esd", please RTFM the docs on ESD.  For example,
+    esddsp <program> may be used to play files via a non-esd
+    aware program.
+
 
-3)  Ask for help on the sound list or send E-MAIL to the
+6)  Ask for help on the sound list or send E-MAIL to the
     sound driver author/maintainer.
 
-4)  Turn on debug in drivers/sound/sound_config.h (DEB, DDB, MDB).
+7)  Turn on debug in drivers/sound/sound_config.h (DEB, DDB, MDB).
 
 
 Configuring Sound:
@@ -210,7 +330,8 @@
 1)  Hardcoded in the kernel at compile time (not applicable when
     using sound modules).  This was the OLD way!
 
-2)  On the command line when using insmod.
+2)  On the command line when using insmod or in a bash script
+    using command line calls to load sound.
 
 3)  In /etc/conf.modules when using modprobe.
 
@@ -224,7 +345,6 @@
 Anyone want to write a linuxconf module for configuring sound?
 
 
-
 For More Information (RTFM):
 ============================
 1)  Information on kernel modules:  linux/Documentation/modules.txt
@@ -242,12 +362,17 @@
 
 7)  The sndconfig and rhsound documentation from Red Hat.
 
-8)  The Linux-sound mailing list:  sound-list@redhat.com
+8)  The Linux-sound mailing list:  sound-list@redhat.com.
+
+9)  Enlightenment documentation (for info on esd)
+    http://www.tux.org/~ricdude/EsounD.html.
 
+10) ALSA home page:  http://www.alsa-project.org/
 
 
 Contact Information:
 ====================
 Wade Hampton:  (whampton@staffnet.com)
+
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)