home *** CD-ROM | disk | FTP | other *** search
/ Freelog Special Edition 1: Linux / CD1.iso / doc / HOWTO / mini / Soundblaster-AWE < prev    next >
Text File  |  1998-10-14  |  34KB  |  1,189 lines

  1.   Sound Blaster AWE 32/64 HOWTO
  2.   by Marcus Brinkmann <Marcus.Brinkmann@ruhr-uni-bochum.de>
  3.   v1.2, 11 January 1998
  4.  
  5.   This document describes how to install and configure a Sound Blaster
  6.   32 (SB AWE 32, SB AWE 64) card from Creative Labs in a Linux System
  7.   using the AWE Sound Driver Extension written by Takashi Iwai. It also
  8.   covers some special tools and players for the SB AWE series. Reference
  9.   system is a Debian GNU/Linux System, but every other Linux Distribu-
  10.   tion should also work.
  11.   ______________________________________________________________________
  12.  
  13.   Table of Contents
  14.  
  15.  
  16.   1. Introduction
  17.  
  18.      1.1 Acknowledgments
  19.      1.2 Revision History
  20.      1.3 New versions of this document
  21.      1.4 Feedback
  22.      1.5 Distribution Policy
  23.  
  24.   2. Before you start
  25.  
  26.      2.1 Introduction
  27.      2.2 Some general notes about the SB AWE cards
  28.      2.3 Some general notes about the Plug and Play cards
  29.      2.4 Some general notes about loadable kernel modules
  30.      2.5 Some general notes about the kernel sound driver
  31.  
  32.   3. How to install SB AWE sound support
  33.  
  34.      3.1 Things you will need
  35.      3.2 Getting started
  36.      3.3 Compiling the kernel
  37.      3.4 Reboot
  38.  
  39.   4. Testing the Sound Driver
  40.  
  41.      4.1 (TT
  42.      4.2 Output - The Raw Audio Device
  43.      4.3 Output - The OPL-2/OPL-3 Synthesis
  44.      4.4 Output - The Wave Table Synthesis
  45.      4.5 Mixing
  46.      4.6 Input - Sampling with the Raw Audio Device
  47.      4.7 The MIDI Port
  48.  
  49.   5. AWE Driver Software
  50.  
  51.      5.1 (TT
  52.      5.2 (TT
  53.  
  54.   6. Appendix
  55.  
  56.      6.1 Additional Information
  57.      6.2 Sources
  58.      6.3 Sample
  59.  
  60.  
  61.   ______________________________________________________________________
  62.  
  63.   1.  Introduction
  64.  
  65.  
  66.  
  67.   This is the Sound Blaster AWE HOWTO. It gives you detailed information
  68.   about getting the most out of your Sound Blaster 32 or better,
  69.   including Wave Table synthesis. This document covers all SB cards up
  70.   from the SB 32.
  71.  
  72.   The Sound Blaster series is well-known in the DOS and Windows
  73.   community, and a lot of Linux users want to use this sound card under
  74.   Linux as well.  Unfortunately, Creative Labs only provides a sound
  75.   driver for Windows and DOS, so it is not trivial to install and use a
  76.   SB card under Linux. This document tries to describe how one can use
  77.   the features of the SB AWE series under a Linux environment.
  78.  
  79.  
  80.   1.1.  Acknowledgments
  81.  
  82.  
  83.   This documents contains information I got from the AWE Driver FAQ and
  84.   the ISA PnP FAQ.  See section ``Sources'' for author and location of
  85.   this documents. Thanks to the authors, the SB AWE support is possible.
  86.  
  87.   A lot of essential work was done by Hannu Savolainen
  88.   <http://www.4front-tech.com/usslite>, who developed the sound driver
  89.   that comes with the Linux kernel. Thank you!
  90.  
  91.   I want to thank Nicola Bernardelli <mailto:n.bern@mail.protos.it> for
  92.   testing the AWE64 stuff. Without him, many errors would have remained
  93.   undetected.
  94.  
  95.   Thanks to the SGML Tools
  96.   <ftp://sunsite.unc.edu/pub/Linux/utils/text/sgml-tools-0.99.0.tar.gz>
  97.   package, this HOWTO is available in several formats, all generated
  98.   from a common source file.
  99.  
  100.  
  101.   1.2.  Revision History
  102.  
  103.  
  104.  
  105.  
  106.      Version 1.0
  107.         first version
  108.  
  109.      Version 1.1
  110.         corrected spelling (thanks Curt!), added version requirement for
  111.         isapnp, now available via sunsite and lots of mirrors
  112.  
  113.      Version 1.2
  114.         French version now available!, minor corrections, lots of
  115.         spelling fixed (thanks to ispell)
  116.  
  117.  
  118.  
  119.  
  120.   1.3.  New versions of this document
  121.  
  122.  
  123.   The latest version can be found on my Home Page, namely at Sound
  124.   Blaster AWE HOWTO <http://homepage.ruhr-uni-
  125.   bochum.de/Marcus.Brinkmann/soundblaster.html>.
  126.  
  127.   New versions of this document will be uploaded to various anonymous
  128.   ftp sites that archive such information including
  129.   <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/mini>.
  130.  
  131.   Hypertext versions of this and other Linux HOWTOs are available on
  132.   many World-Wide-Web sites, including  <http://sunsite.unc.edu/LDP/>.
  133.   Most Linux CD-ROM distributions include the HOWTOs, often under the
  134.   /usr/doc directory.
  135.  
  136.   Thanks to Arnaud Launay zoro@lsol.tm.fr, a French version of this
  137.   document is now available!  The latest version can be found via http
  138.   <http://www.freenix.fr/linux/HOWTO> or anonymous ftp
  139.   <ftp://ftp.lip6.fr/pub/linux/french/docs/HOWTO>.
  140.  
  141.   If you make a translation of this document into another language, let
  142.   me know and I'll include a reference to it here.
  143.  
  144.  
  145.   1.4.  Feedback
  146.  
  147.  
  148.   I rely on you, the reader, to make this HOWTO useful. If you have any
  149.   suggestions, corrections, or comments, please send them to me,
  150.   Marcus.Brinkmann@ruhr-uni-bochum.de, and I will try to incorporate
  151.   them in the next revision.
  152.  
  153.   i would especially welcome information about the startup procedure
  154.   (boot scripts etc.) of other famous Linux distributions, e. g. Red Hat
  155.   or SuSE Linux.
  156.  
  157.   If you publish this document on a CD-ROM or in hardcopy form, a
  158.   complimentary copy would be appreciated. Mail me for my postal
  159.   address. Also consider making a donation to the Linux Documentation
  160.   Project to help support free documentation for Linux. Contact the
  161.   Linux HOWTO coordinator, Tim Bynum linux-howto@sunsite.unc.edu, for
  162.   more information.
  163.  
  164.  
  165.   1.5.  Distribution Policy
  166.  
  167.  
  168.   Copyright 1997 Marcus Brinkmann.
  169.  
  170.   This HOWTO is free documentation; you can redistribute it and/or
  171.   modify it under the terms of the GNU General Public License as
  172.   published by the Free Software Foundation; either version 2 of the
  173.   License, or (at your option) any later version.
  174.  
  175.   This document is distributed in the hope that it will be useful, but
  176.   without any warranty; without even the implied warranty of
  177.   merchantability or fitness for a particular purpose.  See the GNU
  178.   General Public License for more details.
  179.  
  180.   You can obtain a copy of the GNU General Public License by writing to
  181.   the Free Software Foundation <http://www.fsf.org>, Inc., 675 Mass Ave,
  182.   Cambridge, MA 02139, USA.
  183.  
  184.  
  185.  
  186.   2.  Before you start
  187.  
  188.  
  189.  
  190.   2.1.  Introduction
  191.  
  192.  
  193.   This document tries to help you install and use a Sound Blaster AWE 32
  194.   or Sound Blaster AWE 64 from Creative Labs in your Linux system. The
  195.   reference system is a Debian GNU/Linux <http://www.debian.org> system
  196.   on an Intel i586 platform, but it should work with any other Linux
  197.   distribution as well as on every platform that is supported by the
  198.   Linux sound driver (differences are mentioned where they appear, if
  199.   any).
  200.  
  201.   Be sure to read the Linux Sound HOWTO (see section ``Additional
  202.   Information'') carefully. I consider my document a supplement to the
  203.   Sound HOWTO, and often you can find more information about things I
  204.   have left out there.
  205.  
  206.  
  207.  
  208.   2.2.  Some general notes about the SB AWE cards
  209.  
  210.  
  211.   The SB AWE 32 sound card provides a raw audio device, standard
  212.   OPL-2/OPL-3 synthesis, a MPU-401 MIDI port and 32 voices EMU 8000 Wave
  213.   Table synthesis (for an explanation on these and other terms see the
  214.   Linux Sound HOWTO).  One goal of this document is to help you get all
  215.   these features to work properly.
  216.  
  217.   The SB AWE 64 has the capabilities of the SB AWE 32 and an additional
  218.   Wave Guide synthesis Creative Labs is especially proud of. The problem
  219.   for Linux users is, that the additional 32 voices are software
  220.   generated and output via the raw wave devices. Because Creative Labs
  221.   sees no market in Linux drivers, a Wave Guide synthesis sound driver
  222.   is only available for Windows 3.1 and Windows 95.
  223.  
  224.   This means that, from a Linux user's point of view, the SB AWE 32 and
  225.   SB AWE 64 are almost identical. From now on I will only refer to the
  226.   SB AWE in general and will only mention differences where they appear
  227.   (if any).
  228.  
  229.  
  230.  
  231.   2.3.  Some general notes about the Plug and Play cards
  232.  
  233.  
  234.   Most modern cards for the Intel platform are ISA PnP cards, which is
  235.   an abbreviation for ``Plug and Play''. This means, that the card has
  236.   to be configured by the operation system, and this has to be done
  237.   through an initialization routine at boot time. In general, there are
  238.   at least three possible ways to do this:
  239.  
  240.  
  241.   1. You have a PnP Bios, which means that your Bios is aware of PnP
  242.      cards and can configure them. If you think you can use all the
  243.      features of your SB AWE PnP just because you have a PnP Bios, you
  244.      are out of luck. Even if the Bios claims to support PnP cards it
  245.      only initializes a subset of the ports and addresses used by your
  246.      sound card. You will probably be able to play raw wave data, but
  247.      you won't be able to play MIDI music, for example. For this reason,
  248.      a PnP Bios is not an option.
  249.  
  250.   2. You have an operating system that supports PnP cards. The current
  251.      stable Linux kernel (2.0.x) is not such an operating system, so we
  252.      have to wait for future kernel releases, that will support PnP
  253.      devices.
  254.  
  255.   3. You have a special program, started at boot time, that initializes
  256.      your PnP cards. This is the way we do it.
  257.  
  258.   The most commonly used software to initialize PnP cards under Linux
  259.   are the ``isapnptools'' (see section ``Sources'' and section ``Getting
  260.   Started''). They provide a predictable way to configure all ISA PnP
  261.   cards in your machine, not only your sound card.
  262.  
  263.  
  264.  
  265.   2.4.  Some general notes about loadable kernel modules
  266.  
  267.  
  268.   Some device drivers can be built as modules instead of compiling them
  269.   into the kernel. You can find more information about modules in the
  270.   Kernel HOWTO and the Module HOWTO (see section ``Additional
  271.   Information'').
  272.  
  273.   If you have a PnP card, you must install sound support as a loadable
  274.   kernel module. This means, that you can't build the sound driver into
  275.   the kernel, but you will have to build it as a module that can be
  276.   loaded into the kernel at runtime. This is because the kernel will be
  277.   installed before your ISA PnP card can be configured, and your sound
  278.   driver has to be loaded after your ISA PnP card is configured.
  279.  
  280.   The sound kernel module can be loaded manually via insmod sound or
  281.   modprobe -a sound or in the appropriate boot script of your Linux
  282.   system (in Debian, it is sufficient to append a single line containing
  283.   sound to /etc/modules). Another approach is to launch kerneld, a
  284.   daemon that installs and removes kernel modules as needed.
  285.  
  286.   Note that kerneld may not be the best solution for the AWE sound
  287.   driver module, because it takes time to load the module in the kernel,
  288.   especially if you want to use Wave Table synthesis and load big Sound
  289.   Font banks, which you have to do each time after inserting the module.
  290.   Because kerneld removes unused modules after one minute by default, it
  291.   is perhaps better to insert the sound module manually or at boot time.
  292.   Note that inserting the sound module manually or at boot time does
  293.   prevent kerneld from removing it when it is idle. By the way: You can
  294.   manually insert the sound module and use kerneld at the same time. The
  295.   two methods don't conflict, but kerneld does not care about the sound
  296.   module anymore.
  297.  
  298.   This is especially useful if your mixer settings get disturbed after
  299.   removing and reinstalling the module. A solution for this problem will
  300.   be given in section ``Mixing'' (there is described how you can start
  301.   your mixer automatically when the sound module gets inserted).
  302.   However, it takes time for kerneld to load the module, to load the
  303.   sound font bank and to start your mixer, and for this and other
  304.   reasons it is better to install the sound module at boot time and not
  305.   let kerneld remove it.
  306.  
  307.  
  308.  
  309.   2.5.  Some general notes about the kernel sound driver
  310.  
  311.  
  312.   You can install sound support in the kernel as a built-in or as a
  313.   loadable module. If you have a PnP card, you have to install sound
  314.   support as a module, because the PnP card needs to be initialized via
  315.   the isapnptools before the module gets installed.
  316.  
  317.   As you can imagine, you will have to recompile the kernel. I will give
  318.   you a few hints about it below. For now, let's talk about the sound
  319.   support in the kernel source. The kernel ships with the Free (Lite)
  320.   Version of the OSS (USS) sound driver. The current version of this
  321.   driver (3.5.4) does not support the SB AWE in full, but the SB 16 part
  322.   of it. So you can have a raw audio device and OPL-2/OPL-3 synthesis if
  323.   you use it, but you will not be able to play midi music with Wave
  324.   Table synthesis.
  325.  
  326.   If you want to use the Wave Table device, you can either buy the
  327.   commercial sound driver from 4Front Technologies <http://www.4front-
  328.   tech.com> (someone please confirm me that it can do it, please), or
  329.   patch your kernel with the AWE 32 Sound Driver Extension by Takashi
  330.   Iwai. The former is beyond the scope of this document, I assume you
  331.   want to use the latter.
  332.  
  333.   The AWE32 Sound Driver Extension (see section ``Sources'') is
  334.   published under the GNU copyright license and ships with a number of
  335.   tools to make use of the EMU 8000 wave synthesis of the SB AWE cards.
  336.  
  337.   The awedrv software is already included in newer kernel source trees
  338.   (starting from some 2.1.x kernels, but perhaps you want to upgrade the
  339.   sources in your kernel tree, they may be old.
  340.  
  341.  
  342.  
  343.   3.  How to install SB AWE sound support
  344.  
  345.  
  346.  
  347.   3.1.  Things you will need
  348.  
  349.  
  350.   These are the requirements for SB AWE support under Linux:
  351.  
  352.  
  353.   o  a functional Linux system (e.g. the Debian GNU/Linux distribution),
  354.  
  355.   o  a SB AWE 32 or compatible card (e.g. SB32, SB32 PnP, SB AWE64,
  356.      ...),
  357.  
  358.   o  the sources of the Linux kernel, including the sound driver
  359.      OSS/Free (normally included, check in
  360.      /usr/src/Linux/drivers/sound/Readme),
  361.  
  362.   o  the AWE 32 sound driver extensions.
  363.  
  364.   If you have a PnP card, you will also need:
  365.  
  366.  
  367.   o  the isapnptools software package.
  368.  
  369.   Look in section ``Sources'' for information where you can obtain these
  370.   programs.
  371.  
  372.   If you have a Debian GNU/Linux system, this means that you will need
  373.   the packages kernel-source-<version>, awe-drv and perhaps the package
  374.   isapnptools.  You will want some of the other awe-* packages although
  375.   they are not essential. I strongly recommend the kernel-package for
  376.   easy kernel compiling and installing.
  377.  
  378.  
  379.  
  380.   3.2.  Getting started
  381.  
  382.  
  383.   Let's assume you have properly installed your card in a socket on your
  384.   motherboard and perhaps already tested it under a DOS or Windows
  385.   environment.
  386.  
  387.   The next step is to initialize the card at boot time if and only if it
  388.   is a PnP card. Follow the documentation in the source package to
  389.   compile and install isapnptools (or just use the Debian binary
  390.   package), and make a
  391.  
  392.  
  393.  
  394.        # pnpdump > /etc/isapnp.conf
  395.  
  396.  
  397.   as root. This will generate a hopefully proper configuration file for
  398.   your PnP cards, but with all devices commented out. Please edit this
  399.   file carefully, and compare the values for DMA channels, IO bases and
  400.   interrupts with the configuration of the cards under an DOS or Window
  401.   environment if possible (with Win95, look at the resources used by the
  402.   card under resources in the device manager). If you have problems,
  403.   read the documentation that ships with the isapnptools carefully.
  404.  
  405.   CAUTION: isapnptools often fails to detect all three I/O ports of the
  406.   SB AWE Wave Table device. Please check carefully the WaveTable entry
  407.   in your isapnp.conf against the example at the end of this HOWTO.
  408.   Adjust the I/O base addresses if necessary.
  409.  
  410.  
  411.   CAUTION: According to the isapnp-faq, sometimes isapnp fails to
  412.   program the number of the logical device. If you encounter error
  413.   messages like the following:
  414.  
  415.  
  416.  
  417.        Error occurred executing request 'LD 2' on or around line...
  418.  
  419.  
  420.  
  421.  
  422.   then try adding (VERIFYLD N) at the top of isapnp.conf. You have to
  423.   use at least version 1.10 for this to work. If you can't use version
  424.   1.10 or newer, you can also POKE the logical device numbers directly.
  425.   Please refer to the isapnp-faq for more information on this approach.
  426.   If it doesn't work for you, please contact me (and the isapnp people
  427.   will be interested, too, I would think).
  428.  
  429.   CAUTION: Make sure that the last line is (WAITFORKEY), that will
  430.   sometimes be omitted by older versions of pnpdump.
  431.  
  432.   A sample isapnp.conf for only one PnP card (the sound card) can be
  433.   found at the end of the document (see section ``Sample
  434.   <tt>isapnp.conf</tt>'').
  435.  
  436.   If you have a Debian system, no further adjustments are necessary.
  437.   isapnp will be started at boot time in /etc/init.d/boot with this
  438.   snippet of script code, that you may want to include in your boot
  439.   scripts:
  440.  
  441.   ______________________________________________________________________
  442.   # Configure the isa plug and play boards before loading
  443.   # modules. Need to do this before loading modules to get
  444.   # a chance of configuring and starting PnP boards before
  445.   # the drivers mess all this up.
  446.   #
  447.   if [ -x /etc/init.d/isapnp ]
  448.   then
  449.     /etc/init.d/isapnp start
  450.   fi
  451.   ______________________________________________________________________
  452.  
  453.  
  454.   where /etc/init.d/isapnp is
  455.  
  456.  
  457.  
  458.  
  459.  
  460.  
  461.  
  462.  
  463.   ______________________________________________________________________
  464.   #! /bin/sh
  465.   # /etc/init.d/isapnp: configure Plug and Play boards
  466.   test -x /sbin/isapnp || exit 0
  467.   /sbin/isapnp /etc/isapnp.conf
  468.   exit 0
  469.   ______________________________________________________________________
  470.  
  471.  
  472.  
  473.   If you have another Linux distribution, you are on your own. I don't
  474.   know what to do (anybody willing to submit more specific
  475.   information?). Just make sure that isapnp gets started before the
  476.   modules will be loaded (see below).
  477.  
  478.  
  479.  
  480.   3.3.  Compiling the kernel
  481.  
  482.  
  483.   Before recompiling the kernel, you have to apply the AWE Driver
  484.   Extension to the sound driver. Even if your kernel source tree already
  485.   includes the awedrv extension (check /drivers/sound/lowlevel/ for
  486.   that), you may want to upgrade the awedrv software. Follow the
  487.   installation instructions in the awedrv source directory. In brief,
  488.   you have to run an installation script that applies the patches to the
  489.   kernel sources.
  490.  
  491.   Be careful if you have upgraded the kernel source tree after running
  492.   the install script. The script just checks if a certain file exists -
  493.   if it exists, it does not apply the necessary patch. You are well
  494.   advised to remove the file drivers/sound/lowlevel/awe_wav.c before
  495.   running the script after upgrading the kernel source.
  496.  
  497.   Next you have to configure the kernel for sound support. I hope you
  498.   know a bit about kernel compiling; see the Sound HOWTO and the Kernel
  499.   HOWTO for details. Go in the source directory of your kernel sources
  500.   (/usr/src/linux for example), and do
  501.  
  502.  
  503.  
  504.        # make config
  505.  
  506.  
  507.  
  508.  
  509.   or make menuconfig or make xconfig. Then you have to configure your
  510.   kernel in the standard way. Use this opportunity to make a small and
  511.   powerful kernel, especially designed for your system. Be sure to
  512.   answer Enable loadable module support with Y, if you want to install
  513.   the sound driver as a loadable module (a must if you have a PnP card),
  514.   but I'm sure you want to do it anyway.
  515.  
  516.   At one point, you will be asked if you want sound card support. You
  517.   are free to answer with Y or with M if you have not a PnP card.  You
  518.   must answer with M, for module, if you have a PnP card.  You have to
  519.   compile sound card support as a module if you have a PnP card because
  520.   the PnP card has to be initialized before the module gets loaded.
  521.  
  522.   The following questions you should answer with Y, all other with N:
  523.  
  524.  
  525.  
  526.  
  527.  
  528.  
  529.   ______________________________________________________________________
  530.   Sound Blaster (SB, SBPro, SB16, clones) support (CONFIG_SB) [Y/n/?]
  531.   Generic OPL2/OPL3 FM synthesizer support (CONFIG_ADLIB) [Y/n/?]
  532.   /dev/dsp and /dev/audio support (CONFIG_AUDIO) [Y/n/?]
  533.   MIDI interface support (CONFIG_MIDI) [Y/n/?]
  534.   FM synthesizer (YM3812/OPL-3) support (CONFIG_YM3812) [Y/n/?]
  535.   lowlevel sound driver support [Y/n/?]
  536.   AWE32 support (CONFIG_AWE32_SYNTH) [Y/n/?]
  537.   ______________________________________________________________________
  538.  
  539.  
  540.  
  541.   Only the latter is actually for the Wave Table synthesis. The others
  542.   are SB 16 options from the OSS/Free sound driver.
  543.  
  544.   In addition, you have to configure the sound card I/O port. Look at
  545.   the isapnp.conf file for hints, if you have one. For me, the following
  546.   default values are sufficient. Note that the default value from the
  547.   kernel configuration script may be wrong (especially the values
  548.   SBC_IRQ and SB_MPU_BASE seem to be incorrect for most cards).
  549.  
  550.  
  551.   ______________________________________________________________________
  552.   I/O base for SB Check from manual of the card (SBC_BASE) [220]
  553.   Sound Blaster IRQ Check from manual of the card (SBC_IRQ) [5]
  554.   Sound Blaster DMA 0, 1 or 3 (SBC_DMA) [1]
  555.   Sound Blaster 16 bit DMA (_REQUIRED_for SB16, Jazz16, SMW) 5, 6 or 7
  556.   (use 1 for 8 bit cards) (SB_DMA2) [5]
  557.   MPU401 I/O base of SB16, Jazz16 and ES1688 Check from manual of the card
  558.   (SB_MPU_BASE) [330]
  559.   SB MPU401 IRQ (Jazz16, SM Wave and ES1688) Use -1 with SB16 (SB_MPU_IRQ) [-1]
  560.   ______________________________________________________________________
  561.  
  562.  
  563.  
  564.   Now recompile the kernel. Debian users should use the kernel-package.
  565.   This package makes the kernel compile as easy as installing a debian
  566.   package. Look at the documentation in /usr/doc/kernel-package/. Here
  567.   is a hint:
  568.  
  569.  
  570.  
  571.        # make-kpkg clean
  572.        # make-kpkg -revision custom.1.0 kernel_image
  573.  
  574.  
  575.  
  576.  
  577.   and then dpkg -i /usr/src/kernel-image-2.0.29_custom.1.0_i386.deb.
  578.  
  579.   If you have another Linux distribution, follow the standard way for
  580.   compiling a new kernel. Don't forget make modules and make
  581.   modules_install. Look at the Sound HOWTO and perhaps the Kernel HOWTO
  582.   for more information.
  583.  
  584.  
  585.  
  586.   3.4.  Reboot
  587.  
  588.  
  589.   After installing the new kernel, you should do a reboot (be sure to
  590.   have a functional boot disk at hand). Cross you fingers.
  591.  
  592.   If you have a PnP card be sure to launch isapnp either in a boot
  593.   script (as described above) or manually:
  594.  
  595.        # /sbin/isapnp /etc/isapnp.conf
  596.        Board 1 has Identity 74 00 00 e3 10 48 00 8c 0e:  CTL0048 Serial No 58128
  597.        [checksum 74]
  598.  
  599.  
  600.  
  601.  
  602.   Now you can install the sound driver, if you have compiled it as a
  603.   module:
  604.  
  605.  
  606.  
  607.        # modprobe -a sound
  608.        AWE32 Sound Driver v0.3.3e (DRAM 2048k)
  609.  
  610.  
  611.  
  612.  
  613.   If you think the memory detection was not correct (I have a report of
  614.   one who has a AWE64 with 4096k, and ``detected'' have been 28672k),
  615.   try either to upgrade the awedrv software or to specify the amount of
  616.   memory in the file /usr/src/linux/drivers/sound/lowlevel/awe_config.h,
  617.   for example:
  618.  
  619.  
  620.  
  621.        #define AWE_DEFAULT_MEM_SIZE  4096   /* kbytes */
  622.  
  623.  
  624.  
  625.  
  626.   Sorry, you have to recompile the kernel then (perhaps compiling the
  627.   modules will be sufficient, but I don't know for sure).
  628.  
  629.   If it works, you may want to have the sound module loaded
  630.   automatically.  You can use kerneld (why this is a bad idea is
  631.   explained in section 1.4) or append a single line containing sound to
  632.   your /etc/modules (in Debian) or add /sbin/modprobe -a sound to your
  633.   start-up script.
  634.  
  635.  
  636.   4.  Testing the Sound Driver
  637.  
  638.  
  639.  
  640.   4.1.  /proc/devices, /dev/sndstat
  641.  
  642.  
  643.   If you have built-in sound support, you will get some useful
  644.   information at boot time. If you have sound support installed as a
  645.   loadable module, you can get the same information (perhaps after
  646.   removing the sound module with modprobe -r sound first) with
  647.  
  648.  
  649.  
  650.        # modprobe -a sound trace_init=1
  651.        Sound initialization started
  652.  
  653.        <Sound Blaster 16 (4.13)> at 0x220 irq 5 dma 1,5
  654.        <Sound Blaster 16> at 0x330 irq 5 dma 0
  655.        <Yamaha OPL3 FM> at 0x388
  656.        Sound initialization complete
  657.        AWE32 Sound Driver v0.3.3e (DRAM 2048k)
  658.  
  659.  
  660.  
  661.   If you have a /proc virtual file system, you can look for the sound
  662.   device with
  663.  
  664.  
  665.  
  666.        # cat /proc/devices
  667.        Character devices:
  668.        [...]
  669.        14 sound
  670.        [...]
  671.  
  672.  
  673.  
  674.  
  675.   Next make sure you have the correct devices installed under /dev/.
  676.   Please look at the Sound HOWTO for details. Then ask /dev/sndstat
  677.   about the status of the sound module:
  678.  
  679.  
  680.  
  681.        # cat /dev/sndstat
  682.        Sound Driver:3.5.4-960630 (Sat Oct 11 19:35:14 CEST 1997 root,
  683.        Linux flora 2.0.29 #1 Sat Oct 11 19:12:56 CEST 1997 i586 unknown)
  684.        Kernel: Linux flora 2.0.29 #1 Sat Oct 11 19:36:23 CEST 1997 i586
  685.        Config options: 0
  686.  
  687.        Installed drivers:
  688.        Type 1: OPL-2/OPL-3 FM
  689.        Type 2: Sound Blaster
  690.        Type 7: SB MPU-401
  691.  
  692.        Card config:
  693.        Sound Blaster at 0x220 irq 5 drq 1,5
  694.        SB MPU-401 at 0x330 irq 5 drq 0
  695.        OPL-2/OPL-3 FM at 0x388 drq 0
  696.  
  697.        Audio devices:
  698.        0: Sound Blaster 16 (4.13)
  699.  
  700.        Synth devices:
  701.        0: Yamaha OPL-3
  702.        1: AWE32 Driver v0.3.3e (DRAM 2048k)
  703.  
  704.        Midi devices:
  705.        0: Sound Blaster 16
  706.  
  707.        Timers:
  708.        0: System clock
  709.  
  710.        Mixers:
  711.        0: Sound Blaster
  712.        1: AWE32 Equalizer
  713.  
  714.  
  715.  
  716.  
  717.   If you don't have an output like this, perhaps there is an error in
  718.   your configuration. Go on and see what doesn't work, then go back to
  719.   step ``Getting Started'', checking everything.
  720.  
  721.  
  722.  
  723.   4.2.  Output - The Raw Audio Device
  724.  
  725.  
  726.  
  727.   Try to get an .au file (Sun workstation) or a raw sample file, and do
  728.  
  729.  
  730.  
  731.        # cat bell.au > /dev/audio
  732.  
  733.  
  734.  
  735.  
  736.   resp.
  737.  
  738.  
  739.  
  740.        # cat sample > /dev/dsp
  741.  
  742.  
  743.  
  744.  
  745.   You should hear the content of the file via the Audio Device 0: Sound
  746.   Blaster 16 (4.3).
  747.  
  748.  
  749.  
  750.   4.3.  Output - The OPL-2/OPL-3 Synthesis
  751.  
  752.  
  753.   If you want to use the OPL-2/OPL-3 FM synthesis to play MIDI-Files
  754.   with your sound card, try the program playmidi (see Appendix B). Start
  755.   it with
  756.  
  757.  
  758.  
  759.        # playmidi -f dance.mid
  760.  
  761.  
  762.  
  763.  
  764.  
  765.   or
  766.  
  767.  
  768.  
  769.  
  770.        # playmidi -4 dance.mid
  771.  
  772.  
  773.  
  774.  
  775.   The former will give you OPL-2, the latter OPL-3 MIDI music. If you
  776.   are embarrassed about the sound, don't blame playmidi: It is the FM
  777.   synthesis that sounds bad.
  778.  
  779.   Imagine you would only have the OSS/Free Sound Driver: Than this is
  780.   the quality of MIDI Music you can achieve (apart from software
  781.   synthesis).  Fortunately, you have a SB AWE, and you can use the Wave
  782.   Table capabilities with the AWE Sound Driver Extension.
  783.  
  784.  
  785.  
  786.   4.4.  Output - The Wave Table Synthesis
  787.  
  788.  
  789.   The AWE Driver Extension comes with special tools (awesfx) to make use
  790.   of the EMU 8000 Wave Table synthesis. First, you have to load a Sound
  791.   Font Bank on your card - even if you want to use the ROM samples! You
  792.   can get the files from your Windows installation - look for files
  793.   ending in *.sfb or *.sf2.
  794.  
  795.   The ROM samples can be loaded with SYNTHGM.SBK, real samples are in
  796.   SYNTHGS.SBK and SYNTHMT.SBK, as well as in SAMPLE.SBK. You can get
  797.   other Sound Font Banks via ftp or www, try the EMU Homepage, the web
  798.   site from Creative Labs, and look out for the Chaos samples, they are
  799.   really good (be sure to check out the AWE Driver Web Site).
  800.  
  801.   Try to load the standard GM (ROM) set with
  802.  
  803.  
  804.  
  805.        # sfxload -i synthgm.sbk
  806.  
  807.  
  808.  
  809.  
  810.   and then play a midi file that comes with your SB AWE:
  811.  
  812.  
  813.  
  814.        # drvmidi dance.mid
  815.  
  816.  
  817.  
  818.  
  819.  
  820.  
  821.   4.5.  Mixing
  822.  
  823.  
  824.   Get your favorite mixer program and start it. Start a raw audio sample
  825.   and two MIDI files at the same time, and try out the mixer settings.
  826.   Play a bit, it should be very easy. Here a list of the devices and how
  827.   they are called:
  828.  
  829.  
  830.      Yamaha OPL-3
  831.         Synth or FM
  832.  
  833.      AWE32 Driver
  834.         Synth or FM (does anyone know a mixer were the last two are
  835.         separated from each other?)
  836.  
  837.      Sound Blaster 16 (4.13)
  838.         PCM or DSP
  839.  
  840.      PC Speaker (still alive)
  841.         Spkr
  842.  
  843.   Other mixer settings refer to the CD ROM, possibly connected to the
  844.   sound card, to Master Volume, Bass, Treble and Recording Level of the
  845.   different input lines. You can specify which lines should be recorded.
  846.  
  847.  
  848.   4.6.  Input - Sampling with the Raw Audio Device
  849.  
  850.  
  851.   You can record different sources: a connected CD ROM, a microphone
  852.   connected to mic, and any that you can connect to line in. Set the
  853.   mixer in the appropriate position. Play a sound and record into a
  854.   file, reading from the Raw Audio Device, for example:
  855.  
  856.  
  857.  
  858.  
  859.   # cdplay
  860.   # dd bs=8k count=5 </dev/dsp >music.au
  861.   5+0 records in
  862.   5+0 records out
  863.   # cat music.au >/dev/dsp
  864.  
  865.  
  866.  
  867.  
  868.   records and plays five seconds of audio from the input device.
  869.  
  870.  
  871.   4.7.  The MIDI Port
  872.  
  873.  
  874.   Sorry, no information about MIDI port yet!
  875.  
  876.  
  877.   5.  AWE Driver Software
  878.  
  879.  
  880.  
  881.   5.1.  sfxload
  882.  
  883.  
  884.   You can load samples in your DRAM on the sound card with the sfxload
  885.   tool. Note that you can only load one sample file per bank, with bank
  886.   0 as default. So, after sfxload synthgs.sbk, the only samples on your
  887.   sound card are the GS samples. If you want to load additional Sound
  888.   Font Banks, you have to use the -b option, for example:
  889.  
  890.  
  891.  
  892.        # sfxload synthgs.sbk
  893.        # sfxload -b1 sample.sbk
  894.        # drvmidi sfx.mid
  895.  
  896.  
  897.  
  898.  
  899.   You can load a default Sound Font Bank automatically with installing
  900.   the module. Just append a line like
  901.  
  902.  
  903.  
  904.        post-install sound /usr/bin/sfxload synthgm.sbk
  905.  
  906.  
  907.  
  908.  
  909.   to your /etc/conf.modules file.
  910.  
  911.   See the documentation for more details about sfxload.
  912.  
  913.  
  914.   5.2.  drvmidi
  915.  
  916.  
  917.   With the drvmidi program, you can use your AWE Driver to play MIDI
  918.   files. Just specify the name of your midi file after the command:
  919.  
  920.  
  921.  
  922.        # drvmidi waltz.mid
  923.  
  924.  
  925.   See the documentation for more details about drvmidi
  926.  
  927.  
  928.   6.  Appendix
  929.  
  930.  
  931.  
  932.   6.1.  Additional Information
  933.  
  934.  
  935.  
  936.      The Linux Sound HOWTO
  937.         Author: Jeff Tranter, <jeff_tranter@pobox.com>
  938.  
  939.         Last Version: v1.17, 4 August 1997
  940.  
  941.         Please take a good look at the Sound HOWTO (available from
  942.         sunsite.unc.edu and other sites). It contains a bulk of data
  943.         about compiling the kernel with sound support, and explains a
  944.         lot about the sound devices, applications etc.
  945.  
  946.         I understand this HOWTO as an addition to the Sound HOWTO.
  947.  
  948.  
  949.      The Linux Sound Playing HOWTO
  950.         Author: Yoo C. Chung, <wacko@laplace.snu.ac.kr>
  951.  
  952.         Last Version: v1.4, 13 May 1997
  953.  
  954.         You should also look at the Sound Playing HOWTO. It tells you
  955.         about the various sound formats and applications to play them.
  956.  
  957.  
  958.      The AWE Driver FAQ
  959.         Author: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
  960.  
  961.         Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/awedrv-
  962.         faq.html>
  963.  
  964.         If you have problems installing the AWE Driver or using the Wave
  965.         Table synthesis of your Sound Blaster card, then look here.
  966.  
  967.  
  968.      The ISA PnP FAQ
  969.         Author: Peter Fox <fox@roestock.demon.co.uk>
  970.  
  971.         Source:
  972.         <http://www.roestock.demon.co.uk/isapnptools/isapnpfaq.html>
  973.  
  974.         If you have problems configuring your ISA PnP card, then this is
  975.         your book of wisdom.
  976.  
  977.  
  978.  
  979.   6.2.  Sources
  980.  
  981.  
  982.  
  983.  
  984.      isapnptools
  985.         Author: Peter Fox <fox@roestock.demon.co.uk>
  986.  
  987.         Last Version: 1.11
  988.  
  989.         Source:
  990.         <http://www.roestock.demon.co.uk/isapnptools/index.html>
  991.         If mailing patches, bug reports or comments, please put 'isapnp'
  992.         somewhere in the subject line, and mail to
  993.         isapnp@roestock.demon.co.uk.
  994.  
  995.  
  996.      awedrv
  997.         Author: Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
  998.  
  999.         Last Version: 0.4.2c
  1000.  
  1001.         Source:  <http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/>
  1002.  
  1003.  
  1004.      Linux kernel
  1005.         Author: Linus Torvald and many other
  1006.  
  1007.         Last Version: At the moment, you should use 2.0.29
  1008.  
  1009.         Source: everywhere, where you can obtain Linux :)
  1010.  
  1011.  
  1012.      OSS/Free
  1013.         Author: Hannu Savolainen (Please check  <http://www.4front-
  1014.         tech.com/usslite before mailing me>).
  1015.  
  1016.         Last Version: I have 3.5.5-beta1
  1017.  
  1018.         Source: with the Linux kernel source package
  1019.  
  1020.         Information:   <http://www.4front-tech.com/usslite> or European
  1021.         mirror <http://personal.eunet.fi/pp/voxware>.
  1022.  
  1023.  
  1024.  
  1025.   6.3.  Sample isapnp.conf
  1026.  
  1027.  
  1028.   In the ISA PnP configuration file created by pnpdump, the single
  1029.   devices of your PnP cards appear as sections. In the output below, one
  1030.   card was detected (the sound card), with four logical devices:
  1031.  
  1032.  
  1033.   o  LD 0: Audio Device
  1034.  
  1035.   o  LD 1: IDE Device
  1036.  
  1037.   o  LD 2: WaveTable Device
  1038.  
  1039.   o  LD 3: Gameport Device
  1040.  
  1041.   I left LD 1 unconfigured, because I have no CD ROM attached to my
  1042.   sound card IDE port. If you have no IDE port on your SB, then LD 1
  1043.   will be the Gameport Device and LD 3 will not appear.
  1044.  
  1045.   Please refer to section ``Getting started'' for further (important!)
  1046.   information about this file.
  1047.  
  1048.  
  1049.  
  1050.  
  1051.  
  1052.  
  1053.  
  1054.  
  1055.  
  1056.  
  1057.   ______________________________________________________________________
  1058.   # $Id: pnpdump.c,v 1.9 1997/06/10 21:37:32 fox Exp $
  1059.   # This is free software, see the sources for details.
  1060.   # This software has NO WARRANTY, use at your OWN RISK
  1061.   #
  1062.   # For details of this file format, see isapnp.conf(5)
  1063.   #
  1064.   # For latest information on isapnp and pnpdump see:
  1065.   # http://www.roestock.demon.co.uk/isapnptools/
  1066.   #
  1067.   # Compiler flags: -DREALTIME -DNEEDSETSCHEDULER
  1068.  
  1069.   (READPORT 0x0203)
  1070.   (ISOLATE)
  1071.   (IDENTIFY *)
  1072.  
  1073.   # Try the following if you get error messages like
  1074.   # Error occurred executing request 'LD 2' on or around line...
  1075.  
  1076.   #(VERIFYLD N)
  1077.  
  1078.   # ANSI string -->Creative SB32 PnP<--
  1079.  
  1080.   (CONFIGURE CTL0048/58128 (LD 0
  1081.   #     ANSI string -->Audio<--
  1082.  
  1083.     (INT 0 (IRQ 5 (MODE +E)))
  1084.     (DMA 0 (CHANNEL 1))
  1085.     (DMA 1 (CHANNEL 5))
  1086.     (IO 0 (BASE 0x0220))
  1087.     (IO 1 (BASE 0x0330))
  1088.     (IO 2 (BASE 0x0388))
  1089.  
  1090.     (ACT Y)
  1091.   ))
  1092.  
  1093.   (CONFIGURE CTL0048/58128 (LD 1
  1094.   #     ANSI string -->IDE<--
  1095.  
  1096.   # (INT 0 (IRQ 10 (MODE +E)))
  1097.   # (IO 0 (BASE 0x0168))
  1098.   # (IO 1 (BASE 0x036e))
  1099.  
  1100.   # (ACT Y)
  1101.   ))
  1102.  
  1103.   (CONFIGURE CTL0048/58128 (LD 2
  1104.   #     ANSI string -->WaveTable<--
  1105.  
  1106.     (IO 0 (BASE 0x0620))
  1107.     (IO 1 (BASE 0x0A20))
  1108.     (IO 2 (BASE 0x0E20))
  1109.  
  1110.     (ACT Y)
  1111.   ))
  1112.  
  1113.   (CONFIGURE CTL0048/58128 (LD 3
  1114.   #     ANSI string -->Game<--
  1115.  
  1116.     (IO 0 (BASE 0x0200))
  1117.     (ACT Y)
  1118.   ))
  1119.  
  1120.   # Returns all cards to the "Wait for Key" state
  1121.   (WAITFORKEY)
  1122.   ______________________________________________________________________
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.  
  1130.  
  1131.  
  1132.  
  1133.  
  1134.  
  1135.  
  1136.  
  1137.  
  1138.  
  1139.  
  1140.  
  1141.  
  1142.  
  1143.  
  1144.  
  1145.  
  1146.  
  1147.  
  1148.  
  1149.  
  1150.  
  1151.  
  1152.  
  1153.  
  1154.  
  1155.  
  1156.  
  1157.  
  1158.  
  1159.  
  1160.  
  1161.  
  1162.  
  1163.  
  1164.  
  1165.  
  1166.  
  1167.  
  1168.  
  1169.  
  1170.  
  1171.  
  1172.  
  1173.  
  1174.  
  1175.  
  1176.  
  1177.  
  1178.  
  1179.  
  1180.  
  1181.  
  1182.  
  1183.  
  1184.  
  1185.  
  1186.  
  1187.  
  1188.  
  1189.