home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 2 / CD ACTUAL VOL 2.iso / docs / sound-ho < prev    next >
Encoding:
Text File  |  1995-09-10  |  57.8 KB  |  1,744 lines

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