home *** CD-ROM | disk | FTP | other *** search
/ Il CD di internet / CD.iso / SOURCE / KERNEL-S / V1.2 / LINUX-1.2 / LINUX-1 / linux / drivers / sound / Readme.linux < prev    next >
Encoding:
Text File  |  1994-08-19  |  8.4 KB  |  280 lines

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