home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 11 / IOPROG_11.ISO / docs / sound-~2 < prev    next >
Encoding:
Text File  |  1997-08-05  |  73.5 KB  |  1,797 lines

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