提交 d56b9b9c 编写于 作者: A Adrian Bunk 提交者: Linus Torvalds

[PATCH] The scheduled removal of some OSS drivers

This patch contains the scheduled removal of OSS drivers that:
- have ALSA drivers for the same hardware without known regressions and
- whose Kconfig options have been removed in 2.6.17.

[michal.k.k.piotrowski@gmail.com: build fix]
Signed-off-by: NAdrian Bunk <bunk@stusta.de>
Signed-off-by: NMichal Piotrowski <michal.k.k.piotrowski@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 595182bc
......@@ -29,14 +29,6 @@ Who: Adrian Bunk <bunk@stusta.de>
---------------------------
What: drivers that were depending on OBSOLETE_OSS_DRIVER
(config options already removed)
When: before 2.6.19
Why: OSS drivers with ALSA replacements
Who: Adrian Bunk <bunk@stusta.de>
---------------------------
What: raw1394: requests of type RAW1394_REQ_ISO_SEND, RAW1394_REQ_ISO_LISTEN
When: November 2006
Why: Deprecated in favour of the new ioctl-based rawiso interface, which is
......
......@@ -289,9 +289,6 @@ and is between 256 and 4096 characters. It is defined in the file
autotest [IA64]
awe= [HW,OSS] AWE32/SB32/AWE64 wave table synth
Format: <io>,<memsize>,<isapnp>
aztcd= [HW,CD] Aztech CD268 CDROM driver
Format: <io>,0x79 (?)
......@@ -536,10 +533,6 @@ and is between 256 and 4096 characters. It is defined in the file
Default value is 0.
Value can be changed at runtime via /selinux/enforce.
es1370= [HW,OSS]
Format: <lineout>[,<micbias>]
See also header of sound/oss/es1370.c.
es1371= [HW,OSS]
Format: <spdif>,[<nomix>,[<amplifier>]]
See also header of sound/oss/es1371.c.
......@@ -580,9 +573,6 @@ and is between 256 and 4096 characters. It is defined in the file
gscd= [HW,CD]
Format: <io>
gus= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma16>
gvp11= [HW,SCSI]
hashdist= [KNL,NUMA] Large hashes allocated during boot
......@@ -841,12 +831,6 @@ and is between 256 and 4096 characters. It is defined in the file
(machvec) in a generic kernel.
Example: machvec=hpzx1_swiotlb
mad16= [HW,OSS] Format:
<io>,<irq>,<dma>,<dma16>,<mpu_io>,<mpu_irq>,<joystick>
maui= [HW,OSS]
Format: <io>,<irq>
max_loop= [LOOP] Maximum number of loopback devices that can
be mounted
Format: <1-256>
......@@ -1114,9 +1098,6 @@ and is between 256 and 4096 characters. It is defined in the file
opl3= [HW,OSS]
Format: <io>
opl3sa= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma2>,<mpu_io>,<mpu_irq>
opl3sa2= [HW,OSS] Format:
<io>,<irq>,<dma>,<dma2>,<mss_io>,<mpu_io>,<ymode>,<loopback>[,<isapnp>,<multiple]
......@@ -1451,9 +1432,6 @@ and is between 256 and 4096 characters. It is defined in the file
sg_def_reserved_size= [SCSI]
sgalaxy= [HW,OSS]
Format: <io>,<irq>,<dma>,<dma2>,<sgbase>
shapers= [NET]
Maximal number of shapers.
......@@ -1594,9 +1572,6 @@ and is between 256 and 4096 characters. It is defined in the file
snd-ymfpci= [HW,ALSA]
sonicvibes= [HW,OSS]
Format: <reverb>
sonycd535= [HW,CD]
Format: <io>[,<irq>]
......
Installing and using Creative AWE midi sound under Linux.
This documentation is devoted to the Creative Sound Blaster AWE32, AWE64 and
SB32.
1) Make sure you have an ORIGINAL Creative SB32, AWE32 or AWE64 card. This
is important, because the driver works only with real Creative cards.
2) The first thing you need to do is re-compile your kernel with support for
your sound card. Run your favourite tool to configure the kernel and when
you get to the "Sound" menu you should enable support for the following:
Sound card support,
OSS sound modules,
100% Sound Blaster compatibles (SB16/32/64, ESS, Jazz16) support,
AWE32 synth
If your card is "Plug and Play" you will also need to enable these two
options, found under the "Plug and Play configuration" menu:
Plug and Play support
ISA Plug and Play support
Now compile and install the kernel in normal fashion. If you don't know
how to do this you can find instructions for this in the README file
located in the root directory of the kernel source.
3) Before you can start playing midi files you will have to load a sound
bank file. The utility needed for doing this is called "sfxload", and it
is one of the utilities found in a package called "awesfx". If this
package is not available in your distribution you can download the AWE
snapshot from Creative Labs Open Source website:
http://www.opensource.creative.com/snapshot.html
Once you have unpacked the AWE snapshot you will see a "awesfx"
directory. Follow the instructions in awesfx/docs/INSTALL to install the
utilities in this package. After doing this, sfxload should be installed
as:
/usr/local/bin/sfxload
To enable AWE general midi synthesis you should also get the sound bank
file for general midi from:
http://members.xoom.com/yar/synthgm.sbk.gz
Copy it to a directory of your choice, and unpack it there.
4) Edit /etc/modprobe.conf, and insert the following lines at the end of the
file:
alias sound-slot-0 sb
alias sound-service-0-1 awe_wave
install awe_wave /sbin/modprobe --first-time -i awe_wave && /usr/local/bin/sfxload PATH_TO_SOUND_BANK_FILE
You will of course have to change "PATH_TO_SOUND_BANK_FILE" to the full
path of the sound bank file. That will enable the Sound Blaster and AWE
wave synthesis. To play midi files you should get one of these programs if
you don't already have them:
Playmidi: http://playmidi.openprojects.net
AWEMidi Player (drvmidi) Included in the previously mentioned AWE
snapshot.
You will probably have to pass the "-e" switch to playmidi to have it use
your midi device. drvmidi should work without switches.
If something goes wrong please e-mail me. All comments and suggestions are
welcome.
Yaroslav Rosomakho (alons55@dialup.ptt.ru)
http://www.yar.opennet.ru
Last Updated: Feb 3 2001
Audio driver for CM8338/CM8738 chips by Chen-Li Tien
HARDWARE SUPPORTED
================================================================================
C-Media CMI8338
C-Media CMI8738
On-board C-Media chips
STEPS TO BUILD DRIVER
================================================================================
1. Backup the Config.in and Makefile in the sound driver directory
(/usr/src/linux/driver/sound).
The Configure.help provide help when you config driver in step
4, please backup the original one (/usr/src/linux/Document) and
copy this file.
The cmpci is document for the driver in detail, please copy it
to /usr/src/linux/Document/sound so you can refer it. Backup if
there is already one.
2. Extract the tar file by 'tar xvzf cmpci-xx.tar.gz' in the above
directory.
3. Change directory to /usr/src/linux
4. Config cm8338 driver by 'make menuconfig', 'make config' or
'make xconfig' command.
5. Please select Sound Card (CONFIG_SOUND=m) support and CMPCI
driver (CONFIG_SOUND_CMPCI=m) as modules. Resident mode not tested.
For driver option, please refer 'DRIVER PARAMETER'
6. Compile the kernel if necessary.
7. Compile the modules by 'make modules'.
8. Install the modules by 'make modules_install'
INSTALL DRIVER
================================================================================
1. Before first time to run the driver, create module dependency by
'depmod -a'
2. To install the driver manually, enter 'modprobe cmpci'.
3. Driver installation for various distributions:
a. Slackware 4.0
Add the 'modprobe cmpci' command in your /etc/rc.d/rc.modules
file.so you can start the driver automatically each time booting.
b. Caldera OpenLinux 2.2
Use LISA to load the cmpci module.
c. RedHat 6.0 and S.u.S.E. 6.1
Add following command in /etc/conf.modules:
alias sound cmpci
also visit http://www.cmedia.com.tw for installation instruction.
DRIVER PARAMETER
================================================================================
Some functions for the cm8738 can be configured in Kernel Configuration
or modules parameters. Set these parameters to 1 to enable.
mpuio: I/O ports base for MPU-401, 0 if disabled.
fmio: I/O ports base for OPL-3, 0 if disabled.
spdif_inverse:Inverse the S/PDIF-in signal, this depends on your
CD-ROM or DVD-ROM.
spdif_loop: Enable S/PDIF loop, this route S/PDIF-in to S/PDIF-out
directly.
speakers: Number of speakers used.
use_line_as_rear:Enable this if you want to use line-in as
rear-out.
use_line_as_bass:Enable this if you want to use line-in as
bass-out.
joystick: Enable joystick. You will need to install Linux joystick
driver.
================================================================
INSTALLATION OF AWE32 SOUND DRIVER FOR LINUX
Takashi Iwai <iwai@ww.uni-erlangen.de>
================================================================
----------------------------------------------------------------
* Attention to SB-PnP Card Users
If you're using PnP cards, the initialization of PnP is required
before loading this driver. You have now three options:
1. Use isapnptools.
2. Use in-kernel isapnp support.
3. Initialize PnP on DOS/Windows, then boot linux by loadlin.
In this document, only the case 1 case is treated.
----------------------------------------------------------------
* Installation on Red Hat 5.0 Sound Driver
Please use install-rh.sh under RedHat5.0 directory.
DO NOT USE install.sh below.
See INSTALL.RH for more details.
----------------------------------------------------------------
* Installation/Update by Shell Script
1. Become root
% su
2. If you have never configured the kernel tree yet, run make config
once (to make dependencies and symlinks).
# cd /usr/src/linux
# make xconfig
3. Run install.sh script
# sh ./install.sh
4. Configure your kernel
(for Linux 2.[01].x user)
# cd /usr/src/linux
# make xconfig (or make menuconfig)
(for Linux 1.2.x user)
# cd /usr/src/linux
# make config
Answer YES to both "lowlevel drivers" and "AWE32 wave synth" items
in Sound menu. ("lowlevel drivers" will appear only in 2.x
kernel.)
5. Make your kernel (and modules), and install them as usual.
5a. make kernel image
# make zImage
5b. make modules and install them
# make modules && make modules_install
5c. If you're using lilo, copy the kernel image and run lilo.
Otherwise, copy the kernel image to suitable directory or
media for your system.
6. Reboot the kernel if necessary.
- If you updated only the modules, you don't have to reboot
the system. Just remove the old sound modules here.
in
# rmmod sound.o (linux-2.0 or OSS/Free)
# rmmod awe_wave.o (linux-2.1)
7. If your AWE card is a PnP and not initialized yet, you'll have to
do it by isapnp tools. Otherwise, skip to 8.
This section described only a brief explanation. For more
details, please see the AWE64-Mini-HOWTO or isapnp tools FAQ.
7a. If you have no isapnp.conf file, generate it by pnpdump.
Otherwise, skip to 7d.
# pnpdump > /etc/isapnp.conf
7b. Edit isapnp.conf file. Comment out the appropriate
lines containing desirable I/O ports, DMA and IRQs.
Don't forget to enable (ACT Y) line.
7c. Add two i/o ports (0xA20 and 0xE20) in WaveTable part.
ex)
(CONFIGURE CTL0048/58128 (LD 2
# ANSI string -->WaveTable<--
(IO 0 (BASE 0x0620))
(IO 1 (BASE 0x0A20))
(IO 2 (BASE 0x0E20))
(ACT Y)
))
7d. Load the config file.
CAUTION: This will reset all PnP cards!
# isapnp /etc/isapnp.conf
8. Load the sound module (if you configured it as a module):
for 2.0 kernel or OSS/Free monolithic module:
# modprobe sound.o
for 2.1 kernel:
# modprobe sound
# insmod uart401
# insmod sb io=0x220 irq=5 dma=1 dma16=5 mpu_io=0x330
(These values depend on your settings.)
# insmod awe_wave
(Be sure to load awe_wave after sb!)
See Documentation/sound/oss/AWE32 for
more details.
9. (only for obsolete systems) If you don't have /dev/sequencer
device file, make it according to Readme.linux file on
/usr/src/linux/drivers/sound. (Run a shell script included in
that file). <-- This file no longer exists in the recent kernels!
10. OK, load your own soundfont file, and enjoy MIDI!
% sfxload synthgm.sbk
% drvmidi foo.mid
11. For more advanced use (eg. dynamic loading, virtual bank and
etc.), please read the awedrv FAQ or the instructions in awesfx
and awemidi packages.
Good luck!
(This recipe has been edited to update the configuration symbols,
and change over to modprobe.conf for 2.6)
From: Shaw Carruthers <shaw@shawc.demon.co.uk>
I have been using mad16 sound for some time now with no problems, current
kernel 2.1.89
lsmod shows:
mad16 5176 0
sb 22044 0 [mad16]
uart401 5576 0 [mad16 sb]
ad1848 14176 1 [mad16]
sound 61928 0 [mad16 sb uart401 ad1848]
.config has:
CONFIG_SOUND=m
CONFIG_SOUND_ADLIB=m
CONFIG_SOUND_MAD16=m
CONFIG_SOUND_YM3812=m
modprobe.conf has:
alias char-major-14-* mad16
options sb mad16=1
options mad16 io=0x530 irq=7 dma=0 dma16=1 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
To get the built in mixer to work this needs to be:
options adlib_card io=0x388 # FM synthesizer
options sb mad16=1
options mad16 io=0x530 irq=7 dma=0 dma16=1 mpu_io=816 mpu_irq=5 && /usr/local/bin/aumix -w 15 -p 20 -m 0 -1 0 -2 0 -3 0 -i 0
The addition of the "mpu_io=816 mpu_irq=5" to the mad16 options line is
------------------------------------------------------------------------
The mad16 module in addition supports the following options:
option: meaning: default:
joystick=0,1 disabled, enabled disabled
cdtype=0x00,0x02,0x04, disabled, Sony CDU31A, disabled
0x06,0x08,0x0a Mitsumi, Panasonic,
Secondary IDE, Primary IDE
cdport=0x340,0x320, 0x340
0x330,0x360
cdirq=0,3,5,7,9,10,11 disabled, IRQ3, ... disabled
cddma=0,5,6,7 disabled, DMA5, ... DMA5 for Mitsumi or IDE
cddma=0,1,2,3 disabled, DMA1, ... DMA3 for Sony or Panasonic
opl4=0,1 OPL3, OPL4 OPL3
for more details see linux/drivers/sound/mad16.c
Rui Sousa
An OSS/Lite Driver for the ESS Maestro family of sound cards
Zach Brown, December 1999
Driver Status and Availability
------------------------------
The most recent version of this driver will hopefully always be available at
http://www.zabbo.net/maestro/
I will try and maintain the most recent stable version of the driver
in both the stable and development kernel lines.
ESS Maestro Chip Family
-----------------------
There are 3 main variants of the ESS Maestro PCI sound chip. The first
is the Maestro 1. It was originally produced by Platform Tech as the
'AGOGO'. It can be recognized by Platform Tech's PCI ID 0x1285 with
0x0100 as the device ID. It was put on some sound boards and a few laptops.
ESS bought the design and cleaned it up as the Maestro 2. This starts
their marking with the ESS vendor ID 0x125D and the 'year' device IDs.
The Maestro 2 claims 0x1968 while the Maestro 2e has 0x1978.
The various families of Maestro are mostly identical as far as this
driver is concerned. It doesn't touch the DSP parts that differ (though
it could for FM synthesis).
Driver OSS Behavior
--------------------
This OSS driver exports /dev/mixer and /dev/dsp to applications, which
mostly adhere to the OSS spec. This driver doesn't register itself
with /dev/sndstat, so don't expect information to appear there.
The /dev/dsp device exported behaves almost as expected. Playback is
supported in all the various lovely formats. 8/16bit stereo/mono from
8khz to 48khz, and mmap()ing for playback behaves. Capture/recording
is limited due to oddities with the Maestro hardware. One can only
record in 16bit stereo. For recording the maestro uses non interleaved
stereo buffers so that mmap()ing the incoming data does not result in
a ring buffer of LRLR data. mmap()ing of the read buffers is therefore
disallowed until this can be cleaned up.
/dev/mixer is an interface to the AC'97 codec on the Maestro. It is
worth noting that there are a variety of AC'97s that can be wired to
the Maestro. Which is used is entirely up to the hardware implementor.
This should only be visible to the user by the presence, or lack, of
'Bass' and 'Treble' sliders in the mixer. Not all AC'97s have them.
The driver doesn't support MIDI or FM playback at the moment. Typically
the Maestro is wired to an MPU MIDI chip, but some hardware implementations
don't. We need to assemble a white list of hardware implementations that
have MIDI wired properly before we can claim to support it safely.
Compiling and Installing
------------------------
With the drivers inclusion into the kernel, compiling and installing
is the same as most OSS/Lite modular sound drivers. Compilation
of the driver is enabled through the CONFIG_SOUND_MAESTRO variable
in the config system.
It may be modular or statically linked. If it is modular it should be
installed with the rest of the modules for the kernel on the system.
Typically this will be in /lib/modules/ somewhere. 'alias sound maestro'
should also be added to your module configs (typically /etc/conf.modules)
if you're using modular OSS/Lite sound and want to default to using a
maestro chip.
As this is a PCI device, the module does not need to be informed of
any IO or IRQ resources it should use, it devines these from the
system. Sometimes, on sucky PCs, the BIOS fails to allocated resources
for the maestro. This will result in a message like:
maestro: PCI subsystem reports IRQ 0, this might not be correct.
from the kernel. Should this happen the sound chip most likely will
not operate correctly. To solve this one has to dig through their BIOS
(typically entered by hitting a hot key at boot time) and figure out
what magic needs to happen so that the BIOS will reward the maestro with
an IRQ. This operation is incredibly system specific, so you're on your
own. Sometimes the magic lies in 'PNP Capable Operating System' settings.
There are very few options to the driver. One is 'debug' which will
tell the driver to print minimal debugging information as it runs. This
can be collected with 'dmesg' or through the klogd daemon.
The other, more interesting option, is 'dsps_order'. Typically at
install time the driver will only register one available /dev/dsp device
for its use. The 'dsps_order' module parameter allows for more devices
to be allocated, as a power of two. Up to 4 devices can be registered
( dsps_order=2 ). These devices act as fully distinct units and use
separate channels in the maestro.
Power Management
----------------
As of version 0.14, this driver has a minimal understanding of PCI
Power Management. If it finds a valid power management capability
on the PCI device it will attempt to use the power management
functions of the maestro. It will only do this on Maestro 2Es and
only on machines that are known to function well. You can
force the use of power management by setting the 'use_pm' module
option to 1, or can disable it entirely by setting it to 0.
When using power management, the driver does a few things
differently. It will keep the chip in a lower power mode
when the module is inserted but /dev/dsp is not open. This
allows the mixer to function but turns off the clocks
on other parts of the chip. When /dev/dsp is opened the chip
is brought into full power mode, and brought back down
when it is closed. It also powers down the chip entirely
when the module is removed or the machine is shutdown. This
can have nonobvious consequences. CD audio may not work
after a power managing driver is removed. Also, software that
doesn't understand power management may not be able to talk
to the powered down chip until the machine goes through a hard
reboot to bring it back.
.. more details ..
------------------
drivers/sound/maestro.c contains comments that hopefully explain
the maestro implementation.
An OSS/Lite Driver for the ESS Maestro3 family of sound chips
Zach Brown, January 2001
Driver Status and Availability
------------------------------
The most recent version of this driver will hopefully always be available at
http://www.zabbo.net/maestro3/
I will try and maintain the most recent stable version of the driver
in both the stable and development kernel lines.
Historically I've sucked pretty hard at actually doing that, however.
ESS Maestro3 Chip Family
-----------------------
The 'Maestro3' is much like the Maestro2 chip. The noted improvement
is the removal of the silicon in the '2' that did PCM mixing. All that
work is now done through a custom DSP called the ASSP, the Asynchronus
Specific Signal Processor.
The 'Allegro' is a baby version of the Maestro3. I'm not entirely clear
on the extent of the differences, but the driver supports them both :)
The 'Allegro' shows up as PCI ID 0x1988 and the Maestro3 as 0x1998,
both under ESS's vendor ID of 0x125D. The Maestro3 can also show up as
0x199a when hardware strapping is used.
The chip can also act as a multi function device. The modem IDs follow
the audio multimedia device IDs. (so the modem part of an Allegro shows
up as 0x1989)
Driver OSS Behavior
--------------------
This OSS driver exports /dev/mixer and /dev/dsp to applications, which
mostly adhere to the OSS spec. This driver doesn't register itself
with /dev/sndstat, so don't expect information to appear there.
The /dev/dsp device exported behaves as expected. Playback is
supported in all the various lovely formats. 8/16bit stereo/mono from
8khz to 48khz, with both read()/write(), and mmap().
/dev/mixer is an interface to the AC'97 codec on the Maestro3. It is
worth noting that there are a variety of AC'97s that can be wired to
the Maestro3. Which is used is entirely up to the hardware implementor.
This should only be visible to the user by the presence, or lack, of
'Bass' and 'Treble' sliders in the mixer. Not all AC'97s have them.
The Allegro has an onchip AC'97.
The driver doesn't support MIDI or FM playback at the moment.
Compiling and Installing
------------------------
With the drivers inclusion into the kernel, compiling and installing
is the same as most OSS/Lite modular sound drivers. Compilation
of the driver is enabled through the CONFIG_SOUND_MAESTRO3 variable
in the config system.
It may be modular or statically linked. If it is modular it should be
installed with the rest of the modules for the kernel on the system.
Typically this will be in /lib/modules/ somewhere. 'alias sound-slot-0
maestro3' should also be added to your module configs (typically
/etc/modprobe.conf) if you're using modular OSS/Lite sound and want to
default to using a maestro3 chip.
There are very few options to the driver. One is 'debug' which will
tell the driver to print minimal debugging information as it runs. This
can be collected with 'dmesg' or through the klogd daemon.
One is 'external_amp', which tells the driver to attempt to enable
an external amplifier. This defaults to '1', you can tell the driver
not to bother enabling such an amplifier by setting it to '0'.
And the last is 'gpio_pin', which tells the driver which GPIO pin number
the external amp uses (0-15), The Allegro uses 8 by default, all others 1.
If everything loads correctly and seems to be working but you get no sound,
try tweaking this value.
Systems known to need a different value
Panasonic ToughBook CF-72: gpio_pin=13
Power Management
----------------
This driver has a minimal understanding of PCI Power Management. It will
try and power down the chip when the system is suspended, and power
it up with it is resumed. It will also try and power down the chip
when the machine is shut down.
Linux 2.4 Sound Changes
2000-September-25
Christoph Hellwig, <hch@infradead.org>
=== isapnp support
The Linux 2.4 Kernel does have reliable in-kernel isapnp support.
Some drivers (sb.o, ad1816.o awe_wave.o) do now support automatically
detecting and configuring isapnp devices.
If you have a not yet supported isapnp soundcard, mail me the content
of '/proc/isapnp' on your system and some information about your card
and its driver(s) so I can try to get isapnp working for it.
=== soundcard resources on kernel commandline
Before Linux 2.4 you had to specify the resources for sounddrivers
statically linked into the kernel at compile time
(in make config/menuconfig/xconfig). In Linux 2.4 the resources are
now specified at the boot-time kernel commandline (e.g. the lilo
'append=' line or everything that's after the kernel name in grub).
Read the Configure.help entry for your card for the parameters.
=== softoss is gone
In Linux 2.4 the softoss in-kernel software synthesizer is no more aviable.
Use a user space software synthesizer like timidity instead.
=== /dev/sndstat and /proc/sound are gone
In older Linux versions those files exported some information about the
OSS/Free configuration to userspace. In Linux 2.3 they were removed because
they did not support the growing number of pci soundcards and there were
some general problems with this interface.
OPL3-SA1 sound driver (opl3sa.o)
---
Note: This howto only describes how to setup the OPL3-SA1 chip; this info
does not apply to the SA2, SA3, or SA4.
---
The Yamaha OPL3-SA1 sound chip is usually found built into motherboards, and
it's a decent little chip offering a WSS mode, a SB Pro emulation mode, MPU401
and OPL3 FM Synth capabilities.
You can enable inclusion of the driver via CONFIG_SOUND_OPL3SA1=m, or
CONFIG_SOUND_OPL3SA1=y through 'make config/xconfig/menuconfig'.
You'll need to know all of the relevant info (irq, dma, and io port) for the
chip's WSS mode, since that is the mode the kernel sound driver uses, and of
course you'll also need to know about where the MPU401 and OPL3 ports and
IRQs are if you want to use those.
Here's the skinny on how to load it as a module:
modprobe opl3sa io=0x530 irq=11 dma=0 dma2=1 mpu_io=0x330 mpu_irq=5
Module options in detail:
io: This is the WSS's port base.
irq: This is the WSS's IRQ.
dma: This is the WSS's DMA line. In my BIOS setup screen this was
listed as "WSS Play DMA"
dma2: This is the WSS's secondary DMA line. My BIOS calls it the
"WSS capture DMA"
mpu_io: This is the MPU401's port base.
mpu_irq: This is the MPU401's IRQ.
If you'd like to use the OPL3 FM Synthesizer, make sure you enable
CONFIG_SOUND_YM3812 (in 'make config'). That'll build the opl3.o module.
Then a simple 'insmod opl3 io=0x388', and you now have FM Synth.
You can also use the SoftOSS software synthesizer instead of the builtin OPL3.
Here's how:
Say 'y' or 'm' to "SoftOSS software wave table engine" in make config.
If you said yes, the software synth is available once you boot your new
kernel.
If you chose to build it as a module, just insmod the resulting softoss2.o
Questions? Comments?
<stiker@northlink.com>
================================================================
AWE32 Sound Driver for Linux / FreeBSD
version 0.4.3; Nov. 1, 1998
Takashi Iwai <iwai@ww.uni-erlangen.de>
================================================================
* GENERAL NOTES
This is a sound driver extension for SoundBlaster AWE32 and other
compatible cards (AWE32-PnP, SB32, SB32-PnP, AWE64 & etc) to enable
the wave synth operations. The driver is provided for Linux 1.2.x
and 2.[012].x kernels, as well as FreeBSD, on Intel x86 and DEC
Alpha systems.
This driver was written by Takashi Iwai <iwai@ww.uni-erlangen.de>,
and provided "as is". The original source (awedrv-0.4.3.tar.gz) and
binary packages are available on the following URL:
http://bahamut.mm.t.u-tokyo.ac.jp/~iwai/awedrv/
Note that since the author is apart from this web site, the update is
not frequent now.
* NOTE TO LINUX USERS
To enable this driver on linux-2.[01].x kernels, you need turn on
"AWE32 synth" options in sound menu when configure your linux kernel
and modules. The precise installation procedure is described in the
AWE64-Mini-HOWTO and linux-kernel/Documetation/sound/AWE32.
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 kernel driver (for Linux-2.x.x)
The detailed instruction for the solution using isapnp tools is found
in many documents like above. A brief instruction is also included in
the installation document of this package.
For PnP driver project, please refer to the following URL:
http://www-jcr.lmh.ox.ac.uk/~pnp/
* USING THE DRIVER
The awedrv has several different playing modes to realize easy channel
allocation for MIDI songs. To hear the exact sound quality, you need
to obtain the extended sequencer program, drvmidi or playmidi-2.5.
For playing MIDI files, you *MUST* load the soundfont file on the
driver previously by sfxload utility. Otherwise you'll here no sounds
at all! All the utilities and driver source packages are found in the
above URL. The sfxload program is included in the package
awesfx-0.4.3.tgz. Binary packages are available there, too. See the
instruction in each package for installation.
Loading a soundfont file is very simple. Just execute the command
% sfxload synthgm.sbk
Then, sfxload transfers the file "synthgm.sbk" to the driver.
Both SF1 and SF2 formats are accepted.
Now you can hear midi musics by a midi player.
% drvmidi foo.mid
If you run MIDI player after MOD player, you need to load soundfont
files again, since MOD player programs clear the previous loaded
samples by their own data.
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
This makes a big difference (believe me)! For more details, please
refer to the FAQ list which is available on the URL above.
The current chorus, reverb and equalizer status can be changed by
aweset utility program (included in awesfx package). Note that
some awedrv-native programs (like drvmidi and xmp) will change the
current settings by themselves. The aweset program is effective
only for other programs like playmidi.
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_MODULE_SUPPORT
indicates your Linux kernel supports module for each sound card
(in recent 2.1 or 2.2 kernels and unofficial patched 2.0 kernels
as distributed in the RH5.0 package).
This flag is automatically set when you're using 2.1.x kernels.
You can pass the base address and memory size via the following
module options,
io = base I/O port address (eg. 0x620)
memsize = DRAM size in kilobytes (eg. 512)
As default, AWE driver probes these values automatically.
[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.
0 means to autodetect the address.
- AWE_DEFAULT_MEM_SIZE (default: not defined)
specifies the memory size of your AWE32 card in kilobytes.
-1 means to autodetect its size.
[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 to appropriate size
if the sound card is 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.
- CONFIG_AWE32_MIDIEMU (default: defined)
Adds a MIDI emulation device by Emu8000 wavetable. The emulation
device can be accessed as an external MIDI, and sends the MIDI
control codes directly. XG and GS sysex/NRPN are accepted.
No MIDI input is supported.
- CONFIG_AWE32_MIXER (default: not defined)
Adds a mixer device for AWE32 bass/treble equalizer control.
You can access this device using /dev/mixer?? (usually mixer01).
- AWE_USE_NEW_VOLUME_CALC (default: defined)
Use the new method to calculate the volume change as compatible
with DOS/Win drivers. This option can be toggled via aweset
program, or drvmidi player.
- AWE_CHECK_VTARGET (default: defined)
Check the current volume target value when searching for an
empty channel to allocate a new voice. This is experimentally
implemented in this version. (probably, this option doesn't
affect the sound quality severely...)
- AWE_ALLOW_SAMPLE_SHARING (default: defined)
Allow sample sharing for differently loaded patches.
This function is available only together with awesfx-0.4.3p3.
Note that this is still an experimental option.
- 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 is done by Randall Hopper
(rhh@ct.picker.com).
The new volume calculation routine was derived from Mark Weaver's
ADIP compatible routines.
I also thank linux-awe-ml members for their efforts
to reboot their system many times :-)
* TODO'S
- Complete DOS/Win compatibility
- DSP-like output
* COPYRIGHT
Copyright (C) 1996-1998 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.
An OSS/Free Driver for WaveFront soundcards
(Turtle Beach Maui, Tropez, Tropez Plus)
Paul Barton-Davis, July 1998
VERSION 0.2.5
Driver Status
-------------
Requires: Kernel 2.1.106 or later (the driver is included with kernels
2.1.109 and above)
As of 7/22/1998, this driver is currently in *BETA* state. This means
that it compiles and runs, and that I use it on my system (Linux
2.1.106) with some reasonably demanding applications and uses. I
believe the code is approaching an initial "finished" state that
provides bug-free support for the Tropez Plus.
Please note that to date, the driver has ONLY been tested on a Tropez
Plus. I would very much like to hear (and help out) people with Tropez
and Maui cards, since I think the driver can support those cards as
well.
Finally, the driver has not been tested (or even compiled) as a static
(non-modular) part of the kernel. Alan Cox's good work in modularizing
OSS/Free for Linux makes this rather unnecessary.
Some Questions
--------------
**********************************************************************
0) What does this driver do that the maui driver did not ?
**********************************************************************
* can fully initialize a WaveFront card from cold boot - no DOS
utilities needed
* working patch/sample/program loading and unloading (the maui
driver didn't document how to make this work, and assumed
user-level preparation of the patch data for writing
to the board. ick.)
* full user-level access to all WaveFront commands
* for the Tropez Plus, (primitive) control of the YSS225 FX processor
* Virtual MIDI mode supported - 2 MIDI devices accessible via the
WaveFront's MPU401/UART emulation. One
accesses the WaveFront synth, the other accesses the
external MIDI connector. Full MIDI read/write semantics
for both devices.
* OSS-compliant /dev/sequencer interface for the WaveFront synth,
including native and GUS-format patch downloading.
* semi-intelligent patch management (prototypical at this point)
**********************************************************************
1) What to do about MIDI interfaces ?
**********************************************************************
The Tropez Plus (and perhaps other WF cards) can in theory support up
to 2 physical MIDI interfaces. One of these is connected to the
ICS2115 chip (the WaveFront synth itself) and is controlled by
MPU/UART-401 emulation code running as part of the WaveFront OS. The
other is controlled by the CS4232 chip present on the board. However,
physical access to the CS4232 connector is difficult, and it is
unlikely (though not impossible) that you will want to use it.
An older version of this driver introduced an additional kernel config
variable which controlled whether or not the CS4232 MIDI interface was
configured. Because of Alan Cox's work on modularizing the sound
drivers, and now backporting them to 2.0.34 kernels, there seems to be
little reason to support "static" configuration variables, and so this
has been abandoned in favor of *only* module parameters. Specifying
"mpuio" and "mpuirq" for the cs4232 parameter will result in the
CS4232 MIDI interface being configured; leaving them unspecified will
leave it unconfigured (and thus unusable).
BTW, I have heard from one Tropez+ user that the CS4232 interface is
more reliable than the ICS2115 one. I have had no problems with the
latter, and I don't have the right cable to test the former one
out. Reports welcome.
**********************************************************************
2) Why does line XXX of the code look like this .... ?
**********************************************************************
Either because it's not finished yet, or because you're a better coder
than I am, or because you don't understand some aspect of how the card
or the code works.
I absolutely welcome comments, criticisms and suggestions about the
design and implementation of the driver.
**********************************************************************
3) What files are included ?
**********************************************************************
drivers/sound/README.wavefront -- this file
drivers/sound/wavefront.patch -- patches for the 2.1.106 sound drivers
needed to make the rest of this work
DO NOT USE IF YOU'VE APPLIED THEM
BEFORE, OR HAVE 2.1.109 OR ABOVE
drivers/sound/wavfront.c -- the driver
drivers/sound/ys225.h -- data declarations for FX config
drivers/sound/ys225.c -- data definitions for FX config
drivers/sound/wf_midi.c -- the "uart401" driver
to support virtual MIDI mode.
include/wavefront.h -- the header file
Documentation/sound/oss/Tropez+ -- short docs on configuration
**********************************************************************
4) How do I compile/install/use it ?
**********************************************************************
PART ONE: install the source code into your sound driver directory
cd <top-of-your-2.1.106-code-base-e.g.-/usr/src/linux>
tar -zxvf <where-you-put/wavefront.tar.gz>
PART TWO: apply the patches
DO THIS ONLY IF YOU HAVE A KERNEL VERSION BELOW 2.1.109
AND HAVE NOT ALREADY INSTALLED THE PATCH(ES).
cd drivers/sound
patch < wavefront.patch
PART THREE: configure your kernel
cd <top of your kernel tree>
make xconfig (or whichever config option you use)
- choose YES for Sound Support
- choose MODULE (M) for OSS Sound Modules
- choose MODULE(M) to YM3812/OPL3 support
- choose MODULE(M) for WaveFront support
- choose MODULE(M) for CS4232 support
- choose "N" for everything else (unless you have other
soundcards you want support for)
make boot
.
.
.
<whatever you normally do for a kernel install>
make modules
.
.
.
make modules_install
Here's my autoconf.h SOUND section:
/*
* Sound
*/
#define CONFIG_SOUND 1
#undef CONFIG_SOUND_OSS
#define CONFIG_SOUND_OSS_MODULE 1
#undef CONFIG_SOUND_PAS
#undef CONFIG_SOUND_SB
#undef CONFIG_SOUND_ADLIB
#undef CONFIG_SOUND_GUS
#undef CONFIG_SOUND_MPU401
#undef CONFIG_SOUND_PSS
#undef CONFIG_SOUND_MSS
#undef CONFIG_SOUND_SSCAPE
#undef CONFIG_SOUND_TRIX
#undef CONFIG_SOUND_MAD16
#undef CONFIG_SOUND_WAVEFRONT
#define CONFIG_SOUND_WAVEFRONT_MODULE 1
#undef CONFIG_SOUND_CS4232
#define CONFIG_SOUND_CS4232_MODULE 1
#undef CONFIG_SOUND_MAUI
#undef CONFIG_SOUND_SGALAXY
#undef CONFIG_SOUND_OPL3SA1
#undef CONFIG_SOUND_SOFTOSS
#undef CONFIG_SOUND_YM3812
#define CONFIG_SOUND_YM3812_MODULE 1
#undef CONFIG_SOUND_VMIDI
#undef CONFIG_SOUND_UART6850
/*
* Additional low level sound drivers
*/
#undef CONFIG_LOWLEVEL_SOUND
************************************************************
6) How do I configure my card ?
************************************************************
You need to edit /etc/modprobe.conf. Here's mine (edited to show the
relevant details):
# Sound system
alias char-major-14-* wavefront
alias synth0 wavefront
alias mixer0 cs4232
alias audio0 cs4232
install wavefront /sbin/modprobe cs4232 && /sbin/modprobe -i wavefront && /sbin/modprobe opl3
options wavefront io=0x200 irq=9
options cs4232 synthirq=9 synthio=0x200 io=0x530 irq=5 dma=1 dma2=0
options opl3 io=0x388
Things to note:
the wavefront options "io" and "irq" ***MUST*** match the "synthio"
and "synthirq" cs4232 options.
you can do without the opl3 module if you don't
want to use the OPL/[34] FM synth on the soundcard
the opl3 io parameter is conventionally not adjustable.
In theory, any not-in-use IO port address would work, but
just use 0x388 and stick with the crowd.
**********************************************************************
7) What about firmware ?
**********************************************************************
Turtle Beach have not given me permission to distribute their firmware
for the ICS2115. However, if you have a WaveFront card, then you
almost certainly have the firmware, and if not, its freely available
on their website, at:
http://www.tbeach.com/tbs/downloads/scardsdown.htm#tropezplus
The file is called WFOS2001.MOT (for the Tropez+).
This driver, however, doesn't use the pure firmware as distributed,
but instead relies on a somewhat processed form of it. You can
generate this very easily. Following an idea from Andrew Veliath's
Pinnacle driver, the following flex program will generate the
processed version:
---- cut here -------------------------
%option main
%%
^S[28].*\r$ printf ("%c%.*s", yyleng-1,yyleng-1,yytext);
<<EOF>> { fputc ('\0', stdout); return; }
\n {}
. {}
---- cut here -------------------------
To use it, put the above in file (say, ws.l) compile it like this:
shell> flex -ows.c ws.l
shell> cc -o ws ws.c
and then use it like this:
ws < my-copy-of-the-oswf.mot-file > /etc/sound/wavefront.os
If you put it somewhere else, you'll always have to use the wf_ospath
module parameter (see below) or alter the source code.
**********************************************************************
7) How do I get it working ?
**********************************************************************
Optionally, you can reboot with the "new" kernel (even though the only
changes have really been made to a module).
Then, as root do:
modprobe wavefront
You should get something like this in /var/log/messages:
WaveFront: firmware 1.20 already loaded.
or
WaveFront: no response to firmware probe, assume raw.
then:
WaveFront: waiting for memory configuration ...
WaveFront: hardware version 1.64
WaveFront: available DRAM 8191k
WaveFront: 332 samples used (266 real, 13 aliases, 53 multi), 180 empty
WaveFront: 128 programs slots in use
WaveFront: 256 patch slots filled, 142 in use
The whole process takes about 16 seconds, the longest waits being
after reporting the hardware version (during the firmware download),
and after reporting program status (during patch status inquiry). Its
shorter (about 10 secs) if the firmware is already loaded (i.e. only
warm reboots since the last firmware load).
The "available DRAM" line will vary depending on how much added RAM
your card has. Mine has 8MB.
To check basically functionality, use play(1) or splay(1) to send a
.WAV or other audio file through the audio portion. Then use playmidi
to play a General MIDI file. Try the "-D 0" to hear the
difference between sending MIDI to the WaveFront and using the OPL/3,
which is the default (I think ...). If you have an external synth(s)
hooked to the soundcard, you can use "-e" to route to the
external synth(s) (in theory, -D 1 should work as well, but I think
there is a bug in playmidi which prevents this from doing what it
should).
**********************************************************************
8) What are the module parameters ?
**********************************************************************
Its best to read wavefront.c for this, but here is a summary:
integers:
wf_raw - if set, ignore apparent presence of firmware
loaded onto the ICS2115, reset the whole
board, and initialize it from scratch. (default = 0)
fx_raw - if set, always initialize the YSS225 processor
on the Tropez plus. (default = 1)
< The next 4 are basically for kernel hackers to allow
tweaking the driver for testing purposes. >
wait_usecs - loop timer used when waiting for
status conditions on the board.
The default is 150.
debug_default - debugging flags. See sound/wavefront.h
for WF_DEBUG_* values. Default is zero.
Setting this allows you to debug the
driver during module installation.
strings:
ospath - path to get to the pre-processed OS firmware.
(default: /etc/sound/wavefront.os)
**********************************************************************
9) Who should I contact if I have problems?
**********************************************************************
Just me: Paul Barton-Davis <pbd@op.net>
/proc/sound, /dev/sndstat
-------------------------
/proc/sound and /dev/sndstat is not supported by the
driver. To find out whether the driver succeeded loading,
check the kernel log (dmesg).
ALaw/uLaw sample formats
------------------------
This driver does not support the ALaw/uLaw sample formats.
ALaw is the default mode when opening a sound device
using OSS/Free. The reason for the lack of support is
that the hardware does not support these formats, and adding
conversion routines to the kernel would lead to very ugly
code in the presence of the mmap interface to the driver.
And since xquake uses mmap, mmap is considered important :-)
and no sane application uses ALaw/uLaw these days anyway.
In short, playing a Sun .au file as follows:
cat my_file.au > /dev/dsp
does not work. Instead, you may use the play script from
Chris Bagwell's sox-12.14 package (available from the URL
below) to play many different audio file formats.
The script automatically determines the audio format
and does do audio conversions if necessary.
http://home.sprynet.com/sprynet/cbagwell/projects.html
Blocking vs. nonblocking IO
---------------------------
Unlike OSS/Free this driver honours the O_NONBLOCK file flag
not only during open, but also during read and write.
This is an effort to make the sound driver interface more
regular. Timidity has problems with this; a patch
is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
(Timidity patched will also run on OSS/Free).
MIDI UART
---------
The driver supports a simple MIDI UART interface, with
no ioctl's supported.
MIDI synthesizer
----------------
This soundcard does not have any hardware MIDI synthesizer;
MIDI synthesis has to be done in software. To allow this
the driver/soundcard supports two PCM (/dev/dsp) interfaces.
The second one goes to the mixer "synth" setting and supports
only a limited set of sampling rates (44100, 22050, 11025, 5512).
By setting lineout to 1 on the driver command line
(eg. insmod es1370 lineout=1) it is even possible on some
cards to convert the LINEIN jack into a second LINEOUT jack, thus
making it possible to output four independent audio channels!
There is a freely available software package that allows
MIDI file playback on this soundcard called Timidity.
See http://www.cgs.fi/~tt/timidity/.
Thomas Sailer
t.sailer@alumni.ethz.ch
此差异已折叠。
Recording
---------
Recording does not work on the author's card, but there
is at least one report of it working on later silicon.
The chip behaves differently than described in the data sheet,
likely due to a chip bug. Working around this would require
the help of ESS (for example by publishing an errata sheet),
but ESS has not done so far.
Also, the chip only supports 24 bit addresses for recording,
which means it cannot work on some Alpha mainboards.
/proc/sound, /dev/sndstat
-------------------------
/proc/sound and /dev/sndstat is not supported by the
driver. To find out whether the driver succeeded loading,
check the kernel log (dmesg).
ALaw/uLaw sample formats
------------------------
This driver does not support the ALaw/uLaw sample formats.
ALaw is the default mode when opening a sound device
using OSS/Free. The reason for the lack of support is
that the hardware does not support these formats, and adding
conversion routines to the kernel would lead to very ugly
code in the presence of the mmap interface to the driver.
And since xquake uses mmap, mmap is considered important :-)
and no sane application uses ALaw/uLaw these days anyway.
In short, playing a Sun .au file as follows:
cat my_file.au > /dev/dsp
does not work. Instead, you may use the play script from
Chris Bagwell's sox-12.14 package (or later, available from the URL
below) to play many different audio file formats.
The script automatically determines the audio format
and does do audio conversions if necessary.
http://home.sprynet.com/sprynet/cbagwell/projects.html
Blocking vs. nonblocking IO
---------------------------
Unlike OSS/Free this driver honours the O_NONBLOCK file flag
not only during open, but also during read and write.
This is an effort to make the sound driver interface more
regular. Timidity has problems with this; a patch
is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
(Timidity patched will also run on OSS/Free).
MIDI UART
---------
The driver supports a simple MIDI UART interface, with
no ioctl's supported.
MIDI synthesizer
----------------
The card has an OPL compatible FM synthesizer.
Thomas Sailer
t.sailer@alumni.ethz.ch
/proc/sound, /dev/sndstat
-------------------------
/proc/sound and /dev/sndstat is not supported by the
driver. To find out whether the driver succeeded loading,
check the kernel log (dmesg).
ALaw/uLaw sample formats
------------------------
This driver does not support the ALaw/uLaw sample formats.
ALaw is the default mode when opening a sound device
using OSS/Free. The reason for the lack of support is
that the hardware does not support these formats, and adding
conversion routines to the kernel would lead to very ugly
code in the presence of the mmap interface to the driver.
And since xquake uses mmap, mmap is considered important :-)
and no sane application uses ALaw/uLaw these days anyway.
In short, playing a Sun .au file as follows:
cat my_file.au > /dev/dsp
does not work. Instead, you may use the play script from
Chris Bagwell's sox-12.14 package (available from the URL
below) to play many different audio file formats.
The script automatically determines the audio format
and does do audio conversions if necessary.
http://home.sprynet.com/sprynet/cbagwell/projects.html
Blocking vs. nonblocking IO
---------------------------
Unlike OSS/Free this driver honours the O_NONBLOCK file flag
not only during open, but also during read and write.
This is an effort to make the sound driver interface more
regular. Timidity has problems with this; a patch
is available from http://www.ife.ee.ethz.ch/~sailer/linux/pciaudio.html.
(Timidity patched will also run on OSS/Free).
MIDI UART
---------
The driver supports a simple MIDI UART interface, with
no ioctl's supported.
MIDI synthesizer
----------------
The card both has an OPL compatible FM synthesizer as well as
a wavetable synthesizer.
I haven't managed so far to get the OPL synth running.
Using the wavetable synthesizer requires allocating
1-4MB of physically contiguous memory, which isn't possible
currently on Linux without ugly hacks like the bigphysarea
patch. Therefore, the driver doesn't support wavetable
synthesis.
No support from S3
------------------
I do not get any support from S3. Therefore, the driver
still has many problems. For example, although the manual
states that the chip should be able to access the sample
buffer anywhere in 32bit address space, I haven't managed to
get it working with buffers above 16M. Therefore, the card
has the same disadvantages as ISA soundcards.
Given that the card is also very noisy, and if you haven't
already bought it, you should strongly opt for one of the
comparatively priced Ensoniq products.
Thomas Sailer
t.sailer@alumni.ethz.ch
......@@ -1900,11 +1900,6 @@ M: rroesler@syskonnect.de
W: http://www.syskonnect.com
S: Supported
MAESTRO PCI SOUND DRIVERS
P: Zach Brown
M: zab@zabbo.net
S: Odd Fixes
MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
P: Michael Kerrisk
M: mtk-manpages@gmx.net
......@@ -3402,12 +3397,6 @@ M: Henk.Vergonet@gmail.com
L: usbb2k-api-dev@nongnu.org
S: Maintained
YMFPCI YAMAHA PCI SOUND (Use ALSA instead)
P: Pete Zaitcev
M: zaitcev@yahoo.com
L: linux-kernel@vger.kernel.org
S: Obsolete
Z8530 DRIVER FOR AX.25
P: Joerg Reuter
M: jreuter@yaina.de
......
......@@ -160,7 +160,6 @@ header-y += video_decoder.h
header-y += video_encoder.h
header-y += videotext.h
header-y += vt.h
header-y += wavefront.h
header-y += wireless.h
header-y += xattr.h
header-y += x25.h
......
......@@ -331,8 +331,6 @@ extern int ac97_read_proc (char *page_out, char **start, off_t off,
extern int ac97_probe_codec(struct ac97_codec *);
extern unsigned int ac97_set_adc_rate(struct ac97_codec *codec, unsigned int rate);
extern unsigned int ac97_set_dac_rate(struct ac97_codec *codec, unsigned int rate);
extern int ac97_save_state(struct ac97_codec *codec);
extern int ac97_restore_state(struct ac97_codec *codec);
extern struct ac97_codec *ac97_alloc_codec(void);
extern void ac97_release_codec(struct ac97_codec *codec);
......@@ -346,9 +344,6 @@ struct ac97_driver {
void (*remove) (struct ac97_codec *codec, struct ac97_driver *driver);
};
extern int ac97_register_driver(struct ac97_driver *driver);
extern void ac97_unregister_driver(struct ac97_driver *driver);
/* quirk types */
enum {
AC97_TUNE_DEFAULT = -1, /* use default from quirk list (not valid in list) */
......
......@@ -35,10 +35,8 @@ extern int register_sound_special_device(const struct file_operations *fops, int
extern int register_sound_mixer(const struct file_operations *fops, int dev);
extern int register_sound_midi(const struct file_operations *fops, int dev);
extern int register_sound_dsp(const struct file_operations *fops, int dev);
extern int register_sound_synth(const struct file_operations *fops, int dev);
extern void unregister_sound_special(int unit);
extern void unregister_sound_mixer(int unit);
extern void unregister_sound_midi(int unit);
extern void unregister_sound_dsp(int unit);
extern void unregister_sound_synth(int unit);
#ifndef __wavefront_h__
#define __wavefront_h__
/* WaveFront header file.
*
* Copyright (C) by Paul Barton-Davis 1998
*
* This program is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
*/
#if (!defined(__GNUC__) && !defined(__GNUG__))
You will not be able to compile this file correctly without gcc, because
it is necessary to pack the "wavefront_alias" structure to a size
of 22 bytes, corresponding to 16-bit alignment (as would have been
the case on the original platform, MS-DOS). If this is not done,
then WavePatch-format files cannot be read/written correctly.
The method used to do this here ("__attribute__((packed)") is
completely compiler dependent.
All other wavefront_* types end up aligned to 32 bit values and
still have the same (correct) size.
#else
/* However, note that as of G++ 2.7.3.2, g++ was unable to
correctly parse *type* __attribute__ tags. It will do the
right thing if we use the "packed" attribute on each struct
member, which has the same semantics anyway.
*/
#endif /* __GNUC__ */
/***************************** WARNING ********************************
PLEASE DO NOT MODIFY THIS FILE IN ANY WAY THAT AFFECTS ITS ABILITY TO
BE USED WITH EITHER C *OR* C++.
**********************************************************************/
#ifndef NUM_MIDIKEYS
#define NUM_MIDIKEYS 128
#endif /* NUM_MIDIKEYS */
#ifndef NUM_MIDICHANNELS
#define NUM_MIDICHANNELS 16
#endif /* NUM_MIDICHANNELS */
/* These are very useful/important. the original wavefront interface
was developed on a 16 bit system, where sizeof(int) = 2
bytes. Defining things like this makes the code much more portable, and
easier to understand without having to toggle back and forth
between a 16-bit view of the world and a 32-bit one.
*/
typedef short INT16;
typedef unsigned short UINT16;
typedef int INT32;
typedef unsigned int UINT32;
typedef char CHAR8;
typedef unsigned char UCHAR8;
/* Pseudo-commands not part of the WaveFront command set.
These are used for various driver controls and direct
hardware control.
*/
#define WFC_DEBUG_DRIVER 0
#define WFC_FX_IOCTL 1
#define WFC_PATCH_STATUS 2
#define WFC_PROGRAM_STATUS 3
#define WFC_SAMPLE_STATUS 4
#define WFC_DISABLE_INTERRUPTS 5
#define WFC_ENABLE_INTERRUPTS 6
#define WFC_INTERRUPT_STATUS 7
#define WFC_ROMSAMPLES_RDONLY 8
#define WFC_IDENTIFY_SLOT_TYPE 9
/* Wavefront synth commands
*/
#define WFC_DOWNLOAD_SAMPLE 0x80
#define WFC_DOWNLOAD_BLOCK 0x81
#define WFC_DOWNLOAD_MULTISAMPLE 0x82
#define WFC_DOWNLOAD_SAMPLE_ALIAS 0x83
#define WFC_DELETE_SAMPLE 0x84
#define WFC_REPORT_FREE_MEMORY 0x85
#define WFC_DOWNLOAD_PATCH 0x86
#define WFC_DOWNLOAD_PROGRAM 0x87
#define WFC_SET_SYNTHVOL 0x89
#define WFC_SET_NVOICES 0x8B
#define WFC_DOWNLOAD_DRUM 0x90
#define WFC_GET_SYNTHVOL 0x92
#define WFC_GET_NVOICES 0x94
#define WFC_DISABLE_CHANNEL 0x9A
#define WFC_ENABLE_CHANNEL 0x9B
#define WFC_MISYNTH_OFF 0x9D
#define WFC_MISYNTH_ON 0x9E
#define WFC_FIRMWARE_VERSION 0x9F
#define WFC_GET_NSAMPLES 0xA0
#define WFC_DISABLE_DRUM_PROGRAM 0xA2
#define WFC_UPLOAD_PATCH 0xA3
#define WFC_UPLOAD_PROGRAM 0xA4
#define WFC_SET_TUNING 0xA6
#define WFC_GET_TUNING 0xA7
#define WFC_VMIDI_ON 0xA8
#define WFC_VMIDI_OFF 0xA9
#define WFC_MIDI_STATUS 0xAA
#define WFC_GET_CHANNEL_STATUS 0xAB
#define WFC_DOWNLOAD_SAMPLE_HEADER 0xAC
#define WFC_UPLOAD_SAMPLE_HEADER 0xAD
#define WFC_UPLOAD_MULTISAMPLE 0xAE
#define WFC_UPLOAD_SAMPLE_ALIAS 0xAF
#define WFC_IDENTIFY_SAMPLE_TYPE 0xB0
#define WFC_DOWNLOAD_EDRUM_PROGRAM 0xB1
#define WFC_UPLOAD_EDRUM_PROGRAM 0xB2
#define WFC_SET_EDRUM_CHANNEL 0xB3
#define WFC_INSTOUT_LEVELS 0xB4
#define WFC_PEAKOUT_LEVELS 0xB5
#define WFC_REPORT_CHANNEL_PROGRAMS 0xB6
#define WFC_HARDWARE_VERSION 0xCF
#define WFC_UPLOAD_SAMPLE_PARAMS 0xD7
#define WFC_DOWNLOAD_OS 0xF1
#define WFC_NOOP 0xFF
#define WF_MAX_SAMPLE 512
#define WF_MAX_PATCH 256
#define WF_MAX_PROGRAM 128
#define WF_SECTION_MAX 44 /* longest OS section length */
/* # of bytes we send to the board when sending it various kinds of
substantive data, such as samples, patches and programs.
*/
#define WF_PROGRAM_BYTES 32
#define WF_PATCH_BYTES 132
#define WF_SAMPLE_BYTES 27
#define WF_SAMPLE_HDR_BYTES 25
#define WF_ALIAS_BYTES 25
#define WF_DRUM_BYTES 9
#define WF_MSAMPLE_BYTES 259 /* (MIDI_KEYS * 2) + 3 */
#define WF_ACK 0x80
#define WF_DMA_ACK 0x81
/* OR-values for MIDI status bits */
#define WF_MIDI_VIRTUAL_ENABLED 0x1
#define WF_MIDI_VIRTUAL_IS_EXTERNAL 0x2
#define WF_MIDI_IN_TO_SYNTH_DISABLED 0x4
/* slot indexes for struct address_info: makes code a little more mnemonic */
#define WF_SYNTH_SLOT 0
#define WF_INTERNAL_MIDI_SLOT 1
#define WF_EXTERNAL_MIDI_SLOT 2
/* Magic MIDI bytes used to switch I/O streams on the ICS2115 MPU401
emulation. Note these NEVER show up in output from the device and
should NEVER be used in input unless Virtual MIDI mode has been
disabled. If they do show up as input, the results are unpredictable.
*/
#define WF_EXTERNAL_SWITCH 0xFD
#define WF_INTERNAL_SWITCH 0xF9
/* Debugging flags */
#define WF_DEBUG_CMD 0x1
#define WF_DEBUG_DATA 0x2
#define WF_DEBUG_LOAD_PATCH 0x4
#define WF_DEBUG_IO 0x8
/* WavePatch file format stuff */
#define WF_WAVEPATCH_VERSION 120; /* Current version number (1.2) */
#define WF_MAX_COMMENT 64 /* Comment length */
#define WF_NUM_LAYERS 4
#define WF_NAME_LENGTH 32
#define WF_SOURCE_LENGTH 260
#define BankFileID "Bank"
#define DrumkitFileID "DrumKit"
#define ProgramFileID "Program"
struct wf_envelope
{
UCHAR8 attack_time:7;
UCHAR8 Unused1:1;
UCHAR8 decay1_time:7;
UCHAR8 Unused2:1;
UCHAR8 decay2_time:7;
UCHAR8 Unused3:1;
UCHAR8 sustain_time:7;
UCHAR8 Unused4:1;
UCHAR8 release_time:7;
UCHAR8 Unused5:1;
UCHAR8 release2_time:7;
UCHAR8 Unused6:1;
CHAR8 attack_level;
CHAR8 decay1_level;
CHAR8 decay2_level;
CHAR8 sustain_level;
CHAR8 release_level;
UCHAR8 attack_velocity:7;
UCHAR8 Unused7:1;
UCHAR8 volume_velocity:7;
UCHAR8 Unused8:1;
UCHAR8 keyboard_scaling:7;
UCHAR8 Unused9:1;
};
typedef struct wf_envelope wavefront_envelope;
struct wf_lfo
{
UCHAR8 sample_number;
UCHAR8 frequency:7;
UCHAR8 Unused1:1;
UCHAR8 am_src:4;
UCHAR8 fm_src:4;
CHAR8 fm_amount;
CHAR8 am_amount;
CHAR8 start_level;
CHAR8 end_level;
UCHAR8 ramp_delay:7;
UCHAR8 wave_restart:1; /* for LFO2 only */
UCHAR8 ramp_time:7;
UCHAR8 Unused2:1;
};
typedef struct wf_lfo wavefront_lfo;
struct wf_patch
{
INT16 frequency_bias; /* ** THIS IS IN MOTOROLA FORMAT!! ** */
UCHAR8 amplitude_bias:7;
UCHAR8 Unused1:1;
UCHAR8 portamento:7;
UCHAR8 Unused2:1;
UCHAR8 sample_number;
UCHAR8 pitch_bend:4;
UCHAR8 sample_msb:1;
UCHAR8 Unused3:3;
UCHAR8 mono:1;
UCHAR8 retrigger:1;
UCHAR8 nohold:1;
UCHAR8 restart:1;
UCHAR8 filterconfig:2; /* SDK says "not used" */
UCHAR8 reuse:1;
UCHAR8 reset_lfo:1;
UCHAR8 fm_src2:4;
UCHAR8 fm_src1:4;
CHAR8 fm_amount1;
CHAR8 fm_amount2;
UCHAR8 am_src:4;
UCHAR8 Unused4:4;
CHAR8 am_amount;
UCHAR8 fc1_mode:4;
UCHAR8 fc2_mode:4;
CHAR8 fc1_mod_amount;
CHAR8 fc1_keyboard_scaling;
CHAR8 fc1_bias;
CHAR8 fc2_mod_amount;
CHAR8 fc2_keyboard_scaling;
CHAR8 fc2_bias;
UCHAR8 randomizer:7;
UCHAR8 Unused5:1;
struct wf_envelope envelope1;
struct wf_envelope envelope2;
struct wf_lfo lfo1;
struct wf_lfo lfo2;
};
typedef struct wf_patch wavefront_patch;
struct wf_layer
{
UCHAR8 patch_number;
UCHAR8 mix_level:7;
UCHAR8 mute:1;
UCHAR8 split_point:7;
UCHAR8 play_below:1;
UCHAR8 pan_mod_src:2;
UCHAR8 pan_or_mod:1;
UCHAR8 pan:4;
UCHAR8 split_type:1;
};
typedef struct wf_layer wavefront_layer;
struct wf_program
{
struct wf_layer layer[WF_NUM_LAYERS];
};
typedef struct wf_program wavefront_program;
struct wf_sample_offset
{
INT32 Fraction:4;
INT32 Integer:20;
INT32 Unused:8;
};
typedef struct wf_sample_offset wavefront_sample_offset;
/* Sample slot types */
#define WF_ST_SAMPLE 0
#define WF_ST_MULTISAMPLE 1
#define WF_ST_ALIAS 2
#define WF_ST_EMPTY 3
/* pseudo's */
#define WF_ST_DRUM 4
#define WF_ST_PROGRAM 5
#define WF_ST_PATCH 6
#define WF_ST_SAMPLEHDR 7
#define WF_ST_MASK 0xf
/* Flags for slot status. These occupy the upper bits of the same byte
as a sample type.
*/
#define WF_SLOT_USED 0x80 /* XXX don't rely on this being accurate */
#define WF_SLOT_FILLED 0x40
#define WF_SLOT_ROM 0x20
#define WF_SLOT_MASK 0xf0
/* channel constants */
#define WF_CH_MONO 0
#define WF_CH_LEFT 1
#define WF_CH_RIGHT 2
/* Sample formats */
#define LINEAR_16BIT 0
#define WHITE_NOISE 1
#define LINEAR_8BIT 2
#define MULAW_8BIT 3
#define WF_SAMPLE_IS_8BIT(smpl) ((smpl)->SampleResolution&2)
/*
Because most/all of the sample data we pass in via pointers has
never been copied (just mmap-ed into user space straight from the
disk), it would be nice to allow handling of multi-channel sample
data without forcing user-level extraction of the relevant bytes.
So, we need a way of specifying which channel to use (the WaveFront
only handles mono samples in a given slot), and the only way to do
this without using some struct other than wavefront_sample as the
interface is the awful hack of using the unused bits in a
wavefront_sample:
Val Meaning
--- -------
0 no channel selection (use channel 1, sample is MONO)
1 use first channel, and skip one
2 use second channel, and skip one
3 use third channel, and skip two
4 use fourth channel, skip three
5 use fifth channel, skip four
6 use six channel, skip five
This can handle up to 4 channels, and anyone downloading >4 channels
of sample data just to select one of them needs to find some tools
like sox ...
NOTE: values 0, 1 and 2 correspond to WF_CH_* above. This is
important.
*/
#define WF_SET_CHANNEL(samp,chn) \
(samp)->Unused1 = chn & 0x1; \
(samp)->Unused2 = chn & 0x2; \
(samp)->Unused3 = chn & 0x4
#define WF_GET_CHANNEL(samp) \
(((samp)->Unused3 << 2)|((samp)->Unused2<<1)|(samp)->Unused1)
typedef struct wf_sample {
struct wf_sample_offset sampleStartOffset;
struct wf_sample_offset loopStartOffset;
struct wf_sample_offset loopEndOffset;
struct wf_sample_offset sampleEndOffset;
INT16 FrequencyBias;
UCHAR8 SampleResolution:2; /* sample_format */
UCHAR8 Unused1:1;
UCHAR8 Loop:1;
UCHAR8 Bidirectional:1;
UCHAR8 Unused2:1;
UCHAR8 Reverse:1;
UCHAR8 Unused3:1;
} wavefront_sample;
typedef struct wf_multisample {
INT16 NumberOfSamples; /* log2 of the number of samples */
INT16 SampleNumber[NUM_MIDIKEYS];
} wavefront_multisample;
typedef struct wf_alias {
INT16 OriginalSample;
struct wf_sample_offset sampleStartOffset;
struct wf_sample_offset loopStartOffset;
struct wf_sample_offset sampleEndOffset;
struct wf_sample_offset loopEndOffset;
INT16 FrequencyBias;
UCHAR8 SampleResolution:2;
UCHAR8 Unused1:1;
UCHAR8 Loop:1;
UCHAR8 Bidirectional:1;
UCHAR8 Unused2:1;
UCHAR8 Reverse:1;
UCHAR8 Unused3:1;
/* This structure is meant to be padded only to 16 bits on their
original. Of course, whoever wrote their documentation didn't
realize that sizeof(struct) can be >=
sum(sizeof(struct-fields)) and so thought that giving a C level
description of the structs used in WavePatch files was
sufficient. I suppose it was, as long as you remember the
standard 16->32 bit issues.
*/
UCHAR8 sixteen_bit_padding;
} __attribute__((packed)) wavefront_alias;
typedef struct wf_drum {
UCHAR8 PatchNumber;
UCHAR8 MixLevel:7;
UCHAR8 Unmute:1;
UCHAR8 Group:4;
UCHAR8 Unused1:4;
UCHAR8 PanModSource:2;
UCHAR8 PanModulated:1;
UCHAR8 PanAmount:4;
UCHAR8 Unused2:1;
} wavefront_drum;
typedef struct wf_drumkit {
struct wf_drum drum[NUM_MIDIKEYS];
} wavefront_drumkit;
typedef struct wf_channel_programs {
UCHAR8 Program[NUM_MIDICHANNELS];
} wavefront_channel_programs;
/* How to get MIDI channel status from the data returned by
a WFC_GET_CHANNEL_STATUS command (a struct wf_channel_programs)
*/
#define WF_CHANNEL_STATUS(ch,wcp) (wcp)[(ch/7)] & (1<<((ch)%7))
typedef union wf_any {
wavefront_sample s;
wavefront_multisample ms;
wavefront_alias a;
wavefront_program pr;
wavefront_patch p;
wavefront_drum d;
} wavefront_any;
/* Hannu Solvainen hoped that his "patch_info" struct in soundcard.h
might work for other wave-table based patch loading situations.
Alas, his fears were correct. The WaveFront doesn't even come with
just "patches", but several different kind of structures that
control the sound generation process.
*/
typedef struct wf_patch_info {
/* the first two fields are used by the OSS "patch loading" interface
only, and are unused by the current user-level library.
*/
INT16 key; /* Use WAVEFRONT_PATCH here */
UINT16 devno; /* fill in when sending */
UCHAR8 subkey; /* WF_ST_{SAMPLE,ALIAS,etc.} */
#define WAVEFRONT_FIND_FREE_SAMPLE_SLOT 999
UINT16 number; /* patch/sample/prog number */
UINT32 size; /* size of any data included in
one of the fields in `hdrptr', or
as `dataptr'.
NOTE: for actual samples, this is
the size of the *SELECTED CHANNEL*
even if more data is actually available.
So, a stereo sample (2 channels) of
6000 bytes total has `size' = 3000.
See the macros and comments for
WF_{GET,SET}_CHANNEL above.
*/
wavefront_any __user *hdrptr; /* user-space ptr to hdr bytes */
UINT16 __user *dataptr; /* actual sample data */
wavefront_any hdr; /* kernel-space copy of hdr bytes */
} wavefront_patch_info;
/* The maximum number of bytes we will ever move to or from user space
in response to a WFC_* command. This obviously doesn't cover
actual sample data.
*/
#define WF_MAX_READ sizeof(wavefront_multisample)
#define WF_MAX_WRITE sizeof(wavefront_multisample)
/*
This allows us to execute any WF command except the download/upload
ones, which are handled differently due to copyin/copyout issues as
well as data-nybbling to/from the card.
*/
typedef struct wavefront_control {
int cmd; /* WFC_* */
char status; /* return status to user-space */
unsigned char rbuf[WF_MAX_READ]; /* bytes read from card */
unsigned char wbuf[WF_MAX_WRITE]; /* bytes written to card */
} wavefront_control;
#define WFCTL_WFCMD 0x1
#define WFCTL_LOAD_SPP 0x2
/* Modulator table */
#define WF_MOD_LFO1 0
#define WF_MOD_LFO2 1
#define WF_MOD_ENV1 2
#define WF_MOD_ENV2 3
#define WF_MOD_KEYBOARD 4
#define WF_MOD_LOGKEY 5
#define WF_MOD_VELOCITY 6
#define WF_MOD_LOGVEL 7
#define WF_MOD_RANDOM 8
#define WF_MOD_PRESSURE 9
#define WF_MOD_MOD_WHEEL 10
#define WF_MOD_1 WF_MOD_MOD_WHEEL
#define WF_MOD_BREATH 11
#define WF_MOD_2 WF_MOD_BREATH
#define WF_MOD_FOOT 12
#define WF_MOD_4 WF_MOD_FOOT
#define WF_MOD_VOLUME 13
#define WF_MOD_7 WF_MOD_VOLUME
#define WF_MOD_PAN 14
#define WF_MOD_10 WF_MOD_PAN
#define WF_MOD_EXPR 15
#define WF_MOD_11 WF_MOD_EXPR
/* FX-related material */
typedef struct wf_fx_info {
int request; /* see list below */
int data[4]; /* we don't need much */
} wavefront_fx_info;
/* support for each of these will be forthcoming once I or someone
else has figured out which of the addresses on page 6 and page 7 of
the YSS225 control each parameter. Incidentally, these come from
the Windows driver interface, but again, Turtle Beach didn't
document the API to use them.
*/
#define WFFX_SETOUTGAIN 0
#define WFFX_SETSTEREOOUTGAIN 1
#define WFFX_SETREVERBIN1GAIN 2
#define WFFX_SETREVERBIN2GAIN 3
#define WFFX_SETREVERBIN3GAIN 4
#define WFFX_SETCHORUSINPORT 5
#define WFFX_SETREVERBIN1PORT 6
#define WFFX_SETREVERBIN2PORT 7
#define WFFX_SETREVERBIN3PORT 8
#define WFFX_SETEFFECTPORT 9
#define WFFX_SETAUXPORT 10
#define WFFX_SETREVERBTYPE 11
#define WFFX_SETREVERBDELAY 12
#define WFFX_SETCHORUSLFO 13
#define WFFX_SETCHORUSPMD 14
#define WFFX_SETCHORUSAMD 15
#define WFFX_SETEFFECT 16
#define WFFX_SETBASEALL 17
#define WFFX_SETREVERBALL 18
#define WFFX_SETCHORUSALL 20
#define WFFX_SETREVERBDEF 22
#define WFFX_SETCHORUSDEF 23
#define WFFX_DELAYSETINGAIN 24
#define WFFX_DELAYSETFBGAIN 25
#define WFFX_DELAYSETFBLPF 26
#define WFFX_DELAYSETGAIN 27
#define WFFX_DELAYSETTIME 28
#define WFFX_DELAYSETFBTIME 29
#define WFFX_DELAYSETALL 30
#define WFFX_DELAYSETDEF 32
#define WFFX_SDELAYSETINGAIN 33
#define WFFX_SDELAYSETFBGAIN 34
#define WFFX_SDELAYSETFBLPF 35
#define WFFX_SDELAYSETGAIN 36
#define WFFX_SDELAYSETTIME 37
#define WFFX_SDELAYSETFBTIME 38
#define WFFX_SDELAYSETALL 39
#define WFFX_SDELAYSETDEF 41
#define WFFX_DEQSETINGAIN 42
#define WFFX_DEQSETFILTER 43
#define WFFX_DEQSETALL 44
#define WFFX_DEQSETDEF 46
#define WFFX_MUTE 47
#define WFFX_FLANGESETBALANCE 48
#define WFFX_FLANGESETDELAY 49
#define WFFX_FLANGESETDWFFX_TH 50
#define WFFX_FLANGESETFBGAIN 51
#define WFFX_FLANGESETINGAIN 52
#define WFFX_FLANGESETLFO 53
#define WFFX_FLANGESETALL 54
#define WFFX_FLANGESETDEF 56
#define WFFX_PITCHSETSHIFT 57
#define WFFX_PITCHSETBALANCE 58
#define WFFX_PITCHSETALL 59
#define WFFX_PITCHSETDEF 61
#define WFFX_SRSSETINGAIN 62
#define WFFX_SRSSETSPACE 63
#define WFFX_SRSSETCENTER 64
#define WFFX_SRSSETGAIN 65
#define WFFX_SRSSETMODE 66
#define WFFX_SRSSETDEF 68
/* Allow direct user-space control over FX memory/coefficient data.
In theory this could be used to download the FX microprogram,
but it would be a little slower, and involve some weird code.
*/
#define WFFX_MEMSET 69
#endif /* __wavefront_h__ */
......@@ -15,71 +15,42 @@ obj-$(CONFIG_SOUND_HAL2) += hal2.o
obj-$(CONFIG_SOUND_AEDSP16) += aedsp16.o
obj-$(CONFIG_SOUND_PSS) += pss.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_TRIX) += trix.o ad1848.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_OPL3SA1) += opl3sa.o ad1848.o uart401.o
obj-$(CONFIG_SOUND_SSCAPE) += sscape.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_MAD16) += mad16.o ad1848.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_CS4232) += cs4232.o uart401.o
obj-$(CONFIG_SOUND_MSS) += ad1848.o
obj-$(CONFIG_SOUND_OPL3SA2) += opl3sa2.o ad1848.o mpu401.o
obj-$(CONFIG_SOUND_PAS) += pas2.o sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_SB) += sb.o sb_lib.o uart401.o
obj-$(CONFIG_SOUND_KAHLUA) += kahlua.o
obj-$(CONFIG_SOUND_WAVEFRONT) += wavefront.o
obj-$(CONFIG_SOUND_MAUI) += maui.o mpu401.o
obj-$(CONFIG_SOUND_MPU401) += mpu401.o
obj-$(CONFIG_SOUND_UART6850) += uart6850.o
obj-$(CONFIG_SOUND_GUS) += gus.o ad1848.o
obj-$(CONFIG_SOUND_ADLIB) += adlib_card.o opl3.o
obj-$(CONFIG_SOUND_YM3812) += opl3.o
obj-$(CONFIG_SOUND_VMIDI) += v_midi.o
obj-$(CONFIG_SOUND_VIDC) += vidc_mod.o
obj-$(CONFIG_SOUND_WAVEARTIST) += waveartist.o
obj-$(CONFIG_SOUND_SGALAXY) += sgalaxy.o ad1848.o
obj-$(CONFIG_SOUND_AD1816) += ad1816.o
obj-$(CONFIG_SOUND_AD1889) += ad1889.o ac97_codec.o
obj-$(CONFIG_SOUND_ACI_MIXER) += aci.o
obj-$(CONFIG_SOUND_AWE32_SYNTH) += awe_wave.o
obj-$(CONFIG_SOUND_VIA82CXXX) += via82cxxx_audio.o ac97_codec.o
ifeq ($(CONFIG_MIDI_VIA82CXXX),y)
obj-$(CONFIG_SOUND_VIA82CXXX) += sound.o uart401.o
endif
obj-$(CONFIG_SOUND_YMFPCI) += ymfpci.o ac97_codec.o
ifeq ($(CONFIG_SOUND_YMFPCI_LEGACY),y)
obj-$(CONFIG_SOUND_YMFPCI) += opl3.o uart401.o
endif
obj-$(CONFIG_SOUND_MSNDCLAS) += msnd.o msnd_classic.o
obj-$(CONFIG_SOUND_MSNDPIN) += msnd.o msnd_pinnacle.o
obj-$(CONFIG_SOUND_VWSND) += vwsnd.o
obj-$(CONFIG_SOUND_NM256) += nm256_audio.o ac97.o
obj-$(CONFIG_SOUND_ICH) += i810_audio.o ac97_codec.o
obj-$(CONFIG_SOUND_SONICVIBES) += sonicvibes.o
obj-$(CONFIG_SOUND_CMPCI) += cmpci.o
ifeq ($(CONFIG_SOUND_CMPCI_FM),y)
obj-$(CONFIG_SOUND_CMPCI) += sound.o opl3.o
endif
ifeq ($(CONFIG_SOUND_CMPCI_MIDI),y)
obj-$(CONFIG_SOUND_CMPCI) += sound.o mpu401.o
endif
obj-$(CONFIG_SOUND_ES1370) += es1370.o
obj-$(CONFIG_SOUND_ES1371) += es1371.o ac97_codec.o
obj-$(CONFIG_SOUND_VRC5477) += nec_vrc5477.o ac97_codec.o
obj-$(CONFIG_SOUND_AU1000) += au1000.o ac97_codec.o
obj-$(CONFIG_SOUND_AU1550_AC97) += au1550_ac97.o ac97_codec.o
obj-$(CONFIG_SOUND_ESSSOLO1) += esssolo1.o
obj-$(CONFIG_SOUND_FUSION) += cs46xx.o ac97_codec.o
obj-$(CONFIG_SOUND_MAESTRO) += maestro.o
obj-$(CONFIG_SOUND_MAESTRO3) += maestro3.o ac97_codec.o
obj-$(CONFIG_SOUND_TRIDENT) += trident.o ac97_codec.o
obj-$(CONFIG_SOUND_HARMONY) += harmony.o
obj-$(CONFIG_SOUND_EMU10K1) += ac97_codec.o
obj-$(CONFIG_SOUND_BCM_CS4297A) += swarm_cs4297a.o
obj-$(CONFIG_SOUND_RME96XX) += rme96xx.o
obj-$(CONFIG_SOUND_BT878) += btaudio.o
obj-$(CONFIG_SOUND_ALI5455) += ali5455.o ac97_codec.o
obj-$(CONFIG_SOUND_FORTE) += forte.o ac97_codec.o
obj-$(CONFIG_SOUND_AD1980) += ac97_plugin_ad1980.o ac97_codec.o
obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o
ifeq ($(CONFIG_MIDI_EMU10K1),y)
......@@ -87,7 +58,6 @@ ifeq ($(CONFIG_MIDI_EMU10K1),y)
endif
obj-$(CONFIG_SOUND_EMU10K1) += emu10k1/
obj-$(CONFIG_SOUND_CS4281) += cs4281/
obj-$(CONFIG_DMASOUND) += dmasound/
# Declare multi-part drivers.
......@@ -98,17 +68,15 @@ sound-objs := \
midi_syms.o midi_synth.o midibuf.o \
sequencer.o sequencer_syms.o sound_timer.o sys_timer.o
gus-objs := gus_card.o gus_midi.o gus_vol.o gus_wave.o ics2101.o
pas2-objs := pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
sb-objs := sb_card.o
sb_lib-objs := sb_common.o sb_audio.o sb_midi.o sb_mixer.o sb_ess.o
vidc_mod-objs := vidc.o vidc_fill.o
wavefront-objs := wavfront.o wf_midi.o yss225.o
hostprogs-y := bin2hex hex2hex
# Files generated that shall be removed upon make clean
clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
clean-files := msndperm.c msndinit.c pndsperm.c pndspini.c \
pss_boot.h trix_boot.h
# Firmware files that need translation
......@@ -118,21 +86,6 @@ clean-files := maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c \
# will be forced to be remade.
#
# Turtle Beach Maui / Tropez
$(obj)/maui.o: $(obj)/maui_boot.h
ifeq ($(CONFIG_MAUI_HAVE_BOOT),y)
$(obj)/maui_boot.h: $(patsubst "%", %, $(CONFIG_MAUI_BOOT_FILE)) $(obj)/bin2hex
$(obj)/bin2hex -i maui_os < $< > $@
else
$(obj)/maui_boot.h:
( \
echo 'static unsigned char * maui_os = NULL;'; \
echo 'static int maui_osLen = 0;'; \
) > $@
endif
# Turtle Beach MultiSound
ifeq ($(CONFIG_MSNDCLAS_HAVE_BOOT),y)
......
......@@ -112,25 +112,6 @@ ac97_init (struct ac97_hwint *dev)
return 0;
}
/* Reset the mixer to the currently saved settings. */
int
ac97_reset (struct ac97_hwint *dev)
{
int x;
if (dev->reset_device (dev))
return -1;
/* Now set the registers back to their last-written values. */
for (x = 0; mixerRegs[x].ac97_regnum != -1; x++) {
int regnum = mixerRegs[x].ac97_regnum;
int value = dev->last_written_mixer_values [regnum / 2];
if (value >= 0)
ac97_put_register (dev, regnum, value);
}
return 0;
}
/* Return the contents of register REG; use the cache if the value in it
is valid. Returns a negative error code on failure. */
static int
......@@ -441,7 +422,6 @@ EXPORT_SYMBOL(ac97_init);
EXPORT_SYMBOL(ac97_set_values);
EXPORT_SYMBOL(ac97_put_register);
EXPORT_SYMBOL(ac97_mixer_ioctl);
EXPORT_SYMBOL(ac97_reset);
MODULE_LICENSE("GPL");
......
......@@ -192,9 +192,6 @@ extern int ac97_put_register (struct ac97_hwint *dev, u8 reg, u16 value);
extern int ac97_mixer_ioctl (struct ac97_hwint *dev, unsigned int cmd,
void __user * arg);
/* Do a complete reset on the AC97 mixer, restoring all mixer registers to
the current values. Normally used after an APM resume event. */
extern int ac97_reset (struct ac97_hwint *dev);
#endif
/*
......
......@@ -1399,95 +1399,6 @@ unsigned int ac97_set_adc_rate(struct ac97_codec *codec, unsigned int rate)
EXPORT_SYMBOL(ac97_set_adc_rate);
int ac97_save_state(struct ac97_codec *codec)
{
return 0;
}
EXPORT_SYMBOL(ac97_save_state);
int ac97_restore_state(struct ac97_codec *codec)
{
int i;
unsigned int left, right, val;
for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) {
if (!supported_mixer(codec, i))
continue;
val = codec->mixer_state[i];
right = val >> 8;
left = val & 0xff;
codec->write_mixer(codec, i, left, right);
}
return 0;
}
EXPORT_SYMBOL(ac97_restore_state);
/**
* ac97_register_driver - register a codec helper
* @driver: Driver handler
*
* Register a handler for codecs matching the codec id. The handler
* attach function is called for all present codecs and will be
* called when new codecs are discovered.
*/
int ac97_register_driver(struct ac97_driver *driver)
{
struct list_head *l;
struct ac97_codec *c;
mutex_lock(&codec_mutex);
INIT_LIST_HEAD(&driver->list);
list_add(&driver->list, &codec_drivers);
list_for_each(l, &codecs)
{
c = list_entry(l, struct ac97_codec, list);
if(c->driver != NULL || ((c->model ^ driver->codec_id) & driver->codec_mask))
continue;
if(driver->probe(c, driver))
continue;
c->driver = driver;
}
mutex_unlock(&codec_mutex);
return 0;
}
EXPORT_SYMBOL_GPL(ac97_register_driver);
/**
* ac97_unregister_driver - unregister a codec helper
* @driver: Driver handler
*
* Unregister a handler for codecs matching the codec id. The handler
* remove function is called for all matching codecs.
*/
void ac97_unregister_driver(struct ac97_driver *driver)
{
struct list_head *l;
struct ac97_codec *c;
mutex_lock(&codec_mutex);
list_del_init(&driver->list);
list_for_each(l, &codecs)
{
c = list_entry(l, struct ac97_codec, list);
if (c->driver == driver) {
driver->remove(c, driver);
c->driver = NULL;
}
}
mutex_unlock(&codec_mutex);
}
EXPORT_SYMBOL_GPL(ac97_unregister_driver);
static int swap_headphone(int remove_master)
{
struct list_head *l;
......
/*
ac97_plugin_ad1980.c Copyright (C) 2003 Red Hat, Inc. All rights reserved.
The contents of this file are subject to the Open Software License version 1.1
that can be found at http://www.opensource.org/licenses/osl-1.1.txt and is
included herein by reference.
Alternatively, the contents of this file may be used under the
terms of the GNU General Public License version 2 (the "GPL") as
distributed in the kernel source COPYING file, in which
case the provisions of the GPL are applicable instead of the
above. If you wish to allow the use of your version of this file
only under the terms of the GPL and not to allow others to use
your version of this file under the OSL, indicate your decision
by deleting the provisions above and replace them with the notice
and other provisions required by the GPL. If you do not delete
the provisions above, a recipient may use your version of this
file under either the OSL or the GPL.
Authors: Alan Cox <alan@redhat.com>
This is an example codec plugin. This one switches the connections
around to match the setups some vendors use with audio switched to
non standard front connectors not the normal rear ones
This code primarily exists to demonstrate how to use the codec
interface
*/
#include <linux/config.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/ac97_codec.h>
/**
* ad1980_remove - codec remove callback
* @codec: The codec that is being removed
*
* This callback occurs when an AC97 codec is being removed. A
* codec remove call will not occur for a codec during that codec
* probe callback.
*
* Most drivers will need to lock their remove versus their
* use of the codec after the probe function.
*/
static void __devexit ad1980_remove(struct ac97_codec *codec, struct ac97_driver *driver)
{
/* Nothing to do in the simple example */
}
/**
* ad1980_probe - codec found callback
* @codec: ac97 codec matching the idents
* @driver: ac97_driver it matched
*
* This entry point is called when a codec is found which matches
* the driver. At the point it is called the codec is basically
* operational, mixer operations have been initialised and can
* be overriden. Called in process context. The field driver_private
* is available for the driver to use to store stuff.
*
* The caller can claim the device by returning zero, or return
* a negative error code.
*/
static int ad1980_probe(struct ac97_codec *codec, struct ac97_driver *driver)
{
u16 control;
#define AC97_AD_MISC 0x76
/* Switch the inputs/outputs over (from Dell code) */
control = codec->codec_read(codec, AC97_AD_MISC);
codec->codec_write(codec, AC97_AD_MISC, control | 0x4420);
/* We could refuse the device since we dont need to hang around,
but we will claim it */
return 0;
}
static struct ac97_driver ad1980_driver = {
.codec_id = 0x41445370,
.codec_mask = 0xFFFFFFFF,
.name = "AD1980 example",
.probe = ad1980_probe,
.remove = __devexit_p(ad1980_remove),
};
/**
* ad1980_exit - module exit path
*
* Our module is being unloaded. At this point unregister_driver
* will call back our remove handler for any existing codecs. You
* may not unregister_driver from interrupt context or from a
* probe/remove callback.
*/
static void ad1980_exit(void)
{
ac97_unregister_driver(&ad1980_driver);
}
/**
* ad1980_init - set up ad1980 handlers
*
* After we call the register function it will call our probe
* function for each existing matching device before returning to us.
* Any devices appearing afterwards whose id's match the codec_id
* will also cause the probe function to be called.
* You may not register_driver from interrupt context or from a
* probe/remove callback.
*/
static int ad1980_init(void)
{
return ac97_register_driver(&ad1980_driver);
}
module_init(ad1980_init);
module_exit(ad1980_exit);
MODULE_LICENSE("GPL");
......@@ -195,6 +195,7 @@ static void ad1848_halt(int dev);
static void ad1848_halt_input(int dev);
static void ad1848_halt_output(int dev);
static void ad1848_trigger(int dev, int bits);
static irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy);
#ifndef EXCLUDE_TIMERS
static int ad1848_tmr_install(int dev);
......@@ -2195,7 +2196,7 @@ void ad1848_unload(int io_base, int irq, int dma_playback, int dma_capture, int
printk(KERN_ERR "ad1848: Can't find device to be unloaded. Base=%x\n", io_base);
}
irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy)
static irqreturn_t adintr(int irq, void *dev_id, struct pt_regs *dummy)
{
unsigned char status;
ad1848_info *devc;
......@@ -2802,7 +2803,6 @@ EXPORT_SYMBOL(ad1848_detect);
EXPORT_SYMBOL(ad1848_init);
EXPORT_SYMBOL(ad1848_unload);
EXPORT_SYMBOL(ad1848_control);
EXPORT_SYMBOL(adintr);
EXPORT_SYMBOL(probe_ms_sound);
EXPORT_SYMBOL(attach_ms_sound);
EXPORT_SYMBOL(unload_ms_sound);
......
......@@ -18,7 +18,6 @@ void ad1848_unload (int io_base, int irq, int dma_playback, int dma_capture, int
int ad1848_detect (struct resource *ports, int *flags, int *osp);
int ad1848_control(int cmd, int arg);
irqreturn_t adintr(int irq, void *dev_id, struct pt_regs * dummy);
void attach_ms_sound(struct address_info * hw_config, struct resource *ports, struct module * owner);
int probe_ms_sound(struct address_info *hw_config, struct resource *ports);
......
此差异已折叠。
此差异已折叠。
......@@ -10,7 +10,5 @@ char audio_syms_symbol;
#include "sound_calls.h"
EXPORT_SYMBOL(DMAbuf_start_dma);
EXPORT_SYMBOL(DMAbuf_open_dma);
EXPORT_SYMBOL(DMAbuf_close_dma);
EXPORT_SYMBOL(DMAbuf_inputintr);
EXPORT_SYMBOL(DMAbuf_outputintr);
/*
* sound/oss/awe_hw.h
*
* Access routines and definitions for the low level driver for the
* Creative AWE32/SB32/AWE64 wave table synth.
* version 0.4.4; Jan. 4, 2000
*
* Copyright (C) 1996-2000 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.
*/
#ifndef AWE_HW_H_DEF
#define AWE_HW_H_DEF
/*
* Emu-8000 control registers
* name(channel) reg, port
*/
#define awe_cmd_idx(reg,ch) (((reg)<< 5) | (ch))
#define Data0 0 /* 0x620: doubleword r/w */
#define Data1 1 /* 0xA20: doubleword r/w */
#define Data2 2 /* 0xA22: word r/w */
#define Data3 3 /* 0xE20: word r/w */
#define Pointer 4 /* 0xE22 register pointer r/w */
#define AWE_CPF(ch) awe_cmd_idx(0,ch), Data0 /* DW: current pitch and fractional address */
#define AWE_PTRX(ch) awe_cmd_idx(1,ch), Data0 /* DW: pitch target and reverb send */
#define AWE_CVCF(ch) awe_cmd_idx(2,ch), Data0 /* DW: current volume and filter cutoff */
#define AWE_VTFT(ch) awe_cmd_idx(3,ch), Data0 /* DW: volume and filter cutoff targets */
#define AWE_0080(ch) awe_cmd_idx(4,ch), Data0 /* DW: ?? */
#define AWE_00A0(ch) awe_cmd_idx(5,ch), Data0 /* DW: ?? */
#define AWE_PSST(ch) awe_cmd_idx(6,ch), Data0 /* DW: pan send and loop start address */
#define AWE_CSL(ch) awe_cmd_idx(7,ch), Data0 /* DW: chorus send and loop end address */
#define AWE_CCCA(ch) awe_cmd_idx(0,ch), Data1 /* DW: Q, control bits, and current address */
#define AWE_HWCF4 awe_cmd_idx(1,9), Data1 /* DW: config dw 4 */
#define AWE_HWCF5 awe_cmd_idx(1,10), Data1 /* DW: config dw 5 */
#define AWE_HWCF6 awe_cmd_idx(1,13), Data1 /* DW: config dw 6 */
#define AWE_HWCF7 awe_cmd_idx(1,14), Data1 /* DW: config dw 7? (not documented) */
#define AWE_SMALR awe_cmd_idx(1,20), Data1 /* DW: sound memory address for left read */
#define AWE_SMARR awe_cmd_idx(1,21), Data1 /* DW: for right read */
#define AWE_SMALW awe_cmd_idx(1,22), Data1 /* DW: sound memory address for left write */
#define AWE_SMARW awe_cmd_idx(1,23), Data1 /* DW: for right write */
#define AWE_SMLD awe_cmd_idx(1,26), Data1 /* W: sound memory left data */
#define AWE_SMRD awe_cmd_idx(1,26), Data2 /* W: right data */
#define AWE_WC awe_cmd_idx(1,27), Data2 /* W: sample counter */
#define AWE_WC_Cmd awe_cmd_idx(1,27)
#define AWE_WC_Port Data2
#define AWE_HWCF1 awe_cmd_idx(1,29), Data1 /* W: config w 1 */
#define AWE_HWCF2 awe_cmd_idx(1,30), Data1 /* W: config w 2 */
#define AWE_HWCF3 awe_cmd_idx(1,31), Data1 /* W: config w 3 */
#define AWE_INIT1(ch) awe_cmd_idx(2,ch), Data1 /* W: init array 1 */
#define AWE_INIT2(ch) awe_cmd_idx(2,ch), Data2 /* W: init array 2 */
#define AWE_INIT3(ch) awe_cmd_idx(3,ch), Data1 /* W: init array 3 */
#define AWE_INIT4(ch) awe_cmd_idx(3,ch), Data2 /* W: init array 4 */
#define AWE_ENVVOL(ch) awe_cmd_idx(4,ch), Data1 /* W: volume envelope delay */
#define AWE_DCYSUSV(ch) awe_cmd_idx(5,ch), Data1 /* W: volume envelope sustain and decay */
#define AWE_ENVVAL(ch) awe_cmd_idx(6,ch), Data1 /* W: modulation envelope delay */
#define AWE_DCYSUS(ch) awe_cmd_idx(7,ch), Data1 /* W: modulation envelope sustain and decay */
#define AWE_ATKHLDV(ch) awe_cmd_idx(4,ch), Data2 /* W: volume envelope attack and hold */
#define AWE_LFO1VAL(ch) awe_cmd_idx(5,ch), Data2 /* W: LFO#1 Delay */
#define AWE_ATKHLD(ch) awe_cmd_idx(6,ch), Data2 /* W: modulation envelope attack and hold */
#define AWE_LFO2VAL(ch) awe_cmd_idx(7,ch), Data2 /* W: LFO#2 Delay */
#define AWE_IP(ch) awe_cmd_idx(0,ch), Data3 /* W: initial pitch */
#define AWE_IFATN(ch) awe_cmd_idx(1,ch), Data3 /* W: initial filter cutoff and attenuation */
#define AWE_PEFE(ch) awe_cmd_idx(2,ch), Data3 /* W: pitch and filter envelope heights */
#define AWE_FMMOD(ch) awe_cmd_idx(3,ch), Data3 /* W: vibrato and filter modulation freq */
#define AWE_TREMFRQ(ch) awe_cmd_idx(4,ch), Data3 /* W: LFO#1 tremolo amount and freq */
#define AWE_FM2FRQ2(ch) awe_cmd_idx(5,ch), Data3 /* W: LFO#2 vibrato amount and freq */
/* used during detection (returns ROM version?; not documented in ADIP) */
#define AWE_U1 0xE0, Data3 /* (R)(W) used in initialization */
#define AWE_U2(ch) 0xC0+(ch), Data3 /* (W)(W) used in init envelope */
#define AWE_MAX_VOICES 32
#define AWE_NORMAL_VOICES 30 /*30&31 are reserved for DRAM refresh*/
#define AWE_MAX_CHANNELS 32 /* max midi channels (must >= voices) */
#define AWE_MAX_LAYERS AWE_MAX_VOICES /* maximum number of multiple layers */
#define AWE_DRAM_OFFSET 0x200000
#define AWE_MAX_DRAM_SIZE (28 * 1024) /* 28 MB is max onboard memory */
#endif
此差异已折叠。
/*
* sound/oss/awe_wave.h
*
* Configuration of AWE32/SB32/AWE64 wave table synth driver.
* version 0.4.4; Jan. 4, 2000
*
* Copyright (C) 1996-1998 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.
*/
/*
* chorus & reverb effects send for FM chip: from 0 to 0xff
* larger numbers often cause weird sounds.
*/
#define DEF_FM_CHORUS_DEPTH 0x10
#define DEF_FM_REVERB_DEPTH 0x10
/*
* other compile conditions
*/
/* initialize FM passthrough even without extended RAM */
#undef AWE_ALWAYS_INIT_FM
/* debug on */
#define AWE_DEBUG_ON
/* GUS compatible mode */
#define AWE_HAS_GUS_COMPATIBILITY
/* add MIDI emulation by wavetable */
#define CONFIG_AWE32_MIDIEMU
/* add mixer control of emu8000 equalizer */
#undef CONFIG_AWE32_MIXER
/* use new volume calculation method as default */
#define AWE_USE_NEW_VOLUME_CALC
/* check current volume target for searching empty voices */
#define AWE_CHECK_VTARGET
/* allow sample sharing */
#define AWE_ALLOW_SAMPLE_SHARING
/*
* AWE32 card configuration:
* uncomment the following lines *ONLY* when auto detection doesn't
* work properly on your machine.
*/
/*#define AWE_DEFAULT_BASE_ADDR 0x620*/ /* base port address */
/*#define AWE_DEFAULT_MEM_SIZE 512*/ /* kbytes */
/*
* AWE driver version number
*/
#define AWE_MAJOR_VERSION 0
#define AWE_MINOR_VERSION 4
#define AWE_TINY_VERSION 4
#define AWE_VERSION_NUMBER ((AWE_MAJOR_VERSION<<16)|(AWE_MINOR_VERSION<<8)|AWE_TINY_VERSION)
#define AWEDRV_VERSION "0.4.4"
此差异已折叠。
# Makefile for Cirrus Logic-Crystal CS4281
#
obj-$(CONFIG_SOUND_CS4281) += cs4281.o
cs4281-objs += cs4281m.o
此差异已折叠。
/*******************************************************************************
*
* "cs4281_wrapper.c" -- Cirrus Logic-Crystal CS4281 linux audio driver.
*
* Copyright (C) 2000,2001 Cirrus Logic Corp.
* -- tom woller (twoller@crystal.cirrus.com) or
* (audio@crystal.cirrus.com).
*
* 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.
*
* 12/20/00 trw - new file.
*
*******************************************************************************/
#include <linux/spinlock.h>
static int cs4281_resume_null(struct pci_dev *pcidev) { return 0; }
static int cs4281_suspend_null(struct pci_dev *pcidev, pm_message_t state) { return 0; }
#define free_dmabuf(state, dmabuf) \
pci_free_consistent(state->pcidev, \
PAGE_SIZE << (dmabuf)->buforder, \
(dmabuf)->rawbuf, (dmabuf)->dmaaddr);
#define free_dmabuf2(state, dmabuf) \
pci_free_consistent((state)->pcidev, \
PAGE_SIZE << (state)->buforder_tmpbuff, \
(state)->tmpbuff, (state)->dmaaddr_tmpbuff);
#define cs4x_pgoff(vma) ((vma)->vm_pgoff)
此差异已折叠。
/*******************************************************************************
*
* "cs4281pm.c" -- Cirrus Logic-Crystal CS4281 linux audio driver.
*
* Copyright (C) 2000,2001 Cirrus Logic Corp.
* -- tom woller (twoller@crystal.cirrus.com) or
* (audio@crystal.cirrus.com).
*
* 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.
*
* 12/22/00 trw - new file.
*
*******************************************************************************/
#ifndef NOT_CS4281_PM
#include <linux/pm.h>
static int cs4281_suspend(struct cs4281_state *s);
static int cs4281_resume(struct cs4281_state *s);
/*
* for now (12/22/00) only enable the pm_register PM support.
* allow these table entries to be null.
#define CS4281_SUSPEND_TBL cs4281_suspend_tbl
#define CS4281_RESUME_TBL cs4281_resume_tbl
*/
#define CS4281_SUSPEND_TBL cs4281_suspend_null
#define CS4281_RESUME_TBL cs4281_resume_null
#else /* CS4281_PM */
#define CS4281_SUSPEND_TBL cs4281_suspend_null
#define CS4281_RESUME_TBL cs4281_resume_null
#endif /* CS4281_PM */
此差异已折叠。
此差异已折叠。
......@@ -1155,36 +1155,6 @@ void DMAbuf_inputintr(int dev)
spin_unlock_irqrestore(&dmap->lock,flags);
}
int DMAbuf_open_dma(int dev)
{
/*
* NOTE! This routine opens only the primary DMA channel (output).
*/
struct audio_operations *adev = audio_devs[dev];
int err;
if ((err = open_dmap(adev, OPEN_READWRITE, adev->dmap_out)) < 0)
return -EBUSY;
dma_init_buffers(adev->dmap_out);
adev->dmap_out->flags |= DMA_ALLOC_DONE;
adev->dmap_out->fragment_size = adev->dmap_out->buffsize;
if (adev->dmap_out->dma >= 0) {
unsigned long flags;
flags=claim_dma_lock();
clear_dma_ff(adev->dmap_out->dma);
disable_dma(adev->dmap_out->dma);
release_dma_lock(flags);
}
return 0;
}
void DMAbuf_close_dma(int dev)
{
close_dmap(audio_devs[dev], audio_devs[dev]->dmap_out);
}
void DMAbuf_init(int dev, int dma1, int dma2)
{
struct audio_operations *adev = audio_devs[dev];
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
#include "ad1848.h"
/* From gus_card.c */
int gus_set_midi_irq(int num);
irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs * dummy);
/* From gus_wave.c */
int gus_wave_detect(int baseaddr);
void gus_wave_init(struct address_info *hw_config);
void gus_wave_unload (struct address_info *hw_config);
void gus_voice_irq(void);
void gus_write8(int reg, unsigned int data);
void guswave_dma_irq(void);
void gus_delay(void);
int gus_default_mixer_ioctl (int dev, unsigned int cmd, void __user *arg);
void gus_timer_command (unsigned int addr, unsigned int val);
/* From gus_midi.c */
void gus_midi_init(struct address_info *hw_config);
void gus_midi_interrupt(int dummy);
/* From ics2101.c */
int ics2101_mixer_init(void);
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -10,5 +10,3 @@ int probe_mpu401(struct address_info *hw_config, struct resource *ports);
int attach_mpu401(struct address_info * hw_config, struct module *owner);
void unload_mpu401(struct address_info *hw_info);
int intchk_mpu401(void *dev_id);
irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs * dummy);
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册