home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / sound-ho < prev    next >
Encoding:
Text File  |  1996-07-11  |  63.8 KB  |  1,612 lines

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