home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 13 / CDA13.ISO / DOC / HOWTO / OTHER_FO / SGML / SOUND_HO.GZ / Sound-HOWTO.sgml
Encoding:
SGML Document  |  1996-06-23  |  67.3 KB  |  1,699 lines

  1. <!doctype linuxdoc system> 
  2.  
  3. <article>
  4.  
  5. <title>The Linux Sound HOWTO
  6. <author>Jeff Tranter, <htmlurl url="mailto:jeff_tranter@mitel.com"
  7. name="jeff_tranter@mitel.com">
  8. <date>v1.14, 10 June 1996
  9.  
  10. <abstract>
  11. This document describes sound support for Linux. It lists the
  12. supported sound hardware, describes how to configure the kernel
  13. drivers, and answers frequently asked questions. The intent is to
  14. bring new users up to speed more quickly and reduce the amount of
  15. traffic in the Usenet news groups.
  16. </abstract>
  17.  
  18. <toc>
  19.  
  20. <sect>Introduction<p>
  21.  
  22. This is the Linux Sound HOWTO document. It is intended as a quick
  23. reference covering everything you need to know to install and
  24. configure sound support under Linux. Frequently asked questions about
  25. sound under Linux are answered, and references are given to some other
  26. sources of information on a variety of topics related to computer
  27. generated sound and music.
  28.  
  29. The scope is limited to the aspects of sound cards pertaining to
  30. Linux. See the other documents listed in the <em>References</em>
  31. section for more general information on sound cards and computer sound
  32. and music generation.
  33.  
  34. <sect1>Acknowledgments<p>
  35.  
  36. Much of this information came from the <tt>README</tt> files provided
  37. with the sound driver source code, by Hannu Savolainen (<htmlurl
  38. url="mailto:hannu@voxware.pp.fi" name="hannu@voxware.pp.fi">). Thanks
  39. go to Hannu and the many other people who developed the Linux kernel
  40. sound drivers and utilities.
  41.  
  42. Thanks to the <htmlurl
  43. url="ftp://sunsite.unc.edu/pub/Linux/utils/text/linuxdoc-sgml-1.5.tar.gz"
  44. name="Linuxdoc-SGML"> package, this HOWTO is available in several
  45. formats, all generated from a common source file.
  46.  
  47. <sect1>Revision History<p>
  48.  
  49. <descrip>
  50.  
  51. <tag>Version 1.1</tag>first version; posted to SOUND channel of Linux
  52. activists mailing list only
  53.  
  54. <tag>Version 1.2</tag>minor updates; first version available on archive sites
  55.  
  56. <tag>Version 1.3</tag>converted to SGML; now available in several formats
  57. using Matt Welsh's Linuxdoc-SGML tools; appearance changed due to new
  58. format, only minor changes to content
  59.  
  60. <tag>Version 1.4</tag>minor tweaking of SGML; added answer on PAS16
  61. and Adaptec1542A SCSI adaptor incompatibilities
  62.  
  63. <tag>Version 1.5</tag>2.5a sound driver is now in 1.1 kernel
  64. distribution; note on GUS-MAX support; other minor updates
  65.  
  66. <tag>Version 1.6</tag>added info on "no space on device" error; added
  67. note that Hacker's Guide is in a "hidden" directory; added question on
  68. bidirectional mode; info on "device busy" errors; other minor changes
  69.  
  70. <tag>Version 1.7</tag>added info on ASP and AWE32; VoxWare 2.9 is
  71. available; answer to question on using IRQ2; references to Sound and
  72. SCSI HOWTOs
  73.  
  74. <tag>Version 1.8</tag>added question on errors under DOS; many minor
  75. things updated to match the version 2.90 sound driver; info on DOOM;
  76. answer on reducing noise
  77.  
  78. <tag>Version 1.9</tag>questions on recording and clone cards
  79.  
  80. <tag>Version 1.10</tag>mentioned that HOWTO is available on WWW, as
  81. printed copies, and translations; info on DMA conflict with QIC tape
  82. driver; info on Sound Galaxy NX Pro and Logitech BusMouse
  83.  
  84. <tag>Version 1.11</tag>A long overdue update (I've been busy);
  85. document placed under GPL; brought up to date with version 3.0 sound
  86. driver; info on many new supported sound card drivers; more info on
  87. configuration and troubleshooting; lots of HTML links added; brought
  88. in line with format of CD-ROM HOWTO
  89.  
  90. <tag>Version 1.12</tag>new sound drivers in 1.3.34 kernel; new sound
  91. device names; 1542 address is 334 not 333; clarify status of Creative
  92. Labs Emu and ASP; pointer to Creative Labs and MediaTrix Web sites
  93.  
  94. <tag>Version 1.13</tag>note on the name VoxWare; updated to reflect
  95. latest supported sound cards and configuration options; question on
  96. Plug and Play support; question on block size problem; new xconfig and
  97. menuconfig options; modutils has sound device support; vger mailing
  98. list going away; emphasize author's Web site; other miscellaneous
  99. minor changes
  100.  
  101. <tag>Version 1.14</tag>Audio Excell DSP16 is not currently supported
  102. (should be working again in a few months); changes to configure
  103. program; Italian version of HOWTO available; trick for setting mixer
  104. gains when loading sound module; latest stable kernel is now 2.0; new
  105. name for sound driver; question on root permissions on sound device
  106. files
  107.  
  108. </descrip>
  109.  
  110. <sect1>New versions of this document<p>
  111.  
  112. New versions of this document will be periodically posted to the
  113. <htmlurl url="news:comp.os.linux.answers"
  114. name="comp.os.linux.answers"> newsgroup. They will also be uploaded
  115. to various anonymous ftp sites that archive such information including
  116. <url url="ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/">.
  117.  
  118. Hypertext versions of this and other Linux HOWTOs are available on
  119. many World-Wide-Web sites, including <url
  120. url="http://sunsite.unc.edu/mdw/mdw.html">. Most Linux CD-ROM
  121. distributions include the HOWTOs, often under the <url
  122. url="/usr/doc/"> directory, and you can also buy printed copies from
  123. several vendors.
  124.  
  125. A French translation of this document is available at <url
  126. url="ftp://ftp.ibp.fr/pub2/linux/french/docs/HOWTO/">.
  127.  
  128. A Japanese translation is available is available from <url
  129. url="http://yebisu.ics.es.osaka-u.ac.jp/linux/">.
  130.  
  131. An Italian translation is available is available from <url
  132. url="http://www.psico.unipd.it/ildp/docs/HOWTO/Sound-HOWTO.html">.
  133.  
  134. If you make a translation of this document into another language, let
  135. me know and I'll include a reference to it here.
  136.  
  137. <sect1>Feedback<p>
  138.  
  139. I rely on you, the users, to make this HOWTO useful. If you have any
  140. suggestions, corrections, or comments, please send them to me,
  141. <htmlurl url="mailto:jeff_tranter@mitel.com"
  142. name="jeff_tranter@mitel.com">, and I will try to incorporate
  143. them in the next revision.
  144.  
  145. I am also willing to answer general questions on sound cards and
  146. Linux, as best I can. Before doing so, <EM>please read all of the
  147. information in this HOWTO</EM>, and <EM>send me detailed information
  148. about the problem</EM>.
  149.  
  150. If you publish this document on a CD-ROM or in hardcopy form, a
  151. complimentary copy would be appreciated. Mail me for my postal
  152. address. Also consider making a donation to the Linux Documentation
  153. Project to help support free documentation for Linux. Contact the
  154. Linux HOWTO coordinator, Greg Hankins <url
  155. url="mailto:gregh@sunsite.unc.edu">, for more information.
  156.  
  157. <sect1>Distribution Policy<p>
  158.  
  159. Copyright (C) 1996 Jeff Tranter.
  160.  
  161. This HOWTO is free documentation; you can redistribute it and/or
  162. modify it under the terms of the GNU General Public License as
  163. published by the Free Software Foundation; either version 2 of the
  164. License, or (at your option) any later version.
  165.  
  166. This document is distributed in the hope that it will be useful, but
  167. <bf>without any warranty</bf>; without even the implied warranty of
  168. <bf>merchantability</bf> or <bf>fitness for a particular purpose</bf>.
  169. See the GNU General Public License for more details.
  170.  
  171. You can obtain a copy of the GNU General Public License by writing to
  172. the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139,
  173. USA.
  174.  
  175. <sect>Sound Card Technology<p>
  176.  
  177. This section gives a <em>very</em> cursory overview of computer audio
  178. technology, in order to help you understand the concepts used later in
  179. the document. You should consult a book on digital audio or digital
  180. signal processing in order to learn more.
  181.  
  182. Sound is an <em>analog</em> property; it can take on any value over a
  183. continuous range. Computers are <em>digital</em>; they like to work
  184. with discrete values. Sound cards use a device known as an <em>Analog
  185. to Digital Converter</em> (A/D or ADC) to convert voltages
  186. corresponding to analog sound waves into digital or numeric values
  187. which can be stored in memory. Similarly, a <em>Digital to Analog
  188. Converter</em> (D/A or DAC) converts numeric values back to an analog
  189. voltage which can in turn drive a loudspeaker, producing sound.
  190.  
  191. The process of analog to digital conversion, known as sampling,
  192. introduces some error. Two factors are key in determining how well the
  193. sampled signal represents the original. <em>Sampling rate</em> is the
  194. number of samples made per unit of time (usually expresses as samples
  195. per second or Hertz). A low sampling rate will provide a less accurate
  196. representation of the analog signal. Sample size is the range of
  197. values used to represent each sample, usually expressed in bits. The
  198. larger the sample size, the more accurate the digitized signal will
  199. be.
  200.  
  201. Sound cards commonly use 8 or 16 bit samples at sampling rates from
  202. about 4000 to 44,000 samples per second. The samples may also be
  203. contain one channel (mono) or two (stereo).
  204.  
  205. <em>FM Synthesis</em> is an older technique for producing sound. It is
  206. based on combining different waveforms (e.g. sine, triangle, square).
  207. FM synthesis is simpler to implement in hardware that D/A conversion,
  208. but is more difficult to program and less flexible. Many sound cards
  209. provide FM synthesis for backward compatibility with older cards and
  210. software. Several independent sound generators or <em>voices</em> are
  211. usually provided.
  212.  
  213. <em>Wavetable Synthesis</em> combines the flexibility of D/A
  214. conversion with the multiple channel capability of FM synthesis. With
  215. this scheme digitized voices can be downloaded into dedicated memory,
  216. and then played, combined, and modified with little CPU
  217. overhead. State of the art sound cards all support wavetable
  218. synthesis.
  219.  
  220. Most sound cards provide the capability of <em>mixing</em>, combining
  221. signals from different input sources and controlling gain levels.
  222.  
  223. <em>MIDI</em> stands for Musical Instrument Digital Interface, and is
  224. a standard hardware and software protocol for allowing musical
  225. instruments to communicate with each other. The events sent over a
  226. MIDI bus can also be stored as MIDI files for later editing and
  227. playback. Many sound cards provide a MIDI interface. Those that do not
  228. can still play MIDI files using the on-board capabilities of the sound
  229. card.
  230.  
  231. <em>MOD files</em> are a common format for computer generated songs.
  232. As well as information about the musical notes to be played, the files
  233. contain digitized samples for the instruments (or voices).  MOD files
  234. originated on the Amiga computer, but can be played on other systems,
  235. including Linux, with suitable software.
  236.  
  237. <sect>Supported Hardware<p>
  238.  
  239. This section lists the sound cards and interfaces that are currently
  240. supported under Linux. The information here is based on the latest
  241. Linux kernels, at time of writing.
  242.  
  243. The sound driver has its own version numbering.  The latest stable
  244. Linux kernel release was version 2.0, using sound driver version
  245. 3.5.2-960330.
  246.  
  247. The author of the sound driver, Hannu Savolainen, typically also makes
  248. available newer beta releases of the sound driver as kernel patches
  249. before they are included as part of the standard Linux kernel
  250. distribution.
  251.  
  252. This information is only valid for Linux on the Intel platform.  Some
  253. information may be applicable to other processor architectures, but I
  254. have no first hand experience or information.
  255.  
  256. <sect1>Sound Cards<p>
  257.  
  258. The following sound cards are supported by the Linux kernel sound
  259. driver:
  260.  
  261. <itemize>
  262. <item>ATI Stereo F/X
  263. <item>AdLib
  264. <item>Ensoniq SoundScape (and compatibles made by Reveal and Spea)
  265. <item>Gravis Ultrasound
  266. <item>Gravis Ultrasound ACE
  267. <item>Gravis Ultrasound Max
  268. <item>Gravis Ultrasound with 16 bit sampling option
  269. <item>Logitech Sound Man 16
  270. <item>Logitech SoundMan Games
  271. <item>Logitech SoundMan Wave
  272. <item>MAD16 Pro (OPTi 82C929)
  273. <item>Media Vision Jazz16
  274. <item>MediaTriX AudioTriX Pro
  275. <item>Microsoft Windows Sound System (MSS/WSS)
  276. <item>Mozart (OAK OTI-601)
  277. <item>Orchid SW32
  278. <item>Personal Sound System (PSS)
  279. <item>Pro Audio Spectrum 16
  280. <item>Pro Audio Studio 16    
  281. <item>Pro Sonic 16
  282. <item>Roland MPU-401 MIDI interface
  283. <item>Sound Blaster 1.0 
  284. <item>Sound Blaster 16
  285. <item>Sound Blaster 16ASP
  286. <item>Sound Blaster 2.0
  287. <item>Sound Blaster AWE32
  288. <item>Sound Blaster Pro
  289. <item>TI TM4000M notebook
  290. <item>ThunderBoard
  291. <item>Turtle Beach Tropez
  292. <item>Yamaha FM synthesizers (OPL2, OPL3 and OPL4)
  293. <item>6850 UART MIDI Interface
  294. </itemize>
  295.  
  296. The following cards are <em>not</em> supported, either because they
  297. are obsolete or because the vendor will not release the programming
  298. information needed to write a driver:
  299.  
  300. <itemize>
  301. <item>Pro Audio Spectrum (original)
  302. <item>Pro Audio Spectrum+ 
  303. <item>older (Sierra Aria based) soundcards made by Diamond
  304. </itemize>
  305.  
  306. Cards using the Plug and Play protocol are not currently supported but
  307. should be in the future.
  308.  
  309. Other sound cards that are claimed to be compatible with one of the
  310. supported sound cards <em>may</em> work if they are hardware
  311. (i.e. register level) compatible. Some cards described as "100%
  312. SoundBlaster compatible" are <em>not</em> register compatible. Some
  313. hints for getting compatible cards to work are given later in this
  314. document. If you have a card that works and is not listed here, let me
  315. know and I will add it to the list.
  316.  
  317. The Linux kernel supports the SCSI port provided on some sound cards
  318. (e.g. ProAudioSpectrum 16) and the proprietary interface for some
  319. CD-ROM drives (e.g. Soundblaster Pro). See the Linux <htmlurl
  320. url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html" name="SCSI
  321. HOWTO"> and <htmlurl
  322. url="http://sunsite.unc.edu/mdw/HOWTO/CDROM-HOWTO.html" name="CDROM
  323. HOWTO"> documents for more information.
  324.  
  325. A loadable kernel module to support joystick ports, including those
  326. provided on some sound cards, is also available.
  327.  
  328. Note that the kernel SCSI, CD-ROM, joystick, and sound drivers are
  329. completely independent of each other.
  330.  
  331. For the latest information on the sound card driver check Hannu
  332. Savolainen's World-Wide Web site listed in the References section.
  333.  
  334. <sect1>Alternate Sound Drivers<p>
  335.  
  336. There are some "unofficial" sound drivers available, not included in
  337. the standard Linux kernel distribution, and used in place of the
  338. standard sound driver.
  339.  
  340. Markus Mummert (<htmlurl url="mailto:mum@mmk.e-technik.tu-muenchen.de"
  341. name="mum@mmk.e-technik.tu-muenchen.de">) has written a driver package
  342. for the Turtle Beach MultiSound (classic), Tahiti, and Monterey
  343. soundcards. The documentation states:
  344.  
  345. <quote>
  346. "It is designed for high quality hard disk recording/playback without
  347. losing sync even on a busy system. Other features such as wave
  348. synthesis, MIDI and digital signal processor (DSP) cannot be
  349. used. Also, recording and playback at the same time is not
  350. possible. It currently replaces VoxWare and was tested on several
  351. kernel versions ranging from 1.0.9 to 1.2.1. Also, it is installable
  352. on UN*X SysV386R3.2 systems."
  353. </quote>
  354.  
  355. It can be found at <url
  356. url="http://www.cs.colorado.edu/~mccreary/tbeach">.
  357.  
  358. Kim Burgaard (<htmlurl url="mailto:burgaard@daimi.aau.dk"
  359. name="burgaard@daimi.aau.dk">) has written a device driver and
  360. utilities for the Roland MPU-401 MIDI interface. The Linux software
  361. map entry gives this description:
  362.  
  363. <quote>
  364. "A device driver for true Roland MPU-401 compatible MIDI interfaces
  365. (including Roland SCC-1 and RAP-10/ATW-10). Comes with a useful
  366. collection of utilities including a Standard MIDI File player and
  367. recorder.
  368. </quote>
  369.  
  370. <quote>
  371. Numerous improvements have been made since version 0.11a. Among other
  372. things, the driver now features IRQ sharing policy and complies with
  373. the new kernel module interface.  Metronome functionality, possibility
  374. for synchronizing e.g. graphics on a per beat basis without losing
  375. precision, advanced replay/record/overdub interface and much, much
  376. more."
  377. </quote>
  378.  
  379. It can be found at <url
  380. url="ftp://sunsite.unc.edu/pub/Linux/kernel/sound/mpu401-0.2.tar.gz">.
  381.  
  382. <sect1>PC Speaker<p>
  383.  
  384. An alternate sound driver is available that requires no additional
  385. sound hardware; it uses the internal PC speaker. It is mostly software
  386. compatible with the sound card driver, but, as might be expected,
  387. provides much lower quality output and has much more CPU overhead. The
  388. results seem to vary, being dependent on the characteristics of the
  389. individual loudspeaker. For more information, see the documentation
  390. provided with the release.
  391.  
  392. The current version is 0.9b, and can be found at
  393. <url url="ftp://ftp.informatik.hu-berlin.de/pub/os/linux/hu-sound/">
  394.  
  395. <sect1>Parallel Port<p>
  396.  
  397. Another option is to build a digital to analog converter using a
  398. parallel printer port and some additional components. This provides
  399. better sound quality than the PC speaker but still has a lot of CPU
  400. overhead. The PC sound driver package mentioned above supports this,
  401. and includes instructions for building the necessary hardware.
  402.  
  403. <sect>Installation<p>
  404.  
  405. Configuring Linux to support sound involves the following steps:
  406.  
  407. <enum>
  408. <item>Installing the sound card.
  409. <item>Configuring and building the kernel for sound support.
  410. <item>Creating the device files.
  411. <item>Booting the Linux kernel and testing the installation.
  412. </enum>
  413.  
  414. The next sections will cover each of these steps in detail.
  415.  
  416. <sect1>Installing the Sound Card<p>
  417.  
  418. Follow the manufacturer's instructions for installing the hardware or
  419. have your dealer perform the installation.
  420.  
  421. Older sound cards usually have switch or jumper settings for IRQ, DMA
  422. channel, etc; note down the values used. If you are unsure, use the
  423. factory defaults. Try to avoid conflicts with other devices
  424. (e.g. ethernet cards, SCSI host adaptors, serial and parallel ports)
  425. if possible.
  426.  
  427. <sect1>Configuring the Kernel<p>
  428.  
  429. When initially installing Linux you likely used a precompiled
  430. kernel. These kernels usually do not provide sound support. It is best
  431. to recompile the kernel yourself with the drivers you need. You may
  432. also want to recompile the kernel in order to upgrade to a newer
  433. version or to free up memory resources by minimizing the size of the
  434. kernel.
  435.  
  436. The <url url="http://sunsite.unc.edu/mdw/HOWTO/Kernel-HOWTO.html"
  437. name="Linux Kernel HOWTO"> should be consulted for the details of
  438. building a kernel. I will just mention here some issues that are
  439. specific to sound cards.
  440.  
  441. If you have never configured the kernel for sound support before it is
  442. a good idea to read <em>all</em> of the Readme files included with the
  443. kernel sound drivers, particularly information specific to your card
  444. type. The following documentation files can be found in the kernel
  445. sound driver directory, usually installed in <url
  446. url="/usr/src/linux/drivers/sound">:
  447.  
  448. <verb>
  449. CHANGELOG         - description of changes in each release
  450. COPYING           - copying and copyright restrictions
  451. Readme            - latest and most important news
  452. Readme.aedsp16    - information about Audio Excel DSP 16 sound card
  453. Readme.cards      - notes on configuring specific cards
  454. Readme.linux      - notes on installing separately release sound drivers
  455. Readme.modules    - how to build driver as a loadable kernel module
  456. Readme.v30        - new features in version 3.0 sound driver
  457. experimental.txt  - notes on experimental features
  458. </verb>
  459.  
  460. Follow the usual procedure for building the kernel. There are
  461. currently three ways to run the configuration process. A graphical
  462. user interface that runs under X11 can be invoked using "make
  463. xconfig". A menu-based system that only requires text displays is
  464. available as "make menuconfig". I will assume that you use the
  465. traditional command line configuration process invoked using "make
  466. config", although the process is similar in each case.
  467.  
  468. It is also possible to build the sound driver as a kernel loadable
  469. module. I recommend initially building the driver into the
  470. kernel. Once it is tested and working you can explore using the kernel
  471. module option.
  472.  
  473. When you run <tt>make config</tt>, enable sound support by answering
  474. "y" to the question
  475.  
  476. <tscreen><verb>
  477. Sound card support (CONFIG_SOUND) [M/n/y/?]
  478. </verb></tscreen>
  479.  
  480. At the end of the configuration questions a sound configuration
  481. program will be compiled, run, and will then ask you what sound card
  482. options you want. Be careful when answering these questions since
  483. answering a question incorrectly may prevent some later ones from
  484. being asked. For example, don't answer "yes" to the first question
  485. (PAS16) if you don't really have a PAS16. Don't enable more cards than
  486. you really need, since they just consume memory. Also some drivers
  487. (like MPU401) may conflict with your SCSI controller and prevent the
  488. kernel from booting.
  489.  
  490. I list here a brief description of each of the configuration dialog
  491. options. Answer "y" (yes) or "n" (no) to each question. The default
  492. answer is shown so that "[Y/n/?]" means "y" by default and "[N/y/?]"
  493. means the default is "n". To use the default value, just hit Enter,
  494. but remember that the default value isn't necessarily correct.
  495.  
  496. Entering a question mark ("?") will produce a short descriptive
  497. message describing that configuration option.
  498.  
  499. Note also that all questions may not be asked. The configuration
  500. program may disable some questions depending on the earlier
  501. choices. It may also select some options automatically as well.
  502.  
  503. <descrip>
  504.  
  505. <tag>Old configuration exists in /etc/soundconf. Use it [Y/n/?]</tag>
  506.  
  507. If you have previously compiled the kernel for sound support, then the
  508. previous configuration can be saved. If you want to use the previous
  509. setup, answer "y". If you are trying a different configuration or have
  510. upgraded to a newer kernel, you should answer "n" and go through the
  511. configuration process.
  512.  
  513. <tag>ProAudioSpectrum 16 support [Y/n/?]</tag>
  514.  
  515. Answer "y" <em>only</em> if you have a Pro Audio Spectrum <em>16</em>,
  516. ProAudio Studio 16 or Logitech SoundMan 16.  Don't answer 'y' if you
  517. have some other card made by Media Vision or Logitech since they are
  518. not PAS16 compatible.
  519.  
  520. <tag>SoundBlaster support [Y/n/?]</tag>
  521.  
  522. Answer "y" if you have an original SoundBlaster card made by Creative
  523. Labs or a 100% hardware compatible clone (like the Thunderboard or SM
  524. Games). If your card was in the list of supported cards look at the
  525. card specific instructions in the <tt>Readme.cards</tt> file before
  526. answering this question. For an unknown card you may answer "y'"if the
  527. card claims to be SoundBlaster compatible.
  528.  
  529. <tag>Gravis Ultrasound support [Y/n/?]</tag>
  530.  
  531. Answer "y" if you have a GUS or GUS MAX. Answer "n" if you don't have
  532. a GUS since the driver consumes a lot of memory.
  533.  
  534. <tag>MPU-401 support (NOT for SB16) [Y/n/?]</tag>
  535.  
  536. Be careful with this question. The MPU401 interface is supported by
  537. almost all soundcards. However, some natively supported cards have
  538. their own driver for MPU401. Enabling the MPU401 option with these
  539. cards will cause a conflict. Also enabling MPU401 on a system that
  540. doesn't really have a MPU401 could cause some trouble. If your card
  541. was in the list of supported cards, look at the card specific
  542. instructions in the <tt>Readme.cards</tt> file. It's safe to answer
  543. "y" if you have a true MPU401 MIDI interface card.
  544.  
  545. <tag>6850 UART Midi support [Y/n/?]</tag>
  546.  
  547. It's safe to answer "n" to this question in all cases. The 6850 UART
  548. interface is very rarely used.
  549.  
  550. <tag>PSS (ECHO-ADI2111) support [Y/n/?]</tag>
  551.  
  552. Answer "y" only if you have Orchid SW32, Cardinal DSP16 or some other
  553. card based on the PSS chipset (AD1848 codec + ADSP-2115 DSP chip +
  554. Echo ESC614 ASIC CHIP).
  555.  
  556. <tag>16 bit sampling option of GUS (<em>not</em> GUS MAX) [Y/n/?]</tag>
  557.  
  558. Answer "y" if you have installed the 16 bit sampling daughtercard on
  559. your GUS. Answer "n" if you have a GUS MAX. Enabling this option
  560. disables GUS MAX support.
  561.  
  562. <tag>GUS MAX support [Y/n/?]</tag>
  563.  
  564. Answer "y" only if you have a GUS MAX.
  565.  
  566. <tag>Microsoft Sound System support [Y/n/?]</tag>
  567.  
  568. Again think carefully before answering "y" to this question. It's safe
  569. to answer "y" if you have the original Windows Sound System card made
  570. by Microsoft or Aztech SG 16 Pro (or NX16 Pro).  Also you may answer
  571. "y" in case your card was not listed earlier in this file. For cards
  572. having native support in VoxWare, consult the card specific
  573. instructions in <tt>Readme.cards</tt>. Some drivers have their own MSS
  574. support and enabling this option will cause a conflict.
  575.  
  576. <tag>Ensoniq Soundscape support [Y/n/?]</tag>
  577.  
  578. Answer "y" if you have a soundcard based on the Ensoniq SoundScape
  579. chipset. Such cards are being manufactured at least by Ensoniq, Spea
  580. and Reveal (Reveal makes other cards also).
  581.  
  582. <tag>MediaTriX AudioTriX Pro support [Y/n/?]</tag>
  583.  
  584. Answer "y" if you have the AudioTriX Pro.
  585.  
  586. <TAG>Support for MAD16 and/or Mozart based cards?</TAG>
  587.  
  588. Answer "y" if your card has a Mozart (OAK OTI-601) or MAD16 (OPTi
  589. 82C928 or 82C929) audio interface chip. These chips are currently
  590. quite common so it's possible that many no-name cards have one of
  591. them. In addition the MAD16 chip is used in some cards made by known
  592. manufacturers such as Turtle Beach (Tropez), Reveal (some models) and
  593. Diamond (latest ones).
  594.  
  595. <TAG>Support for Crystal CS4232 based (PnP) cards [Y/n/?]</TAG>
  596.  
  597. Answer "y" if you have a card based on the Crystal CS4232 chip set.
  598.  
  599. <TAG>Support for Turtle Beach Wave Front (Maui, Tropez) synthesizers
  600. [Y/n/?]</TAG>
  601.  
  602. Answer "y" if you have any of these cards.
  603.  
  604. <TAG>SoundBlaster Pro support [Y/n/?]</TAG>
  605.  
  606. Enable this option if your card is a SoundBlaster Pro or SoundBlaster
  607. 16. Enable it also with any SoundBlaster Pro clones. Answering "n"
  608. saves some memory but "y" is the safe alternative.
  609.  
  610. <tag>SoundBlaster 16 support [Y/n/?]</tag>
  611.  
  612. Enable if you have a SoundBlaster 16 (including the AWE32).
  613.  
  614. <tag>Audio Excel DSP 16 initialization support [Y/n/?]</tag>
  615.  
  616. Enable this if you have an Audio Excel DSP16 card. See the file
  617. <tt>Readme.aedsp16</tt> for more information.
  618.  
  619. </descrip>
  620.  
  621. The configuration program then asks some questions about the
  622. higher level services. It's recommended to answer "y" to each of these
  623. questions. Answer "n" only if you know you will not need the option.
  624.  
  625. <descrip>
  626.  
  627. <tag>/dev/dsp and /dev/audio support (usually required) [Y/n/?]</tag>
  628.  
  629. Answering "n" disables <tt>/dev/dsp</tt> and <tt>/dev/audio</tt>, the
  630. A/D and D/A converter devices. Answer "y".
  631.  
  632. <tag>MIDI interface support [Y/n/?]</tag>
  633.  
  634. Answering "n" disables <tt>/dev/midixx</tt> devices and access to any
  635. MIDI ports using <tt>/dev/sequencer</tt> and <tt>/dev/music</tt>. This
  636. option also affects any MPU401 and/or General MIDI compatible devices.
  637.  
  638. <tag>FM synthesizer (YM3812/OPL-3) support [Y/n/?]</tag>
  639.  
  640. Answer "y" here.
  641.  
  642. <tag>/dev/sequencer support [Y/n/?]</tag>
  643.  
  644. Answering "n" disables <tt>/dev/sequencer</tt> and <tt>/dev/music</tt>
  645.  
  646. <TAG>Do you want support for the mixer of SG NX Pro ?</TAG>
  647.  
  648. Answer "y" if you have a Sound Galaxy NX Pro sound card and want
  649. support for its extended mixer functions.
  650.  
  651. <TAG>Do you want support for the MV Jazz16 (ProSonic etc.) ?</TAG>
  652.  
  653. Answer "y" if you have an MV Jazz16 sound card.
  654.  
  655. <TAG>Do you have a Logitech SoundMan Games [Y/n/?]</TAG>
  656.  
  657. Answer "y" if you have a Logitech SoundMan Games sound card.
  658.  
  659. </descrip>
  660.  
  661. After the above questions the configuration program prompts for the
  662. card specific configuration information. Usually just a set of I/O
  663. address, IRQ and DMA numbers are asked. With some cards the program
  664. asks for some files to be used during initialization of the
  665. card. These are used by cards which have a DSP chip or microprocessor
  666. which must be initialized by downloading a program (microcode) file to
  667. the card. In some cases this file is written to a .h file by the
  668. config program and then included to the driver during compile. Again,
  669. read the information in the file <tt>Readme.cards</tt> pertaining to
  670. your card type.
  671.  
  672. At the end you will be prompted:
  673.  
  674. <tscreen><verb>
  675. The sound driver is now configured.
  676. Save copy of this configuration to /etc/soundconf [Y/n/?]
  677. </verb></tscreen>
  678.  
  679. Normally you would enter "y" so that if you later need to recompile
  680. the kernel you have the option of using the same sound driver
  681. configuration.
  682.  
  683. If you are upgrading from an older sound driver, make sure that the
  684. files <tt>/usr/include/sys/soundcard.h</tt> and
  685. <tt>/usr/include/sys/ultrasound.h</tt> are symbolic links to the
  686. corresponding files in <tt>/usr/include/linux</tt>, or that they
  687. simply contain the lines <tt>#include <linux/soundcard.h></tt>
  688. and <tt>#include <linux/ultrasound.h></tt>, respectively.
  689.  
  690. You are now ready to compile and install the new kernel.
  691.  
  692. <sect1>Creating the Device Files<p>
  693.  
  694. The first time the kernel sound driver is configured you need to
  695. create the sound device files. The easiest way to do this is to cut
  696. the short shell script from the end of the file <tt>Readme.linux</tt>
  697. in the directory <tt>/usr/src/linux/drivers/sound</tt>, and run it as
  698. user <tt>root</tt>.
  699.  
  700. If your device entries already exist, you might want to ensure they
  701. are correct. If they are not, or if you are in doubt, run the above
  702. script and it will replace any existing entries with correct ones.
  703.  
  704. Some older Linux distributions provided install scripts which created
  705. incorrect sound device files. You may also have a
  706. <tt>/dev/MAKEDEV</tt> script for creating device files. Using the
  707. script included with the kernel sound driver is preferred since it
  708. should always be up to date with the latest supported sound devices.
  709.  
  710. After running the script your sound device files should look something
  711. like this:
  712.  
  713. <verb>
  714. lrwxrwxrwx   1 root        11 Aug 22 00:01 audio -> /dev/audio0
  715. crw-rw-rw-   1 root   14,   4 Aug 22 00:01 audio0
  716. crw-rw-rw-   1 root   14,  20 Aug 22 00:01 audio1
  717. lrwxrwxrwx   1 root         9 Aug 22 00:01 dsp -> /dev/dsp0
  718. crw-rw-rw-   1 root   14,   3 Aug 22 00:01 dsp0
  719. crw-rw-rw-   1 root   14,  19 Aug 22 00:01 dsp1
  720. crw-rw-rw-   1 root   14,   2 Aug 22 00:01 midi00
  721. crw-rw-rw-   1 root   14,  18 Aug 22 00:01 midi01
  722. crw-rw-rw-   1 root   14,  34 Aug 22 00:01 midi02
  723. crw-rw-rw-   1 root   14,  50 Aug 22 00:01 midi03
  724. crw-rw-rw-   1 root   14,   0 Aug 22 00:01 mixer
  725. crw-rw-rw-   1 root   14,  16 Aug 22 00:01 mixer1
  726. crw-rw-rw-   1 root   14,   8 Aug 22 00:01 music
  727. crw-rw-rw-   1 root   14,  17 Aug 22 00:01 patmgr0
  728. crw-rw-rw-   1 root   14,  33 Aug 22 00:01 patmgr1
  729. crw-rw-rw-   1 root   14,   1 Aug 22 00:01 sequencer
  730. lrwxrwxrwx   1 root        10 Aug 22 00:01 sequencer2 -> /dev/music
  731. crw-rw-rw-   1 root   14,   6 Aug 22 00:01 sndstat
  732. </verb>
  733.  
  734. Pay particular attention to the device names and the major and minor
  735. device numbers listed in the fourth and fifth columns.
  736.  
  737. If you are using the PC speaker sound driver, read the documentation
  738. that came with the package to determine what device files to create.
  739.  
  740. Normally the configuration you used when building the kernel will be
  741. acceptable to the sound card driver. It is also possible to pass
  742. parameters on the kernel command line (e.g. from LILO) to configure
  743. the sound driver. These are defined in the file <tt>Readme.linux</tt>.
  744. It should rarely be necessary to use these. They are mainly intended
  745. for developers of Linux boot disks to create a kernel that supports
  746. multiple types of sound cards.
  747.  
  748. <sect1>Booting Linux and Testing the Installation<p>
  749.  
  750. You should now be ready to boot the new kernel and test the sound
  751. drivers. Follow your usual procedure for installing and rebooting the
  752. new kernel (keep the old kernel around in case of problems, of
  753. course).
  754.  
  755. During booting, check for a message such as the following on powerup
  756. (if they scroll by too quickly to read, you may be able to retrieve
  757. them with the "dmesg" command):
  758.  
  759. <tscreen><verb>
  760. snd2 <SoundBlaster Pro 3.2> at 0x220 irq 5 drq 1
  761. snd1 <Yamaha OPL-3 FM> at 0x388 irq 0 drq 0
  762. </verb></tscreen>
  763.  
  764. This should match your sound card type and jumper settings (if any).
  765.  
  766. The driver may also display some error messages and warnings during
  767. boot. Watch for these when booting the first time after configuring
  768. the sound driver.
  769.  
  770. Next you should check the device file <tt>/dev/sndstat</tt>.  Reading
  771. the sound driver status device file should provide additional
  772. information on whether the sound card driver initialized
  773. properly. Sample output should look something like this:
  774.  
  775. <tscreen><verb>
  776. % cat /dev/sndstat
  777. Sound Driver:3.5.2-960330 (Tue  4 16:31:10 EDT 1996 root,
  778. Linux fizzbin 2.0.0 #1 Mon Jun 3 16:59:37 EDT 1996 i386)
  779. Kernel: Linux fizzbin 2.0.0 #1 Tue Jun 4 16:57:55 EDT 1996 i386
  780. Config options: a80002
  781.  
  782. Installed drivers: 
  783. Type 1: OPL-2/OPL-3 FM
  784. Type 2: SoundBlaster
  785. Type 6: SoundBlaster 16bit
  786. Type 7: SB MPU
  787.  
  788. Card config: 
  789. SoundBlaster at 0x220 irq 5 drq 1,5
  790. OPL-2/OPL-3 FM at 0x388 irq 0 drq 0
  791.  
  792. Audio devices:
  793. 0: SoundBlaster Pro 3.2
  794.  
  795. Synth devices:
  796. 0: Yamaha OPL-3
  797.  
  798. Midi devices:
  799. 0: SoundBlaster
  800.  
  801. Timers:
  802. 0: System clock
  803.  
  804. Mixers:
  805. 0: SoundBlaster
  806. </verb></tscreen>
  807.  
  808. Now you should be ready to play a simple sound file. Get hold of a
  809. sound sample file, and send it to the sound device as a basic check of
  810. sound output, e.g.
  811.  
  812. <tscreen><verb>
  813. % cat endoftheworld >/dev/dsp
  814. % cat crash.au >/dev/audio
  815. </verb></tscreen>
  816.  
  817. (Make sure you don't omit the ">" in the commands above).
  818.  
  819. Some sample sound files can be obtained from <url
  820. url="ftp://tsx-11.mit.edu/pub/linux/packages/sound/snd-data-0.1.tar.Z">
  821.  
  822. Now you can verify sound recording. If you have sound input
  823. capability, you can do a quick test of this using commands such as the
  824. following:
  825.  
  826. <tscreen><verb>
  827. # record 4 seconds of audio from microphone
  828. EDT% dd bs=8k count=4 &etago;dev/audio >sample.au
  829. 4+0 records in
  830. 4+0 records out
  831. # play back sound
  832. % cat sample.au >/dev/audio
  833. </verb></tscreen>
  834.  
  835. Obviously for this to work you need a microphone connected to the
  836. sound card and you should speak into it. You may also need to obtain a
  837. mixer program to set the microphone as the input device and adjust the
  838. recording gain level.
  839.  
  840. If these tests pass, you can be reasonably confident that the sound
  841. D/A and A/D hardware and software are working. If you experience
  842. problems, refer to the next section of this document.
  843.  
  844. <sect1>Troubleshooting<p>
  845.  
  846. If you still encounter problems after following the instructions in
  847. the HOWTO, here are some things to check. The checks are listed in
  848. increasing order of complexity. If a check fails, solve the problem
  849. before moving to the next stage.
  850.  
  851. <sect2>Step 1: Make sure you are really running the kernel you compiled.<p>
  852.  
  853. You can check the date stamp on the kernel to see if you are running
  854. the one that you compiled with sound support. You can do this with the
  855. <tt>uname</tt> command:
  856.  
  857. <tscreen><verb>
  858. % uname -a
  859. Linux fizzbin 2.0.0 #1 Tue Jun 4 16:57:55 EDT 1996 i386
  860. </verb></tscreen>
  861.  
  862. or by displaying the file <tt>/proc/version</tt>:
  863.  
  864. <tscreen><verb>
  865. % cat /proc/version
  866. Linux version 2.0.0 (root@fizzbin) (gcc version 2.7.0) #1 Tue Jun 4 16:57:55 EDT 1996
  867. </verb></tscreen>
  868.  
  869. If the date stamp doesn't seem to match when you compiled the kernel,
  870. then you are running an old kernel. Did you really reboot? If you use
  871. LILO, did you re-install it (typically by running
  872. <tt>/etc/lilo/install</tt>)? If booting from floppy, did you create a
  873. new boot floppy and use it when booting?
  874.  
  875. <sect2>Step 2: Make sure the kernel sound drivers are compiled in.<p>
  876.  
  877. You can see what drivers are compiled in by looking at
  878. <tt>/proc/devices</tt>:
  879.  
  880. <tscreen><verb>
  881. % cat /proc/devices
  882. Character devices:
  883.  1 mem
  884.  4 tty
  885.  5 cua
  886.  6 lp
  887. 14 sound
  888. 15 Joystick
  889.  
  890. Block devices:
  891.  2 fd
  892.  3 hd
  893. 25 sbpcd
  894. </verb></tscreen>
  895.  
  896. What we are looking for here is character device 14, labeled "sound".
  897. If the sound device is not listed then something went wrong with the
  898. kernel configuration or build. Start the installation process again,
  899. beginning with configuration and building of the kernel.
  900.  
  901. <sect2>Step 3: Did the kernel detect your sound card during booting?<p>
  902.  
  903. Make sure that the sound card was detected when the kernel booted. You
  904. should have seen a message on bootup. If the messages scrolled off the
  905. screen, you can usually recall them using the <tt>dmesg</tt> command:
  906.  
  907. <tscreen><verb>
  908. % dmesg
  909. </verb></tscreen>
  910.  
  911. or
  912.  
  913. <tscreen><verb>
  914. % tail /var/adm/messages
  915. </verb></tscreen>
  916.  
  917. If your sound card was not found then something is wrong. Make sure it
  918. really is installed. If the sound card works under DOS then you can be
  919. reasonably confident that the hardware is working, so it is likely a
  920. problem with the kernel configuration. Either you configured your
  921. sound card as the wrong type or wrong parameters, or your sound card
  922. is not compatible with any of the Linux kernel sound card drivers.
  923.  
  924. One possibility is that your sound card is one of the "compatible"
  925. type that requires initialization by the DOS driver. Try booting DOS
  926. and loading the vendor supplied sound card driver. Then soft boot
  927. Linux using <tt>Control-Alt-Delete</tt>. Make sure that card I/O
  928. address, DMA, and IRQ settings for Linux are the same as used under
  929. DOS.  Read the <tt>Readme.cards</tt> file from the sound driver source
  930. distribution for hints on configuring your card type.
  931.  
  932. If your sound card is not listed in this document, it is possible that
  933. the Linux drivers do not support it. You can check with some of the
  934. references listed at the end of this document for assistance.
  935.  
  936. <sect2>Step 4: Can you read data from the dsp device?<p>
  937.  
  938. Try reading from the <tt>/dev/audio</tt> device using the <tt>dd</tt>
  939. command listed earlier in this document. The command should run
  940. without errors.
  941.  
  942. If this does not work, then a possible cause is the device file. Make
  943. sure than the device files in the <tt>/dev</tt> directory has the
  944. correct major and minor numbers as listed previously. Check that the
  945. permissions on the device file allow reading and writing.
  946.  
  947. A remote possibility is a hardware problem. Try testing the drive
  948. under DOS, if possible, to determine if this could be the case.
  949.  
  950. <sect2>When All Else Fails<p>
  951.  
  952. If you still have problems, here are some final suggestions for things
  953. to try:
  954.  
  955. <itemize>
  956. <item>carefully re-read this HOWTO document
  957. <item>read the references listed at the end of this document,
  958. especially the relevant kernel source Readme files
  959. <item>post a question to one of the <tt>comp.os.linux</tt> or
  960. other usenet newsgroups
  961. <item>send a question to the Sound channel of the Linux mailing list
  962. <item>try using the latest Linux kernel
  963. <item>contact your computer dealer
  964. <item>contact the sound card manufacturer
  965. <item>send mail to the author of the sound driver
  966. <item>send mail to the author of the Sound HOWTO
  967. <item>fire up emacs and type <tt>Esc-x doctor</tt>
  968. </itemize>
  969.  
  970. <sect>Applications Supporting Sound<p>
  971.  
  972. I give here a sample of the types of applications that you likely want
  973. if you have a sound card under Linux. You can check the Linux Software
  974. Map, Internet archive sites, and/or files on your Linux CD-ROM for
  975. more up to date information.
  976.  
  977. As a minimum, you will likely want to obtain the following sound
  978. applications:
  979.  
  980. <itemize>
  981. <item>audio file format conversion utility (e.g. <tt>Sox</tt>)
  982. <item>mixer utility (e.g. <tt>aumix</tt> or <tt>xmix</tt>)
  983. <item>digitized file player/recorder (e.g. <tt>play</tt> or <tt>wavplay</tt>)
  984. <item>MOD file player (e.g. <tt>tracker</tt>)
  985. <item>MIDI file player (e.g. <tt>mp</tt>)
  986. </itemize>
  987.  
  988. There are text-based as well as GUI-based versions of most of these
  989. tools. There are also some more esoteric applications (e.g. speech
  990. synthesis and recognition) that you may wish to try.
  991.  
  992. <sect>Answers To Frequently Asked Questions<p>
  993.  
  994. This section answers some of the questions that have been commonly
  995. asked on the Usenet news groups and mailing lists.
  996.  
  997. <sect1>What are the various sound device files?<p>
  998.  
  999. These are the most "standard" device file names, some Linux
  1000. distributions may use slightly different names.
  1001.  
  1002. <descrip>
  1003. <tag>/dev/audio</tag>normally a link to <tt>/dev/audio0</tt>
  1004. <tag>/dev/audio0</tag>Sun workstation compatible audio device (only
  1005. a partial implementation, does not support Sun ioctl interface, just
  1006. u-law encoding)
  1007. <tag>/dev/audio1</tag>second audio device (if supported by sound card)
  1008. <tag>/dev/dsp</tag>normally a link to <tt>/dev/dsp0</tt>
  1009. <tag>/dev/dsp0</tag>first digital sampling device
  1010. <tag>/dev/dsp1</tag>second digital sampling device
  1011. <tag>/dev/mixer</tag>sound mixer
  1012. <tag>/dev/mixer1</tag>second sound mixer
  1013. <tag>/dev/music</tag>high-level sequencer interface
  1014. <tag>/dev/patmgr0</tag>Patch Manager
  1015. <tag>/dev/patmgr1</tag>Patch Manager
  1016. <tag>/dev/sequencer</tag>low level MIDI, FM, and GUS access
  1017. <tag>/dev/sequencer2</tag>normally a link to <tt>/dev/music</tt>
  1018. <tag>/dev/midi00</tag>1st raw MIDI port
  1019. <tag>/dev/midi01</tag>2nd raw MIDI port
  1020. <tag>/dev/midi02</tag>3rd raw MIDI port
  1021. <tag>/dev/midi03</tag>4th raw MIDI port
  1022. <tag>/dev/sndstat</tag>displays sound driver status when read
  1023. </descrip>
  1024.  
  1025. The PC speaker driver provides the following devices:
  1026.  
  1027. <descrip>
  1028. <tag>/dev/pcaudio</tag>equivalent to /dev/audio
  1029. <tag>/dev/pcsp</tag>equivalent to /dev/dsp
  1030. <tag>/dev/pcmixer</tag>equivalent to /dev/mixer
  1031. </descrip>
  1032.  
  1033. <sect1>How can I play a sound sample?<p>
  1034.  
  1035. Sun workstation (.au) sound files can be played by sending them to the
  1036. <tt>/dev/audio</tt> device. Raw samples can be sent to
  1037. <tt>/dev/dsp</tt>. Using a program such as <tt>play</tt> is
  1038. preferable, as it will recognize most file types and set the sound
  1039. card to the correct sampling rate, etc.
  1040.  
  1041. <sect1>How can I record a sample?<p>
  1042.  
  1043. Reading <tt>/dev/audio</tt> or <tt>/dev/dsp</tt> will return sampled
  1044. data that can be redirected to a file. A program such as <tt>vrec</tt>
  1045. makes it easier to control the sampling rate, duration, etc. You may
  1046. also need a mixer program to select the appropriate input device.
  1047.  
  1048. <sect1>Can I have more than one sound card?<p>
  1049.  
  1050. Up to two sound cards is supported. It's possible to install a Gravis
  1051. UltraSound or MPU-401 with a SoundBlaster, SoundBlaster Pro,
  1052. SoundBlaster16 or ProAudioSpectrum16. It's <em>not</em> possible to
  1053. have a ProAudioSpectrum16 and SoundBlaster at the same time (the PAS16
  1054. has an SB emulator in it). It's also not possible to have more than
  1055. one card of the same type at the same time -- for example, a GUS + GUS
  1056. combination is not possible.
  1057.  
  1058. You can change the sound card configuration parameters at boot time
  1059. using command line options from a boot loader such as LILO. See the
  1060. kernel sound driver file <tt>Readme.linux</tt> for details.
  1061.  
  1062. <sect1>Error: <tt>No such file or directory</tt> for sound devices<p>
  1063.  
  1064. You need to create the sound driver device files. See the section on
  1065. creating device files. If you do have the device files, ensure that
  1066. they have the correct major and minor device numbers (some older
  1067. CD-ROM distributions of Linux may not create the correct device files
  1068. during installation).
  1069.  
  1070. <sect1>Error: <tt>No such device</tt> for sound devices<p>
  1071.  
  1072. You have not booted with a kernel containing the sound driver or the
  1073. I/O address configuration doesn't match your hardware. Check that you
  1074. are running the newly compiled kernel and verify that the settings
  1075. entered when configuring the sound driver match your hardware setup.
  1076.  
  1077. <sect1>Error: <tt>No space left on device</tt> for sound devices<p>
  1078.  
  1079. This can happen if you tried to record data to /dev/audio or /dev/dsp
  1080. without creating the necessary device file. The sound device is now a
  1081. regular file, and has filled up your disk partition. You need to run
  1082. the script described in the <em>Creating the Device Files</em> section
  1083. of this document.
  1084.  
  1085. <sect1>Error: <tt>device busy</tt> for sound devices<p>
  1086.  
  1087. Only one process can open a given sound device at one time. Most
  1088. likely some other process is using the device in question. One way to
  1089. determine this is to use the fuser command:
  1090.  
  1091. <tscreen><verb>
  1092. % fuser -v /dev/dsp
  1093. /dev/dsp:             USER       PID ACCESS COMMAND
  1094.                       tranter    265 f....  tracker
  1095. </verb></tscreen>
  1096.  
  1097. In the above example, the fuser command showed that process 265 had
  1098. the device open. Waiting for the process to complete or killing it
  1099. will allow the sound device to be accessed once again.
  1100.  
  1101. <sect1>I still get <tt>device busy</tt> errors!<p>
  1102.  
  1103. According to Brian Gough, for the SoundBlaster cards which use DMA
  1104. channel 1 there is a potential conflict with the QIC-02 tape driver,
  1105. which also uses DMA 1, causing "device busy" errors. If you are using
  1106. FTAPE, you may have this driver enabled. According to the FTAPE-HOWTO
  1107. the QIC-02 driver is not essential for the use of FTAPE; only the
  1108. QIC-117 driver is required. Reconfiguring the kernel to use QIC-117
  1109. but not QIC-02 allows FTAPE and the sound-driver to coexist.
  1110.  
  1111. (the following explanation was supplied by Harald Albrecht
  1112. <tt>albrecht@igpm.rwth-aachen.de</tt>)
  1113.  
  1114. Some soundcards support using DMA channel 0. The sound driver
  1115. configuration program allows this, and the kernel compiles properly,
  1116. but accessing the sound device results in a "device busy" error
  1117. message.
  1118.  
  1119. The reason is that the Linux kernel reserves DMA channel 0 for DRAM
  1120. refresh. This is no longer true for modern 386/486 boards which use
  1121. their own refresh logic. You can correct it by changing this line in
  1122. the file /usr/src/linux/kernel/dma.c:
  1123.  
  1124. <tscreen><verb>
  1125. static volatile unsigned int dma_chan_busy[MAX_DMA_CHANNELS] = {
  1126.         1, 0, 0, 0, 1, 0, 0, 0
  1127. };
  1128. </verb></tscreen>
  1129.  
  1130. Replace the first 1 with a 0; this enables DMA channel 0. Don't do the
  1131. same with DMA channel 4 as this is cascade and won't work! The code
  1132. should now look like this:
  1133.  
  1134. <tscreen><verb>
  1135. static volatile unsigned int dma_chan_busy[MAX_DMA_CHANNELS] = {
  1136.         0, 0, 0, 0, 1, 0, 0, 0
  1137. };
  1138. </verb></tscreen>
  1139.  
  1140. Recompile and reboot with the new kernel.
  1141.  
  1142. <sect1>Partial playback of digitized sound file<p>
  1143.  
  1144. The symptom is usually that a sound sample plays for about a second
  1145. and then stops completely or reports an error message about "missing
  1146. IRQ" or "DMA timeout". Most likely you have incorrect IRQ or DMA
  1147. channel settings. Verify that the kernel configuration matches the
  1148. sound card jumper settings and that they do not conflict with some
  1149. other card.
  1150.  
  1151. Another symptom is sound samples that "loop". This is usually caused
  1152. by an IRQ conflict.
  1153.  
  1154. <sect1>There are pauses when playing MOD files<p>
  1155.  
  1156. Playing MOD files requires considerable CPU power. You may have too
  1157. many processes running or your computer may be too slow to play in
  1158. real time. Your options are to:
  1159.  
  1160. <itemize>
  1161. <item>try playing with a lower sampling rate or in mono mode
  1162. <item>eliminate other processes
  1163. <item>buy a faster computer
  1164. <item>buy a more powerful sound card (e.g. Gravis UltraSound)
  1165. </itemize>
  1166.  
  1167. If you have a Gravis UltraSound card, you should use one of the mod
  1168. file players written specifically for the GUS (e.g. <tt>gmod</tt>).
  1169.  
  1170. <sect1>Compile errors when compiling sound applications<p>
  1171.  
  1172. The version 1.0c and earlier sound driver used a different and
  1173. incompatible <tt>ioctl()</tt> scheme. Obtain newer source code or make
  1174. the necessary changes to adapt it to the new sound driver. See the
  1175. sound driver <tt>Readme</tt> file for details.
  1176.  
  1177. Also ensure that you have used the latest version of
  1178. <tt>soundcard.h</tt> and <tt>ultrasound.h</tt> when compiling the
  1179. application. See the installation instructions at beginning of this
  1180. text.
  1181.  
  1182. <sect1>SEGV when running sound binaries that worked previously<p>
  1183.  
  1184. This is probably the same problem described in the previous question.
  1185.  
  1186. <sect1>What known bugs or limitations are there in the sound driver?<p>
  1187.  
  1188. See the <tt>Readme</tt> and <tt>CHANGELOG</tt> files included with the
  1189. sound driver kernel source.
  1190.  
  1191. <sect1>What do all the sound driver configuration options mean?<p>
  1192.  
  1193. During configuration of the sound driver, a <tt>configure</tt> program
  1194. is compiled and executed. This program asks you some questions and
  1195. then generates the header file <tt>local.h</tt> that defines the sound
  1196. card configuration.
  1197.  
  1198. The configuration file defines (or undefines) the following
  1199. symbols:
  1200.  
  1201. <verb>
  1202. Symbol            Meaning
  1203. ======            =======
  1204. KERNEL_SOUNDCARD    enable/disable sound driver
  1205. EXCLUDE_PAS        ProAudioSpectrum support
  1206. EXCLUDE_SB        SoundBlaster support
  1207. EXCLUDE_ADLIB        AdLib support
  1208. EXCLUDE_GUS        Gravis UltraSound support
  1209. EXCLUDE_MPU401        MPU-401 MIDI interface support
  1210. EXCLUDE_UART6850    6850 MIDI UART support
  1211. EXCLUDE_PSS        Professional Sound System support
  1212. EXCLUDE_GUS16        Gravis UltraSound support
  1213. EXCLUDE_GUSMAX        Gravis UltraSound Max support
  1214. EXCLUDE_MSS        Microsoft Sound System support
  1215. EXCLUDE_SBPRO        SoundBlaster Pro support
  1216. EXCLUDE_SB16        SoundBlaster 16 support
  1217. EXCLUDE_AUDIO        Digitized voice support
  1218. EXCLUDE_MIDI        MIDI interface support
  1219. EXCLUDE_YM3812        FM synthesizer (YM3812/OPL-3) support
  1220. EXCLUDE_SEQUENCER    MIDI sequencer support
  1221. EXCLUDE_PRO_MIDI    SoundBlaster Pro MIDI support
  1222. EXCLUDE_CHIP_MIDI    MIDI on CHIP support
  1223. SBC_BASE 0x220        SoundBlaster I/O base address
  1224. SBC_IRQ            SoundBlaster IRQ number
  1225. SBC_DMA            SoundBlaster DMA channel
  1226. SB16_DMA        SoundBlaster 16 DMA channel
  1227. SB16_MIDI_BASE        base address of SoundBlaster 16 MIDI port
  1228. PAS_IRQ            ProAudioSpectrum IRQ number
  1229. PAS_DMA            ProAudioSpectrum DMA channel
  1230. GUS_IRQ            Gravis UltraSound IRQ number
  1231. GUS_DMA            Gravis UltraSound DMA channel
  1232. GUS_BASE        base address of Gravis UltraSound
  1233. MPU_IRQ            MPU-401 IRQ number
  1234. MPU_BASE        base address of MPU-401 port
  1235. DSP_BUFFSIZE        DMA buffer size
  1236. </verb>
  1237.  
  1238. Several other defines are also created, setting such things as the
  1239. sound driver revision level and the time and date when configure was
  1240. run.
  1241.  
  1242. There are other parameters that are not set by the configure
  1243. program. If you need to change these, edit the file
  1244. <tt>sound_config.h</tt>.
  1245.  
  1246. To disable the sound driver, run <tt>make config</tt> and answer "no"
  1247. to the "Sound card support?" question.
  1248.  
  1249. <sect1>Where are the sound driver ioctls() etc. documented?<p>
  1250.  
  1251. These are partially documented in the <em>Hacker's Guide to
  1252. VoxWare</em>, currently available in draft form. The latest version is
  1253. draft 2, and can be found on <url
  1254. url="ftp://nic.funet.fi/pub/OS/Linux/ALPHA/sound">. Note that this
  1255. directory is "hidden" and will not appear in directory listings. If
  1256. you "cd" to the directory and use the FTP "dir" command, the files
  1257. <em>are</em> there.
  1258.  
  1259. <sect1>What CPU resources are needed to play or record without pauses?<p>
  1260.  
  1261. There is no easy answer to this question, as it depends on:
  1262.  
  1263. <itemize>
  1264. <item>whether using PCM sampling or FM synthesis
  1265. <item>sampling rate and sample size
  1266. <item>which application is used to play or record
  1267. <item>Sound Card hardware
  1268. <item>disk I/O rate, CPU clock speed, cache size, etc.
  1269. </itemize>
  1270.  
  1271. In general, any 386 machine should be able to play samples or FM
  1272. synthesized music on an 8 bit soundcard with ease.
  1273.  
  1274. Playing MOD files, however, requires considerable CPU resources. Some
  1275. experimental measurements have shown that playing at 44kHz requires
  1276. more than 40% of the speed of a 486/50 and a 386/25 can hardly play
  1277. faster than 22 kHz (these are with an 8 bit card sound such as a
  1278. SoundBlaster). A card such as the Gravis UltraSound card performs more
  1279. functions in hardware, and will require less CPU resources.
  1280.  
  1281. These statements assume the computer is not performing any other CPU
  1282. intensive tasks.
  1283.  
  1284. Converting sound files or adding effects using a utility such as Sox
  1285. is also much faster if you have a math coprocessor. The kernel driver
  1286. itself does not do any floating point calculations, though.
  1287.  
  1288. <sect1>Problems with a PAS16 and an Adaptec 1542 SCSI host adaptor<p>
  1289.  
  1290. (the following explanation was supplied by
  1291. <tt>seeker@indirect.com</tt>)
  1292.  
  1293. Linux only recognizes the 1542 at address 330 (default) or 334, and
  1294. the PAS only allows the MPU-401 emulation at 330.  Even when you
  1295. disable the MPU-401 under software, something still wants to conflict
  1296. with the 1542 if it's at its preferred default address.  Moving the
  1297. 1542 to 334 makes everyone happy.<P>
  1298.  
  1299. Additionally, both the 1542 and the PAS-16 do 16-bit DMA, so if you
  1300. sample at 16-bit 44 KHz stereo and save the file to a SCSI drive hung
  1301. on the 1542, you're about to have trouble.  The DMAs overlap and there
  1302. isn't enough time for RAM refresh, so you get the dread ``PARITY ERROR
  1303. - SYSTEM HALTED'' message, with no clue to what caused it.  It's made
  1304. worse because a few second-party vendors with QIC-117 tape drives
  1305. recommend setting the bus on/off times such that the 1542 is on even
  1306. longer than normal.  Get the SCSISEL.EXE program from Adaptec's BBS or
  1307. several places on the internet, and reduce the BUS ON time or increase
  1308. the BUS OFF time until the problem goes away, then move it one notch
  1309. or more further.  SCSISEL changes the EEPROM settings, so it's more
  1310. permanent than a patch to the DOS driver line in CONFIG.SYS, and will
  1311. work if you boot right into Linux (unlike the DOS patch).  Next
  1312. problem solved.<P>
  1313.  
  1314. Last problem - the older Symphony chipsets drastically reduced the
  1315. timing of the I/O cycles to speed up bus accesses.  None of various
  1316. boards I've played with had <em>any</em> problem with the reduced
  1317. timing except for the PAS-16.  Media Vision's BBS has SYMPFIX.EXE
  1318. that's supposed to cure the problem by twiddling a diagnostic bit in
  1319. Symphony's bus controller, but it's not a hard guarantee.  You may
  1320. need to:
  1321.  
  1322. <itemize>
  1323. <item>get the motherboard distributor to replace the older version bus chip,
  1324. <item>replace the motherboard, or
  1325. <item>buy a different brand of sound card.
  1326. </itemize>
  1327.  
  1328. Young Microsystems will upgrade the boards they import for around
  1329. $30 (US); other vendors may be similar if you can figure out
  1330. who made or imported the motherboard (good luck).  The problem is in
  1331. ProAudio's bus interface chip as far as I'm concerned; <em>nobody</em>
  1332. buys a $120 sound card and sticks it in a 6MHz AT.  Most of
  1333. them wind up in 25-40MHz 386/486 boxes, and should be able to handle
  1334. <em>at least</em> 12MHz bus rates if the chips are designed
  1335. right. Exit soapbox (stage left).
  1336. <P>
  1337.  
  1338. The first problem depends on the chipset used on your motherboard,
  1339. what bus speed and other BIOS settings, and the phase of the moon.
  1340. The second problem depends on your refresh option setting (hidden or
  1341. synchronous), the 1542 DMA rate and (possibly) the bus I/O rate.  The
  1342. third can be determined by calling Media Vision and asking which
  1343. flavor of Symphony chip is incompatible with their slow design.  Be
  1344. warned, though - 3 of 4 techs I talked to were brain damaged.  I would
  1345. be very leery of trusting <em>anything</em> they said about someone
  1346. else's hardware, since they didn't even know their own very well.<P>
  1347.  
  1348. <sect1>Problems with the FM synthesizer on a SoundBlaster Pro 1<p>
  1349.  
  1350. The newer SB Pro has an OPL-3 FM chip, but the older version 1 used
  1351. the OPL-2. The sound driver assumed the presence of an OPL-3. Version
  1352. 2.5 and later of the sound driver corrects this problem.
  1353.  
  1354. <sect1>Is it possible to read and write samples simultaneously?<p>
  1355.  
  1356. Due to hardware limitations, this is not possible with most sound
  1357. cards. Some newer cards do support it.  See the section on
  1358. "bidirectional mode" in the <em>Hacker's Guide to Voxware</em> for
  1359. more information.
  1360.  
  1361. <sect1>My SB16 is set to IRQ 2, but configure does not allow this value.<p>
  1362.  
  1363. On '286 and later machines, the IRQ 2 interrupt is cascaded to the
  1364. second interrupt controller. It is equivalent to IRQ 9.
  1365.  
  1366. <sect1>Are the SoundBlaster AWE32 or SoundBlaster16 ASP supported?<p>
  1367.  
  1368. These cards offer special chips (ASP and Emu) that support additional
  1369. features such as wavetable synthesis, however Creative Labs is not
  1370. willing to release programming information. Unless they change their
  1371. policy there can be no support for the special hardware under Linux.
  1372. The cards <em>are</em> supported as regular SoundBlaster 16 cards
  1373. under Linux.
  1374.  
  1375. The Gravis UltraSound card has capabilities similar to the AWE32, and
  1376. is supported under Linux.  Cards based on other DSPs such as the
  1377. Analog Devices ADSP-21xx may be supported in the future.
  1378.  
  1379. <sect1>If I run Linux, then boot DOS, I get errors and/or sound applications do not work properly.<p>
  1380.  
  1381. This happens after a soft reboot to DOS.  Sometimes the error message
  1382. misleadingly refers to a bad CONFIG.SYS file.
  1383.  
  1384. Most of the current sound cards have software programmable IRQ and DMA
  1385. settings. If you use different settings between Linux and
  1386. MS-DOS/Windows, this may cause problems. Some sound cards don't accept
  1387. new parameters without a complete reset (i.e. cycle the power or use
  1388. the hardware reset button).
  1389.  
  1390. The quick solution to this problem it to perform a full reboot using
  1391. the reset button or power cycle rather than a soft reboot
  1392. (e.g. Ctrl-Alt-Del).
  1393.  
  1394. The correct solution is to ensure that you use the same IRQ and DMA
  1395. settings with MS-DOS and Linux (or not to use DOS :-).
  1396.  
  1397. <sect1>Problems running DOOM under Linux<p>
  1398.  
  1399. Users of the port of ID software's game DOOM for Linux may be
  1400. interested in these notes.
  1401.  
  1402. For correct sound output you need version 2.90 or later of the sound
  1403. driver; it has support for the real-time "DOOM mode".
  1404.  
  1405. The sound samples are 16-bit. If you have an 8-bit sound card you can
  1406. still get sound to work using one of several programs available in
  1407. <url url="ftp://sunsite.unc/edu/pub/Linux/games/doom">.
  1408.  
  1409. If performance of DOOM is poor on your system, disabling sound (by
  1410. renaming the file <tt>sndserver</tt>) may improve it.
  1411.  
  1412. By default DOOM does not support music (as in the DOS version).  The
  1413. program <tt>musserver</tt> will add support for music to DOOM under
  1414. Linux. It can be found at <url
  1415. url="ftp://pandora.st.hmc.edu/pub/linux/musserver.tgz">.
  1416.  
  1417. <sect1>How can I reduce noise picked up by my soundcard?<p>
  1418.  
  1419. Using good quality shielded cables and trying the sound card in
  1420. different slots may help reduce noise. If the sound card has a volume
  1421. control, you can try different settings (maximum is probably best).
  1422.  
  1423. Using a mixer program you can make sure that undesired inputs
  1424. (e.g. microphone) are set to zero gain.
  1425.  
  1426. Some sound cards are simply not designed with good shielding and
  1427. grounding and are prone to noise pickup.
  1428.  
  1429. Finally, on my system I found that the kernel command line option
  1430. <tt>no-hlt</tt> reduces the noise level. This tells the kernel not to
  1431. use the halt instruction when running the idle process loop. You can
  1432. try this manually when booting, or set it up using the command
  1433. <tt>append = "no-hlt"</tt> in your LILO configuration file.
  1434.  
  1435. <sect1>I can play sounds, but not record.<p>
  1436.  
  1437. If you can play sound but not record, try these steps:
  1438.  
  1439. <itemize>
  1440. <item> use a mixer program to select the appropriate device (e.g. microphone)
  1441. <item> use the mixer to set the input gains to maximum
  1442. <item>If you can, try to test sound card recording under MS-DOS to
  1443. determine if there is a hardware problem
  1444. </itemize>
  1445.  
  1446. <sect1>My "compatible" sound card only works if I first initialize under MS-DOS.<p>
  1447.  
  1448. Some sound card clones are not 100% register compatible with the real
  1449. thing; they sometimes contain extra circuitry such as mixers. You
  1450. <em>may</em> be able to use these under Linux if you first initialize
  1451. under MS-DOS, then soft boot Linux (i.e. Ctrl-Alt-Delete).
  1452.  
  1453. One user also reported that he had better results if he used LOADLIN
  1454. rather than LILO to boot Linux after initializing his sound card under
  1455. MS-DOS (this was with a Diamond sound card).,
  1456.  
  1457. They may or may not function reliably. The real solution is to find
  1458. out from the manufacturer what the differences are and have the
  1459. support added to the sound driver. This has been done, for example,
  1460. for the Sound Galaxy NX Pro.
  1461.  
  1462. <sect1>My 16-bit SoundBlaster "compatible" sound card only works in 8-bit mode under Linux.<p>
  1463.  
  1464. 16-bit sound cards described as SoundBlaster compatible are really
  1465. only compatible with the 8-bit SoundBlaster Pro. They typically have a
  1466. 16-bit mode which is not compatible with the SoundBlaster 16 and not
  1467. compatible with the Linux sound driver.
  1468.  
  1469. If your card is also listed as compatible with the Microsoft Windows
  1470. Sound System, you may be able to get it to work in 16-bit mode if you
  1471. enable support for the WSS in the Linux sound driver. You will also
  1472. probably have to do the DOS initialization trick to get the card to
  1473. work.
  1474.  
  1475. <sect1>Where can I find sound applications for Linux?<p>
  1476.  
  1477. Here are some good archive sites to search for Linux specific sound
  1478. applications:
  1479.  
  1480. <itemize>
  1481. <item> <url url="ftp://sunsite.unc.edu:/pub/Linux/kernel/sound/">
  1482. <item> <url url="ftp://sunsite.unc.edu:/pub/Linux/apps/sound/">
  1483. <item> <url url="ftp://tsx-11.mit.edu:/pub/linux/packages/sound/">
  1484. <item> <url url="ftp://nic.funet.fi:/pub/OS/Linux/util/sound/">
  1485. <item> <url url="ftp://nic.funet.fi:/pub/OS/Linux/xtra/snd-kit/">
  1486. <item> <url url="ftp://nic.funet.fi:/pub/OS/Linux/ALPHA/sound/">
  1487. </itemize>
  1488.  
  1489. <sect1>Can the sound driver be compiled as a loadable module?<p>
  1490.  
  1491. With recent kernels the sound driver is supported as a kernel
  1492. loadable module.
  1493.  
  1494. See the files <url url="/usr/src/linux/drivers/sound/Readme.modules"> and <url
  1495. url="/usr/src/linux/Documentation/modules.txt"> (or <url
  1496. url="/usr/src/linux/README">) for details.
  1497.  
  1498. <sect1>Can I use a soundcard to replace the system console beep?<p>
  1499.  
  1500. Try the <tt>oplbeep</tt> program, found at
  1501. <url url="ftp://sunsite.unc.edu/pub/Linux/apps/sound/oplbeep-alpha.tar.gz">
  1502.  
  1503. Another variant is the <tt>beep</tt> program found at <url
  1504. url="ftp://sunsite.unc.edu/pub/Linux/kernel/patches/misc/modreq_beep.tgz">
  1505.  
  1506. The <tt>modutils</tt> package has an example program and kernel patch
  1507. that supports calling an arbitrary external program to generate sounds
  1508. when requested by the kernel.
  1509.  
  1510. Alternatively, with some sound cards you can connect the PC speaker
  1511. output to the soundcard so that all sounds come from the sound card
  1512. speakers.
  1513.  
  1514. <sect1>What is VoxWare?<p>
  1515.  
  1516. The kernel sound drivers support several different Intel-based Unix
  1517. compatible operating systems, and can be obtained as a package
  1518. separate from the Linux kernel. Up until February 1996 the author had
  1519. called the software "VoxWare". Unfortunately this name has been
  1520. registered by <htmlurl url="http://www.voxware.com/" name="VoxWare
  1521. Incorporated">, and can not be used. On March 29th, 1996 Hannu
  1522. Savolainen announced that the new name was Unix Sound System (USS) Lite.
  1523.  
  1524. The Unix Sound System (USS) is going to be a commercially available
  1525. kernel sound driver for various Unix systems, sold by 4Front
  1526. Technologies. A free version, known as USS/Lite will continue to be
  1527. made freely available for Linux systems.
  1528.  
  1529. For more information see the 4Front Technologies Web page at <url
  1530. url="http://www.4front-tech.com/">.
  1531.  
  1532. <sect1>Are Plug and Play sound card supported?<p>
  1533.  
  1534. Linux does not yet fully support Plug and Play devices, but it is
  1535. being worked on. In the mean time some users have reported success by
  1536. either disabling the Plug and Play options in their BIOS, or by
  1537. initializing the devices under Windows 95 before soft booting Linux.
  1538.  
  1539. <sect1>Sox/Play/Vplay reports "invalid block size 1024"?<p>
  1540.  
  1541. A change to the sound driver in version 1.3.67 broke some sound player
  1542. programs which (incorrectly) checked that the result from the
  1543. SNDCTL_DSP_GETBLKSIZE ioctl was greater than 4096. You should get a
  1544. newer version of the program (if available) or fix it yourself. For
  1545. the <url
  1546. url="ftp://sunsite.unc.edu/pub/Linux/kernel/sound/convert/Lsox-linux.tar.gz"
  1547. name="Sox"> program, the following patch worked for me:
  1548.  
  1549. <tscreen><verb>
  1550. --- sbdsp.c.orig    Thu Feb 22 22:46:00 1996
  1551. +++ sbdsp.c    Thu Feb 22 22:51:18 1996
  1552. @@ -176,7 +176,7 @@
  1553.      }
  1554.  
  1555.      ioctl (dspfd, SNDCTL_DSP_GETBLKSIZE, &abuf_size);
  1556. -    if (abuf_size < 4096 || abuf_size > 65536) {
  1557. +    if (abuf_size < 1) {
  1558.          if (abuf_size == -1)
  1559.          perror (dspname);
  1560.                else
  1561. </verb></tscreen>
  1562.  
  1563. <sect1>Why does the sound driver have its own configuration program?<p>
  1564.  
  1565. The sound driver supports many different configuration parameters.
  1566. The <tt>configure</tt> program included with the sound driver checks
  1567. for many dependencies between parameters. The tools used to configure
  1568. the kernel don't support this level of functionality.
  1569.  
  1570. That said, the recent 1.3.x kernels do optionally allow using the
  1571. standard kernel configuration tools with the sound driver. See the
  1572. notes in the <tt>CHANGELOG</tt> file for the sound driver. This is
  1573. still experimental and some options cannot be set this way.
  1574.  
  1575. <sect1>The mixer settings are reset whenever I load the sound driver module!<p>
  1576.  
  1577. You can build the sound driver as a loadable module and use
  1578. <tt>kerneld</tt> to automatically load and unload it. This can present
  1579. one problem - whenever the module is reloaded the mixer settings go
  1580. back to their default values.  For some sound cards this can be too
  1581. loud (e.g.  SB16) or too quiet.  Markus Gutschke
  1582. (<tt>gutschk@uni-muenster.de</tt>) found this solution. Use a line in
  1583. your <tt>/etc/conf.modules</tt> file such as the following:
  1584.  
  1585. <tscreen><verb>
  1586. options sound dma_buffsize=65536 && /usr/bin/setmixer igain 0 ogain 0 vol 75
  1587. </verb></tscreen>
  1588.  
  1589. This causes your mixer program (in this case <tt>setmixer</tt>) to be
  1590. run immediately after the sound driver is loaded. The
  1591. <tt>dma_buffsize</tt> parameter is just a dummy value needed because
  1592. the option command requires a command line option. Change the line as
  1593. needed to match your mixer program and gain settings.
  1594.  
  1595. If you have compiled the sound driver into your kernel and you want to
  1596. set the mixer gains at boot time you can put a call to your mixer
  1597. program in a system startup file such as <tt>/etc/rc.d/rc.local</tt>.
  1598.  
  1599. <sect1>Only user root can record sound<p>
  1600.  
  1601. By default the script in Readme.linux that creates the sound device
  1602. files only allows the devices to be read by user <tt>root</tt>. This
  1603. is to plug a potential security hole. In a networked environment,
  1604. external users could conceivably log in remotely to a Linux PC with a
  1605. sound card and microphone and eavesdrop. If you are not worried about
  1606. this, you can change the permissions used in the script.
  1607.  
  1608. With the default setup, users can still play sound files. This is not
  1609. a security risk but is a potential for nuisance.
  1610.  
  1611. <sect>References<p>
  1612.  
  1613. If you have a sound card that supports a CD-ROM or SCSI interface, the
  1614. Linux <htmlurl url="http://sunsite.unc.edu/mdw/HOWTO/SCSI-HOWTO.html"
  1615. name="SCSI HOWTO"> and the Linux <htmlurl
  1616. url="http://sunsite.unc.edu/mdw/HOWTO/CDROM-HOWTO.html" name="CD-ROM
  1617. HOWTO"> have additional information that may be useful to you.
  1618.  
  1619. Hannu Savolainen has written a draft version of the <em>Hacker's Guide
  1620. to VoxWare</em>. The latest version is draft 2, and can be found on
  1621. <url url="ftp://nic.funet.fi/pub/OS/Linux/ALPHA/sound/">.
  1622.  
  1623. The following FAQs are regularly posted to the usenet newsgroup
  1624. <htmlurl url="news:news.announce" name="news.announce"> as well as
  1625. being archived at <url
  1626. url="ftp://rtfm.mit.edu/pub/usenet/news.answers">:
  1627.  
  1628. <itemize>
  1629. <item> PCsoundcards/generic-faq (Generic PC Soundcard FAQ)
  1630. <item> PCsoundcards/soundcard-faq (comp.sys.ibm.pc.soundcard FAQ)
  1631. <item> PCsoundcards/gravis-ultrasound/faq (Gravis UltraSound FAQ)
  1632. <item> audio-fmts/part1 (Audio file format descriptions)
  1633. <item> audio-fmts/part2 (Audio file format descriptions)
  1634. </itemize>
  1635.  
  1636. The FAQs also list several product specific mailing lists and archive
  1637. sites. The following Usenet news groups discuss sound and/or music
  1638. related issues:
  1639.  
  1640. <itemize>
  1641. <item> <htmlurl url="news:alt.binaries.sounds"
  1642. name="alt.binaries.sounds.*"> (various groups for posting sound files)
  1643. <item> <htmlurl url="news:alt.binaries.multimedia"
  1644. name="alt.binaries.multimedia"> (for posting Multimedia files)
  1645. <item> <htmlurl url="news:alt.sb.programmer" name="alt.sb.programmer">
  1646. (Soundblaster programming topics)
  1647. <item> <htmlurl url="news:comp.multimedia" name="comp.multimedia">
  1648. (Multimedia topics)
  1649. <item> <htmlurl url="news:comp.music" name="comp.music"> (Computer music
  1650. theory and research)
  1651. <item> <htmlurl url="news:comp.sys.ibm.pc.soundcard"
  1652. name="comp.sys.ibm.pc.soundcard.*"> (various IBM PC soundcard groups)
  1653. </itemize>
  1654.  
  1655. A Web site dedicated to multimedia can be found at <url
  1656. url="http://viswiz.gmd.de/MultimediaInfo/">. Creative Labs has a Web
  1657. site at <url url="http://www.creaf.com/">. MediaTrix has a Web site
  1658. at <url url="http://www.mediatrix.com/">.
  1659.  
  1660. The Linux mailing list has a number of "channels" dedicated to
  1661. different topics, including sound. To find out how to join, send a
  1662. mail message with the word "help" as the message body to <htmlurl
  1663. url="mailto:majordomo@vger.rutgers.edu"
  1664. name="majordomo@vger.rutgers.edu">. (Note: at time of writing these
  1665. mailing lists were severely overloaded and a replacement was being
  1666. sought).
  1667.  
  1668. As mentioned several times before, the kernel sound driver
  1669. includes a number of <tt>Readme</tt> files containing useful
  1670. information about the sound card driver. These can typically be found
  1671. in the directory <url url="/usr/src/linux/drivers/sound">.
  1672.  
  1673. The author of the kernel sound driver, Hannu Savolainen, can be
  1674. contacted by email at <htmlurl url="mailto:hannu@voxware.pp.fi"
  1675. name="hannu@voxware.pp.fi">. He also has a World-Wide Web site at <url
  1676. url="http://personal.eunet.fi/pp/voxware">. The Web site is the best
  1677. source for finding out the latest status of supported sound cards,
  1678. known problems, and bug fixes.
  1679.  
  1680. The <em>Linux Software Map</em> (LSM) is an invaluable reference for
  1681. locating Linux software. Searching the LSM for keywords such as
  1682. <em>sound</em> is a good way to identify applications related to sound
  1683. hardware. The LSM can be found on various anonymous FTP sites,
  1684. including <url url="ftp://sunsite.unc.edu/pub/Linux/docs/LSM.gz">.
  1685.  
  1686. The Linux Documentation Project has produced several books on Linux,
  1687. including <em>Linux Installation and Getting Started</em>. These are
  1688. freely available by anonymous FTP from major Linux archive sites or
  1689. can be purchased in hardcopy format.
  1690.  
  1691. Finally, a shameless plug: If you want to learn a lot more about
  1692. multimedia under Linux (especially CD-ROM and sound card applications
  1693. and programming), check out my new book <em>Multimedia on Linux</em>
  1694. published by O'Reilly and Associates (<url
  1695. url="http://www.ora.com/">). It should be available in the September
  1696. 1996 time frame.
  1697.  
  1698. </article>
  1699.