[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: Adrian Bunk <bunk@stusta.de> Signed-off-by: Michal Piotrowski <michal.k.k.piotrowski@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Родитель
595182bcdf
Коммит
d56b9b9c46
|
@ -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>]
|
||||
|
||||
|
|
|
@ -1,76 +0,0 @@
|
|||
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
|
|
@ -1,85 +0,0 @@
|
|||
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.
|
||||
|
|
@ -1,134 +0,0 @@
|
|||
================================================================
|
||||
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!
|
|
@ -1,56 +0,0 @@
|
|||
(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
|
|
@ -1,123 +0,0 @@
|
|||
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.
|
|
@ -1,92 +0,0 @@
|
|||
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.
|
|
@ -1,42 +0,0 @@
|
|||
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.
|
||||
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
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>
|
|
@ -1,218 +0,0 @@
|
|||
================================================================
|
||||
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.
|
|
@ -1,339 +0,0 @@
|
|||
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>
|
||||
|
||||
|
|
@ -1,70 +0,0 @@
|
|||
/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
|
|
@ -1,767 +0,0 @@
|
|||
Beta release of the rme96xx (driver for RME 96XX cards like the
|
||||
"Hammerfall" and the "Hammerfall light")
|
||||
|
||||
Important: The driver module has to be installed on a freshly rebooted system,
|
||||
otherwise the driver might not be able to acquire its buffers.
|
||||
|
||||
features:
|
||||
|
||||
- OSS programming interface (i.e. runs with standard OSS soundsoftware)
|
||||
- OSS/Multichannel interface (OSS multichannel is done by just aquiring
|
||||
more than 2 channels). The driver does not use more than one device
|
||||
( yet .. this feature may be implemented later )
|
||||
- more than one RME card supported
|
||||
|
||||
The driver uses a specific multichannel interface, which I will document
|
||||
when the driver gets stable. (take a look at the defines in rme96xx.h,
|
||||
which adds blocked multichannel formats i.e instead of
|
||||
lrlrlrlr --> llllrrrr etc.
|
||||
|
||||
Use the "rmectrl" programm to look at the status of the card ..
|
||||
or use xrmectrl, a GUI interface for the ctrl program.
|
||||
|
||||
What you can do with the rmectrl program is to set the stereo device for
|
||||
OSS emulation (e.g. if you use SPDIF out).
|
||||
|
||||
You do:
|
||||
|
||||
./ctrl offset 24 24
|
||||
|
||||
which makes the stereo device use channels 25 and 26.
|
||||
|
||||
Guenter Geiger <geiger@epy.co.at>
|
||||
|
||||
copy the first part of the attached source code into rmectrl.c
|
||||
and the second part into xrmectrl (or get the program from
|
||||
http://gige.xdv.org/pages/soft/pages/rme)
|
||||
|
||||
to compile: gcc -o rmectrl rmectrl.c
|
||||
------------------------------ snip ------------------------------------
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <fcntl.h>
|
||||
#include <linux/soundcard.h>
|
||||
#include <math.h>
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include "rme96xx.h"
|
||||
|
||||
/*
|
||||
remctrl.c
|
||||
(C) 2000 Guenter Geiger <geiger@debian.org>
|
||||
HP20020201 - Heiko Purnhagen <purnhage@tnt.uni-hannover.de>
|
||||
*/
|
||||
|
||||
/* # define DEVICE_NAME "/dev/mixer" */
|
||||
# define DEVICE_NAME "/dev/mixer1"
|
||||
|
||||
|
||||
void usage(void)
|
||||
{
|
||||
fprintf(stderr,"usage: rmectrl [/dev/mixer<n>] [command [options]]\n\n");
|
||||
fprintf(stderr,"where command is one of:\n");
|
||||
fprintf(stderr," help show this help\n");
|
||||
fprintf(stderr," status show status bits\n");
|
||||
fprintf(stderr," control show control bits\n");
|
||||
fprintf(stderr," mix show mixer/offset status\n");
|
||||
fprintf(stderr," master <n> set sync master\n");
|
||||
fprintf(stderr," pro <n> set spdif out pro\n");
|
||||
fprintf(stderr," emphasis <n> set spdif out emphasis\n");
|
||||
fprintf(stderr," dolby <n> set spdif out no audio\n");
|
||||
fprintf(stderr," optout <n> set spdif out optical\n");
|
||||
fprintf(stderr," wordclock <n> set sync wordclock\n");
|
||||
fprintf(stderr," spdifin <n> set spdif in (0=optical,1=coax,2=intern)\n");
|
||||
fprintf(stderr," syncref <n> set sync source (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n");
|
||||
fprintf(stderr," adat1cd <n> set ADAT1 on internal CD\n");
|
||||
fprintf(stderr," offset <devnr> <in> <out> set dev (0..3) offset (0..25)\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
|
||||
int main(int argc, char* argv[])
|
||||
{
|
||||
int cards;
|
||||
int ret;
|
||||
int i;
|
||||
double ft;
|
||||
int fd, fdwr;
|
||||
int param,orig;
|
||||
rme_status_t stat;
|
||||
rme_ctrl_t ctrl;
|
||||
char *device;
|
||||
int argidx;
|
||||
|
||||
if (argc < 2)
|
||||
usage();
|
||||
|
||||
if (*argv[1]=='/') {
|
||||
device = argv[1];
|
||||
argidx = 2;
|
||||
}
|
||||
else {
|
||||
device = DEVICE_NAME;
|
||||
argidx = 1;
|
||||
}
|
||||
|
||||
fprintf(stdout,"mixer device %s\n",device);
|
||||
if ((fd = open(device,O_RDONLY)) < 0) {
|
||||
fprintf(stdout,"opening device failed\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if ((fdwr = open(device,O_WRONLY)) < 0) {
|
||||
fprintf(stdout,"opening device failed\n");
|
||||
exit(-1);
|
||||
}
|
||||
|
||||
if (argc < argidx+1)
|
||||
usage();
|
||||
|
||||
if (!strcmp(argv[argidx],"help"))
|
||||
usage();
|
||||
if (!strcmp(argv[argidx],"-h"))
|
||||
usage();
|
||||
if (!strcmp(argv[argidx],"--help"))
|
||||
usage();
|
||||
|
||||
if (!strcmp(argv[argidx],"status")) {
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE2,&stat);
|
||||
fprintf(stdout,"stat.irq %d\n",stat.irq);
|
||||
fprintf(stdout,"stat.lockmask %d\n",stat.lockmask);
|
||||
fprintf(stdout,"stat.sr48 %d\n",stat.sr48);
|
||||
fprintf(stdout,"stat.wclock %d\n",stat.wclock);
|
||||
fprintf(stdout,"stat.bufpoint %d\n",stat.bufpoint);
|
||||
fprintf(stdout,"stat.syncmask %d\n",stat.syncmask);
|
||||
fprintf(stdout,"stat.doublespeed %d\n",stat.doublespeed);
|
||||
fprintf(stdout,"stat.tc_busy %d\n",stat.tc_busy);
|
||||
fprintf(stdout,"stat.tc_out %d\n",stat.tc_out);
|
||||
fprintf(stdout,"stat.crystalrate %d (0=64k 3=96k 4=88.2k 5=48k 6=44.1k 7=32k)\n",stat.crystalrate);
|
||||
fprintf(stdout,"stat.spdif_error %d\n",stat.spdif_error);
|
||||
fprintf(stdout,"stat.bufid %d\n",stat.bufid);
|
||||
fprintf(stdout,"stat.tc_valid %d\n",stat.tc_valid);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"control")) {
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
fprintf(stdout,"ctrl.start %d\n",ctrl.start);
|
||||
fprintf(stdout,"ctrl.latency %d (0=64 .. 7=8192)\n",ctrl.latency);
|
||||
fprintf(stdout,"ctrl.master %d\n",ctrl.master);
|
||||
fprintf(stdout,"ctrl.ie %d\n",ctrl.ie);
|
||||
fprintf(stdout,"ctrl.sr48 %d\n",ctrl.sr48);
|
||||
fprintf(stdout,"ctrl.spare %d\n",ctrl.spare);
|
||||
fprintf(stdout,"ctrl.doublespeed %d\n",ctrl.doublespeed);
|
||||
fprintf(stdout,"ctrl.pro %d\n",ctrl.pro);
|
||||
fprintf(stdout,"ctrl.emphasis %d\n",ctrl.emphasis);
|
||||
fprintf(stdout,"ctrl.dolby %d\n",ctrl.dolby);
|
||||
fprintf(stdout,"ctrl.opt_out %d\n",ctrl.opt_out);
|
||||
fprintf(stdout,"ctrl.wordclock %d\n",ctrl.wordclock);
|
||||
fprintf(stdout,"ctrl.spdif_in %d (0=optical,1=coax,2=intern)\n",ctrl.spdif_in);
|
||||
fprintf(stdout,"ctrl.sync_ref %d (0=ADAT1,1=ADAT2,2=ADAT3,3=SPDIF)\n",ctrl.sync_ref);
|
||||
fprintf(stdout,"ctrl.spdif_reset %d\n",ctrl.spdif_reset);
|
||||
fprintf(stdout,"ctrl.spdif_select %d\n",ctrl.spdif_select);
|
||||
fprintf(stdout,"ctrl.spdif_clock %d\n",ctrl.spdif_clock);
|
||||
fprintf(stdout,"ctrl.spdif_write %d\n",ctrl.spdif_write);
|
||||
fprintf(stdout,"ctrl.adat1_cd %d\n",ctrl.adat1_cd);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"mix")) {
|
||||
rme_mixer mix;
|
||||
int i;
|
||||
|
||||
for (i=0; i<4; i++) {
|
||||
mix.devnr = i;
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE1,&mix);
|
||||
if (mix.devnr == i) {
|
||||
fprintf(stdout,"devnr %d\n",mix.devnr);
|
||||
fprintf(stdout,"mix.i_offset %2d (0-25)\n",mix.i_offset);
|
||||
fprintf(stdout,"mix.o_offset %2d (0-25)\n",mix.o_offset);
|
||||
}
|
||||
}
|
||||
exit (0);
|
||||
}
|
||||
|
||||
/* the control flags */
|
||||
|
||||
if (argc < argidx+2)
|
||||
usage();
|
||||
|
||||
if (!strcmp(argv[argidx],"master")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("master = %d\n",val);
|
||||
ctrl.master = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"pro")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("pro = %d\n",val);
|
||||
ctrl.pro = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"emphasis")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("emphasis = %d\n",val);
|
||||
ctrl.emphasis = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"dolby")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("dolby = %d\n",val);
|
||||
ctrl.dolby = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"optout")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("optout = %d\n",val);
|
||||
ctrl.opt_out = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"wordclock")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("wordclock = %d\n",val);
|
||||
ctrl.wordclock = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"spdifin")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("spdifin = %d\n",val);
|
||||
ctrl.spdif_in = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"syncref")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("syncref = %d\n",val);
|
||||
ctrl.sync_ref = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
if (!strcmp(argv[argidx],"adat1cd")) {
|
||||
int val = atoi(argv[argidx+1]);
|
||||
ioctl(fd,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
printf("adat1cd = %d\n",val);
|
||||
ctrl.adat1_cd = val;
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE3,&ctrl);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
/* setting offset */
|
||||
|
||||
if (argc < argidx+4)
|
||||
usage();
|
||||
|
||||
if (!strcmp(argv[argidx],"offset")) {
|
||||
rme_mixer mix;
|
||||
|
||||
mix.devnr = atoi(argv[argidx+1]);
|
||||
|
||||
mix.i_offset = atoi(argv[argidx+2]);
|
||||
mix.o_offset = atoi(argv[argidx+3]);
|
||||
ioctl(fdwr,SOUND_MIXER_PRIVATE1,&mix);
|
||||
fprintf(stdout,"devnr %d\n",mix.devnr);
|
||||
fprintf(stdout,"mix.i_offset to %d\n",mix.i_offset);
|
||||
fprintf(stdout,"mix.o_offset to %d\n",mix.o_offset);
|
||||
exit (0);
|
||||
}
|
||||
|
||||
usage();
|
||||
exit (0); /* to avoid warning */
|
||||
}
|
||||
|
||||
|
||||
---------------------------- <snip> --------------------------------
|
||||
#!/usr/bin/wish
|
||||
|
||||
# xrmectrl
|
||||
# (C) 2000 Guenter Geiger <geiger@debian.org>
|
||||
# HP20020201 - Heiko Purnhagen <purnhage@tnt.uni-hannover.de>
|
||||
|
||||
#set defaults "-relief ridged"
|
||||
set CTRLPROG "./rmectrl"
|
||||
if {$argc} {
|
||||
set CTRLPROG "$CTRLPROG $argv"
|
||||
}
|
||||
puts "CTRLPROG $CTRLPROG"
|
||||
|
||||
frame .butts
|
||||
button .butts.exit -text "Exit" -command "exit" -relief ridge
|
||||
#button .butts.state -text "State" -command "get_all"
|
||||
|
||||
pack .butts.exit -side left
|
||||
pack .butts -side bottom
|
||||
|
||||
|
||||
#
|
||||
# STATUS
|
||||
#
|
||||
|
||||
frame .status
|
||||
|
||||
# Sampling Rate
|
||||
|
||||
frame .status.sr
|
||||
label .status.sr.text -text "Sampling Rate" -justify left
|
||||
radiobutton .status.sr.441 -selectcolor red -text "44.1 kHz" -width 10 -anchor nw -variable srate -value 44100 -font times
|
||||
radiobutton .status.sr.480 -selectcolor red -text "48 kHz" -width 10 -anchor nw -variable srate -value 48000 -font times
|
||||
radiobutton .status.sr.882 -selectcolor red -text "88.2 kHz" -width 10 -anchor nw -variable srate -value 88200 -font times
|
||||
radiobutton .status.sr.960 -selectcolor red -text "96 kHz" -width 10 -anchor nw -variable srate -value 96000 -font times
|
||||
|
||||
pack .status.sr.text .status.sr.441 .status.sr.480 .status.sr.882 .status.sr.960 -side top -padx 3
|
||||
|
||||
# Lock
|
||||
|
||||
frame .status.lock
|
||||
label .status.lock.text -text "Lock" -justify left
|
||||
checkbutton .status.lock.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatlock1 -font times
|
||||
checkbutton .status.lock.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatlock2 -font times
|
||||
checkbutton .status.lock.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatlock3 -font times
|
||||
|
||||
pack .status.lock.text .status.lock.adat1 .status.lock.adat2 .status.lock.adat3 -side top -padx 3
|
||||
|
||||
# Sync
|
||||
|
||||
frame .status.sync
|
||||
label .status.sync.text -text "Sync" -justify left
|
||||
checkbutton .status.sync.adat1 -selectcolor red -text "ADAT1" -anchor nw -width 10 -variable adatsync1 -font times
|
||||
checkbutton .status.sync.adat2 -selectcolor red -text "ADAT2" -anchor nw -width 10 -variable adatsync2 -font times
|
||||
checkbutton .status.sync.adat3 -selectcolor red -text "ADAT3" -anchor nw -width 10 -variable adatsync3 -font times
|
||||
|
||||
pack .status.sync.text .status.sync.adat1 .status.sync.adat2 .status.sync.adat3 -side top -padx 3
|
||||
|
||||
# Timecode
|
||||
|
||||
frame .status.tc
|
||||
label .status.tc.text -text "Timecode" -justify left
|
||||
checkbutton .status.tc.busy -selectcolor red -text "busy" -anchor nw -width 10 -variable tcbusy -font times
|
||||
checkbutton .status.tc.out -selectcolor red -text "out" -anchor nw -width 10 -variable tcout -font times
|
||||
checkbutton .status.tc.valid -selectcolor red -text "valid" -anchor nw -width 10 -variable tcvalid -font times
|
||||
|
||||
pack .status.tc.text .status.tc.busy .status.tc.out .status.tc.valid -side top -padx 3
|
||||
|
||||
# SPDIF In
|
||||
|
||||
frame .status.spdif
|
||||
label .status.spdif.text -text "SPDIF In" -justify left
|
||||
label .status.spdif.sr -text "--.- kHz" -anchor n -width 10 -font times
|
||||
checkbutton .status.spdif.error -selectcolor red -text "Input Lock" -anchor nw -width 10 -variable spdiferr -font times
|
||||
|
||||
pack .status.spdif.text .status.spdif.sr .status.spdif.error -side top -padx 3
|
||||
|
||||
pack .status.sr .status.lock .status.sync .status.tc .status.spdif -side left -fill x -anchor n -expand 1
|
||||
|
||||
|
||||
#
|
||||
# CONTROL
|
||||
#
|
||||
|
||||
proc setprof {} {
|
||||
global CTRLPROG
|
||||
global spprof
|
||||
exec $CTRLPROG pro $spprof
|
||||
}
|
||||
|
||||
proc setemph {} {
|
||||
global CTRLPROG
|
||||
global spemph
|
||||
exec $CTRLPROG emphasis $spemph
|
||||
}
|
||||
|
||||
proc setnoaud {} {
|
||||
global CTRLPROG
|
||||
global spnoaud
|
||||
exec $CTRLPROG dolby $spnoaud
|
||||
}
|
||||
|
||||
proc setoptical {} {
|
||||
global CTRLPROG
|
||||
global spoptical
|
||||
exec $CTRLPROG optout $spoptical
|
||||
}
|
||||
|
||||
proc setspdifin {} {
|
||||
global CTRLPROG
|
||||
global spdifin
|
||||
exec $CTRLPROG spdifin [expr $spdifin - 1]
|
||||
}
|
||||
|
||||
proc setsyncsource {} {
|
||||
global CTRLPROG
|
||||
global syncsource
|
||||
exec $CTRLPROG syncref [expr $syncsource -1]
|
||||
}
|
||||
|
||||
|
||||
proc setmaster {} {
|
||||
global CTRLPROG
|
||||
global master
|
||||
exec $CTRLPROG master $master
|
||||
}
|
||||
|
||||
proc setwordclock {} {
|
||||
global CTRLPROG
|
||||
global wordclock
|
||||
exec $CTRLPROG wordclock $wordclock
|
||||
}
|
||||
|
||||
proc setadat1cd {} {
|
||||
global CTRLPROG
|
||||
global adat1cd
|
||||
exec $CTRLPROG adat1cd $adat1cd
|
||||
}
|
||||
|
||||
|
||||
frame .control
|
||||
|
||||
# SPDIF In & SPDIF Out
|
||||
|
||||
|
||||
frame .control.spdif
|
||||
|
||||
frame .control.spdif.in
|
||||
label .control.spdif.in.text -text "SPDIF In" -justify left
|
||||
radiobutton .control.spdif.in.input1 -text "Optical" -anchor nw -width 13 -variable spdifin -value 1 -command setspdifin -selectcolor blue -font times
|
||||
radiobutton .control.spdif.in.input2 -text "Coaxial" -anchor nw -width 13 -variable spdifin -value 2 -command setspdifin -selectcolor blue -font times
|
||||
radiobutton .control.spdif.in.input3 -text "Intern " -anchor nw -width 13 -variable spdifin -command setspdifin -value 3 -selectcolor blue -font times
|
||||
|
||||
checkbutton .control.spdif.in.adat1cd -text "ADAT1 Intern" -anchor nw -width 13 -variable adat1cd -command setadat1cd -selectcolor blue -font times
|
||||
|
||||
pack .control.spdif.in.text .control.spdif.in.input1 .control.spdif.in.input2 .control.spdif.in.input3 .control.spdif.in.adat1cd
|
||||
|
||||
label .control.spdif.space
|
||||
|
||||
frame .control.spdif.out
|
||||
label .control.spdif.out.text -text "SPDIF Out" -justify left
|
||||
checkbutton .control.spdif.out.pro -text "Professional" -anchor nw -width 13 -variable spprof -command setprof -selectcolor blue -font times
|
||||
checkbutton .control.spdif.out.emphasis -text "Emphasis" -anchor nw -width 13 -variable spemph -command setemph -selectcolor blue -font times
|
||||
checkbutton .control.spdif.out.dolby -text "NoAudio" -anchor nw -width 13 -variable spnoaud -command setnoaud -selectcolor blue -font times
|
||||
checkbutton .control.spdif.out.optout -text "Optical Out" -anchor nw -width 13 -variable spoptical -command setoptical -selectcolor blue -font times
|
||||
|
||||
pack .control.spdif.out.optout .control.spdif.out.dolby .control.spdif.out.emphasis .control.spdif.out.pro .control.spdif.out.text -side bottom
|
||||
|
||||
pack .control.spdif.in .control.spdif.space .control.spdif.out -side top -fill y -padx 3 -expand 1
|
||||
|
||||
# Sync Mode & Sync Source
|
||||
|
||||
frame .control.sync
|
||||
frame .control.sync.mode
|
||||
label .control.sync.mode.text -text "Sync Mode" -justify left
|
||||
checkbutton .control.sync.mode.master -text "Master" -anchor nw -width 13 -variable master -command setmaster -selectcolor blue -font times
|
||||
checkbutton .control.sync.mode.wc -text "Wordclock" -anchor nw -width 13 -variable wordclock -command setwordclock -selectcolor blue -font times
|
||||
|
||||
pack .control.sync.mode.text .control.sync.mode.master .control.sync.mode.wc
|
||||
|
||||
label .control.sync.space
|
||||
|
||||
frame .control.sync.src
|
||||
label .control.sync.src.text -text "Sync Source" -justify left
|
||||
radiobutton .control.sync.src.input1 -text "ADAT1" -anchor nw -width 13 -variable syncsource -value 1 -command setsyncsource -selectcolor blue -font times
|
||||
radiobutton .control.sync.src.input2 -text "ADAT2" -anchor nw -width 13 -variable syncsource -value 2 -command setsyncsource -selectcolor blue -font times
|
||||
radiobutton .control.sync.src.input3 -text "ADAT3" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 3 -selectcolor blue -font times
|
||||
radiobutton .control.sync.src.input4 -text "SPDIF" -anchor nw -width 13 -variable syncsource -command setsyncsource -value 4 -selectcolor blue -font times
|
||||
|
||||
pack .control.sync.src.input4 .control.sync.src.input3 .control.sync.src.input2 .control.sync.src.input1 .control.sync.src.text -side bottom
|
||||
|
||||
pack .control.sync.mode .control.sync.space .control.sync.src -side top -fill y -padx 3 -expand 1
|
||||
|
||||
label .control.space -text "" -width 10
|
||||
|
||||
# Buffer Size
|
||||
|
||||
frame .control.buf
|
||||
label .control.buf.text -text "Buffer Size (Latency)" -justify left
|
||||
radiobutton .control.buf.b1 -selectcolor red -text "64 (1.5 ms)" -width 13 -anchor nw -variable ssrate -value 1 -font times
|
||||
radiobutton .control.buf.b2 -selectcolor red -text "128 (3 ms)" -width 13 -anchor nw -variable ssrate -value 2 -font times
|
||||
radiobutton .control.buf.b3 -selectcolor red -text "256 (6 ms)" -width 13 -anchor nw -variable ssrate -value 3 -font times
|
||||
radiobutton .control.buf.b4 -selectcolor red -text "512 (12 ms)" -width 13 -anchor nw -variable ssrate -value 4 -font times
|
||||
radiobutton .control.buf.b5 -selectcolor red -text "1024 (23 ms)" -width 13 -anchor nw -variable ssrate -value 5 -font times
|
||||
radiobutton .control.buf.b6 -selectcolor red -text "2048 (46 ms)" -width 13 -anchor nw -variable ssrate -value 6 -font times
|
||||
radiobutton .control.buf.b7 -selectcolor red -text "4096 (93 ms)" -width 13 -anchor nw -variable ssrate -value 7 -font times
|
||||
radiobutton .control.buf.b8 -selectcolor red -text "8192 (186 ms)" -width 13 -anchor nw -variable ssrate -value 8 -font times
|
||||
|
||||
pack .control.buf.text .control.buf.b1 .control.buf.b2 .control.buf.b3 .control.buf.b4 .control.buf.b5 .control.buf.b6 .control.buf.b7 .control.buf.b8 -side top -padx 3
|
||||
|
||||
# Offset
|
||||
|
||||
frame .control.offset
|
||||
|
||||
frame .control.offset.in
|
||||
label .control.offset.in.text -text "Offset In" -justify left
|
||||
label .control.offset.in.off0 -text "dev\#0: -" -anchor nw -width 10 -font times
|
||||
label .control.offset.in.off1 -text "dev\#1: -" -anchor nw -width 10 -font times
|
||||
label .control.offset.in.off2 -text "dev\#2: -" -anchor nw -width 10 -font times
|
||||
label .control.offset.in.off3 -text "dev\#3: -" -anchor nw -width 10 -font times
|
||||
|
||||
pack .control.offset.in.text .control.offset.in.off0 .control.offset.in.off1 .control.offset.in.off2 .control.offset.in.off3
|
||||
|
||||
label .control.offset.space
|
||||
|
||||
frame .control.offset.out
|
||||
label .control.offset.out.text -text "Offset Out" -justify left
|
||||
label .control.offset.out.off0 -text "dev\#0: -" -anchor nw -width 10 -font times
|
||||
label .control.offset.out.off1 -text "dev\#1: -" -anchor nw -width 10 -font times
|
||||
label .control.offset.out.off2 -text "dev\#2: -" -anchor nw -width 10 -font times
|
||||
label .control.offset.out.off3 -text "dev\#3: -" -anchor nw -width 10 -font times
|
||||
|
||||
pack .control.offset.out.off3 .control.offset.out.off2 .control.offset.out.off1 .control.offset.out.off0 .control.offset.out.text -side bottom
|
||||
|
||||
pack .control.offset.in .control.offset.space .control.offset.out -side top -fill y -padx 3 -expand 1
|
||||
|
||||
|
||||
pack .control.spdif .control.sync .control.space .control.buf .control.offset -side left -fill both -anchor n -expand 1
|
||||
|
||||
|
||||
label .statustext -text Status -justify center -relief ridge
|
||||
label .controltext -text Control -justify center -relief ridge
|
||||
|
||||
label .statusspace
|
||||
label .controlspace
|
||||
|
||||
pack .statustext .status .statusspace .controltext .control .controlspace -side top -anchor nw -fill both -expand 1
|
||||
|
||||
|
||||
proc get_bit {output sstr} {
|
||||
set idx1 [string last [concat $sstr 1] $output]
|
||||
set idx1 [expr $idx1 != -1]
|
||||
return $idx1
|
||||
}
|
||||
|
||||
proc get_val {output sstr} {
|
||||
set val [string wordend $output [string last $sstr $output]]
|
||||
set val [string range $output $val [expr $val+1]]
|
||||
return $val
|
||||
}
|
||||
|
||||
proc get_val2 {output sstr} {
|
||||
set val [string wordend $output [string first $sstr $output]]
|
||||
set val [string range $output $val [expr $val+2]]
|
||||
return $val
|
||||
}
|
||||
|
||||
proc get_control {} {
|
||||
global spprof
|
||||
global spemph
|
||||
global spnoaud
|
||||
global spoptical
|
||||
global spdifin
|
||||
global ssrate
|
||||
global master
|
||||
global wordclock
|
||||
global syncsource
|
||||
global CTRLPROG
|
||||
|
||||
set f [open "| $CTRLPROG control" r+]
|
||||
set ooo [read $f 1000]
|
||||
close $f
|
||||
# puts $ooo
|
||||
|
||||
set spprof [ get_bit $ooo "pro"]
|
||||
set spemph [ get_bit $ooo "emphasis"]
|
||||
set spnoaud [ get_bit $ooo "dolby"]
|
||||
set spoptical [ get_bit $ooo "opt_out"]
|
||||
set spdifin [ expr [ get_val $ooo "spdif_in"] + 1]
|
||||
set ssrate [ expr [ get_val $ooo "latency"] + 1]
|
||||
set master [ expr [ get_val $ooo "master"]]
|
||||
set wordclock [ expr [ get_val $ooo "wordclock"]]
|
||||
set syncsource [ expr [ get_val $ooo "sync_ref"] + 1]
|
||||
}
|
||||
|
||||
proc get_status {} {
|
||||
global srate
|
||||
global ctrlcom
|
||||
|
||||
global adatlock1
|
||||
global adatlock2
|
||||
global adatlock3
|
||||
|
||||
global adatsync1
|
||||
global adatsync2
|
||||
global adatsync3
|
||||
|
||||
global tcbusy
|
||||
global tcout
|
||||
global tcvalid
|
||||
|
||||
global spdiferr
|
||||
global crystal
|
||||
global .status.spdif.text
|
||||
global CTRLPROG
|
||||
|
||||
|
||||
set f [open "| $CTRLPROG status" r+]
|
||||
set ooo [read $f 1000]
|
||||
close $f
|
||||
# puts $ooo
|
||||
|
||||
# samplerate
|
||||
|
||||
set idx1 [string last "sr48 1" $ooo]
|
||||
set idx2 [string last "doublespeed 1" $ooo]
|
||||
if {$idx1 >= 0} {
|
||||
set fact1 48000
|
||||
} else {
|
||||
set fact1 44100
|
||||
}
|
||||
|
||||
if {$idx2 >= 0} {
|
||||
set fact2 2
|
||||
} else {
|
||||
set fact2 1
|
||||
}
|
||||
set srate [expr $fact1 * $fact2]
|
||||
# ADAT lock
|
||||
|
||||
set val [get_val $ooo lockmask]
|
||||
set adatlock1 0
|
||||
set adatlock2 0
|
||||
set adatlock3 0
|
||||
if {[expr $val & 1]} {
|
||||
set adatlock3 1
|
||||
}
|
||||
if {[expr $val & 2]} {
|
||||
set adatlock2 1
|
||||
}
|
||||
if {[expr $val & 4]} {
|
||||
set adatlock1 1
|
||||
}
|
||||
|
||||
# ADAT sync
|
||||
set val [get_val $ooo syncmask]
|
||||
set adatsync1 0
|
||||
set adatsync2 0
|
||||
set adatsync3 0
|
||||
|
||||
if {[expr $val & 1]} {
|
||||
set adatsync3 1
|
||||
}
|
||||
if {[expr $val & 2]} {
|
||||
set adatsync2 1
|
||||
}
|
||||
if {[expr $val & 4]} {
|
||||
set adatsync1 1
|
||||
}
|
||||
|
||||
# TC busy
|
||||
|
||||
set tcbusy [get_bit $ooo "busy"]
|
||||
set tcout [get_bit $ooo "out"]
|
||||
set tcvalid [get_bit $ooo "valid"]
|
||||
set spdiferr [expr [get_bit $ooo "spdif_error"] == 0]
|
||||
|
||||
# 000=64kHz, 100=88.2kHz, 011=96kHz
|
||||
# 111=32kHz, 110=44.1kHz, 101=48kHz
|
||||
|
||||
set val [get_val $ooo crystalrate]
|
||||
|
||||
set crystal "--.- kHz"
|
||||
if {$val == 0} {
|
||||
set crystal "64 kHz"
|
||||
}
|
||||
if {$val == 4} {
|
||||
set crystal "88.2 kHz"
|
||||
}
|
||||
if {$val == 3} {
|
||||
set crystal "96 kHz"
|
||||
}
|
||||
if {$val == 7} {
|
||||
set crystal "32 kHz"
|
||||
}
|
||||
if {$val == 6} {
|
||||
set crystal "44.1 kHz"
|
||||
}
|
||||
if {$val == 5} {
|
||||
set crystal "48 kHz"
|
||||
}
|
||||
.status.spdif.sr configure -text $crystal
|
||||
}
|
||||
|
||||
proc get_offset {} {
|
||||
global inoffset
|
||||
global outoffset
|
||||
global CTRLPROG
|
||||
|
||||
set f [open "| $CTRLPROG mix" r+]
|
||||
set ooo [read $f 1000]
|
||||
close $f
|
||||
# puts $ooo
|
||||
|
||||
if { [string match "*devnr*" $ooo] } {
|
||||
set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
|
||||
set val [get_val2 $ooo i_offset]
|
||||
.control.offset.in.off0 configure -text "dev\#0: $val"
|
||||
set val [get_val2 $ooo o_offset]
|
||||
.control.offset.out.off0 configure -text "dev\#0: $val"
|
||||
} else {
|
||||
.control.offset.in.off0 configure -text "dev\#0: -"
|
||||
.control.offset.out.off0 configure -text "dev\#0: -"
|
||||
}
|
||||
if { [string match "*devnr*" $ooo] } {
|
||||
set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
|
||||
set val [get_val2 $ooo i_offset]
|
||||
.control.offset.in.off1 configure -text "dev\#1: $val"
|
||||
set val [get_val2 $ooo o_offset]
|
||||
.control.offset.out.off1 configure -text "dev\#1: $val"
|
||||
} else {
|
||||
.control.offset.in.off1 configure -text "dev\#1: -"
|
||||
.control.offset.out.off1 configure -text "dev\#1: -"
|
||||
}
|
||||
if { [string match "*devnr*" $ooo] } {
|
||||
set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
|
||||
set val [get_val2 $ooo i_offset]
|
||||
.control.offset.in.off2 configure -text "dev\#2: $val"
|
||||
set val [get_val2 $ooo o_offset]
|
||||
.control.offset.out.off2 configure -text "dev\#2: $val"
|
||||
} else {
|
||||
.control.offset.in.off2 configure -text "dev\#2: -"
|
||||
.control.offset.out.off2 configure -text "dev\#2: -"
|
||||
}
|
||||
if { [string match "*devnr*" $ooo] } {
|
||||
set ooo [string range $ooo [string wordend $ooo [string first devnr $ooo]] end]
|
||||
set val [get_val2 $ooo i_offset]
|
||||
.control.offset.in.off3 configure -text "dev\#3: $val"
|
||||
set val [get_val2 $ooo o_offset]
|
||||
.control.offset.out.off3 configure -text "dev\#3: $val"
|
||||
} else {
|
||||
.control.offset.in.off3 configure -text "dev\#3: -"
|
||||
.control.offset.out.off3 configure -text "dev\#3: -"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc get_all {} {
|
||||
get_status
|
||||
get_control
|
||||
get_offset
|
||||
}
|
||||
|
||||
# main
|
||||
while {1} {
|
||||
after 200
|
||||
get_all
|
||||
update
|
||||
}
|
|
@ -1,70 +0,0 @@
|
|||
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
|
|
@ -1,81 +0,0 @@
|
|||
/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
|
11
MAINTAINERS
11
MAINTAINERS
|
@ -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);
|
||||
|
|
|
@ -1,675 +0,0 @@
|
|||
#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;
|
||||
|
|
|
@ -1,126 +0,0 @@
|
|||
/*
|
||||
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);
|
||||
|
|
3735
sound/oss/ali5455.c
3735
sound/oss/ali5455.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
2216
sound/oss/au1000.c
2216
sound/oss/au1000.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -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);
|
||||
|
|
|
@ -1,99 +0,0 @@
|
|||
/*
|
||||
* 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
|
6149
sound/oss/awe_wave.c
6149
sound/oss/awe_wave.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,77 +0,0 @@
|
|||
/*
|
||||
* 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"
|
3381
sound/oss/cmpci.c
3381
sound/oss/cmpci.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,6 +0,0 @@
|
|||
# Makefile for Cirrus Logic-Crystal CS4281
|
||||
#
|
||||
|
||||
obj-$(CONFIG_SOUND_CS4281) += cs4281.o
|
||||
|
||||
cs4281-objs += cs4281m.o
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,41 +0,0 @@
|
|||
/*******************************************************************************
|
||||
*
|
||||
* "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)
|
||||
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,45 +0,0 @@
|
|||
/*******************************************************************************
|
||||
*
|
||||
* "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 */
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
#ifndef NOT_CS4281_PM
|
||||
/*******************************************************************************
|
||||
*
|
||||
* "cs4281pm.h" -- 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.
|
||||
*
|
||||
*******************************************************************************/
|
||||
/* general pm definitions */
|
||||
#define CS4281_AC97_HIGHESTREGTORESTORE 0x26
|
||||
#define CS4281_AC97_NUMBER_RESTORE_REGS (CS4281_AC97_HIGHESTREGTORESTORE/2-1)
|
||||
|
||||
/* pipeline definitions */
|
||||
#define CS4281_NUMBER_OF_PIPELINES 4
|
||||
#define CS4281_PIPELINE_VALID 0x0001
|
||||
#define CS4281_PLAYBACK_PIPELINE_NUMBER 0x0000
|
||||
#define CS4281_CAPTURE_PIPELINE_NUMBER 0x0001
|
||||
|
||||
/* PM state defintions */
|
||||
#define CS4281_PM_NOT_REGISTERED 0x1000
|
||||
#define CS4281_PM_IDLE 0x0001
|
||||
#define CS4281_PM_SUSPENDING 0x0002
|
||||
#define CS4281_PM_SUSPENDED 0x0004
|
||||
#define CS4281_PM_RESUMING 0x0008
|
||||
#define CS4281_PM_RESUMED 0x0010
|
||||
|
||||
struct cs4281_pm {
|
||||
unsigned long flags;
|
||||
u32 u32CLKCR1_SAVE,u32SSPMValue,u32PPLVCvalue,u32PPRVCvalue;
|
||||
u32 u32FMLVCvalue,u32FMRVCvalue,u32GPIORvalue,u32JSCTLvalue,u32SSCR;
|
||||
u32 u32SRCSA,u32DacASR,u32AdcASR,u32DacSR,u32AdcSR,u32MIDCR_Save;
|
||||
u32 u32SSPM_BITS;
|
||||
u32 ac97[CS4281_AC97_NUMBER_RESTORE_REGS];
|
||||
u32 u32AC97_master_volume, u32AC97_headphone_volume, u32AC97_master_volume_mono;
|
||||
u32 u32AC97_pcm_out_volume, u32AC97_powerdown, u32AC97_general_purpose;
|
||||
u32 u32hwptr_playback,u32hwptr_capture;
|
||||
};
|
||||
|
||||
struct cs4281_pipeline {
|
||||
unsigned flags;
|
||||
unsigned number;
|
||||
u32 u32DBAnValue,u32DBCnValue,u32DMRnValue,u32DCRnValue;
|
||||
u32 u32DBAnAddress,u32DCAnAddress,u32DBCnAddress,u32DCCnAddress;
|
||||
u32 u32DMRnAddress,u32DCRnAddress,u32HDSRnAddress;
|
||||
u32 u32DBAn_Save,u32DBCn_Save,u32DMRn_Save,u32DCRn_Save;
|
||||
u32 u32DCCn_Save,u32DCAn_Save;
|
||||
/*
|
||||
* technically, these are fifo variables, but just map the
|
||||
* first fifo with the first pipeline and then use the fifo
|
||||
* variables inside of the pipeline struct.
|
||||
*/
|
||||
u32 u32FCRn_Save,u32FSICn_Save;
|
||||
u32 u32FCRnValue,u32FCRnAddress,u32FSICnValue,u32FSICnAddress;
|
||||
u32 u32FPDRnValue,u32FPDRnAddress;
|
||||
};
|
||||
#endif
|
|
@ -1,79 +0,0 @@
|
|||
#ifndef _DRIVERS_SOUND_DM_H
|
||||
#define _DRIVERS_SOUND_DM_H
|
||||
|
||||
/*
|
||||
* Definitions of the 'direct midi sound' interface used
|
||||
* by the newer commercial OSS package. We should export
|
||||
* this to userland somewhere in glibc later.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Data structure composing an FM "note" or sound event.
|
||||
*/
|
||||
|
||||
struct dm_fm_voice
|
||||
{
|
||||
u8 op;
|
||||
u8 voice;
|
||||
u8 am;
|
||||
u8 vibrato;
|
||||
u8 do_sustain;
|
||||
u8 kbd_scale;
|
||||
u8 harmonic;
|
||||
u8 scale_level;
|
||||
u8 volume;
|
||||
u8 attack;
|
||||
u8 decay;
|
||||
u8 sustain;
|
||||
u8 release;
|
||||
u8 feedback;
|
||||
u8 connection;
|
||||
u8 left;
|
||||
u8 right;
|
||||
u8 waveform;
|
||||
};
|
||||
|
||||
/*
|
||||
* This describes an FM note by its voice, octave, frequency number (10bit)
|
||||
* and key on/off.
|
||||
*/
|
||||
|
||||
struct dm_fm_note
|
||||
{
|
||||
u8 voice;
|
||||
u8 octave;
|
||||
u32 fnum;
|
||||
u8 key_on;
|
||||
};
|
||||
|
||||
/*
|
||||
* FM parameters that apply globally to all voices, and thus are not "notes"
|
||||
*/
|
||||
|
||||
struct dm_fm_params
|
||||
{
|
||||
u8 am_depth;
|
||||
u8 vib_depth;
|
||||
u8 kbd_split;
|
||||
u8 rhythm;
|
||||
|
||||
/* This block is the percussion instrument data */
|
||||
u8 bass;
|
||||
u8 snare;
|
||||
u8 tomtom;
|
||||
u8 cymbal;
|
||||
u8 hihat;
|
||||
};
|
||||
|
||||
/*
|
||||
* FM mode ioctl settings
|
||||
*/
|
||||
|
||||
#define FM_IOCTL_RESET 0x20
|
||||
#define FM_IOCTL_PLAY_NOTE 0x21
|
||||
#define FM_IOCTL_SET_VOICE 0x22
|
||||
#define FM_IOCTL_SET_PARAMS 0x23
|
||||
#define FM_IOCTL_SET_MODE 0x24
|
||||
#define FM_IOCTL_SET_OPL 0x25
|
||||
|
||||
#endif
|
|
@ -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];
|
||||
|
|
2819
sound/oss/es1370.c
2819
sound/oss/es1370.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
2516
sound/oss/esssolo1.c
2516
sound/oss/esssolo1.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
2139
sound/oss/forte.c
2139
sound/oss/forte.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,24 +0,0 @@
|
|||
|
||||
#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);
|
|
@ -1,293 +0,0 @@
|
|||
/*
|
||||
* sound/oss/gus_card.c
|
||||
*
|
||||
* Detection routine for the Gravis Ultrasound.
|
||||
*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
*
|
||||
* Frank van de Pol : Fixed GUS MAX interrupt handling, enabled simultanious
|
||||
* usage of CS4231A codec, GUS wave and MIDI for GUS MAX.
|
||||
* Christoph Hellwig: Adapted to module_init/module_exit, simple cleanups.
|
||||
*
|
||||
* Status:
|
||||
* Tested...
|
||||
*/
|
||||
|
||||
|
||||
#include <linux/config.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include "sound_config.h"
|
||||
|
||||
#include "gus.h"
|
||||
#include "gus_hw.h"
|
||||
|
||||
irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs *dummy);
|
||||
|
||||
int gus_base = 0, gus_irq = 0, gus_dma = 0;
|
||||
int gus_no_wave_dma = 0;
|
||||
extern int gus_wave_volume;
|
||||
extern int gus_pcm_volume;
|
||||
extern int have_gus_max;
|
||||
int gus_pnp_flag = 0;
|
||||
#ifdef CONFIG_SOUND_GUS16
|
||||
static int db16; /* Has a Gus16 AD1848 on it */
|
||||
#endif
|
||||
|
||||
static void __init attach_gus(struct address_info *hw_config)
|
||||
{
|
||||
gus_wave_init(hw_config);
|
||||
|
||||
if (sound_alloc_dma(hw_config->dma, "GUS"))
|
||||
printk(KERN_ERR "gus_card.c: Can't allocate DMA channel %d\n", hw_config->dma);
|
||||
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
|
||||
if (sound_alloc_dma(hw_config->dma2, "GUS(2)"))
|
||||
printk(KERN_ERR "gus_card.c: Can't allocate DMA channel %d\n", hw_config->dma2);
|
||||
gus_midi_init(hw_config);
|
||||
if(request_irq(hw_config->irq, gusintr, 0, "Gravis Ultrasound", hw_config)<0)
|
||||
printk(KERN_ERR "gus_card.c: Unable to allocate IRQ %d\n", hw_config->irq);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
static int __init probe_gus(struct address_info *hw_config)
|
||||
{
|
||||
int irq;
|
||||
int io_addr;
|
||||
|
||||
if (hw_config->card_subtype == 1)
|
||||
gus_pnp_flag = 1;
|
||||
|
||||
irq = hw_config->irq;
|
||||
|
||||
if (hw_config->card_subtype == 0) /* GUS/MAX/ACE */
|
||||
if (irq != 3 && irq != 5 && irq != 7 && irq != 9 &&
|
||||
irq != 11 && irq != 12 && irq != 15)
|
||||
{
|
||||
printk(KERN_ERR "GUS: Unsupported IRQ %d\n", irq);
|
||||
return 0;
|
||||
}
|
||||
if (gus_wave_detect(hw_config->io_base))
|
||||
return 1;
|
||||
|
||||
#ifndef EXCLUDE_GUS_IODETECT
|
||||
|
||||
/*
|
||||
* Look at the possible base addresses (0x2X0, X=1, 2, 3, 4, 5, 6)
|
||||
*/
|
||||
|
||||
for (io_addr = 0x210; io_addr <= 0x260; io_addr += 0x10) {
|
||||
if (io_addr == hw_config->io_base) /* Already tested */
|
||||
continue;
|
||||
if (gus_wave_detect(io_addr)) {
|
||||
hw_config->io_base = io_addr;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
printk("NO GUS card found !\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit unload_gus(struct address_info *hw_config)
|
||||
{
|
||||
DDB(printk("unload_gus(%x)\n", hw_config->io_base));
|
||||
|
||||
gus_wave_unload(hw_config);
|
||||
|
||||
release_region(hw_config->io_base, 16);
|
||||
release_region(hw_config->io_base + 0x100, 12); /* 0x10c-> is MAX */
|
||||
free_irq(hw_config->irq, hw_config);
|
||||
|
||||
sound_free_dma(hw_config->dma);
|
||||
|
||||
if (hw_config->dma2 != -1 && hw_config->dma2 != hw_config->dma)
|
||||
sound_free_dma(hw_config->dma2);
|
||||
}
|
||||
|
||||
irqreturn_t gusintr(int irq, void *dev_id, struct pt_regs *dummy)
|
||||
{
|
||||
unsigned char src;
|
||||
extern int gus_timer_enabled;
|
||||
int handled = 0;
|
||||
|
||||
#ifdef CONFIG_SOUND_GUSMAX
|
||||
if (have_gus_max) {
|
||||
struct address_info *hw_config = dev_id;
|
||||
adintr(irq, (void *)hw_config->slots[1], NULL);
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_SOUND_GUS16
|
||||
if (db16) {
|
||||
struct address_info *hw_config = dev_id;
|
||||
adintr(irq, (void *)hw_config->slots[3], NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
while (1)
|
||||
{
|
||||
if (!(src = inb(u_IrqStatus)))
|
||||
break;
|
||||
handled = 1;
|
||||
if (src & DMA_TC_IRQ)
|
||||
{
|
||||
guswave_dma_irq();
|
||||
}
|
||||
if (src & (MIDI_TX_IRQ | MIDI_RX_IRQ))
|
||||
{
|
||||
gus_midi_interrupt(0);
|
||||
}
|
||||
if (src & (GF1_TIMER1_IRQ | GF1_TIMER2_IRQ))
|
||||
{
|
||||
if (gus_timer_enabled)
|
||||
sound_timer_interrupt();
|
||||
gus_write8(0x45, 0); /* Ack IRQ */
|
||||
gus_timer_command(4, 0x80); /* Reset IRQ flags */
|
||||
}
|
||||
if (src & (WAVETABLE_IRQ | ENVELOPE_IRQ))
|
||||
gus_voice_irq();
|
||||
}
|
||||
return IRQ_RETVAL(handled);
|
||||
}
|
||||
|
||||
/*
|
||||
* Some extra code for the 16 bit sampling option
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_SOUND_GUS16
|
||||
|
||||
static int __init init_gus_db16(struct address_info *hw_config)
|
||||
{
|
||||
struct resource *ports;
|
||||
|
||||
ports = request_region(hw_config->io_base, 4, "ad1848");
|
||||
if (!ports)
|
||||
return 0;
|
||||
|
||||
if (!ad1848_detect(ports, NULL, hw_config->osp)) {
|
||||
release_region(hw_config->io_base, 4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
gus_pcm_volume = 100;
|
||||
gus_wave_volume = 90;
|
||||
|
||||
hw_config->slots[3] = ad1848_init("GUS 16 bit sampling", ports,
|
||||
hw_config->irq,
|
||||
hw_config->dma,
|
||||
hw_config->dma, 0,
|
||||
hw_config->osp,
|
||||
THIS_MODULE);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void __exit unload_gus_db16(struct address_info *hw_config)
|
||||
{
|
||||
|
||||
ad1848_unload(hw_config->io_base,
|
||||
hw_config->irq,
|
||||
hw_config->dma,
|
||||
hw_config->dma, 0);
|
||||
sound_unload_audiodev(hw_config->slots[3]);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_SOUND_GUS16
|
||||
static int gus16;
|
||||
#endif
|
||||
#ifdef CONFIG_SOUND_GUSMAX
|
||||
static int no_wave_dma; /* Set if no dma is to be used for the
|
||||
wave table (GF1 chip) */
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Note DMA2 of -1 has the right meaning in the GUS driver as well
|
||||
* as here.
|
||||
*/
|
||||
|
||||
static struct address_info cfg;
|
||||
|
||||
static int __initdata io = -1;
|
||||
static int __initdata irq = -1;
|
||||
static int __initdata dma = -1;
|
||||
static int __initdata dma16 = -1; /* Set this for modules that need it */
|
||||
static int __initdata type = 0; /* 1 for PnP */
|
||||
|
||||
module_param(io, int, 0);
|
||||
module_param(irq, int, 0);
|
||||
module_param(dma, int, 0);
|
||||
module_param(dma16, int, 0);
|
||||
module_param(type, int, 0);
|
||||
#ifdef CONFIG_SOUND_GUSMAX
|
||||
module_param(no_wave_dma, int, 0);
|
||||
#endif
|
||||
#ifdef CONFIG_SOUND_GUS16
|
||||
module_param(db16, int, 0);
|
||||
module_param(gus16, int, 0);
|
||||
#endif
|
||||
MODULE_LICENSE("GPL");
|
||||
|
||||
static int __init init_gus(void)
|
||||
{
|
||||
printk(KERN_INFO "Gravis Ultrasound audio driver Copyright (C) by Hannu Savolainen 1993-1996\n");
|
||||
|
||||
cfg.io_base = io;
|
||||
cfg.irq = irq;
|
||||
cfg.dma = dma;
|
||||
cfg.dma2 = dma16;
|
||||
cfg.card_subtype = type;
|
||||
#ifdef CONFIG_SOUND_GUSMAX
|
||||
gus_no_wave_dma = no_wave_dma;
|
||||
#endif
|
||||
|
||||
if (cfg.io_base == -1 || cfg.dma == -1 || cfg.irq == -1) {
|
||||
printk(KERN_ERR "I/O, IRQ, and DMA are mandatory\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SOUND_GUS16
|
||||
if (gus16 && init_gus_db16(&cfg))
|
||||
db16 = 1;
|
||||
#endif
|
||||
if (!probe_gus(&cfg))
|
||||
return -ENODEV;
|
||||
attach_gus(&cfg);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit cleanup_gus(void)
|
||||
{
|
||||
#ifdef CONFIG_SOUND_GUS16
|
||||
if (db16)
|
||||
unload_gus_db16(&cfg);
|
||||
#endif
|
||||
unload_gus(&cfg);
|
||||
}
|
||||
|
||||
module_init(init_gus);
|
||||
module_exit(cleanup_gus);
|
||||
|
||||
#ifndef MODULE
|
||||
static int __init setup_gus(char *str)
|
||||
{
|
||||
/* io, irq, dma, dma2 */
|
||||
int ints[5];
|
||||
|
||||
str = get_options(str, ARRAY_SIZE(ints), ints);
|
||||
|
||||
io = ints[1];
|
||||
irq = ints[2];
|
||||
dma = ints[3];
|
||||
dma16 = ints[4];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("gus=", setup_gus);
|
||||
#endif
|
|
@ -1,50 +0,0 @@
|
|||
|
||||
/*
|
||||
* I/O addresses
|
||||
*/
|
||||
|
||||
#define u_Base (gus_base + 0x000)
|
||||
#define u_Mixer u_Base
|
||||
#define u_Status (gus_base + 0x006)
|
||||
#define u_TimerControl (gus_base + 0x008)
|
||||
#define u_TimerData (gus_base + 0x009)
|
||||
#define u_IRQDMAControl (gus_base + 0x00b)
|
||||
#define u_MidiControl (gus_base + 0x100)
|
||||
#define MIDI_RESET 0x03
|
||||
#define MIDI_ENABLE_XMIT 0x20
|
||||
#define MIDI_ENABLE_RCV 0x80
|
||||
#define u_MidiStatus u_MidiControl
|
||||
#define MIDI_RCV_FULL 0x01
|
||||
#define MIDI_XMIT_EMPTY 0x02
|
||||
#define MIDI_FRAME_ERR 0x10
|
||||
#define MIDI_OVERRUN 0x20
|
||||
#define MIDI_IRQ_PEND 0x80
|
||||
#define u_MidiData (gus_base + 0x101)
|
||||
#define u_Voice (gus_base + 0x102)
|
||||
#define u_Command (gus_base + 0x103)
|
||||
#define u_DataLo (gus_base + 0x104)
|
||||
#define u_DataHi (gus_base + 0x105)
|
||||
#define u_MixData (gus_base + 0x106) /* Rev. 3.7+ mixing */
|
||||
#define u_MixSelect (gus_base + 0x506) /* registers. */
|
||||
#define u_IrqStatus u_Status
|
||||
# define MIDI_TX_IRQ 0x01 /* pending MIDI xmit IRQ */
|
||||
# define MIDI_RX_IRQ 0x02 /* pending MIDI recv IRQ */
|
||||
# define GF1_TIMER1_IRQ 0x04 /* general purpose timer */
|
||||
# define GF1_TIMER2_IRQ 0x08 /* general purpose timer */
|
||||
# define WAVETABLE_IRQ 0x20 /* pending wavetable IRQ */
|
||||
# define ENVELOPE_IRQ 0x40 /* pending volume envelope IRQ */
|
||||
# define DMA_TC_IRQ 0x80 /* pending dma tc IRQ */
|
||||
|
||||
#define ICS2101 1
|
||||
# define ICS_MIXDEVS 6
|
||||
# define DEV_MIC 0
|
||||
# define DEV_LINE 1
|
||||
# define DEV_CD 2
|
||||
# define DEV_GF1 3
|
||||
# define DEV_UNUSED 4
|
||||
# define DEV_VOL 5
|
||||
|
||||
# define CHN_LEFT 0
|
||||
# define CHN_RIGHT 1
|
||||
#define CS4231 2
|
||||
#define u_DRAMIO (gus_base + 0x107)
|
|
@ -1,18 +0,0 @@
|
|||
static unsigned short gus_linearvol[128] = {
|
||||
0x0000, 0x08ff, 0x09ff, 0x0a80, 0x0aff, 0x0b40, 0x0b80, 0x0bc0,
|
||||
0x0bff, 0x0c20, 0x0c40, 0x0c60, 0x0c80, 0x0ca0, 0x0cc0, 0x0ce0,
|
||||
0x0cff, 0x0d10, 0x0d20, 0x0d30, 0x0d40, 0x0d50, 0x0d60, 0x0d70,
|
||||
0x0d80, 0x0d90, 0x0da0, 0x0db0, 0x0dc0, 0x0dd0, 0x0de0, 0x0df0,
|
||||
0x0dff, 0x0e08, 0x0e10, 0x0e18, 0x0e20, 0x0e28, 0x0e30, 0x0e38,
|
||||
0x0e40, 0x0e48, 0x0e50, 0x0e58, 0x0e60, 0x0e68, 0x0e70, 0x0e78,
|
||||
0x0e80, 0x0e88, 0x0e90, 0x0e98, 0x0ea0, 0x0ea8, 0x0eb0, 0x0eb8,
|
||||
0x0ec0, 0x0ec8, 0x0ed0, 0x0ed8, 0x0ee0, 0x0ee8, 0x0ef0, 0x0ef8,
|
||||
0x0eff, 0x0f04, 0x0f08, 0x0f0c, 0x0f10, 0x0f14, 0x0f18, 0x0f1c,
|
||||
0x0f20, 0x0f24, 0x0f28, 0x0f2c, 0x0f30, 0x0f34, 0x0f38, 0x0f3c,
|
||||
0x0f40, 0x0f44, 0x0f48, 0x0f4c, 0x0f50, 0x0f54, 0x0f58, 0x0f5c,
|
||||
0x0f60, 0x0f64, 0x0f68, 0x0f6c, 0x0f70, 0x0f74, 0x0f78, 0x0f7c,
|
||||
0x0f80, 0x0f84, 0x0f88, 0x0f8c, 0x0f90, 0x0f94, 0x0f98, 0x0f9c,
|
||||
0x0fa0, 0x0fa4, 0x0fa8, 0x0fac, 0x0fb0, 0x0fb4, 0x0fb8, 0x0fbc,
|
||||
0x0fc0, 0x0fc4, 0x0fc8, 0x0fcc, 0x0fd0, 0x0fd4, 0x0fd8, 0x0fdc,
|
||||
0x0fe0, 0x0fe4, 0x0fe8, 0x0fec, 0x0ff0, 0x0ff4, 0x0ff8, 0x0ffc
|
||||
};
|
|
@ -1,256 +0,0 @@
|
|||
/*
|
||||
* sound/oss/gus_midi.c
|
||||
*
|
||||
* The low level driver for the GUS Midi Interface.
|
||||
*
|
||||
*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*
|
||||
* Changes:
|
||||
* 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
|
||||
* Added __init to gus_midi_init()
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include "sound_config.h"
|
||||
|
||||
#include "gus.h"
|
||||
#include "gus_hw.h"
|
||||
|
||||
static int midi_busy, input_opened;
|
||||
static int my_dev;
|
||||
static int output_used;
|
||||
static volatile unsigned char gus_midi_control;
|
||||
static void (*midi_input_intr) (int dev, unsigned char data);
|
||||
|
||||
static unsigned char tmp_queue[256];
|
||||
extern int gus_pnp_flag;
|
||||
static volatile int qlen;
|
||||
static volatile unsigned char qhead, qtail;
|
||||
extern int gus_base, gus_irq, gus_dma;
|
||||
extern int *gus_osp;
|
||||
extern spinlock_t gus_lock;
|
||||
|
||||
static int GUS_MIDI_STATUS(void)
|
||||
{
|
||||
return inb(u_MidiStatus);
|
||||
}
|
||||
|
||||
static int gus_midi_open(int dev, int mode, void (*input) (int dev, unsigned char data), void (*output) (int dev))
|
||||
{
|
||||
if (midi_busy)
|
||||
{
|
||||
/* printk("GUS: Midi busy\n");*/
|
||||
return -EBUSY;
|
||||
}
|
||||
outb((MIDI_RESET), u_MidiControl);
|
||||
gus_delay();
|
||||
|
||||
gus_midi_control = 0;
|
||||
input_opened = 0;
|
||||
|
||||
if (mode == OPEN_READ || mode == OPEN_READWRITE)
|
||||
if (!gus_pnp_flag)
|
||||
{
|
||||
gus_midi_control |= MIDI_ENABLE_RCV;
|
||||
input_opened = 1;
|
||||
}
|
||||
outb((gus_midi_control), u_MidiControl); /* Enable */
|
||||
|
||||
midi_busy = 1;
|
||||
qlen = qhead = qtail = output_used = 0;
|
||||
midi_input_intr = input;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dump_to_midi(unsigned char midi_byte)
|
||||
{
|
||||
unsigned long flags;
|
||||
int ok = 0;
|
||||
|
||||
output_used = 1;
|
||||
|
||||
spin_lock_irqsave(&gus_lock, flags);
|
||||
|
||||
if (GUS_MIDI_STATUS() & MIDI_XMIT_EMPTY)
|
||||
{
|
||||
ok = 1;
|
||||
outb((midi_byte), u_MidiData);
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
* Enable Midi xmit interrupts (again)
|
||||
*/
|
||||
gus_midi_control |= MIDI_ENABLE_XMIT;
|
||||
outb((gus_midi_control), u_MidiControl);
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&gus_lock,flags);
|
||||
return ok;
|
||||
}
|
||||
|
||||
static void gus_midi_close(int dev)
|
||||
{
|
||||
/*
|
||||
* Reset FIFO pointers, disable intrs
|
||||
*/
|
||||
|
||||
outb((MIDI_RESET), u_MidiControl);
|
||||
midi_busy = 0;
|
||||
}
|
||||
|
||||
static int gus_midi_out(int dev, unsigned char midi_byte)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
/*
|
||||
* Drain the local queue first
|
||||
*/
|
||||
spin_lock_irqsave(&gus_lock, flags);
|
||||
|
||||
while (qlen && dump_to_midi(tmp_queue[qhead]))
|
||||
{
|
||||
qlen--;
|
||||
qhead++;
|
||||
}
|
||||
spin_unlock_irqrestore(&gus_lock,flags);
|
||||
|
||||
/*
|
||||
* Output the byte if the local queue is empty.
|
||||
*/
|
||||
|
||||
if (!qlen)
|
||||
if (dump_to_midi(midi_byte))
|
||||
return 1; /*
|
||||
* OK
|
||||
*/
|
||||
|
||||
/*
|
||||
* Put to the local queue
|
||||
*/
|
||||
|
||||
if (qlen >= 256)
|
||||
return 0; /*
|
||||
* Local queue full
|
||||
*/
|
||||
spin_lock_irqsave(&gus_lock, flags);
|
||||
|
||||
tmp_queue[qtail] = midi_byte;
|
||||
qlen++;
|
||||
qtail++;
|
||||
|
||||
spin_unlock_irqrestore(&gus_lock,flags);
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int gus_midi_start_read(int dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gus_midi_end_read(int dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void gus_midi_kick(int dev)
|
||||
{
|
||||
}
|
||||
|
||||
static int gus_midi_buffer_status(int dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
if (!output_used)
|
||||
return 0;
|
||||
|
||||
spin_lock_irqsave(&gus_lock, flags);
|
||||
|
||||
if (qlen && dump_to_midi(tmp_queue[qhead]))
|
||||
{
|
||||
qlen--;
|
||||
qhead++;
|
||||
}
|
||||
spin_unlock_irqrestore(&gus_lock,flags);
|
||||
return (qlen > 0) || !(GUS_MIDI_STATUS() & MIDI_XMIT_EMPTY);
|
||||
}
|
||||
|
||||
#define MIDI_SYNTH_NAME "Gravis Ultrasound Midi"
|
||||
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
|
||||
#include "midi_synth.h"
|
||||
|
||||
static struct midi_operations gus_midi_operations =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.info = {"Gravis UltraSound Midi", 0, 0, SNDCARD_GUS},
|
||||
.converter = &std_midi_synth,
|
||||
.in_info = {0},
|
||||
.open = gus_midi_open,
|
||||
.close = gus_midi_close,
|
||||
.outputc = gus_midi_out,
|
||||
.start_read = gus_midi_start_read,
|
||||
.end_read = gus_midi_end_read,
|
||||
.kick = gus_midi_kick,
|
||||
.buffer_status = gus_midi_buffer_status,
|
||||
};
|
||||
|
||||
void __init gus_midi_init(struct address_info *hw_config)
|
||||
{
|
||||
int dev = sound_alloc_mididev();
|
||||
|
||||
if (dev == -1)
|
||||
{
|
||||
printk(KERN_INFO "gus_midi: Too many midi devices detected\n");
|
||||
return;
|
||||
}
|
||||
outb((MIDI_RESET), u_MidiControl);
|
||||
|
||||
std_midi_synth.midi_dev = my_dev = dev;
|
||||
hw_config->slots[2] = dev;
|
||||
midi_devs[dev] = &gus_midi_operations;
|
||||
sequencer_init();
|
||||
return;
|
||||
}
|
||||
|
||||
void gus_midi_interrupt(int dummy)
|
||||
{
|
||||
volatile unsigned char stat, data;
|
||||
int timeout = 10;
|
||||
|
||||
spin_lock(&gus_lock);
|
||||
|
||||
while (timeout-- > 0 && (stat = GUS_MIDI_STATUS()) & (MIDI_RCV_FULL | MIDI_XMIT_EMPTY))
|
||||
{
|
||||
if (stat & MIDI_RCV_FULL)
|
||||
{
|
||||
data = inb(u_MidiData);
|
||||
if (input_opened)
|
||||
midi_input_intr(my_dev, data);
|
||||
}
|
||||
if (stat & MIDI_XMIT_EMPTY)
|
||||
{
|
||||
while (qlen && dump_to_midi(tmp_queue[qhead]))
|
||||
{
|
||||
qlen--;
|
||||
qhead++;
|
||||
}
|
||||
if (!qlen)
|
||||
{
|
||||
/*
|
||||
* Disable Midi output interrupts, since no data in the buffer
|
||||
*/
|
||||
gus_midi_control &= ~MIDI_ENABLE_XMIT;
|
||||
outb((gus_midi_control), u_MidiControl);
|
||||
outb((gus_midi_control), u_MidiControl);
|
||||
}
|
||||
}
|
||||
}
|
||||
spin_unlock(&gus_lock);
|
||||
}
|
|
@ -1,153 +0,0 @@
|
|||
|
||||
/*
|
||||
* gus_vol.c - Compute volume for GUS.
|
||||
*
|
||||
*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*/
|
||||
#include "sound_config.h"
|
||||
|
||||
#include "gus.h"
|
||||
#include "gus_linearvol.h"
|
||||
|
||||
#define GUS_VOLUME gus_wave_volume
|
||||
|
||||
|
||||
extern int gus_wave_volume;
|
||||
|
||||
/*
|
||||
* Calculate gus volume from note velocity, main volume, expression, and
|
||||
* intrinsic patch volume given in patch library. Expression is multiplied
|
||||
* in, so it emphasizes differences in note velocity, while main volume is
|
||||
* added in -- I don't know whether this is right, but it seems reasonable to
|
||||
* me. (In the previous stage, main volume controller messages were changed
|
||||
* to expression controller messages, if they were found to be used for
|
||||
* dynamic volume adjustments, so here, main volume can be assumed to be
|
||||
* constant throughout a song.)
|
||||
*
|
||||
* Intrinsic patch volume is added in, but if over 64 is also multiplied in, so
|
||||
* we can give a big boost to very weak voices like nylon guitar and the
|
||||
* basses. The normal value is 64. Strings are assigned lower values.
|
||||
*/
|
||||
|
||||
unsigned short gus_adagio_vol(int vel, int mainv, int xpn, int voicev)
|
||||
{
|
||||
int i, m, n, x;
|
||||
|
||||
|
||||
/*
|
||||
* A voice volume of 64 is considered neutral, so adjust the main volume if
|
||||
* something other than this neutral value was assigned in the patch
|
||||
* library.
|
||||
*/
|
||||
x = 256 + 6 * (voicev - 64);
|
||||
|
||||
/*
|
||||
* Boost expression by voice volume above neutral.
|
||||
*/
|
||||
|
||||
if (voicev > 65)
|
||||
xpn += voicev - 64;
|
||||
xpn += (voicev - 64) / 2;
|
||||
|
||||
/*
|
||||
* Combine multiplicative and level components.
|
||||
*/
|
||||
x = vel * xpn * 6 + (voicev / 4) * x;
|
||||
|
||||
#ifdef GUS_VOLUME
|
||||
/*
|
||||
* Further adjustment by installation-specific master volume control
|
||||
* (default 60).
|
||||
*/
|
||||
x = (x * GUS_VOLUME * GUS_VOLUME) / 10000;
|
||||
#endif
|
||||
|
||||
#ifdef GUS_USE_CHN_MAIN_VOLUME
|
||||
/*
|
||||
* Experimental support for the channel main volume
|
||||
*/
|
||||
|
||||
mainv = (mainv / 2) + 64; /* Scale to 64 to 127 */
|
||||
x = (x * mainv * mainv) / 16384;
|
||||
#endif
|
||||
|
||||
if (x < 2)
|
||||
return (0);
|
||||
else if (x >= 65535)
|
||||
return ((15 << 8) | 255);
|
||||
|
||||
/*
|
||||
* Convert to GUS's logarithmic form with 4 bit exponent i and 8 bit
|
||||
* mantissa m.
|
||||
*/
|
||||
|
||||
n = x;
|
||||
i = 7;
|
||||
if (n < 128)
|
||||
{
|
||||
while (i > 0 && n < (1 << i))
|
||||
i--;
|
||||
}
|
||||
else
|
||||
{
|
||||
while (n > 255)
|
||||
{
|
||||
n >>= 1;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* Mantissa is part of linear volume not expressed in exponent. (This is
|
||||
* not quite like real logs -- I wonder if it's right.)
|
||||
*/
|
||||
m = x - (1 << i);
|
||||
|
||||
/*
|
||||
* Adjust mantissa to 8 bits.
|
||||
*/
|
||||
if (m > 0)
|
||||
{
|
||||
if (i > 8)
|
||||
m >>= i - 8;
|
||||
else if (i < 8)
|
||||
m <<= 8 - i;
|
||||
}
|
||||
return ((i << 8) + m);
|
||||
}
|
||||
|
||||
/*
|
||||
* Volume-values are interpreted as linear values. Volume is based on the
|
||||
* value supplied with SEQ_START_NOTE(), channel main volume (if compiled in)
|
||||
* and the volume set by the mixer-device (default 60%).
|
||||
*/
|
||||
|
||||
unsigned short gus_linear_vol(int vol, int mainvol)
|
||||
{
|
||||
int mixer_mainvol;
|
||||
|
||||
if (vol <= 0)
|
||||
vol = 0;
|
||||
else if (vol >= 127)
|
||||
vol = 127;
|
||||
|
||||
#ifdef GUS_VOLUME
|
||||
mixer_mainvol = GUS_VOLUME;
|
||||
#else
|
||||
mixer_mainvol = 100;
|
||||
#endif
|
||||
|
||||
#ifdef GUS_USE_CHN_MAIN_VOLUME
|
||||
if (mainvol <= 0)
|
||||
mainvol = 0;
|
||||
else if (mainvol >= 127)
|
||||
mainvol = 127;
|
||||
#else
|
||||
mainvol = 127;
|
||||
#endif
|
||||
return gus_linearvol[(((vol * mainvol) / 127) * mixer_mainvol) / 100];
|
||||
}
|
3464
sound/oss/gus_wave.c
3464
sound/oss/gus_wave.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
1330
sound/oss/harmony.c
1330
sound/oss/harmony.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,247 +0,0 @@
|
|||
/*
|
||||
* sound/oss/ics2101.c
|
||||
*
|
||||
* Driver for the ICS2101 mixer of GUS v3.7.
|
||||
*
|
||||
*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*
|
||||
*
|
||||
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
|
||||
* Bartlomiej Zolnierkiewicz : added __init to ics2101_mixer_init()
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include "sound_config.h"
|
||||
|
||||
#include <linux/ultrasound.h>
|
||||
|
||||
#include "gus.h"
|
||||
#include "gus_hw.h"
|
||||
|
||||
#define MIX_DEVS (SOUND_MASK_MIC|SOUND_MASK_LINE| \
|
||||
SOUND_MASK_SYNTH| \
|
||||
SOUND_MASK_CD | SOUND_MASK_VOLUME)
|
||||
|
||||
extern int *gus_osp;
|
||||
extern int gus_base;
|
||||
extern spinlock_t gus_lock;
|
||||
static int volumes[ICS_MIXDEVS];
|
||||
static int left_fix[ICS_MIXDEVS] =
|
||||
{1, 1, 1, 2, 1, 2};
|
||||
static int right_fix[ICS_MIXDEVS] =
|
||||
{2, 2, 2, 1, 2, 1};
|
||||
|
||||
static int scale_vol(int vol)
|
||||
{
|
||||
/*
|
||||
* Experimental volume scaling by Risto Kankkunen.
|
||||
* This should give smoother volume response than just
|
||||
* a plain multiplication.
|
||||
*/
|
||||
|
||||
int e;
|
||||
|
||||
if (vol < 0)
|
||||
vol = 0;
|
||||
if (vol > 100)
|
||||
vol = 100;
|
||||
vol = (31 * vol + 50) / 100;
|
||||
e = 0;
|
||||
if (vol)
|
||||
{
|
||||
while (vol < 16)
|
||||
{
|
||||
vol <<= 1;
|
||||
e--;
|
||||
}
|
||||
vol -= 16;
|
||||
e += 7;
|
||||
}
|
||||
return ((e << 4) + vol);
|
||||
}
|
||||
|
||||
static void write_mix(int dev, int chn, int vol)
|
||||
{
|
||||
int *selector;
|
||||
unsigned long flags;
|
||||
int ctrl_addr = dev << 3;
|
||||
int attn_addr = dev << 3;
|
||||
|
||||
vol = scale_vol(vol);
|
||||
|
||||
if (chn == CHN_LEFT)
|
||||
{
|
||||
selector = left_fix;
|
||||
ctrl_addr |= 0x00;
|
||||
attn_addr |= 0x02;
|
||||
}
|
||||
else
|
||||
{
|
||||
selector = right_fix;
|
||||
ctrl_addr |= 0x01;
|
||||
attn_addr |= 0x03;
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&gus_lock, flags);
|
||||
outb((ctrl_addr), u_MixSelect);
|
||||
outb((selector[dev]), u_MixData);
|
||||
outb((attn_addr), u_MixSelect);
|
||||
outb(((unsigned char) vol), u_MixData);
|
||||
spin_unlock_irqrestore(&gus_lock,flags);
|
||||
}
|
||||
|
||||
static int set_volumes(int dev, int vol)
|
||||
{
|
||||
int left = vol & 0x00ff;
|
||||
int right = (vol >> 8) & 0x00ff;
|
||||
|
||||
if (left < 0)
|
||||
left = 0;
|
||||
if (left > 100)
|
||||
left = 100;
|
||||
if (right < 0)
|
||||
right = 0;
|
||||
if (right > 100)
|
||||
right = 100;
|
||||
|
||||
write_mix(dev, CHN_LEFT, left);
|
||||
write_mix(dev, CHN_RIGHT, right);
|
||||
|
||||
vol = left + (right << 8);
|
||||
volumes[dev] = vol;
|
||||
return vol;
|
||||
}
|
||||
|
||||
static int ics2101_mixer_ioctl(int dev, unsigned int cmd, void __user *arg)
|
||||
{
|
||||
int val;
|
||||
|
||||
if (((cmd >> 8) & 0xff) == 'M') {
|
||||
if (_SIOC_DIR(cmd) & _SIOC_WRITE) {
|
||||
|
||||
if (get_user(val, (int __user *)arg))
|
||||
return -EFAULT;
|
||||
switch (cmd & 0xff) {
|
||||
case SOUND_MIXER_RECSRC:
|
||||
return gus_default_mixer_ioctl(dev, cmd, arg);
|
||||
|
||||
case SOUND_MIXER_MIC:
|
||||
val = set_volumes(DEV_MIC, val);
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_CD:
|
||||
val = set_volumes(DEV_CD, val);
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_LINE:
|
||||
val = set_volumes(DEV_LINE, val);
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_SYNTH:
|
||||
val = set_volumes(DEV_GF1, val);
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_VOLUME:
|
||||
val = set_volumes(DEV_VOL, val);
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
return put_user(val, (int __user *)arg);
|
||||
} else {
|
||||
switch (cmd & 0xff) {
|
||||
/*
|
||||
* Return parameters
|
||||
*/
|
||||
case SOUND_MIXER_RECSRC:
|
||||
return gus_default_mixer_ioctl(dev, cmd, arg);
|
||||
|
||||
case SOUND_MIXER_DEVMASK:
|
||||
val = MIX_DEVS;
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_STEREODEVS:
|
||||
val = SOUND_MASK_LINE | SOUND_MASK_CD | SOUND_MASK_SYNTH | SOUND_MASK_VOLUME | SOUND_MASK_MIC;
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_RECMASK:
|
||||
val = SOUND_MASK_MIC | SOUND_MASK_LINE;
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_CAPS:
|
||||
val = 0;
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_MIC:
|
||||
val = volumes[DEV_MIC];
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_LINE:
|
||||
val = volumes[DEV_LINE];
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_CD:
|
||||
val = volumes[DEV_CD];
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_VOLUME:
|
||||
val = volumes[DEV_VOL];
|
||||
break;
|
||||
|
||||
case SOUND_MIXER_SYNTH:
|
||||
val = volumes[DEV_GF1];
|
||||
break;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
return put_user(val, (int __user *)arg);
|
||||
}
|
||||
}
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static struct mixer_operations ics2101_mixer_operations =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.id = "ICS2101",
|
||||
.name = "ICS2101 Multimedia Mixer",
|
||||
.ioctl = ics2101_mixer_ioctl
|
||||
};
|
||||
|
||||
int __init ics2101_mixer_init(void)
|
||||
{
|
||||
int i;
|
||||
int n;
|
||||
|
||||
if ((n = sound_alloc_mixerdev()) != -1)
|
||||
{
|
||||
mixer_devs[n] = &ics2101_mixer_operations;
|
||||
|
||||
/*
|
||||
* Some GUS v3.7 cards had some channels flipped. Disable
|
||||
* the flipping feature if the model id is other than 5.
|
||||
*/
|
||||
|
||||
if (inb(u_MixSelect) != 5)
|
||||
{
|
||||
for (i = 0; i < ICS_MIXDEVS; i++)
|
||||
left_fix[i] = 1;
|
||||
for (i = 0; i < ICS_MIXDEVS; i++)
|
||||
right_fix[i] = 2;
|
||||
}
|
||||
set_volumes(DEV_GF1, 0x5a5a);
|
||||
set_volumes(DEV_CD, 0x5a5a);
|
||||
set_volumes(DEV_MIC, 0x0000);
|
||||
set_volumes(DEV_LINE, 0x5a5a);
|
||||
set_volumes(DEV_VOL, 0x5a5a);
|
||||
set_volumes(DEV_UNUSED, 0x0000);
|
||||
}
|
||||
return n;
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* sound/oss/iwmem.h
|
||||
*
|
||||
* DRAM size encoding table for AMD Interwave chip.
|
||||
*/
|
||||
/*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*
|
||||
* Changes:
|
||||
* Bartlomiej Zolnierkiewicz : added __initdata to mem_decode
|
||||
*/
|
||||
|
||||
|
||||
#define K 1024
|
||||
#define M (1024*K)
|
||||
static int mem_decode[][4] __initdata =
|
||||
{
|
||||
/* Bank0 Bank1 Bank2 Bank3 Encoding bits */
|
||||
{256*K, 0, 0, 0}, /* 0 */
|
||||
{256*K, 256*K, 0, 0}, /* 1 */
|
||||
{256*K, 256*K, 256*K, 256*K}, /* 2 */
|
||||
{256*K, 1*M, 0, 0}, /* 3 */
|
||||
{256*K, 1*M, 1*M, 1*M}, /* 4 */
|
||||
{256*K, 256*K, 1*M, 0}, /* 5 */
|
||||
{256*K, 256*K, 1*M, 1*M}, /* 6 */
|
||||
{1*M, 0, 0, 0}, /* 7 */
|
||||
{1*M, 1*M, 0, 0}, /* 8 */
|
||||
{1*M, 1*M, 1*M, 1*M}, /* 9 */
|
||||
{4*M, 0, 0, 0}, /* 10 */
|
||||
{4*M, 4*M, 0, 0}, /* 11 */
|
||||
{4*M, 4*M, 4*M, 4*M} /* 12 */
|
||||
};
|
1113
sound/oss/mad16.c
1113
sound/oss/mad16.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
3686
sound/oss/maestro.c
3686
sound/oss/maestro.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,60 +0,0 @@
|
|||
/*
|
||||
* Registers for the ESS PCI cards
|
||||
*/
|
||||
|
||||
/*
|
||||
* Memory access
|
||||
*/
|
||||
|
||||
#define ESS_MEM_DATA 0x00
|
||||
#define ESS_MEM_INDEX 0x02
|
||||
|
||||
/*
|
||||
* AC-97 Codec port. Delay 1uS after each write. This is used to
|
||||
* talk AC-97 (see intel.com). Write data then register.
|
||||
*/
|
||||
|
||||
#define ESS_AC97_INDEX 0x30 /* byte wide */
|
||||
#define ESS_AC97_DATA 0x32
|
||||
|
||||
/*
|
||||
* Reading is a bit different. You write register|0x80 to ubdex
|
||||
* delay 1uS poll the low bit of index, when it clears read the
|
||||
* data value.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Control port. Not yet fully understood
|
||||
* The value 0xC090 gets loaded to it then 0x0000 and 0x2800
|
||||
* to the data port. Then after 4uS the value 0x300 is written
|
||||
*/
|
||||
|
||||
#define RING_BUS_CTRL_L 0x34
|
||||
#define RING_BUS_CTRL_H 0x36
|
||||
|
||||
/*
|
||||
* This is also used during setup. The value 0x17 is written to it
|
||||
*/
|
||||
|
||||
#define ESS_SETUP_18 0x18
|
||||
|
||||
/*
|
||||
* And this one gets 0x000b
|
||||
*/
|
||||
|
||||
#define ESS_SETUP_A2 0xA2
|
||||
|
||||
/*
|
||||
* And this 0x0000
|
||||
*/
|
||||
|
||||
#define ESS_SETUP_A4 0xA4
|
||||
#define ESS_SETUP_A6 0xA6
|
||||
|
||||
/*
|
||||
* Stuff to do with Harpo - the wave stuff
|
||||
*/
|
||||
|
||||
#define ESS_WAVETABLE_SIZE 0x14
|
||||
#define ESS_WAVETABLE_2M 0xA180
|
||||
|
2969
sound/oss/maestro3.c
2969
sound/oss/maestro3.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,821 +0,0 @@
|
|||
/*
|
||||
* ESS Technology allegro audio driver.
|
||||
*
|
||||
* Copyright (C) 1992-2000 Don Kim (don.kim@esstech.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.
|
||||
*
|
||||
* Hacked for the maestro3 driver by zab
|
||||
*/
|
||||
|
||||
// Allegro PCI configuration registers
|
||||
#define PCI_LEGACY_AUDIO_CTRL 0x40
|
||||
#define SOUND_BLASTER_ENABLE 0x00000001
|
||||
#define FM_SYNTHESIS_ENABLE 0x00000002
|
||||
#define GAME_PORT_ENABLE 0x00000004
|
||||
#define MPU401_IO_ENABLE 0x00000008
|
||||
#define MPU401_IRQ_ENABLE 0x00000010
|
||||
#define ALIAS_10BIT_IO 0x00000020
|
||||
#define SB_DMA_MASK 0x000000C0
|
||||
#define SB_DMA_0 0x00000040
|
||||
#define SB_DMA_1 0x00000040
|
||||
#define SB_DMA_R 0x00000080
|
||||
#define SB_DMA_3 0x000000C0
|
||||
#define SB_IRQ_MASK 0x00000700
|
||||
#define SB_IRQ_5 0x00000000
|
||||
#define SB_IRQ_7 0x00000100
|
||||
#define SB_IRQ_9 0x00000200
|
||||
#define SB_IRQ_10 0x00000300
|
||||
#define MIDI_IRQ_MASK 0x00003800
|
||||
#define SERIAL_IRQ_ENABLE 0x00004000
|
||||
#define DISABLE_LEGACY 0x00008000
|
||||
|
||||
#define PCI_ALLEGRO_CONFIG 0x50
|
||||
#define SB_ADDR_240 0x00000004
|
||||
#define MPU_ADDR_MASK 0x00000018
|
||||
#define MPU_ADDR_330 0x00000000
|
||||
#define MPU_ADDR_300 0x00000008
|
||||
#define MPU_ADDR_320 0x00000010
|
||||
#define MPU_ADDR_340 0x00000018
|
||||
#define USE_PCI_TIMING 0x00000040
|
||||
#define POSTED_WRITE_ENABLE 0x00000080
|
||||
#define DMA_POLICY_MASK 0x00000700
|
||||
#define DMA_DDMA 0x00000000
|
||||
#define DMA_TDMA 0x00000100
|
||||
#define DMA_PCPCI 0x00000200
|
||||
#define DMA_WBDMA16 0x00000400
|
||||
#define DMA_WBDMA4 0x00000500
|
||||
#define DMA_WBDMA2 0x00000600
|
||||
#define DMA_WBDMA1 0x00000700
|
||||
#define DMA_SAFE_GUARD 0x00000800
|
||||
#define HI_PERF_GP_ENABLE 0x00001000
|
||||
#define PIC_SNOOP_MODE_0 0x00002000
|
||||
#define PIC_SNOOP_MODE_1 0x00004000
|
||||
#define SOUNDBLASTER_IRQ_MASK 0x00008000
|
||||
#define RING_IN_ENABLE 0x00010000
|
||||
#define SPDIF_TEST_MODE 0x00020000
|
||||
#define CLK_MULT_MODE_SELECT_2 0x00040000
|
||||
#define EEPROM_WRITE_ENABLE 0x00080000
|
||||
#define CODEC_DIR_IN 0x00100000
|
||||
#define HV_BUTTON_FROM_GD 0x00200000
|
||||
#define REDUCED_DEBOUNCE 0x00400000
|
||||
#define HV_CTRL_ENABLE 0x00800000
|
||||
#define SPDIF_ENABLE 0x01000000
|
||||
#define CLK_DIV_SELECT 0x06000000
|
||||
#define CLK_DIV_BY_48 0x00000000
|
||||
#define CLK_DIV_BY_49 0x02000000
|
||||
#define CLK_DIV_BY_50 0x04000000
|
||||
#define CLK_DIV_RESERVED 0x06000000
|
||||
#define PM_CTRL_ENABLE 0x08000000
|
||||
#define CLK_MULT_MODE_SELECT 0x30000000
|
||||
#define CLK_MULT_MODE_SHIFT 28
|
||||
#define CLK_MULT_MODE_0 0x00000000
|
||||
#define CLK_MULT_MODE_1 0x10000000
|
||||
#define CLK_MULT_MODE_2 0x20000000
|
||||
#define CLK_MULT_MODE_3 0x30000000
|
||||
#define INT_CLK_SELECT 0x40000000
|
||||
#define INT_CLK_MULT_RESET 0x80000000
|
||||
|
||||
// M3
|
||||
#define INT_CLK_SRC_NOT_PCI 0x00100000
|
||||
#define INT_CLK_MULT_ENABLE 0x80000000
|
||||
|
||||
#define PCI_ACPI_CONTROL 0x54
|
||||
#define PCI_ACPI_D0 0x00000000
|
||||
#define PCI_ACPI_D1 0xB4F70000
|
||||
#define PCI_ACPI_D2 0xB4F7B4F7
|
||||
|
||||
#define PCI_USER_CONFIG 0x58
|
||||
#define EXT_PCI_MASTER_ENABLE 0x00000001
|
||||
#define SPDIF_OUT_SELECT 0x00000002
|
||||
#define TEST_PIN_DIR_CTRL 0x00000004
|
||||
#define AC97_CODEC_TEST 0x00000020
|
||||
#define TRI_STATE_BUFFER 0x00000080
|
||||
#define IN_CLK_12MHZ_SELECT 0x00000100
|
||||
#define MULTI_FUNC_DISABLE 0x00000200
|
||||
#define EXT_MASTER_PAIR_SEL 0x00000400
|
||||
#define PCI_MASTER_SUPPORT 0x00000800
|
||||
#define STOP_CLOCK_ENABLE 0x00001000
|
||||
#define EAPD_DRIVE_ENABLE 0x00002000
|
||||
#define REQ_TRI_STATE_ENABLE 0x00004000
|
||||
#define REQ_LOW_ENABLE 0x00008000
|
||||
#define MIDI_1_ENABLE 0x00010000
|
||||
#define MIDI_2_ENABLE 0x00020000
|
||||
#define SB_AUDIO_SYNC 0x00040000
|
||||
#define HV_CTRL_TEST 0x00100000
|
||||
#define SOUNDBLASTER_TEST 0x00400000
|
||||
|
||||
#define PCI_USER_CONFIG_C 0x5C
|
||||
|
||||
#define PCI_DDMA_CTRL 0x60
|
||||
#define DDMA_ENABLE 0x00000001
|
||||
|
||||
|
||||
// Allegro registers
|
||||
#define HOST_INT_CTRL 0x18
|
||||
#define SB_INT_ENABLE 0x0001
|
||||
#define MPU401_INT_ENABLE 0x0002
|
||||
#define ASSP_INT_ENABLE 0x0010
|
||||
#define RING_INT_ENABLE 0x0020
|
||||
#define HV_INT_ENABLE 0x0040
|
||||
#define CLKRUN_GEN_ENABLE 0x0100
|
||||
#define HV_CTRL_TO_PME 0x0400
|
||||
#define SOFTWARE_RESET_ENABLE 0x8000
|
||||
|
||||
/*
|
||||
* should be using the above defines, probably.
|
||||
*/
|
||||
#define REGB_ENABLE_RESET 0x01
|
||||
#define REGB_STOP_CLOCK 0x10
|
||||
|
||||
#define HOST_INT_STATUS 0x1A
|
||||
#define SB_INT_PENDING 0x01
|
||||
#define MPU401_INT_PENDING 0x02
|
||||
#define ASSP_INT_PENDING 0x10
|
||||
#define RING_INT_PENDING 0x20
|
||||
#define HV_INT_PENDING 0x40
|
||||
|
||||
#define HARDWARE_VOL_CTRL 0x1B
|
||||
#define SHADOW_MIX_REG_VOICE 0x1C
|
||||
#define HW_VOL_COUNTER_VOICE 0x1D
|
||||
#define SHADOW_MIX_REG_MASTER 0x1E
|
||||
#define HW_VOL_COUNTER_MASTER 0x1F
|
||||
|
||||
#define CODEC_COMMAND 0x30
|
||||
#define CODEC_READ_B 0x80
|
||||
|
||||
#define CODEC_STATUS 0x30
|
||||
#define CODEC_BUSY_B 0x01
|
||||
|
||||
#define CODEC_DATA 0x32
|
||||
|
||||
#define RING_BUS_CTRL_A 0x36
|
||||
#define RAC_PME_ENABLE 0x0100
|
||||
#define RAC_SDFS_ENABLE 0x0200
|
||||
#define LAC_PME_ENABLE 0x0400
|
||||
#define LAC_SDFS_ENABLE 0x0800
|
||||
#define SERIAL_AC_LINK_ENABLE 0x1000
|
||||
#define IO_SRAM_ENABLE 0x2000
|
||||
#define IIS_INPUT_ENABLE 0x8000
|
||||
|
||||
#define RING_BUS_CTRL_B 0x38
|
||||
#define SECOND_CODEC_ID_MASK 0x0003
|
||||
#define SPDIF_FUNC_ENABLE 0x0010
|
||||
#define SECOND_AC_ENABLE 0x0020
|
||||
#define SB_MODULE_INTF_ENABLE 0x0040
|
||||
#define SSPE_ENABLE 0x0040
|
||||
#define M3I_DOCK_ENABLE 0x0080
|
||||
|
||||
#define SDO_OUT_DEST_CTRL 0x3A
|
||||
#define COMMAND_ADDR_OUT 0x0003
|
||||
#define PCM_LR_OUT_LOCAL 0x0000
|
||||
#define PCM_LR_OUT_REMOTE 0x0004
|
||||
#define PCM_LR_OUT_MUTE 0x0008
|
||||
#define PCM_LR_OUT_BOTH 0x000C
|
||||
#define LINE1_DAC_OUT_LOCAL 0x0000
|
||||
#define LINE1_DAC_OUT_REMOTE 0x0010
|
||||
#define LINE1_DAC_OUT_MUTE 0x0020
|
||||
#define LINE1_DAC_OUT_BOTH 0x0030
|
||||
#define PCM_CLS_OUT_LOCAL 0x0000
|
||||
#define PCM_CLS_OUT_REMOTE 0x0040
|
||||
#define PCM_CLS_OUT_MUTE 0x0080
|
||||
#define PCM_CLS_OUT_BOTH 0x00C0
|
||||
#define PCM_RLF_OUT_LOCAL 0x0000
|
||||
#define PCM_RLF_OUT_REMOTE 0x0100
|
||||
#define PCM_RLF_OUT_MUTE 0x0200
|
||||
#define PCM_RLF_OUT_BOTH 0x0300
|
||||
#define LINE2_DAC_OUT_LOCAL 0x0000
|
||||
#define LINE2_DAC_OUT_REMOTE 0x0400
|
||||
#define LINE2_DAC_OUT_MUTE 0x0800
|
||||
#define LINE2_DAC_OUT_BOTH 0x0C00
|
||||
#define HANDSET_OUT_LOCAL 0x0000
|
||||
#define HANDSET_OUT_REMOTE 0x1000
|
||||
#define HANDSET_OUT_MUTE 0x2000
|
||||
#define HANDSET_OUT_BOTH 0x3000
|
||||
#define IO_CTRL_OUT_LOCAL 0x0000
|
||||
#define IO_CTRL_OUT_REMOTE 0x4000
|
||||
#define IO_CTRL_OUT_MUTE 0x8000
|
||||
#define IO_CTRL_OUT_BOTH 0xC000
|
||||
|
||||
#define SDO_IN_DEST_CTRL 0x3C
|
||||
#define STATUS_ADDR_IN 0x0003
|
||||
#define PCM_LR_IN_LOCAL 0x0000
|
||||
#define PCM_LR_IN_REMOTE 0x0004
|
||||
#define PCM_LR_RESERVED 0x0008
|
||||
#define PCM_LR_IN_BOTH 0x000C
|
||||
#define LINE1_ADC_IN_LOCAL 0x0000
|
||||
#define LINE1_ADC_IN_REMOTE 0x0010
|
||||
#define LINE1_ADC_IN_MUTE 0x0020
|
||||
#define MIC_ADC_IN_LOCAL 0x0000
|
||||
#define MIC_ADC_IN_REMOTE 0x0040
|
||||
#define MIC_ADC_IN_MUTE 0x0080
|
||||
#define LINE2_DAC_IN_LOCAL 0x0000
|
||||
#define LINE2_DAC_IN_REMOTE 0x0400
|
||||
#define LINE2_DAC_IN_MUTE 0x0800
|
||||
#define HANDSET_IN_LOCAL 0x0000
|
||||
#define HANDSET_IN_REMOTE 0x1000
|
||||
#define HANDSET_IN_MUTE 0x2000
|
||||
#define IO_STATUS_IN_LOCAL 0x0000
|
||||
#define IO_STATUS_IN_REMOTE 0x4000
|
||||
|
||||
#define SPDIF_IN_CTRL 0x3E
|
||||
#define SPDIF_IN_ENABLE 0x0001
|
||||
|
||||
#define GPIO_DATA 0x60
|
||||
#define GPIO_DATA_MASK 0x0FFF
|
||||
#define GPIO_HV_STATUS 0x3000
|
||||
#define GPIO_PME_STATUS 0x4000
|
||||
|
||||
#define GPIO_MASK 0x64
|
||||
#define GPIO_DIRECTION 0x68
|
||||
#define GPO_PRIMARY_AC97 0x0001
|
||||
#define GPI_LINEOUT_SENSE 0x0004
|
||||
#define GPO_SECONDARY_AC97 0x0008
|
||||
#define GPI_VOL_DOWN 0x0010
|
||||
#define GPI_VOL_UP 0x0020
|
||||
#define GPI_IIS_CLK 0x0040
|
||||
#define GPI_IIS_LRCLK 0x0080
|
||||
#define GPI_IIS_DATA 0x0100
|
||||
#define GPI_DOCKING_STATUS 0x0100
|
||||
#define GPI_HEADPHONE_SENSE 0x0200
|
||||
#define GPO_EXT_AMP_SHUTDOWN 0x1000
|
||||
|
||||
// M3
|
||||
#define GPO_M3_EXT_AMP_SHUTDN 0x0002
|
||||
|
||||
#define ASSP_INDEX_PORT 0x80
|
||||
#define ASSP_MEMORY_PORT 0x82
|
||||
#define ASSP_DATA_PORT 0x84
|
||||
|
||||
#define MPU401_DATA_PORT 0x98
|
||||
#define MPU401_STATUS_PORT 0x99
|
||||
|
||||
#define CLK_MULT_DATA_PORT 0x9C
|
||||
|
||||
#define ASSP_CONTROL_A 0xA2
|
||||
#define ASSP_0_WS_ENABLE 0x01
|
||||
#define ASSP_CTRL_A_RESERVED1 0x02
|
||||
#define ASSP_CTRL_A_RESERVED2 0x04
|
||||
#define ASSP_CLK_49MHZ_SELECT 0x08
|
||||
#define FAST_PLU_ENABLE 0x10
|
||||
#define ASSP_CTRL_A_RESERVED3 0x20
|
||||
#define DSP_CLK_36MHZ_SELECT 0x40
|
||||
|
||||
#define ASSP_CONTROL_B 0xA4
|
||||
#define RESET_ASSP 0x00
|
||||
#define RUN_ASSP 0x01
|
||||
#define ENABLE_ASSP_CLOCK 0x00
|
||||
#define STOP_ASSP_CLOCK 0x10
|
||||
#define RESET_TOGGLE 0x40
|
||||
|
||||
#define ASSP_CONTROL_C 0xA6
|
||||
#define ASSP_HOST_INT_ENABLE 0x01
|
||||
#define FM_ADDR_REMAP_DISABLE 0x02
|
||||
#define HOST_WRITE_PORT_ENABLE 0x08
|
||||
|
||||
#define ASSP_HOST_INT_STATUS 0xAC
|
||||
#define DSP2HOST_REQ_PIORECORD 0x01
|
||||
#define DSP2HOST_REQ_I2SRATE 0x02
|
||||
#define DSP2HOST_REQ_TIMER 0x04
|
||||
|
||||
// AC97 registers
|
||||
// XXX fix this crap up
|
||||
/*#define AC97_RESET 0x00*/
|
||||
|
||||
#define AC97_VOL_MUTE_B 0x8000
|
||||
#define AC97_VOL_M 0x1F
|
||||
#define AC97_LEFT_VOL_S 8
|
||||
|
||||
#define AC97_MASTER_VOL 0x02
|
||||
#define AC97_LINE_LEVEL_VOL 0x04
|
||||
#define AC97_MASTER_MONO_VOL 0x06
|
||||
#define AC97_PC_BEEP_VOL 0x0A
|
||||
#define AC97_PC_BEEP_VOL_M 0x0F
|
||||
#define AC97_SROUND_MASTER_VOL 0x38
|
||||
#define AC97_PC_BEEP_VOL_S 1
|
||||
|
||||
/*#define AC97_PHONE_VOL 0x0C
|
||||
#define AC97_MIC_VOL 0x0E*/
|
||||
#define AC97_MIC_20DB_ENABLE 0x40
|
||||
|
||||
/*#define AC97_LINEIN_VOL 0x10
|
||||
#define AC97_CD_VOL 0x12
|
||||
#define AC97_VIDEO_VOL 0x14
|
||||
#define AC97_AUX_VOL 0x16*/
|
||||
#define AC97_PCM_OUT_VOL 0x18
|
||||
/*#define AC97_RECORD_SELECT 0x1A*/
|
||||
#define AC97_RECORD_MIC 0x00
|
||||
#define AC97_RECORD_CD 0x01
|
||||
#define AC97_RECORD_VIDEO 0x02
|
||||
#define AC97_RECORD_AUX 0x03
|
||||
#define AC97_RECORD_MONO_MUX 0x02
|
||||
#define AC97_RECORD_DIGITAL 0x03
|
||||
#define AC97_RECORD_LINE 0x04
|
||||
#define AC97_RECORD_STEREO 0x05
|
||||
#define AC97_RECORD_MONO 0x06
|
||||
#define AC97_RECORD_PHONE 0x07
|
||||
|
||||
/*#define AC97_RECORD_GAIN 0x1C*/
|
||||
#define AC97_RECORD_VOL_M 0x0F
|
||||
|
||||
/*#define AC97_GENERAL_PURPOSE 0x20*/
|
||||
#define AC97_POWER_DOWN_CTRL 0x26
|
||||
#define AC97_ADC_READY 0x0001
|
||||
#define AC97_DAC_READY 0x0002
|
||||
#define AC97_ANALOG_READY 0x0004
|
||||
#define AC97_VREF_ON 0x0008
|
||||
#define AC97_PR0 0x0100
|
||||
#define AC97_PR1 0x0200
|
||||
#define AC97_PR2 0x0400
|
||||
#define AC97_PR3 0x0800
|
||||
#define AC97_PR4 0x1000
|
||||
|
||||
#define AC97_RESERVED1 0x28
|
||||
|
||||
#define AC97_VENDOR_TEST 0x5A
|
||||
|
||||
#define AC97_CLOCK_DELAY 0x5C
|
||||
#define AC97_LINEOUT_MUX_SEL 0x0001
|
||||
#define AC97_MONO_MUX_SEL 0x0002
|
||||
#define AC97_CLOCK_DELAY_SEL 0x1F
|
||||
#define AC97_DAC_CDS_SHIFT 6
|
||||
#define AC97_ADC_CDS_SHIFT 11
|
||||
|
||||
#define AC97_MULTI_CHANNEL_SEL 0x74
|
||||
|
||||
/*#define AC97_VENDOR_ID1 0x7C
|
||||
#define AC97_VENDOR_ID2 0x7E*/
|
||||
|
||||
/*
|
||||
* ASSP control regs
|
||||
*/
|
||||
#define DSP_PORT_TIMER_COUNT 0x06
|
||||
|
||||
#define DSP_PORT_MEMORY_INDEX 0x80
|
||||
|
||||
#define DSP_PORT_MEMORY_TYPE 0x82
|
||||
#define MEMTYPE_INTERNAL_CODE 0x0002
|
||||
#define MEMTYPE_INTERNAL_DATA 0x0003
|
||||
#define MEMTYPE_MASK 0x0003
|
||||
|
||||
#define DSP_PORT_MEMORY_DATA 0x84
|
||||
|
||||
#define DSP_PORT_CONTROL_REG_A 0xA2
|
||||
#define DSP_PORT_CONTROL_REG_B 0xA4
|
||||
#define DSP_PORT_CONTROL_REG_C 0xA6
|
||||
|
||||
#define REV_A_CODE_MEMORY_BEGIN 0x0000
|
||||
#define REV_A_CODE_MEMORY_END 0x0FFF
|
||||
#define REV_A_CODE_MEMORY_UNIT_LENGTH 0x0040
|
||||
#define REV_A_CODE_MEMORY_LENGTH (REV_A_CODE_MEMORY_END - REV_A_CODE_MEMORY_BEGIN + 1)
|
||||
|
||||
#define REV_B_CODE_MEMORY_BEGIN 0x0000
|
||||
#define REV_B_CODE_MEMORY_END 0x0BFF
|
||||
#define REV_B_CODE_MEMORY_UNIT_LENGTH 0x0040
|
||||
#define REV_B_CODE_MEMORY_LENGTH (REV_B_CODE_MEMORY_END - REV_B_CODE_MEMORY_BEGIN + 1)
|
||||
|
||||
#define REV_A_DATA_MEMORY_BEGIN 0x1000
|
||||
#define REV_A_DATA_MEMORY_END 0x2FFF
|
||||
#define REV_A_DATA_MEMORY_UNIT_LENGTH 0x0080
|
||||
#define REV_A_DATA_MEMORY_LENGTH (REV_A_DATA_MEMORY_END - REV_A_DATA_MEMORY_BEGIN + 1)
|
||||
|
||||
#define REV_B_DATA_MEMORY_BEGIN 0x1000
|
||||
#define REV_B_DATA_MEMORY_END 0x2BFF
|
||||
#define REV_B_DATA_MEMORY_UNIT_LENGTH 0x0080
|
||||
#define REV_B_DATA_MEMORY_LENGTH (REV_B_DATA_MEMORY_END - REV_B_DATA_MEMORY_BEGIN + 1)
|
||||
|
||||
|
||||
#define NUM_UNITS_KERNEL_CODE 16
|
||||
#define NUM_UNITS_KERNEL_DATA 2
|
||||
|
||||
#define NUM_UNITS_KERNEL_CODE_WITH_HSP 16
|
||||
#define NUM_UNITS_KERNEL_DATA_WITH_HSP 5
|
||||
|
||||
/*
|
||||
* Kernel data layout
|
||||
*/
|
||||
|
||||
#define DP_SHIFT_COUNT 7
|
||||
|
||||
#define KDATA_BASE_ADDR 0x1000
|
||||
#define KDATA_BASE_ADDR2 0x1080
|
||||
|
||||
#define KDATA_TASK0 (KDATA_BASE_ADDR + 0x0000)
|
||||
#define KDATA_TASK1 (KDATA_BASE_ADDR + 0x0001)
|
||||
#define KDATA_TASK2 (KDATA_BASE_ADDR + 0x0002)
|
||||
#define KDATA_TASK3 (KDATA_BASE_ADDR + 0x0003)
|
||||
#define KDATA_TASK4 (KDATA_BASE_ADDR + 0x0004)
|
||||
#define KDATA_TASK5 (KDATA_BASE_ADDR + 0x0005)
|
||||
#define KDATA_TASK6 (KDATA_BASE_ADDR + 0x0006)
|
||||
#define KDATA_TASK7 (KDATA_BASE_ADDR + 0x0007)
|
||||
#define KDATA_TASK_ENDMARK (KDATA_BASE_ADDR + 0x0008)
|
||||
|
||||
#define KDATA_CURRENT_TASK (KDATA_BASE_ADDR + 0x0009)
|
||||
#define KDATA_TASK_SWITCH (KDATA_BASE_ADDR + 0x000A)
|
||||
|
||||
#define KDATA_INSTANCE0_POS3D (KDATA_BASE_ADDR + 0x000B)
|
||||
#define KDATA_INSTANCE1_POS3D (KDATA_BASE_ADDR + 0x000C)
|
||||
#define KDATA_INSTANCE2_POS3D (KDATA_BASE_ADDR + 0x000D)
|
||||
#define KDATA_INSTANCE3_POS3D (KDATA_BASE_ADDR + 0x000E)
|
||||
#define KDATA_INSTANCE4_POS3D (KDATA_BASE_ADDR + 0x000F)
|
||||
#define KDATA_INSTANCE5_POS3D (KDATA_BASE_ADDR + 0x0010)
|
||||
#define KDATA_INSTANCE6_POS3D (KDATA_BASE_ADDR + 0x0011)
|
||||
#define KDATA_INSTANCE7_POS3D (KDATA_BASE_ADDR + 0x0012)
|
||||
#define KDATA_INSTANCE8_POS3D (KDATA_BASE_ADDR + 0x0013)
|
||||
#define KDATA_INSTANCE_POS3D_ENDMARK (KDATA_BASE_ADDR + 0x0014)
|
||||
|
||||
#define KDATA_INSTANCE0_SPKVIRT (KDATA_BASE_ADDR + 0x0015)
|
||||
#define KDATA_INSTANCE_SPKVIRT_ENDMARK (KDATA_BASE_ADDR + 0x0016)
|
||||
|
||||
#define KDATA_INSTANCE0_SPDIF (KDATA_BASE_ADDR + 0x0017)
|
||||
#define KDATA_INSTANCE_SPDIF_ENDMARK (KDATA_BASE_ADDR + 0x0018)
|
||||
|
||||
#define KDATA_INSTANCE0_MODEM (KDATA_BASE_ADDR + 0x0019)
|
||||
#define KDATA_INSTANCE_MODEM_ENDMARK (KDATA_BASE_ADDR + 0x001A)
|
||||
|
||||
#define KDATA_INSTANCE0_SRC (KDATA_BASE_ADDR + 0x001B)
|
||||
#define KDATA_INSTANCE1_SRC (KDATA_BASE_ADDR + 0x001C)
|
||||
#define KDATA_INSTANCE_SRC_ENDMARK (KDATA_BASE_ADDR + 0x001D)
|
||||
|
||||
#define KDATA_INSTANCE0_MINISRC (KDATA_BASE_ADDR + 0x001E)
|
||||
#define KDATA_INSTANCE1_MINISRC (KDATA_BASE_ADDR + 0x001F)
|
||||
#define KDATA_INSTANCE2_MINISRC (KDATA_BASE_ADDR + 0x0020)
|
||||
#define KDATA_INSTANCE3_MINISRC (KDATA_BASE_ADDR + 0x0021)
|
||||
#define KDATA_INSTANCE_MINISRC_ENDMARK (KDATA_BASE_ADDR + 0x0022)
|
||||
|
||||
#define KDATA_INSTANCE0_CPYTHRU (KDATA_BASE_ADDR + 0x0023)
|
||||
#define KDATA_INSTANCE1_CPYTHRU (KDATA_BASE_ADDR + 0x0024)
|
||||
#define KDATA_INSTANCE_CPYTHRU_ENDMARK (KDATA_BASE_ADDR + 0x0025)
|
||||
|
||||
#define KDATA_CURRENT_DMA (KDATA_BASE_ADDR + 0x0026)
|
||||
#define KDATA_DMA_SWITCH (KDATA_BASE_ADDR + 0x0027)
|
||||
#define KDATA_DMA_ACTIVE (KDATA_BASE_ADDR + 0x0028)
|
||||
|
||||
#define KDATA_DMA_XFER0 (KDATA_BASE_ADDR + 0x0029)
|
||||
#define KDATA_DMA_XFER1 (KDATA_BASE_ADDR + 0x002A)
|
||||
#define KDATA_DMA_XFER2 (KDATA_BASE_ADDR + 0x002B)
|
||||
#define KDATA_DMA_XFER3 (KDATA_BASE_ADDR + 0x002C)
|
||||
#define KDATA_DMA_XFER4 (KDATA_BASE_ADDR + 0x002D)
|
||||
#define KDATA_DMA_XFER5 (KDATA_BASE_ADDR + 0x002E)
|
||||
#define KDATA_DMA_XFER6 (KDATA_BASE_ADDR + 0x002F)
|
||||
#define KDATA_DMA_XFER7 (KDATA_BASE_ADDR + 0x0030)
|
||||
#define KDATA_DMA_XFER8 (KDATA_BASE_ADDR + 0x0031)
|
||||
#define KDATA_DMA_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0032)
|
||||
|
||||
#define KDATA_I2S_SAMPLE_COUNT (KDATA_BASE_ADDR + 0x0033)
|
||||
#define KDATA_I2S_INT_METER (KDATA_BASE_ADDR + 0x0034)
|
||||
#define KDATA_I2S_ACTIVE (KDATA_BASE_ADDR + 0x0035)
|
||||
|
||||
#define KDATA_TIMER_COUNT_RELOAD (KDATA_BASE_ADDR + 0x0036)
|
||||
#define KDATA_TIMER_COUNT_CURRENT (KDATA_BASE_ADDR + 0x0037)
|
||||
|
||||
#define KDATA_HALT_SYNCH_CLIENT (KDATA_BASE_ADDR + 0x0038)
|
||||
#define KDATA_HALT_SYNCH_DMA (KDATA_BASE_ADDR + 0x0039)
|
||||
#define KDATA_HALT_ACKNOWLEDGE (KDATA_BASE_ADDR + 0x003A)
|
||||
|
||||
#define KDATA_ADC1_XFER0 (KDATA_BASE_ADDR + 0x003B)
|
||||
#define KDATA_ADC1_XFER_ENDMARK (KDATA_BASE_ADDR + 0x003C)
|
||||
#define KDATA_ADC1_LEFT_VOLUME (KDATA_BASE_ADDR + 0x003D)
|
||||
#define KDATA_ADC1_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x003E)
|
||||
#define KDATA_ADC1_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x003F)
|
||||
#define KDATA_ADC1_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0040)
|
||||
|
||||
#define KDATA_ADC2_XFER0 (KDATA_BASE_ADDR + 0x0041)
|
||||
#define KDATA_ADC2_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0042)
|
||||
#define KDATA_ADC2_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0043)
|
||||
#define KDATA_ADC2_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x0044)
|
||||
#define KDATA_ADC2_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x0045)
|
||||
#define KDATA_ADC2_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x0046)
|
||||
|
||||
#define KDATA_CD_XFER0 (KDATA_BASE_ADDR + 0x0047)
|
||||
#define KDATA_CD_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0048)
|
||||
#define KDATA_CD_LEFT_VOLUME (KDATA_BASE_ADDR + 0x0049)
|
||||
#define KDATA_CD_RIGHT_VOLUME (KDATA_BASE_ADDR + 0x004A)
|
||||
#define KDATA_CD_LEFT_SUR_VOL (KDATA_BASE_ADDR + 0x004B)
|
||||
#define KDATA_CD_RIGHT_SUR_VOL (KDATA_BASE_ADDR + 0x004C)
|
||||
|
||||
#define KDATA_MIC_XFER0 (KDATA_BASE_ADDR + 0x004D)
|
||||
#define KDATA_MIC_XFER_ENDMARK (KDATA_BASE_ADDR + 0x004E)
|
||||
#define KDATA_MIC_VOLUME (KDATA_BASE_ADDR + 0x004F)
|
||||
#define KDATA_MIC_SUR_VOL (KDATA_BASE_ADDR + 0x0050)
|
||||
|
||||
#define KDATA_I2S_XFER0 (KDATA_BASE_ADDR + 0x0051)
|
||||
#define KDATA_I2S_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0052)
|
||||
|
||||
#define KDATA_CHI_XFER0 (KDATA_BASE_ADDR + 0x0053)
|
||||
#define KDATA_CHI_XFER_ENDMARK (KDATA_BASE_ADDR + 0x0054)
|
||||
|
||||
#define KDATA_SPDIF_XFER (KDATA_BASE_ADDR + 0x0055)
|
||||
#define KDATA_SPDIF_CURRENT_FRAME (KDATA_BASE_ADDR + 0x0056)
|
||||
#define KDATA_SPDIF_FRAME0 (KDATA_BASE_ADDR + 0x0057)
|
||||
#define KDATA_SPDIF_FRAME1 (KDATA_BASE_ADDR + 0x0058)
|
||||
#define KDATA_SPDIF_FRAME2 (KDATA_BASE_ADDR + 0x0059)
|
||||
|
||||
#define KDATA_SPDIF_REQUEST (KDATA_BASE_ADDR + 0x005A)
|
||||
#define KDATA_SPDIF_TEMP (KDATA_BASE_ADDR + 0x005B)
|
||||
|
||||
#define KDATA_SPDIFIN_XFER0 (KDATA_BASE_ADDR + 0x005C)
|
||||
#define KDATA_SPDIFIN_XFER_ENDMARK (KDATA_BASE_ADDR + 0x005D)
|
||||
#define KDATA_SPDIFIN_INT_METER (KDATA_BASE_ADDR + 0x005E)
|
||||
|
||||
#define KDATA_DSP_RESET_COUNT (KDATA_BASE_ADDR + 0x005F)
|
||||
#define KDATA_DEBUG_OUTPUT (KDATA_BASE_ADDR + 0x0060)
|
||||
|
||||
#define KDATA_KERNEL_ISR_LIST (KDATA_BASE_ADDR + 0x0061)
|
||||
|
||||
#define KDATA_KERNEL_ISR_CBSR1 (KDATA_BASE_ADDR + 0x0062)
|
||||
#define KDATA_KERNEL_ISR_CBER1 (KDATA_BASE_ADDR + 0x0063)
|
||||
#define KDATA_KERNEL_ISR_CBCR (KDATA_BASE_ADDR + 0x0064)
|
||||
#define KDATA_KERNEL_ISR_AR0 (KDATA_BASE_ADDR + 0x0065)
|
||||
#define KDATA_KERNEL_ISR_AR1 (KDATA_BASE_ADDR + 0x0066)
|
||||
#define KDATA_KERNEL_ISR_AR2 (KDATA_BASE_ADDR + 0x0067)
|
||||
#define KDATA_KERNEL_ISR_AR3 (KDATA_BASE_ADDR + 0x0068)
|
||||
#define KDATA_KERNEL_ISR_AR4 (KDATA_BASE_ADDR + 0x0069)
|
||||
#define KDATA_KERNEL_ISR_AR5 (KDATA_BASE_ADDR + 0x006A)
|
||||
#define KDATA_KERNEL_ISR_BRCR (KDATA_BASE_ADDR + 0x006B)
|
||||
#define KDATA_KERNEL_ISR_PASR (KDATA_BASE_ADDR + 0x006C)
|
||||
#define KDATA_KERNEL_ISR_PAER (KDATA_BASE_ADDR + 0x006D)
|
||||
|
||||
#define KDATA_CLIENT_SCRATCH0 (KDATA_BASE_ADDR + 0x006E)
|
||||
#define KDATA_CLIENT_SCRATCH1 (KDATA_BASE_ADDR + 0x006F)
|
||||
#define KDATA_KERNEL_SCRATCH (KDATA_BASE_ADDR + 0x0070)
|
||||
#define KDATA_KERNEL_ISR_SCRATCH (KDATA_BASE_ADDR + 0x0071)
|
||||
|
||||
#define KDATA_OUEUE_LEFT (KDATA_BASE_ADDR + 0x0072)
|
||||
#define KDATA_QUEUE_RIGHT (KDATA_BASE_ADDR + 0x0073)
|
||||
|
||||
#define KDATA_ADC1_REQUEST (KDATA_BASE_ADDR + 0x0074)
|
||||
#define KDATA_ADC2_REQUEST (KDATA_BASE_ADDR + 0x0075)
|
||||
#define KDATA_CD_REQUEST (KDATA_BASE_ADDR + 0x0076)
|
||||
#define KDATA_MIC_REQUEST (KDATA_BASE_ADDR + 0x0077)
|
||||
|
||||
#define KDATA_ADC1_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0078)
|
||||
#define KDATA_ADC2_MIXER_REQUEST (KDATA_BASE_ADDR + 0x0079)
|
||||
#define KDATA_CD_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007A)
|
||||
#define KDATA_MIC_MIXER_REQUEST (KDATA_BASE_ADDR + 0x007B)
|
||||
#define KDATA_MIC_SYNC_COUNTER (KDATA_BASE_ADDR + 0x007C)
|
||||
|
||||
/*
|
||||
* second 'segment' (?) reserved for mixer
|
||||
* buffers..
|
||||
*/
|
||||
|
||||
#define KDATA_MIXER_WORD0 (KDATA_BASE_ADDR2 + 0x0000)
|
||||
#define KDATA_MIXER_WORD1 (KDATA_BASE_ADDR2 + 0x0001)
|
||||
#define KDATA_MIXER_WORD2 (KDATA_BASE_ADDR2 + 0x0002)
|
||||
#define KDATA_MIXER_WORD3 (KDATA_BASE_ADDR2 + 0x0003)
|
||||
#define KDATA_MIXER_WORD4 (KDATA_BASE_ADDR2 + 0x0004)
|
||||
#define KDATA_MIXER_WORD5 (KDATA_BASE_ADDR2 + 0x0005)
|
||||
#define KDATA_MIXER_WORD6 (KDATA_BASE_ADDR2 + 0x0006)
|
||||
#define KDATA_MIXER_WORD7 (KDATA_BASE_ADDR2 + 0x0007)
|
||||
#define KDATA_MIXER_WORD8 (KDATA_BASE_ADDR2 + 0x0008)
|
||||
#define KDATA_MIXER_WORD9 (KDATA_BASE_ADDR2 + 0x0009)
|
||||
#define KDATA_MIXER_WORDA (KDATA_BASE_ADDR2 + 0x000A)
|
||||
#define KDATA_MIXER_WORDB (KDATA_BASE_ADDR2 + 0x000B)
|
||||
#define KDATA_MIXER_WORDC (KDATA_BASE_ADDR2 + 0x000C)
|
||||
#define KDATA_MIXER_WORDD (KDATA_BASE_ADDR2 + 0x000D)
|
||||
#define KDATA_MIXER_WORDE (KDATA_BASE_ADDR2 + 0x000E)
|
||||
#define KDATA_MIXER_WORDF (KDATA_BASE_ADDR2 + 0x000F)
|
||||
|
||||
#define KDATA_MIXER_XFER0 (KDATA_BASE_ADDR2 + 0x0010)
|
||||
#define KDATA_MIXER_XFER1 (KDATA_BASE_ADDR2 + 0x0011)
|
||||
#define KDATA_MIXER_XFER2 (KDATA_BASE_ADDR2 + 0x0012)
|
||||
#define KDATA_MIXER_XFER3 (KDATA_BASE_ADDR2 + 0x0013)
|
||||
#define KDATA_MIXER_XFER4 (KDATA_BASE_ADDR2 + 0x0014)
|
||||
#define KDATA_MIXER_XFER5 (KDATA_BASE_ADDR2 + 0x0015)
|
||||
#define KDATA_MIXER_XFER6 (KDATA_BASE_ADDR2 + 0x0016)
|
||||
#define KDATA_MIXER_XFER7 (KDATA_BASE_ADDR2 + 0x0017)
|
||||
#define KDATA_MIXER_XFER8 (KDATA_BASE_ADDR2 + 0x0018)
|
||||
#define KDATA_MIXER_XFER9 (KDATA_BASE_ADDR2 + 0x0019)
|
||||
#define KDATA_MIXER_XFER_ENDMARK (KDATA_BASE_ADDR2 + 0x001A)
|
||||
|
||||
#define KDATA_MIXER_TASK_NUMBER (KDATA_BASE_ADDR2 + 0x001B)
|
||||
#define KDATA_CURRENT_MIXER (KDATA_BASE_ADDR2 + 0x001C)
|
||||
#define KDATA_MIXER_ACTIVE (KDATA_BASE_ADDR2 + 0x001D)
|
||||
#define KDATA_MIXER_BANK_STATUS (KDATA_BASE_ADDR2 + 0x001E)
|
||||
#define KDATA_DAC_LEFT_VOLUME (KDATA_BASE_ADDR2 + 0x001F)
|
||||
#define KDATA_DAC_RIGHT_VOLUME (KDATA_BASE_ADDR2 + 0x0020)
|
||||
|
||||
#define MAX_INSTANCE_MINISRC (KDATA_INSTANCE_MINISRC_ENDMARK - KDATA_INSTANCE0_MINISRC)
|
||||
#define MAX_VIRTUAL_DMA_CHANNELS (KDATA_DMA_XFER_ENDMARK - KDATA_DMA_XFER0)
|
||||
#define MAX_VIRTUAL_MIXER_CHANNELS (KDATA_MIXER_XFER_ENDMARK - KDATA_MIXER_XFER0)
|
||||
#define MAX_VIRTUAL_ADC1_CHANNELS (KDATA_ADC1_XFER_ENDMARK - KDATA_ADC1_XFER0)
|
||||
|
||||
/*
|
||||
* client data area offsets
|
||||
*/
|
||||
#define CDATA_INSTANCE_READY 0x00
|
||||
|
||||
#define CDATA_HOST_SRC_ADDRL 0x01
|
||||
#define CDATA_HOST_SRC_ADDRH 0x02
|
||||
#define CDATA_HOST_SRC_END_PLUS_1L 0x03
|
||||
#define CDATA_HOST_SRC_END_PLUS_1H 0x04
|
||||
#define CDATA_HOST_SRC_CURRENTL 0x05
|
||||
#define CDATA_HOST_SRC_CURRENTH 0x06
|
||||
|
||||
#define CDATA_IN_BUF_CONNECT 0x07
|
||||
#define CDATA_OUT_BUF_CONNECT 0x08
|
||||
|
||||
#define CDATA_IN_BUF_BEGIN 0x09
|
||||
#define CDATA_IN_BUF_END_PLUS_1 0x0A
|
||||
#define CDATA_IN_BUF_HEAD 0x0B
|
||||
#define CDATA_IN_BUF_TAIL 0x0C
|
||||
#define CDATA_OUT_BUF_BEGIN 0x0D
|
||||
#define CDATA_OUT_BUF_END_PLUS_1 0x0E
|
||||
#define CDATA_OUT_BUF_HEAD 0x0F
|
||||
#define CDATA_OUT_BUF_TAIL 0x10
|
||||
|
||||
#define CDATA_DMA_CONTROL 0x11
|
||||
#define CDATA_RESERVED 0x12
|
||||
|
||||
#define CDATA_FREQUENCY 0x13
|
||||
#define CDATA_LEFT_VOLUME 0x14
|
||||
#define CDATA_RIGHT_VOLUME 0x15
|
||||
#define CDATA_LEFT_SUR_VOL 0x16
|
||||
#define CDATA_RIGHT_SUR_VOL 0x17
|
||||
|
||||
#define CDATA_HEADER_LEN 0x18
|
||||
|
||||
#define SRC3_DIRECTION_OFFSET CDATA_HEADER_LEN
|
||||
#define SRC3_MODE_OFFSET (CDATA_HEADER_LEN + 1)
|
||||
#define SRC3_WORD_LENGTH_OFFSET (CDATA_HEADER_LEN + 2)
|
||||
#define SRC3_PARAMETER_OFFSET (CDATA_HEADER_LEN + 3)
|
||||
#define SRC3_COEFF_ADDR_OFFSET (CDATA_HEADER_LEN + 8)
|
||||
#define SRC3_FILTAP_ADDR_OFFSET (CDATA_HEADER_LEN + 10)
|
||||
#define SRC3_TEMP_INBUF_ADDR_OFFSET (CDATA_HEADER_LEN + 16)
|
||||
#define SRC3_TEMP_OUTBUF_ADDR_OFFSET (CDATA_HEADER_LEN + 17)
|
||||
|
||||
#define MINISRC_IN_BUFFER_SIZE ( 0x50 * 2 )
|
||||
#define MINISRC_OUT_BUFFER_SIZE ( 0x50 * 2 * 2)
|
||||
#define MINISRC_OUT_BUFFER_SIZE ( 0x50 * 2 * 2)
|
||||
#define MINISRC_TMP_BUFFER_SIZE ( 112 + ( MINISRC_BIQUAD_STAGE * 3 + 4 ) * 2 * 2 )
|
||||
#define MINISRC_BIQUAD_STAGE 2
|
||||
#define MINISRC_COEF_LOC 0X175
|
||||
|
||||
#define DMACONTROL_BLOCK_MASK 0x000F
|
||||
#define DMAC_BLOCK0_SELECTOR 0x0000
|
||||
#define DMAC_BLOCK1_SELECTOR 0x0001
|
||||
#define DMAC_BLOCK2_SELECTOR 0x0002
|
||||
#define DMAC_BLOCK3_SELECTOR 0x0003
|
||||
#define DMAC_BLOCK4_SELECTOR 0x0004
|
||||
#define DMAC_BLOCK5_SELECTOR 0x0005
|
||||
#define DMAC_BLOCK6_SELECTOR 0x0006
|
||||
#define DMAC_BLOCK7_SELECTOR 0x0007
|
||||
#define DMAC_BLOCK8_SELECTOR 0x0008
|
||||
#define DMAC_BLOCK9_SELECTOR 0x0009
|
||||
#define DMAC_BLOCKA_SELECTOR 0x000A
|
||||
#define DMAC_BLOCKB_SELECTOR 0x000B
|
||||
#define DMAC_BLOCKC_SELECTOR 0x000C
|
||||
#define DMAC_BLOCKD_SELECTOR 0x000D
|
||||
#define DMAC_BLOCKE_SELECTOR 0x000E
|
||||
#define DMAC_BLOCKF_SELECTOR 0x000F
|
||||
#define DMACONTROL_PAGE_MASK 0x00F0
|
||||
#define DMAC_PAGE0_SELECTOR 0x0030
|
||||
#define DMAC_PAGE1_SELECTOR 0x0020
|
||||
#define DMAC_PAGE2_SELECTOR 0x0010
|
||||
#define DMAC_PAGE3_SELECTOR 0x0000
|
||||
#define DMACONTROL_AUTOREPEAT 0x1000
|
||||
#define DMACONTROL_STOPPED 0x2000
|
||||
#define DMACONTROL_DIRECTION 0x0100
|
||||
|
||||
|
||||
/*
|
||||
* DSP Code images
|
||||
*/
|
||||
|
||||
static u16 assp_kernel_image[] = {
|
||||
0x7980, 0x0030, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x00FB, 0x7980, 0x00DD, 0x7980, 0x03B4,
|
||||
0x7980, 0x0332, 0x7980, 0x0287, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
|
||||
0x7980, 0x031A, 0x7980, 0x03B4, 0x7980, 0x022F, 0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x03B4,
|
||||
0x7980, 0x03B4, 0x7980, 0x03B4, 0x7980, 0x0063, 0x7980, 0x006B, 0x7980, 0x03B4, 0x7980, 0x03B4,
|
||||
0xBF80, 0x2C7C, 0x8806, 0x8804, 0xBE40, 0xBC20, 0xAE09, 0x1000, 0xAE0A, 0x0001, 0x6938, 0xEB08,
|
||||
0x0053, 0x695A, 0xEB08, 0x00D6, 0x0009, 0x8B88, 0x6980, 0xE388, 0x0036, 0xBE30, 0xBC20, 0x6909,
|
||||
0xB801, 0x9009, 0xBE41, 0xBE41, 0x6928, 0xEB88, 0x0078, 0xBE41, 0xBE40, 0x7980, 0x0038, 0xBE41,
|
||||
0xBE41, 0x903A, 0x6938, 0xE308, 0x0056, 0x903A, 0xBE41, 0xBE40, 0xEF00, 0x903A, 0x6939, 0xE308,
|
||||
0x005E, 0x903A, 0xEF00, 0x690B, 0x660C, 0xEF8C, 0x690A, 0x660C, 0x620B, 0x6609, 0xEF00, 0x6910,
|
||||
0x660F, 0xEF04, 0xE388, 0x0075, 0x690E, 0x660F, 0x6210, 0x660D, 0xEF00, 0x690E, 0x660D, 0xEF00,
|
||||
0xAE70, 0x0001, 0xBC20, 0xAE27, 0x0001, 0x6939, 0xEB08, 0x005D, 0x6926, 0xB801, 0x9026, 0x0026,
|
||||
0x8B88, 0x6980, 0xE388, 0x00CB, 0x9028, 0x0D28, 0x4211, 0xE100, 0x007A, 0x4711, 0xE100, 0x00A0,
|
||||
0x7A80, 0x0063, 0xB811, 0x660A, 0x6209, 0xE304, 0x007A, 0x0C0B, 0x4005, 0x100A, 0xBA01, 0x9012,
|
||||
0x0C12, 0x4002, 0x7980, 0x00AF, 0x7A80, 0x006B, 0xBE02, 0x620E, 0x660D, 0xBA10, 0xE344, 0x007A,
|
||||
0x0C10, 0x4005, 0x100E, 0xBA01, 0x9012, 0x0C12, 0x4002, 0x1003, 0xBA02, 0x9012, 0x0C12, 0x4000,
|
||||
0x1003, 0xE388, 0x00BA, 0x1004, 0x7980, 0x00BC, 0x1004, 0xBA01, 0x9012, 0x0C12, 0x4001, 0x0C05,
|
||||
0x4003, 0x0C06, 0x4004, 0x1011, 0xBFB0, 0x01FF, 0x9012, 0x0C12, 0x4006, 0xBC20, 0xEF00, 0xAE26,
|
||||
0x1028, 0x6970, 0xBFD0, 0x0001, 0x9070, 0xE388, 0x007A, 0xAE28, 0x0000, 0xEF00, 0xAE70, 0x0300,
|
||||
0x0C70, 0xB00C, 0xAE5A, 0x0000, 0xEF00, 0x7A80, 0x038A, 0x697F, 0xB801, 0x907F, 0x0056, 0x8B88,
|
||||
0x0CA0, 0xB008, 0xAF71, 0xB000, 0x4E71, 0xE200, 0x00F3, 0xAE56, 0x1057, 0x0056, 0x0CA0, 0xB008,
|
||||
0x8056, 0x7980, 0x03A1, 0x0810, 0xBFA0, 0x1059, 0xE304, 0x03A1, 0x8056, 0x7980, 0x03A1, 0x7A80,
|
||||
0x038A, 0xBF01, 0xBE43, 0xBE59, 0x907C, 0x6937, 0xE388, 0x010D, 0xBA01, 0xE308, 0x010C, 0xAE71,
|
||||
0x0004, 0x0C71, 0x5000, 0x6936, 0x9037, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80, 0xBF0A,
|
||||
0x0560, 0xF500, 0xBF0A, 0x0520, 0xB900, 0xBB17, 0x90A0, 0x6917, 0xE388, 0x0148, 0x0D17, 0xE100,
|
||||
0x0127, 0xBF0C, 0x0578, 0xBF0D, 0x057C, 0x7980, 0x012B, 0xBF0C, 0x0538, 0xBF0D, 0x053C, 0x6900,
|
||||
0xE308, 0x0135, 0x8B8C, 0xBE59, 0xBB07, 0x90A0, 0xBC20, 0x7980, 0x0157, 0x030C, 0x8B8B, 0xB903,
|
||||
0x8809, 0xBEC6, 0x013E, 0x69AC, 0x90AB, 0x69AD, 0x90AB, 0x0813, 0x660A, 0xE344, 0x0144, 0x0309,
|
||||
0x830C, 0xBC20, 0x7980, 0x0157, 0x6955, 0xE388, 0x0157, 0x7C38, 0xBF0B, 0x0578, 0xF500, 0xBF0B,
|
||||
0x0538, 0xB907, 0x8809, 0xBEC6, 0x0156, 0x10AB, 0x90AA, 0x6974, 0xE388, 0x0163, 0xAE72, 0x0540,
|
||||
0xF500, 0xAE72, 0x0500, 0xAE61, 0x103B, 0x7A80, 0x02F6, 0x6978, 0xE388, 0x0182, 0x8B8C, 0xBF0C,
|
||||
0x0560, 0xE500, 0x7C40, 0x0814, 0xBA20, 0x8812, 0x733D, 0x7A80, 0x0380, 0x733E, 0x7A80, 0x0380,
|
||||
0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA2C, 0x8812, 0x733F, 0x7A80, 0x0380, 0x7340,
|
||||
0x7A80, 0x0380, 0x6975, 0xE388, 0x018E, 0xAE72, 0x0548, 0xF500, 0xAE72, 0x0508, 0xAE61, 0x1041,
|
||||
0x7A80, 0x02F6, 0x6979, 0xE388, 0x01AD, 0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA18,
|
||||
0x8812, 0x7343, 0x7A80, 0x0380, 0x7344, 0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40,
|
||||
0x0814, 0xBA24, 0x8812, 0x7345, 0x7A80, 0x0380, 0x7346, 0x7A80, 0x0380, 0x6976, 0xE388, 0x01B9,
|
||||
0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x1047, 0x7A80, 0x02F6, 0x697A, 0xE388, 0x01D8,
|
||||
0x8B8C, 0xBF0C, 0x0560, 0xE500, 0x7C40, 0x0814, 0xBA08, 0x8812, 0x7349, 0x7A80, 0x0380, 0x734A,
|
||||
0x7A80, 0x0380, 0x8B8C, 0xBF0C, 0x056C, 0xE500, 0x7C40, 0x0814, 0xBA14, 0x8812, 0x734B, 0x7A80,
|
||||
0x0380, 0x734C, 0x7A80, 0x0380, 0xBC21, 0xAE1C, 0x1090, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40,
|
||||
0x0812, 0xB804, 0x8813, 0x8B8D, 0xBF0D, 0x056C, 0xE500, 0x7C40, 0x0815, 0xB804, 0x8811, 0x7A80,
|
||||
0x034A, 0x8B8A, 0xBF0A, 0x0560, 0xE500, 0x7C40, 0x731F, 0xB903, 0x8809, 0xBEC6, 0x01F9, 0x548A,
|
||||
0xBE03, 0x98A0, 0x7320, 0xB903, 0x8809, 0xBEC6, 0x0201, 0x548A, 0xBE03, 0x98A0, 0x1F20, 0x2F1F,
|
||||
0x9826, 0xBC20, 0x6935, 0xE388, 0x03A1, 0x6933, 0xB801, 0x9033, 0xBFA0, 0x02EE, 0xE308, 0x03A1,
|
||||
0x9033, 0xBF00, 0x6951, 0xE388, 0x021F, 0x7334, 0xBE80, 0x5760, 0xBE03, 0x9F7E, 0xBE59, 0x9034,
|
||||
0x697E, 0x0D51, 0x9013, 0xBC20, 0x695C, 0xE388, 0x03A1, 0x735E, 0xBE80, 0x5760, 0xBE03, 0x9F7E,
|
||||
0xBE59, 0x905E, 0x697E, 0x0D5C, 0x9013, 0x7980, 0x03A1, 0x7A80, 0x038A, 0xBF01, 0xBE43, 0x6977,
|
||||
0xE388, 0x024E, 0xAE61, 0x104D, 0x0061, 0x8B88, 0x6980, 0xE388, 0x024E, 0x9071, 0x0D71, 0x000B,
|
||||
0xAFA0, 0x8010, 0xAFA0, 0x8010, 0x0810, 0x660A, 0xE308, 0x0249, 0x0009, 0x0810, 0x660C, 0xE388,
|
||||
0x024E, 0x800B, 0xBC20, 0x697B, 0xE388, 0x03A1, 0xBF0A, 0x109E, 0x8B8A, 0xAF80, 0x8014, 0x4C80,
|
||||
0xE100, 0x0266, 0x697C, 0xBF90, 0x0560, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0564, 0x9073, 0x0473,
|
||||
0x7980, 0x0270, 0x697C, 0xBF90, 0x0520, 0x9072, 0x0372, 0x697C, 0xBF90, 0x0524, 0x9073, 0x0473,
|
||||
0x697C, 0xB801, 0x907C, 0xBF0A, 0x10FD, 0x8B8A, 0xAF80, 0x8010, 0x734F, 0x548A, 0xBE03, 0x9880,
|
||||
0xBC21, 0x7326, 0x548B, 0xBE03, 0x618B, 0x988C, 0xBE03, 0x6180, 0x9880, 0x7980, 0x03A1, 0x7A80,
|
||||
0x038A, 0x0D28, 0x4711, 0xE100, 0x02BE, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388, 0x02B6,
|
||||
0xBFA0, 0x0800, 0xE388, 0x02B2, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02A3, 0x6909,
|
||||
0x900B, 0x7980, 0x02A5, 0xAF0B, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100, 0x02ED,
|
||||
0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x6909, 0x900B, 0x7980, 0x02B8, 0xAF0B, 0x4005,
|
||||
0xAF05, 0x4003, 0xAF06, 0x4004, 0x7980, 0x02ED, 0xAF12, 0x4006, 0x6912, 0xBFB0, 0x0C00, 0xE388,
|
||||
0x02E7, 0xBFA0, 0x0800, 0xE388, 0x02E3, 0x6912, 0xBFB0, 0x0C00, 0xBFA0, 0x0400, 0xE388, 0x02D4,
|
||||
0x690D, 0x9010, 0x7980, 0x02D6, 0xAF10, 0x4005, 0x6901, 0x9005, 0x6902, 0x9006, 0x4311, 0xE100,
|
||||
0x02ED, 0x6911, 0xBFC0, 0x2000, 0x9011, 0x7980, 0x02ED, 0x690D, 0x9010, 0x7980, 0x02E9, 0xAF10,
|
||||
0x4005, 0xAF05, 0x4003, 0xAF06, 0x4004, 0xBC20, 0x6970, 0x9071, 0x7A80, 0x0078, 0x6971, 0x9070,
|
||||
0x7980, 0x03A1, 0xBC20, 0x0361, 0x8B8B, 0x6980, 0xEF88, 0x0272, 0x0372, 0x7804, 0x9071, 0x0D71,
|
||||
0x8B8A, 0x000B, 0xB903, 0x8809, 0xBEC6, 0x0309, 0x69A8, 0x90AB, 0x69A8, 0x90AA, 0x0810, 0x660A,
|
||||
0xE344, 0x030F, 0x0009, 0x0810, 0x660C, 0xE388, 0x0314, 0x800B, 0xBC20, 0x6961, 0xB801, 0x9061,
|
||||
0x7980, 0x02F7, 0x7A80, 0x038A, 0x5D35, 0x0001, 0x6934, 0xB801, 0x9034, 0xBF0A, 0x109E, 0x8B8A,
|
||||
0xAF80, 0x8014, 0x4880, 0xAE72, 0x0550, 0xF500, 0xAE72, 0x0510, 0xAE61, 0x1051, 0x7A80, 0x02F6,
|
||||
0x7980, 0x03A1, 0x7A80, 0x038A, 0x5D35, 0x0002, 0x695E, 0xB801, 0x905E, 0xBF0A, 0x109E, 0x8B8A,
|
||||
0xAF80, 0x8014, 0x4780, 0xAE72, 0x0558, 0xF500, 0xAE72, 0x0518, 0xAE61, 0x105C, 0x7A80, 0x02F6,
|
||||
0x7980, 0x03A1, 0x001C, 0x8B88, 0x6980, 0xEF88, 0x901D, 0x0D1D, 0x100F, 0x6610, 0xE38C, 0x0358,
|
||||
0x690E, 0x6610, 0x620F, 0x660D, 0xBA0F, 0xE301, 0x037A, 0x0410, 0x8B8A, 0xB903, 0x8809, 0xBEC6,
|
||||
0x036C, 0x6A8C, 0x61AA, 0x98AB, 0x6A8C, 0x61AB, 0x98AD, 0x6A8C, 0x61AD, 0x98A9, 0x6A8C, 0x61A9,
|
||||
0x98AA, 0x7C04, 0x8B8B, 0x7C04, 0x8B8D, 0x7C04, 0x8B89, 0x7C04, 0x0814, 0x660E, 0xE308, 0x0379,
|
||||
0x040D, 0x8410, 0xBC21, 0x691C, 0xB801, 0x901C, 0x7980, 0x034A, 0xB903, 0x8809, 0x8B8A, 0xBEC6,
|
||||
0x0388, 0x54AC, 0xBE03, 0x618C, 0x98AA, 0xEF00, 0xBC20, 0xBE46, 0x0809, 0x906B, 0x080A, 0x906C,
|
||||
0x080B, 0x906D, 0x081A, 0x9062, 0x081B, 0x9063, 0x081E, 0x9064, 0xBE59, 0x881E, 0x8065, 0x8166,
|
||||
0x8267, 0x8368, 0x8469, 0x856A, 0xEF00, 0xBC20, 0x696B, 0x8809, 0x696C, 0x880A, 0x696D, 0x880B,
|
||||
0x6962, 0x881A, 0x6963, 0x881B, 0x6964, 0x881E, 0x0065, 0x0166, 0x0267, 0x0368, 0x0469, 0x056A,
|
||||
0xBE3A,
|
||||
};
|
||||
|
||||
/*
|
||||
* Mini sample rate converter code image
|
||||
* that is to be loaded at 0x400 on the DSP.
|
||||
*/
|
||||
static u16 assp_minisrc_image[] = {
|
||||
|
||||
0xBF80, 0x101E, 0x906E, 0x006E, 0x8B88, 0x6980, 0xEF88, 0x906F, 0x0D6F, 0x6900, 0xEB08, 0x0412,
|
||||
0xBC20, 0x696E, 0xB801, 0x906E, 0x7980, 0x0403, 0xB90E, 0x8807, 0xBE43, 0xBF01, 0xBE47, 0xBE41,
|
||||
0x7A80, 0x002A, 0xBE40, 0x3029, 0xEFCC, 0xBE41, 0x7A80, 0x0028, 0xBE40, 0x3028, 0xEFCC, 0x6907,
|
||||
0xE308, 0x042A, 0x6909, 0x902C, 0x7980, 0x042C, 0x690D, 0x902C, 0x1009, 0x881A, 0x100A, 0xBA01,
|
||||
0x881B, 0x100D, 0x881C, 0x100E, 0xBA01, 0x881D, 0xBF80, 0x00ED, 0x881E, 0x050C, 0x0124, 0xB904,
|
||||
0x9027, 0x6918, 0xE308, 0x04B3, 0x902D, 0x6913, 0xBFA0, 0x7598, 0xF704, 0xAE2D, 0x00FF, 0x8B8D,
|
||||
0x6919, 0xE308, 0x0463, 0x691A, 0xE308, 0x0456, 0xB907, 0x8809, 0xBEC6, 0x0453, 0x10A9, 0x90AD,
|
||||
0x7980, 0x047C, 0xB903, 0x8809, 0xBEC6, 0x0460, 0x1889, 0x6C22, 0x90AD, 0x10A9, 0x6E23, 0x6C22,
|
||||
0x90AD, 0x7980, 0x047C, 0x101A, 0xE308, 0x046F, 0xB903, 0x8809, 0xBEC6, 0x046C, 0x10A9, 0x90A0,
|
||||
0x90AD, 0x7980, 0x047C, 0xB901, 0x8809, 0xBEC6, 0x047B, 0x1889, 0x6C22, 0x90A0, 0x90AD, 0x10A9,
|
||||
0x6E23, 0x6C22, 0x90A0, 0x90AD, 0x692D, 0xE308, 0x049C, 0x0124, 0xB703, 0xB902, 0x8818, 0x8B89,
|
||||
0x022C, 0x108A, 0x7C04, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99A0,
|
||||
0x108A, 0x90A0, 0x692B, 0x881F, 0x7E80, 0x055B, 0x692A, 0x8809, 0x8B89, 0x99AF, 0x7B99, 0x0484,
|
||||
0x0124, 0x060F, 0x101B, 0x2013, 0x901B, 0xBFA0, 0x7FFF, 0xE344, 0x04AC, 0x901B, 0x8B89, 0x7A80,
|
||||
0x051A, 0x6927, 0xBA01, 0x9027, 0x7A80, 0x0523, 0x6927, 0xE308, 0x049E, 0x7980, 0x050F, 0x0624,
|
||||
0x1026, 0x2013, 0x9026, 0xBFA0, 0x7FFF, 0xE304, 0x04C0, 0x8B8D, 0x7A80, 0x051A, 0x7980, 0x04B4,
|
||||
0x9026, 0x1013, 0x3026, 0x901B, 0x8B8D, 0x7A80, 0x051A, 0x7A80, 0x0523, 0x1027, 0xBA01, 0x9027,
|
||||
0xE308, 0x04B4, 0x0124, 0x060F, 0x8B89, 0x691A, 0xE308, 0x04EA, 0x6919, 0xE388, 0x04E0, 0xB903,
|
||||
0x8809, 0xBEC6, 0x04DD, 0x1FA0, 0x2FAE, 0x98A9, 0x7980, 0x050F, 0xB901, 0x8818, 0xB907, 0x8809,
|
||||
0xBEC6, 0x04E7, 0x10EE, 0x90A9, 0x7980, 0x050F, 0x6919, 0xE308, 0x04FE, 0xB903, 0x8809, 0xBE46,
|
||||
0xBEC6, 0x04FA, 0x17A0, 0xBE1E, 0x1FAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0xBE47,
|
||||
0x7980, 0x050F, 0xB901, 0x8809, 0xBEC6, 0x050E, 0x16A0, 0x26A0, 0xBFB7, 0xFF00, 0xBE1E, 0x1EA0,
|
||||
0x2EAE, 0xBFBF, 0xFF00, 0xBE13, 0xBFDF, 0x8080, 0x99A9, 0x850C, 0x860F, 0x6907, 0xE388, 0x0516,
|
||||
0x0D07, 0x8510, 0xBE59, 0x881E, 0xBE4A, 0xEF00, 0x101E, 0x901C, 0x101F, 0x901D, 0x10A0, 0x901E,
|
||||
0x10A0, 0x901F, 0xEF00, 0x101E, 0x301C, 0x9020, 0x731B, 0x5420, 0xBE03, 0x9825, 0x1025, 0x201C,
|
||||
0x9025, 0x7325, 0x5414, 0xBE03, 0x8B8E, 0x9880, 0x692F, 0xE388, 0x0539, 0xBE59, 0xBB07, 0x6180,
|
||||
0x9880, 0x8BA0, 0x101F, 0x301D, 0x9021, 0x731B, 0x5421, 0xBE03, 0x982E, 0x102E, 0x201D, 0x902E,
|
||||
0x732E, 0x5415, 0xBE03, 0x9880, 0x692F, 0xE388, 0x054F, 0xBE59, 0xBB07, 0x6180, 0x9880, 0x8BA0,
|
||||
0x6918, 0xEF08, 0x7325, 0x5416, 0xBE03, 0x98A0, 0x732E, 0x5417, 0xBE03, 0x98A0, 0xEF00, 0x8BA0,
|
||||
0xBEC6, 0x056B, 0xBE59, 0xBB04, 0xAA90, 0xBE04, 0xBE1E, 0x99E0, 0x8BE0, 0x69A0, 0x90D0, 0x69A0,
|
||||
0x90D0, 0x081F, 0xB805, 0x881F, 0x8B90, 0x69A0, 0x90D0, 0x69A0, 0x9090, 0x8BD0, 0x8BD8, 0xBE1F,
|
||||
0xEF00, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
|
||||
};
|
||||
|
478
sound/oss/maui.c
478
sound/oss/maui.c
|
@ -1,478 +0,0 @@
|
|||
/*
|
||||
* sound/oss/maui.c
|
||||
*
|
||||
* The low level driver for Turtle Beach Maui and Tropez.
|
||||
*
|
||||
*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*
|
||||
* Changes:
|
||||
* Alan Cox General clean up, use kernel IRQ
|
||||
* system
|
||||
* Christoph Hellwig Adapted to module_init/module_exit
|
||||
* Bartlomiej Zolnierkiewicz
|
||||
* Added __init to download_code()
|
||||
*
|
||||
* Status:
|
||||
* Andrew J. Kroll Tested 06/01/1999 with:
|
||||
* * OSWF.MOT File Version: 1.15
|
||||
* * OSWF.MOT File Dated: 09/12/94
|
||||
* * Older versions will cause problems.
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/config.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#define USE_SEQ_MACROS
|
||||
#define USE_SIMPLE_MACROS
|
||||
|
||||
#include "sound_config.h"
|
||||
#include "sound_firmware.h"
|
||||
|
||||
#include "mpu401.h"
|
||||
|
||||
static int maui_base = 0x330;
|
||||
|
||||
static volatile int irq_ok;
|
||||
static int *maui_osp;
|
||||
|
||||
#define HOST_DATA_PORT (maui_base + 2)
|
||||
#define HOST_STAT_PORT (maui_base + 3)
|
||||
#define HOST_CTRL_PORT (maui_base + 3)
|
||||
|
||||
#define STAT_TX_INTR 0x40
|
||||
#define STAT_TX_AVAIL 0x20
|
||||
#define STAT_TX_IENA 0x10
|
||||
#define STAT_RX_INTR 0x04
|
||||
#define STAT_RX_AVAIL 0x02
|
||||
#define STAT_RX_IENA 0x01
|
||||
|
||||
static int (*orig_load_patch)(int dev, int format, const char __user *addr,
|
||||
int offs, int count, int pmgr_flag) = NULL;
|
||||
|
||||
#include "maui_boot.h"
|
||||
|
||||
static int maui_wait(int mask)
|
||||
{
|
||||
int i;
|
||||
|
||||
/*
|
||||
* Perform a short initial wait without sleeping
|
||||
*/
|
||||
|
||||
for (i = 0; i < 100; i++)
|
||||
if (inb(HOST_STAT_PORT) & mask)
|
||||
return 1;
|
||||
|
||||
/*
|
||||
* Wait up to 15 seconds with sleeping
|
||||
*/
|
||||
|
||||
for (i = 0; i < 150; i++) {
|
||||
if (inb(HOST_STAT_PORT) & mask)
|
||||
return 1;
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule_timeout(HZ / 10);
|
||||
if (signal_pending(current))
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int maui_read(void)
|
||||
{
|
||||
if (maui_wait(STAT_RX_AVAIL))
|
||||
return inb(HOST_DATA_PORT);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int maui_write(unsigned char data)
|
||||
{
|
||||
if (maui_wait(STAT_TX_AVAIL)) {
|
||||
outb((data), HOST_DATA_PORT);
|
||||
return 1;
|
||||
}
|
||||
printk(KERN_WARNING "Maui: Write timeout\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static irqreturn_t mauiintr(int irq, void *dev_id, struct pt_regs *dummy)
|
||||
{
|
||||
irq_ok = 1;
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int __init download_code(void)
|
||||
{
|
||||
int i, lines = 0;
|
||||
int eol_seen = 0, done = 0;
|
||||
int skip = 1;
|
||||
|
||||
printk(KERN_INFO "Code download (%d bytes): ", maui_osLen);
|
||||
|
||||
for (i = 0; i < maui_osLen; i++) {
|
||||
if (maui_os[i] != '\r') {
|
||||
if (!skip || (maui_os[i] == 'S' && (i == 0 || maui_os[i - 1] == '\n'))) {
|
||||
skip = 0;
|
||||
|
||||
if (maui_os[i] == '\n')
|
||||
eol_seen = skip = 1;
|
||||
else if (maui_os[i] == 'S') {
|
||||
if (maui_os[i + 1] == '8')
|
||||
done = 1;
|
||||
if (!maui_write(0xF1))
|
||||
goto failure;
|
||||
if (!maui_write('S'))
|
||||
goto failure;
|
||||
} else {
|
||||
if (!maui_write(maui_os[i]))
|
||||
goto failure;
|
||||
}
|
||||
|
||||
if (eol_seen) {
|
||||
int c = 0;
|
||||
int n;
|
||||
|
||||
eol_seen = 0;
|
||||
|
||||
for (n = 0; n < 2; n++) {
|
||||
if (maui_wait(STAT_RX_AVAIL)) {
|
||||
c = inb(HOST_DATA_PORT);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (c != 0x80) {
|
||||
printk("Download not acknowledged\n");
|
||||
return 0;
|
||||
}
|
||||
else if (!(lines++ % 10))
|
||||
printk(".");
|
||||
|
||||
if (done) {
|
||||
printk("\n");
|
||||
printk(KERN_INFO "Download complete\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
failure:
|
||||
printk("\n");
|
||||
printk(KERN_ERR "Download failed!!!\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init maui_init(int irq)
|
||||
{
|
||||
unsigned char bits;
|
||||
|
||||
switch (irq) {
|
||||
case 9:
|
||||
bits = 0x00;
|
||||
break;
|
||||
case 5:
|
||||
bits = 0x08;
|
||||
break;
|
||||
case 12:
|
||||
bits = 0x10;
|
||||
break;
|
||||
case 15:
|
||||
bits = 0x18;
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(KERN_ERR "Maui: Invalid IRQ %d\n", irq);
|
||||
return 0;
|
||||
}
|
||||
outb((0x00), HOST_CTRL_PORT); /* Reset */
|
||||
outb((bits), HOST_DATA_PORT); /* Set the IRQ bits */
|
||||
outb((bits | 0x80), HOST_DATA_PORT); /* Set the IRQ bits again? */
|
||||
outb((0x80), HOST_CTRL_PORT); /* Leave reset */
|
||||
outb((0x80), HOST_CTRL_PORT); /* Leave reset */
|
||||
outb((0xD0), HOST_CTRL_PORT); /* Cause interrupt */
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < 1000000 && !irq_ok; i++)
|
||||
;
|
||||
if (!irq_ok)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
outb((0x80), HOST_CTRL_PORT); /* Leave reset */
|
||||
|
||||
printk(KERN_INFO "Turtle Beach Maui initialization\n");
|
||||
|
||||
if (!download_code())
|
||||
return 0;
|
||||
|
||||
outb((0xE0), HOST_CTRL_PORT); /* Normal operation */
|
||||
|
||||
/* Select mpu401 mode */
|
||||
|
||||
maui_write(0xf0);
|
||||
maui_write(1);
|
||||
if (maui_read() != 0x80) {
|
||||
maui_write(0xf0);
|
||||
maui_write(1);
|
||||
if (maui_read() != 0x80)
|
||||
printk(KERN_ERR "Maui didn't acknowledge set HW mode command\n");
|
||||
}
|
||||
printk(KERN_INFO "Maui initialized OK\n");
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int maui_short_wait(int mask) {
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 1000; i++) {
|
||||
if (inb(HOST_STAT_PORT) & mask) {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int maui_load_patch(int dev, int format, const char __user *addr,
|
||||
int offs, int count, int pmgr_flag)
|
||||
{
|
||||
|
||||
struct sysex_info header;
|
||||
unsigned long left, src_offs;
|
||||
int hdr_size = (unsigned long) &header.data[0] - (unsigned long) &header;
|
||||
int i;
|
||||
|
||||
if (format == SYSEX_PATCH) /* Handled by midi_synth.c */
|
||||
return orig_load_patch(dev, format, addr, offs, count, pmgr_flag);
|
||||
|
||||
if (format != MAUI_PATCH)
|
||||
{
|
||||
printk(KERN_WARNING "Maui: Unknown patch format\n");
|
||||
}
|
||||
if (count < hdr_size) {
|
||||
/* printk("Maui error: Patch header too short\n");*/
|
||||
return -EINVAL;
|
||||
}
|
||||
count -= hdr_size;
|
||||
|
||||
/*
|
||||
* Copy the header from user space but ignore the first bytes which have
|
||||
* been transferred already.
|
||||
*/
|
||||
|
||||
if(copy_from_user(&((char *) &header)[offs], &(addr)[offs], hdr_size - offs))
|
||||
return -EFAULT;
|
||||
|
||||
if (count < header.len) {
|
||||
printk(KERN_ERR "Maui warning: Host command record too short (%d<%d)\n", count, (int) header.len);
|
||||
header.len = count;
|
||||
}
|
||||
left = header.len;
|
||||
src_offs = 0;
|
||||
|
||||
for (i = 0; i < left; i++) {
|
||||
unsigned char data;
|
||||
|
||||
if(get_user(*(unsigned char *) &data, (unsigned char __user *) &((addr)[hdr_size + i])))
|
||||
return -EFAULT;
|
||||
if (i == 0 && !(data & 0x80))
|
||||
return -EINVAL;
|
||||
|
||||
if (maui_write(data) == -1)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
if ((i = maui_read()) != 0x80) {
|
||||
if (i != -1)
|
||||
printk("Maui: Error status %02x\n", i);
|
||||
return -EIO;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init probe_maui(struct address_info *hw_config)
|
||||
{
|
||||
struct resource *ports;
|
||||
int this_dev;
|
||||
int i;
|
||||
int tmp1, tmp2, ret;
|
||||
|
||||
ports = request_region(hw_config->io_base, 2, "mpu401");
|
||||
if (!ports)
|
||||
return 0;
|
||||
|
||||
if (!request_region(hw_config->io_base + 2, 6, "Maui"))
|
||||
goto out;
|
||||
|
||||
maui_base = hw_config->io_base;
|
||||
maui_osp = hw_config->osp;
|
||||
|
||||
if (request_irq(hw_config->irq, mauiintr, 0, "Maui", NULL) < 0)
|
||||
goto out2;
|
||||
|
||||
/*
|
||||
* Initialize the processor if necessary
|
||||
*/
|
||||
|
||||
if (maui_osLen > 0) {
|
||||
if (!(inb(HOST_STAT_PORT) & STAT_TX_AVAIL) ||
|
||||
!maui_write(0x9F) || /* Report firmware version */
|
||||
!maui_short_wait(STAT_RX_AVAIL) ||
|
||||
maui_read() == -1 || maui_read() == -1)
|
||||
if (!maui_init(hw_config->irq))
|
||||
goto out3;
|
||||
}
|
||||
if (!maui_write(0xCF)) /* Report hardware version */ {
|
||||
printk(KERN_ERR "No WaveFront firmware detected (card uninitialized?)\n");
|
||||
goto out3;
|
||||
}
|
||||
if ((tmp1 = maui_read()) == -1 || (tmp2 = maui_read()) == -1) {
|
||||
printk(KERN_ERR "No WaveFront firmware detected (card uninitialized?)\n");
|
||||
goto out3;
|
||||
}
|
||||
if (tmp1 == 0xff || tmp2 == 0xff)
|
||||
goto out3;
|
||||
printk(KERN_DEBUG "WaveFront hardware version %d.%d\n", tmp1, tmp2);
|
||||
|
||||
if (!maui_write(0x9F)) /* Report firmware version */
|
||||
goto out3;
|
||||
if ((tmp1 = maui_read()) == -1 || (tmp2 = maui_read()) == -1)
|
||||
goto out3;
|
||||
|
||||
printk(KERN_DEBUG "WaveFront firmware version %d.%d\n", tmp1, tmp2);
|
||||
|
||||
if (!maui_write(0x85)) /* Report free DRAM */
|
||||
goto out3;
|
||||
tmp1 = 0;
|
||||
for (i = 0; i < 4; i++) {
|
||||
tmp1 |= maui_read() << (7 * i);
|
||||
}
|
||||
printk(KERN_DEBUG "Available DRAM %dk\n", tmp1 / 1024);
|
||||
|
||||
for (i = 0; i < 1000; i++)
|
||||
if (probe_mpu401(hw_config, ports))
|
||||
break;
|
||||
|
||||
ret = probe_mpu401(hw_config, ports);
|
||||
if (!ret)
|
||||
goto out3;
|
||||
|
||||
conf_printf("Maui", hw_config);
|
||||
|
||||
hw_config->irq *= -1;
|
||||
hw_config->name = "Maui";
|
||||
attach_mpu401(hw_config, THIS_MODULE);
|
||||
|
||||
if (hw_config->slots[1] != -1) /* The MPU401 driver installed itself */ {
|
||||
struct synth_operations *synth;
|
||||
|
||||
this_dev = hw_config->slots[1];
|
||||
|
||||
/*
|
||||
* Intercept patch loading calls so that they can be handled
|
||||
* by the Maui driver.
|
||||
*/
|
||||
|
||||
synth = midi_devs[this_dev]->converter;
|
||||
if (synth != NULL) {
|
||||
synth->id = "MAUI";
|
||||
orig_load_patch = synth->load_patch;
|
||||
synth->load_patch = &maui_load_patch;
|
||||
} else
|
||||
printk(KERN_ERR "Maui: Can't install patch loader\n");
|
||||
}
|
||||
return 1;
|
||||
|
||||
out3:
|
||||
free_irq(hw_config->irq, NULL);
|
||||
out2:
|
||||
release_region(hw_config->io_base + 2, 6);
|
||||
out:
|
||||
release_region(hw_config->io_base, 2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit unload_maui(struct address_info *hw_config)
|
||||
{
|
||||
int irq = hw_config->irq;
|
||||
release_region(hw_config->io_base + 2, 6);
|
||||
unload_mpu401(hw_config);
|
||||
|
||||
if (irq < 0)
|
||||
irq = -irq;
|
||||
if (irq > 0)
|
||||
free_irq(irq, NULL);
|
||||
}
|
||||
|
||||
static int fw_load;
|
||||
|
||||
static struct address_info cfg;
|
||||
|
||||
static int __initdata io = -1;
|
||||
static int __initdata irq = -1;
|
||||
|
||||
module_param(io, int, 0);
|
||||
module_param(irq, int, 0);
|
||||
|
||||
/*
|
||||
* Install a Maui card. Needs mpu401 loaded already.
|
||||
*/
|
||||
|
||||
static int __init init_maui(void)
|
||||
{
|
||||
printk(KERN_INFO "Turtle beach Maui and Tropez driver, Copyright (C) by Hannu Savolainen 1993-1996\n");
|
||||
|
||||
cfg.io_base = io;
|
||||
cfg.irq = irq;
|
||||
|
||||
if (cfg.io_base == -1 || cfg.irq == -1) {
|
||||
printk(KERN_INFO "maui: irq and io must be set.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (maui_os == NULL) {
|
||||
fw_load = 1;
|
||||
maui_osLen = mod_firmware_load("/etc/sound/oswf.mot", (char **) &maui_os);
|
||||
}
|
||||
if (probe_maui(&cfg) == 0)
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit cleanup_maui(void)
|
||||
{
|
||||
if (fw_load && maui_os)
|
||||
vfree(maui_os);
|
||||
unload_maui(&cfg);
|
||||
}
|
||||
|
||||
module_init(init_maui);
|
||||
module_exit(cleanup_maui);
|
||||
|
||||
#ifndef MODULE
|
||||
static int __init setup_maui(char *str)
|
||||
{
|
||||
/* io, irq */
|
||||
int ints[3];
|
||||
|
||||
str = get_options(str, ARRAY_SIZE(ints), ints);
|
||||
|
||||
io = ints[1];
|
||||
irq = ints[2];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("maui=", setup_maui);
|
||||
#endif
|
||||
MODULE_LICENSE("GPL");
|
|
@ -432,16 +432,7 @@ static void mpu401_input_loop(struct mpu_config *devc)
|
|||
devc->m_busy = 0;
|
||||
}
|
||||
|
||||
int intchk_mpu401(void *dev_id)
|
||||
{
|
||||
struct mpu_config *devc;
|
||||
int dev = (int) dev_id;
|
||||
|
||||
devc = &dev_conf[dev];
|
||||
return input_avail(devc);
|
||||
}
|
||||
|
||||
irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs *dummy)
|
||||
static irqreturn_t mpuintr(int irq, void *dev_id, struct pt_regs *dummy)
|
||||
{
|
||||
struct mpu_config *devc;
|
||||
int dev = (int) dev_id;
|
||||
|
@ -1761,8 +1752,6 @@ static int mpu_timer_init(int midi_dev)
|
|||
EXPORT_SYMBOL(probe_mpu401);
|
||||
EXPORT_SYMBOL(attach_mpu401);
|
||||
EXPORT_SYMBOL(unload_mpu401);
|
||||
EXPORT_SYMBOL(intchk_mpu401);
|
||||
EXPORT_SYMBOL(mpuintr);
|
||||
|
||||
static struct address_info cfg;
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,329 +0,0 @@
|
|||
/*
|
||||
* sound/oss/opl3sa.c
|
||||
*
|
||||
* Low level driver for Yamaha YMF701B aka OPL3-SA chip
|
||||
*
|
||||
*
|
||||
*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*
|
||||
* Changes:
|
||||
* Alan Cox Modularisation
|
||||
* Christoph Hellwig Adapted to module_init/module_exit
|
||||
* Arnaldo C. de Melo got rid of attach_uart401
|
||||
*
|
||||
* FIXME:
|
||||
* Check for install of mpu etc is wrong, should check result of the mss stuff
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/spinlock.h>
|
||||
|
||||
#undef SB_OK
|
||||
|
||||
#include "sound_config.h"
|
||||
|
||||
#include "ad1848.h"
|
||||
#include "mpu401.h"
|
||||
|
||||
#ifdef SB_OK
|
||||
#include "sb.h"
|
||||
static int sb_initialized;
|
||||
#endif
|
||||
|
||||
static DEFINE_SPINLOCK(lock);
|
||||
|
||||
static unsigned char opl3sa_read(int addr)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned char tmp;
|
||||
|
||||
spin_lock_irqsave(&lock,flags);
|
||||
outb((0x1d), 0xf86); /* password */
|
||||
outb(((unsigned char) addr), 0xf86); /* address */
|
||||
tmp = inb(0xf87); /* data */
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
|
||||
return tmp;
|
||||
}
|
||||
|
||||
static void opl3sa_write(int addr, int data)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&lock,flags);
|
||||
outb((0x1d), 0xf86); /* password */
|
||||
outb(((unsigned char) addr), 0xf86); /* address */
|
||||
outb(((unsigned char) data), 0xf87); /* data */
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
}
|
||||
|
||||
static int __init opl3sa_detect(void)
|
||||
{
|
||||
int tmp;
|
||||
|
||||
if (((tmp = opl3sa_read(0x01)) & 0xc4) != 0x04)
|
||||
{
|
||||
DDB(printk("OPL3-SA detect error 1 (%x)\n", opl3sa_read(0x01)));
|
||||
/* return 0; */
|
||||
}
|
||||
|
||||
/*
|
||||
* Check that the password feature has any effect
|
||||
*/
|
||||
|
||||
if (inb(0xf87) == tmp)
|
||||
{
|
||||
DDB(printk("OPL3-SA detect failed 2 (%x/%x)\n", tmp, inb(0xf87)));
|
||||
return 0;
|
||||
}
|
||||
tmp = (opl3sa_read(0x04) & 0xe0) >> 5;
|
||||
|
||||
if (tmp != 0 && tmp != 1)
|
||||
{
|
||||
DDB(printk("OPL3-SA detect failed 3 (%d)\n", tmp));
|
||||
return 0;
|
||||
}
|
||||
DDB(printk("OPL3-SA mode %x detected\n", tmp));
|
||||
|
||||
opl3sa_write(0x01, 0x00); /* Disable MSS */
|
||||
opl3sa_write(0x02, 0x00); /* Disable SB */
|
||||
opl3sa_write(0x03, 0x00); /* Disable MPU */
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Probe and attach routines for the Windows Sound System mode of
|
||||
* OPL3-SA
|
||||
*/
|
||||
|
||||
static int __init probe_opl3sa_wss(struct address_info *hw_config, struct resource *ports)
|
||||
{
|
||||
unsigned char tmp = 0x24; /* WSS enable */
|
||||
|
||||
/*
|
||||
* Check if the IO port returns valid signature. The original MS Sound
|
||||
* system returns 0x04 while some cards (OPL3-SA for example)
|
||||
* return 0x00.
|
||||
*/
|
||||
|
||||
if (!opl3sa_detect())
|
||||
{
|
||||
printk(KERN_ERR "OSS: OPL3-SA chip not found\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
switch (hw_config->io_base)
|
||||
{
|
||||
case 0x530:
|
||||
tmp |= 0x00;
|
||||
break;
|
||||
case 0xe80:
|
||||
tmp |= 0x08;
|
||||
break;
|
||||
case 0xf40:
|
||||
tmp |= 0x10;
|
||||
break;
|
||||
case 0x604:
|
||||
tmp |= 0x18;
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "OSS: Unsupported OPL3-SA/WSS base %x\n", hw_config->io_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
opl3sa_write(0x01, tmp); /* WSS setup register */
|
||||
|
||||
return probe_ms_sound(hw_config, ports);
|
||||
}
|
||||
|
||||
static void __init attach_opl3sa_wss(struct address_info *hw_config, struct resource *ports)
|
||||
{
|
||||
int nm = num_mixers;
|
||||
|
||||
/* FIXME */
|
||||
attach_ms_sound(hw_config, ports, THIS_MODULE);
|
||||
if (num_mixers > nm) /* A mixer was installed */
|
||||
{
|
||||
AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_CD);
|
||||
AD1848_REROUTE(SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH);
|
||||
AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_LINE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int __init probe_opl3sa_mpu(struct address_info *hw_config)
|
||||
{
|
||||
unsigned char conf;
|
||||
static signed char irq_bits[] = {
|
||||
-1, -1, -1, -1, -1, 1, -1, 2, -1, 3, 4
|
||||
};
|
||||
|
||||
if (hw_config->irq > 10)
|
||||
{
|
||||
printk(KERN_ERR "OPL3-SA: Bad MPU IRQ %d\n", hw_config->irq);
|
||||
return 0;
|
||||
}
|
||||
if (irq_bits[hw_config->irq] == -1)
|
||||
{
|
||||
printk(KERN_ERR "OPL3-SA: Bad MPU IRQ %d\n", hw_config->irq);
|
||||
return 0;
|
||||
}
|
||||
switch (hw_config->io_base)
|
||||
{
|
||||
case 0x330:
|
||||
conf = 0x00;
|
||||
break;
|
||||
case 0x332:
|
||||
conf = 0x20;
|
||||
break;
|
||||
case 0x334:
|
||||
conf = 0x40;
|
||||
break;
|
||||
case 0x300:
|
||||
conf = 0x60;
|
||||
break;
|
||||
default:
|
||||
return 0; /* Invalid port */
|
||||
}
|
||||
|
||||
conf |= 0x83; /* MPU & OPL3 (synth) & game port enable */
|
||||
conf |= irq_bits[hw_config->irq] << 2;
|
||||
|
||||
opl3sa_write(0x03, conf);
|
||||
|
||||
hw_config->name = "OPL3-SA (MPU401)";
|
||||
|
||||
return probe_uart401(hw_config, THIS_MODULE);
|
||||
}
|
||||
|
||||
static void __exit unload_opl3sa_wss(struct address_info *hw_config)
|
||||
{
|
||||
int dma2 = hw_config->dma2;
|
||||
|
||||
if (dma2 == -1)
|
||||
dma2 = hw_config->dma;
|
||||
|
||||
release_region(0xf86, 2);
|
||||
release_region(hw_config->io_base, 4);
|
||||
|
||||
ad1848_unload(hw_config->io_base + 4,
|
||||
hw_config->irq,
|
||||
hw_config->dma,
|
||||
dma2,
|
||||
0);
|
||||
sound_unload_audiodev(hw_config->slots[0]);
|
||||
}
|
||||
|
||||
static inline void __exit unload_opl3sa_mpu(struct address_info *hw_config)
|
||||
{
|
||||
unload_uart401(hw_config);
|
||||
}
|
||||
|
||||
#ifdef SB_OK
|
||||
static inline void __exit unload_opl3sa_sb(struct address_info *hw_config)
|
||||
{
|
||||
sb_dsp_unload(hw_config);
|
||||
}
|
||||
#endif
|
||||
|
||||
static int found_mpu;
|
||||
|
||||
static struct address_info cfg;
|
||||
static struct address_info cfg_mpu;
|
||||
|
||||
static int __initdata io = -1;
|
||||
static int __initdata irq = -1;
|
||||
static int __initdata dma = -1;
|
||||
static int __initdata dma2 = -1;
|
||||
static int __initdata mpu_io = -1;
|
||||
static int __initdata mpu_irq = -1;
|
||||
|
||||
module_param(io, int, 0);
|
||||
module_param(irq, int, 0);
|
||||
module_param(dma, int, 0);
|
||||
module_param(dma2, int, 0);
|
||||
module_param(mpu_io, int, 0);
|
||||
module_param(mpu_irq, int, 0);
|
||||
|
||||
static int __init init_opl3sa(void)
|
||||
{
|
||||
struct resource *ports;
|
||||
if (io == -1 || irq == -1 || dma == -1) {
|
||||
printk(KERN_ERR "opl3sa: dma, irq and io must be set.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
cfg.io_base = io;
|
||||
cfg.irq = irq;
|
||||
cfg.dma = dma;
|
||||
cfg.dma2 = dma2;
|
||||
|
||||
cfg_mpu.io_base = mpu_io;
|
||||
cfg_mpu.irq = mpu_irq;
|
||||
|
||||
ports = request_region(io + 4, 4, "ad1848");
|
||||
if (!ports)
|
||||
return -EBUSY;
|
||||
|
||||
if (!request_region(0xf86, 2, "OPL3-SA"))/* Control port is busy */ {
|
||||
release_region(io + 4, 4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!request_region(io, 4, "WSS config")) {
|
||||
release_region(0x86, 2);
|
||||
release_region(io + 4, 4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (probe_opl3sa_wss(&cfg, ports) == 0) {
|
||||
release_region(0xf86, 2);
|
||||
release_region(io, 4);
|
||||
release_region(io + 4, 4);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
found_mpu=probe_opl3sa_mpu(&cfg_mpu);
|
||||
|
||||
attach_opl3sa_wss(&cfg, ports);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit cleanup_opl3sa(void)
|
||||
{
|
||||
if(found_mpu)
|
||||
unload_opl3sa_mpu(&cfg_mpu);
|
||||
unload_opl3sa_wss(&cfg);
|
||||
}
|
||||
|
||||
module_init(init_opl3sa);
|
||||
module_exit(cleanup_opl3sa);
|
||||
|
||||
#ifndef MODULE
|
||||
static int __init setup_opl3sa(char *str)
|
||||
{
|
||||
/* io, irq, dma, dma2, mpu_io, mpu_irq */
|
||||
int ints[7];
|
||||
|
||||
str = get_options(str, ARRAY_SIZE(ints), ints);
|
||||
|
||||
io = ints[1];
|
||||
irq = ints[2];
|
||||
dma = ints[3];
|
||||
dma2 = ints[4];
|
||||
mpu_io = ints[5];
|
||||
mpu_irq = ints[6];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("opl3sa=", setup_opl3sa);
|
||||
#endif
|
||||
MODULE_LICENSE("GPL");
|
1857
sound/oss/rme96xx.c
1857
sound/oss/rme96xx.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,78 +0,0 @@
|
|||
/* (C) 2000 Guenter Geiger <geiger@debian.org>
|
||||
with copy/pastes from the driver of Winfried Ritsch <ritsch@iem.kug.ac.at>
|
||||
|
||||
Modifications - Heiko Purnhagen <purnhage@tnt.uni-hannover.de>
|
||||
HP20020116 towards REV 1.5 support, based on ALSA's card-rme9652.c
|
||||
HP20020201 completed?
|
||||
|
||||
A text/graphic control panel (rmectrl/xrmectrl) is available from
|
||||
http://gige.xdv.org/pages/soft/pages/rme
|
||||
*/
|
||||
|
||||
|
||||
#ifndef AFMT_S32_BLOCKED
|
||||
#define AFMT_S32_BLOCKED 0x0000400
|
||||
#endif
|
||||
|
||||
/* AFMT_S16_BLOCKED not yet supported */
|
||||
#ifndef AFMT_S16_BLOCKED
|
||||
#define AFMT_S16_BLOCKED 0x0000800
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct rme_status {
|
||||
unsigned int irq:1;
|
||||
unsigned int lockmask:3; /* ADAT input PLLs locked */
|
||||
/* 100=ADAT1, 010=ADAT2, 001=ADAT3 */
|
||||
unsigned int sr48:1; /* sample rate: 0=44.1/88.2 1=48/96 kHz */
|
||||
unsigned int wclock:1; /* 1=wordclock used */
|
||||
unsigned int bufpoint:10;
|
||||
unsigned int syncmask:3; /* ADAT input in sync with system clock */
|
||||
/* 100=ADAT1, 010=ADAT2, 001=ADAT3 */
|
||||
unsigned int doublespeed:1; /* sample rate: 0=44.1/48 1=88.2/96 kHz */
|
||||
unsigned int tc_busy:1;
|
||||
unsigned int tc_out:1;
|
||||
unsigned int crystalrate:3; /* spdif input sample rate: */
|
||||
/* 000=64kHz, 100=88.2kHz, 011=96kHz */
|
||||
/* 111=32kHz, 110=44.1kHz, 101=48kHz */
|
||||
unsigned int spdif_error:1; /* 1=no spdif lock */
|
||||
unsigned int bufid:1;
|
||||
unsigned int tc_valid:1; /* 1=timecode input detected */
|
||||
unsigned int spdif_read:1;
|
||||
} rme_status_t;
|
||||
|
||||
|
||||
/* only fields marked W: can be modified by writing to SOUND_MIXER_PRIVATE3 */
|
||||
typedef struct rme_control {
|
||||
unsigned int start:1;
|
||||
unsigned int latency:3; /* buffer size / latency [samples]: */
|
||||
/* 0=64 ... 7=8192 */
|
||||
unsigned int master:1; /* W: clock mode: 1=master 0=slave/auto */
|
||||
unsigned int ie:1;
|
||||
unsigned int sr48:1; /* samplerate 0=44.1/88.2, 1=48/96 kHz */
|
||||
unsigned int spare:1;
|
||||
unsigned int doublespeed:1; /* double speed 0=44.1/48, 1=88.2/96 Khz */
|
||||
unsigned int pro:1; /* W: SPDIF-OUT 0=consumer, 1=professional */
|
||||
unsigned int emphasis:1; /* W: SPDIF-OUT emphasis 0=off, 1=on */
|
||||
unsigned int dolby:1; /* W: SPDIF-OUT non-audio bit 1=set, 0=unset */
|
||||
unsigned int opt_out:1; /* W: use 1st optical OUT as SPDIF: 1=yes, 0=no */
|
||||
unsigned int wordclock:1; /* W: use Wordclock as sync (overwrites master) */
|
||||
unsigned int spdif_in:2; /* W: SPDIF-IN: */
|
||||
/* 00=optical (ADAT1), 01=coaxial (Cinch), 10=internal CDROM */
|
||||
unsigned int sync_ref:2; /* W: preferred sync-source in autosync */
|
||||
/* 00=ADAT1, 01=ADAT2, 10=ADAT3, 11=SPDIF */
|
||||
unsigned int spdif_reset:1;
|
||||
unsigned int spdif_select:1;
|
||||
unsigned int spdif_clock:1;
|
||||
unsigned int spdif_write:1;
|
||||
unsigned int adat1_cd:1; /* W: Rev 1.5+: if set, internal CD connector carries ADAT */
|
||||
} rme_ctrl_t;
|
||||
|
||||
|
||||
typedef struct _rme_mixer {
|
||||
int i_offset;
|
||||
int o_offset;
|
||||
int devnr;
|
||||
int spare[8];
|
||||
} rme_mixer;
|
||||
|
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
#include <linux/kmod.h>
|
||||
#include <linux/spinlock.h>
|
||||
#define SEQUENCER_C
|
||||
#include "sound_config.h"
|
||||
|
||||
#include "midi_ctrl.h"
|
||||
|
|
|
@ -20,10 +20,3 @@ EXPORT_SYMBOL(sound_timer_init);
|
|||
EXPORT_SYMBOL(sound_timer_interrupt);
|
||||
EXPORT_SYMBOL(sound_timer_syncinterval);
|
||||
|
||||
/* Tuning */
|
||||
|
||||
#define _SEQUENCER_C_
|
||||
#include "tuning.h"
|
||||
|
||||
EXPORT_SYMBOL(cent_tuning);
|
||||
EXPORT_SYMBOL(semitone_tuning);
|
||||
|
|
|
@ -1,207 +0,0 @@
|
|||
/*
|
||||
* sound/oss/sgalaxy.c
|
||||
*
|
||||
* Low level driver for Aztech Sound Galaxy cards.
|
||||
* Copyright 1998 Artur Skawina <skawina@geocities.com>
|
||||
*
|
||||
* Supported cards:
|
||||
* Aztech Sound Galaxy Waverider Pro 32 - 3D
|
||||
* Aztech Sound Galaxy Washington 16
|
||||
*
|
||||
* Based on cs4232.c by Hannu Savolainen and Alan Cox.
|
||||
*
|
||||
*
|
||||
* Copyright (C) by Hannu Savolainen 1993-1997
|
||||
*
|
||||
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*
|
||||
* Changes:
|
||||
* 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
|
||||
* Added __init to sb_rst() and sb_cmd()
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/module.h>
|
||||
|
||||
#include "sound_config.h"
|
||||
#include "ad1848.h"
|
||||
|
||||
static void sleep( unsigned howlong )
|
||||
{
|
||||
current->state = TASK_INTERRUPTIBLE;
|
||||
schedule_timeout(howlong);
|
||||
}
|
||||
|
||||
#define DPORT 0x80
|
||||
|
||||
/* Sound Blaster regs */
|
||||
|
||||
#define SBDSP_RESET 0x6
|
||||
#define SBDSP_READ 0xA
|
||||
#define SBDSP_COMMAND 0xC
|
||||
#define SBDSP_STATUS SBDSP_COMMAND
|
||||
#define SBDSP_DATA_AVAIL 0xE
|
||||
|
||||
static int __init sb_rst(int base)
|
||||
{
|
||||
int i;
|
||||
|
||||
outb( 1, base+SBDSP_RESET ); /* reset the DSP */
|
||||
outb( 0, base+SBDSP_RESET );
|
||||
|
||||
for ( i=0; i<500; i++ ) /* delay */
|
||||
inb(DPORT);
|
||||
|
||||
for ( i=0; i<100000; i++ )
|
||||
{
|
||||
if ( inb( base+SBDSP_DATA_AVAIL )&0x80 )
|
||||
break;
|
||||
}
|
||||
|
||||
if ( inb( base+SBDSP_READ )!=0xAA )
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int __init sb_cmd( int base, unsigned char val )
|
||||
{
|
||||
int i;
|
||||
|
||||
for ( i=100000; i; i-- )
|
||||
{
|
||||
if ( (inb( base+SBDSP_STATUS )&0x80)==0 )
|
||||
{
|
||||
outb( val, base+SBDSP_COMMAND );
|
||||
break;
|
||||
}
|
||||
}
|
||||
return i; /* i>0 == success */
|
||||
}
|
||||
|
||||
|
||||
#define ai_sgbase driver_use_1
|
||||
|
||||
static int __init probe_sgalaxy( struct address_info *ai )
|
||||
{
|
||||
struct resource *ports;
|
||||
int n;
|
||||
|
||||
if (!request_region(ai->io_base, 4, "WSS config")) {
|
||||
printk(KERN_ERR "sgalaxy: WSS IO port 0x%03x not available\n", ai->io_base);
|
||||
return 0;
|
||||
}
|
||||
|
||||
ports = request_region(ai->io_base + 4, 4, "ad1848");
|
||||
if (!ports) {
|
||||
printk(KERN_ERR "sgalaxy: WSS IO port 0x%03x not available\n", ai->io_base);
|
||||
release_region(ai->io_base, 4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (!request_region( ai->ai_sgbase, 0x10, "SoundGalaxy SB")) {
|
||||
printk(KERN_ERR "sgalaxy: SB IO port 0x%03x not available\n", ai->ai_sgbase);
|
||||
release_region(ai->io_base + 4, 4);
|
||||
release_region(ai->io_base, 4);
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (ad1848_detect(ports, NULL, ai->osp))
|
||||
goto out; /* The card is already active, check irq etc... */
|
||||
|
||||
/* switch to MSS/WSS mode */
|
||||
|
||||
sb_rst( ai->ai_sgbase );
|
||||
|
||||
sb_cmd( ai->ai_sgbase, 9 );
|
||||
sb_cmd( ai->ai_sgbase, 0 );
|
||||
|
||||
sleep( HZ/10 );
|
||||
|
||||
out:
|
||||
if (!probe_ms_sound(ai, ports)) {
|
||||
release_region(ai->io_base + 4, 4);
|
||||
release_region(ai->io_base, 4);
|
||||
release_region(ai->ai_sgbase, 0x10);
|
||||
return 0;
|
||||
}
|
||||
|
||||
attach_ms_sound(ai, ports, THIS_MODULE);
|
||||
n=ai->slots[0];
|
||||
|
||||
if (n!=-1 && audio_devs[n]->mixer_dev != -1 ) {
|
||||
AD1848_REROUTE( SOUND_MIXER_LINE1, SOUND_MIXER_LINE ); /* Line-in */
|
||||
AD1848_REROUTE( SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH ); /* FM+Wavetable*/
|
||||
AD1848_REROUTE( SOUND_MIXER_LINE3, SOUND_MIXER_CD ); /* CD */
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void __exit unload_sgalaxy( struct address_info *ai )
|
||||
{
|
||||
unload_ms_sound( ai );
|
||||
release_region( ai->ai_sgbase, 0x10 );
|
||||
}
|
||||
|
||||
static struct address_info cfg;
|
||||
|
||||
static int __initdata io = -1;
|
||||
static int __initdata irq = -1;
|
||||
static int __initdata dma = -1;
|
||||
static int __initdata dma2 = -1;
|
||||
static int __initdata sgbase = -1;
|
||||
|
||||
module_param(io, int, 0);
|
||||
module_param(irq, int, 0);
|
||||
module_param(dma, int, 0);
|
||||
module_param(dma2, int, 0);
|
||||
module_param(sgbase, int, 0);
|
||||
|
||||
static int __init init_sgalaxy(void)
|
||||
{
|
||||
cfg.io_base = io;
|
||||
cfg.irq = irq;
|
||||
cfg.dma = dma;
|
||||
cfg.dma2 = dma2;
|
||||
cfg.ai_sgbase = sgbase;
|
||||
|
||||
if (cfg.io_base == -1 || cfg.irq == -1 || cfg.dma == -1 || cfg.ai_sgbase == -1 ) {
|
||||
printk(KERN_ERR "sgalaxy: io, irq, dma and sgbase must be set.\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if ( probe_sgalaxy(&cfg) == 0 )
|
||||
return -ENODEV;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit cleanup_sgalaxy(void)
|
||||
{
|
||||
unload_sgalaxy(&cfg);
|
||||
}
|
||||
|
||||
module_init(init_sgalaxy);
|
||||
module_exit(cleanup_sgalaxy);
|
||||
|
||||
#ifndef MODULE
|
||||
static int __init setup_sgalaxy(char *str)
|
||||
{
|
||||
/* io, irq, dma, dma2, sgbase */
|
||||
int ints[6];
|
||||
|
||||
str = get_options(str, ARRAY_SIZE(ints), ints);
|
||||
io = ints[1];
|
||||
irq = ints[2];
|
||||
dma = ints[3];
|
||||
dma2 = ints[4];
|
||||
sgbase = ints[5];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup("sgalaxy=", setup_sgalaxy);
|
||||
#endif
|
||||
MODULE_LICENSE("GPL");
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -13,8 +13,6 @@ int DMAbuf_move_wrpointer(int dev, int l);
|
|||
void DMAbuf_init(int dev, int dma1, int dma2);
|
||||
void DMAbuf_deinit(int dev);
|
||||
int DMAbuf_start_dma (int dev, unsigned long physaddr, int count, int dma_mode);
|
||||
int DMAbuf_open_dma (int dev);
|
||||
void DMAbuf_close_dma (int dev);
|
||||
void DMAbuf_inputintr(int dev);
|
||||
void DMAbuf_outputintr(int dev, int underflow_flag);
|
||||
struct dma_buffparms;
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
#ifdef SEQUENCER_C
|
||||
|
||||
unsigned short semitone_tuning[24] =
|
||||
static unsigned short semitone_tuning[24] =
|
||||
{
|
||||
/* 0 */ 10000, 10595, 11225, 11892, 12599, 13348, 14142, 14983,
|
||||
/* 8 */ 15874, 16818, 17818, 18877, 20000, 21189, 22449, 23784,
|
||||
/* 16 */ 25198, 26697, 28284, 29966, 31748, 33636, 35636, 37755
|
||||
};
|
||||
|
||||
unsigned short cent_tuning[100] =
|
||||
static unsigned short cent_tuning[100] =
|
||||
{
|
||||
/* 0 */ 10000, 10006, 10012, 10017, 10023, 10029, 10035, 10041,
|
||||
/* 8 */ 10046, 10052, 10058, 10064, 10070, 10075, 10081, 10087,
|
||||
|
@ -23,7 +21,3 @@ unsigned short cent_tuning[100] =
|
|||
/* 88 */ 10521, 10528, 10534, 10540, 10546, 10552, 10558, 10564,
|
||||
/* 96 */ 10570, 10576, 10582, 10589
|
||||
};
|
||||
#else
|
||||
extern unsigned short semitone_tuning[24];
|
||||
extern unsigned short cent_tuning[100];
|
||||
#endif
|
||||
|
|
3554
sound/oss/wavfront.c
3554
sound/oss/wavfront.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,880 +0,0 @@
|
|||
/*
|
||||
* sound/oss/wf_midi.c
|
||||
*
|
||||
* The low level driver for the WaveFront ICS2115 MIDI interface(s)
|
||||
* Note that there is also an MPU-401 emulation (actually, a UART-401
|
||||
* emulation) on the CS4232 on the Tropez Plus. This code has nothing
|
||||
* to do with that interface at all.
|
||||
*
|
||||
* The interface is essentially just a UART-401, but is has the
|
||||
* interesting property of supporting what Turtle Beach called
|
||||
* "Virtual MIDI" mode. In this mode, there are effectively *two*
|
||||
* MIDI buses accessible via the interface, one that is routed
|
||||
* solely to/from the external WaveFront synthesizer and the other
|
||||
* corresponding to the pin/socket connector used to link external
|
||||
* MIDI devices to the board.
|
||||
*
|
||||
* This driver fully supports this mode, allowing two distinct
|
||||
* midi devices (/dev/midiNN and /dev/midiNN+1) to be used
|
||||
* completely independently, giving 32 channels of MIDI routing,
|
||||
* 16 to the WaveFront synth and 16 to the external MIDI bus.
|
||||
*
|
||||
* Switching between the two is accomplished externally by the driver
|
||||
* using the two otherwise unused MIDI bytes. See the code for more details.
|
||||
*
|
||||
* NOTE: VIRTUAL MIDI MODE IS ON BY DEFAULT (see wavefront.c)
|
||||
*
|
||||
* The main reason to turn off Virtual MIDI mode is when you want to
|
||||
* tightly couple the WaveFront synth with an external MIDI
|
||||
* device. You won't be able to distinguish the source of any MIDI
|
||||
* data except via SysEx ID, but thats probably OK, since for the most
|
||||
* part, the WaveFront won't be sending any MIDI data at all.
|
||||
*
|
||||
* The main reason to turn on Virtual MIDI Mode is to provide two
|
||||
* completely independent 16-channel MIDI buses, one to the
|
||||
* WaveFront and one to any external MIDI devices. Given the 32
|
||||
* voice nature of the WaveFront, its pretty easy to find a use
|
||||
* for all 16 channels driving just that synth.
|
||||
*
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) by Paul Barton-Davis 1998
|
||||
* Some portions of this file are derived from work that is:
|
||||
*
|
||||
* CopyriGht (C) by Hannu Savolainen 1993-1996
|
||||
*
|
||||
* USS/Lite for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
|
||||
* Version 2 (June 1991). See the "COPYING" file distributed with this software
|
||||
* for more info.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include "sound_config.h"
|
||||
|
||||
#include <linux/wavefront.h>
|
||||
|
||||
#ifdef MODULE
|
||||
|
||||
struct wf_mpu_config {
|
||||
int base;
|
||||
#define DATAPORT(d) (d)->base
|
||||
#define COMDPORT(d) (d)->base+1
|
||||
#define STATPORT(d) (d)->base+1
|
||||
|
||||
int irq;
|
||||
int opened;
|
||||
int devno;
|
||||
int synthno;
|
||||
int mode;
|
||||
#define MODE_MIDI 1
|
||||
#define MODE_SYNTH 2
|
||||
|
||||
void (*inputintr) (int dev, unsigned char data);
|
||||
char isvirtual; /* do virtual I/O stuff */
|
||||
};
|
||||
|
||||
static struct wf_mpu_config devs[2];
|
||||
static struct wf_mpu_config *phys_dev = &devs[0];
|
||||
static struct wf_mpu_config *virt_dev = &devs[1];
|
||||
|
||||
static void start_uart_mode (void);
|
||||
static DEFINE_SPINLOCK(lock);
|
||||
|
||||
#define OUTPUT_READY 0x40
|
||||
#define INPUT_AVAIL 0x80
|
||||
#define MPU_ACK 0xFE
|
||||
#define UART_MODE_ON 0x3F
|
||||
|
||||
static inline int wf_mpu_status (void)
|
||||
{
|
||||
return inb (STATPORT (phys_dev));
|
||||
}
|
||||
|
||||
static inline int input_avail (void)
|
||||
{
|
||||
return !(wf_mpu_status() & INPUT_AVAIL);
|
||||
}
|
||||
|
||||
static inline int output_ready (void)
|
||||
{
|
||||
return !(wf_mpu_status() & OUTPUT_READY);
|
||||
}
|
||||
|
||||
static inline int read_data (void)
|
||||
{
|
||||
return inb (DATAPORT (phys_dev));
|
||||
}
|
||||
|
||||
static inline void write_data (unsigned char byte)
|
||||
{
|
||||
outb (byte, DATAPORT (phys_dev));
|
||||
}
|
||||
|
||||
/*
|
||||
* States for the input scanner (should be in dev_table.h)
|
||||
*/
|
||||
|
||||
#define MST_SYSMSG 100 /* System message (sysx etc). */
|
||||
#define MST_MTC 102 /* Midi Time Code (MTC) qframe msg */
|
||||
#define MST_SONGSEL 103 /* Song select */
|
||||
#define MST_SONGPOS 104 /* Song position pointer */
|
||||
#define MST_TIMED 105 /* Leading timing byte rcvd */
|
||||
|
||||
/* buffer space check for input scanner */
|
||||
|
||||
#define BUFTEST(mi) if (mi->m_ptr >= MI_MAX || mi->m_ptr < 0) \
|
||||
{printk(KERN_ERR "WF-MPU: Invalid buffer pointer %d/%d, s=%d\n", \
|
||||
mi->m_ptr, mi->m_left, mi->m_state);mi->m_ptr--;}
|
||||
|
||||
static unsigned char len_tab[] = /* # of data bytes following a status
|
||||
*/
|
||||
{
|
||||
2, /* 8x */
|
||||
2, /* 9x */
|
||||
2, /* Ax */
|
||||
2, /* Bx */
|
||||
1, /* Cx */
|
||||
1, /* Dx */
|
||||
2, /* Ex */
|
||||
0 /* Fx */
|
||||
};
|
||||
|
||||
static int
|
||||
wf_mpu_input_scanner (int devno, int synthdev, unsigned char midic)
|
||||
|
||||
{
|
||||
struct midi_input_info *mi = &midi_devs[devno]->in_info;
|
||||
|
||||
switch (mi->m_state) {
|
||||
case MST_INIT:
|
||||
switch (midic) {
|
||||
case 0xf8:
|
||||
/* Timer overflow */
|
||||
break;
|
||||
|
||||
case 0xfc:
|
||||
break;
|
||||
|
||||
case 0xfd:
|
||||
/* XXX do something useful with this. If there is
|
||||
an external MIDI timer (e.g. a hardware sequencer,
|
||||
a useful timer can be derived ...
|
||||
|
||||
For now, no timer support.
|
||||
*/
|
||||
break;
|
||||
|
||||
case 0xfe:
|
||||
return MPU_ACK;
|
||||
break;
|
||||
|
||||
case 0xf0:
|
||||
case 0xf1:
|
||||
case 0xf2:
|
||||
case 0xf3:
|
||||
case 0xf4:
|
||||
case 0xf5:
|
||||
case 0xf6:
|
||||
case 0xf7:
|
||||
break;
|
||||
|
||||
case 0xf9:
|
||||
break;
|
||||
|
||||
case 0xff:
|
||||
mi->m_state = MST_SYSMSG;
|
||||
break;
|
||||
|
||||
default:
|
||||
if (midic <= 0xef) {
|
||||
mi->m_state = MST_TIMED;
|
||||
}
|
||||
else
|
||||
printk (KERN_ERR "<MPU: Unknown event %02x> ",
|
||||
midic);
|
||||
}
|
||||
break;
|
||||
|
||||
case MST_TIMED:
|
||||
{
|
||||
int msg = ((int) (midic & 0xf0) >> 4);
|
||||
|
||||
mi->m_state = MST_DATA;
|
||||
|
||||
if (msg < 8) { /* Data byte */
|
||||
|
||||
msg = ((int) (mi->m_prev_status & 0xf0) >> 4);
|
||||
msg -= 8;
|
||||
mi->m_left = len_tab[msg] - 1;
|
||||
|
||||
mi->m_ptr = 2;
|
||||
mi->m_buf[0] = mi->m_prev_status;
|
||||
mi->m_buf[1] = midic;
|
||||
|
||||
if (mi->m_left <= 0) {
|
||||
mi->m_state = MST_INIT;
|
||||
do_midi_msg (synthdev, mi->m_buf, mi->m_ptr);
|
||||
mi->m_ptr = 0;
|
||||
}
|
||||
} else if (msg == 0xf) { /* MPU MARK */
|
||||
|
||||
mi->m_state = MST_INIT;
|
||||
|
||||
switch (midic) {
|
||||
case 0xf8:
|
||||
break;
|
||||
|
||||
case 0xf9:
|
||||
break;
|
||||
|
||||
case 0xfc:
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
mi->m_prev_status = midic;
|
||||
msg -= 8;
|
||||
mi->m_left = len_tab[msg];
|
||||
|
||||
mi->m_ptr = 1;
|
||||
mi->m_buf[0] = midic;
|
||||
|
||||
if (mi->m_left <= 0) {
|
||||
mi->m_state = MST_INIT;
|
||||
do_midi_msg (synthdev, mi->m_buf, mi->m_ptr);
|
||||
mi->m_ptr = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case MST_SYSMSG:
|
||||
switch (midic) {
|
||||
case 0xf0:
|
||||
mi->m_state = MST_SYSEX;
|
||||
break;
|
||||
|
||||
case 0xf1:
|
||||
mi->m_state = MST_MTC;
|
||||
break;
|
||||
|
||||
case 0xf2:
|
||||
mi->m_state = MST_SONGPOS;
|
||||
mi->m_ptr = 0;
|
||||
break;
|
||||
|
||||
case 0xf3:
|
||||
mi->m_state = MST_SONGSEL;
|
||||
break;
|
||||
|
||||
case 0xf6:
|
||||
mi->m_state = MST_INIT;
|
||||
|
||||
/*
|
||||
* Real time messages
|
||||
*/
|
||||
case 0xf8:
|
||||
/* midi clock */
|
||||
mi->m_state = MST_INIT;
|
||||
/* XXX need ext MIDI timer support */
|
||||
break;
|
||||
|
||||
case 0xfA:
|
||||
mi->m_state = MST_INIT;
|
||||
/* XXX need ext MIDI timer support */
|
||||
break;
|
||||
|
||||
case 0xFB:
|
||||
mi->m_state = MST_INIT;
|
||||
/* XXX need ext MIDI timer support */
|
||||
break;
|
||||
|
||||
case 0xFC:
|
||||
mi->m_state = MST_INIT;
|
||||
/* XXX need ext MIDI timer support */
|
||||
break;
|
||||
|
||||
case 0xFE:
|
||||
/* active sensing */
|
||||
mi->m_state = MST_INIT;
|
||||
break;
|
||||
|
||||
case 0xff:
|
||||
mi->m_state = MST_INIT;
|
||||
break;
|
||||
|
||||
default:
|
||||
printk (KERN_ERR "unknown MIDI sysmsg %0x\n", midic);
|
||||
mi->m_state = MST_INIT;
|
||||
}
|
||||
break;
|
||||
|
||||
case MST_MTC:
|
||||
mi->m_state = MST_INIT;
|
||||
break;
|
||||
|
||||
case MST_SYSEX:
|
||||
if (midic == 0xf7) {
|
||||
mi->m_state = MST_INIT;
|
||||
} else {
|
||||
/* XXX fix me */
|
||||
}
|
||||
break;
|
||||
|
||||
case MST_SONGPOS:
|
||||
BUFTEST (mi);
|
||||
mi->m_buf[mi->m_ptr++] = midic;
|
||||
if (mi->m_ptr == 2) {
|
||||
mi->m_state = MST_INIT;
|
||||
mi->m_ptr = 0;
|
||||
/* XXX need ext MIDI timer support */
|
||||
}
|
||||
break;
|
||||
|
||||
case MST_DATA:
|
||||
BUFTEST (mi);
|
||||
mi->m_buf[mi->m_ptr++] = midic;
|
||||
if ((--mi->m_left) <= 0) {
|
||||
mi->m_state = MST_INIT;
|
||||
do_midi_msg (synthdev, mi->m_buf, mi->m_ptr);
|
||||
mi->m_ptr = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
printk (KERN_ERR "Bad state %d ", mi->m_state);
|
||||
mi->m_state = MST_INIT;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static irqreturn_t
|
||||
wf_mpuintr(int irq, void *dev_id, struct pt_regs *dummy)
|
||||
|
||||
{
|
||||
struct wf_mpu_config *physical_dev = dev_id;
|
||||
static struct wf_mpu_config *input_dev;
|
||||
struct midi_input_info *mi = &midi_devs[physical_dev->devno]->in_info;
|
||||
int n;
|
||||
|
||||
if (!input_avail()) { /* not for us */
|
||||
return IRQ_NONE;
|
||||
}
|
||||
|
||||
if (mi->m_busy)
|
||||
return IRQ_HANDLED;
|
||||
spin_lock(&lock);
|
||||
mi->m_busy = 1;
|
||||
|
||||
if (!input_dev) {
|
||||
input_dev = physical_dev;
|
||||
}
|
||||
|
||||
n = 50; /* XXX why ? */
|
||||
|
||||
do {
|
||||
unsigned char c = read_data ();
|
||||
|
||||
if (phys_dev->isvirtual) {
|
||||
|
||||
if (c == WF_EXTERNAL_SWITCH) {
|
||||
input_dev = virt_dev;
|
||||
continue;
|
||||
} else if (c == WF_INTERNAL_SWITCH) {
|
||||
input_dev = phys_dev;
|
||||
continue;
|
||||
} /* else just leave it as it is */
|
||||
|
||||
} else {
|
||||
input_dev = phys_dev;
|
||||
}
|
||||
|
||||
if (input_dev->mode == MODE_SYNTH) {
|
||||
|
||||
wf_mpu_input_scanner (input_dev->devno,
|
||||
input_dev->synthno, c);
|
||||
|
||||
} else if (input_dev->opened & OPEN_READ) {
|
||||
|
||||
if (input_dev->inputintr) {
|
||||
input_dev->inputintr (input_dev->devno, c);
|
||||
}
|
||||
}
|
||||
|
||||
} while (input_avail() && n-- > 0);
|
||||
|
||||
mi->m_busy = 0;
|
||||
spin_unlock(&lock);
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int
|
||||
wf_mpu_open (int dev, int mode,
|
||||
void (*input) (int dev, unsigned char data),
|
||||
void (*output) (int dev)
|
||||
)
|
||||
{
|
||||
struct wf_mpu_config *devc;
|
||||
|
||||
if (dev < 0 || dev >= num_midis || midi_devs[dev]==NULL)
|
||||
return -(ENXIO);
|
||||
|
||||
if (phys_dev->devno == dev) {
|
||||
devc = phys_dev;
|
||||
} else if (phys_dev->isvirtual && virt_dev->devno == dev) {
|
||||
devc = virt_dev;
|
||||
} else {
|
||||
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
|
||||
return -(EINVAL);
|
||||
}
|
||||
|
||||
if (devc->opened) {
|
||||
return -(EBUSY);
|
||||
}
|
||||
|
||||
devc->mode = MODE_MIDI;
|
||||
devc->opened = mode;
|
||||
devc->synthno = 0;
|
||||
|
||||
devc->inputintr = input;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
wf_mpu_close (int dev)
|
||||
{
|
||||
struct wf_mpu_config *devc;
|
||||
|
||||
if (dev < 0 || dev >= num_midis || midi_devs[dev]==NULL)
|
||||
return;
|
||||
|
||||
if (phys_dev->devno == dev) {
|
||||
devc = phys_dev;
|
||||
} else if (phys_dev->isvirtual && virt_dev->devno == dev) {
|
||||
devc = virt_dev;
|
||||
} else {
|
||||
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
|
||||
return;
|
||||
}
|
||||
|
||||
devc->mode = 0;
|
||||
devc->inputintr = NULL;
|
||||
devc->opened = 0;
|
||||
}
|
||||
|
||||
static int
|
||||
wf_mpu_out (int dev, unsigned char midi_byte)
|
||||
{
|
||||
int timeout;
|
||||
unsigned long flags;
|
||||
static int lastoutdev = -1;
|
||||
unsigned char switchch;
|
||||
|
||||
if (phys_dev->isvirtual && lastoutdev != dev) {
|
||||
|
||||
if (dev == phys_dev->devno) {
|
||||
switchch = WF_INTERNAL_SWITCH;
|
||||
} else if (dev == virt_dev->devno) {
|
||||
switchch = WF_EXTERNAL_SWITCH;
|
||||
} else {
|
||||
printk (KERN_ERR "WF-MPU: bad device number %d", dev);
|
||||
return (0);
|
||||
}
|
||||
|
||||
/* XXX fix me */
|
||||
|
||||
for (timeout = 30000; timeout > 0 && !output_ready ();
|
||||
timeout--);
|
||||
|
||||
spin_lock_irqsave(&lock,flags);
|
||||
|
||||
if (!output_ready ()) {
|
||||
printk (KERN_WARNING "WF-MPU: Send switch "
|
||||
"byte timeout\n");
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
return 0;
|
||||
}
|
||||
|
||||
write_data (switchch);
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
}
|
||||
|
||||
lastoutdev = dev;
|
||||
|
||||
/*
|
||||
* Sometimes it takes about 30000 loops before the output becomes ready
|
||||
* (After reset). Normally it takes just about 10 loops.
|
||||
*/
|
||||
|
||||
/* XXX fix me */
|
||||
|
||||
for (timeout = 30000; timeout > 0 && !output_ready (); timeout--);
|
||||
|
||||
spin_lock_irqsave(&lock,flags);
|
||||
if (!output_ready ()) {
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
printk (KERN_WARNING "WF-MPU: Send data timeout\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
write_data (midi_byte);
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline int wf_mpu_start_read (int dev) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int wf_mpu_end_read (int dev) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int wf_mpu_ioctl (int dev, unsigned cmd, void __user *arg)
|
||||
{
|
||||
printk (KERN_WARNING
|
||||
"WF-MPU: Intelligent mode not supported by hardware.\n");
|
||||
return -(EINVAL);
|
||||
}
|
||||
|
||||
static int wf_mpu_buffer_status (int dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct synth_operations wf_mpu_synth_operations[2];
|
||||
static struct midi_operations wf_mpu_midi_operations[2];
|
||||
|
||||
static struct midi_operations wf_mpu_midi_proto =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.info = {"WF-MPU MIDI", 0, MIDI_CAP_MPU401, SNDCARD_MPU401},
|
||||
.in_info = {0}, /* in_info */
|
||||
.open = wf_mpu_open,
|
||||
.close = wf_mpu_close,
|
||||
.ioctl = wf_mpu_ioctl,
|
||||
.outputc = wf_mpu_out,
|
||||
.start_read = wf_mpu_start_read,
|
||||
.end_read = wf_mpu_end_read,
|
||||
.buffer_status = wf_mpu_buffer_status,
|
||||
};
|
||||
|
||||
static struct synth_info wf_mpu_synth_info_proto =
|
||||
{"WaveFront MPU-401 interface", 0,
|
||||
SYNTH_TYPE_MIDI, MIDI_TYPE_MPU401, 0, 128, 0, 128, SYNTH_CAP_INPUT};
|
||||
|
||||
static struct synth_info wf_mpu_synth_info[2];
|
||||
|
||||
static int
|
||||
wf_mpu_synth_ioctl (int dev, unsigned int cmd, void __user *arg)
|
||||
{
|
||||
int midi_dev;
|
||||
int index;
|
||||
|
||||
midi_dev = synth_devs[dev]->midi_dev;
|
||||
|
||||
if (midi_dev < 0 || midi_dev > num_midis || midi_devs[midi_dev]==NULL)
|
||||
return -(ENXIO);
|
||||
|
||||
if (midi_dev == phys_dev->devno) {
|
||||
index = 0;
|
||||
} else if (phys_dev->isvirtual && midi_dev == virt_dev->devno) {
|
||||
index = 1;
|
||||
} else {
|
||||
return -(EINVAL);
|
||||
}
|
||||
|
||||
switch (cmd) {
|
||||
|
||||
case SNDCTL_SYNTH_INFO:
|
||||
if (copy_to_user(arg,
|
||||
&wf_mpu_synth_info[index],
|
||||
sizeof (struct synth_info)))
|
||||
return -EFAULT;
|
||||
return 0;
|
||||
|
||||
case SNDCTL_SYNTH_MEMAVL:
|
||||
return 0x7fffffff;
|
||||
|
||||
default:
|
||||
return -EINVAL;
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
wf_mpu_synth_open (int dev, int mode)
|
||||
{
|
||||
int midi_dev;
|
||||
struct wf_mpu_config *devc;
|
||||
|
||||
midi_dev = synth_devs[dev]->midi_dev;
|
||||
|
||||
if (midi_dev < 0 || midi_dev > num_midis || midi_devs[midi_dev]==NULL) {
|
||||
return -(ENXIO);
|
||||
}
|
||||
|
||||
if (phys_dev->devno == midi_dev) {
|
||||
devc = phys_dev;
|
||||
} else if (phys_dev->isvirtual && virt_dev->devno == midi_dev) {
|
||||
devc = virt_dev;
|
||||
} else {
|
||||
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
|
||||
return -(EINVAL);
|
||||
}
|
||||
|
||||
if (devc->opened) {
|
||||
return -(EBUSY);
|
||||
}
|
||||
|
||||
devc->mode = MODE_SYNTH;
|
||||
devc->synthno = dev;
|
||||
devc->opened = mode;
|
||||
devc->inputintr = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
wf_mpu_synth_close (int dev)
|
||||
{
|
||||
int midi_dev;
|
||||
struct wf_mpu_config *devc;
|
||||
|
||||
midi_dev = synth_devs[dev]->midi_dev;
|
||||
|
||||
if (phys_dev->devno == midi_dev) {
|
||||
devc = phys_dev;
|
||||
} else if (phys_dev->isvirtual && virt_dev->devno == midi_dev) {
|
||||
devc = virt_dev;
|
||||
} else {
|
||||
printk (KERN_ERR "WF-MPU: unknown device number %d\n", dev);
|
||||
return;
|
||||
}
|
||||
|
||||
devc->inputintr = NULL;
|
||||
devc->opened = 0;
|
||||
devc->mode = 0;
|
||||
}
|
||||
|
||||
#define _MIDI_SYNTH_C_
|
||||
#define MIDI_SYNTH_NAME "WaveFront (MIDI)"
|
||||
#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT
|
||||
#include "midi_synth.h"
|
||||
|
||||
static struct synth_operations wf_mpu_synth_proto =
|
||||
{
|
||||
.owner = THIS_MODULE,
|
||||
.id = "WaveFront (ICS2115)",
|
||||
.info = NULL, /* info field, filled in during configuration */
|
||||
.midi_dev = 0, /* MIDI dev XXX should this be -1 ? */
|
||||
.synth_type = SYNTH_TYPE_MIDI,
|
||||
.synth_subtype = SAMPLE_TYPE_WAVEFRONT,
|
||||
.open = wf_mpu_synth_open,
|
||||
.close = wf_mpu_synth_close,
|
||||
.ioctl = wf_mpu_synth_ioctl,
|
||||
.kill_note = midi_synth_kill_note,
|
||||
.start_note = midi_synth_start_note,
|
||||
.set_instr = midi_synth_set_instr,
|
||||
.reset = midi_synth_reset,
|
||||
.hw_control = midi_synth_hw_control,
|
||||
.load_patch = midi_synth_load_patch,
|
||||
.aftertouch = midi_synth_aftertouch,
|
||||
.controller = midi_synth_controller,
|
||||
.panning = midi_synth_panning,
|
||||
.bender = midi_synth_bender,
|
||||
.setup_voice = midi_synth_setup_voice,
|
||||
.send_sysex = midi_synth_send_sysex
|
||||
};
|
||||
|
||||
static int
|
||||
config_wf_mpu (struct wf_mpu_config *dev)
|
||||
|
||||
{
|
||||
int is_external;
|
||||
char *name;
|
||||
int index;
|
||||
|
||||
if (dev == phys_dev) {
|
||||
name = "WaveFront internal MIDI";
|
||||
is_external = 0;
|
||||
index = 0;
|
||||
memcpy ((char *) &wf_mpu_synth_operations[index],
|
||||
(char *) &wf_mpu_synth_proto,
|
||||
sizeof (struct synth_operations));
|
||||
} else {
|
||||
name = "WaveFront external MIDI";
|
||||
is_external = 1;
|
||||
index = 1;
|
||||
/* no synth operations for an external MIDI interface */
|
||||
}
|
||||
|
||||
memcpy ((char *) &wf_mpu_synth_info[dev->devno],
|
||||
(char *) &wf_mpu_synth_info_proto,
|
||||
sizeof (struct synth_info));
|
||||
|
||||
strcpy (wf_mpu_synth_info[index].name, name);
|
||||
|
||||
wf_mpu_synth_operations[index].midi_dev = dev->devno;
|
||||
wf_mpu_synth_operations[index].info = &wf_mpu_synth_info[index];
|
||||
|
||||
memcpy ((char *) &wf_mpu_midi_operations[index],
|
||||
(char *) &wf_mpu_midi_proto,
|
||||
sizeof (struct midi_operations));
|
||||
|
||||
if (is_external) {
|
||||
wf_mpu_midi_operations[index].converter = NULL;
|
||||
} else {
|
||||
wf_mpu_midi_operations[index].converter =
|
||||
&wf_mpu_synth_operations[index];
|
||||
}
|
||||
|
||||
strcpy (wf_mpu_midi_operations[index].info.name, name);
|
||||
|
||||
midi_devs[dev->devno] = &wf_mpu_midi_operations[index];
|
||||
midi_devs[dev->devno]->in_info.m_busy = 0;
|
||||
midi_devs[dev->devno]->in_info.m_state = MST_INIT;
|
||||
midi_devs[dev->devno]->in_info.m_ptr = 0;
|
||||
midi_devs[dev->devno]->in_info.m_left = 0;
|
||||
midi_devs[dev->devno]->in_info.m_prev_status = 0;
|
||||
|
||||
devs[index].opened = 0;
|
||||
devs[index].mode = 0;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
int virtual_midi_enable (void)
|
||||
|
||||
{
|
||||
if ((virt_dev->devno < 0) &&
|
||||
(virt_dev->devno = sound_alloc_mididev()) == -1) {
|
||||
printk (KERN_ERR
|
||||
"WF-MPU: too many midi devices detected\n");
|
||||
return -1;
|
||||
}
|
||||
|
||||
config_wf_mpu (virt_dev);
|
||||
|
||||
phys_dev->isvirtual = 1;
|
||||
return virt_dev->devno;
|
||||
}
|
||||
|
||||
int
|
||||
virtual_midi_disable (void)
|
||||
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&lock,flags);
|
||||
|
||||
wf_mpu_close (virt_dev->devno);
|
||||
/* no synth on virt_dev, so no need to call wf_mpu_synth_close() */
|
||||
phys_dev->isvirtual = 0;
|
||||
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __init detect_wf_mpu (int irq, int io_base)
|
||||
{
|
||||
if (!request_region(io_base, 2, "wavefront midi")) {
|
||||
printk (KERN_WARNING "WF-MPU: I/O port %x already in use.\n",
|
||||
io_base);
|
||||
return -1;
|
||||
}
|
||||
|
||||
phys_dev->base = io_base;
|
||||
phys_dev->irq = irq;
|
||||
phys_dev->devno = -1;
|
||||
virt_dev->devno = -1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __init install_wf_mpu (void)
|
||||
{
|
||||
if ((phys_dev->devno = sound_alloc_mididev()) < 0){
|
||||
|
||||
printk (KERN_ERR "WF-MPU: Too many MIDI devices detected.\n");
|
||||
release_region(phys_dev->base, 2);
|
||||
return -1;
|
||||
}
|
||||
|
||||
phys_dev->isvirtual = 0;
|
||||
|
||||
if (config_wf_mpu (phys_dev)) {
|
||||
|
||||
printk (KERN_WARNING
|
||||
"WF-MPU: configuration for MIDI device %d failed\n",
|
||||
phys_dev->devno);
|
||||
sound_unload_mididev (phys_dev->devno);
|
||||
|
||||
}
|
||||
|
||||
/* OK, now we're configured to handle an interrupt ... */
|
||||
|
||||
if (request_irq (phys_dev->irq, wf_mpuintr, IRQF_DISABLED|IRQF_SHARED,
|
||||
"wavefront midi", phys_dev) < 0) {
|
||||
|
||||
printk (KERN_ERR "WF-MPU: Failed to allocate IRQ%d\n",
|
||||
phys_dev->irq);
|
||||
return -1;
|
||||
|
||||
}
|
||||
|
||||
/* This being a WaveFront (ICS-2115) emulated MPU-401, we have
|
||||
to switch it into UART (dumb) mode, because otherwise, it
|
||||
won't do anything at all.
|
||||
*/
|
||||
|
||||
start_uart_mode ();
|
||||
|
||||
return phys_dev->devno;
|
||||
}
|
||||
|
||||
void
|
||||
uninstall_wf_mpu (void)
|
||||
|
||||
{
|
||||
release_region (phys_dev->base, 2);
|
||||
free_irq (phys_dev->irq, phys_dev);
|
||||
sound_unload_mididev (phys_dev->devno);
|
||||
|
||||
if (virt_dev->devno >= 0) {
|
||||
sound_unload_mididev (virt_dev->devno);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
start_uart_mode (void)
|
||||
|
||||
{
|
||||
int ok, i;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&lock,flags);
|
||||
|
||||
/* XXX fix me */
|
||||
|
||||
for (i = 0; i < 30000 && !output_ready (); i++);
|
||||
|
||||
outb (UART_MODE_ON, COMDPORT(phys_dev));
|
||||
|
||||
for (ok = 0, i = 50000; i > 0 && !ok; i--) {
|
||||
if (input_avail ()) {
|
||||
if (read_data () == MPU_ACK) {
|
||||
ok = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
spin_unlock_irqrestore(&lock,flags);
|
||||
}
|
||||
#endif
|
2692
sound/oss/ymfpci.c
2692
sound/oss/ymfpci.c
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,361 +0,0 @@
|
|||
#ifndef __YMFPCI_H
|
||||
#define __YMFPCI_H
|
||||
|
||||
/*
|
||||
* Copyright (c) by Jaroslav Kysela <perex@suse.cz>
|
||||
* Definitions for Yahama YMF724/740/744/754 chips
|
||||
*
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
*/
|
||||
#include <linux/config.h>
|
||||
#include <linux/mutex.h>
|
||||
|
||||
/*
|
||||
* Direct registers
|
||||
*/
|
||||
|
||||
/* #define YMFREG(codec, reg) (codec->port + YDSXGR_##reg) */
|
||||
|
||||
#define YDSXGR_INTFLAG 0x0004
|
||||
#define YDSXGR_ACTIVITY 0x0006
|
||||
#define YDSXGR_GLOBALCTRL 0x0008
|
||||
#define YDSXGR_ZVCTRL 0x000A
|
||||
#define YDSXGR_TIMERCTRL 0x0010
|
||||
#define YDSXGR_TIMERCTRL_TEN 0x0001
|
||||
#define YDSXGR_TIMERCTRL_TIEN 0x0002
|
||||
#define YDSXGR_TIMERCOUNT 0x0012
|
||||
#define YDSXGR_SPDIFOUTCTRL 0x0018
|
||||
#define YDSXGR_SPDIFOUTSTATUS 0x001C
|
||||
#define YDSXGR_EEPROMCTRL 0x0020
|
||||
#define YDSXGR_SPDIFINCTRL 0x0034
|
||||
#define YDSXGR_SPDIFINSTATUS 0x0038
|
||||
#define YDSXGR_DSPPROGRAMDL 0x0048
|
||||
#define YDSXGR_DLCNTRL 0x004C
|
||||
#define YDSXGR_GPIOININTFLAG 0x0050
|
||||
#define YDSXGR_GPIOININTENABLE 0x0052
|
||||
#define YDSXGR_GPIOINSTATUS 0x0054
|
||||
#define YDSXGR_GPIOOUTCTRL 0x0056
|
||||
#define YDSXGR_GPIOFUNCENABLE 0x0058
|
||||
#define YDSXGR_GPIOTYPECONFIG 0x005A
|
||||
#define YDSXGR_AC97CMDDATA 0x0060
|
||||
#define YDSXGR_AC97CMDADR 0x0062
|
||||
#define YDSXGR_PRISTATUSDATA 0x0064
|
||||
#define YDSXGR_PRISTATUSADR 0x0066
|
||||
#define YDSXGR_SECSTATUSDATA 0x0068
|
||||
#define YDSXGR_SECSTATUSADR 0x006A
|
||||
#define YDSXGR_SECCONFIG 0x0070
|
||||
#define YDSXGR_LEGACYOUTVOL 0x0080
|
||||
#define YDSXGR_LEGACYOUTVOLL 0x0080
|
||||
#define YDSXGR_LEGACYOUTVOLR 0x0082
|
||||
#define YDSXGR_NATIVEDACOUTVOL 0x0084
|
||||
#define YDSXGR_NATIVEDACOUTVOLL 0x0084
|
||||
#define YDSXGR_NATIVEDACOUTVOLR 0x0086
|
||||
#define YDSXGR_SPDIFOUTVOL 0x0088
|
||||
#define YDSXGR_SPDIFOUTVOLL 0x0088
|
||||
#define YDSXGR_SPDIFOUTVOLR 0x008A
|
||||
#define YDSXGR_AC3OUTVOL 0x008C
|
||||
#define YDSXGR_AC3OUTVOLL 0x008C
|
||||
#define YDSXGR_AC3OUTVOLR 0x008E
|
||||
#define YDSXGR_PRIADCOUTVOL 0x0090
|
||||
#define YDSXGR_PRIADCOUTVOLL 0x0090
|
||||
#define YDSXGR_PRIADCOUTVOLR 0x0092
|
||||
#define YDSXGR_LEGACYLOOPVOL 0x0094
|
||||
#define YDSXGR_LEGACYLOOPVOLL 0x0094
|
||||
#define YDSXGR_LEGACYLOOPVOLR 0x0096
|
||||
#define YDSXGR_NATIVEDACLOOPVOL 0x0098
|
||||
#define YDSXGR_NATIVEDACLOOPVOLL 0x0098
|
||||
#define YDSXGR_NATIVEDACLOOPVOLR 0x009A
|
||||
#define YDSXGR_SPDIFLOOPVOL 0x009C
|
||||
#define YDSXGR_SPDIFLOOPVOLL 0x009E
|
||||
#define YDSXGR_SPDIFLOOPVOLR 0x009E
|
||||
#define YDSXGR_AC3LOOPVOL 0x00A0
|
||||
#define YDSXGR_AC3LOOPVOLL 0x00A0
|
||||
#define YDSXGR_AC3LOOPVOLR 0x00A2
|
||||
#define YDSXGR_PRIADCLOOPVOL 0x00A4
|
||||
#define YDSXGR_PRIADCLOOPVOLL 0x00A4
|
||||
#define YDSXGR_PRIADCLOOPVOLR 0x00A6
|
||||
#define YDSXGR_NATIVEADCINVOL 0x00A8
|
||||
#define YDSXGR_NATIVEADCINVOLL 0x00A8
|
||||
#define YDSXGR_NATIVEADCINVOLR 0x00AA
|
||||
#define YDSXGR_NATIVEDACINVOL 0x00AC
|
||||
#define YDSXGR_NATIVEDACINVOLL 0x00AC
|
||||
#define YDSXGR_NATIVEDACINVOLR 0x00AE
|
||||
#define YDSXGR_BUF441OUTVOL 0x00B0
|
||||
#define YDSXGR_BUF441OUTVOLL 0x00B0
|
||||
#define YDSXGR_BUF441OUTVOLR 0x00B2
|
||||
#define YDSXGR_BUF441LOOPVOL 0x00B4
|
||||
#define YDSXGR_BUF441LOOPVOLL 0x00B4
|
||||
#define YDSXGR_BUF441LOOPVOLR 0x00B6
|
||||
#define YDSXGR_SPDIFOUTVOL2 0x00B8
|
||||
#define YDSXGR_SPDIFOUTVOL2L 0x00B8
|
||||
#define YDSXGR_SPDIFOUTVOL2R 0x00BA
|
||||
#define YDSXGR_SPDIFLOOPVOL2 0x00BC
|
||||
#define YDSXGR_SPDIFLOOPVOL2L 0x00BC
|
||||
#define YDSXGR_SPDIFLOOPVOL2R 0x00BE
|
||||
#define YDSXGR_ADCSLOTSR 0x00C0
|
||||
#define YDSXGR_RECSLOTSR 0x00C4
|
||||
#define YDSXGR_ADCFORMAT 0x00C8
|
||||
#define YDSXGR_RECFORMAT 0x00CC
|
||||
#define YDSXGR_P44SLOTSR 0x00D0
|
||||
#define YDSXGR_STATUS 0x0100
|
||||
#define YDSXGR_CTRLSELECT 0x0104
|
||||
#define YDSXGR_MODE 0x0108
|
||||
#define YDSXGR_SAMPLECOUNT 0x010C
|
||||
#define YDSXGR_NUMOFSAMPLES 0x0110
|
||||
#define YDSXGR_CONFIG 0x0114
|
||||
#define YDSXGR_PLAYCTRLSIZE 0x0140
|
||||
#define YDSXGR_RECCTRLSIZE 0x0144
|
||||
#define YDSXGR_EFFCTRLSIZE 0x0148
|
||||
#define YDSXGR_WORKSIZE 0x014C
|
||||
#define YDSXGR_MAPOFREC 0x0150
|
||||
#define YDSXGR_MAPOFEFFECT 0x0154
|
||||
#define YDSXGR_PLAYCTRLBASE 0x0158
|
||||
#define YDSXGR_RECCTRLBASE 0x015C
|
||||
#define YDSXGR_EFFCTRLBASE 0x0160
|
||||
#define YDSXGR_WORKBASE 0x0164
|
||||
#define YDSXGR_DSPINSTRAM 0x1000
|
||||
#define YDSXGR_CTRLINSTRAM 0x4000
|
||||
|
||||
#define YDSXG_AC97READCMD 0x8000
|
||||
#define YDSXG_AC97WRITECMD 0x0000
|
||||
|
||||
#define PCIR_LEGCTRL 0x40
|
||||
#define PCIR_ELEGCTRL 0x42
|
||||
#define PCIR_DSXGCTRL 0x48
|
||||
#define PCIR_DSXPWRCTRL1 0x4a
|
||||
#define PCIR_DSXPWRCTRL2 0x4e
|
||||
#define PCIR_OPLADR 0x60
|
||||
#define PCIR_SBADR 0x62
|
||||
#define PCIR_MPUADR 0x64
|
||||
|
||||
#define YDSXG_DSPLENGTH 0x0080
|
||||
#define YDSXG_CTRLLENGTH 0x3000
|
||||
|
||||
#define YDSXG_DEFAULT_WORK_SIZE 0x0400
|
||||
|
||||
#define YDSXG_PLAYBACK_VOICES 64
|
||||
#define YDSXG_CAPTURE_VOICES 2
|
||||
#define YDSXG_EFFECT_VOICES 5
|
||||
|
||||
/* maxinum number of AC97 codecs connected, AC97 2.0 defined 4 */
|
||||
#define NR_AC97 2
|
||||
|
||||
#define YMF_SAMPF 256 /* Samples per frame @48000 */
|
||||
|
||||
/*
|
||||
* The slot/voice control bank (2 of these per voice)
|
||||
*/
|
||||
|
||||
typedef struct stru_ymfpci_playback_bank {
|
||||
u32 format;
|
||||
u32 loop_default;
|
||||
u32 base; /* 32-bit address */
|
||||
u32 loop_start; /* 32-bit offset */
|
||||
u32 loop_end; /* 32-bit offset */
|
||||
u32 loop_frac; /* 8-bit fraction - loop_start */
|
||||
u32 delta_end; /* pitch delta end */
|
||||
u32 lpfK_end;
|
||||
u32 eg_gain_end;
|
||||
u32 left_gain_end;
|
||||
u32 right_gain_end;
|
||||
u32 eff1_gain_end;
|
||||
u32 eff2_gain_end;
|
||||
u32 eff3_gain_end;
|
||||
u32 lpfQ;
|
||||
u32 status; /* P3: Always 0 for some reason. */
|
||||
u32 num_of_frames;
|
||||
u32 loop_count;
|
||||
u32 start; /* P3: J. reads this to know where chip is. */
|
||||
u32 start_frac;
|
||||
u32 delta;
|
||||
u32 lpfK;
|
||||
u32 eg_gain;
|
||||
u32 left_gain;
|
||||
u32 right_gain;
|
||||
u32 eff1_gain;
|
||||
u32 eff2_gain;
|
||||
u32 eff3_gain;
|
||||
u32 lpfD1;
|
||||
u32 lpfD2;
|
||||
} ymfpci_playback_bank_t;
|
||||
|
||||
typedef struct stru_ymfpci_capture_bank {
|
||||
u32 base; /* 32-bit address (aligned at 4) */
|
||||
u32 loop_end; /* size in BYTES (aligned at 4) */
|
||||
u32 start; /* 32-bit offset */
|
||||
u32 num_of_loops; /* counter */
|
||||
} ymfpci_capture_bank_t;
|
||||
|
||||
typedef struct stru_ymfpci_effect_bank {
|
||||
u32 base; /* 32-bit address */
|
||||
u32 loop_end; /* 32-bit offset */
|
||||
u32 start; /* 32-bit offset */
|
||||
u32 temp;
|
||||
} ymfpci_effect_bank_t;
|
||||
|
||||
typedef struct ymf_voice ymfpci_voice_t;
|
||||
/*
|
||||
* Throughout the code Yaroslav names YMF unit pointer "codec"
|
||||
* even though it does not correspond to any codec. Must be historic.
|
||||
* We replace it with "unit" over time.
|
||||
* AC97 parts use "codec" to denote a codec, naturally.
|
||||
*/
|
||||
typedef struct ymf_unit ymfpci_t;
|
||||
|
||||
typedef enum {
|
||||
YMFPCI_PCM,
|
||||
YMFPCI_SYNTH,
|
||||
YMFPCI_MIDI
|
||||
} ymfpci_voice_type_t;
|
||||
|
||||
struct ymf_voice {
|
||||
// ymfpci_t *codec;
|
||||
int number;
|
||||
char use, pcm, synth, midi; // bool
|
||||
ymfpci_playback_bank_t *bank;
|
||||
struct ymf_pcm *ypcm;
|
||||
dma_addr_t bank_ba;
|
||||
};
|
||||
|
||||
struct ymf_capture {
|
||||
// struct ymf_unit *unit;
|
||||
int use;
|
||||
ymfpci_capture_bank_t *bank;
|
||||
struct ymf_pcm *ypcm;
|
||||
};
|
||||
|
||||
struct ymf_unit {
|
||||
u8 rev; /* PCI revision */
|
||||
void __iomem *reg_area_virt;
|
||||
void *dma_area_va;
|
||||
dma_addr_t dma_area_ba;
|
||||
unsigned int dma_area_size;
|
||||
|
||||
dma_addr_t bank_base_capture;
|
||||
dma_addr_t bank_base_effect;
|
||||
dma_addr_t work_base;
|
||||
unsigned int work_size;
|
||||
|
||||
u32 *ctrl_playback;
|
||||
dma_addr_t ctrl_playback_ba;
|
||||
ymfpci_playback_bank_t *bank_playback[YDSXG_PLAYBACK_VOICES][2];
|
||||
ymfpci_capture_bank_t *bank_capture[YDSXG_CAPTURE_VOICES][2];
|
||||
ymfpci_effect_bank_t *bank_effect[YDSXG_EFFECT_VOICES][2];
|
||||
|
||||
int start_count;
|
||||
int suspended;
|
||||
|
||||
u32 active_bank;
|
||||
struct ymf_voice voices[YDSXG_PLAYBACK_VOICES];
|
||||
struct ymf_capture capture[YDSXG_CAPTURE_VOICES];
|
||||
|
||||
struct ac97_codec *ac97_codec[NR_AC97];
|
||||
u16 ac97_features;
|
||||
|
||||
struct pci_dev *pci;
|
||||
|
||||
#ifdef CONFIG_SOUND_YMFPCI_LEGACY
|
||||
/* legacy hardware resources */
|
||||
unsigned int iosynth, iomidi;
|
||||
struct address_info opl3_data, mpu_data;
|
||||
#endif
|
||||
|
||||
spinlock_t reg_lock;
|
||||
spinlock_t voice_lock;
|
||||
spinlock_t ac97_lock;
|
||||
|
||||
/* soundcore stuff */
|
||||
int dev_audio;
|
||||
struct mutex open_mutex;
|
||||
|
||||
struct list_head ymf_devs;
|
||||
struct list_head states; /* List of states for this unit */
|
||||
};
|
||||
|
||||
struct ymf_dmabuf {
|
||||
dma_addr_t dma_addr;
|
||||
void *rawbuf;
|
||||
unsigned buforder;
|
||||
|
||||
/* OSS buffer management stuff */
|
||||
unsigned numfrag;
|
||||
unsigned fragshift;
|
||||
|
||||
/* our buffer acts like a circular ring */
|
||||
unsigned hwptr; /* where dma last started */
|
||||
unsigned swptr; /* where driver last clear/filled */
|
||||
int count; /* fill count */
|
||||
unsigned total_bytes; /* total bytes dmaed by hardware */
|
||||
|
||||
wait_queue_head_t wait; /* put process on wait queue when no more space in buffer */
|
||||
|
||||
/* redundant, but makes calculations easier */
|
||||
unsigned fragsize;
|
||||
unsigned dmasize; /* Total rawbuf[] size */
|
||||
|
||||
/* OSS stuff */
|
||||
unsigned mapped:1;
|
||||
unsigned ready:1;
|
||||
unsigned ossfragshift;
|
||||
int ossmaxfrags;
|
||||
unsigned subdivision;
|
||||
};
|
||||
|
||||
struct ymf_pcm_format {
|
||||
int format; /* OSS format */
|
||||
int rate; /* rate in Hz */
|
||||
int voices; /* number of voices */
|
||||
int shift; /* redundant, computed from the above */
|
||||
};
|
||||
|
||||
typedef enum {
|
||||
PLAYBACK_VOICE,
|
||||
CAPTURE_REC,
|
||||
CAPTURE_AC97,
|
||||
EFFECT_DRY_LEFT,
|
||||
EFFECT_DRY_RIGHT,
|
||||
EFFECT_EFF1,
|
||||
EFFECT_EFF2,
|
||||
EFFECT_EFF3
|
||||
} ymfpci_pcm_type_t;
|
||||
|
||||
/* This is variant record, but we hate unions. Little waste on pointers []. */
|
||||
struct ymf_pcm {
|
||||
ymfpci_pcm_type_t type;
|
||||
struct ymf_state *state;
|
||||
|
||||
ymfpci_voice_t *voices[2];
|
||||
int capture_bank_number;
|
||||
|
||||
struct ymf_dmabuf dmabuf;
|
||||
int running;
|
||||
int spdif;
|
||||
};
|
||||
|
||||
/*
|
||||
* "Software" or virtual channel, an instance of opened /dev/dsp.
|
||||
* It may have two physical channels (pcms) for duplex operations.
|
||||
*/
|
||||
|
||||
struct ymf_state {
|
||||
struct list_head chain;
|
||||
struct ymf_unit *unit; /* backpointer */
|
||||
struct ymf_pcm rpcm, wpcm;
|
||||
struct ymf_pcm_format format;
|
||||
};
|
||||
|
||||
#endif /* __YMFPCI_H */
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -1,319 +0,0 @@
|
|||
#include <linux/init.h>
|
||||
|
||||
unsigned char page_zero[] __initdata = {
|
||||
0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00,
|
||||
0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00,
|
||||
0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x19,
|
||||
0x01, 0x1a, 0x01, 0x20, 0x01, 0x40, 0x01, 0x17, 0x00, 0x00, 0x01,
|
||||
0x80, 0x01, 0x20, 0x00, 0x10, 0x01, 0xa0, 0x03, 0xd1, 0x00, 0x00,
|
||||
0x01, 0xf2, 0x02, 0x00, 0x00, 0x13, 0x00, 0x00, 0x00, 0xf4, 0x02,
|
||||
0xe0, 0x00, 0x15, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x17,
|
||||
0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x00, 0x50, 0x00, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00, 0x71, 0x02, 0x00, 0x00, 0x60, 0x00, 0x00,
|
||||
0x00, 0x92, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0xb3, 0x02,
|
||||
0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0xd4, 0x00, 0x00, 0x00, 0x40,
|
||||
0x00, 0x80, 0x00, 0xf5, 0x00, 0x20, 0x00, 0x70, 0x00, 0xa0, 0x02,
|
||||
0x11, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20,
|
||||
0x02, 0x00, 0x00, 0x20, 0x00, 0x10, 0x00, 0x17, 0x00, 0x1b, 0x00,
|
||||
0x1d, 0x02, 0xdf
|
||||
};
|
||||
|
||||
unsigned char page_one[] __initdata = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00,
|
||||
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00,
|
||||
0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01,
|
||||
0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x40, 0x02, 0x60,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xc0, 0x02, 0x80, 0x00,
|
||||
0x00, 0x02, 0xfb, 0x02, 0xa0, 0x00, 0x00, 0x00, 0x1b, 0x02, 0xd7,
|
||||
0x00, 0x00, 0x02, 0xf7, 0x03, 0x20, 0x03, 0x00, 0x00, 0x00, 0x00,
|
||||
0x1c, 0x03, 0x3c, 0x00, 0x00, 0x03, 0x3f, 0x00, 0x00, 0x03, 0xc0,
|
||||
0x00, 0x00, 0x03, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x03, 0x5d, 0x00,
|
||||
0x00, 0x03, 0xc0, 0x00, 0x00, 0x03, 0x7d, 0x00, 0x00, 0x03, 0xc0,
|
||||
0x00, 0x00, 0x03, 0x9e, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x03,
|
||||
0xbe, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02,
|
||||
0xdb, 0x00, 0x00, 0x02, 0xdb, 0x00, 0x00, 0x02, 0xe0, 0x00, 0x00,
|
||||
0x02, 0xfb, 0x00, 0x00, 0x02, 0xc0, 0x02, 0x40, 0x02, 0xfb, 0x02,
|
||||
0x60, 0x00, 0x1b
|
||||
};
|
||||
|
||||
unsigned char page_two[] __initdata = {
|
||||
0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4,
|
||||
0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x07,
|
||||
0x05, 0x05, 0x05, 0x04, 0x07, 0x05, 0x04, 0x07, 0x05, 0x44, 0x46,
|
||||
0x44, 0x46, 0x46, 0x07, 0x05, 0x44, 0x46, 0x05, 0x46, 0x05, 0x46,
|
||||
0x05, 0x46, 0x05, 0x44, 0x46, 0x05, 0x07, 0x44, 0x46, 0x05, 0x07,
|
||||
0x44, 0x46, 0x05, 0x07, 0x44, 0x46, 0x05, 0x07, 0x44, 0x05, 0x05,
|
||||
0x05, 0x44, 0x05, 0x05, 0x05, 0x46, 0x05, 0x46, 0x05, 0x46, 0x05,
|
||||
0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44
|
||||
};
|
||||
|
||||
unsigned char page_three[] __initdata = {
|
||||
0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06,
|
||||
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
|
||||
0xc0, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x40, 0x00,
|
||||
0x60, 0x00, 0x70, 0x00, 0x40, 0x00, 0x40, 0x00, 0x42, 0x00, 0x40,
|
||||
0x00, 0x02, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,
|
||||
0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00,
|
||||
0x00, 0x42, 0x00, 0x40, 0x00, 0x42, 0x00, 0x02, 0x00, 0x02, 0x00,
|
||||
0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40
|
||||
};
|
||||
|
||||
unsigned char page_four[] __initdata = {
|
||||
0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02,
|
||||
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20,
|
||||
0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x20, 0x00, 0x60, 0x00,
|
||||
0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x60,
|
||||
0x00, 0x20, 0x00, 0x60, 0x00, 0x20, 0x00, 0x60, 0x00, 0x20, 0x00,
|
||||
0x20, 0x00, 0x22, 0x02, 0x22, 0x02, 0x20, 0x00, 0x60, 0x00, 0x22,
|
||||
0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01
|
||||
};
|
||||
|
||||
unsigned char page_six[] __initdata = {
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00,
|
||||
0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e,
|
||||
0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00,
|
||||
0x16, 0x00, 0x00, 0x18, 0x00, 0x00, 0x1a, 0x00, 0x00, 0x1c, 0x00,
|
||||
0x00, 0x1e, 0x00, 0x00, 0x20, 0x00, 0x00, 0x22, 0x00, 0x00, 0x24,
|
||||
0x00, 0x00, 0x26, 0x00, 0x00, 0x28, 0x00, 0x00, 0x2a, 0x00, 0x00,
|
||||
0x2c, 0x00, 0x00, 0x2e, 0x00, 0x00, 0x30, 0x00, 0x00, 0x32, 0x00,
|
||||
0x00, 0x34, 0x00, 0x00, 0x36, 0x00, 0x00, 0x38, 0x00, 0x00, 0x3a,
|
||||
0x00, 0x00, 0x3c, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x40, 0x00, 0x00,
|
||||
0x42, 0x03, 0x00, 0x44, 0x01, 0x00, 0x46, 0x0a, 0x21, 0x48, 0x0d,
|
||||
0x23, 0x4a, 0x23, 0x1b, 0x4c, 0x37, 0x8f, 0x4e, 0x45, 0x77, 0x50,
|
||||
0x52, 0xe2, 0x52, 0x1c, 0x92, 0x54, 0x1c, 0x52, 0x56, 0x07, 0x00,
|
||||
0x58, 0x2f, 0xc6, 0x5a, 0x0b, 0x00, 0x5c, 0x30, 0x06, 0x5e, 0x17,
|
||||
0x00, 0x60, 0x3d, 0xda, 0x62, 0x29, 0x00, 0x64, 0x3e, 0x41, 0x66,
|
||||
0x39, 0x00, 0x68, 0x4c, 0x48, 0x6a, 0x49, 0x00, 0x6c, 0x4c, 0x6c,
|
||||
0x6e, 0x11, 0xd2, 0x70, 0x16, 0x0c, 0x72, 0x00, 0x00, 0x74, 0x00,
|
||||
0x80, 0x76, 0x0f, 0x00, 0x78, 0x00, 0x80, 0x7a, 0x13, 0x00, 0x7c,
|
||||
0x80, 0x00, 0x7e, 0x80, 0x80
|
||||
};
|
||||
|
||||
unsigned char page_seven[] __initdata = {
|
||||
0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
|
||||
0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f,
|
||||
0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x0f, 0xff,
|
||||
0x0f, 0xff, 0x0f, 0xff, 0x02, 0xe9, 0x06, 0x8c, 0x06, 0x8c, 0x0f,
|
||||
0xff, 0x1a, 0x75, 0x0d, 0x8b, 0x04, 0xe9, 0x0b, 0x16, 0x1a, 0x38,
|
||||
0x0d, 0xc8, 0x04, 0x6f, 0x0b, 0x91, 0x0f, 0xff, 0x06, 0x40, 0x06,
|
||||
0x40, 0x02, 0x8f, 0x0f, 0xff, 0x06, 0x62, 0x06, 0x62, 0x02, 0x7b,
|
||||
0x0f, 0xff, 0x06, 0x97, 0x06, 0x97, 0x02, 0x52, 0x0f, 0xff, 0x06,
|
||||
0xf6, 0x06, 0xf6, 0x02, 0x19, 0x05, 0x55, 0x05, 0x55, 0x05, 0x55,
|
||||
0x05, 0x55, 0x05, 0x55, 0x05, 0x55, 0x05, 0x55, 0x05, 0x55, 0x14,
|
||||
0xda, 0x0d, 0x93, 0x04, 0xda, 0x05, 0x93, 0x14, 0xda, 0x0d, 0x93,
|
||||
0x04, 0xda, 0x05, 0x93, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x02, 0x00
|
||||
};
|
||||
|
||||
unsigned char page_zero_v2[] __initdata = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
unsigned char page_one_v2[] __initdata = {
|
||||
0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
unsigned char page_two_v2[] __initdata = {
|
||||
0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
unsigned char page_three_v2[] __initdata = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
unsigned char page_four_v2[] __initdata = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
|
||||
unsigned char page_seven_v2[] __initdata = {
|
||||
0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
unsigned char mod_v2[] __initdata = {
|
||||
0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02,
|
||||
0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05,
|
||||
0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0,
|
||||
0x20, 0xb1, 0x20, 0xb2, 0x20, 0xb3, 0x20, 0xb4, 0x20, 0xb5, 0x20,
|
||||
0xb6, 0x20, 0xb7, 0x20, 0xf0, 0x20, 0xf1, 0x20, 0xf2, 0x20, 0xf3,
|
||||
0x20, 0xf4, 0x20, 0xf5, 0x20, 0xf6, 0x20, 0xf7, 0x20, 0x10, 0xff,
|
||||
0x11, 0xff, 0x12, 0xff, 0x13, 0xff, 0x14, 0xff, 0x15, 0xff, 0x16,
|
||||
0xff, 0x17, 0xff, 0x20, 0xff, 0x21, 0xff, 0x22, 0xff, 0x23, 0xff,
|
||||
0x24, 0xff, 0x25, 0xff, 0x26, 0xff, 0x27, 0xff, 0x30, 0x00, 0x31,
|
||||
0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00,
|
||||
0x37, 0x00, 0x40, 0x00, 0x41, 0x00, 0x42, 0x00, 0x43, 0x00, 0x44,
|
||||
0x00, 0x45, 0x00, 0x46, 0x00, 0x47, 0x00, 0x50, 0x00, 0x51, 0x00,
|
||||
0x52, 0x00, 0x53, 0x00, 0x54, 0x00, 0x55, 0x00, 0x56, 0x00, 0x57,
|
||||
0x00, 0x60, 0x00, 0x61, 0x00, 0x62, 0x00, 0x63, 0x00, 0x64, 0x00,
|
||||
0x65, 0x00, 0x66, 0x00, 0x67, 0x00, 0x70, 0xc0, 0x71, 0xc0, 0x72,
|
||||
0xc0, 0x73, 0xc0, 0x74, 0xc0, 0x75, 0xc0, 0x76, 0xc0, 0x77, 0xc0,
|
||||
0x80, 0x00, 0x81, 0x00, 0x82, 0x00, 0x83, 0x00, 0x84, 0x00, 0x85,
|
||||
0x00, 0x86, 0x00, 0x87, 0x00, 0x90, 0x00, 0x91, 0x00, 0x92, 0x00,
|
||||
0x93, 0x00, 0x94, 0x00, 0x95, 0x00, 0x96, 0x00, 0x97, 0x00, 0xa0,
|
||||
0x00, 0xa1, 0x00, 0xa2, 0x00, 0xa3, 0x00, 0xa4, 0x00, 0xa5, 0x00,
|
||||
0xa6, 0x00, 0xa7, 0x00, 0xc0, 0x00, 0xc1, 0x00, 0xc2, 0x00, 0xc3,
|
||||
0x00, 0xc4, 0x00, 0xc5, 0x00, 0xc6, 0x00, 0xc7, 0x00, 0xd0, 0x00,
|
||||
0xd1, 0x00, 0xd2, 0x00, 0xd3, 0x00, 0xd4, 0x00, 0xd5, 0x00, 0xd6,
|
||||
0x00, 0xd7, 0x00, 0xe0, 0x00, 0xe1, 0x00, 0xe2, 0x00, 0xe3, 0x00,
|
||||
0xe4, 0x00, 0xe5, 0x00, 0xe6, 0x00, 0xe7, 0x00, 0x01, 0x00, 0x02,
|
||||
0x01, 0x01, 0x01, 0x02, 0x01, 0x01, 0x02, 0x02, 0x01, 0x01, 0x03,
|
||||
0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01,
|
||||
0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01
|
||||
};
|
||||
unsigned char coefficients[] __initdata = {
|
||||
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03,
|
||||
0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49,
|
||||
0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01,
|
||||
0x40, 0x02, 0x40, 0x01, 0x41, 0x02, 0x60, 0x07, 0x40, 0x00, 0x00,
|
||||
0x07, 0x41, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00, 0x07, 0x4a, 0x00,
|
||||
0x00, 0x00, 0x47, 0x01, 0x00, 0x00, 0x4a, 0x01, 0x20, 0x07, 0x47,
|
||||
0x00, 0x00, 0x07, 0x4a, 0x00, 0x00, 0x07, 0x7c, 0x00, 0x00, 0x07,
|
||||
0x7e, 0x00, 0x00, 0x00, 0x00, 0x01, 0x1c, 0x07, 0x7c, 0x00, 0x00,
|
||||
0x07, 0x7e, 0x00, 0x00, 0x07, 0x44, 0x00, 0x00, 0x00, 0x44, 0x01,
|
||||
0x00, 0x07, 0x44, 0x00, 0x00, 0x07, 0x42, 0x00, 0x00, 0x07, 0x43,
|
||||
0x00, 0x00, 0x00, 0x42, 0x01, 0x1a, 0x00, 0x43, 0x01, 0x20, 0x07,
|
||||
0x42, 0x00, 0x00, 0x07, 0x43, 0x00, 0x00, 0x07, 0x40, 0x00, 0x00,
|
||||
0x07, 0x41, 0x00, 0x00, 0x01, 0x40, 0x02, 0x40, 0x01, 0x41, 0x02,
|
||||
0x60, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x07, 0x44,
|
||||
0x0f, 0xff, 0x07, 0x42, 0x00, 0x00, 0x07, 0x43, 0x00, 0x00, 0x07,
|
||||
0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x07, 0x51, 0x06, 0x40,
|
||||
0x07, 0x50, 0x06, 0x40, 0x07, 0x4f, 0x03, 0x81, 0x07, 0x53, 0x1a,
|
||||
0x76, 0x07, 0x54, 0x0d, 0x8b, 0x07, 0x55, 0x04, 0xe9, 0x07, 0x56,
|
||||
0x0b, 0x17, 0x07, 0x57, 0x1a, 0x38, 0x07, 0x58, 0x0d, 0xc9, 0x07,
|
||||
0x59, 0x04, 0x6f, 0x07, 0x5a, 0x0b, 0x91, 0x07, 0x73, 0x14, 0xda,
|
||||
0x07, 0x74, 0x0d, 0x93, 0x07, 0x75, 0x04, 0xd9, 0x07, 0x76, 0x05,
|
||||
0x93, 0x07, 0x77, 0x14, 0xda, 0x07, 0x78, 0x0d, 0x93, 0x07, 0x79,
|
||||
0x04, 0xd9, 0x07, 0x7a, 0x05, 0x93, 0x07, 0x5e, 0x03, 0x68, 0x07,
|
||||
0x5c, 0x04, 0x31, 0x07, 0x5d, 0x04, 0x31, 0x07, 0x62, 0x03, 0x52,
|
||||
0x07, 0x60, 0x04, 0x76, 0x07, 0x61, 0x04, 0x76, 0x07, 0x66, 0x03,
|
||||
0x2e, 0x07, 0x64, 0x04, 0xda, 0x07, 0x65, 0x04, 0xda, 0x07, 0x6a,
|
||||
0x02, 0xf6, 0x07, 0x68, 0x05, 0x62, 0x07, 0x69, 0x05, 0x62, 0x06,
|
||||
0x46, 0x0a, 0x22, 0x06, 0x48, 0x0d, 0x24, 0x06, 0x6e, 0x11, 0xd3,
|
||||
0x06, 0x70, 0x15, 0xcb, 0x06, 0x52, 0x20, 0x93, 0x06, 0x54, 0x20,
|
||||
0x54, 0x06, 0x4a, 0x27, 0x1d, 0x06, 0x58, 0x2f, 0xc8, 0x06, 0x5c,
|
||||
0x30, 0x07, 0x06, 0x4c, 0x37, 0x90, 0x06, 0x60, 0x3d, 0xdb, 0x06,
|
||||
0x64, 0x3e, 0x42, 0x06, 0x4e, 0x45, 0x78, 0x06, 0x68, 0x4c, 0x48,
|
||||
0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02,
|
||||
0xba
|
||||
};
|
||||
unsigned char coefficients2[] __initdata = {
|
||||
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f,
|
||||
0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d,
|
||||
0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07,
|
||||
0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00,
|
||||
0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00
|
||||
};
|
||||
unsigned char coefficients3[] __initdata = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00,
|
||||
0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc,
|
||||
0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01,
|
||||
0x47, 0x01, 0x47, 0x01, 0x70, 0x01, 0x70, 0x01, 0x99, 0x01, 0x99,
|
||||
0x01, 0xc2, 0x01, 0xc2, 0x01, 0xeb, 0x01, 0xeb, 0x02, 0x14, 0x02,
|
||||
0x14, 0x02, 0x3d, 0x02, 0x3d, 0x02, 0x66, 0x02, 0x66, 0x02, 0x8f,
|
||||
0x02, 0x8f, 0x02, 0xb8, 0x02, 0xb8, 0x02, 0xe1, 0x02, 0xe1, 0x03,
|
||||
0x0a, 0x03, 0x0a, 0x03, 0x33, 0x03, 0x33, 0x03, 0x5c, 0x03, 0x5c,
|
||||
0x03, 0x85, 0x03, 0x85, 0x03, 0xae, 0x03, 0xae, 0x03, 0xd7, 0x03,
|
||||
0xd7, 0x04, 0x00, 0x04, 0x00, 0x04, 0x28, 0x04, 0x28, 0x04, 0x51,
|
||||
0x04, 0x51, 0x04, 0x7a, 0x04, 0x7a, 0x04, 0xa3, 0x04, 0xa3, 0x04,
|
||||
0xcc, 0x04, 0xcc, 0x04, 0xf5, 0x04, 0xf5, 0x05, 0x1e, 0x05, 0x1e,
|
||||
0x05, 0x47, 0x05, 0x47, 0x05, 0x70, 0x05, 0x70, 0x05, 0x99, 0x05,
|
||||
0x99, 0x05, 0xc2, 0x05, 0xc2, 0x05, 0xeb, 0x05, 0xeb, 0x06, 0x14,
|
||||
0x06, 0x14, 0x06, 0x3d, 0x06, 0x3d, 0x06, 0x66, 0x06, 0x66, 0x06,
|
||||
0x8f, 0x06, 0x8f, 0x06, 0xb8, 0x06, 0xb8, 0x06, 0xe1, 0x06, 0xe1,
|
||||
0x07, 0x0a, 0x07, 0x0a, 0x07, 0x33, 0x07, 0x33, 0x07, 0x5c, 0x07,
|
||||
0x5c, 0x07, 0x85, 0x07, 0x85, 0x07, 0xae, 0x07, 0xae, 0x07, 0xd7,
|
||||
0x07, 0xd7, 0x08, 0x00, 0x08, 0x00, 0x08, 0x28, 0x08, 0x28, 0x08,
|
||||
0x51, 0x08, 0x51, 0x08, 0x7a, 0x08, 0x7a, 0x08, 0xa3, 0x08, 0xa3,
|
||||
0x08, 0xcc, 0x08, 0xcc, 0x08, 0xf5, 0x08, 0xf5, 0x09, 0x1e, 0x09,
|
||||
0x1e, 0x09, 0x47, 0x09, 0x47, 0x09, 0x70, 0x09, 0x70, 0x09, 0x99,
|
||||
0x09, 0x99, 0x09, 0xc2, 0x09, 0xc2, 0x09, 0xeb, 0x09, 0xeb, 0x0a,
|
||||
0x14, 0x0a, 0x14, 0x0a, 0x3d, 0x0a, 0x3d, 0x0a, 0x66, 0x0a, 0x66,
|
||||
0x0a, 0x8f, 0x0a, 0x8f, 0x0a, 0xb8, 0x0a, 0xb8, 0x0a, 0xe1, 0x0a,
|
||||
0xe1, 0x0b, 0x0a, 0x0b, 0x0a, 0x0b, 0x33, 0x0b, 0x33, 0x0b, 0x5c,
|
||||
0x0b, 0x5c, 0x0b, 0x85, 0x0b, 0x85, 0x0b, 0xae, 0x0b, 0xae, 0x0b,
|
||||
0xd7, 0x0b, 0xd7, 0x0c, 0x00, 0x0c, 0x00, 0x0c, 0x28, 0x0c, 0x28,
|
||||
0x0c, 0x51, 0x0c, 0x51, 0x0c, 0x7a, 0x0c, 0x7a, 0x0c, 0xa3, 0x0c,
|
||||
0xa3, 0x0c, 0xcc, 0x0c, 0xcc, 0x0c, 0xf5, 0x0c, 0xf5, 0x0d, 0x1e,
|
||||
0x0d, 0x1e, 0x0d, 0x47, 0x0d, 0x47, 0x0d, 0x70, 0x0d, 0x70, 0x0d,
|
||||
0x99, 0x0d, 0x99, 0x0d, 0xc2, 0x0d, 0xc2, 0x0d, 0xeb, 0x0d, 0xeb,
|
||||
0x0e, 0x14, 0x0e, 0x14, 0x0e, 0x3d, 0x0e, 0x3d, 0x0e, 0x66, 0x0e,
|
||||
0x66, 0x0e, 0x8f, 0x0e, 0x8f, 0x0e, 0xb8, 0x0e, 0xb8, 0x0e, 0xe1,
|
||||
0x0e, 0xe1, 0x0f, 0x0a, 0x0f, 0x0a, 0x0f, 0x33, 0x0f, 0x33, 0x0f,
|
||||
0x5c, 0x0f, 0x5c, 0x0f, 0x85, 0x0f, 0x85, 0x0f, 0xae, 0x0f, 0xae,
|
||||
0x0f, 0xd7, 0x0f, 0xd7, 0x0f, 0xff, 0x0f, 0xff
|
||||
};
|
||||
|
|
@ -1,24 +0,0 @@
|
|||
#ifndef __yss255_h__
|
||||
#define __yss255_h__
|
||||
|
||||
extern unsigned char page_zero[256];
|
||||
extern unsigned char page_one[256];
|
||||
extern unsigned char page_two[128];
|
||||
extern unsigned char page_three[128];
|
||||
extern unsigned char page_four[128];
|
||||
extern unsigned char page_six[192];
|
||||
extern unsigned char page_seven[256];
|
||||
extern unsigned char page_zero_v2[96];
|
||||
extern unsigned char page_one_v2[96];
|
||||
extern unsigned char page_two_v2[48];
|
||||
extern unsigned char page_three_v2[48];
|
||||
extern unsigned char page_four_v2[48];
|
||||
extern unsigned char page_seven_v2[96];
|
||||
extern unsigned char mod_v2[304];
|
||||
extern unsigned char coefficients[364];
|
||||
extern unsigned char coefficients2[56];
|
||||
extern unsigned char coefficients3[404];
|
||||
|
||||
|
||||
#endif /* __ys225_h__ */
|
||||
|
|
@ -365,25 +365,6 @@ int register_sound_dsp(const struct file_operations *fops, int dev)
|
|||
|
||||
EXPORT_SYMBOL(register_sound_dsp);
|
||||
|
||||
/**
|
||||
* register_sound_synth - register a synth device
|
||||
* @fops: File operations for the driver
|
||||
* @dev: Unit number to allocate
|
||||
*
|
||||
* Allocate a synth device. Unit is the number of the synth device requested.
|
||||
* Pass -1 to request the next free synth unit. On success the allocated
|
||||
* number is returned, on failure a negative error code is returned.
|
||||
*/
|
||||
|
||||
|
||||
int register_sound_synth(const struct file_operations *fops, int dev)
|
||||
{
|
||||
return sound_insert_unit(&chains[9], fops, dev, 9, 137,
|
||||
"synth", S_IRUSR | S_IWUSR, NULL);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(register_sound_synth);
|
||||
|
||||
/**
|
||||
* unregister_sound_special - unregister a special sound device
|
||||
* @unit: unit number to allocate
|
||||
|
@ -449,21 +430,6 @@ void unregister_sound_dsp(int unit)
|
|||
|
||||
EXPORT_SYMBOL(unregister_sound_dsp);
|
||||
|
||||
/**
|
||||
* unregister_sound_synth - unregister a synth device
|
||||
* @unit: unit number to allocate
|
||||
*
|
||||
* Release a sound device that was allocated with register_sound_synth().
|
||||
* The unit passed is the return value from the register function.
|
||||
*/
|
||||
|
||||
void unregister_sound_synth(int unit)
|
||||
{
|
||||
return sound_remove_unit(&chains[9], unit);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(unregister_sound_synth);
|
||||
|
||||
/*
|
||||
* Now our file operations
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче