home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.0 / LINUX-1.0 / LINUX-1 / linux / drivers / sound / Readme.linux < prev    next >
Encoding:
Text File  |  1994-01-21  |  8.1 KB  |  254 lines

  1. Sound Driver version 2.4 for Linux
  2. ----------------------------------
  3.  
  4. NOTE!    The sound driver is now a part of the Linux kernel distribution.
  5.     Check that your kernel doesn't have more recent version than this
  6.     when installing a separately distributed sound driver. The
  7.     version number of this driver is defined in the makefile.
  8.  
  9. Installation
  10. ------------
  11.  
  12. - Since this driver is a part of the Linux kernel distribution, no
  13.   special steps are required to build the driver itself.
  14.  
  15. - In case you are installing a separately distributed sound driver,
  16.   you have to do some additional steps.
  17.   - Remove all files from the linux/drivers/sound. Old files could
  18.     sometimes cause trouble.
  19.   - cd linux/drivers.
  20.   - gunzip -c snd-driv-X.Y.tar.gz|tar xvf -
  21.   - cd ./sound
  22.   - cp soundcard.h ultrasound.h /usr/include/linux
  23.  
  24. - To build the device files for this driver, you need to run the enclosed 
  25.   shell script (at the end of this file).
  26.  
  27. - Create /usr/include/sys/soundcard.h whic contains just a line:
  28. #include <linux/soundcard.h>
  29.  
  30. - Create /usr/include/sys/ultrasound.h whic contains just a line:
  31. #include <linux/ultrasound.h>
  32.  
  33. Boot time configuration (using lilo)
  34. ------------------------------------
  35.  
  36. This version of the sound driver has capability to accept the configuration
  37. parameters from the boot loader (for example lilo). By default the 
  38. driver is booted using the parameters given before compiling the driver
  39. ('make config' or 'make soundconf'). If the kernel is booted using lilo and
  40. the boot command is given manually, it's possible to give the configuration
  41. parameters on the command line. Just hold down the <Alt> key when lilo
  42. starts. Then give the boot command manually and append a sound= argument
  43. to the boot command line. For example:
  44.  
  45. lilo boot: linux sound=0x222071,0x138800
  46.  
  47. The sound= argument could contain several configuration entries separated by a
  48. comma. Each option gives the configuration for one sound device.
  49. Give the options in the order given below. Other order of use is undefined.
  50. Each option is encoded as the following:
  51.  
  52.     0xTaaaId, where
  53.           ||  ||
  54.           ||  |+----   d = DMA channel (0, 1, 3, 5, 6 or 7)
  55.           ||  +-----   I = IRQ (HEXADECIMAL!!! 1=1, ..., 9=9, 10=a, ..., 15=f)
  56.           |+-------- aaa = I/O address (hexadecimal)
  57.       +----------  T = device type  1=FM Synth (YM3812 or OPL3)
  58.                     2=SoundBlaster (1.0 to 2.0, Pro, 16)
  59.                     3=ProAudioSpectrum16
  60.                     4=Gravis UltraSound
  61.                     5=MPU-401 UART midi
  62.                     6=SB16 (16 bit DMA number)
  63.                     7=SB16 Midi (MPU-401 emulation)
  64.  
  65. These are the configuration templates for various soundcards:
  66.  
  67.     0)    Disable the sound driver
  68.         
  69.         sound=0
  70.  
  71.     1)    AdLib
  72.  
  73.         sound=0x138800
  74.  
  75.     2)    SoundBlaster family and compatibles
  76.  
  77.         sound=0x2220Id,0x138800      (remember to set the IRQ and DMA)
  78.     or if you have SB16 or SB16ASP, you have to use the following:
  79.             (use the same IRQ (the I colums) in all three places. The
  80.              the D is the 16 bit DMA channel (5 to 7) and the d is 
  81.              the 8 bit one (1 or 3). The X is the 2nd digit of the
  82.              midi IO address (3 or 0)).
  83.         sound=0x2220Id,0x6220ID,0x73X0I0,0x138800
  84.  
  85.     3)    ProAudioSpectrum16, ProAudioStudio16, Logitech Soundman16 etc.
  86.  
  87.         sound=0x3388Id,0x2220Id,0x138800 (set the DMAs and IRQs)
  88.          
  89.     4)    Gravis UltraSound
  90.  
  91.         sound=0x42X0Id    (X is 1, 2, 3 or 4. Set the DMA and IRQ)
  92.     
  93.     5)    MPU-401
  94.  
  95.         sound=0x5aaaI0
  96.  
  97. If you have more than one soundcards, you have to concatenate the options
  98. for each of the cards. There cannot be more than one sound= argument in the
  99. command line. For example use "sound=0x5aaaI0,0x138800" if you have AdLib
  100. and MPU-401 on your system. 
  101. If there are two or more sound= arguments
  102. in the boot command line, just the last one takes effect. The earlier ones
  103. will be ignored silently.
  104.  
  105. The boot time configuration feature is intended mainly for distributors of
  106. precompiled kernels. When this feature is used, drivers for all of the
  107. cards have to be enabled before compiling the driver. The configurator program
  108. doesn't enable MPU-401 when the full driver option is selected. It must be
  109. enabled by uncommenting "#define EXCLUDE_MPU401" in the sound/local.h.
  110.  
  111. Important note!
  112.  
  113. The sound driver is enabled by default. If the kernel is booted without
  114. using the sound=0 option, the sound driver is initialized using the compile
  115. time parameters. This could be dangerous (specially if the MPU-401 driver
  116. is enabled with I/O address 0x330 (used by AHA-1542 also)). If you want to
  117. compile the driver to be inactive by default, you have to append a
  118. #define SND_DEFAULT_ENABLE    0
  119. to the sound/local.h before compiling the driver.
  120.  
  121. Remember to check that the sound setup routine is included in the 
  122. bootparams structure in linux/init/main.c. It should contain the following
  123. lines:
  124.  
  125. #ifdef CONFIG_SOUND
  126.     { "sound=", sound_setup },
  127. #endif
  128.  
  129. In case these lines were not there, you have to insert them (the driver works
  130. without them but it's not possible to give the boot time parameters for the
  131. sound driver). Add also the following line somewhere near the beginning of
  132. linux/init/main.c:
  133.  
  134. extern void sound_setup(char *str, int *ints);
  135.  
  136. Problems
  137. --------
  138.  
  139. If you have any kind of problems, there is a debugging feature which
  140. could help you to solve the problem. To use it, just execute the
  141. command:
  142.  
  143.     cat /dev/sndstat 
  144.  
  145. and look at the output. It should display some usefull info about the
  146. driver configuration. If there is no /dev/sndstat 
  147. (/dev/sndstat: No such file or directory), ensure that you have executed the
  148. soundinstall script (at the end of this file). The message: 
  149. /dev/dsp: No such device means that you don't have the sound driver installed
  150. on your kernel or the driver version is earlier than 1.99.6.
  151.  
  152.  
  153. - /dev/???????: No such file or directory.
  154. Run the script at the end of this file.
  155.  
  156. - /dev/???????: No such device.
  157. You have not booted with a kernel containing the driver or the I/O address
  158. configuration doesn't match your hardaware. 
  159.  
  160. - The module player (str) plays just a second and then stops completely.
  161. You have incorrect IRQ settings (usual with SB cards).
  162.  
  163. - There is pauses in the playback of the module player (str).
  164. The str program requires more than 40% of the speed of a 486/50 to play
  165. without pauses at 44 kHz speed. A 386/25 can hardly play faster than 22 kHz.
  166. You should use lower speed (-s speed), buy a faster computer or a Gravis 
  167. UltraSound card. (If you already have GUS, you should use gmod and not the
  168. str). If the DSP_BUFFSIZE in the sound/local.h is less than (nr_channels*
  169. speed_in_Hz * (bits/8))/2, it could explain the pausing problem. Also check
  170. that the turbo swich is on and don't run applications like weather forecasting
  171. on background. Sometimes (very rarely) an IRQ conflict can cause similar
  172. problems with SB cards.
  173. If you want to play modules on a 386sx while recompiling the world, buy a GUS.
  174. It runs without burning your CPU.
  175.  
  176. Hannu Savolainen
  177. hsavolai@cs.helsinki.fi
  178.  
  179. ----------------- cut here ------------------------------
  180. #!/bin/sh
  181. #
  182. #    soudinstall        
  183. #
  184. #        by Craig Metz - cmetz@thor.tjhsst.edu
  185. #
  186. # Create the devices
  187. #
  188. #    Mixer         (14, 0)
  189. #
  190. if [ -e /dev/mixer ]; then 
  191.     rm -f /dev/mixer 
  192. fi
  193. mknod -m 666 /dev/mixer c 14 0
  194.  
  195. if [ -e /dev/mixer1 ]; then 
  196.     rm -f /dev/mixer1 
  197. fi
  198. mknod -m 666 /dev/mixer1 c 14 16
  199. #
  200. #    Sequencer    (14, 1)
  201. #
  202. if [ -e /dev/sequencer ]; then
  203.     rm -f /dev/sequencer
  204. fi
  205. mknod -m 666 /dev/sequencer c 14 1
  206. #
  207. #    MIDI        (14, 2)    [ Not implemented ]
  208. #
  209. if [ -e /dev/midi ]; then
  210.     rm -f /dev/midi
  211. fi
  212. mknod -m 666 /dev/midi c 14 2
  213. #
  214. #    DSP        (14, 3)
  215. #
  216. if [ -e /dev/dsp ]; then
  217.     rm -f /dev/dsp
  218. fi
  219. mknod -m 666 /dev/dsp c 14 3
  220. #
  221. #    SPARC audio    (14, 4)    [ Not fully implemented ]
  222. #
  223. if [ -e /dev/audio ]; then
  224.     rm -f /dev/audio
  225. fi
  226. mknod -m 666 /dev/audio c 14 4
  227. #
  228. #    DSP2        (14, 19) /dev/dsp for the second soundcard.
  229. #                Also the SB emulation part of the
  230. #                PAS16 card.
  231. #
  232. if [ -e /dev/dsp1 ]; then
  233.     rm -f /dev/dsp1
  234. fi
  235. mknod -m 666 /dev/dsp1 c 14 19
  236. #
  237. #    SPARC audio1    (14, 20) [ Not fully implemented ]
  238. #                /dev/audio for the second soundcard.
  239. #                Also the SB emulation part of the
  240. #                PAS16 card.
  241. #
  242. if [ -e /dev/audio1 ]; then
  243.     rm -f /dev/audio1
  244. fi
  245. mknod -m 666 /dev/audio1 c 14 20
  246. #
  247. #    /dev/sndstat    (14,6)    For debugging purposes
  248. #
  249. if [ -e /dev/sndstat ]; then
  250.     rm -f /dev/sndstat
  251. fi
  252. mknod -m 666 /dev/sndstat c 14 6
  253. exit 0
  254.