/*
**********************************************************************
* main.c - Creative EMU10K1 audio driver
* Copyright 1999, 2000 Creative Labs, Inc.
*
**********************************************************************
*
* Date Author Summary of changes
* ---- ------ ------------------
* October 20, 1999 Bertrand Lee base code release
* November 2, 1999 Alan Cox cleaned up stuff
*
**********************************************************************
*
* 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.
*
**********************************************************************
*
* Supported devices:
* /dev/dsp: Standard /dev/dsp device, OSS-compatible
* /dev/dsp1: Routes to rear speakers only
* /dev/mixer: Standard /dev/mixer device, OSS-compatible
* /dev/midi: Raw MIDI UART device, mostly OSS-compatible
* /dev/sequencer: Sequencer Interface (requires sound.o)
*
* Revision history:
* 0.1 beta Initial release
* 0.2 Lowered initial mixer vol. Improved on stuttering wave playback. Added MIDI UART support.
* 0.3 Fixed mixer routing bug, added APS, joystick support.
* 0.4 Added rear-channel, SPDIF support.
* 0.5 Source cleanup, SMP fixes, multiopen support, 64 bit arch fixes,
* moved bh's to tasklets, moved to the new PCI driver initialization style.
* 0.6 Make use of pci_alloc_consistent, improve compatibility layer for 2.2 kernels,
* code reorganization and cleanup.
* 0.7 Support for the Emu-APS. Bug fixes for voice cache setup, mmaped sound + poll().
* Support for setting external TRAM size.
* 0.8 Make use of the kernel ac97 interface. Support for a dsp patch manager.
* 0.9 Re-enables rear speakers volume controls
* 0.10 Initializes rear speaker volume.
* Dynamic patch storage allocation.
* New private ioctls to change control gpr values.
* Enable volume control interrupts.
* By default enable dsp routes to digital out.
* 0.11 Fixed fx / 4 problem.
* 0.12 Implemented mmaped for recording.
* Fixed bug: not unreserving mmaped buffer pages.
* IRQ handler cleanup.
* 0.13 Fixed problem with dsp1
* Simplified dsp patch writing (inside the driver)
* Fixed several bugs found by the Stanford tools
* 0.14 New control gpr to oss mixer mapping feature (Chris Purnell)
* Added AC3 Passthrough Support (Juha Yrjola)
* Added Support for 5.1 cards (digital out and the third analog out)
* 0.15 Added Sequencer Support (Daniel Mack)
* Support for multichannel pcm playback (Eduard Hasenleithner)
* 0.16 Mixer improvements, added old treble/bass support (Daniel Bertrand)
* Small code format cleanup.
* Deadlock bug fix for emu10k1_volxxx_irqhandler().
* 0