================================================================
	AWE32 Sound Driver for Linux and FreeBSD
		version 0.4.2c; Oct. 7, 1997
================================================================

* GENERAL NOTES

This is a sound driver extension for the Sound Blaster AWE32 and other
compatible cards (AWE32-PnP, SB32, SB32-PnP, AWE64, etc.) to enable
the wave synth operations.  The driver is provided for both Linux
1.2.x and 2.[01].x kernels, and also FreeBSD on Intel x86 and DEC
Alpha systems.   See INSTALL.awe (or INSTALL.fbsd) document for
installation of the driver package.

This driver was written by Takashi Iwai (iwai@dragon.mm.t.u-tokyo.ac.jp)  
who also maintains the code.  Please forward any questions, bug fixes
and suggestions directly to Iwai (_NOT_ to Linus Torvalds or Hannu
Savolainen).


* NOTE TO LINUX USERS

To enable this driver on linux-2.[01].x kernels, you need turn on both 
"lowlevel drivers support" and "AWE32 synth support" options in sound
menu when configure your linux kernel and modules.  For more details,
see the installation document in the original driver package
(awedrv-0.4.2.tar.gz) available at the web page:
	http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/

If you're using PnP cards, the card must be initialized before loading
the sound driver.  There're several options to do this:
    - Initialize the card via ISA PnP tools, and load the sound module.
    - Initialize the card on DOS, and load linux by loadlin.exe
    - Use PnP driver (for Linux-2.x.x)
See the FAQ list on the URL above.


* USING THE DRIVER

The GM and GS sounds include multiple instrument layers.
The current version supports this type of sounds with a special
extension, but it uses a non-standard way of sequencer calls.  Then,
so far, only drvmidi and playmidi can play the multiple instruments
and stereo sounds properly as MIDI sequencers.

To load SoundFont files, sfxload utility is required.
All AWE32 driver and utilities can be downloaded from:
	http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/

The sfxload is included in the package awesfx-0.4.2.tgz. Binary
packages are available there, too.  See the instruction in each
package for installation.

Sfxload reads a SoundFont file and transfers it to the sound driver.
Note that new sfxload no longer requires -i option.

	% sfxload synthgm.sbk

You can tune up the sound via some new options, -A, -a and -d.

	% sfxload -A2 synthgm.sbk

See the manual of sfxload for more details.

Now you can hear midi musics by supported midi players (drvmidi or
playmidi-2.5).

	% drvmidi foo.mid

If you have only 512kb on the sound card, I recommend to use dynamic
sample loading via -L option of drvmidi.  2MB GM/GS soundfont file is
available in most midi files.

	% sfxload synthgm
	% drvmidi -L 2mbgmgs foo.mid

Enjoy.


* COMPILE FLAGS

Compile conditions are defined in awe_config.h.

[Compatibility Conditions]
The following flags are defined automatically when using installation
shell script.

- AWE_OBSOLETE_VOXWARE		(default: not defined)
    indicates the system is VoxWare-3.0.x (with linux 1.2.x or
    FreeBSD) if defined.

- AWE_NEW_KERNEL_INTERFACE	(default: not defined)
    indicates the system is OSSLite on Linux 2.1.6 or later if
    defined.

- HAS_LOWLEVEL_H		(default: not defined)
    indicates the system has "lowlevel.h" in the sound/lowlevel
    directory.  OSS driver has this file.

- AWE_NO_PATCHMGR		(default: not defined)
    indicates the sound driver has no patch manager function (for
    OSS-3.707 (in Linux-2.1.13) or newer). 

- AWE_OSS38			(default: not defined)
    indicates the sound driver has an additional parameter in
    operation table (for OSS-3.8b5 in Linux-2.1.25 or newer).


[Hardware Conditions]
You don't have to define the following two values.
Define them only when the driver couldn't detect the card properly.

- AWE_DEFAULT_BASE_ADDR		(default: not defined)
    specifies the base port address of your AWE32 card.

- AWE_DEFAULT_MEM_SIZE		(default: not defined)
    specifies the memory size of your AWE32 card in kilo bytes.
    

[Sample Table Size]
From ver.0.4.0, sample tables are allocated dynamically (except
Linux-1.2.x system), so you need NOT to touch these parameters.
Linux-1.2.x users may need to increase these values for sound 
cards equipped with more DRAM.

- AWE_MAX_SF_LISTS, AWE_MAX_SAMPLES, AWE_MAX_INFOS


[Other Conditions]

- AWE_ALWAYS_INIT_FM		(default: not defined)
    indicates the AWE driver always initialize FM passthrough even
    without DRAM on board.  Emu8000 chip has a restriction for playing
    samples on DRAM that at least two channels must be occupied as
    passthrough channels. 

- AWE_DEBUG_ON			(default: defined)
    turns on debugging messages if defined.

- AWE_HAS_GUS_COMPATIBILITY	(default: defined)
    Enables GUS compatibility mode if defined, reading GUS patches and 
    GUS control commands.  Define this option to use GMOD or other
    GUS module players.

- AWE_ACCEPT_ALL_SOUNDS_CONTROL	(default: defined)
    Enables MIDI control #120 and #123 as "all notes off" and "all
    sounds off" events, respectively.

- CONFIG_AWE32_MIXER		(default: defined)
    Adds a mixer device for AWE32 bass/treble equalizer control.
    You can access this device using /dev/mixer?? (usually mixer01).

- AWE_LOOKUP_MIDI_PRIORIITY	(default: defined)
    Allocates voices according to MIDI channel priority.
    Drum channels have the highest priorit, followed by #1, #2, and
    so on.

- DEF_FM_CHORUS_DEPTH		(default: 0x10)
    The default strength to be sent to the chorus effect engine.
    From 0 to 0xff.  Larger numbers may often cause weird sounds.

- DEF_FM_REVERB_DEPTH		(default: 0x10)
    The default strength to be sent to the reverb effect engine.
    From 0 to 0xff.  Larger numbers may often cause weird sounds.


* ACKNOWLEDGMENTS

Thanks to Witold Jachimczyk (witek@xfactor.wpi.edu) for much advice
on programming of AWE32.  Much code is brought from his AWE32-native 
MOD player, ALMP.
The port of awedrv to FreeBSD was done by Randall Hopper
(rhh@ct.picker.com).
I also thank linux-awe-ml members for their efforts
to reboot their systems many times. :-)


* BUGS & TODO'S

- can't detect DRAM size on some cards
- smarter patch management
- smarter DRAM memory control
- etc., etc., etc.


* COPYRIGHT

Copyright (C) 1996, 1997 Takashi Iwai

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Takashi Iwai <iwai@dragon.mm.t.u-tokyo.ac.jp>
