From b5d425c97f7d4e92151167b01ca038e7853c6b37 Mon Sep 17 00:00:00 2001 From: Adrian Bunk Date: Sun, 15 Jul 2007 23:39:01 -0700 Subject: more scheduled OSS driver removal 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.20. Signed-off-by: Adrian Bunk Acked-by: Jeff Garzik Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Documentation/feature-removal-schedule.txt | 7 - Documentation/kernel-parameters.txt | 10 - Documentation/sound/oss/AD1816 | 84 - Documentation/sound/oss/NM256 | 280 -- Documentation/sound/oss/OPL3-SA2 | 210 -- Documentation/sound/oss/VIA-chipset | 43 - Documentation/sound/oss/cs46xx | 138 - MAINTAINERS | 35 - sound/oss/Makefile | 13 - sound/oss/ac97.c | 432 --- sound/oss/ac97.h | 201 - sound/oss/aci.c | 712 ---- sound/oss/aci.h | 57 - sound/oss/ad1816.c | 1368 ------- sound/oss/ad1889.c | 1101 ------ sound/oss/ad1889.h | 135 - sound/oss/adlib_card.c | 73 - sound/oss/cs461x.h | 1691 --------- sound/oss/cs461x_image.h | 322 -- sound/oss/cs46xx.c | 5444 ---------------------------- sound/oss/cs46xx_wrapper-24.h | 56 - sound/oss/cs46xxpm.h | 70 - sound/oss/emu10k1/8010.h | 737 ---- sound/oss/emu10k1/Makefile | 17 - sound/oss/emu10k1/audio.c | 1595 -------- sound/oss/emu10k1/audio.h | 44 - sound/oss/emu10k1/cardmi.c | 832 ----- sound/oss/emu10k1/cardmi.h | 97 - sound/oss/emu10k1/cardmo.c | 229 -- sound/oss/emu10k1/cardmo.h | 62 - sound/oss/emu10k1/cardwi.c | 384 -- sound/oss/emu10k1/cardwi.h | 91 - sound/oss/emu10k1/cardwo.c | 643 ---- sound/oss/emu10k1/cardwo.h | 90 - sound/oss/emu10k1/ecard.c | 157 - sound/oss/emu10k1/ecard.h | 113 - sound/oss/emu10k1/efxmgr.c | 220 -- sound/oss/emu10k1/efxmgr.h | 270 -- sound/oss/emu10k1/emuadxmg.c | 104 - sound/oss/emu10k1/hwaccess.c | 507 --- sound/oss/emu10k1/hwaccess.h | 247 -- sound/oss/emu10k1/icardmid.h | 163 - sound/oss/emu10k1/icardwav.h | 53 - sound/oss/emu10k1/irqmgr.c | 113 - sound/oss/emu10k1/irqmgr.h | 52 - sound/oss/emu10k1/main.c | 1471 -------- sound/oss/emu10k1/midi.c | 614 ---- sound/oss/emu10k1/midi.h | 78 - sound/oss/emu10k1/mixer.c | 690 ---- sound/oss/emu10k1/passthrough.c | 240 -- sound/oss/emu10k1/passthrough.h | 99 - sound/oss/emu10k1/recmgr.c | 147 - sound/oss/emu10k1/recmgr.h | 48 - sound/oss/emu10k1/timer.c | 176 - sound/oss/emu10k1/timer.h | 54 - sound/oss/emu10k1/voicemgr.c | 398 -- sound/oss/emu10k1/voicemgr.h | 103 - sound/oss/nm256.h | 292 -- sound/oss/nm256_audio.c | 1662 --------- sound/oss/nm256_coeff.h | 4697 ------------------------ sound/oss/opl3.c | 14 +- sound/oss/opl3.h | 5 - sound/oss/opl3sa2.c | 1020 ------ 63 files changed, 4 insertions(+), 31106 deletions(-) delete mode 100644 Documentation/sound/oss/AD1816 delete mode 100644 Documentation/sound/oss/NM256 delete mode 100644 Documentation/sound/oss/OPL3-SA2 delete mode 100644 Documentation/sound/oss/VIA-chipset delete mode 100644 Documentation/sound/oss/cs46xx delete mode 100644 sound/oss/ac97.c delete mode 100644 sound/oss/ac97.h delete mode 100644 sound/oss/aci.c delete mode 100644 sound/oss/aci.h delete mode 100644 sound/oss/ad1816.c delete mode 100644 sound/oss/ad1889.c delete mode 100644 sound/oss/ad1889.h delete mode 100644 sound/oss/adlib_card.c delete mode 100644 sound/oss/cs461x.h delete mode 100644 sound/oss/cs461x_image.h delete mode 100644 sound/oss/cs46xx.c delete mode 100644 sound/oss/cs46xx_wrapper-24.h delete mode 100644 sound/oss/cs46xxpm.h delete mode 100644 sound/oss/emu10k1/8010.h delete mode 100644 sound/oss/emu10k1/Makefile delete mode 100644 sound/oss/emu10k1/audio.c delete mode 100644 sound/oss/emu10k1/audio.h delete mode 100644 sound/oss/emu10k1/cardmi.c delete mode 100644 sound/oss/emu10k1/cardmi.h delete mode 100644 sound/oss/emu10k1/cardmo.c delete mode 100644 sound/oss/emu10k1/cardmo.h delete mode 100644 sound/oss/emu10k1/cardwi.c delete mode 100644 sound/oss/emu10k1/cardwi.h delete mode 100644 sound/oss/emu10k1/cardwo.c delete mode 100644 sound/oss/emu10k1/cardwo.h delete mode 100644 sound/oss/emu10k1/ecard.c delete mode 100644 sound/oss/emu10k1/ecard.h delete mode 100644 sound/oss/emu10k1/efxmgr.c delete mode 100644 sound/oss/emu10k1/efxmgr.h delete mode 100644 sound/oss/emu10k1/emuadxmg.c delete mode 100644 sound/oss/emu10k1/hwaccess.c delete mode 100644 sound/oss/emu10k1/hwaccess.h delete mode 100644 sound/oss/emu10k1/icardmid.h delete mode 100644 sound/oss/emu10k1/icardwav.h delete mode 100644 sound/oss/emu10k1/irqmgr.c delete mode 100644 sound/oss/emu10k1/irqmgr.h delete mode 100644 sound/oss/emu10k1/main.c delete mode 100644 sound/oss/emu10k1/midi.c delete mode 100644 sound/oss/emu10k1/midi.h delete mode 100644 sound/oss/emu10k1/mixer.c delete mode 100644 sound/oss/emu10k1/passthrough.c delete mode 100644 sound/oss/emu10k1/passthrough.h delete mode 100644 sound/oss/emu10k1/recmgr.c delete mode 100644 sound/oss/emu10k1/recmgr.h delete mode 100644 sound/oss/emu10k1/timer.c delete mode 100644 sound/oss/emu10k1/timer.h delete mode 100644 sound/oss/emu10k1/voicemgr.c delete mode 100644 sound/oss/emu10k1/voicemgr.h delete mode 100644 sound/oss/nm256.h delete mode 100644 sound/oss/nm256_audio.c delete mode 100644 sound/oss/nm256_coeff.h delete mode 100644 sound/oss/opl3.h delete mode 100644 sound/oss/opl3sa2.c diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt index 092c65dd35c2..4f69470e52d6 100644 --- a/Documentation/feature-removal-schedule.txt +++ b/Documentation/feature-removal-schedule.txt @@ -119,13 +119,6 @@ Who: Adrian Bunk --------------------------- -What: drivers depending on OSS_OBSOLETE_DRIVER -When: options in 2.6.20, code in 2.6.22 -Why: OSS drivers with ALSA replacements -Who: Adrian Bunk - ---------------------------- - What: Unused EXPORT_SYMBOL/EXPORT_SYMBOL_GPL exports (temporary transition config option provided until then) The transition config option will also be removed at the same time. diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 8916410307f1..182c6a39d5a2 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -238,16 +238,9 @@ and is between 256 and 4096 characters. It is defined in the file Disable PIN 1 of APIC timer Can be useful to work around chipset bugs. - ad1816= [HW,OSS] - Format: ,,, - See also Documentation/sound/oss/AD1816. - ad1848= [HW,OSS] Format: ,,,, - adlib= [HW,OSS] - Format: - advansys= [HW,SCSI] See header of drivers/scsi/advansys.c. @@ -1206,9 +1199,6 @@ and is between 256 and 4096 characters. It is defined in the file opl3= [HW,OSS] Format: - opl3sa2= [HW,OSS] Format: - ,,,,,,,[,, -Christoph Hellwig - Last modified: 2000/09/20 diff --git a/Documentation/sound/oss/NM256 b/Documentation/sound/oss/NM256 deleted file mode 100644 index b503217488b3..000000000000 --- a/Documentation/sound/oss/NM256 +++ /dev/null @@ -1,280 +0,0 @@ -======================================================= -Documentation for the NeoMagic 256AV/256ZX sound driver -======================================================= - -You're looking at version 1.1 of the driver. (Woohoo!) It has been -successfully tested against the following laptop models: - - Sony Z505S/Z505SX/Z505DX/Z505RX - Sony F150, F160, F180, F250, F270, F280, PCG-F26 - Dell Latitude CPi, CPt (various submodels) - -There are a few caveats, which is why you should read the entirety of -this document first. - -This driver was developed without any support or assistance from -NeoMagic. There is no warranty, expressed, implied, or otherwise. It -is free software in the public domain; feel free to use it, sell it, -give it to your best friends, even claim that you wrote it (but why?!) -but don't go whining to me, NeoMagic, Sony, Dell, or anyone else -when it blows up your computer. - -Version 1.1 contains a change to try and detect non-AC97 versions of -the hardware, and not install itself appropriately. It should also -reinitialize the hardware on an APM resume event, assuming that APM -was configured into your kernel. - -============ -Installation -============ - -Enable the sound drivers, the OSS sound drivers, and then the NM256 -driver. The NM256 driver *must* be configured as a module (it won't -give you any other choice). - -Next, do the usual "make modules" and "make modules_install". -Finally, insmod the soundcore, sound and nm256 modules. - -When the nm256 driver module is loaded, you should see a couple of -confirmation messages in the kernel logfile indicating that it found -the device (the device does *not* use any I/O ports or DMA channels). -Now try playing a wav file, futz with the CD-ROM if you have one, etc. - -The NM256 is entirely a PCI-based device, and all the necessary -information is automatically obtained from the card. It can only be -configured as a module in a vain attempt to prevent people from -hurting themselves. It works correctly if it shares an IRQ with -another device (it normally shares IRQ 9 with the builtin eepro100 -ethernet on the Sony Z505 laptops). - -It does not run the card in any sort of compatibility mode. It will -not work on laptops that have the SB16-compatible, AD1848-compatible -or CS4232-compatible codec/mixer; you will want to use the appropriate -compatible OSS driver with these chipsets. I cannot provide any -assistance with machines using the SB16, AD1848 or CS4232 compatible -versions. (The driver now attempts to detect the mixer version, and -will refuse to load if it believes the hardware is not -AC97-compatible.) - -The sound support is very basic, but it does include simultaneous -playback and record capability. The mixer support is also quite -simple, although this is in keeping with the rather limited -functionality of the chipset. - -There is no hardware synthesizer available, as the Losedows OPL-3 and -MIDI support is done via hardware emulation. - -Only three recording devices are available on the Sony: the -microphone, the CD-ROM input, and the volume device (which corresponds -to the stereo output). (Other devices may be available on other -models of laptops.) The Z505 series does not have a builtin CD-ROM, -so of course the CD-ROM input doesn't work. It does work on laptops -with a builtin CD-ROM drive. - -The mixer device does not appear to have any tone controls, at least -on the Z505 series. The mixer module checks for tone controls in the -AC97 mixer, and will enable them if they are available. - -============== -Known problems -============== - - * There are known problems with PCMCIA cards and the eepro100 ethernet - driver on the Z505S/Z505SX/Z505DX. Keep reading. - - * There are also potential problems with using a virtual X display, and - also problems loading the module after the X server has been started. - Keep reading. - - * The volume control isn't anywhere near linear. Sorry. This will be - fixed eventually, when I get sufficiently annoyed with it. (I doubt - it will ever be fixed now, since I've never gotten sufficiently - annoyed with it and nobody else seems to care.) - - * There are reports that the CD-ROM volume is very low. Since I do not - have a CD-ROM equipped laptop, I cannot test this (it's kinda hard to - do remotely). - - * Only 8 fixed-rate speeds are supported. This is mainly a chipset - limitation. It may be possible to support other speeds in the future. - - * There is no support for the telephone mixer/codec. There is support - for a phonein/phoneout device in the mixer driver; whether or not - it does anything is anyone's guess. (Reports on this would be - appreciated. You'll have to figure out how to get the phone to - go off-hook before it'll work, tho.) - - * This driver was not written with any cooperation or support from - NeoMagic. If you have any questions about this, see their website - for their official stance on supporting open source drivers. - -============ -Video memory -============ - -The NeoMagic sound engine uses a portion of the display memory to hold -the sound buffer. (Crazy, eh?) The NeoMagic video BIOS sets up a -special pointer at the top of video RAM to indicate where the top of -the audio buffer should be placed. - -At the present time XFree86 is apparently not aware of this. It will -thus write over either the pointer or the sound buffer with abandon. -(Accelerated-X seems to do a better job here.) - -This implies a few things: - - * Sometimes the NM256 driver has to guess at where the buffer - should be placed, especially if the module is loaded after the - X server is started. It's usually correct, but it will consistently - fail on the Sony F250. - - * Virtual screens greater than 1024x768x16 under XFree86 are - problematic on laptops with only 2.5MB of screen RAM. This - includes all of the 256AV-equipped laptops. (Virtual displays - may or may not work on the 256ZX, which has at least 4MB of - video RAM.) - -If you start having problems with random noise being output either -constantly (this is the usual symptom on the F250), or when windows -are moved around (this is the usual symptom when using a virtual -screen), the best fix is to - - * Don't use a virtual frame buffer. - * Make sure you load the NM256 module before the X server is - started. - -On the F250, it is possible to force the driver to load properly even -after the XFree86 server is started by doing: - - insmod nm256 buffertop=0x25a800 - -This forces the audio buffers to the correct offset in screen RAM. - -One user has reported a similar problem on the Sony F270, although -others apparently aren't seeing any problems. His suggested command -is - - insmod nm256 buffertop=0x272800 - -================= -Official WWW site -================= - -The official site for the NM256 driver is: - - http://www.uglx.org/sony.html - -You should always be able to get the latest version of the driver there, -and the driver will be supported for the foreseeable future. - -============== -Z505RX and IDE -============== - -There appears to be a problem with the IDE chipset on the Z505RX; one -of the symptoms is that sound playback periodically hangs (when the -disk is accessed). The user reporting the problem also reported that -enabling all of the IDE chipset workarounds in the kernel solved the -problem, tho obviously only one of them should be needed--if someone -can give me more details I would appreciate it. - -============================== -Z505S/Z505SX on-board Ethernet -============================== - -If you're using the on-board Ethernet Pro/100 ethernet support on the Z505 -series, I strongly encourage you to download the latest eepro100 driver from -Donald Becker's site: - - ftp://cesdis.gsfc.nasa.gov/pub/linux/drivers/test/eepro100.c - -There was a reported problem on the Z505SX that if the ethernet -interface is disabled and reenabled while the sound driver is loaded, -the machine would lock up. I have included a workaround that is -working satisfactorily. However, you may occasionally see a message -about "Releasing interrupts, over 1000 bad interrupts" which indicates -that the workaround is doing its job. - -================================== -PCMCIA and the Z505S/Z505SX/Z505DX -================================== - -There is also a known problem with the Sony Z505S and Z505SX hanging -if a PCMCIA card is inserted while the ethernet driver is loaded, or -in some cases if the laptop is suspended. This is caused by tons of -spurious IRQ 9s, probably generated from the PCMCIA or ACPI bridges. - -There is currently no fix for the problem that works in every case. -The only known workarounds are to disable the ethernet interface -before inserting or removing a PCMCIA card, or with some cards -disabling the PCMCIA card before ejecting it will also help the -problem with the laptop hanging when the card is ejected. - -One user has reported that setting the tcic's cs_irq to some value -other than 9 (like 11) fixed the problem. This doesn't work on my -Z505S, however--changing the value causes the cardmgr to stop seeing -card insertions and removals, cards don't seem to work correctly, and -I still get hangs if a card is inserted when the kernel is booted. - -Using the latest ethernet driver and pcmcia package allows me to -insert an Adaptec 1480A SlimScsi card without the laptop hanging, -although I still have to shut down the card before ejecting or -powering down the laptop. However, similar experiments with a DE-660 -ethernet card still result in hangs when the card is inserted. I am -beginning to think that the interrupts are CardBus-related, since the -Adaptec card is a CardBus card, and the DE-660 is not; however, I -don't have any other CardBus cards to test with. - -====== -Thanks -====== - -First, I want to thank everyone (except NeoMagic of course) for their -generous support and encouragement. I'd like to list everyone's name -here that replied during the development phase, but the list is -amazingly long. - -I will be rather unfair and single out a few people, however: - - Justin Maurer, for being the first random net.person to try it, - and for letting me login to his Z505SX to get it working there - - Edi Weitz for trying out several different versions, and giving - me a lot of useful feedback - - Greg Rumple for letting me login remotely to get the driver - functional on the 256ZX, for his assistance on tracking - down all sorts of random stuff, and for trying out Accel-X - - Zach Brown, for the initial AC97 mixer interface design - - Jeff Garzik, for various helpful suggestions on the AC97 - interface - - "Mr. Bumpy" for feedback on the Z505RX - - Bill Nottingham, for generous assistance in getting the mixer ID - code working - -================= -Previous versions -================= - -Versions prior to 0.3 (aka `noname') had problems with weird artifacts -in the output and failed to set the recording rate properly. These -problems have long since been fixed. - -Versions prior to 0.5 had problems with clicks in the output when -anything other than 16-bit stereo sound was being played, and also had -periodic clicks when recording. - -Version 0.7 first incorporated support for the NM256ZX chipset, which -is found on some Dell Latitude laptops (the CPt, and apparently -some CPi models as well). It also included the generic AC97 -mixer module. - -Version 0.75 renamed all the functions and files with slightly more -generic names. - -Note that previous versions of this document claimed that recording was -8-bit only; it actually has been working for 16-bits all along. diff --git a/Documentation/sound/oss/OPL3-SA2 b/Documentation/sound/oss/OPL3-SA2 deleted file mode 100644 index d8b6d2bbada6..000000000000 --- a/Documentation/sound/oss/OPL3-SA2 +++ /dev/null @@ -1,210 +0,0 @@ -Documentation for the OPL3-SA2, SA3, and SAx driver (opl3sa2.o) ---------------------------------------------------------------- - -Scott Murray, scott@spiteful.org -January 7, 2001 - -NOTE: All trade-marked terms mentioned below are properties of their - respective owners. - - -Supported Devices ------------------ - -This driver is for PnP soundcards based on the following Yamaha audio -controller chipsets: - -YMF711 aka OPL3-SA2 -YMF715 and YMF719 aka OPL3-SA3 - -Up until recently (December 2000), I'd thought the 719 to be a -different chipset, the OPL3-SAx. After an email exhange with -Yamaha, however, it turns out that the 719 is just a re-badged -715, and the chipsets are identical. The chipset detection code -has been updated to reflect this. - -Anyways, all of these chipsets implement the following devices: - -OPL3 FM synthesizer -Soundblaster Pro -Microsoft/Windows Sound System -MPU401 MIDI interface - -Note that this driver uses the MSS device, and to my knowledge these -chipsets enforce an either/or situation with the Soundblaster Pro -device and the MSS device. Since the MSS device has better -capabilities, I have implemented the driver to use it. - - -Mixer Channels --------------- - -Older versions of this driver (pre-December 2000) had two mixers, -an OPL3-SA2 or SA3 mixer and a MSS mixer. The OPL3-SA[23] mixer -device contained a superset of mixer channels consisting of its own -channels and all of the MSS mixer channels. To simplify the driver -considerably, and to partition functionality better, the OPL3-SA[23] -mixer device now contains has its own specific mixer channels. They -are: - -Volume - Hardware master volume control -Bass - SA3 only, now supports left and right channels -Treble - SA3 only, now supports left and right channels -Microphone - Hardware microphone input volume control -Digital1 - Yamaha 3D enhancement "Wide" mixer - -All other mixer channels (e.g. "PCM", "CD", etc.) now have to be -controlled via the "MS Sound System (CS4231)" mixer. To facilitate -this, the mixer device creation order has been switched so that -the MSS mixer is created first. This allows accessing the majority -of the useful mixer channels even via single mixer-aware tools -such as "aumix". - - -Plug 'n Play ------------- - -In previous kernels (2.2.x), some configuration was required to -get the driver to talk to the card. Being the new millennium and -all, the 2.4.x kernels now support auto-configuration if ISA PnP -support is configured in. Theoretically, the driver even supports -having more than one card in this case. - -With the addition of PnP support to the driver, two new parameters -have been added to control it: - -isapnp - set to 0 to disable ISA PnP card detection - -multiple - set to 0 to disable multiple PnP card detection - - -Optional Parameters -------------------- - -Recent (December 2000) additions to the driver (based on a patch -provided by Peter Englmaier) are two new parameters: - -ymode - Set Yamaha 3D enhancement mode: - 0 = Desktop/Normal 5-12 cm speakers - 1 = Notebook PC (1) 3 cm speakers - 2 = Notebook PC (2) 1.5 cm speakers - 3 = Hi-Fi 16-38 cm speakers - -loopback - Set A/D input source. Useful for echo cancellation: - 0 = Mic Right channel (default) - 1 = Mono output loopback - -The ymode parameter has been tested and does work. The loopback -parameter, however, is untested. Any feedback on its usefulness -would be appreciated. - - -Manual Configuration --------------------- - -If for some reason you decide not to compile ISA PnP support into -your kernel, or disabled the driver's usage of it by setting the -isapnp parameter as discussed above, then you will need to do some -manual configuration. There are two ways of doing this. The most -common is to use the isapnptools package to initialize the card, and -use the kernel module form of the sound subsystem and sound drivers. -Alternatively, some BIOS's allow manual configuration of installed -PnP devices in a BIOS menu, which should allow using the non-modular -sound drivers, i.e. built into the kernel. - -I personally use isapnp and modules, and do not have access to a PnP -BIOS machine to test. If you have such a beast, configuring the -driver to be built into the kernel should just work (thanks to work -done by David Luyer ). You will still need -to specify settings, which can be done by adding: - -opl3sa2=,,,,, - -to the kernel command line. For example: - -opl3sa2=0x370,5,0,1,0x530,0x330 - -If you are instead using the isapnp tools (as most people have been -before Linux 2.4.x), follow the directions in their documentation to -produce a configuration file. Here is the relevant excerpt I used to -use for my SA3 card from my isapnp.conf: - -(CONFIGURE YMH0800/-1 (LD 0 - -# NOTE: IO 0 is for the unused SoundBlaster part of the chipset. -(IO 0 (BASE 0x0220)) -(IO 1 (BASE 0x0530)) -(IO 2 (BASE 0x0388)) -(IO 3 (BASE 0x0330)) -(IO 4 (BASE 0x0370)) -(INT 0 (IRQ 5 (MODE +E))) -(DMA 0 (CHANNEL 0)) -(DMA 1 (CHANNEL 1)) - -Here, note that: - -Port Acceptable Range Purpose ----- ---------------- ------- -IO 0 0x0220 - 0x0280 SB base address, unused. -IO 1 0x0530 - 0x0F48 MSS base address -IO 2 0x0388 - 0x03F8 OPL3 base address -IO 3 0x0300 - 0x0334 MPU base address -IO 4 0x0100 - 0x0FFE card's own base address for its control I/O ports - -The IRQ and DMA values can be any that are considered acceptable for a -MSS. Assuming you've got isapnp all happy, then you should be able to -do something like the following (which matches up with the isapnp -configuration above): - -modprobe mpu401 -modprobe ad1848 -modprobe opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=5 dma=0 dma2=1 -modprobe opl3 io=0x388 - -See the section "Automatic Module Loading" below for how to set up -/etc/modprobe.conf to automate this. - -An important thing to remember that the opl3sa2 module's io argument is -for it's own control port, which handles the card's master mixer for -volume (on all cards), and bass and treble (on SA3 cards). - - -Troubleshooting ---------------- - -If all goes well and you see no error messages, you should be able to -start using the sound capabilities of your system. If you get an -error message while trying to insert the opl3sa2 module, then make -sure that the values of the various arguments match what you specified -in your isapnp configuration file, and that there is no conflict with -another device for an I/O port or interrupt. Checking the contents of -/proc/ioports and /proc/interrupts can be useful to see if you're -butting heads with another device. - -If you still cannot get the module to load, look at the contents of -your system log file, usually /var/log/messages. If you see the -message "opl3sa2: Unknown Yamaha audio controller version", then you -have a different chipset version than I've encountered so far. Look -for all messages in the log file that start with "opl3sa2: " and see -if they provide any clues. If you do not see the chipset version -message, and none of the other messages present in the system log are -helpful, email me some details and I'll try my best to help. - - -Automatic Module Loading ------------------------- - -Lastly, if you're using modules and want to set up automatic module -loading with kmod, the kernel module loader, here is the section I -currently use in my modprobe.conf file: - -# Sound -alias sound-slot-0 opl3sa2 -options opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=7 dma=0 dma2=3 -options opl3 io=0x388 - -That's all it currently takes to get an OPL3-SA3 card working on my -system. Once again, if you have any other problems, email me at the -address listed above. - -Scott diff --git a/Documentation/sound/oss/VIA-chipset b/Documentation/sound/oss/VIA-chipset deleted file mode 100644 index 37865234e54d..000000000000 --- a/Documentation/sound/oss/VIA-chipset +++ /dev/null @@ -1,43 +0,0 @@ -Running sound cards on VIA chipsets - -o There are problems with VIA chipsets and sound cards that appear to - lock the hardware solidly. Test programs under DOS have verified the - problem exists on at least some (but apparently not all) VIA boards - -o VIA have so far failed to bother to answer support mail on the subject - so if you are a VIA engineer feeling aggrieved as you read this - document go chase your own people. If there is a workaround please - let us know so we can implement it. - - -Certain patterns of ISA DMA access used for most PC sound cards cause the -VIA chipsets to lock up. From the collected reports this appears to cover a -wide range of boards. Some also lock up with sound cards under Win* as well. - -Linux implements a workaround providing your chipset is PCI and you compiled -with PCI Quirks enabled. If so you will see a message - "Activating ISA DMA bug workarounds" - -during booting. If you have a VIA PCI chipset that hangs when you use the -sound and is not generating this message even with PCI quirks enabled -please report the information to the linux-kernel list (see REPORTING-BUGS). - -If you are one of the tiny number of unfortunates with a 486 ISA/VLB VIA -chipset board you need to do the following to build a special kernel for -your board - - edit linux/include/asm-i386/dma.h - -change - -#define isa_dma_bridge_buggy (0) - -to - -#define isa_dma_bridge_buggy (1) - -and rebuild a kernel without PCI quirk support. - - -Other than this particular glitch the VIA [M]VP* chipsets appear to work -perfectly with Linux. diff --git a/Documentation/sound/oss/cs46xx b/Documentation/sound/oss/cs46xx deleted file mode 100644 index b54432709863..000000000000 --- a/Documentation/sound/oss/cs46xx +++ /dev/null @@ -1,138 +0,0 @@ - -Documentation for the Cirrus Logic/Crystal SoundFusion cs46xx/cs4280 audio -controller chips (2001/05/11) - -The cs46xx audio driver supports the DSP line of Cirrus controllers. -Specifically, the cs4610, cs4612, cs4614, cs4622, cs4624, cs4630 and the cs4280 -products. This driver uses the generic ac97_codec driver for AC97 codec -support. - - -Features: - -Full Duplex Playback/Capture supported from 8k-48k. -16Bit Signed LE & 8Bit Unsigned, with Mono or Stereo supported. - -APM/PM - 2.2.x PM is enabled and functional. APM can also -be enabled for 2.4.x by modifying the CS46XX_ACPI_SUPPORT macro -definition. - -DMA playback buffer size is configurable from 16k (defaultorder=2) up to 2Meg -(defaultorder=11). DMA capture buffer size is fixed at a single 4k page as -two 2k fragments. - -MMAP seems to work well with QuakeIII, and test XMMS plugin. - -Myth2 works, but the polling logic is not fully correct, but is functional. - -The 2.4.4-ac6 gameport code in the cs461x joystick driver has been tested -with a Microsoft Sidewinder joystick (cs461x.o and sidewinder.o). This -audio driver must be loaded prior to the joystick driver to enable the -DSP task image supporting the joystick device. - - -Limitations: - -SPDIF is currently not supported. - -Primary codec support only. No secondary codec support is implemented. - - - -NOTES: - -Hercules Game Theatre XP - the EGPIO2 pin controls the external Amp, -and has been tested. -Module parameter hercules_egpio_disable set to 1, will force a 0 to EGPIODR -to disable the external amplifier. - -VTB Santa Cruz - the GPIO7/GPIO8 on the Secondary Codec control -the external amplifier for the "back" speakers, since we do not -support the secondary codec then this external amp is not -turned on. The primary codec external amplifier is supported but -note that the AC97 EAPD bit is inverted logic (amp_voyetra()). - -DMA buffer size - there are issues with many of the Linux applications -concerning the optimal buffer size. Several applications request a -certain fragment size and number and then do not verify that the driver -has the ability to support the requested configuration. -SNDCTL_DSP_SETFRAGMENT ioctl is used to request a fragment size and -number of fragments. Some applications exit if an error is returned -on this particular ioctl. Therefore, in alignment with the other OSS audio -drivers, no error is returned when a SETFRAGs IOCTL is received, but the -values passed from the app are not used in any buffer calculation -(ossfragshift/ossmaxfrags are not used). -Use the "defaultorder=N" module parameter to change the buffer size if -you have an application that requires a specific number of fragments -or a specific buffer size (see below). - -Debug Interface ---------------- -There is an ioctl debug interface to allow runtime modification of the -debug print levels. This debug interface code can be disabled from the -compilation process with commenting the following define: -#define CSDEBUG_INTERFACE 1 -There is also a debug print methodolgy to select printf statements from -different areas of the driver. A debug print level is also used to allow -additional printfs to be active. Comment out the following line in the -driver to disable compilation of the CS_DBGOUT print statements: -#define CSDEBUG 1 - -Please see the definitions for cs_debuglevel and cs_debugmask for additional -information on the debug levels and sections. - -There is also a csdbg executable to allow runtime manipulation of these -parameters. for a copy email: twoller@crystal.cirrus.com - - - -MODULE_PARMS definitions ------------------------- -module_param(defaultorder, ulong, 0); -defaultorder=N -where N is a value from 1 to 12 -The buffer order determines the size of the dma buffer for the driver. -under Linux, a smaller buffer allows more responsiveness from many of the -applications (e.g. games). A larger buffer allows some of the apps (esound) -to not underrun the dma buffer as easily. As default, use 32k (order=3) -rather than 64k as some of the games work more responsively. -(2^N) * PAGE_SIZE = allocated buffer size - -module_param(cs_debuglevel, ulong, 0644); -module_param(cs_debugmask, ulong, 0644); -cs_debuglevel=N -cs_debugmask=0xMMMMMMMM -where N is a value from 0 (no debug printfs), to 9 (maximum) -0xMMMMMMMM is a debug mask corresponding to the CS_xxx bits (see driver source). - -module_param(hercules_egpio_disable, ulong, 0); -hercules_egpio_disable=N -where N is a 0 (enable egpio), or a 1 (disable egpio support) - -module_param(initdelay, ulong, 0); -initdelay=N -This value is used to determine the millescond delay during the initialization -code prior to powering up the PLL. On laptops this value can be used to -assist with errors on resume, mostly with IBM laptops. Basically, if the -system is booted under battery power then the mdelay()/udelay() functions fail to -properly delay the required time. Also, if the system is booted under AC power -and then the power removed, the mdelay()/udelay() functions will not delay properly. - -module_param(powerdown, ulong, 0); -powerdown=N -where N is 0 (disable any powerdown of the internal blocks) or 1 (enable powerdown) - - -module_param(external_amp, bool, 0); -external_amp=1 -if N is set to 1, then force enabling the EAPD support in the primary AC97 codec. -override the detection logic and force the external amp bit in the AC97 0x26 register -to be reset (0). EAPD should be 0 for powerup, and 1 for powerdown. The VTB Santa Cruz -card has inverted logic, so there is a special function for these cards. - -module_param(thinkpad, bool, 0); -thinkpad=1 -if N is set to 1, then force enabling the clkrun functionality. -Currently, when the part is being used, then clkrun is disabled for the entire system, -but re-enabled when the driver is released or there is no outstanding open count. - diff --git a/MAINTAINERS b/MAINTAINERS index 76ac08e01099..da9e60a71e3a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -194,13 +194,6 @@ M: jes@trained-monkey.org L: linux-acenic@sunsite.dk S: Maintained -ACI MIXER DRIVER -P: Robert Siemer -M: Robert.Siemer@gmx.de -L: linux-sound@vger.kernel.org -W: http://www.stud.uni-karlsruhe.de/~uh1b/ -S: Maintained - IPS SCSI RAID DRIVER P: Adaptec OEM Raid Solutions M: aacraid@adaptec.com @@ -272,21 +265,6 @@ L: linux-acpi@vger.kernel.org W: http://acpi.sourceforge.net/ S: Supported -AD1816 SOUND DRIVER -P: Thorsten Knabe -M: Thorsten Knabe -W: http://linux.thorsten-knabe.de -S: Maintained - -AD1889 SOUND DRIVER -P: Kyle McMartin -M: kyle@parisc-linux.org -P: Thibaut Varene -M: T-Bone@parisc-linux.org -W: http://wiki.parisc-linux.org/AD1889 -L: parisc-linux@lists.parisc-linux.org -S: Maintained - ADM1025 HARDWARE MONITOR DRIVER P: Jean Delvare M: khali@linux-fr.org @@ -1404,13 +1382,6 @@ M: raisch@de.ibm.com L: general@lists.openfabrics.org S: Supported -EMU10K1 SOUND DRIVER -P: James Courtier-Dutton -M: James@superbug.demon.co.uk -L: emu10k1-devel@lists.sourceforge.net -W: http://sourceforge.net/projects/emu10k1/ -S: Maintained - EMULEX LPFC FC SCSI DRIVER P: James Smart M: james.smart@emulex.com @@ -2730,12 +2701,6 @@ L: osst-users@lists.sourceforge.net L: linux-scsi@vger.kernel.org S: Maintained -OPL3-SA2, SA3, and SAx DRIVER -P: Zwane Mwaikambo -M: zwane@arm.linux.org.uk -L: linux-sound@vger.kernel.org -S: Maintained - OPROFILE P: Philippe Elie M: phil.el@wanadoo.fr diff --git a/sound/oss/Makefile b/sound/oss/Makefile index 2489bd6bb085..7a2f9ae7b7c5 100644 --- a/sound/oss/Makefile +++ b/sound/oss/Makefile @@ -18,20 +18,15 @@ obj-$(CONFIG_SOUND_TRIX) += trix.o ad1848.o sb_lib.o uart401.o obj-$(CONFIG_SOUND_SSCAPE) += sscape.o ad1848.o mpu401.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_MPU401) += mpu401.o obj-$(CONFIG_SOUND_UART6850) += uart6850.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_AD1816) += ad1816.o -obj-$(CONFIG_SOUND_AD1889) += ad1889.o ac97_codec.o -obj-$(CONFIG_SOUND_ACI_MIXER) += aci.o obj-$(CONFIG_SOUND_VIA82CXXX) += via82cxxx_audio.o ac97_codec.o ifeq ($(CONFIG_MIDI_VIA82CXXX),y) @@ -40,24 +35,16 @@ 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_ES1371) += es1371.o ac97_codec.o obj-$(CONFIG_SOUND_VRC5477) += nec_vrc5477.o ac97_codec.o obj-$(CONFIG_SOUND_AU1550_AC97) += au1550_ac97.o ac97_codec.o -obj-$(CONFIG_SOUND_FUSION) += cs46xx.o ac97_codec.o obj-$(CONFIG_SOUND_TRIDENT) += trident.o ac97_codec.o -obj-$(CONFIG_SOUND_EMU10K1) += ac97_codec.o obj-$(CONFIG_SOUND_BCM_CS4297A) += swarm_cs4297a.o obj-$(CONFIG_SOUND_BT878) += btaudio.o obj-$(CONFIG_SOUND_WM97XX) += ac97_plugin_wm97xx.o -ifeq ($(CONFIG_MIDI_EMU10K1),y) - obj-$(CONFIG_SOUND_EMU10K1) += sound.o -endif - -obj-$(CONFIG_SOUND_EMU10K1) += emu10k1/ obj-$(CONFIG_DMASOUND) += dmasound/ # Declare multi-part drivers. diff --git a/sound/oss/ac97.c b/sound/oss/ac97.c deleted file mode 100644 index 72cf4ed77937..000000000000 --- a/sound/oss/ac97.c +++ /dev/null @@ -1,432 +0,0 @@ -#include -#include -#include -#include "ac97.h" - -/* Flag for mono controls. */ -#define MO 0 -/* And for stereo. */ -#define ST 1 - -/* Whether or not the bits in the channel are inverted. */ -#define INV 1 -#define NINV 0 - -static struct ac97_chn_desc { - int ac97_regnum; - int oss_channel; - int maxval; - int is_stereo; - int oss_mask; - int recordNum; - u16 regmask; - int is_inverted; -} mixerRegs[] = { - { AC97_MASTER_VOL_STEREO, SOUND_MIXER_VOLUME, 0x3f, ST, SOUND_MASK_VOLUME, 5, 0x0000, INV }, - { AC97_MASTER_VOL_MONO, SOUND_MIXER_PHONEOUT, 0x3f, MO, SOUND_MASK_PHONEOUT, 6, 0x0000, INV }, - { AC97_MASTER_TONE, SOUND_MIXER_TREBLE, 0x0f, MO, SOUND_MASK_TREBLE, -1, 0x00ff, INV }, - { AC97_MASTER_TONE, SOUND_MIXER_BASS, 0x0f, MO, SOUND_MASK_BASS, -1, 0xff00, INV }, - { AC97_PCBEEP_VOL, SOUND_MIXER_SPEAKER, 0x0f, MO, SOUND_MASK_SPEAKER, -1, 0x001e, INV }, - { AC97_PHONE_VOL, SOUND_MIXER_PHONEIN, 0x1f, MO, SOUND_MASK_PHONEIN, 7, 0x0000, INV }, - { AC97_MIC_VOL, SOUND_MIXER_MIC, 0x1f, MO, SOUND_MASK_MIC, 0, 0x0000, INV }, - { AC97_LINEIN_VOL, SOUND_MIXER_LINE, 0x1f, ST, SOUND_MASK_LINE, 4, 0x0000, INV }, - { AC97_CD_VOL, SOUND_MIXER_CD, 0x1f, ST, SOUND_MASK_CD, 1, 0x0000, INV }, - { AC97_VIDEO_VOL, SOUND_MIXER_VIDEO, 0x1f, ST, SOUND_MASK_VIDEO, 2, 0x0000, INV }, - { AC97_AUX_VOL, SOUND_MIXER_LINE1, 0x1f, ST, SOUND_MASK_LINE1, 3, 0x0000, INV }, - { AC97_PCMOUT_VOL, SOUND_MIXER_PCM, 0x1f, ST, SOUND_MASK_PCM, -1, 0x0000, INV }, - { AC97_RECORD_GAIN, SOUND_MIXER_IGAIN, 0x0f, ST, SOUND_MASK_IGAIN, -1, 0x0000, NINV }, - { -1, -1, 0xff, 0, 0, -1, 0x0000, 0 }, -}; - -static struct ac97_chn_desc * -ac97_find_chndesc (struct ac97_hwint *dev, int oss_channel) -{ - int x; - - for (x = 0; mixerRegs[x].oss_channel != -1; x++) { - if (mixerRegs[x].oss_channel == oss_channel) - return mixerRegs + x; - } - - return NULL; -} - -static inline int -ac97_is_valid_channel (struct ac97_hwint *dev, struct ac97_chn_desc *chn) -{ - return (dev->last_written_mixer_values[chn->ac97_regnum / 2] - != AC97_REG_UNSUPPORTED); -} - -int -ac97_init (struct ac97_hwint *dev) -{ - int x; - int reg0; - - /* Clear out the arrays of cached values. */ - for (x = 0; x < AC97_REG_CNT; x++) - dev->last_written_mixer_values[x] = AC97_REGVAL_UNKNOWN; - - for (x = 0; x < SOUND_MIXER_NRDEVICES; x++) - dev->last_written_OSS_values[x] = AC97_REGVAL_UNKNOWN; - - /* Clear the device masks. */ - dev->mixer_devmask = 0; - dev->mixer_stereomask = 0; - dev->mixer_recmask = 0; - - /* ??? Do a "standard reset" via register 0? */ - - /* Hardware-dependent reset. */ - if (dev->reset_device (dev)) - return -1; - - /* Check the mixer device capabilities. */ - reg0 = dev->read_reg (dev, AC97_RESET); - - if (reg0 < 0) - return -1; - - /* Check for support for treble/bass controls. */ - if (! (reg0 & 4)) { - dev->last_written_mixer_values[AC97_MASTER_TONE / 2] - = AC97_REG_UNSUPPORTED; - } - - /* ??? There may be other tests here? */ - - /* Fill in the device masks. */ - for (x = 0; mixerRegs[x].ac97_regnum != -1; x++) { - if (ac97_is_valid_channel (dev, mixerRegs + x)) { - dev->mixer_devmask |= mixerRegs[x].oss_mask; - - if (mixerRegs[x].is_stereo) - dev->mixer_stereomask |= mixerRegs[x].oss_mask; - - if (mixerRegs[x].recordNum != -1) - dev->mixer_recmask |= mixerRegs[x].oss_mask; - } - } - - 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 -ac97_get_register (struct ac97_hwint *dev, u8 reg) -{ - if (reg > 127 || (reg & 1)) - return -EINVAL; - - /* See if it's in the cache, or if it's just plain invalid. */ - switch (dev->last_written_mixer_values[reg / 2]) { - case AC97_REG_UNSUPPORTED: - return -EINVAL; - break; - case AC97_REGVAL_UNKNOWN: - dev->last_written_mixer_values[reg / 2] = dev->read_reg (dev, reg); - break; - default: - break; - } - return dev->last_written_mixer_values[reg / 2]; -} - -/* Write VALUE to AC97 register REG, and cache its value in the last-written - cache. Returns a negative error code on failure, or 0 on success. */ -int -ac97_put_register (struct ac97_hwint *dev, u8 reg, u16 value) -{ - if (reg > 127 || (reg & 1)) - return -EINVAL; - - if (dev->last_written_mixer_values[reg / 2] == AC97_REG_UNSUPPORTED) - return -EINVAL; - else { - int res = dev->write_reg (dev, reg, value); - if (res >= 0) { - dev->last_written_mixer_values[reg / 2] = value; - return 0; - } - else - return res; - } -} - -/* Scale VALUE (a value fro 0 to MAXVAL) to a value from 0-100. If - IS_STEREO is set, VALUE is a stereo value; the left channel value - is in the lower 8 bits, and the right channel value is in the upper - 8 bits. - - A negative error code is returned on failure, or the unsigned - scaled value on success. */ - -static int -ac97_scale_to_oss_val (int value, int maxval, int is_stereo, int inv) -{ - /* Muted? */ - if (value & AC97_MUTE) - return 0; - - if (is_stereo) - return (ac97_scale_to_oss_val (value & 255, maxval, 0, inv) << 8) - | (ac97_scale_to_oss_val ((value >> 8) & 255, maxval, 0, inv) << 0); - else { - int i; - - /* Inverted. */ - if (inv) - value = maxval - value; - - i = (value * 100 + (maxval / 2)) / maxval; - if (i > 100) - i = 100; - if (i < 0) - i = 0; - return i; - } -} - -static int -ac97_scale_from_oss_val (int value, int maxval, int is_stereo, int inv) -{ - if (is_stereo) - return (ac97_scale_from_oss_val (value & 255, maxval, 0, inv) << 8) - | (ac97_scale_from_oss_val ((value >> 8) & 255, maxval, 0, inv) << 0); - else { - int i = ((value & 255) * maxval + 50) / 100; - if (inv) - i = maxval - i; - if (i < 0) - i = 0; - if (i > maxval) - i = maxval; - return i; - } -} - -static int -ac97_set_mixer (struct ac97_hwint *dev, int oss_channel, u16 oss_value) -{ - int scaled_value; - struct ac97_chn_desc *channel = ac97_find_chndesc (dev, oss_channel); - int result; - - if (channel == NULL) - return -ENODEV; - if (! ac97_is_valid_channel (dev, channel)) - return -ENODEV; - scaled_value = ac97_scale_from_oss_val (oss_value, channel->maxval, - channel->is_stereo, - channel->is_inverted); - if (scaled_value < 0) - return scaled_value; - - if (channel->regmask != 0) { - int mv; - - int oldval = ac97_get_register (dev, channel->ac97_regnum); - if (oldval < 0) - return oldval; - - for (mv = channel->regmask; ! (mv & 1); mv >>= 1) - scaled_value <<= 1; - - scaled_value &= channel->regmask; - scaled_value |= (oldval & ~channel->regmask); - } - result = ac97_put_register (dev, channel->ac97_regnum, scaled_value); - if (result == 0) - dev->last_written_OSS_values[oss_channel] = oss_value; - return result; -} - -static int -ac97_get_mixer_scaled (struct ac97_hwint *dev, int oss_channel) -{ - struct ac97_chn_desc *channel = ac97_find_chndesc (dev, oss_channel); - int regval; - - if (channel == NULL) - return -ENODEV; - - if (! ac97_is_valid_channel (dev, channel)) - return -ENODEV; - - regval = ac97_get_register (dev, channel->ac97_regnum); - - if (regval < 0) - return regval; - - if (channel->regmask != 0) { - int mv; - - regval &= channel->regmask; - - for (mv = channel->regmask; ! (mv & 1); mv >>= 1) - regval >>= 1; - } - return ac97_scale_to_oss_val (regval, channel->maxval, - channel->is_stereo, - channel->is_inverted); -} - -static int -ac97_get_recmask (struct ac97_hwint *dev) -{ - int recReg = ac97_get_register (dev, AC97_RECORD_SELECT); - - if (recReg < 0) - return recReg; - else { - int x; - for (x = 0; mixerRegs[x].ac97_regnum >= 0; x++) { - if (mixerRegs[x].recordNum == (recReg & 7)) - return mixerRegs[x].oss_mask; - } - return -ENODEV; - } -} - -static int -ac97_set_recmask (struct ac97_hwint *dev, int oss_recmask) -{ - int x; - - if (oss_recmask == 0) - oss_recmask = SOUND_MIXER_MIC; - - for (x = 0; mixerRegs[x].ac97_regnum >= 0; x++) { - if ((mixerRegs[x].recordNum >= 0) - && (oss_recmask & mixerRegs[x].oss_mask)) - break; - } - if (mixerRegs[x].ac97_regnum < 0) - return -ENODEV; - else { - int regval = (mixerRegs[x].recordNum << 8) | mixerRegs[x].recordNum; - int res = ac97_put_register (dev, AC97_RECORD_SELECT, regval); - if (res == 0) - return ac97_get_recmask (dev); - else - return res; - } -} - -/* Set the mixer DEV to the list of values in VALUE_LIST. Return 0 on - success, or a negative error code. */ -int -ac97_set_values (struct ac97_hwint *dev, - struct ac97_mixer_value_list *value_list) -{ - int x; - - for (x = 0; value_list[x].oss_channel != -1; x++) { - int chnum = value_list[x].oss_channel; - struct ac97_chn_desc *chent = ac97_find_chndesc (dev, chnum); - if (chent != NULL) { - u16 val; - int res; - - if (chent->is_stereo) - val = (value_list[x].value.stereo.right << 8) - | value_list[x].value.stereo.left; - else { - /* We do this so the returned value looks OK in the - mixer app. It's not necessary otherwise. */ - val = (value_list[x].value.mono << 8) - | value_list[x].value.mono; - } - res = ac97_set_mixer (dev, chnum, val); - if (res < 0) - return res; - } - else - return -ENODEV; - } - return 0; -} - -int -ac97_mixer_ioctl (struct ac97_hwint *dev, unsigned int cmd, void __user *arg) -{ - int ret; - - switch (cmd) { - case SOUND_MIXER_READ_RECSRC: - ret = ac97_get_recmask (dev); - break; - - case SOUND_MIXER_WRITE_RECSRC: - { - if (get_user (ret, (int __user *) arg)) - ret = -EFAULT; - else - ret = ac97_set_recmask (dev, ret); - } - break; - - case SOUND_MIXER_READ_CAPS: - ret = SOUND_CAP_EXCL_INPUT; - break; - - case SOUND_MIXER_READ_DEVMASK: - ret = dev->mixer_devmask; - break; - - case SOUND_MIXER_READ_RECMASK: - ret = dev->mixer_recmask; - break; - - case SOUND_MIXER_READ_STEREODEVS: - ret = dev->mixer_stereomask; - break; - - default: - /* Read or write request. */ - ret = -EINVAL; - if (_IOC_TYPE (cmd) == 'M') { - int dir = _SIOC_DIR (cmd); - int channel = _IOC_NR (cmd); - - if (channel >= 0 && channel < SOUND_MIXER_NRDEVICES) { - ret = 0; - if (dir & _SIOC_WRITE) { - int val; - if (get_user (val, (int __user *) arg) == 0) - ret = ac97_set_mixer (dev, channel, val); - else - ret = -EFAULT; - } - if (ret >= 0 && (dir & _SIOC_READ)) { - if (dev->last_written_OSS_values[channel] - == AC97_REGVAL_UNKNOWN) - dev->last_written_OSS_values[channel] - = ac97_get_mixer_scaled (dev, channel); - ret = dev->last_written_OSS_values[channel]; - } - } - } - break; - } - - if (ret < 0) - return ret; - else - return put_user(ret, (int __user *) arg); -} - -EXPORT_SYMBOL(ac97_init); -EXPORT_SYMBOL(ac97_set_values); -EXPORT_SYMBOL(ac97_put_register); -EXPORT_SYMBOL(ac97_mixer_ioctl); -MODULE_LICENSE("GPL"); - - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/sound/oss/ac97.h b/sound/oss/ac97.h deleted file mode 100644 index 01837a9d7d6e..000000000000 --- a/sound/oss/ac97.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * ac97.h - * - * definitions for the AC97, Intel's Audio Codec 97 Spec - * also includes support for a generic AC97 interface - */ - -#ifndef _AC97_H_ -#define _AC97_H_ -#include "sound_config.h" -#include "sound_calls.h" - -#define AC97_RESET 0x0000 // -#define AC97_MASTER_VOL_STEREO 0x0002 // Line Out -#define AC97_HEADPHONE_VOL 0x0004 // -#define AC97_MASTER_VOL_MONO 0x0006 // TAD Output -#define AC97_MASTER_TONE 0x0008 // -#define AC97_PCBEEP_VOL 0x000a // none -#define AC97_PHONE_VOL 0x000c // TAD Input (mono) -#define AC97_MIC_VOL 0x000e // MIC Input (mono) -#define AC97_LINEIN_VOL 0x0010 // Line Input (stereo) -#define AC97_CD_VOL 0x0012 // CD Input (stereo) -#define AC97_VIDEO_VOL 0x0014 // none -#define AC97_AUX_VOL 0x0016 // Aux Input (stereo) -#define AC97_PCMOUT_VOL 0x0018 // Wave Output (stereo) -#define AC97_RECORD_SELECT 0x001a // -#define AC97_RECORD_GAIN 0x001c -#define AC97_RECORD_GAIN_MIC 0x001e -#define AC97_GENERAL_PURPOSE 0x0020 -#define AC97_3D_CONTROL 0x0022 -#define AC97_MODEM_RATE 0x0024 -#define AC97_POWER_CONTROL 0x0026 - -/* registers 0x0028 - 0x0058 are reserved */ - -/* AC'97 2.0 */ -#define AC97_EXTENDED_ID 0x0028 /* Extended Audio ID */ -#define AC97_EXTENDED_STATUS 0x002A /* Extended Audio Status */ -#define AC97_PCM_FRONT_DAC_RATE 0x002C /* PCM Front DAC Rate */ -#define AC97_PCM_SURR_DAC_RATE 0x002E /* PCM Surround DAC Rate */ -#define AC97_PCM_LFE_DAC_RATE 0x0030 /* PCM LFE DAC Rate */ -#define AC97_PCM_LR_ADC_RATE 0x0032 /* PCM LR DAC Rate */ -#define AC97_PCM_MIC_ADC_RATE 0x0034 /* PCM MIC ADC Rate */ -#define AC97_CENTER_LFE_MASTER 0x0036 /* Center + LFE Master Volume */ -#define AC97_SURROUND_MASTER 0x0038 /* Surround (Rear) Master Volume */ -#define AC97_RESERVED_3A 0x003A /* Reserved */ -/* range 0x3c-0x58 - MODEM */ - -/* registers 0x005a - 0x007a are vendor reserved */ - -#define AC97_VENDOR_ID1 0x007c -#define AC97_VENDOR_ID2 0x007e - -/* volume control bit defines */ - -#define AC97_MUTE 0x8000 -#define AC97_MICBOOST 0x0040 -#define AC97_LEFTVOL 0x3f00 -#define AC97_RIGHTVOL 0x003f - -/* record mux defines */ - -#define AC97_RECMUX_MIC 0x0000 -#define AC97_RECMUX_CD 0x0101 -#define AC97_RECMUX_VIDEO 0x0202 /* not used */ -#define AC97_RECMUX_AUX 0x0303 -#define AC97_RECMUX_LINE 0x0404 -#define AC97_RECMUX_STEREO_MIX 0x0505 -#define AC97_RECMUX_MONO_MIX 0x0606 -#define AC97_RECMUX_PHONE 0x0707 - - -/* general purpose register bit defines */ - -#define AC97_GP_LPBK 0x0080 /* Loopback mode */ -#define AC97_GP_MS 0x0100 /* Mic Select 0=Mic1, 1=Mic2 */ -#define AC97_GP_MIX 0x0200 /* Mono output select 0=Mix, 1=Mic */ -#define AC97_GP_RLBK 0x0400 /* Remote Loopback - Modem line codec */ -#define AC97_GP_LLBK 0x0800 /* Local Loopback - Modem Line codec */ -#define AC97_GP_LD 0x1000 /* Loudness 1=on */ -#define AC97_GP_3D 0x2000 /* 3D Enhancement 1=on */ -#define AC97_GP_ST 0x4000 /* Stereo Enhancement 1=on */ -#define AC97_GP_POP 0x8000 /* Pcm Out Path, 0=pre 3D, 1=post 3D */ - - -/* powerdown control and status bit defines */ - -/* status */ -#define AC97_PWR_MDM 0x0010 /* Modem section ready */ -#define AC97_PWR_REF 0x0008 /* Vref nominal */ -#define AC97_PWR_ANL 0x0004 /* Analog section ready */ -#define AC97_PWR_DAC 0x0002 /* DAC section ready */ -#define AC97_PWR_ADC 0x0001 /* ADC section ready */ - -/* control */ -#define AC97_PWR_PR0 0x0100 /* ADC and Mux powerdown */ -#define AC97_PWR_PR1 0x0200 /* DAC powerdown */ -#define AC97_PWR_PR2 0x0400 /* Output mixer powerdown (Vref on) */ -#define AC97_PWR_PR3 0x0800 /* Output mixer powerdown (Vref off) */ -#define AC97_PWR_PR4 0x1000 /* AC-link powerdown */ -#define AC97_PWR_PR5 0x2000 /* Internal Clk disable */ -#define AC97_PWR_PR6 0x4000 /* HP amp powerdown */ -#define AC97_PWR_PR7 0x8000 /* Modem off - if supported */ - -/* useful power states */ -#define AC97_PWR_D0 0x0000 /* everything on */ -#define AC97_PWR_D1 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR4 -#define AC97_PWR_D2 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR2|AC97_PWR_PR3|AC97_PWR_PR4 -#define AC97_PWR_D3 AC97_PWR_PR0|AC97_PWR_PR1|AC97_PWR_PR2|AC97_PWR_PR3|AC97_PWR_PR4 -#define AC97_PWR_ANLOFF AC97_PWR_PR2|AC97_PWR_PR3 /* analog section off */ - -/* Total number of defined registers. */ -#define AC97_REG_CNT 64 - -/* Generic AC97 mixer interface. */ - -/* Structure describing access to the hardware. */ -struct ac97_hwint -{ - /* Perform any hardware-specific reset and initialization. Returns - 0 on success, or a negative error code. */ - int (*reset_device) (struct ac97_hwint *dev); - - /* Returns the contents of the specified register REG. The caller - should check to see if the desired contents are available in - the cache first, if applicable. Returns a positive unsigned value - representing the contents of the register, or a negative error - code. */ - int (*read_reg) (struct ac97_hwint *dev, u8 reg); - - /* Writes VALUE to register REG. Returns 0 on success, or a - negative error code. */ - int (*write_reg) (struct ac97_hwint *dev, u8 reg, u16 value); - - /* Hardware-specific information. */ - void *driver_private; - - /* Three OSS masks. */ - int mixer_devmask; - int mixer_stereomask; - int mixer_recmask; - - /* The mixer cache. The indices correspond to the AC97 hardware register - number / 2, since the register numbers are always an even number. - - Unknown values are set to -1; unsupported registers contain a - -2. */ - int last_written_mixer_values[AC97_REG_CNT]; - - /* A cache of values written via OSS; we need these so we can return - the values originally written by the user. - - Why the original user values? Because the real-world hardware - has less precision, and some existing applications assume that - they will get back the exact value that they wrote (aumix). - - A -1 value indicates that no value has been written to this mixer - channel via OSS. */ - int last_written_OSS_values[SOUND_MIXER_NRDEVICES]; -}; - -/* Values stored in the register cache. */ -#define AC97_REGVAL_UNKNOWN -1 -#define AC97_REG_UNSUPPORTED -2 - -struct ac97_mixer_value_list -{ - /* Mixer channel to set. List is terminated by a value of -1. */ - int oss_channel; - /* The scaled value to set it to; values generally range from 0-100. */ - union { - struct { - u8 left, right; - } stereo; - u8 mono; - } value; -}; - -/* Initialize the ac97 mixer by resetting it. */ -extern int ac97_init (struct ac97_hwint *dev); - -/* Sets the mixer DEV to the values in VALUE_LIST. Returns 0 on success, - or a negative error code. */ -extern int ac97_set_values (struct ac97_hwint *dev, - struct ac97_mixer_value_list *value_list); - -/* Writes the specified VALUE to the AC97 register REG in the mixer. - Takes care of setting the last-written cache as well. */ -extern int ac97_put_register (struct ac97_hwint *dev, u8 reg, u16 value); - -/* Default ioctl. */ -extern int ac97_mixer_ioctl (struct ac97_hwint *dev, unsigned int cmd, - void __user * arg); - -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/sound/oss/aci.c b/sound/oss/aci.c deleted file mode 100644 index 3bfac375dbdb..000000000000 --- a/sound/oss/aci.c +++ /dev/null @@ -1,712 +0,0 @@ -/* - * Audio Command Interface (ACI) driver (sound/aci.c) - * - * ACI is a protocol used to communicate with the microcontroller on - * some sound cards produced by miro, e.g. the miroSOUND PCM12 and - * PCM20. The ACI has been developed for miro by Norberto Pellicci - * . Special thanks to both him and miro for - * providing the ACI specification. - * - * The main function of the ACI is to control the mixer and to get a - * product identification. On the PCM20, ACI also controls the radio - * tuner on this card, this is supported in the Video for Linux - * miropcm20 driver. - * - - * This is a fullfeatured implementation. Unsupported features - * are bugs... (: - * - * It is not longer necessary to load the mad16 module first. The - * user is currently responsible to set the mad16 mixer correctly. - * - * To toggle the solo mode for full duplex operation just use the OSS - * record switch for the pcm ('wave') controller. Robert - * - - * - * Revision history: - * - * 1995-11-10 Markus Kuhn - * First version written. - * 1995-12-31 Markus Kuhn - * Second revision, general code cleanup. - * 1996-05-16 Hannu Savolainen - * Integrated with other parts of the driver. - * 1996-05-28 Markus Kuhn - * Initialize CS4231A mixer, make ACI first mixer, - * use new private mixer API for solo mode. - * 1998-08-18 Ruurd Reitsma - * Small modification to export ACI functions and - * complete modularisation. - * 2000-06-20 Robert Siemer - * Don't initialize the CS4231A mixer anymore, so the code is - * working again, and other small changes to fit in todays - * kernels. - * 2000-08-26 Robert Siemer - * Clean up and rewrite for 2.4.x. Maybe it's SMP safe now... (: - * ioctl bugfix, and integration of solo-mode into OSS-API, - * added (OSS-limited) equalizer support, return value bugfix, - * changed param aci_reset to reset, new params: ide, wss. - * 2001-04-20 Robert Siemer - * even more cleanups... - * 2001-10-08 Arnaldo Carvalho de Melo - * Get rid of check_region, .bss optimizations, use set_current_state - */ - -#include -#include -#include -#include -#include -#include - -#include -#include -#include "sound_config.h" - -int aci_port; /* as determined by bit 4 in the OPTi 929 MC4 register */ -static int aci_idcode[2]; /* manufacturer and product ID */ -int aci_version; /* ACI firmware version */ - -EXPORT_SYMBOL(aci_port); -EXPORT_SYMBOL(aci_version); - -#include "aci.h" - - -static int aci_solo; /* status bit of the card that can't be * - * checked with ACI versions prior to 0xb0 */ -static int aci_amp; /* status bit for power-amp/line-out level - but I have no docs about what is what... */ -static int aci_micpreamp=3; /* microphone preamp-level that can't be * - * checked with ACI versions prior to 0xb0 */ - -static int mixer_device; -static struct mutex aci_mutex; - -#ifdef MODULE -static int reset; -module_param(reset, bool, 0); -MODULE_PARM_DESC(reset,"When set to 1, reset aci mixer."); -#else -static int reset = 1; -#endif - -static int ide=-1; -module_param(ide, int, 0); -MODULE_PARM_DESC(ide,"1 enable, 0 disable ide-port - untested" - " default: do nothing"); -static int wss=-1; -module_param(wss, int, 0); -MODULE_PARM_DESC(wss,"change between ACI/WSS-mixer; use 0 and 1 - untested" - " default: do nothing; for PCM1-pro only"); - -#ifdef DEBUG -static void print_bits(unsigned char c) -{ - int j; - printk(KERN_DEBUG "aci: "); - - for (j=7; j>=0; j--) { - printk("%d", (c >> j) & 0x1); - } - - printk("\n"); -} -#endif - -/* - * This busy wait code normally requires less than 15 loops and - * practically always less than 100 loops on my i486/DX2 66 MHz. - * - * Warning: Waiting on the general status flag after reseting the MUTE - * function can take a VERY long time, because the PCM12 does some kind - * of fade-in effect. For this reason, access to the MUTE function has - * not been implemented at all. - * - * - The OSS interface has no mute option. It takes about 3 seconds to - * fade-in on my PCM20. busy_wait() handles it great now... Robert - */ - -static int busy_wait(void) -{ - #define MINTIME 500 - long timeout; - unsigned char byte; - - for (timeout = 1; timeout <= MINTIME+30; timeout++) { - if (((byte=inb(BUSY_REGISTER)) & 1) == 0) { - if (timeout >= MINTIME) - printk(KERN_DEBUG "aci: Got READYFLAG in round %ld.\n", timeout-MINTIME); - return byte; - } - if (timeout >= MINTIME) { - long out=10*HZ; - switch (timeout-MINTIME) { - case 0 ... 9: - out /= 10; - case 10 ... 19: - out /= 10; - case 20 ... 30: - out /= 10; - default: - set_current_state(TASK_UNINTERRUPTIBLE); - schedule_timeout(out); - break; - } - } - } - printk(KERN_WARNING "aci: busy_wait() time out.\n"); - return -EBUSY; -} - -/* The four ACI command types are fucked up. [-: - * implied is: 1w - special case for INIT - * write is: 2w1r - * read is: x(1w1r) where x is 1 or 2 (1 CHECK_SIG, 1 CHECK_STER, - * 1 VERSION, 2 IDCODE) - * the command is only in the first write, rest is protocol overhead - * - * indexed is technically a write and used for STATUS - * and the special case for TUNE is: 3w1r - * - * Here the new general sheme: TUNE --> aci_rw_cmd(x, y, z) - * indexed and write --> aci_rw_cmd(x, y, -1) - * implied and read (x=1) --> aci_rw_cmd(x, -1, -1) - * - * Read (x>=2) is not implemented (only used during initialization). - * Use aci_idcode[2] and aci_version... Robert - */ - -/* Some notes for error detection: theoretically it is possible. - * But it doubles the I/O-traffic from ww(r) to wwwrw(r) in the normal - * case and doesn't seem to be designed for that... Robert - */ - -static inline int aci_rawwrite(unsigned char byte) -{ - if (busy_wait() >= 0) { -#ifdef DEBUG - printk(KERN_DEBUG "aci_rawwrite(%d)\n", byte); -#endif - outb(byte, COMMAND_REGISTER); - return 0; - } else - return -EBUSY; -} - -static inline int aci_rawread(void) -{ - unsigned char byte; - - if (busy_wait() >= 0) { - byte=inb(STATUS_REGISTER); -#ifdef DEBUG - printk(KERN_DEBUG "%d = aci_rawread()\n", byte); -#endif - return byte; - } else - return -EBUSY; -} - - -int aci_rw_cmd(int write1, int write2, int write3) -{ - int write[] = {write1, write2, write3}; - int read = -EINTR, i; - - if (mutex_lock_interruptible(&aci_mutex)) - goto out; - - for (i=0; i<3; i++) { - if (write[i]< 0 || write[i] > 255) - break; - else { - read = aci_rawwrite(write[i]); - if (read < 0) - goto out_up; - } - - } - - read = aci_rawread(); -out_up: mutex_unlock(&aci_mutex); -out: return read; -} - -EXPORT_SYMBOL(aci_rw_cmd); - -static int setvolume(int __user *arg, - unsigned char left_index, unsigned char right_index) -{ - int vol, ret, uservol, buf; - - __get_user(uservol, arg); - - /* left channel */ - vol = uservol & 0xff; - if (vol > 100) - vol = 100; - vol = SCALE(100, 0x20, vol); - if ((buf=aci_write_cmd(left_index, 0x20 - vol))<0) - return buf; - ret = SCALE(0x20, 100, vol); - - - /* right channel */ - vol = (uservol >> 8) & 0xff; - if (vol > 100) - vol = 100; - vol = SCALE(100, 0x20, vol); - if ((buf=aci_write_cmd(right_index, 0x20 - vol))<0) - return buf; - ret |= SCALE(0x20, 100, vol) << 8; - - __put_user(ret, arg); - - return 0; -} - -static int getvolume(int __user *arg, - unsigned char left_index, unsigned char right_index) -{ - int vol; - int buf; - - /* left channel */ - if ((buf=aci_indexed_cmd(ACI_STATUS, left_index))<0) - return buf; - vol = SCALE(0x20, 100, buf < 0x20 ? 0x20-buf : 0); - - /* right channel */ - if ((buf=aci_indexed_cmd(ACI_STATUS, right_index))<0) - return buf; - vol |= SCALE(0x20, 100, buf < 0x20 ? 0x20-buf : 0) << 8; - - __put_user(vol, arg); - - return 0; -} - - -/* The equalizer is somewhat strange on the ACI. From -12dB to +12dB - * write: 0xff..down.to..0x80==0x00..up.to..0x7f - */ - -static inline unsigned int eq_oss2aci(unsigned int vol) -{ - int boost=0; - unsigned int ret; - - if (vol > 100) - vol = 100; - if (vol > 50) { - vol -= 51; - boost=1; - } - if (boost) - ret=SCALE(49, 0x7e, vol)+1; - else - ret=0xff - SCALE(50, 0x7f, vol); - return ret; -} - -static inline unsigned int eq_aci2oss(unsigned int vol) -{ - if (vol < 0x80) - return SCALE(0x7f, 50, vol) + 50; - else - return SCALE(0x7f, 50, 0xff-vol); -} - - -static int setequalizer(int __user *arg, - unsigned char left_index, unsigned char right_index) -{ - int buf; - unsigned int vol; - - __get_user(vol, arg); - - /* left channel */ - if ((buf=aci_write_cmd(left_index, eq_oss2aci(vol & 0xff)))<0) - return buf; - - /* right channel */ - if ((buf=aci_write_cmd(right_index, eq_oss2aci((vol>>8) & 0xff)))<0) - return buf; - - /* the ACI equalizer is more precise */ - return 0; -} - -static int getequalizer(int __user *arg, - unsigned char left_index, unsigned char right_index) -{ - int buf; - unsigned int vol; - - /* left channel */ - if ((buf=aci_indexed_cmd(ACI_STATUS, left_index))<0) - return buf; - vol = eq_aci2oss(buf); - - /* right channel */ - if ((buf=aci_indexed_cmd(ACI_STATUS, right_index))<0) - return buf; - vol |= eq_aci2oss(buf) << 8; - - __put_user(vol, arg); - - return 0; -} - -static int aci_mixer_ioctl (int dev, unsigned int cmd, void __user * arg) -{ - int vol, buf; - int __user *p = arg; - - switch (cmd) { - case SOUND_MIXER_WRITE_VOLUME: - return setvolume(p, 0x01, 0x00); - case SOUND_MIXER_WRITE_CD: - return setvolume(p, 0x3c, 0x34); - case SOUND_MIXER_WRITE_MIC: - return setvolume(p, 0x38, 0x30); - case SOUND_MIXER_WRITE_LINE: - return setvolume(p, 0x39, 0x31); - case SOUND_MIXER_WRITE_SYNTH: - return setvolume(p, 0x3b, 0x33); - case SOUND_MIXER_WRITE_PCM: - return setvolume(p, 0x3a, 0x32); - case MIXER_WRITE(SOUND_MIXER_RADIO): /* fall through */ - case SOUND_MIXER_WRITE_LINE1: /* AUX1 or radio */ - return setvolume(p, 0x3d, 0x35); - case SOUND_MIXER_WRITE_LINE2: /* AUX2 */ - return setvolume(p, 0x3e, 0x36); - case SOUND_MIXER_WRITE_BASS: /* set band one and two */ - if (aci_idcode[1]=='C') { - if ((buf=setequalizer(p, 0x48, 0x40)) || - (buf=setequalizer(p, 0x49, 0x41))); - return buf; - } - break; - case SOUND_MIXER_WRITE_TREBLE: /* set band six and seven */ - if (aci_idcode[1]=='C') { - if ((buf=setequalizer(p, 0x4d, 0x45)) || - (buf=setequalizer(p, 0x4e, 0x46))); - return buf; - } - break; - case SOUND_MIXER_WRITE_IGAIN: /* MIC pre-amp */ - if (aci_idcode[1]=='B' || aci_idcode[1]=='C') { - __get_user(vol, p); - vol = vol & 0xff; - if (vol > 100) - vol = 100; - vol = SCALE(100, 3, vol); - if ((buf=aci_write_cmd(ACI_WRITE_IGAIN, vol))<0) - return buf; - aci_micpreamp = vol; - vol = SCALE(3, 100, vol); - vol |= (vol << 8); - __put_user(vol, p); - return 0; - } - break; - case SOUND_MIXER_WRITE_OGAIN: /* Power-amp/line-out level */ - if (aci_idcode[1]=='A' || aci_idcode[1]=='B') { - __get_user(buf, p); - buf = buf & 0xff; - if (buf > 50) - vol = 1; - else - vol = 0; - if ((buf=aci_write_cmd(ACI_SET_POWERAMP, vol))<0) - return buf; - aci_amp = vol; - if (aci_amp) - buf = (100 || 100<<8); - else - buf = 0; - __put_user(buf, p); - return 0; - } - break; - case SOUND_MIXER_WRITE_RECSRC: - /* handle solo mode control */ - __get_user(buf, p); - /* unset solo when RECSRC for PCM is requested */ - if (aci_idcode[1]=='B' || aci_idcode[1]=='C') { - vol = !(buf & SOUND_MASK_PCM); - if ((buf=aci_write_cmd(ACI_SET_SOLOMODE, vol))<0) - return buf; - aci_solo = vol; - } - buf = (SOUND_MASK_CD| SOUND_MASK_MIC| SOUND_MASK_LINE| - SOUND_MASK_SYNTH| SOUND_MASK_LINE2); - if (aci_idcode[1] == 'C') /* PCM20 radio */ - buf |= SOUND_MASK_RADIO; - else - buf |= SOUND_MASK_LINE1; - if (!aci_solo) - buf |= SOUND_MASK_PCM; - __put_user(buf, p); - return 0; - case SOUND_MIXER_READ_DEVMASK: - buf = (SOUND_MASK_VOLUME | SOUND_MASK_CD | - SOUND_MASK_MIC | SOUND_MASK_LINE | - SOUND_MASK_SYNTH | SOUND_MASK_PCM | - SOUND_MASK_LINE2); - switch (aci_idcode[1]) { - case 'C': /* PCM20 radio */ - buf |= (SOUND_MASK_RADIO | SOUND_MASK_IGAIN | - SOUND_MASK_BASS | SOUND_MASK_TREBLE); - break; - case 'B': /* PCM12 */ - buf |= (SOUND_MASK_LINE1 | SOUND_MASK_IGAIN | - SOUND_MASK_OGAIN); - break; - case 'A': /* PCM1-pro */ - buf |= (SOUND_MASK_LINE1 | SOUND_MASK_OGAIN); - break; - default: - buf |= SOUND_MASK_LINE1; - } - __put_user(buf, p); - return 0; - case SOUND_MIXER_READ_STEREODEVS: - buf = (SOUND_MASK_VOLUME | SOUND_MASK_CD | - SOUND_MASK_MIC | SOUND_MASK_LINE | - SOUND_MASK_SYNTH | SOUND_MASK_PCM | - SOUND_MASK_LINE2); - switch (aci_idcode[1]) { - case 'C': /* PCM20 radio */ - buf |= (SOUND_MASK_RADIO | - SOUND_MASK_BASS | SOUND_MASK_TREBLE); - break; - default: - buf |= SOUND_MASK_LINE1; - } - __put_user(buf, p); - return 0; - case SOUND_MIXER_READ_RECMASK: - buf = (SOUND_MASK_CD| SOUND_MASK_MIC| SOUND_MASK_LINE| - SOUND_MASK_SYNTH| SOUND_MASK_LINE2| SOUND_MASK_PCM); - if (aci_idcode[1] == 'C') /* PCM20 radio */ - buf |= SOUND_MASK_RADIO; - else - buf |= SOUND_MASK_LINE1; - - __put_user(buf, p); - return 0; - case SOUND_MIXER_READ_RECSRC: - buf = (SOUND_MASK_CD | SOUND_MASK_MIC | SOUND_MASK_LINE | - SOUND_MASK_SYNTH | SOUND_MASK_LINE2); - /* do we need aci_solo or can I get it from the ACI? */ - switch (aci_idcode[1]) { - case 'B': /* PCM12 */ - case 'C': /* PCM20 radio */ - if (aci_version >= 0xb0) { - if ((vol=aci_rw_cmd(ACI_STATUS, - ACI_S_GENERAL, -1))<0) - return vol; - if (vol & 0x20) - buf |= SOUND_MASK_PCM; - } - else - if (!aci_solo) - buf |= SOUND_MASK_PCM; - break; - default: - buf |= SOUND_MASK_PCM; - } - if (aci_idcode[1] == 'C') /* PCM20 radio */ - buf |= SOUND_MASK_RADIO; - else - buf |= SOUND_MASK_LINE1; - - __put_user(buf, p); - return 0; - case SOUND_MIXER_READ_CAPS: - __put_user(0, p); - return 0; - case SOUND_MIXER_READ_VOLUME: - return getvolume(p, 0x04, 0x03); - case SOUND_MIXER_READ_CD: - return getvolume(p, 0x0a, 0x09); - case SOUND_MIXER_READ_MIC: - return getvolume(p, 0x06, 0x05); - case SOUND_MIXER_READ_LINE: - return getvolume(p, 0x08, 0x07); - case SOUND_MIXER_READ_SYNTH: - return getvolume(p, 0x0c, 0x0b); - case SOUND_MIXER_READ_PCM: - return getvolume(p, 0x0e, 0x0d); - case MIXER_READ(SOUND_MIXER_RADIO): /* fall through */ - case SOUND_MIXER_READ_LINE1: /* AUX1 */ - return getvolume(p, 0x11, 0x10); - case SOUND_MIXER_READ_LINE2: /* AUX2 */ - return getvolume(p, 0x13, 0x12); - case SOUND_MIXER_READ_BASS: /* get band one */ - if (aci_idcode[1]=='C') { - return getequalizer(p, 0x23, 0x22); - } - break; - case SOUND_MIXER_READ_TREBLE: /* get band seven */ - if (aci_idcode[1]=='C') { - return getequalizer(p, 0x2f, 0x2e); - } - break; - case SOUND_MIXER_READ_IGAIN: /* MIC pre-amp */ - if (aci_idcode[1]=='B' || aci_idcode[1]=='C') { - /* aci_micpreamp or ACI? */ - if (aci_version >= 0xb0) { - if ((buf=aci_indexed_cmd(ACI_STATUS, - ACI_S_READ_IGAIN))<0) - return buf; - } - else - buf=aci_micpreamp; - vol = SCALE(3, 100, buf <= 3 ? buf : 3); - vol |= vol << 8; - __put_user(vol, p); - return 0; - } - break; - case SOUND_MIXER_READ_OGAIN: - if (aci_amp) - buf = (100 || 100<<8); - else - buf = 0; - __put_user(buf, p); - return 0; - } - return -EINVAL; -} - -static struct mixer_operations aci_mixer_operations = -{ - .owner = THIS_MODULE, - .id = "ACI", - .ioctl = aci_mixer_ioctl -}; - -/* - * There is also an internal mixer in the codec (CS4231A or AD1845), - * that deserves no purpose in an ACI based system which uses an - * external ACI controlled stereo mixer. Make sure that this codec - * mixer has the AUX1 input selected as the recording source, that the - * input gain is set near maximum and that the other channels going - * from the inputs to the codec output are muted. - */ - -static int __init attach_aci(void) -{ - char *boardname; - int i, rc = -EBUSY; - - mutex_init(&aci_mutex); - - outb(0xE3, 0xf8f); /* Write MAD16 password */ - aci_port = (inb(0xf90) & 0x10) ? - 0x344: 0x354; /* Get aci_port from MC4_PORT */ - - if (!request_region(aci_port, 3, "sound mixer (ACI)")) { - printk(KERN_NOTICE - "aci: I/O area 0x%03x-0x%03x already used.\n", - aci_port, aci_port+2); - goto out; - } - - /* force ACI into a known state */ - rc = -EFAULT; - for (i=0; i<3; i++) - if (aci_rw_cmd(ACI_ERROR_OP, -1, -1)<0) - goto out_release_region; - - /* official this is one aci read call: */ - rc = -EFAULT; - if ((aci_idcode[0]=aci_rw_cmd(ACI_READ_IDCODE, -1, -1))<0 || - (aci_idcode[1]=aci_rw_cmd(ACI_READ_IDCODE, -1, -1))<0) { - printk(KERN_ERR "aci: Failed to read idcode on 0x%03x.\n", - aci_port); - goto out_release_region; - } - - if ((aci_version=aci_rw_cmd(ACI_READ_VERSION, -1, -1))<0) { - printk(KERN_ERR "aci: Failed to read version on 0x%03x.\n", - aci_port); - goto out_release_region; - } - - if (aci_idcode[0] == 'm') { - /* It looks like a miro sound card. */ - switch (aci_idcode[1]) { - case 'A': - boardname = "PCM1 pro / early PCM12"; - break; - case 'B': - boardname = "PCM12"; - break; - case 'C': - boardname = "PCM20 radio"; - break; - default: - boardname = "unknown miro"; - } - } else { - printk(KERN_WARNING "aci: Warning: unsupported card! - " - "no hardware, no specs...\n"); - boardname = "unknown Cardinal Technologies"; - } - - printk(KERN_INFO " at 0x%03x\n", - aci_version, - aci_idcode[0], aci_idcode[1], - aci_idcode[0], aci_idcode[1], - boardname, aci_port); - - rc = -EBUSY; - if (reset) { - /* first write()s after reset fail with my PCM20 */ - if (aci_rw_cmd(ACI_INIT, -1, -1)<0 || - aci_rw_cmd(ACI_ERROR_OP, ACI_ERROR_OP, ACI_ERROR_OP)<0 || - aci_rw_cmd(ACI_ERROR_OP, ACI_ERROR_OP, ACI_ERROR_OP)<0) - goto out_release_region; - } - - /* the PCM20 is muted after reset (and reboot) */ - if (aci_rw_cmd(ACI_SET_MUTE, 0x00, -1)<0) - goto out_release_region; - - if (ide>=0) - if (aci_rw_cmd(ACI_SET_IDE, !ide, -1)<0) - goto out_release_region; - - if (wss>=0 && aci_idcode[1]=='A') - if (aci_rw_cmd(ACI_SET_WSS, !!wss, -1)<0) - goto out_release_region; - - mixer_device = sound_install_mixer(MIXER_DRIVER_VERSION, boardname, - &aci_mixer_operations, - sizeof(aci_mixer_operations), NULL); - rc = 0; - if (mixer_device < 0) { - printk(KERN_ERR "aci: Failed to install mixer.\n"); - rc = mixer_device; - goto out_release_region; - } /* else Maybe initialize the CS4231A mixer here... */ -out: return rc; -out_release_region: - release_region(aci_port, 3); - goto out; -} - -static void __exit unload_aci(void) -{ - sound_unload_mixerdev(mixer_device); - release_region(aci_port, 3); -} - -module_init(attach_aci); -module_exit(unload_aci); -MODULE_LICENSE("GPL"); diff --git a/sound/oss/aci.h b/sound/oss/aci.h deleted file mode 100644 index 20102ee088eb..000000000000 --- a/sound/oss/aci.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef _ACI_H_ -#define _ACI_H_ - -extern int aci_port; -extern int aci_version; /* ACI firmware version */ -extern int aci_rw_cmd(int write1, int write2, int write3); - -#define aci_indexed_cmd(a, b) aci_rw_cmd(a, b, -1) -#define aci_write_cmd(a, b) aci_rw_cmd(a, b, -1) -#define aci_read_cmd(a) aci_rw_cmd(a,-1, -1) - -#define COMMAND_REGISTER (aci_port) /* write register */ -#define STATUS_REGISTER (aci_port + 1) /* read register */ -#define BUSY_REGISTER (aci_port + 2) /* also used for rds */ - -#define RDS_REGISTER BUSY_REGISTER - -#define ACI_SET_MUTE 0x0d -#define ACI_SET_POWERAMP 0x0f -#define ACI_SET_TUNERMUTE 0xa3 -#define ACI_SET_TUNERMONO 0xa4 -#define ACI_SET_IDE 0xd0 -#define ACI_SET_WSS 0xd1 -#define ACI_SET_SOLOMODE 0xd2 -#define ACI_WRITE_IGAIN 0x03 -#define ACI_WRITE_TUNE 0xa7 -#define ACI_READ_TUNERSTEREO 0xa8 -#define ACI_READ_TUNERSTATION 0xa9 -#define ACI_READ_VERSION 0xf1 -#define ACI_READ_IDCODE 0xf2 -#define ACI_INIT 0xff -#define ACI_STATUS 0xf0 -#define ACI_S_GENERAL 0x00 -#define ACI_S_READ_IGAIN 0x21 -#define ACI_ERROR_OP 0xdf - -/* - * The following macro SCALE can be used to scale one integer volume - * value into another one using only integer arithmetic. If the input - * value x is in the range 0 <= x <= xmax, then the result will be in - * the range 0 <= SCALE(xmax,ymax,x) <= ymax. - * - * This macro has for all xmax, ymax > 0 and all 0 <= x <= xmax the - * following nice properties: - * - * - SCALE(xmax,ymax,xmax) = ymax - * - SCALE(xmax,ymax,0) = 0 - * - SCALE(xmax,ymax,SCALE(ymax,xmax,SCALE(xmax,ymax,x))) = SCALE(xmax,ymax,x) - * - * In addition, the rounding error is minimal and nicely distributed. - * The proofs are left as an exercise to the reader. - */ - -#define SCALE(xmax,ymax,x) (((x)*(ymax)+(xmax)/2)/(xmax)) - - -#endif /* _ACI_H_ */ diff --git a/sound/oss/ad1816.c b/sound/oss/ad1816.c deleted file mode 100644 index caabf31193f7..000000000000 --- a/sound/oss/ad1816.c +++ /dev/null @@ -1,1368 +0,0 @@ -/* - * - * AD1816 lowlevel sound driver for Linux 2.6.0 and above - * - * Copyright (C) 1998-2003 by Thorsten Knabe - * - * Based on the CS4232/AD1848 driver Copyright (C) by Hannu Savolainen 1993-1996 - * - * - * version: 1.5 - * status: beta - * date: 2003/07/15 - * - * Changes: - * Oleg Drokin: Some cleanup of load/unload functions. 1998/11/24 - * - * Thorsten Knabe: attach and unload rewritten, - * some argument checks added 1998/11/30 - * - * Thorsten Knabe: Buggy isa bridge workaround added 1999/01/16 - * - * David Moews/Thorsten Knabe: Introduced options - * parameter. Added slightly modified patch from - * David Moews to disable dsp audio sources by setting - * bit 0 of options parameter. This seems to be - * required by some Aztech/Newcom SC-16 cards. 1999/04/18 - * - * Christoph Hellwig: Adapted to module_init/module_exit. 2000/03/03 - * - * Christoph Hellwig: Added isapnp support 2000/03/15 - * - * Arnaldo Carvalho de Melo: get rid of check_region 2001/10/07 - * - * Thorsten Knabe: Compiling with CONFIG_PNP enabled - * works again. It is now possible to use more than one - * AD1816 sound card. Sample rate now may be changed during - * playback/capture. printk() uses log levels everywhere. - * SMP fixes. DMA handling fixes. - * Other minor code cleanup. 2003/07/15 - * - */ - - -#include -#include -#include -#include -#include -#include -#include "sound_config.h" - -#define DEBUGNOISE(x) - -#define CHECK_FOR_POWER { int timeout=100; \ - while (timeout > 0 && (inb(devc->base)&0x80)!= 0x80) {\ - timeout--; \ - } \ - if (timeout==0) {\ - printk(KERN_WARNING "ad1816: Check for power failed in %s line: %d\n",__FILE__,__LINE__); \ - } \ -} - -/* structure to hold device specific information */ -typedef struct -{ - int base; /* set in attach */ - int irq; - int dma_playback; - int dma_capture; - - int opened; /* open */ - int speed; - int channels; - int audio_format; - int audio_mode; - - int recmask; /* setup */ - unsigned char format_bits; - int supported_devices; - int supported_rec_devices; - unsigned short levels[SOUND_MIXER_NRDEVICES]; - /* misc */ - struct pnp_dev *pnpdev; /* configured via pnp */ - int dev_no; /* this is the # in audio_devs and NOT - in ad1816_info */ - spinlock_t lock; -} ad1816_info; - -static int nr_ad1816_devs; -static int ad1816_clockfreq = 33000; -static int options; - -/* supported audio formats */ -static int ad_format_mask = -AFMT_U8 | AFMT_S16_LE | AFMT_S16_BE | AFMT_MU_LAW | AFMT_A_LAW; - -/* array of device info structures */ -static ad1816_info dev_info[MAX_AUDIO_DEV]; - - -/* ------------------------------------------------------------------- */ - -/* functions for easier access to inderect registers */ - -static int ad_read (ad1816_info * devc, int reg) -{ - int result; - - CHECK_FOR_POWER; - outb ((unsigned char) (reg & 0x3f), devc->base+0); - result = inb(devc->base+2); - result+= inb(devc->base+3)<<8; - return (result); -} - - -static void ad_write (ad1816_info * devc, int reg, int data) -{ - CHECK_FOR_POWER; - outb ((unsigned char) (reg & 0xff), devc->base+0); - outb ((unsigned char) (data & 0xff),devc->base+2); - outb ((unsigned char) ((data>>8)&0xff),devc->base+3); -} - -/* ------------------------------------------------------------------- */ - -/* function interface required by struct audio_driver */ - -static void ad1816_halt_input (int dev) -{ - unsigned long flags; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - unsigned char buffer; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: halt_input called\n")); - - spin_lock_irqsave(&devc->lock,flags); - - if(!isa_dma_bridge_buggy) { - disable_dma(audio_devs[dev]->dmap_in->dma); - } - - buffer=inb(devc->base+9); - if (buffer & 0x01) { - /* disable capture */ - outb(buffer & ~0x01,devc->base+9); - } - - if(!isa_dma_bridge_buggy) { - enable_dma(audio_devs[dev]->dmap_in->dma); - } - - /* Clear interrupt status */ - outb (~0x40, devc->base+1); - - devc->audio_mode &= ~PCM_ENABLE_INPUT; - spin_unlock_irqrestore(&devc->lock,flags); -} - -static void ad1816_halt_output (int dev) -{ - unsigned long flags; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - unsigned char buffer; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: halt_output called!\n")); - - spin_lock_irqsave(&devc->lock,flags); - /* Mute pcm output */ - ad_write(devc, 4, ad_read(devc,4)|0x8080); - - if(!isa_dma_bridge_buggy) { - disable_dma(audio_devs[dev]->dmap_out->dma); - } - - buffer=inb(devc->base+8); - if (buffer & 0x01) { - /* disable capture */ - outb(buffer & ~0x01,devc->base+8); - } - - if(!isa_dma_bridge_buggy) { - enable_dma(audio_devs[dev]->dmap_out->dma); - } - - /* Clear interrupt status */ - outb ((unsigned char)~0x80, devc->base+1); - - devc->audio_mode &= ~PCM_ENABLE_OUTPUT; - spin_unlock_irqrestore(&devc->lock,flags); -} - -static void ad1816_output_block (int dev, unsigned long buf, - int count, int intrflag) -{ - unsigned long flags; - unsigned long cnt; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: output_block called buf=%ld count=%d flags=%d\n",buf,count,intrflag)); - - cnt = count/4 - 1; - - spin_lock_irqsave(&devc->lock,flags); - - /* set transfer count */ - ad_write (devc, 8, cnt & 0xffff); - - devc->audio_mode |= PCM_ENABLE_OUTPUT; - spin_unlock_irqrestore(&devc->lock,flags); -} - - -static void ad1816_start_input (int dev, unsigned long buf, int count, - int intrflag) -{ - unsigned long flags; - unsigned long cnt; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: start_input called buf=%ld count=%d flags=%d\n",buf,count,intrflag)); - - cnt = count/4 - 1; - - spin_lock_irqsave(&devc->lock,flags); - - /* set transfer count */ - ad_write (devc, 10, cnt & 0xffff); - devc->audio_mode |= PCM_ENABLE_INPUT; - spin_unlock_irqrestore(&devc->lock,flags); -} - -static int ad1816_prepare_for_input (int dev, int bsize, int bcount) -{ - unsigned long flags; - unsigned int freq; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - unsigned char fmt_bits; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: prepare_for_input called: bsize=%d bcount=%d\n",bsize,bcount)); - - spin_lock_irqsave(&devc->lock,flags); - fmt_bits= (devc->format_bits&0x7)<<3; - - /* set mono/stereo mode */ - if (devc->channels > 1) { - fmt_bits |=0x4; - } - /* set Mono/Stereo in playback/capture register */ - outb( (inb(devc->base+8) & ~0x3C)|fmt_bits, devc->base+8); - outb( (inb(devc->base+9) & ~0x3C)|fmt_bits, devc->base+9); - - freq=((unsigned int)devc->speed*33000)/ad1816_clockfreq; - - /* write playback/capture speeds */ - ad_write (devc, 2, freq & 0xffff); - ad_write (devc, 3, freq & 0xffff); - - spin_unlock_irqrestore(&devc->lock,flags); - - ad1816_halt_input(dev); - return 0; -} - -static int ad1816_prepare_for_output (int dev, int bsize, int bcount) -{ - unsigned long flags; - unsigned int freq; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - unsigned char fmt_bits; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: prepare_for_output called: bsize=%d bcount=%d\n",bsize,bcount)); - - spin_lock_irqsave(&devc->lock,flags); - - fmt_bits= (devc->format_bits&0x7)<<3; - /* set mono/stereo mode */ - if (devc->channels > 1) { - fmt_bits |=0x4; - } - - /* write format bits to playback/capture registers */ - outb( (inb(devc->base+8) & ~0x3C)|fmt_bits, devc->base+8); - outb( (inb(devc->base+9) & ~0x3C)|fmt_bits, devc->base+9); - - freq=((unsigned int)devc->speed*33000)/ad1816_clockfreq; - - /* write playback/capture speeds */ - ad_write (devc, 2, freq & 0xffff); - ad_write (devc, 3, freq & 0xffff); - - spin_unlock_irqrestore(&devc->lock,flags); - - ad1816_halt_output(dev); - return 0; - -} - -static void ad1816_trigger (int dev, int state) -{ - unsigned long flags; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: trigger called! (devc=%d,devc->base=%d\n", devc, devc->base)); - - /* mode may have changed */ - - spin_lock_irqsave(&devc->lock,flags); - - /* mask out modes not specified on open call */ - state &= devc->audio_mode; - - /* setup soundchip to new io-mode */ - if (state & PCM_ENABLE_INPUT) { - /* enable capture */ - outb(inb(devc->base+9)|0x01, devc->base+9); - } else { - /* disable capture */ - outb(inb(devc->base+9)&~0x01, devc->base+9); - } - - if (state & PCM_ENABLE_OUTPUT) { - /* enable playback */ - outb(inb(devc->base+8)|0x01, devc->base+8); - /* unmute pcm output */ - ad_write(devc, 4, ad_read(devc,4)&~0x8080); - } else { - /* mute pcm output */ - ad_write(devc, 4, ad_read(devc,4)|0x8080); - /* disable capture */ - outb(inb(devc->base+8)&~0x01, devc->base+8); - } - spin_unlock_irqrestore(&devc->lock,flags); -} - - -/* halt input & output */ -static void ad1816_halt (int dev) -{ - ad1816_halt_input(dev); - ad1816_halt_output(dev); -} - -static void ad1816_reset (int dev) -{ - ad1816_halt (dev); -} - -/* set playback speed */ -static int ad1816_set_speed (int dev, int arg) -{ - unsigned long flags; - unsigned int freq; - int ret; - - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - spin_lock_irqsave(&devc->lock, flags); - if (arg == 0) { - ret = devc->speed; - spin_unlock_irqrestore(&devc->lock, flags); - return ret; - } - /* range checking */ - if (arg < 4000) { - arg = 4000; - } - if (arg > 55000) { - arg = 55000; - } - devc->speed = arg; - - /* change speed during playback */ - freq=((unsigned int)devc->speed*33000)/ad1816_clockfreq; - /* write playback/capture speeds */ - ad_write (devc, 2, freq & 0xffff); - ad_write (devc, 3, freq & 0xffff); - - ret = devc->speed; - spin_unlock_irqrestore(&devc->lock, flags); - return ret; - -} - -static unsigned int ad1816_set_bits (int dev, unsigned int arg) -{ - unsigned long flags; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - static struct format_tbl { - int format; - unsigned char bits; - } format2bits[] = { - { 0, 0 }, - { AFMT_MU_LAW, 1 }, - { AFMT_A_LAW, 3 }, - { AFMT_IMA_ADPCM, 0 }, - { AFMT_U8, 0 }, - { AFMT_S16_LE, 2 }, - { AFMT_S16_BE, 6 }, - { AFMT_S8, 0 }, - { AFMT_U16_LE, 0 }, - { AFMT_U16_BE, 0 } - }; - - int i, n = sizeof (format2bits) / sizeof (struct format_tbl); - - spin_lock_irqsave(&devc->lock, flags); - /* return current format */ - if (arg == 0) { - arg = devc->audio_format; - spin_unlock_irqrestore(&devc->lock, flags); - return arg; - } - devc->audio_format = arg; - - /* search matching format bits */ - for (i = 0; i < n; i++) - if (format2bits[i].format == arg) { - devc->format_bits = format2bits[i].bits; - devc->audio_format = arg; - spin_unlock_irqrestore(&devc->lock, flags); - return arg; - } - - /* Still hanging here. Something must be terribly wrong */ - devc->format_bits = 0; - devc->audio_format = AFMT_U8; - spin_unlock_irqrestore(&devc->lock, flags); - return(AFMT_U8); -} - -static short ad1816_set_channels (int dev, short arg) -{ - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - if (arg != 1 && arg != 2) - return devc->channels; - - devc->channels = arg; - return arg; -} - -/* open device */ -static int ad1816_open (int dev, int mode) -{ - ad1816_info *devc = NULL; - unsigned long flags; - - /* is device number valid ? */ - if (dev < 0 || dev >= num_audiodevs) - return -(ENXIO); - - /* get device info of this dev */ - devc = (ad1816_info *) audio_devs[dev]->devc; - - /* make check if device already open atomic */ - spin_lock_irqsave(&devc->lock,flags); - - if (devc->opened) { - spin_unlock_irqrestore(&devc->lock,flags); - return -(EBUSY); - } - - /* mark device as open */ - devc->opened = 1; - - devc->audio_mode = 0; - devc->speed = 8000; - devc->audio_format=AFMT_U8; - devc->channels=1; - spin_unlock_irqrestore(&devc->lock,flags); - ad1816_reset(devc->dev_no); /* halt all pending output */ - return 0; -} - -static void ad1816_close (int dev) /* close device */ -{ - unsigned long flags; - ad1816_info *devc = (ad1816_info *) audio_devs[dev]->devc; - - /* halt all pending output */ - ad1816_reset(devc->dev_no); - - spin_lock_irqsave(&devc->lock,flags); - devc->opened = 0; - devc->audio_mode = 0; - devc->speed = 8000; - devc->audio_format=AFMT_U8; - devc->format_bits = 0; - spin_unlock_irqrestore(&devc->lock,flags); -} - - -/* ------------------------------------------------------------------- */ - -/* Audio driver structure */ - -static struct audio_driver ad1816_audio_driver = -{ - .owner = THIS_MODULE, - .open = ad1816_open, - .close = ad1816_close, - .output_block = ad1816_output_block, - .start_input = ad1816_start_input, - .prepare_for_input = ad1816_prepare_for_input, - .prepare_for_output = ad1816_prepare_for_output, - .halt_io = ad1816_halt, - .halt_input = ad1816_halt_input, - .halt_output = ad1816_halt_output, - .trigger = ad1816_trigger, - .set_speed = ad1816_set_speed, - .set_bits = ad1816_set_bits, - .set_channels = ad1816_set_channels, -}; - - -/* ------------------------------------------------------------------- */ - -/* Interrupt handler */ - - -static irqreturn_t ad1816_interrupt (int irq, void *dev_id) -{ - unsigned char status; - ad1816_info *devc = (ad1816_info *)dev_id; - - if (irq < 0 || irq > 15) { - printk(KERN_WARNING "ad1816: Got bogus interrupt %d\n", irq); - return IRQ_NONE; - } - - spin_lock(&devc->lock); - - /* read interrupt register */ - status = inb (devc->base+1); - /* Clear all interrupt */ - outb (~status, devc->base+1); - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: Got interrupt subclass %d\n",status)); - - if (status == 0) { - DEBUGNOISE(printk(KERN_DEBUG "ad1816: interrupt: Got interrupt, but no source.\n")); - spin_unlock(&devc->lock); - return IRQ_NONE; - } - - if (devc->opened && (devc->audio_mode & PCM_ENABLE_INPUT) && (status&64)) - DMAbuf_inputintr (devc->dev_no); - - if (devc->opened && (devc->audio_mode & PCM_ENABLE_OUTPUT) && (status & 128)) - DMAbuf_outputintr (devc->dev_no, 1); - - spin_unlock(&devc->lock); - return IRQ_HANDLED; -} - -/* ------------------------------------------------------------------- */ - -/* Mixer stuff */ - -struct mixer_def { - unsigned int regno: 7; - unsigned int polarity:1; /* 0=normal, 1=reversed */ - unsigned int bitpos:4; - unsigned int nbits:4; -}; - -static char mix_cvt[101] = { - 0, 0, 3, 7,10,13,16,19,21,23,26,28,30,32,34,35,37,39,40,42, - 43,45,46,47,49,50,51,52,53,55,56,57,58,59,60,61,62,63,64,65, - 65,66,67,68,69,70,70,71,72,73,73,74,75,75,76,77,77,78,79,79, - 80,81,81,82,82,83,84,84,85,85,86,86,87,87,88,88,89,89,90,90, - 91,91,92,92,93,93,94,94,95,95,96,96,96,97,97,98,98,98,99,99, - 100 -}; - -typedef struct mixer_def mixer_ent; - -/* - * Most of the mixer entries work in backwards. Setting the polarity field - * makes them to work correctly. - * - * The channel numbering used by individual soundcards is not fixed. Some - * cards have assigned different meanings for the AUX1, AUX2 and LINE inputs. - * The current version doesn't try to compensate this. - */ - -#define MIX_ENT(name, reg_l, pola_l, pos_l, len_l, reg_r, pola_r, pos_r, len_r) \ - {{reg_l, pola_l, pos_l, len_l}, {reg_r, pola_r, pos_r, len_r}} - - -static mixer_ent mix_devices[SOUND_MIXER_NRDEVICES][2] = { -MIX_ENT(SOUND_MIXER_VOLUME, 14, 1, 8, 5, 14, 1, 0, 5), -MIX_ENT(SOUND_MIXER_BASS, 0, 0, 0, 0, 0, 0, 0, 0), -MIX_ENT(SOUND_MIXER_TREBLE, 0, 0, 0, 0, 0, 0, 0, 0), -MIX_ENT(SOUND_MIXER_SYNTH, 5, 1, 8, 6, 5, 1, 0, 6), -MIX_ENT(SOUND_MIXER_PCM, 4, 1, 8, 6, 4, 1, 0, 6), -MIX_ENT(SOUND_MIXER_SPEAKER, 0, 0, 0, 0, 0, 0, 0, 0), -MIX_ENT(SOUND_MIXER_LINE, 18, 1, 8, 5, 18, 1, 0, 5), -MIX_ENT(SOUND_MIXER_MIC, 19, 1, 8, 5, 19, 1, 0, 5), -MIX_ENT(SOUND_MIXER_CD, 15, 1, 8, 5, 15, 1, 0, 5), -MIX_ENT(SOUND_MIXER_IMIX, 0, 0, 0, 0, 0, 0, 0, 0), -MIX_ENT(SOUND_MIXER_ALTPCM, 0, 0, 0, 0, 0, 0, 0, 0), -MIX_ENT(SOUND_MIXER_RECLEV, 20, 0, 8, 4, 20, 0, 0, 4), -MIX_ENT(SOUND_MIXER_IGAIN, 0, 0, 0, 0, 0, 0, 0, 0), -MIX_ENT(SOUND_MIXER_OGAIN, 0, 0, 0, 0, 0, 0, 0, 0), -MIX_ENT(SOUND_MIXER_LINE1, 17, 1, 8, 5, 17, 1, 0, 5), -MIX_ENT(SOUND_MIXER_LINE2, 16, 1, 8, 5, 16, 1, 0, 5), -MIX_ENT(SOUND_MIXER_LINE3, 39, 0, 9, 4, 39, 1, 0, 5) -}; - - -static unsigned short default_mixer_levels[SOUND_MIXER_NRDEVICES] = -{ - 0x4343, /* Master Volume */ - 0x3232, /* Bass */ - 0x3232, /* Treble */ - 0x0000, /* FM */ - 0x4343, /* PCM */ - 0x0000, /* PC Speaker */ - 0x0000, /* Ext Line */ - 0x0000, /* Mic */ - 0x0000, /* CD */ - 0x0000, /* Recording monitor */ - 0x0000, /* SB PCM */ - 0x0000, /* Recording level */ - 0x0000, /* Input gain */ - 0x0000, /* Output gain */ - 0x0000, /* Line1 */ - 0x0000, /* Line2 */ - 0x0000 /* Line3 (usually line in)*/ -}; - -#define LEFT_CHN 0 -#define RIGHT_CHN 1 - - - -static int -ad1816_set_recmask (ad1816_info * devc, int mask) -{ - unsigned long flags; - unsigned char recdev; - int i, n; - - spin_lock_irqsave(&devc->lock, flags); - mask &= devc->supported_rec_devices; - - n = 0; - /* Count selected device bits */ - for (i = 0; i < 32; i++) - if (mask & (1 << i)) - n++; - - if (n == 0) - mask = SOUND_MASK_MIC; - else if (n != 1) { /* Too many devices selected */ - /* Filter out active settings */ - mask &= ~devc->recmask; - - n = 0; - /* Count selected device bits */ - for (i = 0; i < 32; i++) - if (mask & (1 << i)) - n++; - - if (n != 1) - mask = SOUND_MASK_MIC; - } - - switch (mask) { - case SOUND_MASK_MIC: - recdev = 5; - break; - - case SOUND_MASK_LINE: - recdev = 0; - break; - - case SOUND_MASK_CD: - recdev = 2; - break; - - case SOUND_MASK_LINE1: - recdev = 4; - break; - - case SOUND_MASK_LINE2: - recdev = 3; - break; - - case SOUND_MASK_VOLUME: - recdev = 1; - break; - - default: - mask = SOUND_MASK_MIC; - recdev = 5; - } - - recdev <<= 4; - ad_write (devc, 20, - (ad_read (devc, 20) & 0x8f8f) | recdev | (recdev<<8)); - - devc->recmask = mask; - spin_unlock_irqrestore(&devc->lock, flags); - return mask; -} - -static void -change_bits (int *regval, int dev, int chn, int newval) -{ - unsigned char mask; - int shift; - - /* Reverse polarity*/ - - if (mix_devices[dev][chn].polarity == 1) - newval = 100 - newval; - - mask = (1 << mix_devices[dev][chn].nbits) - 1; - shift = mix_devices[dev][chn].bitpos; - /* Scale it */ - newval = (int) ((newval * mask) + 50) / 100; - /* Clear bits */ - *regval &= ~(mask << shift); - /* Set new value */ - *regval |= (newval & mask) << shift; -} - -static int -ad1816_mixer_get (ad1816_info * devc, int dev) -{ - DEBUGNOISE(printk(KERN_DEBUG "ad1816: mixer_get called!\n")); - - /* range check + supported mixer check */ - if (dev < 0 || dev >= SOUND_MIXER_NRDEVICES ) - return (-(EINVAL)); - if (!((1 << dev) & devc->supported_devices)) - return -(EINVAL); - - return devc->levels[dev]; -} - -static int -ad1816_mixer_set (ad1816_info * devc, int dev, int value) -{ - int left = value & 0x000000ff; - int right = (value & 0x0000ff00) >> 8; - int retvol; - - int regoffs; - int val; - int valmute; - unsigned long flags; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: mixer_set called!\n")); - - if (dev < 0 || dev >= SOUND_MIXER_NRDEVICES ) - return -(EINVAL); - - if (left > 100) - left = 100; - if (left < 0) - left = 0; - if (right > 100) - right = 100; - if (right < 0) - right = 0; - - /* Mono control */ - if (mix_devices[dev][RIGHT_CHN].nbits == 0) - right = left; - retvol = left | (right << 8); - - /* Scale it */ - - left = mix_cvt[left]; - right = mix_cvt[right]; - - /* reject all mixers that are not supported */ - if (!(devc->supported_devices & (1 << dev))) - return -(EINVAL); - - /* sanity check */ - if (mix_devices[dev][LEFT_CHN].nbits == 0) - return -(EINVAL); - spin_lock_irqsave(&devc->lock, flags); - - /* keep precise volume internal */ - devc->levels[dev] = retvol; - - /* Set the left channel */ - regoffs = mix_devices[dev][LEFT_CHN].regno; - val = ad_read (devc, regoffs); - change_bits (&val, dev, LEFT_CHN, left); - - valmute=val; - - /* Mute bit masking on some registers */ - if ( regoffs==5 || regoffs==14 || regoffs==15 || - regoffs==16 || regoffs==17 || regoffs==18 || - regoffs==19 || regoffs==39) { - if (left==0) - valmute |= 0x8000; - else - valmute &= ~0x8000; - } - ad_write (devc, regoffs, valmute); /* mute */ - - /* - * Set the right channel - */ - - /* Was just a mono channel */ - if (mix_devices[dev][RIGHT_CHN].nbits == 0) { - spin_unlock_irqrestore(&devc->lock, flags); - return retvol; - } - - regoffs = mix_devices[dev][RIGHT_CHN].regno; - val = ad_read (devc, regoffs); - change_bits (&val, dev, RIGHT_CHN, right); - - valmute=val; - if ( regoffs==5 || regoffs==14 || regoffs==15 || - regoffs==16 || regoffs==17 || regoffs==18 || - regoffs==19 || regoffs==39) { - if (right==0) - valmute |= 0x80; - else - valmute &= ~0x80; - } - ad_write (devc, regoffs, valmute); /* mute */ - spin_unlock_irqrestore(&devc->lock, flags); - return retvol; -} - -#define MIXER_DEVICES ( SOUND_MASK_VOLUME | \ - SOUND_MASK_SYNTH | \ - SOUND_MASK_PCM | \ - SOUND_MASK_LINE | \ - SOUND_MASK_LINE1 | \ - SOUND_MASK_LINE2 | \ - SOUND_MASK_LINE3 | \ - SOUND_MASK_MIC | \ - SOUND_MASK_CD | \ - SOUND_MASK_RECLEV \ - ) -#define REC_DEVICES ( SOUND_MASK_LINE2 |\ - SOUND_MASK_LINE |\ - SOUND_MASK_LINE1 |\ - SOUND_MASK_MIC |\ - SOUND_MASK_CD |\ - SOUND_MASK_VOLUME \ - ) - -static void -ad1816_mixer_reset (ad1816_info * devc) -{ - int i; - - devc->supported_devices = MIXER_DEVICES; - - devc->supported_rec_devices = REC_DEVICES; - - for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) - if (devc->supported_devices & (1 << i)) - ad1816_mixer_set (devc, i, default_mixer_levels[i]); - ad1816_set_recmask (devc, SOUND_MASK_MIC); -} - -static int -ad1816_mixer_ioctl (int dev, unsigned int cmd, void __user * arg) -{ - ad1816_info *devc = mixer_devs[dev]->devc; - int val; - int __user *p = arg; - - DEBUGNOISE(printk(KERN_DEBUG "ad1816: mixer_ioctl called!\n")); - - /* Mixer ioctl */ - if (((cmd >> 8) & 0xff) == 'M') { - - /* set ioctl */ - if (_SIOC_DIR (cmd) & _SIOC_WRITE) { - switch (cmd & 0xff){ - case SOUND_MIXER_RECSRC: - - if (get_user(val, p)) - return -EFAULT; - val=ad1816_set_recmask (devc, val); - return put_user(val, p); - break; - - default: - if (get_user(val, p)) - return -EFAULT; - if ((val=ad1816_mixer_set (devc, cmd & 0xff, val))<0) - return val; - else - return put_user(val, p); - } - } else { - /* read ioctl */ - switch (cmd & 0xff) { - - case SOUND_MIXER_RECSRC: - val=devc->recmask; - return put_user(val, p); - break; - - case SOUND_MIXER_DEVMASK: - val=devc->supported_devices; - return put_user(val, p); - break; - - case SOUND_MIXER_STEREODEVS: - val=devc->supported_devices & ~(SOUND_MASK_SPEAKER | SOUND_MASK_IMIX); - return put_user(val, p); - break; - - case SOUND_MIXER_RECMASK: - val=devc->supported_rec_devices; - return put_user(val, p); - break; - - case SOUND_MIXER_CAPS: - val=SOUND_CAP_EXCL_INPUT; - return put_user(val, p); - break; - - default: - if ((val=ad1816_mixer_get (devc, cmd & 0xff))<0) - return val; - else - return put_user(val, p); - } - } - } else - /* not for mixer */ - return -(EINVAL); -} - -/* ------------------------------------------------------------------- */ - -/* Mixer structure */ - -static struct mixer_operations ad1816_mixer_operations = { - .owner = THIS_MODULE, - .id = "AD1816", - .name = "AD1816 Mixer", - .ioctl = ad1816_mixer_ioctl -}; - - -/* ------------------------------------------------------------------- */ - -/* stuff for card recognition, init and unloading PNP ...*/ - - -/* check if AD1816 present at specified hw_config and register device with OS - * return 1 if initialization was successful, 0 otherwise - */ -static int __init ad1816_init_card (struct address_info *hw_config, - struct pnp_dev *pnp) -{ - ad1816_info *devc = NULL; - int tmp; - int oss_devno = -1; - - printk(KERN_INFO "ad1816: initializing card: io=0x%x, irq=%d, dma=%d, " - "dma2=%d, clockfreq=%d, options=%d isadmabug=%d " - "%s\n", - hw_config->io_base, - hw_config->irq, - hw_config->dma, - hw_config->dma2, - ad1816_clockfreq, - options, - isa_dma_bridge_buggy, - pnp?"(PNP)":""); - - /* ad1816_info structure remaining ? */ - if (nr_ad1816_devs >= MAX_AUDIO_DEV) { - printk(KERN_WARNING "ad1816: no more ad1816_info structures " - "left\n"); - goto out; - } - - devc = &dev_info[nr_ad1816_devs]; - devc->base = hw_config->io_base; - devc->irq = hw_config->irq; - devc->dma_playback=hw_config->dma; - devc->dma_capture=hw_config->dma2; - devc->opened = 0; - devc->pnpdev = pnp; - spin_lock_init(&devc->lock); - - if (!request_region(devc->base, 16, "AD1816 Sound")) { - printk(KERN_WARNING "ad1816: I/O port 0x%03x not free\n", - devc->base); - goto out; - } - - printk(KERN_INFO "ad1816: Examining AD1816 at address 0x%03x.\n", - devc->base); - - - /* tests for ad1816 */ - /* base+0: bit 1 must be set but not 255 */ - tmp=inb(devc->base); - if ( (tmp&0x80)==0 || tmp==255 ) { - printk (KERN_INFO "ad1816: Chip is not an AD1816 or chip " - "is not active (Test 0)\n"); - goto out_release_region; - } - - /* writes to ireg 8 are copied to ireg 9 */ - ad_write(devc,8,12345); - if (ad_read(devc,9)!=12345) { - printk(KERN_INFO "ad1816: Chip is not an AD1816 (Test 1)\n"); - goto out_release_region; - } - - /* writes to ireg 8 are copied to ireg 9 */ - ad_write(devc,8,54321); - if (ad_read(devc,9)!=54321) { - printk(KERN_INFO "ad1816: Chip is not an AD1816 (Test 2)\n"); - goto out_release_region; - } - - /* writes to ireg 10 are copied to ireg 11 */ - ad_write(devc,10,54321); - if (ad_read(devc,11)!=54321) { - printk (KERN_INFO "ad1816: Chip is not an AD1816 (Test 3)\n"); - goto out_release_region; - } - - /* writes to ireg 10 are copied to ireg 11 */ - ad_write(devc,10,12345); - if (ad_read(devc,11)!=12345) { - printk (KERN_INFO "ad1816: Chip is not an AD1816 (Test 4)\n"); - goto out_release_region; - } - - /* bit in base +1 cannot be set to 1 */ - tmp=inb(devc->base+1); - outb(0xff,devc->base+1); - if (inb(devc->base+1)!=tmp) { - printk(KERN_INFO "ad1816: Chip is not an AD1816 (Test 5)\n"); - goto out_release_region; - } - - printk(KERN_INFO "ad1816: AD1816 (version %d) successfully detected!\n", - ad_read(devc,45)); - - /* disable all interrupts */ - ad_write(devc,1,0); - - /* Clear pending interrupts */ - outb (0, devc->base+1); - - /* allocate irq */ - if (devc->irq < 0 || devc->irq > 15) - goto out_release_region; - if (request_irq(devc->irq, ad1816_interrupt,0, - "SoundPort", devc) < 0) { - printk(KERN_WARNING "ad1816: IRQ in use\n"); - goto out_release_region; - } - - /* DMA stuff */ - if (sound_alloc_dma (devc->dma_playback, "Sound System")) { - printk(KERN_WARNING "ad1816: Can't allocate DMA%d\n", - devc->dma_playback); - goto out_free_irq; - } - - if ( devc->dma_capture >= 0 && - devc->dma_capture != devc->dma_playback) { - if (sound_alloc_dma(devc->dma_capture, - "Sound System (capture)")) { - printk(KERN_WARNING "ad1816: Can't allocate DMA%d\n", - devc->dma_capture); - goto out_free_dma; - } - devc->audio_mode=DMA_AUTOMODE|DMA_DUPLEX; - } else { - printk(KERN_WARNING "ad1816: Only one DMA channel " - "available/configured. No duplex operation possible\n"); - devc->audio_mode=DMA_AUTOMODE; - } - - conf_printf2 ("AD1816 audio driver", - devc->base, devc->irq, devc->dma_playback, - devc->dma_capture); - - /* register device */ - if ((oss_devno = sound_install_audiodrv (AUDIO_DRIVER_VERSION, - "AD1816 audio driver", - &ad1816_audio_driver, - sizeof (struct audio_driver), - devc->audio_mode, - ad_format_mask, - devc, - devc->dma_playback, - devc->dma_capture)) < 0) { - printk(KERN_WARNING "ad1816: Can't install sound driver\n"); - goto out_free_dma_2; - } - - - ad_write(devc,32,0x80f0); /* sound system mode */ - if (options&1) { - ad_write(devc,33,0); /* disable all audiosources for dsp */ - } else { - ad_write(devc,33,0x03f8); /* enable all audiosources for dsp */ - } - ad_write(devc,4,0x8080); /* default values for volumes (muted)*/ - ad_write(devc,5,0x8080); - ad_write(devc,6,0x8080); - ad_write(devc,7,0x8080); - ad_write(devc,15,0x8888); - ad_write(devc,16,0x8888); - ad_write(devc,17,0x8888); - ad_write(devc,18,0x8888); - ad_write(devc,19,0xc888); /* +20db mic active */ - ad_write(devc,14,0x0000); /* Master volume unmuted */ - ad_write(devc,39,0x009f); /* 3D effect on 0% phone out muted */ - ad_write(devc,44,0x0080); /* everything on power, 3d enabled for d/a */ - outb(0x10,devc->base+8); /* set dma mode */ - outb(0x10,devc->base+9); - - /* enable capture + playback interrupt */ - ad_write(devc,1,0xc000); - - /* set mixer defaults */ - ad1816_mixer_reset (devc); - - /* register mixer */ - if ((audio_devs[oss_devno]->mixer_dev=sound_install_mixer( - MIXER_DRIVER_VERSION, - "AD1816 audio driver", - &ad1816_mixer_operations, - sizeof (struct mixer_operations), - devc)) < 0) { - printk(KERN_WARNING "Can't install mixer\n"); - } - /* make ad1816_info active */ - nr_ad1816_devs++; - printk(KERN_INFO "ad1816: card successfully installed!\n"); - return 1; - /* error handling */ -out_free_dma_2: - if (devc->dma_capture >= 0 && devc->dma_capture != devc->dma_playback) - sound_free_dma(devc->dma_capture); -out_free_dma: - sound_free_dma(devc->dma_playback); -out_free_irq: - free_irq(devc->irq, devc); -out_release_region: - release_region(devc->base, 16); -out: - return 0; -} - -static void __exit unload_card(ad1816_info *devc) -{ - int mixer, dev = 0; - - if (devc != NULL) { - printk("ad1816: Unloading card at address 0x%03x\n",devc->base); - - dev = devc->dev_no; - mixer = audio_devs[dev]->mixer_dev; - - /* unreg mixer*/ - if(mixer>=0) { - sound_unload_mixerdev(mixer); - } - /* unreg audiodev */ - sound_unload_audiodev(dev); - - /* free dma channels */ - if (devc->dma_capture>=0 && - devc->dma_capture != devc->dma_playback) { - sound_free_dma(devc->dma_capture); - } - sound_free_dma (devc->dma_playback); - /* free irq */ - free_irq(devc->irq, devc); - /* free io */ - release_region (devc->base, 16); -#ifdef __ISAPNP__ - if (devc->pnpdev) { - pnp_disable_dev(devc->pnpdev); - pnp_device_detach(devc->pnpdev); - } -#endif - - } else - printk(KERN_WARNING "ad1816: no device/card specified\n"); -} - -static int __initdata io = -1; -static int __initdata irq = -1; -static int __initdata dma = -1; -static int __initdata dma2 = -1; - -#ifdef __ISAPNP__ -/* use isapnp for configuration */ -static int isapnp = 1; -static int isapnpjump; -module_param(isapnp, bool, 0); -module_param(isapnpjump, int, 0); -#endif - -module_param(io, int, 0); -module_param(irq, int, 0); -module_param(dma, int, 0); -module_param(dma2, int, 0); -module_param(ad1816_clockfreq, int, 0); -module_param(options, int, 0); - -#ifdef __ISAPNP__ -static struct { - unsigned short card_vendor, card_device; - unsigned short vendor; - unsigned short function; - struct ad1816_data *data; -} isapnp_ad1816_list[] __initdata = { - { ISAPNP_ANY_ID, ISAPNP_ANY_ID, - ISAPNP_VENDOR('A','D','S'), ISAPNP_FUNCTION(0x7150), - NULL }, - { ISAPNP_ANY_ID, ISAPNP_ANY_ID, - ISAPNP_VENDOR('A','D','S'), ISAPNP_FUNCTION(0x7180), - NULL }, - {0} -}; - -MODULE_DEVICE_TABLE(isapnp, isapnp_ad1816_list); - - -static void __init ad1816_config_pnp_card(struct pnp_card *card, - unsigned short vendor, - unsigned short function) -{ - struct address_info cfg; - struct pnp_dev *card_dev = pnp_find_dev(card, vendor, function, NULL); - if (!card_dev) return; - if (pnp_device_attach(card_dev) < 0) { - printk(KERN_WARNING "ad1816: Failed to attach PnP device\n"); - return; - } - if (pnp_activate_dev(card_dev) < 0) { - printk(KERN_WARNING "ad1816: Failed to activate PnP device\n"); - pnp_device_detach(card_dev); - return; - } - cfg.io_base = pnp_port_start(card_dev, 2); - cfg.irq = pnp_irq(card_dev, 0); - cfg.dma = pnp_irq(card_dev, 0); - cfg.dma2 = pnp_irq(card_dev, 1); - if (!ad1816_init_card(&cfg, card_dev)) { - pnp_disable_dev(card_dev); - pnp_device_detach(card_dev); - } -} - -static void __init ad1816_config_pnp_cards(void) -{ - int nr_pnp_cfg; - int i; - - /* Count entries in isapnp_ad1816_list */ - for (nr_pnp_cfg = 0; isapnp_ad1816_list[nr_pnp_cfg].card_vendor != 0; - nr_pnp_cfg++); - /* Check and adjust isapnpjump */ - if( isapnpjump < 0 || isapnpjump >= nr_pnp_cfg) { - printk(KERN_WARNING - "ad1816: Valid range for isapnpjump is 0-%d. " - "Adjusted to 0.\n", nr_pnp_cfg-1); - isapnpjump = 0; - } - for (i = isapnpjump; isapnp_ad1816_list[i].card_vendor != 0; i++) { - struct pnp_card *card = NULL; - /* iterate over all pnp cards */ - while ((card = pnp_find_card(isapnp_ad1816_list[i].card_vendor, - isapnp_ad1816_list[i].card_device, card))) - ad1816_config_pnp_card(card, - isapnp_ad1816_list[i].vendor, - isapnp_ad1816_list[i].function); - } -} -#endif - -/* module initialization */ -static int __init init_ad1816(void) -{ - printk(KERN_INFO "ad1816: AD1816 sounddriver " - "Copyright (C) 1998-2003 by Thorsten Knabe and " - "others\n"); -#ifdef AD1816_CLOCK - /* set ad1816_clockfreq if set during compilation */ - ad1816_clockfreq=AD1816_CLOCK; -#endif - if (ad1816_clockfreq<5000 || ad1816_clockfreq>100000) { - ad1816_clockfreq=33000; - } - -#ifdef __ISAPNP__ - /* configure PnP cards */ - if(isapnp) ad1816_config_pnp_cards(); -#endif - /* configure card by module params */ - if (io != -1 && irq != -1 && dma != -1) { - struct address_info cfg; - cfg.io_base = io; - cfg.irq = irq; - cfg.dma = dma; - cfg.dma2 = dma2; - ad1816_init_card(&cfg, NULL); - } - if (nr_ad1816_devs <= 0) - return -ENODEV; - return 0; -} - -/* module cleanup */ -static void __exit cleanup_ad1816 (void) -{ - int i; - ad1816_info *devc = NULL; - - /* remove any soundcard */ - for (i = 0; i < nr_ad1816_devs; i++) { - devc = &dev_info[i]; - unload_card(devc); - } - nr_ad1816_devs=0; - printk(KERN_INFO "ad1816: driver unloaded!\n"); -} - -module_init(init_ad1816); -module_exit(cleanup_ad1816); - -#ifndef MODULE -/* kernel command line parameter evaluation */ -static int __init setup_ad1816(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]; - dma2 = ints[4]; - return 1; -} - -__setup("ad1816=", setup_ad1816); -#endif -MODULE_LICENSE("GPL"); diff --git a/sound/oss/ad1889.c b/sound/oss/ad1889.c deleted file mode 100644 index c0730a3563a2..000000000000 --- a/sound/oss/ad1889.c +++ /dev/null @@ -1,1101 +0,0 @@ -/* - * Copyright 2001-2004 Randolph Chung - * - * Analog Devices 1889 PCI audio driver (AD1819 AC97-compatible codec) - * - * 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. - * - * Notes: - * 1. Only flat DMA is supported; s-g is not supported right now - * - * - tausq: Anyway, to set up sample rates for D to A, you just use the sample rate on the codec. For A to D, you need to set the codec always to 48K (using the split sample rate feature on the codec) and then set the resampler on the AD1889 to the sample rate you want. - Also, when changing the sample rate on the codec you need to power it down and re power it up for the change to take effect! - * - * $Id: ad1889.c,v 1.3 2002/10/19 21:31:44 grundler Exp $ - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "ad1889.h" - -#define DBG(fmt, arg...) printk(fmt, ##arg) -#define DEVNAME "ad1889" - -#define NR_HW_CH 4 -#define DAC_RUNNING 1 -#define ADC_RUNNING 2 - -#define UNDERRUN(dev) (0) - -#define AD1889_READW(dev,reg) readw(dev->regbase + reg) -#define AD1889_WRITEW(dev,reg,val) writew((val), dev->regbase + reg) -#define AD1889_READL(dev,reg) readl(dev->regbase + reg) -#define AD1889_WRITEL(dev,reg,val) writel((val), dev->regbase + reg) - -//now 100ms -/* #define WAIT_10MS() schedule_timeout(HZ/10) */ -#define WAIT_10MS() do { int __i; for (__i = 0; __i < 100; __i++) udelay(1000); } while(0) - -/* currently only support a single device */ -static ad1889_dev_t *ad1889_dev = NULL; - -/************************* helper routines ***************************** */ -static inline void ad1889_set_wav_rate(ad1889_dev_t *dev, int rate) -{ - struct ac97_codec *ac97_codec = dev->ac97_codec; - - DBG("Setting WAV rate to %d\n", rate); - dev->state[AD_WAV_STATE].dmabuf.rate = rate; - AD1889_WRITEW(dev, AD_DS_WAS, rate); - - /* Cycle the DAC to enable the new rate */ - ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0x0200); - WAIT_10MS(); - ac97_codec->codec_write(dev->ac97_codec, AC97_POWER_CONTROL, 0); -} - -static inline void ad1889_set_wav_fmt(ad1889_dev_t *dev, int fmt) -{ - u16 tmp; - - DBG("Setting WAV format to 0x%x\n", fmt); - - tmp = AD1889_READW(ad1889_dev, AD_DS_WSMC); - if (fmt & AFMT_S16_LE) { - //tmp |= 0x0100; /* set WA16 */ - tmp |= 0x0300; /* set WA16 stereo */ - } else if (fmt & AFMT_U8) { - tmp &= ~0x0100; /* clear WA16 */ - } - AD1889_WRITEW(ad1889_dev, AD_DS_WSMC, tmp); -} - -static inline void ad1889_set_adc_fmt(ad1889_dev_t *dev, int fmt) -{ - u16 tmp; - - DBG("Setting ADC format to 0x%x\n", fmt); - - tmp = AD1889_READW(ad1889_dev, AD_DS_RAMC); - if (fmt & AFMT_S16_LE) { - tmp |= 0x0100; /* set WA16 */ - } else if (fmt & AFMT_U8) { - tmp &= ~0x0100; /* clear WA16 */ - } - AD1889_WRITEW(ad1889_dev, AD_DS_RAMC, tmp); -} - -static void ad1889_start_wav(ad1889_state_t *state) -{ - unsigned long flags; - struct dmabuf *dmabuf = &state->dmabuf; - int cnt; - u16 tmp; - - spin_lock_irqsave(&state->card->lock, flags); - - if (dmabuf->dma_len) /* DMA already in flight */ - goto skip_dma; - - /* setup dma */ - cnt = dmabuf->wr_ptr - dmabuf->rd_ptr; - if (cnt == 0) /* done - don't need to do anything */ - goto skip_dma; - - /* If the wr_ptr has wrapped, only map to the end */ - if (cnt < 0) - cnt = DMA_SIZE - dmabuf->rd_ptr; - - dmabuf->dma_handle = pci_map_single(ad1889_dev->pci, - dmabuf->rawbuf + dmabuf->rd_ptr, - cnt, PCI_DMA_TODEVICE); - dmabuf->dma_len = cnt; - dmabuf->ready = 1; - - DBG("Starting playback at 0x%p for %ld bytes\n", dmabuf->rawbuf + - dmabuf->rd_ptr, dmabuf->dma_len); - - /* load up the current register set */ - AD1889_WRITEL(ad1889_dev, AD_DMA_WAVCC, cnt); - AD1889_WRITEL(ad1889_dev, AD_DMA_WAVICC, cnt); - AD1889_WRITEL(ad1889_dev, AD_DMA_WAVCA, dmabuf->dma_handle); - - /* TODO: for now we load the base registers with the same thing */ - AD1889_WRITEL(ad1889_dev, AD_DMA_WAVBC, cnt); - AD1889_WRITEL(ad1889_dev, AD_DMA_WAVIBC, cnt); - AD1889_WRITEL(ad1889_dev, AD_DMA_WAVBA, dmabuf->dma_handle); - - /* and we're off to the races... */ - AD1889_WRITEL(ad1889_dev, AD_DMA_CHSS, 0x8); - tmp = AD1889_READW(ad1889_dev, AD_DS_WSMC); - tmp |= 0x0400; /* set WAEN */ - AD1889_WRITEW(ad1889_dev, AD_DS_WSMC, tmp); - (void) AD1889_READW(ad1889_dev, AD_DS_WSMC); /* flush posted PCI write */ - - dmabuf->enable |= DAC_RUNNING; - -skip_dma: - spin_unlock_irqrestore(&state->card->lock, flags); -} - - -static void ad1889_stop_wav(ad1889_state_t *state) -{ - unsigned long flags; - struct dmabuf *dmabuf = &state->dmabuf; - - spin_lock_irqsave(&state->card->lock, flags); - - if (dmabuf->enable & DAC_RUNNING) { - u16 tmp; - unsigned long cnt = dmabuf->dma_len; - - tmp = AD1889_READW(ad1889_dev, AD_DS_WSMC); - tmp &= ~0x0400; /* clear WAEN */ - AD1889_WRITEW(ad1889_dev, AD_DS_WSMC, tmp); - (void) AD1889_READW(ad1889_dev, AD_DS_WSMC); /* flush posted PCI write */ - pci_unmap_single(ad1889_dev->pci, dmabuf->dma_handle, - cnt, PCI_DMA_TODEVICE); - - dmabuf->enable &= ~DAC_RUNNING; - - /* update dma pointers */ - dmabuf->rd_ptr += cnt; - dmabuf->rd_ptr &= (DMA_SIZE - 1); - - dmabuf->dma_handle = 0; - dmabuf->dma_len = 0; - dmabuf->ready = 0; - - wake_up(&dmabuf->wait); - } - - spin_unlock_irqrestore(&state->card->lock, flags); -} - - -#if 0 -static void ad1889_startstop_adc(ad1889_state_t *state, int start) -{ - u16 tmp; - unsigned long flags; - - spin_lock_irqsave(&state->card->lock, flags); - - tmp = AD1889_READW(ad1889_dev, AD_DS_RAMC); - if (start) { - state->dmabuf.enable |= ADC_RUNNING; - tmp |= 0x0004; /* set ADEN */ - } else { - state->dmabuf.enable &= ~ADC_RUNNING; - tmp &= ~0x0004; /* clear ADEN */ - } - AD1889_WRITEW(ad1889_dev, AD_DS_RAMC, tmp); - - spin_unlock_irqrestore(&state->card->lock, flags); -} -#endif - -static ad1889_dev_t *ad1889_alloc_dev(struct pci_dev *pci) -{ - ad1889_dev_t *dev; - struct dmabuf *dmabuf; - int i; - - if ((dev = kzalloc(sizeof(ad1889_dev_t), GFP_KERNEL)) == NULL) - return NULL; - spin_lock_init(&dev->lock); - dev->pci = pci; - - for (i = 0; i < AD_MAX_STATES; i++) { - dev->state[i].card = dev; - mutex_init(&dev->state[i].mutex); - init_waitqueue_head(&dev->state[i].dmabuf.wait); - } - - /* allocate dma buffer */ - - for (i = 0; i < AD_MAX_STATES; i++) { - dmabuf = &dev->state[i].dmabuf; - dmabuf->rawbuf = kmalloc(DMA_SIZE, GFP_KERNEL|GFP_DMA); - if (!dmabuf->rawbuf) - goto err_free_dmabuf; - dmabuf->rawbuf_size = DMA_SIZE; - dmabuf->dma_handle = 0; - dmabuf->rd_ptr = dmabuf->wr_ptr = dmabuf->dma_len = 0UL; - dmabuf->ready = 0; - dmabuf->rate = 48000; - } - return dev; - -err_free_dmabuf: - while (--i >= 0) - kfree(dev->state[i].dmabuf.rawbuf); - kfree(dev); - return NULL; -} - -static void ad1889_free_dev(ad1889_dev_t *dev) -{ - int j; - struct dmabuf *dmabuf; - - if (dev == NULL) - return; - - if (dev->ac97_codec) - ac97_release_codec(dev->ac97_codec); - - for (j = 0; j < AD_MAX_STATES; j++) { - dmabuf = &dev->state[j].dmabuf; - kfree(dmabuf->rawbuf); - } - - kfree(dev); -} - -static inline void ad1889_trigger_playback(ad1889_dev_t *dev) -{ -#if 0 - u32 val; - struct dmabuf *dmabuf = &dev->state[AD_WAV_STATE].dmabuf; -#endif - - ad1889_start_wav(&dev->state[AD_WAV_STATE]); -} - -static int ad1889_read_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - char *out = page; - int len, i; - ad1889_dev_t *dev = data; - ad1889_reg_t regs[] = { - { "WSMC", AD_DS_WSMC, 16 }, - { "RAMC", AD_DS_RAMC, 16 }, - { "WADA", AD_DS_WADA, 16 }, - { "SYDA", AD_DS_SYDA, 16 }, - { "WAS", AD_DS_WAS, 16 }, - { "RES", AD_DS_RES, 16 }, - { "CCS", AD_DS_CCS, 16 }, - { "ADCBA", AD_DMA_ADCBA, 32 }, - { "ADCCA", AD_DMA_ADCCA, 32 }, - { "ADCBC", AD_DMA_ADCBC, 32 }, - { "ADCCC", AD_DMA_ADCCC, 32 }, - { "ADCIBC", AD_DMA_ADCIBC, 32 }, - { "ADCICC", AD_DMA_ADCICC, 32 }, - { "ADCCTRL", AD_DMA_ADCCTRL, 16 }, - { "WAVBA", AD_DMA_WAVBA, 32 }, - { "WAVCA", AD_DMA_WAVCA, 32 }, - { "WAVBC", AD_DMA_WAVBC, 32 }, - { "WAVCC", AD_DMA_WAVCC, 32 }, - { "WAVIBC", AD_DMA_WAVIBC, 32 }, - { "WAVICC", AD_DMA_WAVICC, 32 }, - { "WAVCTRL", AD_DMA_WAVCTRL, 16 }, - { "DISR", AD_DMA_DISR, 32 }, - { "CHSS", AD_DMA_CHSS, 32 }, - { "IPC", AD_GPIO_IPC, 16 }, - { "OP", AD_GPIO_OP, 16 }, - { "IP", AD_GPIO_IP, 16 }, - { "ACIC", AD_AC97_ACIC, 16 }, - { "AC97_RESET", AD_AC97_BASE + AC97_RESET, 16 }, - { "AC97_MASTER_VOL_STEREO", AD_AC97_BASE + AC97_MASTER_VOL_STEREO, 16 }, - { "AC97_HEADPHONE_VOL", AD_AC97_BASE + AC97_HEADPHONE_VOL, 16 }, - { "AC97_MASTER_VOL_MONO", AD_AC97_BASE + AC97_MASTER_VOL_MONO, 16 }, - { "AC97_MASTER_TONE", AD_AC97_BASE + AC97_MASTER_TONE, 16 }, - { "AC97_PCBEEP_VOL", AD_AC97_BASE + AC97_PCBEEP_VOL, 16 }, - { "AC97_PHONE_VOL", AD_AC97_BASE + AC97_PHONE_VOL, 16 }, - { "AC97_MIC_VOL", AD_AC97_BASE + AC97_MIC_VOL, 16 }, - { "AC97_LINEIN_VOL", AD_AC97_BASE + AC97_LINEIN_VOL, 16 }, - { "AC97_CD_VOL", AD_AC97_BASE + AC97_CD_VOL, 16 }, - { "AC97_VIDEO_VOL", AD_AC97_BASE + AC97_VIDEO_VOL, 16 }, - { "AC97_AUX_VOL", AD_AC97_BASE + AC97_AUX_VOL, 16 }, - { "AC97_PCMOUT_VOL", AD_AC97_BASE + AC97_PCMOUT_VOL, 16 }, - { "AC97_RECORD_SELECT", AD_AC97_BASE + AC97_RECORD_SELECT, 16 }, - { "AC97_RECORD_GAIN", AD_AC97_BASE + AC97_RECORD_GAIN, 16 }, - { "AC97_RECORD_GAIN_MIC", AD_AC97_BASE + AC97_RECORD_GAIN_MIC, 16 }, - { "AC97_GENERAL_PURPOSE", AD_AC97_BASE + AC97_GENERAL_PURPOSE, 16 }, - { "AC97_3D_CONTROL", AD_AC97_BASE + AC97_3D_CONTROL, 16 }, - { "AC97_MODEM_RATE", AD_AC97_BASE + AC97_MODEM_RATE, 16 }, - { "AC97_POWER_CONTROL", AD_AC97_BASE + AC97_POWER_CONTROL, 16 }, - { NULL } - }; - - if (dev == NULL) - return -ENODEV; - - for (i = 0; regs[i].name != 0; i++) - out += sprintf(out, "%s: 0x%0*x\n", regs[i].name, - regs[i].width >> 2, - (regs[i].width == 16 - ? AD1889_READW(dev, regs[i].offset) - : AD1889_READL(dev, regs[i].offset))); - - for (i = 0; i < AD_MAX_STATES; i++) { - out += sprintf(out, "DMA status for %s:\n", - (i == AD_WAV_STATE ? "WAV" : "ADC")); - out += sprintf(out, "\t\t0x%p (IOVA: 0x%llu)\n", - dev->state[i].dmabuf.rawbuf, - (unsigned long long)dev->state[i].dmabuf.dma_handle); - - out += sprintf(out, "\tread ptr: offset %u\n", - (unsigned int)dev->state[i].dmabuf.rd_ptr); - out += sprintf(out, "\twrite ptr: offset %u\n", - (unsigned int)dev->state[i].dmabuf.wr_ptr); - out += sprintf(out, "\tdma len: offset %u\n", - (unsigned int)dev->state[i].dmabuf.dma_len); - } - - len = out - page - off; - if (len < count) { - *eof = 1; - if (len <= 0) return 0; - } else { - len = count; - } - *start = page + off; - return len; -} - -/***************************** DMA interfaces ************************** */ -#if 0 -static inline unsigned long ad1889_get_dma_addr(ad1889_state_t *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - u32 offset; - - if (!(dmabuf->enable & (DAC_RUNNING | ADC_RUNNING))) { - printk(KERN_ERR DEVNAME ": get_dma_addr called without dma enabled\n"); - return 0; - } - - if (dmabuf->enable & DAC_RUNNING) - offset = le32_to_cpu(AD1889_READL(state->card, AD_DMA_WAVBA)); - else - offset = le32_to_cpu(AD1889_READL(state->card, AD_DMA_ADCBA)); - - return (unsigned long)bus_to_virt((unsigned long)offset) - (unsigned long)dmabuf->rawbuf; -} - -static void ad1889_update_ptr(ad1889_dev_t *dev, int wake) -{ - ad1889_state_t *state; - struct dmabuf *dmabuf; - unsigned long hwptr; - int diff; - - /* check ADC first */ - state = &dev->adc_state; - dmabuf = &state->dmabuf; - if (dmabuf->enable & ADC_RUNNING) { - hwptr = ad1889_get_dma_addr(state); - diff = (dmabuf->dmasize + hwptr - dmabuf->hwptr) % dmabuf->dmasize; - - dmabuf->hwptr = hwptr; - dmabuf->total_bytes += diff; - dmabuf->count += diff; - if (dmabuf->count > dmabuf->dmasize) - dmabuf->count = dmabuf->dmasize; - - if (dmabuf->mapped) { - if (wake & dmabuf->count >= dmabuf->fragsize) - wake_up(&dmabuf->wait); - } else { - if (wake & dmabuf->count > 0) - wake_up(&dmabuf->wait); - } - } - - /* check DAC */ - state = &dev->wav_state; - dmabuf = &state->dmabuf; - if (dmabuf->enable & DAC_RUNNING) { -XXX - -} -#endif - -/************************* /dev/dsp interfaces ************************* */ - -static ssize_t ad1889_read(struct file *file, char __user *buffer, size_t count, - loff_t *ppos) -{ - return 0; -} - -static ssize_t ad1889_write(struct file *file, const char __user *buffer, size_t count, - loff_t *ppos) -{ - ad1889_dev_t *dev = (ad1889_dev_t *)file->private_data; - ad1889_state_t *state = &dev->state[AD_WAV_STATE]; - volatile struct dmabuf *dmabuf = &state->dmabuf; - ssize_t ret = 0; - DECLARE_WAITQUEUE(wait, current); - - mutex_lock(&state->mutex); -#if 0 - if (dmabuf->mapped) { - ret = -ENXIO; - goto err1; - } -#endif - if (!access_ok(VERIFY_READ, buffer, count)) { - ret = -EFAULT; - goto err1; - } - - add_wait_queue(&state->dmabuf.wait, &wait); - - /* start filling dma buffer.... */ - while (count > 0) { - long rem; - long cnt = count; - unsigned long flags; - - for (;;) { - long used_bytes; - long timeout; /* max time for DMA in jiffies */ - - /* buffer is full if wr catches up to rd */ - spin_lock_irqsave(&state->card->lock, flags); - used_bytes = dmabuf->wr_ptr - dmabuf->rd_ptr; - timeout = (dmabuf->dma_len * HZ) / dmabuf->rate; - spin_unlock_irqrestore(&state->card->lock, flags); - - /* adjust for buffer wrap around */ - used_bytes = (used_bytes + DMA_SIZE) & (DMA_SIZE - 1); - - /* If at least one page unused */ - if (used_bytes < (DMA_SIZE - 0x1000)) - break; - - /* dma buffer full */ - - if (file->f_flags & O_NONBLOCK) { - ret = -EAGAIN; - goto err2; - } - - set_current_state(TASK_INTERRUPTIBLE); - schedule_timeout(timeout + 1); - if (signal_pending(current)) { - ret = -ERESTARTSYS; - goto err2; - } - } - - /* watch out for wrapping around static buffer */ - spin_lock_irqsave(&state->card->lock, flags); - rem = DMA_SIZE - dmabuf->wr_ptr; - if (cnt > rem) - cnt = rem; - - rem = dmabuf->wr_ptr; - - /* update dma pointers */ - dmabuf->wr_ptr += cnt; - dmabuf->wr_ptr &= DMA_SIZE - 1; /* wrap ptr if necessary */ - spin_unlock_irqrestore(&state->card->lock, flags); - - /* transfer unwrapped chunk */ - if (copy_from_user(dmabuf->rawbuf + rem, buffer, cnt)) { - ret = -EFAULT; - goto err2; - } - - DBG("Writing 0x%lx bytes to +0x%lx\n", cnt, rem); - - /* update counters */ - count -= cnt; - buffer += cnt; - ret += cnt; - - /* we have something to play - go play it! */ - ad1889_trigger_playback(dev); - } - -err2: - remove_wait_queue(&state->dmabuf.wait, &wait); -err1: - mutex_unlock(&state->mutex); - return ret; -} - -static unsigned int ad1889_poll(struct file *file, struct poll_table_struct *wait) -{ - unsigned int mask = 0; -#if 0 - ad1889_dev_t *dev = (ad1889_dev_t *)file->private_data; - ad1889_state_t *state = NULL; - struct dmabuf *dmabuf; - unsigned long flags; - - if (!(file->f_mode & (FMODE_READ | FMODE_WRITE))) - return -EINVAL; - - if (file->f_mode & FMODE_WRITE) { - state = &dev->state[AD_WAV_STATE]; - if (!state) return 0; - dmabuf = &state->dmabuf; - poll_wait(file, &dmabuf->wait, wait); - } - - if (file->f_mode & FMODE_READ) { - state = &dev->state[AD_ADC_STATE]; - if (!state) return 0; - dmabuf = &state->dmabuf; - poll_wait(file, &dmabuf->wait, wait); - } - - spin_lock_irqsave(&dev->lock, flags); - ad1889_update_ptr(dev, 0); - - if (file->f_mode & FMODE_WRITE) { - state = &dev->state[WAV_STATE]; - dmabuf = &state->dmabuf; - if (dmabuf->mapped) { - if (dmabuf->count >= (int)dmabuf->fragsize) - mask |= POLLOUT | POLLWRNORM; - } else { - if ((int)dmabuf->dmasize >= dmabuf->count + - (int)dmabuf->fragsize) - mask |= POLLOUT | POLLWRNORM; - } - } - - if (file ->f_mode & FMODE_READ) { - state = &dev->state[AD_ADC_STATE]; - dmabuf = &state->dmabuf; - if (dmabuf->count >= (int)dmabuf->fragsize) - mask |= POLLIN | POLLRDNORM; - } - spin_unlock_irqrestore(&dev->lock, flags); - -#endif - return mask; -} - -static int ad1889_mmap(struct file *file, struct vm_area_struct *vma) -{ - return 0; -} - -static int ad1889_ioctl(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) -{ - int val = 0; - ad1889_dev_t *dev = (ad1889_dev_t *)file->private_data; - struct dmabuf *dmabuf; - audio_buf_info abinfo; - int __user *p = (int __user *)arg; - - DBG("ad1889_ioctl cmd 0x%x arg %lu\n", cmd, arg); - - switch (cmd) - { - case OSS_GETVERSION: - return put_user(SOUND_VERSION, p); - - case SNDCTL_DSP_RESET: - break; - - case SNDCTL_DSP_SYNC: - break; - - case SNDCTL_DSP_SPEED: - /* set sampling rate */ - if (get_user(val, p)) - return -EFAULT; - if (val > 5400 && val < 48000) - { - if (file->f_mode & FMODE_WRITE) - AD1889_WRITEW(ad1889_dev, AD_DS_WAS, val); - if (file->f_mode & FMODE_READ) - AD1889_WRITEW(ad1889_dev, AD_DS_RES, val); - } - return 0; - - case SNDCTL_DSP_STEREO: /* undocumented? */ - if (get_user(val, p)) - return -EFAULT; - if (file->f_mode & FMODE_READ) { - val = AD1889_READW(ad1889_dev, AD_DS_WSMC); - if (val) { - val |= 0x0200; /* set WAST */ - } else { - val &= ~0x0200; /* clear WAST */ - } - AD1889_WRITEW(ad1889_dev, AD_DS_WSMC, val); - } - if (file->f_mode & FMODE_WRITE) { - val = AD1889_READW(ad1889_dev, AD_DS_RAMC); - if (val) { - val |= 0x0002; /* set ADST */ - } else { - val &= ~0x0002; /* clear ADST */ - } - AD1889_WRITEW(ad1889_dev, AD_DS_RAMC, val); - } - - return 0; - - case SNDCTL_DSP_GETBLKSIZE: - return put_user(DMA_SIZE, p); - - case SNDCTL_DSP_GETFMTS: - return put_user(AFMT_S16_LE|AFMT_U8, p); - - case SNDCTL_DSP_SETFMT: - if (get_user(val, p)) - return -EFAULT; - - if (val == 0) { - if (file->f_mode & FMODE_READ) - ad1889_set_adc_fmt(dev, val); - - if (file->f_mode & FMODE_WRITE) - ad1889_set_wav_fmt(dev, val); - } else { - val = AFMT_S16_LE | AFMT_U8; - } - - return put_user(val, p); - - case SNDCTL_DSP_CHANNELS: - break; - - case SNDCTL_DSP_POST: - /* send all data to device */ - break; - - case SNDCTL_DSP_SUBDIVIDE: - break; - - case SNDCTL_DSP_SETFRAGMENT: - /* not supported; uses fixed fragment sizes */ - return put_user(DMA_SIZE, p); - - case SNDCTL_DSP_GETOSPACE: - case SNDCTL_DSP_GETISPACE: - /* space left in dma buffers */ - if (cmd == SNDCTL_DSP_GETOSPACE) - dmabuf = &dev->state[AD_WAV_STATE].dmabuf; - else - dmabuf = &dev->state[AD_ADC_STATE].dmabuf; - abinfo.fragments = 1; - abinfo.fragstotal = 1; - abinfo.fragsize = DMA_SIZE; - abinfo.bytes = DMA_SIZE; - return copy_to_user(p, &abinfo, sizeof(abinfo)) ? -EFAULT : 0; - case SNDCTL_DSP_NONBLOCK: - file->f_flags |= O_NONBLOCK; - return 0; - - case SNDCTL_DSP_GETCAPS: - return put_user(0, p); - - case SNDCTL_DSP_GETTRIGGER: - case SNDCTL_DSP_SETTRIGGER: - break; - - case SNDCTL_DSP_GETIPTR: - case SNDCTL_DSP_GETOPTR: - break; - - case SNDCTL_DSP_SETDUPLEX: - break; - - case SNDCTL_DSP_GETODELAY: - break; - - case SOUND_PCM_READ_RATE: - return put_user(AD1889_READW(ad1889_dev, AD_DS_WAS), p); - - case SOUND_PCM_READ_CHANNELS: - case SOUND_PCM_READ_BITS: - break; - - case SNDCTL_DSP_MAPINBUF: - case SNDCTL_DSP_MAPOUTBUF: - case SNDCTL_DSP_SETSYNCRO: - case SOUND_PCM_WRITE_FILTER: - case SOUND_PCM_READ_FILTER: - break; - - default: - break; - } - - return -ENOTTY; -} - -static int ad1889_open(struct inode *inode, struct file *file) -{ - /* check minor; only support /dev/dsp atm */ - if (iminor(inode) != 3) - return -ENXIO; - - file->private_data = ad1889_dev; - - ad1889_set_wav_rate(ad1889_dev, 48000); - ad1889_set_wav_fmt(ad1889_dev, AFMT_S16_LE); - AD1889_WRITEW(ad1889_dev, AD_DS_WADA, 0x0404); /* attenuation */ - return nonseekable_open(inode, file); -} - -static int ad1889_release(struct inode *inode, struct file *file) -{ - /* if we have state free it here */ - return 0; -} - -static const struct file_operations ad1889_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .read = ad1889_read, - .write = ad1889_write, - .poll = ad1889_poll, - .ioctl = ad1889_ioctl, - .mmap = ad1889_mmap, - .open = ad1889_open, - .release = ad1889_release, -}; - -/************************* /dev/mixer interfaces ************************ */ -static int ad1889_mixer_open(struct inode *inode, struct file *file) -{ - if (ad1889_dev->ac97_codec->dev_mixer != iminor(inode)) - return -ENODEV; - - file->private_data = ad1889_dev->ac97_codec; - return 0; -} - -static int ad1889_mixer_release(struct inode *inode, struct file *file) -{ - return 0; -} - -static int ad1889_mixer_ioctl(struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg) -{ - struct ac97_codec *codec = (struct ac97_codec *)file->private_data; - return codec->mixer_ioctl(codec, cmd, arg); -} - -static const struct file_operations ad1889_mixer_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .ioctl = ad1889_mixer_ioctl, - .open = ad1889_mixer_open, - .release = ad1889_mixer_release, -}; - -/************************* AC97 interfaces ****************************** */ -static void ad1889_codec_write(struct ac97_codec *ac97, u8 reg, u16 val) -{ - ad1889_dev_t *dev = ac97->private_data; - - //DBG("Writing 0x%x to 0x%lx\n", val, dev->regbase + AD_AC97_BASE + reg); - AD1889_WRITEW(dev, AD_AC97_BASE + reg, val); -} - -static u16 ad1889_codec_read(struct ac97_codec *ac97, u8 reg) -{ - ad1889_dev_t *dev = ac97->private_data; - //DBG("Reading from 0x%lx\n", dev->regbase + AD_AC97_BASE + reg); - return AD1889_READW(dev, AD_AC97_BASE + reg); -} - -static int ad1889_ac97_init(ad1889_dev_t *dev, int id) -{ - struct ac97_codec *ac97; - u16 eid; - - if ((ac97 = ac97_alloc_codec()) == NULL) - return -ENOMEM; - - ac97->private_data = dev; - ac97->id = id; - - ac97->codec_read = ad1889_codec_read; - ac97->codec_write = ad1889_codec_write; - - if (ac97_probe_codec(ac97) == 0) { - printk(DEVNAME ": ac97_probe_codec failed\n"); - goto out_free; - } - - eid = ad1889_codec_read(ac97, AC97_EXTENDED_ID); - if (eid == 0xffff) { - printk(KERN_WARNING DEVNAME ": no codec attached?\n"); - goto out_free; - } - - dev->ac97_features = eid; - - if ((ac97->dev_mixer = register_sound_mixer(&ad1889_mixer_fops, -1)) < 0) { - printk(KERN_ERR DEVNAME ": cannot register mixer\n"); - goto out_free; - } - - dev->ac97_codec = ac97; - return 0; - -out_free: - ac97_release_codec(ac97); - return -ENODEV; -} - -static int ad1889_aclink_reset(struct pci_dev * pcidev) -{ - u16 stat; - int retry = 200; - ad1889_dev_t *dev = pci_get_drvdata(pcidev); - - AD1889_WRITEW(dev, AD_DS_CCS, 0x8000); /* turn on clock */ - AD1889_READW(dev, AD_DS_CCS); - - WAIT_10MS(); - - stat = AD1889_READW(dev, AD_AC97_ACIC); - stat |= 0x0002; /* Reset Disable */ - AD1889_WRITEW(dev, AD_AC97_ACIC, stat); - (void) AD1889_READW(dev, AD_AC97_ACIC); /* flush posted write */ - - udelay(10); - - stat = AD1889_READW(dev, AD_AC97_ACIC); - stat |= 0x0001; /* Interface Enable */ - AD1889_WRITEW(dev, AD_AC97_ACIC, stat); - - do { - if (AD1889_READW(dev, AD_AC97_ACIC) & 0x8000) /* Ready */ - break; - WAIT_10MS(); - retry--; - } while (retry > 0); - - if (!retry) { - printk(KERN_ERR "ad1889_aclink_reset: codec is not ready [0x%x]\n", - AD1889_READW(dev, AD_AC97_ACIC)); - return -EBUSY; - } - - /* TODO reset AC97 codec */ - /* TODO set wave/adc pci ctrl status */ - - stat = AD1889_READW(dev, AD_AC97_ACIC); - stat |= 0x0004; /* Audio Stream Output Enable */ - AD1889_WRITEW(dev, AD_AC97_ACIC, stat); - return 0; -} - -/************************* PCI interfaces ****************************** */ -/* PCI device table */ -static struct pci_device_id ad1889_id_tbl[] = { - { PCI_VENDOR_ID_ANALOG_DEVICES, PCI_DEVICE_ID_AD1889JS, PCI_ANY_ID, - PCI_ANY_ID, 0, 0, (unsigned long)DEVNAME }, - { }, -}; -MODULE_DEVICE_TABLE(pci, ad1889_id_tbl); - -static irqreturn_t ad1889_interrupt(int irq, void *dev_id) -{ - u32 stat; - ad1889_dev_t *dev = (ad1889_dev_t *)dev_id; - - stat = AD1889_READL(dev, AD_DMA_DISR); - - /* clear ISR */ - AD1889_WRITEL(dev, AD_DMA_DISR, stat); - - if (stat & 0x8) { /* WAVI */ - DBG("WAV interrupt\n"); - dev->stats.wav_intrs++; - if (dev->state[AD_WAV_STATE].dmabuf.ready) { - ad1889_stop_wav(&dev->state[AD_WAV_STATE]); /* clean up */ - ad1889_start_wav(&dev->state[AD_WAV_STATE]); /* start new */ - } - } - - if ((stat & 0x2) && dev->state[AD_ADC_STATE].dmabuf.ready) { /* ADCI */ - DBG("ADC interrupt\n"); - dev->stats.adc_intrs++; - } - if(stat) - return IRQ_HANDLED; - return IRQ_NONE; -} - -static void ad1889_initcfg(ad1889_dev_t *dev) -{ - u16 tmp16; - u32 tmp32; - - /* make sure the interrupt bits are setup the way we want */ - tmp32 = AD1889_READL(dev, AD_DMA_WAVCTRL); - tmp32 &= ~0xff; /* flat dma, no sg, mask out the intr bits */ - tmp32 |= 0x6; /* intr on count, loop */ - AD1889_WRITEL(dev, AD_DMA_WAVCTRL, tmp32); - - /* unmute... */ - tmp16 = AD1889_READW(dev, AD_DS_WADA); - tmp16 &= ~0x8080; - AD1889_WRITEW(dev, AD_DS_WADA, tmp16); -} - -static int __devinit ad1889_probe(struct pci_dev *pcidev, const struct pci_device_id *ent) -{ - int err; - ad1889_dev_t *dev; - unsigned long bar; - struct proc_dir_entry *proc_root = NULL; - - if ((err = pci_enable_device(pcidev)) != 0) { - printk(KERN_ERR DEVNAME ": pci_enable_device failed\n"); - return err; - } - - pci_set_master(pcidev); - if ((dev = ad1889_alloc_dev(pcidev)) == NULL) { - printk(KERN_ERR DEVNAME ": cannot allocate memory for device\n"); - return -ENOMEM; - } - pci_set_drvdata(pcidev, dev); - bar = pci_resource_start(pcidev, 0); - - if (!(pci_resource_flags(pcidev, 0) & IORESOURCE_MEM)) { - printk(KERN_ERR DEVNAME ": memory region not assigned\n"); - goto out1; - } - - if (pci_request_region(pcidev, 0, DEVNAME)) { - printk(KERN_ERR DEVNAME ": unable to request memory region\n"); - goto out1; - } - - dev->regbase = ioremap_nocache(bar, AD_DS_IOMEMSIZE); - if (!dev->regbase) { - printk(KERN_ERR DEVNAME ": unable to remap iomem\n"); - goto out2; - } - - if (request_irq(pcidev->irq, ad1889_interrupt, IRQF_SHARED, DEVNAME, dev) != 0) { - printk(KERN_ERR DEVNAME ": unable to request interrupt\n"); - goto out3; - } - - printk(KERN_INFO DEVNAME ": %s at %p IRQ %d\n", - (char *)ent->driver_data, dev->regbase, pcidev->irq); - - if (ad1889_aclink_reset(pcidev) != 0) - goto out4; - - /* register /dev/dsp */ - if ((dev->dev_audio = register_sound_dsp(&ad1889_fops, -1)) < 0) { - printk(KERN_ERR DEVNAME ": cannot register /dev/dsp\n"); - goto out4; - } - - if ((err = ad1889_ac97_init(dev, 0)) != 0) - goto out5; - - /* XXX: cleanups */ - if (((proc_root = proc_mkdir("driver/ad1889", NULL)) == NULL) || - create_proc_read_entry("ac97", S_IFREG|S_IRUGO, proc_root, ac97_read_proc, dev->ac97_codec) == NULL || - create_proc_read_entry("info", S_IFREG|S_IRUGO, proc_root, ad1889_read_proc, dev) == NULL) - goto out5; - - ad1889_initcfg(dev); - - //DBG(DEVNAME ": Driver initialization done!\n"); - - ad1889_dev = dev; - - return 0; - -out5: - unregister_sound_dsp(dev->dev_audio); -out4: - free_irq(pcidev->irq, dev); -out3: - iounmap(dev->regbase); -out2: - pci_release_region(pcidev, 0); -out1: - ad1889_free_dev(dev); - pci_set_drvdata(pcidev, NULL); - - return -ENODEV; -} - -static void __devexit ad1889_remove(struct pci_dev *pcidev) -{ - ad1889_dev_t *dev = pci_get_drvdata(pcidev); - - if (dev == NULL) return; - - unregister_sound_mixer(dev->ac97_codec->dev_mixer); - unregister_sound_dsp(dev->dev_audio); - free_irq(pcidev->irq, dev); - iounmap(dev->regbase); - pci_release_region(pcidev, 0); - - /* any hw programming needed? */ - ad1889_free_dev(dev); - pci_set_drvdata(pcidev, NULL); -} - -MODULE_AUTHOR("Randolph Chung"); -MODULE_DESCRIPTION("Analog Devices AD1889 PCI Audio"); -MODULE_LICENSE("GPL"); - -static struct pci_driver ad1889_driver = { - .name = DEVNAME, - .id_table = ad1889_id_tbl, - .probe = ad1889_probe, - .remove = __devexit_p(ad1889_remove), -}; - -static int __init ad1889_init_module(void) -{ - return pci_register_driver(&ad1889_driver); -} - -static void ad1889_exit_module(void) -{ - pci_unregister_driver(&ad1889_driver); - return; -} - -module_init(ad1889_init_module); -module_exit(ad1889_exit_module); diff --git a/sound/oss/ad1889.h b/sound/oss/ad1889.h deleted file mode 100644 index 09913765967a..000000000000 --- a/sound/oss/ad1889.h +++ /dev/null @@ -1,135 +0,0 @@ -#ifndef _AD1889_H_ -#define _AD1889_H_ - -#define AD_DS_WSMC 0x00 /* DMA input wave/syn mixer control */ -#define AD_DS_RAMC 0x02 /* DMA output resamp/ADC mixer control */ -#define AD_DS_WADA 0x04 /* DMA input wave attenuation */ -#define AD_DS_SYDA 0x06 /* DMA input syn attentuation */ -#define AD_DS_WAS 0x08 /* wave input sample rate */ -#define AD_DS_RES 0x0a /* resampler output sample rate */ -#define AD_DS_CCS 0x0c /* chip control/status */ - -#define AD_DMA_RESBA 0x40 /* RES base addr */ -#define AD_DMA_RESCA 0x44 /* RES current addr */ -#define AD_DMA_RESBC 0x48 /* RES base cnt */ -#define AD_DMA_RESCC 0x4c /* RES current count */ -#define AD_DMA_ADCBA 0x50 /* ADC */ -#define AD_DMA_ADCCA 0x54 -#define AD_DMA_ADCBC 0x58 -#define AD_DMA_ADCCC 0x5c -#define AD_DMA_SYNBA 0x60 /* SYN */ -#define AD_DMA_SYNCA 0x64 -#define AD_DMA_SYNBC 0x68 -#define AD_DMA_SYNCC 0x6c -#define AD_DMA_WAVBA 0x70 /* WAV */ -#define AD_DMA_WAVCA 0x74 -#define AD_DMA_WAVBC 0x78 -#define AD_DMA_WAVCC 0x7c -#define AD_DMA_RESICC 0x80 /* RES interrupt current count */ -#define AD_DMA_RESIBC 0x84 /* RES interrupt base count */ -#define AD_DMA_ADCICC 0x88 /* ADC interrupt current count */ -#define AD_DMA_ADCIBC 0x8c /* ADC interrupt base count */ -#define AD_DMA_SYNICC 0x90 /* SYN interrupt current count */ -#define AD_DMA_SYNIBC 0x94 /* SYN interrupt base count */ -#define AD_DMA_WAVICC 0x98 /* WAV interrupt current count */ -#define AD_DMA_WAVIBC 0x9c /* WAV interrupt base count */ -#define AD_DMA_RESCTRL 0xa0 /* RES PCI control/status */ -#define AD_DMA_ADCCTRL 0xa8 /* ADC PCI control/status */ -#define AD_DMA_SYNCTRL 0xb0 /* SYN PCI control/status */ -#define AD_DMA_WAVCTRL 0xb8 /* WAV PCI control/status */ -#define AD_DMA_DISR 0xc0 /* PCI DMA intr status */ -#define AD_DMA_CHSS 0xc4 /* PCI DMA channel stop status */ - -#define AD_GPIO_IPC 0xc8 /* IO port ctrl */ -#define AD_GPIO_OP 0xca /* IO output status */ -#define AD_GPIO_IP 0xcc /* IO input status */ - -/* AC97 registers, 0x100 - 0x17f; see ac97.h */ -#define AD_AC97_BASE 0x100 /* ac97 base register */ -#define AD_AC97_ACIC 0x180 /* AC Link interface ctrl */ - -/* OPL3; BAR1 */ -#define AD_OPL_M0AS 0x00 /* Music0 address/status */ -#define AD_OPL_M0DATA 0x01 /* Music0 data */ -#define AD_OPL_M1A 0x02 /* Music1 address */ -#define AD_OPL_M1DATA 0x03 /* Music1 data */ -/* 0x04-0x0f reserved */ - -/* MIDI; BAR2 */ -#define AD_MIDA 0x00 /* MIDI data */ -#define AD_MISC 0x01 /* MIDI status/cmd */ -/* 0x02-0xff reserved */ - -#define AD_DS_IOMEMSIZE 512 -#define AD_OPL_MEMSIZE 16 -#define AD_MIDI_MEMSIZE 16 - -#define AD_WAV_STATE 0 -#define AD_ADC_STATE 1 -#define AD_MAX_STATES 2 - -#define DMA_SIZE (128*1024) - -#define DMA_FLAG_MAPPED 1 - -struct ad1889_dev; - -typedef struct ad1889_state { - struct ad1889_dev *card; - - mode_t open_mode; - struct dmabuf { - unsigned int rate; - unsigned char fmt, enable; - - /* buf management */ - size_t rawbuf_size; - void *rawbuf; - dma_addr_t dma_handle; /* mapped address */ - unsigned long dma_len; /* number of bytes mapped */ - - /* indexes into rawbuf for setting up DMA engine */ - volatile unsigned long rd_ptr, wr_ptr; - - wait_queue_head_t wait; /* to wait for buf servicing */ - - /* OSS bits */ - unsigned int mapped:1; - unsigned int ready:1; - unsigned int ossfragshift; - int ossmaxfrags; - unsigned int subdivision; - } dmabuf; - - struct mutex mutex; -} ad1889_state_t; - -typedef struct ad1889_dev { - void __iomem *regbase; - struct pci_dev *pci; - - spinlock_t lock; - - int dev_audio; - - /* states; one per channel; right now only WAV and ADC */ - struct ad1889_state state[AD_MAX_STATES]; - - /* AC97 codec */ - struct ac97_codec *ac97_codec; - u16 ac97_features; - - /* debugging stuff */ - struct stats { - unsigned int wav_intrs, adc_intrs; - unsigned int blocks, underrun, error; - } stats; -} ad1889_dev_t; - -typedef struct ad1889_reg { - const char *name; - int offset; - int width; -} ad1889_reg_t; - -#endif diff --git a/sound/oss/adlib_card.c b/sound/oss/adlib_card.c deleted file mode 100644 index c9a7c9b470de..000000000000 --- a/sound/oss/adlib_card.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * sound/oss/adlib_card.c - * - * Detection routine for the AdLib card. - * - * 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 -#include - -#include "sound_config.h" - -#include "opl3.h" - -static void __init attach_adlib_card(struct address_info *hw_config) -{ - hw_config->slots[0] = opl3_init(hw_config->io_base, hw_config->osp, THIS_MODULE); -} - -static int __init probe_adlib(struct address_info *hw_config) -{ - return opl3_detect(hw_config->io_base, hw_config->osp); -} - -static struct address_info cfg; - -static int __initdata io = -1; - -module_param(io, int, 0); - -static int __init init_adlib(void) -{ - cfg.io_base = io; - - if (cfg.io_base == -1) { - printk(KERN_ERR "adlib: must specify I/O address.\n"); - return -EINVAL; - } - if (probe_adlib(&cfg) == 0) - return -ENODEV; - attach_adlib_card(&cfg); - - return 0; -} - -static void __exit cleanup_adlib(void) -{ - sound_unload_synthdev(cfg.slots[0]); - -} - -module_init(init_adlib); -module_exit(cleanup_adlib); - -#ifndef MODULE -static int __init setup_adlib(char *str) -{ - /* io */ - int ints[2]; - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - - return 1; -} -__setup("adlib=", setup_adlib); -#endif -MODULE_LICENSE("GPL"); diff --git a/sound/oss/cs461x.h b/sound/oss/cs461x.h deleted file mode 100644 index 0ce41338e6dd..000000000000 --- a/sound/oss/cs461x.h +++ /dev/null @@ -1,1691 +0,0 @@ -#ifndef __CS461X_H -#define __CS461X_H - -/* - * Copyright (c) by Cirrus Logic Corporation - * Copyright (c) by Jaroslav Kysela - * Definitions for Cirrus Logic CS461x 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. - * - */ - -#ifndef PCI_VENDOR_ID_CIRRUS -#define PCI_VENDOR_ID_CIRRUS 0x1013 -#endif -#ifndef PCI_DEVICE_ID_CIRRUS_4610 -#define PCI_DEVICE_ID_CIRRUS_4610 0x6001 -#endif -#ifndef PCI_DEVICE_ID_CIRRUS_4612 -#define PCI_DEVICE_ID_CIRRUS_4612 0x6003 -#endif -#ifndef PCI_DEVICE_ID_CIRRUS_4615 -#define PCI_DEVICE_ID_CIRRUS_4615 0x6004 -#endif - -/* - * Direct registers - */ - -/* - * The following define the offsets of the registers accessed via base address - * register zero on the CS461x part. - */ -#define BA0_HISR 0x00000000 -#define BA0_HSR0 0x00000004 -#define BA0_HICR 0x00000008 -#define BA0_DMSR 0x00000100 -#define BA0_HSAR 0x00000110 -#define BA0_HDAR 0x00000114 -#define BA0_HDMR 0x00000118 -#define BA0_HDCR 0x0000011C -#define BA0_PFMC 0x00000200 -#define BA0_PFCV1 0x00000204 -#define BA0_PFCV2 0x00000208 -#define BA0_PCICFG00 0x00000300 -#define BA0_PCICFG04 0x00000304 -#define BA0_PCICFG08 0x00000308 -#define BA0_PCICFG0C 0x0000030C -#define BA0_PCICFG10 0x00000310 -#define BA0_PCICFG14 0x00000314 -#define BA0_PCICFG18 0x00000318 -#define BA0_PCICFG1C 0x0000031C -#define BA0_PCICFG20 0x00000320 -#define BA0_PCICFG24 0x00000324 -#define BA0_PCICFG28 0x00000328 -#define BA0_PCICFG2C 0x0000032C -#define BA0_PCICFG30 0x00000330 -#define BA0_PCICFG34 0x00000334 -#define BA0_PCICFG38 0x00000338 -#define BA0_PCICFG3C 0x0000033C -#define BA0_CLKCR1 0x00000400 -#define BA0_CLKCR2 0x00000404 -#define BA0_PLLM 0x00000408 -#define BA0_PLLCC 0x0000040C -#define BA0_FRR 0x00000410 -#define BA0_CFL1 0x00000414 -#define BA0_CFL2 0x00000418 -#define BA0_SERMC1 0x00000420 -#define BA0_SERMC2 0x00000424 -#define BA0_SERC1 0x00000428 -#define BA0_SERC2 0x0000042C -#define BA0_SERC3 0x00000430 -#define BA0_SERC4 0x00000434 -#define BA0_SERC5 0x00000438 -#define BA0_SERBSP 0x0000043C -#define BA0_SERBST 0x00000440 -#define BA0_SERBCM 0x00000444 -#define BA0_SERBAD 0x00000448 -#define BA0_SERBCF 0x0000044C -#define BA0_SERBWP 0x00000450 -#define BA0_SERBRP 0x00000454 -#ifndef NO_CS4612 -#define BA0_ASER_FADDR 0x00000458 -#endif -#define BA0_ACCTL 0x00000460 -#define BA0_ACSTS 0x00000464 -#define BA0_ACOSV 0x00000468 -#define BA0_ACCAD 0x0000046C -#define BA0_ACCDA 0x00000470 -#define BA0_ACISV 0x00000474 -#define BA0_ACSAD 0x00000478 -#define BA0_ACSDA 0x0000047C -#define BA0_JSPT 0x00000480 -#define BA0_JSCTL 0x00000484 -#define BA0_JSC1 0x00000488 -#define BA0_JSC2 0x0000048C -#define BA0_MIDCR 0x00000490 -#define BA0_MIDSR 0x00000494 -#define BA0_MIDWP 0x00000498 -#define BA0_MIDRP 0x0000049C -#define BA0_JSIO 0x000004A0 -#ifndef NO_CS4612 -#define BA0_ASER_MASTER 0x000004A4 -#endif -#define BA0_CFGI 0x000004B0 -#define BA0_SSVID 0x000004B4 -#define BA0_GPIOR 0x000004B8 -#ifndef NO_CS4612 -#define BA0_EGPIODR 0x000004BC -#define BA0_EGPIOPTR 0x000004C0 -#define BA0_EGPIOTR 0x000004C4 -#define BA0_EGPIOWR 0x000004C8 -#define BA0_EGPIOSR 0x000004CC -#define BA0_SERC6 0x000004D0 -#define BA0_SERC7 0x000004D4 -#define BA0_SERACC 0x000004D8 -#define BA0_ACCTL2 0x000004E0 -#define BA0_ACSTS2 0x000004E4 -#define BA0_ACOSV2 0x000004E8 -#define BA0_ACCAD2 0x000004EC -#define BA0_ACCDA2 0x000004F0 -#define BA0_ACISV2 0x000004F4 -#define BA0_ACSAD2 0x000004F8 -#define BA0_ACSDA2 0x000004FC -#define BA0_IOTAC0 0x00000500 -#define BA0_IOTAC1 0x00000504 -#define BA0_IOTAC2 0x00000508 -#define BA0_IOTAC3 0x0000050C -#define BA0_IOTAC4 0x00000510 -#define BA0_IOTAC5 0x00000514 -#define BA0_IOTAC6 0x00000518 -#define BA0_IOTAC7 0x0000051C -#define BA0_IOTAC8 0x00000520 -#define BA0_IOTAC9 0x00000524 -#define BA0_IOTAC10 0x00000528 -#define BA0_IOTAC11 0x0000052C -#define BA0_IOTFR0 0x00000540 -#define BA0_IOTFR1 0x00000544 -#define BA0_IOTFR2 0x00000548 -#define BA0_IOTFR3 0x0000054C -#define BA0_IOTFR4 0x00000550 -#define BA0_IOTFR5 0x00000554 -#define BA0_IOTFR6 0x00000558 -#define BA0_IOTFR7 0x0000055C -#define BA0_IOTFIFO 0x00000580 -#define BA0_IOTRRD 0x00000584 -#define BA0_IOTFP 0x00000588 -#define BA0_IOTCR 0x0000058C -#define BA0_DPCID 0x00000590 -#define BA0_DPCIA 0x00000594 -#define BA0_DPCIC 0x00000598 -#define BA0_PCPCIR 0x00000600 -#define BA0_PCPCIG 0x00000604 -#define BA0_PCPCIEN 0x00000608 -#define BA0_EPCIPMC 0x00000610 -#endif - -/* - * The following define the offsets of the registers and memories accessed via - * base address register one on the CS461x part. - */ -#define BA1_SP_DMEM0 0x00000000 -#define BA1_SP_DMEM1 0x00010000 -#define BA1_SP_PMEM 0x00020000 -#define BA1_SP_REG 0x00030000 -#define BA1_SPCR 0x00030000 -#define BA1_DREG 0x00030004 -#define BA1_DSRWP 0x00030008 -#define BA1_TWPR 0x0003000C -#define BA1_SPWR 0x00030010 -#define BA1_SPIR 0x00030014 -#define BA1_FGR1 0x00030020 -#define BA1_SPCS 0x00030028 -#define BA1_SDSR 0x0003002C -#define BA1_FRMT 0x00030030 -#define BA1_FRCC 0x00030034 -#define BA1_FRSC 0x00030038 -#define BA1_OMNI_MEM 0x000E0000 - -/* - * The following defines are for the flags in the host interrupt status - * register. - */ -#define HISR_VC_MASK 0x0000FFFF -#define HISR_VC0 0x00000001 -#define HISR_VC1 0x00000002 -#define HISR_VC2 0x00000004 -#define HISR_VC3 0x00000008 -#define HISR_VC4 0x00000010 -#define HISR_VC5 0x00000020 -#define HISR_VC6 0x00000040 -#define HISR_VC7 0x00000080 -#define HISR_VC8 0x00000100 -#define HISR_VC9 0x00000200 -#define HISR_VC10 0x00000400 -#define HISR_VC11 0x00000800 -#define HISR_VC12 0x00001000 -#define HISR_VC13 0x00002000 -#define HISR_VC14 0x00004000 -#define HISR_VC15 0x00008000 -#define HISR_INT0 0x00010000 -#define HISR_INT1 0x00020000 -#define HISR_DMAI 0x00040000 -#define HISR_FROVR 0x00080000 -#define HISR_MIDI 0x00100000 -#ifdef NO_CS4612 -#define HISR_RESERVED 0x0FE00000 -#else -#define HISR_SBINT 0x00200000 -#define HISR_RESERVED 0x0FC00000 -#endif -#define HISR_H0P 0x40000000 -#define HISR_INTENA 0x80000000 - -/* - * The following defines are for the flags in the host signal register 0. - */ -#define HSR0_VC_MASK 0xFFFFFFFF -#define HSR0_VC16 0x00000001 -#define HSR0_VC17 0x00000002 -#define HSR0_VC18 0x00000004 -#define HSR0_VC19 0x00000008 -#define HSR0_VC20 0x00000010 -#define HSR0_VC21 0x00000020 -#define HSR0_VC22 0x00000040 -#define HSR0_VC23 0x00000080 -#define HSR0_VC24 0x00000100 -#define HSR0_VC25 0x00000200 -#define HSR0_VC26 0x00000400 -#define HSR0_VC27 0x00000800 -#define HSR0_VC28 0x00001000 -#define HSR0_VC29 0x00002000 -#define HSR0_VC30 0x00004000 -#define HSR0_VC31 0x00008000 -#define HSR0_VC32 0x00010000 -#define HSR0_VC33 0x00020000 -#define HSR0_VC34 0x00040000 -#define HSR0_VC35 0x00080000 -#define HSR0_VC36 0x00100000 -#define HSR0_VC37 0x00200000 -#define HSR0_VC38 0x00400000 -#define HSR0_VC39 0x00800000 -#define HSR0_VC40 0x01000000 -#define HSR0_VC41 0x02000000 -#define HSR0_VC42 0x04000000 -#define HSR0_VC43 0x08000000 -#define HSR0_VC44 0x10000000 -#define HSR0_VC45 0x20000000 -#define HSR0_VC46 0x40000000 -#define HSR0_VC47 0x80000000 - -/* - * The following defines are for the flags in the host interrupt control - * register. - */ -#define HICR_IEV 0x00000001 -#define HICR_CHGM 0x00000002 - -/* - * The following defines are for the flags in the DMA status register. - */ -#define DMSR_HP 0x00000001 -#define DMSR_HR 0x00000002 -#define DMSR_SP 0x00000004 -#define DMSR_SR 0x00000008 - -/* - * The following defines are for the flags in the host DMA source address - * register. - */ -#define HSAR_HOST_ADDR_MASK 0xFFFFFFFF -#define HSAR_DSP_ADDR_MASK 0x0000FFFF -#define HSAR_MEMID_MASK 0x000F0000 -#define HSAR_MEMID_SP_DMEM0 0x00000000 -#define HSAR_MEMID_SP_DMEM1 0x00010000 -#define HSAR_MEMID_SP_PMEM 0x00020000 -#define HSAR_MEMID_SP_DEBUG 0x00030000 -#define HSAR_MEMID_OMNI_MEM 0x000E0000 -#define HSAR_END 0x40000000 -#define HSAR_ERR 0x80000000 - -/* - * The following defines are for the flags in the host DMA destination address - * register. - */ -#define HDAR_HOST_ADDR_MASK 0xFFFFFFFF -#define HDAR_DSP_ADDR_MASK 0x0000FFFF -#define HDAR_MEMID_MASK 0x000F0000 -#define HDAR_MEMID_SP_DMEM0 0x00000000 -#define HDAR_MEMID_SP_DMEM1 0x00010000 -#define HDAR_MEMID_SP_PMEM 0x00020000 -#define HDAR_MEMID_SP_DEBUG 0x00030000 -#define HDAR_MEMID_OMNI_MEM 0x000E0000 -#define HDAR_END 0x40000000 -#define HDAR_ERR 0x80000000 - -/* - * The following defines are for the flags in the host DMA control register. - */ -#define HDMR_AC_MASK 0x0000F000 -#define HDMR_AC_8_16 0x00001000 -#define HDMR_AC_M_S 0x00002000 -#define HDMR_AC_B_L 0x00004000 -#define HDMR_AC_S_U 0x00008000 - -/* - * The following defines are for the flags in the host DMA control register. - */ -#define HDCR_COUNT_MASK 0x000003FF -#define HDCR_DONE 0x00004000 -#define HDCR_OPT 0x00008000 -#define HDCR_WBD 0x00400000 -#define HDCR_WBS 0x00800000 -#define HDCR_DMS_MASK 0x07000000 -#define HDCR_DMS_LINEAR 0x00000000 -#define HDCR_DMS_16_DWORDS 0x01000000 -#define HDCR_DMS_32_DWORDS 0x02000000 -#define HDCR_DMS_64_DWORDS 0x03000000 -#define HDCR_DMS_128_DWORDS 0x04000000 -#define HDCR_DMS_256_DWORDS 0x05000000 -#define HDCR_DMS_512_DWORDS 0x06000000 -#define HDCR_DMS_1024_DWORDS 0x07000000 -#define HDCR_DH 0x08000000 -#define HDCR_SMS_MASK 0x70000000 -#define HDCR_SMS_LINEAR 0x00000000 -#define HDCR_SMS_16_DWORDS 0x10000000 -#define HDCR_SMS_32_DWORDS 0x20000000 -#define HDCR_SMS_64_DWORDS 0x30000000 -#define HDCR_SMS_128_DWORDS 0x40000000 -#define HDCR_SMS_256_DWORDS 0x50000000 -#define HDCR_SMS_512_DWORDS 0x60000000 -#define HDCR_SMS_1024_DWORDS 0x70000000 -#define HDCR_SH 0x80000000 -#define HDCR_COUNT_SHIFT 0 - -/* - * The following defines are for the flags in the performance monitor control - * register. - */ -#define PFMC_C1SS_MASK 0x0000001F -#define PFMC_C1EV 0x00000020 -#define PFMC_C1RS 0x00008000 -#define PFMC_C2SS_MASK 0x001F0000 -#define PFMC_C2EV 0x00200000 -#define PFMC_C2RS 0x80000000 -#define PFMC_C1SS_SHIFT 0 -#define PFMC_C2SS_SHIFT 16 -#define PFMC_BUS_GRANT 0 -#define PFMC_GRANT_AFTER_REQ 1 -#define PFMC_TRANSACTION 2 -#define PFMC_DWORD_TRANSFER 3 -#define PFMC_SLAVE_READ 4 -#define PFMC_SLAVE_WRITE 5 -#define PFMC_PREEMPTION 6 -#define PFMC_DISCONNECT_RETRY 7 -#define PFMC_INTERRUPT 8 -#define PFMC_BUS_OWNERSHIP 9 -#define PFMC_TRANSACTION_LAG 10 -#define PFMC_PCI_CLOCK 11 -#define PFMC_SERIAL_CLOCK 12 -#define PFMC_SP_CLOCK 13 - -/* - * The following defines are for the flags in the performance counter value 1 - * register. - */ -#define PFCV1_PC1V_MASK 0xFFFFFFFF -#define PFCV1_PC1V_SHIFT 0 - -/* - * The following defines are for the flags in the performance counter value 2 - * register. - */ -#define PFCV2_PC2V_MASK 0xFFFFFFFF -#define PFCV2_PC2V_SHIFT 0 - -/* - * The following defines are for the flags in the clock control register 1. - */ -#define CLKCR1_OSCS 0x00000001 -#define CLKCR1_OSCP 0x00000002 -#define CLKCR1_PLLSS_MASK 0x0000000C -#define CLKCR1_PLLSS_SERIAL 0x00000000 -#define CLKCR1_PLLSS_CRYSTAL 0x00000004 -#define CLKCR1_PLLSS_PCI 0x00000008 -#define CLKCR1_PLLSS_RESERVED 0x0000000C -#define CLKCR1_PLLP 0x00000010 -#define CLKCR1_SWCE 0x00000020 -#define CLKCR1_PLLOS 0x00000040 - -/* - * The following defines are for the flags in the clock control register 2. - */ -#define CLKCR2_PDIVS_MASK 0x0000000F -#define CLKCR2_PDIVS_1 0x00000001 -#define CLKCR2_PDIVS_2 0x00000002 -#define CLKCR2_PDIVS_4 0x00000004 -#define CLKCR2_PDIVS_7 0x00000007 -#define CLKCR2_PDIVS_8 0x00000008 -#define CLKCR2_PDIVS_16 0x00000000 - -/* - * The following defines are for the flags in the PLL multiplier register. - */ -#define PLLM_MASK 0x000000FF -#define PLLM_SHIFT 0 - -/* - * The following defines are for the flags in the PLL capacitor coefficient - * register. - */ -#define PLLCC_CDR_MASK 0x00000007 -#ifndef NO_CS4610 -#define PLLCC_CDR_240_350_MHZ 0x00000000 -#define PLLCC_CDR_184_265_MHZ 0x00000001 -#define PLLCC_CDR_144_205_MHZ 0x00000002 -#define PLLCC_CDR_111_160_MHZ 0x00000003 -#define PLLCC_CDR_87_123_MHZ 0x00000004 -#define PLLCC_CDR_67_96_MHZ 0x00000005 -#define PLLCC_CDR_52_74_MHZ 0x00000006 -#define PLLCC_CDR_45_58_MHZ 0x00000007 -#endif -#ifndef NO_CS4612 -#define PLLCC_CDR_271_398_MHZ 0x00000000 -#define PLLCC_CDR_227_330_MHZ 0x00000001 -#define PLLCC_CDR_167_239_MHZ 0x00000002 -#define PLLCC_CDR_150_215_MHZ 0x00000003 -#define PLLCC_CDR_107_154_MHZ 0x00000004 -#define PLLCC_CDR_98_140_MHZ 0x00000005 -#define PLLCC_CDR_73_104_MHZ 0x00000006 -#define PLLCC_CDR_63_90_MHZ 0x00000007 -#endif -#define PLLCC_LPF_MASK 0x000000F8 -#ifndef NO_CS4610 -#define PLLCC_LPF_23850_60000_KHZ 0x00000000 -#define PLLCC_LPF_7960_26290_KHZ 0x00000008 -#define PLLCC_LPF_4160_10980_KHZ 0x00000018 -#define PLLCC_LPF_1740_4580_KHZ 0x00000038 -#define PLLCC_LPF_724_1910_KHZ 0x00000078 -#define PLLCC_LPF_317_798_KHZ 0x000000F8 -#endif -#ifndef NO_CS4612 -#define PLLCC_LPF_25580_64530_KHZ 0x00000000 -#define PLLCC_LPF_14360_37270_KHZ 0x00000008 -#define PLLCC_LPF_6100_16020_KHZ 0x00000018 -#define PLLCC_LPF_2540_6690_KHZ 0x00000038 -#define PLLCC_LPF_1050_2780_KHZ 0x00000078 -#define PLLCC_LPF_450_1160_KHZ 0x000000F8 -#endif - -/* - * The following defines are for the flags in the feature reporting register. - */ -#define FRR_FAB_MASK 0x00000003 -#define FRR_MASK_MASK 0x0000001C -#ifdef NO_CS4612 -#define FRR_CFOP_MASK 0x000000E0 -#else -#define FRR_CFOP_MASK 0x00000FE0 -#endif -#define FRR_CFOP_NOT_DVD 0x00000020 -#define FRR_CFOP_A3D 0x00000040 -#define FRR_CFOP_128_PIN 0x00000080 -#ifndef NO_CS4612 -#define FRR_CFOP_CS4280 0x00000800 -#endif -#define FRR_FAB_SHIFT 0 -#define FRR_MASK_SHIFT 2 -#define FRR_CFOP_SHIFT 5 - -/* - * The following defines are for the flags in the configuration load 1 - * register. - */ -#define CFL1_CLOCK_SOURCE_MASK 0x00000003 -#define CFL1_CLOCK_SOURCE_CS423X 0x00000000 -#define CFL1_CLOCK_SOURCE_AC97 0x00000001 -#define CFL1_CLOCK_SOURCE_CRYSTAL 0x00000002 -#define CFL1_CLOCK_SOURCE_DUAL_AC97 0x00000003 -#define CFL1_VALID_DATA_MASK 0x000000FF - -/* - * The following defines are for the flags in the configuration load 2 - * register. - */ -#define CFL2_VALID_DATA_MASK 0x000000FF - -/* - * The following defines are for the flags in the serial port master control - * register 1. - */ -#define SERMC1_MSPE 0x00000001 -#define SERMC1_PTC_MASK 0x0000000E -#define SERMC1_PTC_CS423X 0x00000000 -#define SERMC1_PTC_AC97 0x00000002 -#define SERMC1_PTC_DAC 0x00000004 -#define SERMC1_PLB 0x00000010 -#define SERMC1_XLB 0x00000020 - -/* - * The following defines are for the flags in the serial port master control - * register 2. - */ -#define SERMC2_LROE 0x00000001 -#define SERMC2_MCOE 0x00000002 -#define SERMC2_MCDIV 0x00000004 - -/* - * The following defines are for the flags in the serial port 1 configuration - * register. - */ -#define SERC1_SO1EN 0x00000001 -#define SERC1_SO1F_MASK 0x0000000E -#define SERC1_SO1F_CS423X 0x00000000 -#define SERC1_SO1F_AC97 0x00000002 -#define SERC1_SO1F_DAC 0x00000004 -#define SERC1_SO1F_SPDIF 0x00000006 - -/* - * The following defines are for the flags in the serial port 2 configuration - * register. - */ -#define SERC2_SI1EN 0x00000001 -#define SERC2_SI1F_MASK 0x0000000E -#define SERC2_SI1F_CS423X 0x00000000 -#define SERC2_SI1F_AC97 0x00000002 -#define SERC2_SI1F_ADC 0x00000004 -#define SERC2_SI1F_SPDIF 0x00000006 - -/* - * The following defines are for the flags in the serial port 3 configuration - * register. - */ -#define SERC3_SO2EN 0x00000001 -#define SERC3_SO2F_MASK 0x00000006 -#define SERC3_SO2F_DAC 0x00000000 -#define SERC3_SO2F_SPDIF 0x00000002 - -/* - * The following defines are for the flags in the serial port 4 configuration - * register. - */ -#define SERC4_SO3EN 0x00000001 -#define SERC4_SO3F_MASK 0x00000006 -#define SERC4_SO3F_DAC 0x00000000 -#define SERC4_SO3F_SPDIF 0x00000002 - -/* - * The following defines are for the flags in the serial port 5 configuration - * register. - */ -#define SERC5_SI2EN 0x00000001 -#define SERC5_SI2F_MASK 0x00000006 -#define SERC5_SI2F_ADC 0x00000000 -#define SERC5_SI2F_SPDIF 0x00000002 - -/* - * The following defines are for the flags in the serial port backdoor sample - * pointer register. - */ -#define SERBSP_FSP_MASK 0x0000000F -#define SERBSP_FSP_SHIFT 0 - -/* - * The following defines are for the flags in the serial port backdoor status - * register. - */ -#define SERBST_RRDY 0x00000001 -#define SERBST_WBSY 0x00000002 - -/* - * The following defines are for the flags in the serial port backdoor command - * register. - */ -#define SERBCM_RDC 0x00000001 -#define SERBCM_WRC 0x00000002 - -/* - * The following defines are for the flags in the serial port backdoor address - * register. - */ -#ifdef NO_CS4612 -#define SERBAD_FAD_MASK 0x000000FF -#else -#define SERBAD_FAD_MASK 0x000001FF -#endif -#define SERBAD_FAD_SHIFT 0 - -/* - * The following defines are for the flags in the serial port backdoor - * configuration register. - */ -#define SERBCF_HBP 0x00000001 - -/* - * The following defines are for the flags in the serial port backdoor write - * port register. - */ -#define SERBWP_FWD_MASK 0x000FFFFF -#define SERBWP_FWD_SHIFT 0 - -/* - * The following defines are for the flags in the serial port backdoor read - * port register. - */ -#define SERBRP_FRD_MASK 0x000FFFFF -#define SERBRP_FRD_SHIFT 0 - -/* - * The following defines are for the flags in the async FIFO address register. - */ -#ifndef NO_CS4612 -#define ASER_FADDR_A1_MASK 0x000001FF -#define ASER_FADDR_EN1 0x00008000 -#define ASER_FADDR_A2_MASK 0x01FF0000 -#define ASER_FADDR_EN2 0x80000000 -#define ASER_FADDR_A1_SHIFT 0 -#define ASER_FADDR_A2_SHIFT 16 -#endif - -/* - * The following defines are for the flags in the AC97 control register. - */ -#define ACCTL_RSTN 0x00000001 -#define ACCTL_ESYN 0x00000002 -#define ACCTL_VFRM 0x00000004 -#define ACCTL_DCV 0x00000008 -#define ACCTL_CRW 0x00000010 -#define ACCTL_ASYN 0x00000020 -#ifndef NO_CS4612 -#define ACCTL_TC 0x00000040 -#endif - -/* - * The following defines are for the flags in the AC97 status register. - */ -#define ACSTS_CRDY 0x00000001 -#define ACSTS_VSTS 0x00000002 -#ifndef NO_CS4612 -#define ACSTS_WKUP 0x00000004 -#endif - -/* - * The following defines are for the flags in the AC97 output slot valid - * register. - */ -#define ACOSV_SLV3 0x00000001 -#define ACOSV_SLV4 0x00000002 -#define ACOSV_SLV5 0x00000004 -#define ACOSV_SLV6 0x00000008 -#define ACOSV_SLV7 0x00000010 -#define ACOSV_SLV8 0x00000020 -#define ACOSV_SLV9 0x00000040 -#define ACOSV_SLV10 0x00000080 -#define ACOSV_SLV11 0x00000100 -#define ACOSV_SLV12 0x00000200 - -/* - * The following defines are for the flags in the AC97 command address - * register. - */ -#define ACCAD_CI_MASK 0x0000007F -#define ACCAD_CI_SHIFT 0 - -/* - * The following defines are for the flags in the AC97 command data register. - */ -#define ACCDA_CD_MASK 0x0000FFFF -#define ACCDA_CD_SHIFT 0 - -/* - * The following defines are for the flags in the AC97 input slot valid - * register. - */ -#define ACISV_ISV3 0x00000001 -#define ACISV_ISV4 0x00000002 -#define ACISV_ISV5 0x00000004 -#define ACISV_ISV6 0x00000008 -#define ACISV_ISV7 0x00000010 -#define ACISV_ISV8 0x00000020 -#define ACISV_ISV9 0x00000040 -#define ACISV_ISV10 0x00000080 -#define ACISV_ISV11 0x00000100 -#define ACISV_ISV12 0x00000200 - -/* - * The following defines are for the flags in the AC97 status address - * register. - */ -#define ACSAD_SI_MASK 0x0000007F -#define ACSAD_SI_SHIFT 0 - -/* - * The following defines are for the flags in the AC97 status data register. - */ -#define ACSDA_SD_MASK 0x0000FFFF -#define ACSDA_SD_SHIFT 0 - -/* - * The following defines are for the flags in the joystick poll/trigger - * register. - */ -#define JSPT_CAX 0x00000001 -#define JSPT_CAY 0x00000002 -#define JSPT_CBX 0x00000004 -#define JSPT_CBY 0x00000008 -#define JSPT_BA1 0x00000010 -#define JSPT_BA2 0x00000020 -#define JSPT_BB1 0x00000040 -#define JSPT_BB2 0x00000080 - -/* - * The following defines are for the flags in the joystick control register. - */ -#define JSCTL_SP_MASK 0x00000003 -#define JSCTL_SP_SLOW 0x00000000 -#define JSCTL_SP_MEDIUM_SLOW 0x00000001 -#define JSCTL_SP_MEDIUM_FAST 0x00000002 -#define JSCTL_SP_FAST 0x00000003 -#define JSCTL_ARE 0x00000004 - -/* - * The following defines are for the flags in the joystick coordinate pair 1 - * readback register. - */ -#define JSC1_Y1V_MASK 0x0000FFFF -#define JSC1_X1V_MASK 0xFFFF0000 -#define JSC1_Y1V_SHIFT 0 -#define JSC1_X1V_SHIFT 16 - -/* - * The following defines are for the flags in the joystick coordinate pair 2 - * readback register. - */ -#define JSC2_Y2V_MASK 0x0000FFFF -#define JSC2_X2V_MASK 0xFFFF0000 -#define JSC2_Y2V_SHIFT 0 -#define JSC2_X2V_SHIFT 16 - -/* - * The following defines are for the flags in the MIDI control register. - */ -#define MIDCR_TXE 0x00000001 /* Enable transmitting. */ -#define MIDCR_RXE 0x00000002 /* Enable receiving. */ -#define MIDCR_RIE 0x00000004 /* Interrupt upon tx ready. */ -#define MIDCR_TIE 0x00000008 /* Interrupt upon rx ready. */ -#define MIDCR_MLB 0x00000010 /* Enable midi loopback. */ -#define MIDCR_MRST 0x00000020 /* Reset interface. */ - -/* - * The following defines are for the flags in the MIDI status register. - */ -#define MIDSR_TBF 0x00000001 /* Tx FIFO is full. */ -#define MIDSR_RBE 0x00000002 /* Rx FIFO is empty. */ - -/* - * The following defines are for the flags in the MIDI write port register. - */ -#define MIDWP_MWD_MASK 0x000000FF -#define MIDWP_MWD_SHIFT 0 - -/* - * The following defines are for the flags in the MIDI read port register. - */ -#define MIDRP_MRD_MASK 0x000000FF -#define MIDRP_MRD_SHIFT 0 - -/* - * The following defines are for the flags in the joystick GPIO register. - */ -#define JSIO_DAX 0x00000001 -#define JSIO_DAY 0x00000002 -#define JSIO_DBX 0x00000004 -#define JSIO_DBY 0x00000008 -#define JSIO_AXOE 0x00000010 -#define JSIO_AYOE 0x00000020 -#define JSIO_BXOE 0x00000040 -#define JSIO_BYOE 0x00000080 - -/* - * The following defines are for the flags in the master async/sync serial - * port enable register. - */ -#ifndef NO_CS4612 -#define ASER_MASTER_ME 0x00000001 -#endif - -/* - * The following defines are for the flags in the configuration interface - * register. - */ -#define CFGI_CLK 0x00000001 -#define CFGI_DOUT 0x00000002 -#define CFGI_DIN_EEN 0x00000004 -#define CFGI_EELD 0x00000008 - -/* - * The following defines are for the flags in the subsystem ID and vendor ID - * register. - */ -#define SSVID_VID_MASK 0x0000FFFF -#define SSVID_SID_MASK 0xFFFF0000 -#define SSVID_VID_SHIFT 0 -#define SSVID_SID_SHIFT 16 - -/* - * The following defines are for the flags in the GPIO pin interface register. - */ -#define GPIOR_VOLDN 0x00000001 -#define GPIOR_VOLUP 0x00000002 -#define GPIOR_SI2D 0x00000004 -#define GPIOR_SI2OE 0x00000008 - -/* - * The following defines are for the flags in the extended GPIO pin direction - * register. - */ -#ifndef NO_CS4612 -#define EGPIODR_GPOE0 0x00000001 -#define EGPIODR_GPOE1 0x00000002 -#define EGPIODR_GPOE2 0x00000004 -#define EGPIODR_GPOE3 0x00000008 -#define EGPIODR_GPOE4 0x00000010 -#define EGPIODR_GPOE5 0x00000020 -#define EGPIODR_GPOE6 0x00000040 -#define EGPIODR_GPOE7 0x00000080 -#define EGPIODR_GPOE8 0x00000100 -#endif - -/* - * The following defines are for the flags in the extended GPIO pin polarity/ - * type register. - */ -#ifndef NO_CS4612 -#define EGPIOPTR_GPPT0 0x00000001 -#define EGPIOPTR_GPPT1 0x00000002 -#define EGPIOPTR_GPPT2 0x00000004 -#define EGPIOPTR_GPPT3 0x00000008 -#define EGPIOPTR_GPPT4 0x00000010 -#define EGPIOPTR_GPPT5 0x00000020 -#define EGPIOPTR_GPPT6 0x00000040 -#define EGPIOPTR_GPPT7 0x00000080 -#define EGPIOPTR_GPPT8 0x00000100 -#endif - -/* - * The following defines are for the flags in the extended GPIO pin sticky - * register. - */ -#ifndef NO_CS4612 -#define EGPIOTR_GPS0 0x00000001 -#define EGPIOTR_GPS1 0x00000002 -#define EGPIOTR_GPS2 0x00000004 -#define EGPIOTR_GPS3 0x00000008 -#define EGPIOTR_GPS4 0x00000010 -#define EGPIOTR_GPS5 0x00000020 -#define EGPIOTR_GPS6 0x00000040 -#define EGPIOTR_GPS7 0x00000080 -#define EGPIOTR_GPS8 0x00000100 -#endif - -/* - * The following defines are for the flags in the extended GPIO ping wakeup - * register. - */ -#ifndef NO_CS4612 -#define EGPIOWR_GPW0 0x00000001 -#define EGPIOWR_GPW1 0x00000002 -#define EGPIOWR_GPW2 0x00000004 -#define EGPIOWR_GPW3 0x00000008 -#define EGPIOWR_GPW4 0x00000010 -#define EGPIOWR_GPW5 0x00000020 -#define EGPIOWR_GPW6 0x00000040 -#define EGPIOWR_GPW7 0x00000080 -#define EGPIOWR_GPW8 0x00000100 -#endif - -/* - * The following defines are for the flags in the extended GPIO pin status - * register. - */ -#ifndef NO_CS4612 -#define EGPIOSR_GPS0 0x00000001 -#define EGPIOSR_GPS1 0x00000002 -#define EGPIOSR_GPS2 0x00000004 -#define EGPIOSR_GPS3 0x00000008 -#define EGPIOSR_GPS4 0x00000010 -#define EGPIOSR_GPS5 0x00000020 -#define EGPIOSR_GPS6 0x00000040 -#define EGPIOSR_GPS7 0x00000080 -#define EGPIOSR_GPS8 0x00000100 -#endif - -/* - * The following defines are for the flags in the serial port 6 configuration - * register. - */ -#ifndef NO_CS4612 -#define SERC6_ASDO2EN 0x00000001 -#endif - -/* - * The following defines are for the flags in the serial port 7 configuration - * register. - */ -#ifndef NO_CS4612 -#define SERC7_ASDI2EN 0x00000001 -#define SERC7_POSILB 0x00000002 -#define SERC7_SIPOLB 0x00000004 -#define SERC7_SOSILB 0x00000008 -#define SERC7_SISOLB 0x00000010 -#endif - -/* - * The following defines are for the flags in the serial port AC link - * configuration register. - */ -#ifndef NO_CS4612 -#define SERACC_CODEC_TYPE_MASK 0x00000001 -#define SERACC_CODEC_TYPE_1_03 0x00000000 -#define SERACC_CODEC_TYPE_2_0 0x00000001 -#define SERACC_TWO_CODECS 0x00000002 -#define SERACC_MDM 0x00000004 -#define SERACC_HSP 0x00000008 -#endif - -/* - * The following defines are for the flags in the AC97 control register 2. - */ -#ifndef NO_CS4612 -#define ACCTL2_RSTN 0x00000001 -#define ACCTL2_ESYN 0x00000002 -#define ACCTL2_VFRM 0x00000004 -#define ACCTL2_DCV 0x00000008 -#define ACCTL2_CRW 0x00000010 -#define ACCTL2_ASYN 0x00000020 -#endif - -/* - * The following defines are for the flags in the AC97 status register 2. - */ -#ifndef NO_CS4612 -#define ACSTS2_CRDY 0x00000001 -#define ACSTS2_VSTS 0x00000002 -#endif - -/* - * The following defines are for the flags in the AC97 output slot valid - * register 2. - */ -#ifndef NO_CS4612 -#define ACOSV2_SLV3 0x00000001 -#define ACOSV2_SLV4 0x00000002 -#define ACOSV2_SLV5 0x00000004 -#define ACOSV2_SLV6 0x00000008 -#define ACOSV2_SLV7 0x00000010 -#define ACOSV2_SLV8 0x00000020 -#define ACOSV2_SLV9 0x00000040 -#define ACOSV2_SLV10 0x00000080 -#define ACOSV2_SLV11 0x00000100 -#define ACOSV2_SLV12 0x00000200 -#endif - -/* - * The following defines are for the flags in the AC97 command address - * register 2. - */ -#ifndef NO_CS4612 -#define ACCAD2_CI_MASK 0x0000007F -#define ACCAD2_CI_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the AC97 command data register - * 2. - */ -#ifndef NO_CS4612 -#define ACCDA2_CD_MASK 0x0000FFFF -#define ACCDA2_CD_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the AC97 input slot valid - * register 2. - */ -#ifndef NO_CS4612 -#define ACISV2_ISV3 0x00000001 -#define ACISV2_ISV4 0x00000002 -#define ACISV2_ISV5 0x00000004 -#define ACISV2_ISV6 0x00000008 -#define ACISV2_ISV7 0x00000010 -#define ACISV2_ISV8 0x00000020 -#define ACISV2_ISV9 0x00000040 -#define ACISV2_ISV10 0x00000080 -#define ACISV2_ISV11 0x00000100 -#define ACISV2_ISV12 0x00000200 -#endif - -/* - * The following defines are for the flags in the AC97 status address - * register 2. - */ -#ifndef NO_CS4612 -#define ACSAD2_SI_MASK 0x0000007F -#define ACSAD2_SI_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the AC97 status data register 2. - */ -#ifndef NO_CS4612 -#define ACSDA2_SD_MASK 0x0000FFFF -#define ACSDA2_SD_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the I/O trap address and control - * registers (all 12). - */ -#ifndef NO_CS4612 -#define IOTAC_SA_MASK 0x0000FFFF -#define IOTAC_MSK_MASK 0x000F0000 -#define IOTAC_IODC_MASK 0x06000000 -#define IOTAC_IODC_16_BIT 0x00000000 -#define IOTAC_IODC_10_BIT 0x02000000 -#define IOTAC_IODC_12_BIT 0x04000000 -#define IOTAC_WSPI 0x08000000 -#define IOTAC_RSPI 0x10000000 -#define IOTAC_WSE 0x20000000 -#define IOTAC_WE 0x40000000 -#define IOTAC_RE 0x80000000 -#define IOTAC_SA_SHIFT 0 -#define IOTAC_MSK_SHIFT 16 -#endif - -/* - * The following defines are for the flags in the I/O trap fast read registers - * (all 8). - */ -#ifndef NO_CS4612 -#define IOTFR_D_MASK 0x0000FFFF -#define IOTFR_A_MASK 0x000F0000 -#define IOTFR_R_MASK 0x0F000000 -#define IOTFR_ALL 0x40000000 -#define IOTFR_VL 0x80000000 -#define IOTFR_D_SHIFT 0 -#define IOTFR_A_SHIFT 16 -#define IOTFR_R_SHIFT 24 -#endif - -/* - * The following defines are for the flags in the I/O trap FIFO register. - */ -#ifndef NO_CS4612 -#define IOTFIFO_BA_MASK 0x00003FFF -#define IOTFIFO_S_MASK 0x00FF0000 -#define IOTFIFO_OF 0x40000000 -#define IOTFIFO_SPIOF 0x80000000 -#define IOTFIFO_BA_SHIFT 0 -#define IOTFIFO_S_SHIFT 16 -#endif - -/* - * The following defines are for the flags in the I/O trap retry read data - * register. - */ -#ifndef NO_CS4612 -#define IOTRRD_D_MASK 0x0000FFFF -#define IOTRRD_RDV 0x80000000 -#define IOTRRD_D_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the I/O trap FIFO pointer - * register. - */ -#ifndef NO_CS4612 -#define IOTFP_CA_MASK 0x00003FFF -#define IOTFP_PA_MASK 0x3FFF0000 -#define IOTFP_CA_SHIFT 0 -#define IOTFP_PA_SHIFT 16 -#endif - -/* - * The following defines are for the flags in the I/O trap control register. - */ -#ifndef NO_CS4612 -#define IOTCR_ITD 0x00000001 -#define IOTCR_HRV 0x00000002 -#define IOTCR_SRV 0x00000004 -#define IOTCR_DTI 0x00000008 -#define IOTCR_DFI 0x00000010 -#define IOTCR_DDP 0x00000020 -#define IOTCR_JTE 0x00000040 -#define IOTCR_PPE 0x00000080 -#endif - -/* - * The following defines are for the flags in the direct PCI data register. - */ -#ifndef NO_CS4612 -#define DPCID_D_MASK 0xFFFFFFFF -#define DPCID_D_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the direct PCI address register. - */ -#ifndef NO_CS4612 -#define DPCIA_A_MASK 0xFFFFFFFF -#define DPCIA_A_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the direct PCI command register. - */ -#ifndef NO_CS4612 -#define DPCIC_C_MASK 0x0000000F -#define DPCIC_C_IOREAD 0x00000002 -#define DPCIC_C_IOWRITE 0x00000003 -#define DPCIC_BE_MASK 0x000000F0 -#endif - -/* - * The following defines are for the flags in the PC/PCI request register. - */ -#ifndef NO_CS4612 -#define PCPCIR_RDC_MASK 0x00000007 -#define PCPCIR_C_MASK 0x00007000 -#define PCPCIR_REQ 0x00008000 -#define PCPCIR_RDC_SHIFT 0 -#define PCPCIR_C_SHIFT 12 -#endif - -/* - * The following defines are for the flags in the PC/PCI grant register. - */ -#ifndef NO_CS4612 -#define PCPCIG_GDC_MASK 0x00000007 -#define PCPCIG_VL 0x00008000 -#define PCPCIG_GDC_SHIFT 0 -#endif - -/* - * The following defines are for the flags in the PC/PCI master enable - * register. - */ -#ifndef NO_CS4612 -#define PCPCIEN_EN 0x00000001 -#endif - -/* - * The following defines are for the flags in the extended PCI power - * management control register. - */ -#ifndef NO_CS4612 -#define EPCIPMC_GWU 0x00000001 -#define EPCIPMC_FSPC 0x00000002 -#endif - -/* - * The following defines are for the flags in the SP control register. - */ -#define SPCR_RUN 0x00000001 -#define SPCR_STPFR 0x00000002 -#define SPCR_RUNFR 0x00000004 -#define SPCR_TICK 0x00000008 -#define SPCR_DRQEN 0x00000020 -#define SPCR_RSTSP 0x00000040 -#define SPCR_OREN 0x00000080 -#ifndef NO_CS4612 -#define SPCR_PCIINT 0x00000100 -#define SPCR_OINTD 0x00000200 -#define SPCR_CRE 0x00008000 -#endif - -/* - * The following defines are for the flags in the debug index register. - */ -#define DREG_REGID_MASK 0x0000007F -#define DREG_DEBUG 0x00000080 -#define DREG_RGBK_MASK 0x00000700 -#define DREG_TRAP 0x00000800 -#if !defined(NO_CS4612) -#if !defined(NO_CS4615) -#define DREG_TRAPX 0x00001000 -#endif -#endif -#define DREG_REGID_SHIFT 0 -#define DREG_RGBK_SHIFT 8 -#define DREG_RGBK_REGID_MASK 0x0000077F -#define DREG_REGID_R0 0x00000010 -#define DREG_REGID_R1 0x00000011 -#define DREG_REGID_R2 0x00000012 -#define DREG_REGID_R3 0x00000013 -#define DREG_REGID_R4 0x00000014 -#define DREG_REGID_R5 0x00000015 -#define DREG_REGID_R6 0x00000016 -#define DREG_REGID_R7 0x00000017 -#define DREG_REGID_R8 0x00000018 -#define DREG_REGID_R9 0x00000019 -#define DREG_REGID_RA 0x0000001A -#define DREG_REGID_RB 0x0000001B -#define DREG_REGID_RC 0x0000001C -#define DREG_REGID_RD 0x0000001D -#define DREG_REGID_RE 0x0000001E -#define DREG_REGID_RF 0x0000001F -#define DREG_REGID_RA_BUS_LOW 0x00000020 -#define DREG_REGID_RA_BUS_HIGH 0x00000038 -#define DREG_REGID_YBUS_LOW 0x00000050 -#define DREG_REGID_YBUS_HIGH 0x00000058 -#define DREG_REGID_TRAP_0 0x00000100 -#define DREG_REGID_TRAP_1 0x00000101 -#define DREG_REGID_TRAP_2 0x00000102 -#define DREG_REGID_TRAP_3 0x00000103 -#define DREG_REGID_TRAP_4 0x00000104 -#define DREG_REGID_TRAP_5 0x00000105 -#define DREG_REGID_TRAP_6 0x00000106 -#define DREG_REGID_TRAP_7 0x00000107 -#define DREG_REGID_INDIRECT_ADDRESS 0x0000010E -#define DREG_REGID_TOP_OF_STACK 0x0000010F -#if !defined(NO_CS4612) -#if !defined(NO_CS4615) -#define DREG_REGID_TRAP_8 0x00000110 -#define DREG_REGID_TRAP_9 0x00000111 -#define DREG_REGID_TRAP_10 0x00000112 -#define DREG_REGID_TRAP_11 0x00000113 -#define DREG_REGID_TRAP_12 0x00000114 -#define DREG_REGID_TRAP_13 0x00000115 -#define DREG_REGID_TRAP_14 0x00000116 -#define DREG_REGID_TRAP_15 0x00000117 -#define DREG_REGID_TRAP_16 0x00000118 -#define DREG_REGID_TRAP_17 0x00000119 -#define DREG_REGID_TRAP_18 0x0000011A -#define DREG_REGID_TRAP_19 0x0000011B -#define DREG_REGID_TRAP_20 0x0000011C -#define DREG_REGID_TRAP_21 0x0000011D -#define DREG_REGID_TRAP_22 0x0000011E -#define DREG_REGID_TRAP_23 0x0000011F -#endif -#endif -#define DREG_REGID_RSA0_LOW 0x00000200 -#define DREG_REGID_RSA0_HIGH 0x00000201 -#define DREG_REGID_RSA1_LOW 0x00000202 -#define DREG_REGID_RSA1_HIGH 0x00000203 -#define DREG_REGID_RSA2 0x00000204 -#define DREG_REGID_RSA3 0x00000205 -#define DREG_REGID_RSI0_LOW 0x00000206 -#define DREG_REGID_RSI0_HIGH 0x00000207 -#define DREG_REGID_RSI1 0x00000208 -#define DREG_REGID_RSI2 0x00000209 -#define DREG_REGID_SAGUSTATUS 0x0000020A -#define DREG_REGID_RSCONFIG01_LOW 0x0000020B -#define DREG_REGID_RSCONFIG01_HIGH 0x0000020C -#define DREG_REGID_RSCONFIG23_LOW 0x0000020D -#define DREG_REGID_RSCONFIG23_HIGH 0x0000020E -#define DREG_REGID_RSDMA01E 0x0000020F -#define DREG_REGID_RSDMA23E 0x00000210 -#define DREG_REGID_RSD0_LOW 0x00000211 -#define DREG_REGID_RSD0_HIGH 0x00000212 -#define DREG_REGID_RSD1_LOW 0x00000213 -#define DREG_REGID_RSD1_HIGH 0x00000214 -#define DREG_REGID_RSD2_LOW 0x00000215 -#define DREG_REGID_RSD2_HIGH 0x00000216 -#define DREG_REGID_RSD3_LOW 0x00000217 -#define DREG_REGID_RSD3_HIGH 0x00000218 -#define DREG_REGID_SRAR_HIGH 0x0000021A -#define DREG_REGID_SRAR_LOW 0x0000021B -#define DREG_REGID_DMA_STATE 0x0000021C -#define DREG_REGID_CURRENT_DMA_STREAM 0x0000021D -#define DREG_REGID_NEXT_DMA_STREAM 0x0000021E -#define DREG_REGID_CPU_STATUS 0x00000300 -#define DREG_REGID_MAC_MODE 0x00000301 -#define DREG_REGID_STACK_AND_REPEAT 0x00000302 -#define DREG_REGID_INDEX0 0x00000304 -#define DREG_REGID_INDEX1 0x00000305 -#define DREG_REGID_DMA_STATE_0_3 0x00000400 -#define DREG_REGID_DMA_STATE_4_7 0x00000404 -#define DREG_REGID_DMA_STATE_8_11 0x00000408 -#define DREG_REGID_DMA_STATE_12_15 0x0000040C -#define DREG_REGID_DMA_STATE_16_19 0x00000410 -#define DREG_REGID_DMA_STATE_20_23 0x00000414 -#define DREG_REGID_DMA_STATE_24_27 0x00000418 -#define DREG_REGID_DMA_STATE_28_31 0x0000041C -#define DREG_REGID_DMA_STATE_32_35 0x00000420 -#define DREG_REGID_DMA_STATE_36_39 0x00000424 -#define DREG_REGID_DMA_STATE_40_43 0x00000428 -#define DREG_REGID_DMA_STATE_44_47 0x0000042C -#define DREG_REGID_DMA_STATE_48_51 0x00000430 -#define DREG_REGID_DMA_STATE_52_55 0x00000434 -#define DREG_REGID_DMA_STATE_56_59 0x00000438 -#define DREG_REGID_DMA_STATE_60_63 0x0000043C -#define DREG_REGID_DMA_STATE_64_67 0x00000440 -#define DREG_REGID_DMA_STATE_68_71 0x00000444 -#define DREG_REGID_DMA_STATE_72_75 0x00000448 -#define DREG_REGID_DMA_STATE_76_79 0x0000044C -#define DREG_REGID_DMA_STATE_80_83 0x00000450 -#define DREG_REGID_DMA_STATE_84_87 0x00000454 -#define DREG_REGID_DMA_STATE_88_91 0x00000458 -#define DREG_REGID_DMA_STATE_92_95 0x0000045C -#define DREG_REGID_TRAP_SELECT 0x00000500 -#define DREG_REGID_TRAP_WRITE_0 0x00000500 -#define DREG_REGID_TRAP_WRITE_1 0x00000501 -#define DREG_REGID_TRAP_WRITE_2 0x00000502 -#define DREG_REGID_TRAP_WRITE_3 0x00000503 -#define DREG_REGID_TRAP_WRITE_4 0x00000504 -#define DREG_REGID_TRAP_WRITE_5 0x00000505 -#define DREG_REGID_TRAP_WRITE_6 0x00000506 -#define DREG_REGID_TRAP_WRITE_7 0x00000507 -#if !defined(NO_CS4612) -#if !defined(NO_CS4615) -#define DREG_REGID_TRAP_WRITE_8 0x00000510 -#define DREG_REGID_TRAP_WRITE_9 0x00000511 -#define DREG_REGID_TRAP_WRITE_10 0x00000512 -#define DREG_REGID_TRAP_WRITE_11 0x00000513 -#define DREG_REGID_TRAP_WRITE_12 0x00000514 -#define DREG_REGID_TRAP_WRITE_13 0x00000515 -#define DREG_REGID_TRAP_WRITE_14 0x00000516 -#define DREG_REGID_TRAP_WRITE_15 0x00000517 -#define DREG_REGID_TRAP_WRITE_16 0x00000518 -#define DREG_REGID_TRAP_WRITE_17 0x00000519 -#define DREG_REGID_TRAP_WRITE_18 0x0000051A -#define DREG_REGID_TRAP_WRITE_19 0x0000051B -#define DREG_REGID_TRAP_WRITE_20 0x0000051C -#define DREG_REGID_TRAP_WRITE_21 0x0000051D -#define DREG_REGID_TRAP_WRITE_22 0x0000051E -#define DREG_REGID_TRAP_WRITE_23 0x0000051F -#endif -#endif -#define DREG_REGID_MAC0_ACC0_LOW 0x00000600 -#define DREG_REGID_MAC0_ACC1_LOW 0x00000601 -#define DREG_REGID_MAC0_ACC2_LOW 0x00000602 -#define DREG_REGID_MAC0_ACC3_LOW 0x00000603 -#define DREG_REGID_MAC1_ACC0_LOW 0x00000604 -#define DREG_REGID_MAC1_ACC1_LOW 0x00000605 -#define DREG_REGID_MAC1_ACC2_LOW 0x00000606 -#define DREG_REGID_MAC1_ACC3_LOW 0x00000607 -#define DREG_REGID_MAC0_ACC0_MID 0x00000608 -#define DREG_REGID_MAC0_ACC1_MID 0x00000609 -#define DREG_REGID_MAC0_ACC2_MID 0x0000060A -#define DREG_REGID_MAC0_ACC3_MID 0x0000060B -#define DREG_REGID_MAC1_ACC0_MID 0x0000060C -#define DREG_REGID_MAC1_ACC1_MID 0x0000060D -#define DREG_REGID_MAC1_ACC2_MID 0x0000060E -#define DREG_REGID_MAC1_ACC3_MID 0x0000060F -#define DREG_REGID_MAC0_ACC0_HIGH 0x00000610 -#define DREG_REGID_MAC0_ACC1_HIGH 0x00000611 -#define DREG_REGID_MAC0_ACC2_HIGH 0x00000612 -#define DREG_REGID_MAC0_ACC3_HIGH 0x00000613 -#define DREG_REGID_MAC1_ACC0_HIGH 0x00000614 -#define DREG_REGID_MAC1_ACC1_HIGH 0x00000615 -#define DREG_REGID_MAC1_ACC2_HIGH 0x00000616 -#define DREG_REGID_MAC1_ACC3_HIGH 0x00000617 -#define DREG_REGID_RSHOUT_LOW 0x00000620 -#define DREG_REGID_RSHOUT_MID 0x00000628 -#define DREG_REGID_RSHOUT_HIGH 0x00000630 - -/* - * The following defines are for the flags in the DMA stream requestor write - */ -#define DSRWP_DSR_MASK 0x0000000F -#define DSRWP_DSR_BG_RQ 0x00000001 -#define DSRWP_DSR_PRIORITY_MASK 0x00000006 -#define DSRWP_DSR_PRIORITY_0 0x00000000 -#define DSRWP_DSR_PRIORITY_1 0x00000002 -#define DSRWP_DSR_PRIORITY_2 0x00000004 -#define DSRWP_DSR_PRIORITY_3 0x00000006 -#define DSRWP_DSR_RQ_PENDING 0x00000008 - -/* - * The following defines are for the flags in the trap write port register. - */ -#define TWPR_TW_MASK 0x0000FFFF -#define TWPR_TW_SHIFT 0 - -/* - * The following defines are for the flags in the stack pointer write - * register. - */ -#define SPWR_STKP_MASK 0x0000000F -#define SPWR_STKP_SHIFT 0 - -/* - * The following defines are for the flags in the SP interrupt register. - */ -#define SPIR_FRI 0x00000001 -#define SPIR_DOI 0x00000002 -#define SPIR_GPI2 0x00000004 -#define SPIR_GPI3 0x00000008 -#define SPIR_IP0 0x00000010 -#define SPIR_IP1 0x00000020 -#define SPIR_IP2 0x00000040 -#define SPIR_IP3 0x00000080 - -/* - * The following defines are for the flags in the functional group 1 register. - */ -#define FGR1_F1S_MASK 0x0000FFFF -#define FGR1_F1S_SHIFT 0 - -/* - * The following defines are for the flags in the SP clock status register. - */ -#define SPCS_FRI 0x00000001 -#define SPCS_DOI 0x00000002 -#define SPCS_GPI2 0x00000004 -#define SPCS_GPI3 0x00000008 -#define SPCS_IP0 0x00000010 -#define SPCS_IP1 0x00000020 -#define SPCS_IP2 0x00000040 -#define SPCS_IP3 0x00000080 -#define SPCS_SPRUN 0x00000100 -#define SPCS_SLEEP 0x00000200 -#define SPCS_FG 0x00000400 -#define SPCS_ORUN 0x00000800 -#define SPCS_IRQ 0x00001000 -#define SPCS_FGN_MASK 0x0000E000 -#define SPCS_FGN_SHIFT 13 - -/* - * The following defines are for the flags in the SP DMA requestor status - * register. - */ -#define SDSR_DCS_MASK 0x000000FF -#define SDSR_DCS_SHIFT 0 -#define SDSR_DCS_NONE 0x00000007 - -/* - * The following defines are for the flags in the frame timer register. - */ -#define FRMT_FTV_MASK 0x0000FFFF -#define FRMT_FTV_SHIFT 0 - -/* - * The following defines are for the flags in the frame timer current count - * register. - */ -#define FRCC_FCC_MASK 0x0000FFFF -#define FRCC_FCC_SHIFT 0 - -/* - * The following defines are for the flags in the frame timer save count - * register. - */ -#define FRSC_FCS_MASK 0x0000FFFF -#define FRSC_FCS_SHIFT 0 - -/* - * The following define the various flags stored in the scatter/gather - * descriptors. - */ -#define DMA_SG_NEXT_ENTRY_MASK 0x00000FF8 -#define DMA_SG_SAMPLE_END_MASK 0x0FFF0000 -#define DMA_SG_SAMPLE_END_FLAG 0x10000000 -#define DMA_SG_LOOP_END_FLAG 0x20000000 -#define DMA_SG_SIGNAL_END_FLAG 0x40000000 -#define DMA_SG_SIGNAL_PAGE_FLAG 0x80000000 -#define DMA_SG_NEXT_ENTRY_SHIFT 3 -#define DMA_SG_SAMPLE_END_SHIFT 16 - -/* - * The following define the offsets of the fields within the on-chip generic - * DMA requestor. - */ -#define DMA_RQ_CONTROL1 0x00000000 -#define DMA_RQ_CONTROL2 0x00000004 -#define DMA_RQ_SOURCE_ADDR 0x00000008 -#define DMA_RQ_DESTINATION_ADDR 0x0000000C -#define DMA_RQ_NEXT_PAGE_ADDR 0x00000010 -#define DMA_RQ_NEXT_PAGE_SGDESC 0x00000014 -#define DMA_RQ_LOOP_START_ADDR 0x00000018 -#define DMA_RQ_POST_LOOP_ADDR 0x0000001C -#define DMA_RQ_PAGE_MAP_ADDR 0x00000020 - -/* - * The following defines are for the flags in the first control word of the - * on-chip generic DMA requestor. - */ -#define DMA_RQ_C1_COUNT_MASK 0x000003FF -#define DMA_RQ_C1_DESTINATION_SCATTER 0x00001000 -#define DMA_RQ_C1_SOURCE_GATHER 0x00002000 -#define DMA_RQ_C1_DONE_FLAG 0x00004000 -#define DMA_RQ_C1_OPTIMIZE_STATE 0x00008000 -#define DMA_RQ_C1_SAMPLE_END_STATE_MASK 0x00030000 -#define DMA_RQ_C1_FULL_PAGE 0x00000000 -#define DMA_RQ_C1_BEFORE_SAMPLE_END 0x00010000 -#define DMA_RQ_C1_PAGE_MAP_ERROR 0x00020000 -#define DMA_RQ_C1_AT_SAMPLE_END 0x00030000 -#define DMA_RQ_C1_LOOP_END_STATE_MASK 0x000C0000 -#define DMA_RQ_C1_NOT_LOOP_END 0x00000000 -#define DMA_RQ_C1_BEFORE_LOOP_END 0x00040000 -#define DMA_RQ_C1_2PAGE_LOOP_BEGIN 0x00080000 -#define DMA_RQ_C1_LOOP_BEGIN 0x000C0000 -#define DMA_RQ_C1_PAGE_MAP_MASK 0x00300000 -#define DMA_RQ_C1_PM_NONE_PENDING 0x00000000 -#define DMA_RQ_C1_PM_NEXT_PENDING 0x00100000 -#define DMA_RQ_C1_PM_RESERVED 0x00200000 -#define DMA_RQ_C1_PM_LOOP_NEXT_PENDING 0x00300000 -#define DMA_RQ_C1_WRITEBACK_DEST_FLAG 0x00400000 -#define DMA_RQ_C1_WRITEBACK_SRC_FLAG 0x00800000 -#define DMA_RQ_C1_DEST_SIZE_MASK 0x07000000 -#define DMA_RQ_C1_DEST_LINEAR 0x00000000 -#define DMA_RQ_C1_DEST_MOD16 0x01000000 -#define DMA_RQ_C1_DEST_MOD32 0x02000000 -#define DMA_RQ_C1_DEST_MOD64 0x03000000 -#define DMA_RQ_C1_DEST_MOD128 0x04000000 -#define DMA_RQ_C1_DEST_MOD256 0x05000000 -#define DMA_RQ_C1_DEST_MOD512 0x06000000 -#define DMA_RQ_C1_DEST_MOD1024 0x07000000 -#define DMA_RQ_C1_DEST_ON_HOST 0x08000000 -#define DMA_RQ_C1_SOURCE_SIZE_MASK 0x70000000 -#define DMA_RQ_C1_SOURCE_LINEAR 0x00000000 -#define DMA_RQ_C1_SOURCE_MOD16 0x10000000 -#define DMA_RQ_C1_SOURCE_MOD32 0x20000000 -#define DMA_RQ_C1_SOURCE_MOD64 0x30000000 -#define DMA_RQ_C1_SOURCE_MOD128 0x40000000 -#define DMA_RQ_C1_SOURCE_MOD256 0x50000000 -#define DMA_RQ_C1_SOURCE_MOD512 0x60000000 -#define DMA_RQ_C1_SOURCE_MOD1024 0x70000000 -#define DMA_RQ_C1_SOURCE_ON_HOST 0x80000000 -#define DMA_RQ_C1_COUNT_SHIFT 0 - -/* - * The following defines are for the flags in the second control word of the - * on-chip generic DMA requestor. - */ -#define DMA_RQ_C2_VIRTUAL_CHANNEL_MASK 0x0000003F -#define DMA_RQ_C2_VIRTUAL_SIGNAL_MASK 0x00000300 -#define DMA_RQ_C2_NO_VIRTUAL_SIGNAL 0x00000000 -#define DMA_RQ_C2_SIGNAL_EVERY_DMA 0x00000100 -#define DMA_RQ_C2_SIGNAL_SOURCE_PINGPONG 0x00000200 -#define DMA_RQ_C2_SIGNAL_DEST_PINGPONG 0x00000300 -#define DMA_RQ_C2_AUDIO_CONVERT_MASK 0x0000F000 -#define DMA_RQ_C2_AC_NONE 0x00000000 -#define DMA_RQ_C2_AC_8_TO_16_BIT 0x00001000 -#define DMA_RQ_C2_AC_MONO_TO_STEREO 0x00002000 -#define DMA_RQ_C2_AC_ENDIAN_CONVERT 0x00004000 -#define DMA_RQ_C2_AC_SIGNED_CONVERT 0x00008000 -#define DMA_RQ_C2_LOOP_END_MASK 0x0FFF0000 -#define DMA_RQ_C2_LOOP_MASK 0x30000000 -#define DMA_RQ_C2_NO_LOOP 0x00000000 -#define DMA_RQ_C2_ONE_PAGE_LOOP 0x10000000 -#define DMA_RQ_C2_TWO_PAGE_LOOP 0x20000000 -#define DMA_RQ_C2_MULTI_PAGE_LOOP 0x30000000 -#define DMA_RQ_C2_SIGNAL_LOOP_BACK 0x40000000 -#define DMA_RQ_C2_SIGNAL_POST_BEGIN_PAGE 0x80000000 -#define DMA_RQ_C2_VIRTUAL_CHANNEL_SHIFT 0 -#define DMA_RQ_C2_LOOP_END_SHIFT 16 - -/* - * The following defines are for the flags in the source and destination words - * of the on-chip generic DMA requestor. - */ -#define DMA_RQ_SD_ADDRESS_MASK 0x0000FFFF -#define DMA_RQ_SD_MEMORY_ID_MASK 0x000F0000 -#define DMA_RQ_SD_SP_PARAM_ADDR 0x00000000 -#define DMA_RQ_SD_SP_SAMPLE_ADDR 0x00010000 -#define DMA_RQ_SD_SP_PROGRAM_ADDR 0x00020000 -#define DMA_RQ_SD_SP_DEBUG_ADDR 0x00030000 -#define DMA_RQ_SD_OMNIMEM_ADDR 0x000E0000 -#define DMA_RQ_SD_END_FLAG 0x40000000 -#define DMA_RQ_SD_ERROR_FLAG 0x80000000 -#define DMA_RQ_SD_ADDRESS_SHIFT 0 - -/* - * The following defines are for the flags in the page map address word of the - * on-chip generic DMA requestor. - */ -#define DMA_RQ_PMA_LOOP_THIRD_PAGE_ENTRY_MASK 0x00000FF8 -#define DMA_RQ_PMA_PAGE_TABLE_MASK 0xFFFFF000 -#define DMA_RQ_PMA_LOOP_THIRD_PAGE_ENTRY_SHIFT 3 -#define DMA_RQ_PMA_PAGE_TABLE_SHIFT 12 - -#define BA1_VARIDEC_BUF_1 0x000 - -#define BA1_PDTC 0x0c0 /* BA1_PLAY_DMA_TRANSACTION_COUNT_REG */ -#define BA1_PFIE 0x0c4 /* BA1_PLAY_FORMAT_&_INTERRUPT_ENABLE_REG */ -#define BA1_PBA 0x0c8 /* BA1_PLAY_BUFFER_ADDRESS */ -#define BA1_PVOL 0x0f8 /* BA1_PLAY_VOLUME_REG */ -#define BA1_PSRC 0x288 /* BA1_PLAY_SAMPLE_RATE_CORRECTION_REG */ -#define BA1_PCTL 0x2a4 /* BA1_PLAY_CONTROL_REG */ -#define BA1_PPI 0x2b4 /* BA1_PLAY_PHASE_INCREMENT_REG */ - -#define BA1_CCTL 0x064 /* BA1_CAPTURE_CONTROL_REG */ -#define BA1_CIE 0x104 /* BA1_CAPTURE_INTERRUPT_ENABLE_REG */ -#define BA1_CBA 0x10c /* BA1_CAPTURE_BUFFER_ADDRESS */ -#define BA1_CSRC 0x2c8 /* BA1_CAPTURE_SAMPLE_RATE_CORRECTION_REG */ -#define BA1_CCI 0x2d8 /* BA1_CAPTURE_COEFFICIENT_INCREMENT_REG */ -#define BA1_CD 0x2e0 /* BA1_CAPTURE_DELAY_REG */ -#define BA1_CPI 0x2f4 /* BA1_CAPTURE_PHASE_INCREMENT_REG */ -#define BA1_CVOL 0x2f8 /* BA1_CAPTURE_VOLUME_REG */ - -#define BA1_CFG1 0x134 /* BA1_CAPTURE_FRAME_GROUP_1_REG */ -#define BA1_CFG2 0x138 /* BA1_CAPTURE_FRAME_GROUP_2_REG */ -#define BA1_CCST 0x13c /* BA1_CAPTURE_CONSTANT_REG */ -#define BA1_CSPB 0x340 /* BA1_CAPTURE_SPB_ADDRESS */ - -/* - * - */ - -#define CS461X_MODE_OUTPUT (1<<0) /* MIDI UART - output */ -#define CS461X_MODE_INPUT (1<<1) /* MIDI UART - input */ - -//**************************************************************************** -// -// The following define the offsets of the AC97 shadow registers, which appear -// as a virtual extension to the base address register zero memory range. -// -//**************************************************************************** -#define AC97_REG_OFFSET_MASK 0x0000007EL -#define AC97_CODEC_NUMBER_MASK 0x00003000L - -#define BA0_AC97_RESET 0x00001000L -#define BA0_AC97_MASTER_VOLUME 0x00001002L -#define BA0_AC97_HEADPHONE_VOLUME 0x00001004L -#define BA0_AC97_MASTER_VOLUME_MONO 0x00001006L -#define BA0_AC97_MASTER_TONE 0x00001008L -#define BA0_AC97_PC_BEEP_VOLUME 0x0000100AL -#define BA0_AC97_PHONE_VOLUME 0x0000100CL -#define BA0_AC97_MIC_VOLUME 0x0000100EL -#define BA0_AC97_LINE_IN_VOLUME 0x00001010L -#define BA0_AC97_CD_VOLUME 0x00001012L -#define BA0_AC97_VIDEO_VOLUME 0x00001014L -#define BA0_AC97_AUX_VOLUME 0x00001016L -#define BA0_AC97_PCM_OUT_VOLUME 0x00001018L -#define BA0_AC97_RECORD_SELECT 0x0000101AL -#define BA0_AC97_RECORD_GAIN 0x0000101CL -#define BA0_AC97_RECORD_GAIN_MIC 0x0000101EL -#define BA0_AC97_GENERAL_PURPOSE 0x00001020L -#define BA0_AC97_3D_CONTROL 0x00001022L -#define BA0_AC97_MODEM_RATE 0x00001024L -#define BA0_AC97_POWERDOWN 0x00001026L -#define BA0_AC97_EXT_AUDIO_ID 0x00001028L -#define BA0_AC97_EXT_AUDIO_POWER 0x0000102AL -#define BA0_AC97_PCM_FRONT_DAC_RATE 0x0000102CL -#define BA0_AC97_PCM_SURR_DAC_RATE 0x0000102EL -#define BA0_AC97_PCM_LFE_DAC_RATE 0x00001030L -#define BA0_AC97_PCM_LR_ADC_RATE 0x00001032L -#define BA0_AC97_MIC_ADC_RATE 0x00001034L -#define BA0_AC97_6CH_VOL_C_LFE 0x00001036L -#define BA0_AC97_6CH_VOL_SURROUND 0x00001038L -#define BA0_AC97_RESERVED_3A 0x0000103AL -#define BA0_AC97_EXT_MODEM_ID 0x0000103CL -#define BA0_AC97_EXT_MODEM_POWER 0x0000103EL -#define BA0_AC97_LINE1_CODEC_RATE 0x00001040L -#define BA0_AC97_LINE2_CODEC_RATE 0x00001042L -#define BA0_AC97_HANDSET_CODEC_RATE 0x00001044L -#define BA0_AC97_LINE1_CODEC_LEVEL 0x00001046L -#define BA0_AC97_LINE2_CODEC_LEVEL 0x00001048L -#define BA0_AC97_HANDSET_CODEC_LEVEL 0x0000104AL -#define BA0_AC97_GPIO_PIN_CONFIG 0x0000104CL -#define BA0_AC97_GPIO_PIN_TYPE 0x0000104EL -#define BA0_AC97_GPIO_PIN_STICKY 0x00001050L -#define BA0_AC97_GPIO_PIN_WAKEUP 0x00001052L -#define BA0_AC97_GPIO_PIN_STATUS 0x00001054L -#define BA0_AC97_MISC_MODEM_AFE_STAT 0x00001056L -#define BA0_AC97_RESERVED_58 0x00001058L -#define BA0_AC97_CRYSTAL_REV_N_FAB_ID 0x0000105AL -#define BA0_AC97_TEST_AND_MISC_CTRL 0x0000105CL -#define BA0_AC97_AC_MODE 0x0000105EL -#define BA0_AC97_MISC_CRYSTAL_CONTROL 0x00001060L -#define BA0_AC97_LINE1_HYPRID_CTRL 0x00001062L -#define BA0_AC97_VENDOR_RESERVED_64 0x00001064L -#define BA0_AC97_VENDOR_RESERVED_66 0x00001066L -#define BA0_AC97_SPDIF_CONTROL 0x00001068L -#define BA0_AC97_VENDOR_RESERVED_6A 0x0000106AL -#define BA0_AC97_VENDOR_RESERVED_6C 0x0000106CL -#define BA0_AC97_VENDOR_RESERVED_6E 0x0000106EL -#define BA0_AC97_VENDOR_RESERVED_70 0x00001070L -#define BA0_AC97_VENDOR_RESERVED_72 0x00001072L -#define BA0_AC97_VENDOR_RESERVED_74 0x00001074L -#define BA0_AC97_CAL_ADDRESS 0x00001076L -#define BA0_AC97_CAL_DATA 0x00001078L -#define BA0_AC97_VENDOR_RESERVED_7A 0x0000107AL -#define BA0_AC97_VENDOR_ID1 0x0000107CL -#define BA0_AC97_VENDOR_ID2 0x0000107EL -#endif /* __CS461X_H */ diff --git a/sound/oss/cs461x_image.h b/sound/oss/cs461x_image.h deleted file mode 100644 index b5c5a46d3423..000000000000 --- a/sound/oss/cs461x_image.h +++ /dev/null @@ -1,322 +0,0 @@ -/**************************************************************************** - * "CWCIMAGE.H"-- For CS46XX. Ver 1.04 - * Copyright 1998-2001 (c) Cirrus Logic Corp. - * Version 1.04 - **************************************************************************** - */ -#ifndef __CS_IMAGE_H -#define __CS_IMAGE_H - -#define CLEAR__COUNT 3 -#define FILL__COUNT 4 -#define BA1__DWORD_SIZE 13*1024+512 - -static struct -{ - unsigned BA1__DestByteOffset; - unsigned BA1__SourceSize; -} ClrStat[CLEAR__COUNT] ={ {0x00000000, 0x00003000 }, - {0x00010000, 0x00003800 }, - {0x00020000, 0x00007000 } }; - -static u32 FillArray1[]={ -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000163,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00200040,0x00008010,0x00000000, -0x00000000,0x80000001,0x00000001,0x00060000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00900080,0x00000173,0x00000000, -0x00000000,0x00000010,0x00800000,0x00900000, -0xf2c0000f,0x00000200,0x00000000,0x00010600, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000163,0x330300c2, -0x06000000,0x00000000,0x80008000,0x80008000, -0x3fc0000f,0x00000301,0x00010400,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00b00000,0x00d0806d,0x330480c3, -0x04800000,0x00000001,0x00800001,0x0000ffff, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x066a0600,0x06350070,0x0000929d,0x929d929d, -0x00000000,0x0000735a,0x00000600,0x00000000, -0x929d735a,0x00000000,0x00010000,0x735a735a, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x0000804f,0x000000c3, -0x05000000,0x00a00010,0x00000000,0x80008000, -0x00000000,0x00000000,0x00000700,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000080,0x00a00000,0x0000809a,0x000000c2, -0x07400000,0x00000000,0x80008000,0xffffffff, -0x00c80028,0x00005555,0x00000000,0x000107a0, -0x00c80028,0x000000c2,0x06800000,0x00000000, -0x06e00080,0x00300000,0x000080bb,0x000000c9, -0x07a00000,0x04000000,0x80008000,0xffffffff, -0x00c80028,0x00005555,0x00000000,0x00000780, -0x00c80028,0x000000c5,0xff800000,0x00000000, -0x00640080,0x00c00000,0x00008197,0x000000c9, -0x07800000,0x04000000,0x80008000,0xffffffff, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x0000805e,0x000000c1, -0x00000000,0x00800000,0x80008000,0x80008000, -0x00020000,0x0000ffff,0x00000000,0x00000000}; - -static u32 FillArray2[]={ -0x929d0600,0x929d929d,0x929d929d,0x929d0000, -0x929d929d,0x929d929d,0x929d929d,0x929d929d, -0x929d929d,0x00100635,0x060b013f,0x00000004, -0x00000001,0x007a0002,0x00000000,0x066e0610, -0x0105929d,0x929d929d,0x929d929d,0x929d929d, -0x929d929d,0xa431ac75,0x0001735a,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0x735a0051, -0x00000000,0x929d929d,0x929d929d,0x929d929d, -0x929d929d,0x929d929d,0x929d929d,0x929d929d, -0x929d929d,0x929d929d,0x00000000,0x06400136, -0x0000270f,0x00010000,0x007a0000,0x00000000, -0x068e0645,0x0105929d,0x929d929d,0x929d929d, -0x929d929d,0x929d929d,0xa431ac75,0x0001735a, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0xa431ac75,0xa431ac75,0xa431ac75,0xa431ac75, -0x735a0100,0x00000000,0x00000000,0x00000000}; - -static u32 FillArray3[]={ -0x00000000,0x00000000,0x00000000,0x00010004}; - -static u32 FillArray4[]={ -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00001705,0x00001400,0x000a411e,0x00001003, -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00009705,0x00001400,0x000a411e,0x00001003, -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00011705,0x00001400,0x000a411e,0x00001003, -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00019705,0x00001400,0x000a411e,0x00001003, -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00021705,0x00001400,0x000a411e,0x00001003, -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00029705,0x00001400,0x000a411e,0x00001003, -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00031705,0x00001400,0x000a411e,0x00001003, -0x00040730,0x00001002,0x000f619e,0x00001003, -0x00039705,0x00001400,0x000a411e,0x00001003, -0x000fe19e,0x00001003,0x0009c730,0x00001003, -0x0008e19c,0x00001003,0x000083c1,0x00093040, -0x00098730,0x00001002,0x000ee19e,0x00001003, -0x00009705,0x00001400,0x000a211e,0x00001003, -0x00098730,0x00001002,0x000ee19e,0x00001003, -0x00011705,0x00001400,0x000a211e,0x00001003, -0x00098730,0x00001002,0x000ee19e,0x00001003, -0x00019705,0x00001400,0x000a211e,0x00001003, -0x00098730,0x00001002,0x000ee19e,0x00001003, -0x00021705,0x00001400,0x000a211e,0x00001003, -0x00098730,0x00001002,0x000ee19e,0x00001003, -0x00029705,0x00001400,0x000a211e,0x00001003, -0x00098730,0x00001002,0x000ee19e,0x00001003, -0x00031705,0x00001400,0x000a211e,0x00001003, -0x00098730,0x00001002,0x000ee19e,0x00001003, -0x00039705,0x00001400,0x000a211e,0x00001003, -0x0000a730,0x00001008,0x000e2730,0x00001002, -0x0000a731,0x00001002,0x0000a731,0x00001002, -0x0000a731,0x00001002,0x0000a731,0x00001002, -0x0000a731,0x00001002,0x0000a731,0x00001002, -0x00000000,0x00000000,0x000f619c,0x00001003, -0x0007f801,0x000c0000,0x00000037,0x00001000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x000c0000,0x00000000,0x00000000, -0x0000373c,0x00001000,0x00000000,0x00000000, -0x000ee19c,0x00001003,0x0007f801,0x000c0000, -0x00000037,0x00001000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x0000273c,0x00001000, -0x00000033,0x00001000,0x000e679e,0x00001003, -0x00007705,0x00001400,0x000ac71e,0x00001003, -0x00087fc1,0x000c3be0,0x0007f801,0x000c0000, -0x00000037,0x00001000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x0000a730,0x00001003, -0x00000033,0x00001000,0x0007f801,0x000c0000, -0x00000037,0x00001000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x000c0000, -0x00000032,0x00001000,0x0000273d,0x00001000, -0x0004a730,0x00001003,0x00000f41,0x00097140, -0x0000a841,0x0009b240,0x0000a0c1,0x0009f040, -0x0001c641,0x00093540,0x0001cec1,0x0009b5c0, -0x00000000,0x00000000,0x0001bf05,0x0003fc40, -0x00002725,0x000aa400,0x00013705,0x00093a00, -0x0000002e,0x0009d6c0,0x00038630,0x00001004, -0x0004ef0a,0x000eb785,0x0003fc8a,0x00000000, -0x00000000,0x000c70e0,0x0007d182,0x0002c640, -0x00000630,0x00001004,0x000799b8,0x0002c6c0, -0x00031705,0x00092240,0x00039f05,0x000932c0, -0x0003520a,0x00000000,0x00040731,0x0000100b, -0x00010705,0x000b20c0,0x00000000,0x000eba44, -0x00032108,0x000c60c4,0x00065208,0x000c2917, -0x000406b0,0x00001007,0x00012f05,0x00036880, -0x0002818e,0x000c0000,0x0004410a,0x00000000, -0x00040630,0x00001007,0x00029705,0x000c0000, -0x00000000,0x00000000,0x00003fc1,0x0003fc40, -0x000037c1,0x00091b40,0x00003fc1,0x000911c0, -0x000037c1,0x000957c0,0x00003fc1,0x000951c0, -0x000037c1,0x00000000,0x00003fc1,0x000991c0, -0x000037c1,0x00000000,0x00003fc1,0x0009d1c0, -0x000037c1,0x00000000,0x0001ccc1,0x000915c0, -0x0001c441,0x0009d800,0x0009cdc1,0x00091240, -0x0001c541,0x00091d00,0x0009cfc1,0x00095240, -0x0001c741,0x00095c80,0x000e8ca9,0x00099240, -0x000e85ad,0x00095640,0x00069ca9,0x00099d80, -0x000e952d,0x00099640,0x000eaca9,0x0009d6c0, -0x000ea5ad,0x00091a40,0x0006bca9,0x0009de80, -0x000eb52d,0x00095a40,0x000ecca9,0x00099ac0, -0x000ec5ad,0x0009da40,0x000edca9,0x0009d300, -0x000a6e0a,0x00001000,0x000ed52d,0x00091e40, -0x000eeca9,0x00095ec0,0x000ee5ad,0x00099e40, -0x0006fca9,0x00002500,0x000fb208,0x000c59a0, -0x000ef52d,0x0009de40,0x00068ca9,0x000912c1, -0x000683ad,0x00095241,0x00020f05,0x000991c1, -0x00000000,0x00000000,0x00086f88,0x00001000, -0x0009cf81,0x000b5340,0x0009c701,0x000b92c0, -0x0009de81,0x000bd300,0x0009d601,0x000b1700, -0x0001fd81,0x000b9d80,0x0009f501,0x000b57c0, -0x000a0f81,0x000bd740,0x00020701,0x000b5c80, -0x000a1681,0x000b97c0,0x00021601,0x00002500, -0x000a0701,0x000b9b40,0x000a0f81,0x000b1bc0, -0x00021681,0x00002d00,0x00020f81,0x000bd800, -0x000a0701,0x000b5bc0,0x00021601,0x00003500, -0x000a0f81,0x000b5f40,0x000a0701,0x000bdbc0, -0x00021681,0x00003d00,0x00020f81,0x000b1d00, -0x000a0701,0x000b1fc0,0x00021601,0x00020500, -0x00020f81,0x000b1341,0x000a0701,0x000b9fc0, -0x00021681,0x00020d00,0x00020f81,0x000bde80, -0x000a0701,0x000bdfc0,0x00021601,0x00021500, -0x00020f81,0x000b9341,0x00020701,0x000b53c1, -0x00021681,0x00021d00,0x000a0f81,0x000d0380, -0x0000b601,0x000b15c0,0x00007b01,0x00000000, -0x00007b81,0x000bd1c0,0x00007b01,0x00000000, -0x00007b81,0x000b91c0,0x00007b01,0x000b57c0, -0x00007b81,0x000b51c0,0x00007b01,0x000b1b40, -0x00007b81,0x000b11c0,0x00087b01,0x000c3dc0, -0x0007e488,0x000d7e45,0x00000000,0x000d7a44, -0x0007e48a,0x00000000,0x00011f05,0x00084080, -0x00000000,0x00000000,0x00001705,0x000b3540, -0x00008a01,0x000bf040,0x00007081,0x000bb5c0, -0x00055488,0x00000000,0x0000d482,0x0003fc40, -0x0003fc88,0x00000000,0x0001e401,0x000b3a00, -0x0001ec81,0x000bd6c0,0x0004ef08,0x000eb784, -0x000c86b0,0x00001007,0x00008281,0x000bb240, -0x0000b801,0x000b7140,0x00007888,0x00000000, -0x0000073c,0x00001000,0x0007f188,0x000c0000, -0x00000000,0x00000000,0x00055288,0x000c555c, -0x0005528a,0x000c0000,0x0009fa88,0x000c5d00, -0x0000fa88,0x00000000,0x00000032,0x00001000, -0x0000073d,0x00001000,0x0007f188,0x000c0000, -0x00000000,0x00000000,0x0008c01c,0x00001003, -0x00002705,0x00001008,0x0008b201,0x000c1392, -0x0000ba01,0x00000000,0x00008731,0x00001400, -0x0004c108,0x000fe0c4,0x00057488,0x00000000, -0x000a6388,0x00001001,0x0008b334,0x000bc141, -0x0003020e,0x00000000,0x000886b0,0x00001008, -0x00003625,0x000c5dfa,0x000a638a,0x00001001, -0x0008020e,0x00001002,0x0008a6b0,0x00001008, -0x0007f301,0x00000000,0x00000000,0x00000000, -0x00002725,0x000a8c40,0x000000ae,0x00000000, -0x000d8630,0x00001008,0x00000000,0x000c74e0, -0x0007d182,0x0002d640,0x000a8630,0x00001008, -0x000799b8,0x0002d6c0,0x0000748a,0x000c3ec5, -0x0007420a,0x000c0000,0x00062208,0x000c4117, -0x00070630,0x00001009,0x00000000,0x000c0000, -0x0001022e,0x00000000,0x0003a630,0x00001009, -0x00000000,0x000c0000,0x00000036,0x00001000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x0002a730,0x00001008,0x0007f801,0x000c0000, -0x00000037,0x00001000,0x00000000,0x00000000, -0x00000000,0x00000000,0x00000000,0x00000000, -0x00000000,0x00000000,0x0002a730,0x00001008, -0x00000033,0x00001000,0x0002a705,0x00001008, -0x00007a01,0x000c0000,0x000e6288,0x000d550a, -0x0006428a,0x00000000,0x00060730,0x0000100a, -0x00000000,0x000c0000,0x00000000,0x00000000, -0x0007aab0,0x00034880,0x00078fb0,0x0000100b, -0x00057488,0x00000000,0x00033b94,0x00081140, -0x000183ae,0x00000000,0x000786b0,0x0000100b, -0x00022f05,0x000c3545,0x0000eb8a,0x00000000, -0x00042731,0x00001003,0x0007aab0,0x00034880, -0x00048fb0,0x0000100a,0x00057488,0x00000000, -0x00033b94,0x00081140,0x000183ae,0x00000000, -0x000806b0,0x0000100b,0x00022f05,0x00000000, -0x00007401,0x00091140,0x00048f05,0x000951c0, -0x00042731,0x00001003,0x0000473d,0x00001000, -0x000f19b0,0x000bbc47,0x00080000,0x000bffc7, -0x000fe19e,0x00001003,0x00000000,0x00000000, -0x0008e19c,0x00001003,0x000083c1,0x00093040, -0x00000f41,0x00097140,0x0000a841,0x0009b240, -0x0000a0c1,0x0009f040,0x0001c641,0x00093540, -0x0001cec1,0x0009b5c0,0x00000000,0x000fdc44, -0x00055208,0x00000000,0x00010705,0x000a2880, -0x0000a23a,0x00093a00,0x0003fc8a,0x000df6c5, -0x0004ef0a,0x000c0000,0x00012f05,0x00036880, -0x00065308,0x000c2997,0x000d86b0,0x0000100a, -0x0004410a,0x000d40c7,0x00000000,0x00000000, -0x00080730,0x00001004,0x00056f0a,0x000ea105, -0x00000000,0x00000000,0x0000473d,0x00001000, -0x000f19b0,0x000bbc47,0x00080000,0x000bffc7, -0x0000273d,0x00001000,0x00000000,0x000eba44, -0x00048f05,0x0000f440,0x00007401,0x0000f7c0, -0x00000734,0x00001000,0x00010705,0x000a6880, -0x00006a88,0x000c75c4,0x00000000,0x000e5084, -0x00000000,0x000eba44,0x00087401,0x000e4782, -0x00000734,0x00001000,0x00010705,0x000a6880, -0x00006a88,0x000c75c4,0x0007c108,0x000c0000, -0x0007e721,0x000bed40,0x00005f25,0x000badc0, -0x0003ba97,0x000beb80,0x00065590,0x000b2e00, -0x00033217,0x00003ec0,0x00065590,0x000b8e40, -0x0003ed80,0x000491c0,0x00073fb0,0x00074c80, -0x000283a0,0x0000100c,0x000ee388,0x00042970, -0x00008301,0x00021ef2,0x000b8f14,0x0000000f, -0x000c4d8d,0x0000001b,0x000d6dc2,0x000e06c6, -0x000032ac,0x000c3916,0x0004edc2,0x00074c80, -0x00078898,0x00001000,0x00038894,0x00000032, -0x000c4d8d,0x00092e1b,0x000d6dc2,0x000e06c6, -0x0004edc2,0x000c1956,0x0000722c,0x00034a00, -0x00041705,0x0009ed40,0x00058730,0x00001400, -0x000d7488,0x000c3a00,0x00048f05,0x00000000}; - -static struct -{ u32 Offset; - u32 Size; - u32 *pFill; -} FillStat[FILL__COUNT] = { - {0x00000000, sizeof(FillArray1), FillArray1}, - {0x00001800, sizeof(FillArray2), FillArray2}, - {0x000137f0, sizeof(FillArray3), FillArray3}, - {0x00020000, sizeof(FillArray4), FillArray4} - }; - - -#endif diff --git a/sound/oss/cs46xx.c b/sound/oss/cs46xx.c deleted file mode 100644 index 2a1f0d9ac968..000000000000 --- a/sound/oss/cs46xx.c +++ /dev/null @@ -1,5444 +0,0 @@ -/* - * Crystal SoundFusion CS46xx driver - * - * Copyright 1998-2001 Cirrus Logic Corporation - * - * Copyright 1999-2000 Jaroslav Kysela - * Copyright 2000 Alan Cox - * - * The core of this code is taken from the ALSA project driver by - * Jaroslav. Please send Jaroslav the credit for the driver and - * report bugs in this port to - * - * 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. - * Current maintainers: - * Cirrus Logic Corporation, Thomas Woller (tw) - * - * Nils Faerber (nf) - * - * Thanks to David Pollard for testing. - * - * Changes: - * 20000909-nf Changed cs_read, cs_write and drain_dac - * 20001025-tw Separate Playback/Capture structs and buffers. - * Added Scatter/Gather support for Playback. - * Added Capture. - * 20001027-nf Port to kernel 2.4.0-test9, some clean-ups - * Start of powermanagement support (CS46XX_PM). - * 20001128-tw Add module parm for default buffer order. - * added DMA_GFP flag to kmalloc dma buffer allocs. - * backfill silence to eliminate stuttering on - * underruns. - * 20001201-tw add resyncing of swptr on underruns. - * 20001205-tw-nf fixed GETOSPACE ioctl() after open() - * 20010113-tw patch from Hans Grobler general cleanup. - * 20010117-tw 2.4.0 pci cleanup, wrapper code for 2.2.16-2.4.0 - * 20010118-tw basic PM support for 2.2.16+ and 2.4.0/2.4.2. - * 20010228-dh patch from David Huggins - cs_update_ptr recursion. - * 20010409-tw add hercules game theatre XP amp code. - * 20010420-tw cleanup powerdown/up code. - * 20010521-tw eliminate pops, and fixes for powerdown. - * 20010525-tw added fixes for thinkpads with powerdown logic. - * 20010723-sh patch from Horms (Simon Horman) - - * SOUND_PCM_READ_BITS returns bits as set in driver - * rather than a logical or of the possible values. - * Various ioctls handle the case where the device - * is open for reading or writing but not both better. - * - * Status: - * Playback/Capture supported from 8k-48k. - * 16Bit Signed LE & 8Bit Unsigned, with Mono or Stereo supported. - * - * APM/PM - 2.2.x APM is enabled and functioning fine. APM can also - * be enabled for 2.4.x by modifying the CS46XX_ACPI_SUPPORT macro - * definition. - * - * Hercules Game Theatre XP - the EGPIO2 pin controls the external Amp, - * so, use the drain/polarity to enable. - * hercules_egpio_disable set to 1, will force a 0 to EGPIODR. - * - * VTB Santa Cruz - the GPIO7/GPIO8 on the Secondary Codec control - * the external amplifier for the "back" speakers, since we do not - * support the secondary codec then this external amp is also not - * turned on. - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include "cs46xxpm.h" -#include "cs46xx_wrapper-24.h" -#include "cs461x.h" - -/* MIDI buffer sizes */ -#define CS_MIDIINBUF 500 -#define CS_MIDIOUTBUF 500 - -#define ADC_RUNNING 1 -#define DAC_RUNNING 2 - -#define CS_FMT_16BIT 1 /* These are fixed in fact */ -#define CS_FMT_STEREO 2 -#define CS_FMT_MASK 3 - -#define CS_TYPE_ADC 1 -#define CS_TYPE_DAC 2 - -#define CS_TRUE 1 -#define CS_FALSE 0 - -#define CS_INC_USE_COUNT(m) (atomic_inc(m)) -#define CS_DEC_USE_COUNT(m) (atomic_dec(m)) -#define CS_DEC_AND_TEST(m) (atomic_dec_and_test(m)) -#define CS_IN_USE(m) (atomic_read(m) != 0) - -#define CS_DBGBREAKPOINT {__asm__("INT $3");} -/* - * CS461x definitions - */ - -#define CS461X_BA0_SIZE 0x2000 -#define CS461X_BA1_DATA0_SIZE 0x3000 -#define CS461X_BA1_DATA1_SIZE 0x3800 -#define CS461X_BA1_PRG_SIZE 0x7000 -#define CS461X_BA1_REG_SIZE 0x0100 - -#define GOF_PER_SEC 200 - -#define CSDEBUG_INTERFACE 1 -#define CSDEBUG 1 -/* - * Turn on/off debugging compilation by using 1/0 respectively for CSDEBUG - * - * - * CSDEBUG is usual mode is set to 1, then use the - * cs_debuglevel and cs_debugmask to turn on or off debugging. - * Debug level of 1 has been defined to be kernel errors and info - * that should be printed on any released driver. - */ -#if CSDEBUG -#define CS_DBGOUT(mask,level,x) if ((cs_debuglevel >= (level)) && ((mask) & cs_debugmask)) {x;} -#else -#define CS_DBGOUT(mask,level,x) -#endif -/* - * cs_debugmask areas - */ -#define CS_INIT 0x00000001 /* initialization and probe functions */ -#define CS_ERROR 0x00000002 /* tmp debugging bit placeholder */ -#define CS_INTERRUPT 0x00000004 /* interrupt handler (separate from all other) */ -#define CS_FUNCTION 0x00000008 /* enter/leave functions */ -#define CS_WAVE_WRITE 0x00000010 /* write information for wave */ -#define CS_WAVE_READ 0x00000020 /* read information for wave */ -#define CS_MIDI_WRITE 0x00000040 /* write information for midi */ -#define CS_MIDI_READ 0x00000080 /* read information for midi */ -#define CS_MPU401_WRITE 0x00000100 /* write information for mpu401 */ -#define CS_MPU401_READ 0x00000200 /* read information for mpu401 */ -#define CS_OPEN 0x00000400 /* all open functions in the driver */ -#define CS_RELEASE 0x00000800 /* all release functions in the driver */ -#define CS_PARMS 0x00001000 /* functional and operational parameters */ -#define CS_IOCTL 0x00002000 /* ioctl (non-mixer) */ -#define CS_PM 0x00004000 /* PM */ -#define CS_TMP 0x10000000 /* tmp debug mask bit */ - -#define CS_IOCTL_CMD_SUSPEND 0x1 // suspend -#define CS_IOCTL_CMD_RESUME 0x2 // resume - -#if CSDEBUG -static unsigned long cs_debuglevel = 1; /* levels range from 1-9 */ -module_param(cs_debuglevel, ulong, 0644); -static unsigned long cs_debugmask = CS_INIT | CS_ERROR; /* use CS_DBGOUT with various mask values */ -module_param(cs_debugmask, ulong, 0644); -#endif -static unsigned long hercules_egpio_disable; /* if non-zero set all EGPIO to 0 */ -module_param(hercules_egpio_disable, ulong, 0); -static unsigned long initdelay = 700; /* PM delay in millisecs */ -module_param(initdelay, ulong, 0); -static unsigned long powerdown = -1; /* turn on/off powerdown processing in driver */ -module_param(powerdown, ulong, 0); -#define DMABUF_DEFAULTORDER 3 -static unsigned long defaultorder = DMABUF_DEFAULTORDER; -module_param(defaultorder, ulong, 0); - -static int external_amp; -module_param(external_amp, bool, 0); -static int thinkpad; -module_param(thinkpad, bool, 0); - -/* -* set the powerdown module parm to 0 to disable all -* powerdown. also set thinkpad to 1 to disable powerdown, -* but also to enable the clkrun functionality. -*/ -static unsigned cs_powerdown = 1; -static unsigned cs_laptop_wait = 1; - -/* An instance of the 4610 channel */ -struct cs_channel -{ - int used; - int num; - void *state; -}; - -#define CS46XX_MAJOR_VERSION "1" -#define CS46XX_MINOR_VERSION "28" - -#ifdef __ia64__ -#define CS46XX_ARCH "64" //architecture key -#else -#define CS46XX_ARCH "32" //architecture key -#endif - -static struct list_head cs46xx_devs = { &cs46xx_devs, &cs46xx_devs }; - -/* magic numbers to protect our data structures */ -#define CS_CARD_MAGIC 0x43525553 /* "CRUS" */ -#define CS_STATE_MAGIC 0x4c4f4749 /* "LOGI" */ -#define NR_HW_CH 3 - -/* maxinum number of AC97 codecs connected, AC97 2.0 defined 4 */ -#define NR_AC97 2 - -static const unsigned sample_size[] = { 1, 2, 2, 4 }; -static const unsigned sample_shift[] = { 0, 1, 1, 2 }; - -/* "software" or virtual channel, an instance of opened /dev/dsp */ -struct cs_state { - unsigned int magic; - struct cs_card *card; /* Card info */ - - /* single open lock mechanism, only used for recording */ - struct mutex open_mutex; - wait_queue_head_t open_wait; - - /* file mode */ - mode_t open_mode; - - /* virtual channel number */ - int virt; - - struct dmabuf { - /* wave sample stuff */ - unsigned int rate; - unsigned char fmt, enable; - - /* hardware channel */ - struct cs_channel *channel; - int pringbuf; /* Software ring slot */ - void *pbuf; /* 4K hardware DMA buffer */ - - /* OSS buffer management stuff */ - void *rawbuf; - dma_addr_t dma_handle; - unsigned buforder; - unsigned numfrag; - unsigned fragshift; - unsigned divisor; - unsigned type; - void *tmpbuff; /* tmp buffer for sample conversions */ - dma_addr_t dmaaddr; - dma_addr_t dmaaddr_tmpbuff; - unsigned buforder_tmpbuff; /* Log base 2 of size in bytes.. */ - - /* our buffer acts like a circular ring */ - unsigned hwptr; /* where dma last started, updated by update_ptr */ - unsigned swptr; /* where driver last clear/filled, updated by read/write */ - int count; /* bytes to be comsumed or been generated by dma machine */ - unsigned total_bytes; /* total bytes dmaed by hardware */ - unsigned blocks; /* total blocks */ - - unsigned error; /* number of over/underruns */ - unsigned underrun; /* underrun pending before next write has occurred */ - 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; - unsigned fragsamples; - - /* OSS stuff */ - unsigned mapped:1; - unsigned ready:1; - unsigned endcleared:1; - unsigned SGok:1; - unsigned update_flag; - unsigned ossfragshift; - int ossmaxfrags; - unsigned subdivision; - } dmabuf; - /* Guard against mmap/write/read races */ - struct mutex sem; -}; - -struct cs_card { - struct cs_channel channel[2]; - unsigned int magic; - - /* We keep cs461x cards in a linked list */ - struct cs_card *next; - - /* The cs461x has a certain amount of cross channel interaction - so we use a single per card lock */ - spinlock_t lock; - - /* Keep AC97 sane */ - spinlock_t ac97_lock; - - /* mixer use count */ - atomic_t mixer_use_cnt; - - /* PCI device stuff */ - struct pci_dev *pci_dev; - struct list_head list; - - unsigned int pctl, cctl; /* Hardware DMA flag sets */ - - /* soundcore stuff */ - int dev_audio; - int dev_midi; - - /* structures for abstraction of hardware facilities, codecs, banks and channels*/ - struct ac97_codec *ac97_codec[NR_AC97]; - struct cs_state *states[2]; - - u16 ac97_features; - - int amplifier; /* Amplifier control */ - void (*amplifier_ctrl)(struct cs_card *, int); - void (*amp_init)(struct cs_card *); - - int active; /* Active clocking */ - void (*active_ctrl)(struct cs_card *, int); - - /* hardware resources */ - unsigned long ba0_addr; - unsigned long ba1_addr; - u32 irq; - - /* mappings */ - void __iomem *ba0; - union - { - struct - { - u8 __iomem *data0; - u8 __iomem *data1; - u8 __iomem *pmem; - u8 __iomem *reg; - } name; - u8 __iomem *idx[4]; - } ba1; - - /* Function support */ - struct cs_channel *(*alloc_pcm_channel)(struct cs_card *); - struct cs_channel *(*alloc_rec_pcm_channel)(struct cs_card *); - void (*free_pcm_channel)(struct cs_card *, int chan); - - /* /dev/midi stuff */ - struct { - unsigned ird, iwr, icnt; - unsigned ord, owr, ocnt; - wait_queue_head_t open_wait; - wait_queue_head_t iwait; - wait_queue_head_t owait; - spinlock_t lock; - unsigned char ibuf[CS_MIDIINBUF]; - unsigned char obuf[CS_MIDIOUTBUF]; - mode_t open_mode; - struct mutex open_mutex; - } midi; - struct cs46xx_pm pm; -}; - -static int cs_open_mixdev(struct inode *inode, struct file *file); -static int cs_release_mixdev(struct inode *inode, struct file *file); -static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg); -static int cs_hardware_init(struct cs_card *card); -static int cs46xx_powerup(struct cs_card *card, unsigned int type); -static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspendflag); -static void cs461x_clear_serial_FIFOs(struct cs_card *card, int type); -#ifdef CONFIG_PM -static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state); -static int cs46xx_resume_tbl(struct pci_dev *pcidev); -#endif - -#if CSDEBUG - -/* DEBUG ROUTINES */ - -#define SOUND_MIXER_CS_GETDBGLEVEL _SIOWR('M',120, int) -#define SOUND_MIXER_CS_SETDBGLEVEL _SIOWR('M',121, int) -#define SOUND_MIXER_CS_GETDBGMASK _SIOWR('M',122, int) -#define SOUND_MIXER_CS_SETDBGMASK _SIOWR('M',123, int) -#define SOUND_MIXER_CS_APM _SIOWR('M',124, int) - -static void printioctl(unsigned int x) -{ - unsigned int i; - unsigned char vidx; - /* these values are incorrect for the ac97 driver, fix. - * Index of mixtable1[] member is Device ID - * and must be <= SOUND_MIXER_NRDEVICES. - * Value of array member is index into s->mix.vol[] - */ - static const unsigned char mixtable1[SOUND_MIXER_NRDEVICES] = { - [SOUND_MIXER_PCM] = 1, /* voice */ - [SOUND_MIXER_LINE1] = 2, /* AUX */ - [SOUND_MIXER_CD] = 3, /* CD */ - [SOUND_MIXER_LINE] = 4, /* Line */ - [SOUND_MIXER_SYNTH] = 5, /* FM */ - [SOUND_MIXER_MIC] = 6, /* Mic */ - [SOUND_MIXER_SPEAKER] = 7, /* Speaker */ - [SOUND_MIXER_RECLEV] = 8, /* Recording level */ - [SOUND_MIXER_VOLUME] = 9 /* Master Volume */ - }; - - switch (x) { - case SOUND_MIXER_CS_GETDBGMASK: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_CS_GETDBGMASK: ") ); - break; - case SOUND_MIXER_CS_GETDBGLEVEL: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_CS_GETDBGLEVEL: ") ); - break; - case SOUND_MIXER_CS_SETDBGMASK: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_CS_SETDBGMASK: ") ); - break; - case SOUND_MIXER_CS_SETDBGLEVEL: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_CS_SETDBGLEVEL: ") ); - break; - case OSS_GETVERSION: - CS_DBGOUT(CS_IOCTL, 4, printk("OSS_GETVERSION: ") ); - break; - case SNDCTL_DSP_SYNC: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SYNC: ") ); - break; - case SNDCTL_DSP_SETDUPLEX: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SETDUPLEX: ") ); - break; - case SNDCTL_DSP_GETCAPS: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETCAPS: ") ); - break; - case SNDCTL_DSP_RESET: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_RESET: ") ); - break; - case SNDCTL_DSP_SPEED: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SPEED: ") ); - break; - case SNDCTL_DSP_STEREO: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_STEREO: ") ); - break; - case SNDCTL_DSP_CHANNELS: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_CHANNELS: ") ); - break; - case SNDCTL_DSP_GETFMTS: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETFMTS: ") ); - break; - case SNDCTL_DSP_SETFMT: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SETFMT: ") ); - break; - case SNDCTL_DSP_POST: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_POST: ") ); - break; - case SNDCTL_DSP_GETTRIGGER: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETTRIGGER: ") ); - break; - case SNDCTL_DSP_SETTRIGGER: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SETTRIGGER: ") ); - break; - case SNDCTL_DSP_GETOSPACE: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETOSPACE: ") ); - break; - case SNDCTL_DSP_GETISPACE: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETISPACE: ") ); - break; - case SNDCTL_DSP_NONBLOCK: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_NONBLOCK: ") ); - break; - case SNDCTL_DSP_GETODELAY: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETODELAY: ") ); - break; - case SNDCTL_DSP_GETIPTR: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETIPTR: ") ); - break; - case SNDCTL_DSP_GETOPTR: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETOPTR: ") ); - break; - case SNDCTL_DSP_GETBLKSIZE: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_GETBLKSIZE: ") ); - break; - case SNDCTL_DSP_SETFRAGMENT: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SETFRAGMENT: ") ); - break; - case SNDCTL_DSP_SUBDIVIDE: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SUBDIVIDE: ") ); - break; - case SOUND_PCM_READ_RATE: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_PCM_READ_RATE: ") ); - break; - case SOUND_PCM_READ_CHANNELS: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_PCM_READ_CHANNELS: ") ); - break; - case SOUND_PCM_READ_BITS: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_PCM_READ_BITS: ") ); - break; - case SOUND_PCM_WRITE_FILTER: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_PCM_WRITE_FILTER: ") ); - break; - case SNDCTL_DSP_SETSYNCRO: - CS_DBGOUT(CS_IOCTL, 4, printk("SNDCTL_DSP_SETSYNCRO: ") ); - break; - case SOUND_PCM_READ_FILTER: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_PCM_READ_FILTER: ") ); - break; - case SOUND_MIXER_PRIVATE1: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_PRIVATE1: ") ); - break; - case SOUND_MIXER_PRIVATE2: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_PRIVATE2: ") ); - break; - case SOUND_MIXER_PRIVATE3: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_PRIVATE3: ") ); - break; - case SOUND_MIXER_PRIVATE4: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_PRIVATE4: ") ); - break; - case SOUND_MIXER_PRIVATE5: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_PRIVATE5: ") ); - break; - case SOUND_MIXER_INFO: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_INFO: ") ); - break; - case SOUND_OLD_MIXER_INFO: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_OLD_MIXER_INFO: ") ); - break; - default: - switch (_IOC_NR(x)) { - case SOUND_MIXER_VOLUME: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_VOLUME: ") ); - break; - case SOUND_MIXER_SPEAKER: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_SPEAKER: ") ); - break; - case SOUND_MIXER_RECLEV: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_RECLEV: ") ); - break; - case SOUND_MIXER_MIC: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_MIC: ") ); - break; - case SOUND_MIXER_SYNTH: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_SYNTH: ") ); - break; - case SOUND_MIXER_RECSRC: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_RECSRC: ") ); - break; - case SOUND_MIXER_DEVMASK: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_DEVMASK: ") ); - break; - case SOUND_MIXER_RECMASK: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_RECMASK: ") ); - break; - case SOUND_MIXER_STEREODEVS: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_STEREODEVS: ") ); - break; - case SOUND_MIXER_CAPS: - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_CAPS:") ); - break; - default: - i = _IOC_NR(x); - if (i >= SOUND_MIXER_NRDEVICES || !(vidx = mixtable1[i])) { - CS_DBGOUT(CS_IOCTL, 4, printk("UNKNOWN IOCTL: 0x%.8x NR=%d ",x,i) ); - } else { - CS_DBGOUT(CS_IOCTL, 4, printk("SOUND_MIXER_IOCTL AC9x: 0x%.8x NR=%d ", - x,i)); - } - break; - } - } - CS_DBGOUT(CS_IOCTL, 4, printk("command = 0x%x IOC_NR=%d\n",x, _IOC_NR(x)) ); -} -#endif - -/* - * common I/O routines - */ - -static void cs461x_poke(struct cs_card *codec, unsigned long reg, unsigned int val) -{ - writel(val, codec->ba1.idx[(reg >> 16) & 3] + (reg & 0xffff)); -} - -static unsigned int cs461x_peek(struct cs_card *codec, unsigned long reg) -{ - return readl(codec->ba1.idx[(reg >> 16) & 3] + (reg & 0xffff)); -} - -static void cs461x_pokeBA0(struct cs_card *codec, unsigned long reg, unsigned int val) -{ - writel(val, codec->ba0 + reg); -} - -static unsigned int cs461x_peekBA0(struct cs_card *codec, unsigned long reg) -{ - return readl(codec->ba0 + reg); -} - - -static u16 cs_ac97_get(struct ac97_codec *dev, u8 reg); -static void cs_ac97_set(struct ac97_codec *dev, u8 reg, u16 data); - -static struct cs_channel *cs_alloc_pcm_channel(struct cs_card *card) -{ - if (card->channel[1].used == 1) - return NULL; - card->channel[1].used = 1; - card->channel[1].num = 1; - return &card->channel[1]; -} - -static struct cs_channel *cs_alloc_rec_pcm_channel(struct cs_card *card) -{ - if (card->channel[0].used == 1) - return NULL; - card->channel[0].used = 1; - card->channel[0].num = 0; - return &card->channel[0]; -} - -static void cs_free_pcm_channel(struct cs_card *card, int channel) -{ - card->channel[channel].state = NULL; - card->channel[channel].used = 0; -} - -/* - * setup a divisor value to help with conversion from - * 16bit Stereo, down to 8bit stereo/mono or 16bit mono. - * assign a divisor of 1 if using 16bit Stereo as that is - * the only format that the static image will capture. - */ -static void cs_set_divisor(struct dmabuf *dmabuf) -{ - if (dmabuf->type == CS_TYPE_DAC) - dmabuf->divisor = 1; - else if (!(dmabuf->fmt & CS_FMT_STEREO) && - (dmabuf->fmt & CS_FMT_16BIT)) - dmabuf->divisor = 2; - else if ((dmabuf->fmt & CS_FMT_STEREO) && - !(dmabuf->fmt & CS_FMT_16BIT)) - dmabuf->divisor = 2; - else if (!(dmabuf->fmt & CS_FMT_STEREO) && - !(dmabuf->fmt & CS_FMT_16BIT)) - dmabuf->divisor = 4; - else - dmabuf->divisor = 1; - - CS_DBGOUT(CS_PARMS | CS_FUNCTION, 8, printk( - "cs46xx: cs_set_divisor()- %s %d\n", - (dmabuf->type == CS_TYPE_ADC) ? "ADC" : "DAC", - dmabuf->divisor) ); -} - -/* -* mute some of the more prevalent registers to avoid popping. -*/ -static void cs_mute(struct cs_card *card, int state) -{ - struct ac97_codec *dev = card->ac97_codec[0]; - - CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: cs_mute()+ %s\n", - (state == CS_TRUE) ? "Muting" : "UnMuting")); - - if (state == CS_TRUE) { - /* - * fix pops when powering up on thinkpads - */ - card->pm.u32AC97_master_volume = (u32)cs_ac97_get( dev, - (u8)BA0_AC97_MASTER_VOLUME); - card->pm.u32AC97_headphone_volume = (u32)cs_ac97_get(dev, - (u8)BA0_AC97_HEADPHONE_VOLUME); - card->pm.u32AC97_master_volume_mono = (u32)cs_ac97_get(dev, - (u8)BA0_AC97_MASTER_VOLUME_MONO); - card->pm.u32AC97_pcm_out_volume = (u32)cs_ac97_get(dev, - (u8)BA0_AC97_PCM_OUT_VOLUME); - - cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME, 0x8000); - cs_ac97_set(dev, (u8)BA0_AC97_HEADPHONE_VOLUME, 0x8000); - cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME_MONO, 0x8000); - cs_ac97_set(dev, (u8)BA0_AC97_PCM_OUT_VOLUME, 0x8000); - } else { - cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME, card->pm.u32AC97_master_volume); - cs_ac97_set(dev, (u8)BA0_AC97_HEADPHONE_VOLUME, card->pm.u32AC97_headphone_volume); - cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME_MONO, card->pm.u32AC97_master_volume_mono); - cs_ac97_set(dev, (u8)BA0_AC97_PCM_OUT_VOLUME, card->pm.u32AC97_pcm_out_volume); - } - CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: cs_mute()-\n")); -} - -/* set playback sample rate */ -static unsigned int cs_set_dac_rate(struct cs_state * state, unsigned int rate) -{ - struct dmabuf *dmabuf = &state->dmabuf; - unsigned int tmp1, tmp2; - unsigned int phiIncr; - unsigned int correctionPerGOF, correctionPerSec; - unsigned long flags; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_set_dac_rate()+ %d\n",rate) ); - - /* - * Compute the values used to drive the actual sample rate conversion. - * The following formulas are being computed, using inline assembly - * since we need to use 64 bit arithmetic to compute the values: - * - * phiIncr = floor((Fs,in * 2^26) / Fs,out) - * correctionPerGOF = floor((Fs,in * 2^26 - Fs,out * phiIncr) / - * GOF_PER_SEC) - * ulCorrectionPerSec = Fs,in * 2^26 - Fs,out * phiIncr -M - * GOF_PER_SEC * correctionPerGOF - * - * i.e. - * - * phiIncr:other = dividend:remainder((Fs,in * 2^26) / Fs,out) - * correctionPerGOF:correctionPerSec = - * dividend:remainder(ulOther / GOF_PER_SEC) - */ - tmp1 = rate << 16; - phiIncr = tmp1 / 48000; - tmp1 -= phiIncr * 48000; - tmp1 <<= 10; - phiIncr <<= 10; - tmp2 = tmp1 / 48000; - phiIncr += tmp2; - tmp1 -= tmp2 * 48000; - correctionPerGOF = tmp1 / GOF_PER_SEC; - tmp1 -= correctionPerGOF * GOF_PER_SEC; - correctionPerSec = tmp1; - - /* - * Fill in the SampleRateConverter control block. - */ - spin_lock_irqsave(&state->card->lock, flags); - cs461x_poke(state->card, BA1_PSRC, - ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); - cs461x_poke(state->card, BA1_PPI, phiIncr); - spin_unlock_irqrestore(&state->card->lock, flags); - dmabuf->rate = rate; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_set_dac_rate()- %d\n",rate) ); - return rate; -} - -/* set recording sample rate */ -static unsigned int cs_set_adc_rate(struct cs_state *state, unsigned int rate) -{ - struct dmabuf *dmabuf = &state->dmabuf; - struct cs_card *card = state->card; - unsigned int phiIncr, coeffIncr, tmp1, tmp2; - unsigned int correctionPerGOF, correctionPerSec, initialDelay; - unsigned int frameGroupLength, cnt; - unsigned long flags; - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_set_adc_rate()+ %d\n",rate) ); - - /* - * We can only decimate by up to a factor of 1/9th the hardware rate. - * Correct the value if an attempt is made to stray outside that limit. - */ - if ((rate * 9) < 48000) - rate = 48000 / 9; - - /* - * We cannot capture at at rate greater than the Input Rate (48000). - * Return an error if an attempt is made to stray outside that limit. - */ - if (rate > 48000) - rate = 48000; - - /* - * Compute the values used to drive the actual sample rate conversion. - * The following formulas are being computed, using inline assembly - * since we need to use 64 bit arithmetic to compute the values: - * - * coeffIncr = -floor((Fs,out * 2^23) / Fs,in) - * phiIncr = floor((Fs,in * 2^26) / Fs,out) - * correctionPerGOF = floor((Fs,in * 2^26 - Fs,out * phiIncr) / - * GOF_PER_SEC) - * correctionPerSec = Fs,in * 2^26 - Fs,out * phiIncr - - * GOF_PER_SEC * correctionPerGOF - * initialDelay = ceil((24 * Fs,in) / Fs,out) - * - * i.e. - * - * coeffIncr = neg(dividend((Fs,out * 2^23) / Fs,in)) - * phiIncr:ulOther = dividend:remainder((Fs,in * 2^26) / Fs,out) - * correctionPerGOF:correctionPerSec = - * dividend:remainder(ulOther / GOF_PER_SEC) - * initialDelay = dividend(((24 * Fs,in) + Fs,out - 1) / Fs,out) - */ - tmp1 = rate << 16; - coeffIncr = tmp1 / 48000; - tmp1 -= coeffIncr * 48000; - tmp1 <<= 7; - coeffIncr <<= 7; - coeffIncr += tmp1 / 48000; - coeffIncr ^= 0xFFFFFFFF; - coeffIncr++; - tmp1 = 48000 << 16; - phiIncr = tmp1 / rate; - tmp1 -= phiIncr * rate; - tmp1 <<= 10; - phiIncr <<= 10; - tmp2 = tmp1 / rate; - phiIncr += tmp2; - tmp1 -= tmp2 * rate; - correctionPerGOF = tmp1 / GOF_PER_SEC; - tmp1 -= correctionPerGOF * GOF_PER_SEC; - correctionPerSec = tmp1; - initialDelay = ((48000 * 24) + rate - 1) / rate; - - /* - * Fill in the VariDecimate control block. - */ - spin_lock_irqsave(&card->lock, flags); - cs461x_poke(card, BA1_CSRC, - ((correctionPerSec << 16) & 0xFFFF0000) | (correctionPerGOF & 0xFFFF)); - cs461x_poke(card, BA1_CCI, coeffIncr); - cs461x_poke(card, BA1_CD, - (((BA1_VARIDEC_BUF_1 + (initialDelay << 2)) << 16) & 0xFFFF0000) | 0x80); - cs461x_poke(card, BA1_CPI, phiIncr); - spin_unlock_irqrestore(&card->lock, flags); - - /* - * Figure out the frame group length for the write back task. Basically, - * this is just the factors of 24000 (2^6*3*5^3) that are not present in - * the output sample rate. - */ - frameGroupLength = 1; - for (cnt = 2; cnt <= 64; cnt *= 2) { - if (((rate / cnt) * cnt) != rate) - frameGroupLength *= 2; - } - if (((rate / 3) * 3) != rate) { - frameGroupLength *= 3; - } - for (cnt = 5; cnt <= 125; cnt *= 5) { - if (((rate / cnt) * cnt) != rate) - frameGroupLength *= 5; - } - - /* - * Fill in the WriteBack control block. - */ - spin_lock_irqsave(&card->lock, flags); - cs461x_poke(card, BA1_CFG1, frameGroupLength); - cs461x_poke(card, BA1_CFG2, (0x00800000 | frameGroupLength)); - cs461x_poke(card, BA1_CCST, 0x0000FFFF); - cs461x_poke(card, BA1_CSPB, ((65536 * rate) / 24000)); - cs461x_poke(card, (BA1_CSPB + 4), 0x0000FFFF); - spin_unlock_irqrestore(&card->lock, flags); - dmabuf->rate = rate; - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_set_adc_rate()- %d\n",rate) ); - return rate; -} - -/* prepare channel attributes for playback */ -static void cs_play_setup(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - struct cs_card *card = state->card; - unsigned int tmp, Count, playFormat; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_play_setup()+\n") ); - cs461x_poke(card, BA1_PVOL, 0x80008000); - if (!dmabuf->SGok) - cs461x_poke(card, BA1_PBA, virt_to_bus(dmabuf->pbuf)); - - Count = 4; - playFormat=cs461x_peek(card, BA1_PFIE); - if ((dmabuf->fmt & CS_FMT_STEREO)) { - playFormat &= ~DMA_RQ_C2_AC_MONO_TO_STEREO; - Count *= 2; - } else - playFormat |= DMA_RQ_C2_AC_MONO_TO_STEREO; - - if ((dmabuf->fmt & CS_FMT_16BIT)) { - playFormat &= ~(DMA_RQ_C2_AC_8_TO_16_BIT - | DMA_RQ_C2_AC_SIGNED_CONVERT); - Count *= 2; - } else - playFormat |= (DMA_RQ_C2_AC_8_TO_16_BIT - | DMA_RQ_C2_AC_SIGNED_CONVERT); - - cs461x_poke(card, BA1_PFIE, playFormat); - - tmp = cs461x_peek(card, BA1_PDTC); - tmp &= 0xfffffe00; - cs461x_poke(card, BA1_PDTC, tmp | --Count); - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_play_setup()-\n") ); -} - -static struct InitStruct -{ - u32 off; - u32 val; -} InitArray[] = { {0x00000040, 0x3fc0000f}, - {0x0000004c, 0x04800000}, - - {0x000000b3, 0x00000780}, - {0x000000b7, 0x00000000}, - {0x000000bc, 0x07800000}, - - {0x000000cd, 0x00800000}, - }; - -/* - * "SetCaptureSPValues()" -- Initialize record task values before each - * capture startup. - */ -static void SetCaptureSPValues(struct cs_card *card) -{ - unsigned i, offset; - CS_DBGOUT(CS_FUNCTION, 8, printk("cs46xx: SetCaptureSPValues()+\n") ); - for (i = 0; i < sizeof(InitArray) / sizeof(struct InitStruct); i++) { - offset = InitArray[i].off*4; /* 8bit to 32bit offset value */ - cs461x_poke(card, offset, InitArray[i].val ); - } - CS_DBGOUT(CS_FUNCTION, 8, printk("cs46xx: SetCaptureSPValues()-\n") ); -} - -/* prepare channel attributes for recording */ -static void cs_rec_setup(struct cs_state *state) -{ - struct cs_card *card = state->card; - struct dmabuf *dmabuf = &state->dmabuf; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_rec_setup()+\n")); - SetCaptureSPValues(card); - - /* - * set the attenuation to 0dB - */ - cs461x_poke(card, BA1_CVOL, 0x80008000); - - /* - * set the physical address of the capture buffer into the SP - */ - cs461x_poke(card, BA1_CBA, virt_to_bus(dmabuf->rawbuf)); - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_rec_setup()-\n") ); -} - - -/* get current playback/recording dma buffer pointer (byte offset from LBA), - called with spinlock held! */ - -static inline unsigned cs_get_dma_addr(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - u32 offset; - - if ( (!(dmabuf->enable & DAC_RUNNING)) && - (!(dmabuf->enable & ADC_RUNNING) ) ) - { - CS_DBGOUT(CS_ERROR, 2, printk( - "cs46xx: ERROR cs_get_dma_addr(): not enabled \n") ); - return 0; - } - - /* - * granularity is byte boundary, good part. - */ - if (dmabuf->enable & DAC_RUNNING) - offset = cs461x_peek(state->card, BA1_PBA); - else /* ADC_RUNNING must be set */ - offset = cs461x_peek(state->card, BA1_CBA); - - CS_DBGOUT(CS_PARMS | CS_FUNCTION, 9, - printk("cs46xx: cs_get_dma_addr() %d\n",offset) ); - offset = (u32)bus_to_virt((unsigned long)offset) - (u32)dmabuf->rawbuf; - CS_DBGOUT(CS_PARMS | CS_FUNCTION, 8, - printk("cs46xx: cs_get_dma_addr()- %d\n",offset) ); - return offset; -} - -static void resync_dma_ptrs(struct cs_state *state) -{ - struct dmabuf *dmabuf; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: resync_dma_ptrs()+ \n") ); - if (state) { - dmabuf = &state->dmabuf; - dmabuf->hwptr=dmabuf->swptr = 0; - dmabuf->pringbuf = 0; - } - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: resync_dma_ptrs()- \n") ); -} - -/* Stop recording (lock held) */ -static inline void __stop_adc(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - struct cs_card *card = state->card; - unsigned int tmp; - - dmabuf->enable &= ~ADC_RUNNING; - - tmp = cs461x_peek(card, BA1_CCTL); - tmp &= 0xFFFF0000; - cs461x_poke(card, BA1_CCTL, tmp ); -} - -static void stop_adc(struct cs_state *state) -{ - unsigned long flags; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: stop_adc()+ \n") ); - spin_lock_irqsave(&state->card->lock, flags); - __stop_adc(state); - spin_unlock_irqrestore(&state->card->lock, flags); - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: stop_adc()- \n") ); -} - -static void start_adc(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - struct cs_card *card = state->card; - unsigned long flags; - unsigned int tmp; - - spin_lock_irqsave(&card->lock, flags); - if (!(dmabuf->enable & ADC_RUNNING) && - ((dmabuf->mapped || dmabuf->count < (signed)dmabuf->dmasize) - && dmabuf->ready) && - ((card->pm.flags & CS46XX_PM_IDLE) || - (card->pm.flags & CS46XX_PM_RESUMED)) ) - { - dmabuf->enable |= ADC_RUNNING; - cs_set_divisor(dmabuf); - tmp = cs461x_peek(card, BA1_CCTL); - tmp &= 0xFFFF0000; - tmp |= card->cctl; - CS_DBGOUT(CS_FUNCTION, 2, printk( - "cs46xx: start_adc() poke 0x%x \n",tmp) ); - cs461x_poke(card, BA1_CCTL, tmp); - } - spin_unlock_irqrestore(&card->lock, flags); -} - -/* stop playback (lock held) */ -static inline void __stop_dac(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - struct cs_card *card = state->card; - unsigned int tmp; - - dmabuf->enable &= ~DAC_RUNNING; - - tmp=cs461x_peek(card, BA1_PCTL); - tmp&=0xFFFF; - cs461x_poke(card, BA1_PCTL, tmp); -} - -static void stop_dac(struct cs_state *state) -{ - unsigned long flags; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: stop_dac()+ \n") ); - spin_lock_irqsave(&state->card->lock, flags); - __stop_dac(state); - spin_unlock_irqrestore(&state->card->lock, flags); - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: stop_dac()- \n") ); -} - -static void start_dac(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - struct cs_card *card = state->card; - unsigned long flags; - int tmp; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: start_dac()+ \n") ); - spin_lock_irqsave(&card->lock, flags); - if (!(dmabuf->enable & DAC_RUNNING) && - ((dmabuf->mapped || dmabuf->count > 0) && dmabuf->ready) && - ((card->pm.flags & CS46XX_PM_IDLE) || - (card->pm.flags & CS46XX_PM_RESUMED)) ) - { - dmabuf->enable |= DAC_RUNNING; - tmp = cs461x_peek(card, BA1_PCTL); - tmp &= 0xFFFF; - tmp |= card->pctl; - CS_DBGOUT(CS_PARMS, 6, printk( - "cs46xx: start_dac() poke card=%p tmp=0x%.08x addr=%p \n", - card, (unsigned)tmp, - card->ba1.idx[(BA1_PCTL >> 16) & 3]+(BA1_PCTL&0xffff) ) ); - cs461x_poke(card, BA1_PCTL, tmp); - } - spin_unlock_irqrestore(&card->lock, flags); - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: start_dac()- \n") ); -} - -#define DMABUF_MINORDER 1 - -/* - * allocate DMA buffer, playback and recording buffers are separate. - */ -static int alloc_dmabuf(struct cs_state *state) -{ - - struct cs_card *card=state->card; - struct dmabuf *dmabuf = &state->dmabuf; - void *rawbuf = NULL; - void *tmpbuff = NULL; - int order; - struct page *map, *mapend; - unsigned long df; - - dmabuf->ready = dmabuf->mapped = 0; - dmabuf->SGok = 0; -/* -* check for order within limits, but do not overwrite value. -*/ - if ((defaultorder > 1) && (defaultorder < 12)) - df = defaultorder; - else - df = 2; - - for (order = df; order >= DMABUF_MINORDER; order--) - if ((rawbuf = (void *)pci_alloc_consistent( - card->pci_dev, PAGE_SIZE << order, &dmabuf->dmaaddr))) - break; - if (!rawbuf) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_ERR - "cs46xx: alloc_dmabuf(): unable to allocate rawbuf\n")); - return -ENOMEM; - } - dmabuf->buforder = order; - dmabuf->rawbuf = rawbuf; - // Now mark the pages as reserved; otherwise the - // remap_pfn_range() in cs46xx_mmap doesn't work. - // 1. get index to last page in mem_map array for rawbuf. - mapend = virt_to_page(dmabuf->rawbuf + - (PAGE_SIZE << dmabuf->buforder) - 1); - - // 2. mark each physical page in range as 'reserved'. - for (map = virt_to_page(dmabuf->rawbuf); map <= mapend; map++) - cs4x_mem_map_reserve(map); - - CS_DBGOUT(CS_PARMS, 9, printk("cs46xx: alloc_dmabuf(): allocated %ld (order = %d) bytes at %p\n", - PAGE_SIZE << order, order, rawbuf) ); - -/* -* only allocate the conversion buffer for the ADC -*/ - if (dmabuf->type == CS_TYPE_DAC) { - dmabuf->tmpbuff = NULL; - dmabuf->buforder_tmpbuff = 0; - return 0; - } -/* - * now the temp buffer for 16/8 conversions - */ - - tmpbuff = (void *) pci_alloc_consistent( - card->pci_dev, PAGE_SIZE << order, &dmabuf->dmaaddr_tmpbuff); - - if (!tmpbuff) - return -ENOMEM; - CS_DBGOUT(CS_PARMS, 9, printk("cs46xx: allocated %ld (order = %d) bytes at %p\n", - PAGE_SIZE << order, order, tmpbuff) ); - - dmabuf->tmpbuff = tmpbuff; - dmabuf->buforder_tmpbuff = order; - - // Now mark the pages as reserved; otherwise the - // remap_pfn_range() in cs46xx_mmap doesn't work. - // 1. get index to last page in mem_map array for rawbuf. - mapend = virt_to_page(dmabuf->tmpbuff + - (PAGE_SIZE << dmabuf->buforder_tmpbuff) - 1); - - // 2. mark each physical page in range as 'reserved'. - for (map = virt_to_page(dmabuf->tmpbuff); map <= mapend; map++) - cs4x_mem_map_reserve(map); - return 0; -} - -/* free DMA buffer */ -static void dealloc_dmabuf(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - struct page *map, *mapend; - - if (dmabuf->rawbuf) { - // Undo prog_dmabuf()'s marking the pages as reserved - mapend = virt_to_page(dmabuf->rawbuf + - (PAGE_SIZE << dmabuf->buforder) - 1); - for (map = virt_to_page(dmabuf->rawbuf); map <= mapend; map++) - cs4x_mem_map_unreserve(map); - free_dmabuf(state->card, dmabuf); - } - - if (dmabuf->tmpbuff) { - // Undo prog_dmabuf()'s marking the pages as reserved - mapend = virt_to_page(dmabuf->tmpbuff + - (PAGE_SIZE << dmabuf->buforder_tmpbuff) - 1); - for (map = virt_to_page(dmabuf->tmpbuff); map <= mapend; map++) - cs4x_mem_map_unreserve(map); - free_dmabuf2(state->card, dmabuf); - } - - dmabuf->rawbuf = NULL; - dmabuf->tmpbuff = NULL; - dmabuf->mapped = dmabuf->ready = 0; - dmabuf->SGok = 0; -} - -static int __prog_dmabuf(struct cs_state *state) -{ - struct dmabuf *dmabuf = &state->dmabuf; - unsigned long flags; - unsigned long allocated_pages, allocated_bytes; - unsigned long tmp1, tmp2, fmt=0; - unsigned long *ptmp = (unsigned long *) dmabuf->pbuf; - unsigned long SGarray[9], nSGpages=0; - int ret; - - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf()+ \n")); -/* - * check for CAPTURE and use only non-sg for initial release - */ - if (dmabuf->type == CS_TYPE_ADC) { - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf() ADC\n")); - /* - * add in non-sg support for capture. - */ - spin_lock_irqsave(&state->card->lock, flags); - /* add code to reset the rawbuf memory. TRW */ - resync_dma_ptrs(state); - dmabuf->total_bytes = dmabuf->blocks = 0; - dmabuf->count = dmabuf->error = dmabuf->underrun = 0; - - dmabuf->SGok = 0; - - spin_unlock_irqrestore(&state->card->lock, flags); - - /* allocate DMA buffer if not allocated yet */ - if (!dmabuf->rawbuf || !dmabuf->tmpbuff) - if ((ret = alloc_dmabuf(state))) - return ret; - /* - * static image only supports 16Bit signed, stereo - hard code fmt - */ - fmt = CS_FMT_16BIT | CS_FMT_STEREO; - - dmabuf->numfrag = 2; - dmabuf->fragsize = 2048; - dmabuf->fragsamples = 2048 >> sample_shift[fmt]; - dmabuf->dmasize = 4096; - dmabuf->fragshift = 11; - - memset(dmabuf->rawbuf, (fmt & CS_FMT_16BIT) ? 0 : 0x80, - dmabuf->dmasize); - memset(dmabuf->tmpbuff, (fmt & CS_FMT_16BIT) ? 0 : 0x80, - PAGE_SIZE<buforder_tmpbuff); - - /* - * Now set up the ring - */ - - spin_lock_irqsave(&state->card->lock, flags); - cs_rec_setup(state); - spin_unlock_irqrestore(&state->card->lock, flags); - - /* set the ready flag for the dma buffer */ - dmabuf->ready = 1; - - CS_DBGOUT(CS_PARMS, 4, printk( - "cs46xx: prog_dmabuf(): CAPTURE rate=%d fmt=0x%x numfrag=%d " - "fragsize=%d dmasize=%d\n", - dmabuf->rate, dmabuf->fmt, dmabuf->numfrag, - dmabuf->fragsize, dmabuf->dmasize) ); - - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf()- 0 \n")); - return 0; - } else if (dmabuf->type == CS_TYPE_DAC) { - /* - * Must be DAC - */ - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf() DAC\n")); - spin_lock_irqsave(&state->card->lock, flags); - resync_dma_ptrs(state); - dmabuf->total_bytes = dmabuf->blocks = 0; - dmabuf->count = dmabuf->error = dmabuf->underrun = 0; - - dmabuf->SGok = 0; - - spin_unlock_irqrestore(&state->card->lock, flags); - - /* allocate DMA buffer if not allocated yet */ - if (!dmabuf->rawbuf) - if ((ret = alloc_dmabuf(state))) - return ret; - - allocated_pages = 1 << dmabuf->buforder; - allocated_bytes = allocated_pages*PAGE_SIZE; - - if (allocated_pages < 2) { - CS_DBGOUT(CS_FUNCTION, 4, printk( - "cs46xx: prog_dmabuf() Error: allocated_pages too small (%d)\n", - (unsigned)allocated_pages)); - return -ENOMEM; - } - - /* Use all the pages allocated, fragsize 4k. */ - /* Use 'pbuf' for S/G page map table. */ - dmabuf->SGok = 1; /* Use S/G. */ - - nSGpages = allocated_bytes/4096; /* S/G pages always 4k. */ - - /* Set up S/G variables. */ - *ptmp = virt_to_bus(dmabuf->rawbuf); - *(ptmp + 1) = 0x00000008; - for (tmp1 = 1; tmp1 < nSGpages; tmp1++) { - *(ptmp + 2 * tmp1) = virt_to_bus((dmabuf->rawbuf) + 4096 * tmp1); - if (tmp1 == nSGpages - 1) - tmp2 = 0xbfff0000; - else - tmp2 = 0x80000000 + 8 * (tmp1 + 1); - *(ptmp + 2 * tmp1 + 1) = tmp2; - } - SGarray[0] = 0x82c0200d; - SGarray[1] = 0xffff0000; - SGarray[2] = *ptmp; - SGarray[3] = 0x00010600; - SGarray[4] = *(ptmp+2); - SGarray[5] = 0x80000010; - SGarray[6] = *ptmp; - SGarray[7] = *(ptmp+2); - SGarray[8] = (virt_to_bus(dmabuf->pbuf) & 0xffff000) | 0x10; - - if (dmabuf->SGok) { - dmabuf->numfrag = nSGpages; - dmabuf->fragsize = 4096; - dmabuf->fragsamples = 4096 >> sample_shift[dmabuf->fmt]; - dmabuf->fragshift = 12; - dmabuf->dmasize = dmabuf->numfrag * 4096; - } else { - SGarray[0] = 0xf2c0000f; - SGarray[1] = 0x00000200; - SGarray[2] = 0; - SGarray[3] = 0x00010600; - SGarray[4]=SGarray[5]=SGarray[6]=SGarray[7]=SGarray[8] = 0; - dmabuf->numfrag = 2; - dmabuf->fragsize = 2048; - dmabuf->fragsamples = 2048 >> sample_shift[dmabuf->fmt]; - dmabuf->dmasize = 4096; - dmabuf->fragshift = 11; - } - for (tmp1 = 0; tmp1 < sizeof(SGarray) / 4; tmp1++) - cs461x_poke(state->card, BA1_PDTC+tmp1 * 4, SGarray[tmp1]); - - memset(dmabuf->rawbuf, (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, - dmabuf->dmasize); - - /* - * Now set up the ring - */ - - spin_lock_irqsave(&state->card->lock, flags); - cs_play_setup(state); - spin_unlock_irqrestore(&state->card->lock, flags); - - /* set the ready flag for the dma buffer */ - dmabuf->ready = 1; - - CS_DBGOUT(CS_PARMS, 4, printk( - "cs46xx: prog_dmabuf(): PLAYBACK rate=%d fmt=0x%x numfrag=%d " - "fragsize=%d dmasize=%d\n", - dmabuf->rate, dmabuf->fmt, dmabuf->numfrag, - dmabuf->fragsize, dmabuf->dmasize) ); - - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf()- \n")); - return 0; - } else { - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: prog_dmabuf()- Invalid Type %d\n", - dmabuf->type)); - } - return 1; -} - -static int prog_dmabuf(struct cs_state *state) -{ - int ret; - - mutex_lock(&state->sem); - ret = __prog_dmabuf(state); - mutex_unlock(&state->sem); - - return ret; -} - -static void cs_clear_tail(struct cs_state *state) -{ -} - -static int drain_dac(struct cs_state *state, int nonblock) -{ - DECLARE_WAITQUEUE(wait, current); - struct dmabuf *dmabuf = &state->dmabuf; - struct cs_card *card=state->card; - unsigned long flags; - unsigned long tmo; - int count; - - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: drain_dac()+ \n")); - if (dmabuf->mapped || !dmabuf->ready) - { - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: drain_dac()- 0, not ready\n")); - return 0; - } - - add_wait_queue(&dmabuf->wait, &wait); - for (;;) { - /* It seems that we have to set the current state to TASK_INTERRUPTIBLE - every time to make the process really go to sleep */ - current->state = TASK_INTERRUPTIBLE; - - spin_lock_irqsave(&state->card->lock, flags); - count = dmabuf->count; - spin_unlock_irqrestore(&state->card->lock, flags); - - if (count <= 0) - break; - - if (signal_pending(current)) - break; - - if (nonblock) { - remove_wait_queue(&dmabuf->wait, &wait); - current->state = TASK_RUNNING; - return -EBUSY; - } - - tmo = (dmabuf->dmasize * HZ) / dmabuf->rate; - tmo >>= sample_shift[dmabuf->fmt]; - tmo += (2048*HZ)/dmabuf->rate; - - if (!schedule_timeout(tmo ? tmo : 1) && tmo){ - printk(KERN_ERR "cs46xx: drain_dac, dma timeout? %d\n", count); - break; - } - } - remove_wait_queue(&dmabuf->wait, &wait); - current->state = TASK_RUNNING; - if (signal_pending(current)) { - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: drain_dac()- -ERESTARTSYS\n")); - /* - * set to silence and let that clear the fifos. - */ - cs461x_clear_serial_FIFOs(card, CS_TYPE_DAC); - return -ERESTARTSYS; - } - - CS_DBGOUT(CS_FUNCTION, 4, printk("cs46xx: drain_dac()- 0\n")); - return 0; -} - - -/* update buffer manangement pointers, especially, dmabuf->count and dmabuf->hwptr */ -static void cs_update_ptr(struct cs_card *card, int wake) -{ - struct cs_state *state; - struct dmabuf *dmabuf; - unsigned hwptr; - int diff; - - /* error handling and process wake up for ADC */ - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - if (dmabuf->enable & ADC_RUNNING) { - /* update hardware pointer */ - hwptr = cs_get_dma_addr(state); - - diff = (dmabuf->dmasize + hwptr - dmabuf->hwptr) % dmabuf->dmasize; - CS_DBGOUT(CS_PARMS, 9, printk( - "cs46xx: cs_update_ptr()+ ADC hwptr=%d diff=%d\n", - hwptr,diff) ); - dmabuf->hwptr = hwptr; - dmabuf->total_bytes += diff; - dmabuf->count += diff; - if (dmabuf->count > dmabuf->dmasize) - dmabuf->count = dmabuf->dmasize; - - if (dmabuf->mapped) { - if (wake && dmabuf->count >= (signed)dmabuf->fragsize) - wake_up(&dmabuf->wait); - } else { - if (wake && dmabuf->count > 0) - wake_up(&dmabuf->wait); - } - } - } - -/* - * Now the DAC - */ - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - /* error handling and process wake up for DAC */ - if (dmabuf->enable & DAC_RUNNING) { - /* update hardware pointer */ - hwptr = cs_get_dma_addr(state); - - diff = (dmabuf->dmasize + hwptr - dmabuf->hwptr) % dmabuf->dmasize; - CS_DBGOUT(CS_PARMS, 9, printk( - "cs46xx: cs_update_ptr()+ DAC hwptr=%d diff=%d\n", - hwptr,diff) ); - dmabuf->hwptr = hwptr; - dmabuf->total_bytes += diff; - if (dmabuf->mapped) { - dmabuf->count += diff; - if (wake && dmabuf->count >= (signed)dmabuf->fragsize) - wake_up(&dmabuf->wait); - /* - * other drivers use fragsize, but don't see any sense - * in that, since dmasize is the buffer asked for - * via mmap. - */ - if (dmabuf->count > dmabuf->dmasize) - dmabuf->count &= dmabuf->dmasize-1; - } else { - dmabuf->count -= diff; - /* - * backfill with silence and clear out the last - * "diff" number of bytes. - */ - if (hwptr >= diff) { - memset(dmabuf->rawbuf + hwptr - diff, - (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, diff); - } else { - memset(dmabuf->rawbuf, - (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, - (unsigned)hwptr); - memset((char *)dmabuf->rawbuf + - dmabuf->dmasize + hwptr - diff, - (dmabuf->fmt & CS_FMT_16BIT) ? 0 : 0x80, - diff - hwptr); - } - - if (dmabuf->count < 0 || dmabuf->count > dmabuf->dmasize) { - CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO - "cs46xx: ERROR DAC count<0 or count > dmasize (%d)\n", - dmabuf->count)); - /* - * buffer underrun or buffer overrun, reset the - * count of bytes written back to 0. - */ - if (dmabuf->count < 0) - dmabuf->underrun = 1; - dmabuf->count = 0; - dmabuf->error++; - } - if (wake && dmabuf->count < (signed)dmabuf->dmasize / 2) - wake_up(&dmabuf->wait); - } - } - } -} - - -/* hold spinlock for the following! */ -static void cs_handle_midi(struct cs_card *card) -{ - unsigned char ch; - int wake; - unsigned temp1; - - wake = 0; - while (!(cs461x_peekBA0(card, BA0_MIDSR) & MIDSR_RBE)) { - ch = cs461x_peekBA0(card, BA0_MIDRP); - if (card->midi.icnt < CS_MIDIINBUF) { - card->midi.ibuf[card->midi.iwr] = ch; - card->midi.iwr = (card->midi.iwr + 1) % CS_MIDIINBUF; - card->midi.icnt++; - } - wake = 1; - } - if (wake) - wake_up(&card->midi.iwait); - wake = 0; - while (!(cs461x_peekBA0(card, BA0_MIDSR) & MIDSR_TBF) && card->midi.ocnt > 0) { - temp1 = ( card->midi.obuf[card->midi.ord] ) & 0x000000ff; - cs461x_pokeBA0(card, BA0_MIDWP,temp1); - card->midi.ord = (card->midi.ord + 1) % CS_MIDIOUTBUF; - card->midi.ocnt--; - if (card->midi.ocnt < CS_MIDIOUTBUF-16) - wake = 1; - } - if (wake) - wake_up(&card->midi.owait); -} - -static irqreturn_t cs_interrupt(int irq, void *dev_id) -{ - struct cs_card *card = (struct cs_card *)dev_id; - /* Single channel card */ - struct cs_state *recstate = card->channel[0].state; - struct cs_state *playstate = card->channel[1].state; - u32 status; - - CS_DBGOUT(CS_INTERRUPT, 9, printk("cs46xx: cs_interrupt()+ \n")); - - spin_lock(&card->lock); - - status = cs461x_peekBA0(card, BA0_HISR); - - if ((status & 0x7fffffff) == 0) { - cs461x_pokeBA0(card, BA0_HICR, HICR_CHGM|HICR_IEV); - spin_unlock(&card->lock); - return IRQ_HANDLED; /* Might be IRQ_NONE.. */ - } - - /* - * check for playback or capture interrupt only - */ - if (((status & HISR_VC0) && playstate && playstate->dmabuf.ready) || - (((status & HISR_VC1) && recstate && recstate->dmabuf.ready))) { - CS_DBGOUT(CS_INTERRUPT, 8, printk( - "cs46xx: cs_interrupt() interrupt bit(s) set (0x%x)\n",status)); - cs_update_ptr(card, CS_TRUE); - } - - if (status & HISR_MIDI) - cs_handle_midi(card); - - /* clear 'em */ - cs461x_pokeBA0(card, BA0_HICR, HICR_CHGM|HICR_IEV); - spin_unlock(&card->lock); - CS_DBGOUT(CS_INTERRUPT, 9, printk("cs46xx: cs_interrupt()- \n")); - return IRQ_HANDLED; -} - - -/**********************************************************************/ - -static ssize_t cs_midi_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) -{ - struct cs_card *card = file->private_data; - ssize_t ret; - unsigned long flags; - unsigned ptr; - int cnt; - - if (!access_ok(VERIFY_WRITE, buffer, count)) - return -EFAULT; - ret = 0; - while (count > 0) { - spin_lock_irqsave(&card->lock, flags); - ptr = card->midi.ird; - cnt = CS_MIDIINBUF - ptr; - if (card->midi.icnt < cnt) - cnt = card->midi.icnt; - spin_unlock_irqrestore(&card->lock, flags); - if (cnt > count) - cnt = count; - if (cnt <= 0) { - if (file->f_flags & O_NONBLOCK) - return ret ? ret : -EAGAIN; - interruptible_sleep_on(&card->midi.iwait); - if (signal_pending(current)) - return ret ? ret : -ERESTARTSYS; - continue; - } - if (copy_to_user(buffer, card->midi.ibuf + ptr, cnt)) - return ret ? ret : -EFAULT; - ptr = (ptr + cnt) % CS_MIDIINBUF; - spin_lock_irqsave(&card->lock, flags); - card->midi.ird = ptr; - card->midi.icnt -= cnt; - spin_unlock_irqrestore(&card->lock, flags); - count -= cnt; - buffer += cnt; - ret += cnt; - } - return ret; -} - - -static ssize_t cs_midi_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) -{ - struct cs_card *card = file->private_data; - ssize_t ret; - unsigned long flags; - unsigned ptr; - int cnt; - - if (!access_ok(VERIFY_READ, buffer, count)) - return -EFAULT; - ret = 0; - while (count > 0) { - spin_lock_irqsave(&card->lock, flags); - ptr = card->midi.owr; - cnt = CS_MIDIOUTBUF - ptr; - if (card->midi.ocnt + cnt > CS_MIDIOUTBUF) - cnt = CS_MIDIOUTBUF - card->midi.ocnt; - if (cnt <= 0) - cs_handle_midi(card); - spin_unlock_irqrestore(&card->lock, flags); - if (cnt > count) - cnt = count; - if (cnt <= 0) { - if (file->f_flags & O_NONBLOCK) - return ret ? ret : -EAGAIN; - interruptible_sleep_on(&card->midi.owait); - if (signal_pending(current)) - return ret ? ret : -ERESTARTSYS; - continue; - } - if (copy_from_user(card->midi.obuf + ptr, buffer, cnt)) - return ret ? ret : -EFAULT; - ptr = (ptr + cnt) % CS_MIDIOUTBUF; - spin_lock_irqsave(&card->lock, flags); - card->midi.owr = ptr; - card->midi.ocnt += cnt; - spin_unlock_irqrestore(&card->lock, flags); - count -= cnt; - buffer += cnt; - ret += cnt; - spin_lock_irqsave(&card->lock, flags); - cs_handle_midi(card); - spin_unlock_irqrestore(&card->lock, flags); - } - return ret; -} - - -static unsigned int cs_midi_poll(struct file *file, struct poll_table_struct *wait) -{ - struct cs_card *card = file->private_data; - unsigned long flags; - unsigned int mask = 0; - - if (file->f_flags & FMODE_WRITE) - poll_wait(file, &card->midi.owait, wait); - if (file->f_flags & FMODE_READ) - poll_wait(file, &card->midi.iwait, wait); - spin_lock_irqsave(&card->lock, flags); - if (file->f_flags & FMODE_READ) { - if (card->midi.icnt > 0) - mask |= POLLIN | POLLRDNORM; - } - if (file->f_flags & FMODE_WRITE) { - if (card->midi.ocnt < CS_MIDIOUTBUF) - mask |= POLLOUT | POLLWRNORM; - } - spin_unlock_irqrestore(&card->lock, flags); - return mask; -} - - -static int cs_midi_open(struct inode *inode, struct file *file) -{ - unsigned int minor = iminor(inode); - struct cs_card *card = NULL; - unsigned long flags; - struct list_head *entry; - - list_for_each(entry, &cs46xx_devs) { - card = list_entry(entry, struct cs_card, list); - if (card->dev_midi == minor) - break; - } - - if (entry == &cs46xx_devs) - return -ENODEV; - if (!card) { - CS_DBGOUT(CS_FUNCTION | CS_OPEN, 2, printk(KERN_INFO - "cs46xx: cs46xx_midi_open(): Error - unable to find card struct\n")); - return -ENODEV; - } - - file->private_data = card; - /* wait for device to become free */ - mutex_lock(&card->midi.open_mutex); - while (card->midi.open_mode & file->f_mode) { - if (file->f_flags & O_NONBLOCK) { - mutex_unlock(&card->midi.open_mutex); - return -EBUSY; - } - mutex_unlock(&card->midi.open_mutex); - interruptible_sleep_on(&card->midi.open_wait); - if (signal_pending(current)) - return -ERESTARTSYS; - mutex_lock(&card->midi.open_mutex); - } - spin_lock_irqsave(&card->midi.lock, flags); - if (!(card->midi.open_mode & (FMODE_READ | FMODE_WRITE))) { - card->midi.ird = card->midi.iwr = card->midi.icnt = 0; - card->midi.ord = card->midi.owr = card->midi.ocnt = 0; - card->midi.ird = card->midi.iwr = card->midi.icnt = 0; - cs461x_pokeBA0(card, BA0_MIDCR, 0x0000000f); /* Enable xmit, rcv. */ - cs461x_pokeBA0(card, BA0_HICR, HICR_IEV | HICR_CHGM); /* Enable interrupts */ - } - if (file->f_mode & FMODE_READ) - card->midi.ird = card->midi.iwr = card->midi.icnt = 0; - if (file->f_mode & FMODE_WRITE) - card->midi.ord = card->midi.owr = card->midi.ocnt = 0; - spin_unlock_irqrestore(&card->midi.lock, flags); - card->midi.open_mode |= (file->f_mode & (FMODE_READ | FMODE_WRITE)); - mutex_unlock(&card->midi.open_mutex); - return 0; -} - - -static int cs_midi_release(struct inode *inode, struct file *file) -{ - struct cs_card *card = file->private_data; - DECLARE_WAITQUEUE(wait, current); - unsigned long flags; - unsigned count, tmo; - - if (file->f_mode & FMODE_WRITE) { - current->state = TASK_INTERRUPTIBLE; - add_wait_queue(&card->midi.owait, &wait); - for (;;) { - spin_lock_irqsave(&card->midi.lock, flags); - count = card->midi.ocnt; - spin_unlock_irqrestore(&card->midi.lock, flags); - if (count <= 0) - break; - if (signal_pending(current)) - break; - if (file->f_flags & O_NONBLOCK) - break; - tmo = (count * HZ) / 3100; - if (!schedule_timeout(tmo ? : 1) && tmo) - printk(KERN_DEBUG "cs46xx: midi timed out??\n"); - } - remove_wait_queue(&card->midi.owait, &wait); - current->state = TASK_RUNNING; - } - mutex_lock(&card->midi.open_mutex); - card->midi.open_mode &= (~(file->f_mode & (FMODE_READ | FMODE_WRITE))); - mutex_unlock(&card->midi.open_mutex); - wake_up(&card->midi.open_wait); - return 0; -} - -/* - * Midi file operations struct. - */ -static /*const*/ struct file_operations cs_midi_fops = { - CS_OWNER CS_THIS_MODULE - .llseek = no_llseek, - .read = cs_midi_read, - .write = cs_midi_write, - .poll = cs_midi_poll, - .open = cs_midi_open, - .release = cs_midi_release, -}; - -/* - * - * CopySamples copies 16-bit stereo signed samples from the source to the - * destination, possibly converting down to unsigned 8-bit and/or mono. - * count specifies the number of output bytes to write. - * - * Arguments: - * - * dst - Pointer to a destination buffer. - * src - Pointer to a source buffer - * count - The number of bytes to copy into the destination buffer. - * fmt - CS_FMT_16BIT and/or CS_FMT_STEREO bits - * dmabuf - pointer to the dma buffer structure - * - * NOTES: only call this routine if the output desired is not 16 Signed Stereo - * - * - */ -static void CopySamples(char *dst, char *src, int count, unsigned fmt, - struct dmabuf *dmabuf) -{ - s32 s32AudioSample; - s16 *psSrc = (s16 *)src; - s16 *psDst = (s16 *)dst; - u8 *pucDst = (u8 *)dst; - - CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO "cs46xx: CopySamples()+ ") ); - CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO - " dst=%p src=%p count=%d fmt=0x%x\n", - dst,src,count,fmt) ); - - /* - * See if the data should be output as 8-bit unsigned stereo. - */ - if ((fmt & CS_FMT_STEREO) && !(fmt & CS_FMT_16BIT)) { - /* - * Convert each 16-bit signed stereo sample to 8-bit unsigned - * stereo using rounding. - */ - psSrc = (s16 *)src; - count = count / 2; - while (count--) - *(pucDst++) = (u8)(((s16)(*psSrc++) + (s16)0x8000) >> 8); - } - /* - * See if the data should be output at 8-bit unsigned mono. - */ - else if (!(fmt & CS_FMT_STEREO) && !(fmt & CS_FMT_16BIT)) { - /* - * Convert each 16-bit signed stereo sample to 8-bit unsigned - * mono using averaging and rounding. - */ - psSrc = (s16 *)src; - count = count / 2; - while (count--) { - s32AudioSample = ((*psSrc) + (*(psSrc + 1))) / 2 + (s32)0x80; - if (s32AudioSample > 0x7fff) - s32AudioSample = 0x7fff; - *(pucDst++) = (u8)(((s16)s32AudioSample + (s16)0x8000) >> 8); - psSrc += 2; - } - } - /* - * See if the data should be output at 16-bit signed mono. - */ - else if (!(fmt & CS_FMT_STEREO) && (fmt & CS_FMT_16BIT)) { - /* - * Convert each 16-bit signed stereo sample to 16-bit signed - * mono using averaging. - */ - psSrc = (s16 *)src; - count = count / 2; - while (count--) { - *(psDst++) = (s16)((*psSrc) + (*(psSrc + 1))) / 2; - psSrc += 2; - } - } -} - -/* - * cs_copy_to_user() - * replacement for the standard copy_to_user, to allow for a conversion from - * 16 bit to 8 bit and from stereo to mono, if the record conversion is active. - * The current CS46xx/CS4280 static image only records in 16bit unsigned Stereo, - * so we convert from any of the other format combinations. - */ -static unsigned cs_copy_to_user( - struct cs_state *s, - void __user *dest, - void *hwsrc, - unsigned cnt, - unsigned *copied) -{ - struct dmabuf *dmabuf = &s->dmabuf; - void *src = hwsrc; /* default to the standard destination buffer addr */ - - CS_DBGOUT(CS_FUNCTION, 6, printk(KERN_INFO - "cs_copy_to_user()+ fmt=0x%x cnt=%d dest=%p\n", - dmabuf->fmt,(unsigned)cnt,dest) ); - - if (cnt > dmabuf->dmasize) - cnt = dmabuf->dmasize; - if (!cnt) { - *copied = 0; - return 0; - } - if (dmabuf->divisor != 1) { - if (!dmabuf->tmpbuff) { - *copied = cnt / dmabuf->divisor; - return 0; - } - - CopySamples((char *)dmabuf->tmpbuff, (char *)hwsrc, cnt, - dmabuf->fmt, dmabuf); - src = dmabuf->tmpbuff; - cnt = cnt/dmabuf->divisor; - } - if (copy_to_user(dest, src, cnt)) { - CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_ERR - "cs46xx: cs_copy_to_user()- fault dest=%p src=%p cnt=%d\n", - dest,src,cnt)); - *copied = 0; - return -EFAULT; - } - *copied = cnt; - CS_DBGOUT(CS_FUNCTION, 2, printk(KERN_INFO - "cs46xx: cs_copy_to_user()- copied bytes is %d \n",cnt)); - return 0; -} - -/* in this loop, dmabuf.count signifies the amount of data that is waiting to be copied to - the user's buffer. it is filled by the dma machine and drained by this loop. */ -static ssize_t cs_read(struct file *file, char __user *buffer, size_t count, loff_t *ppos) -{ - struct cs_card *card = file->private_data; - struct cs_state *state; - DECLARE_WAITQUEUE(wait, current); - struct dmabuf *dmabuf; - ssize_t ret = 0; - unsigned long flags; - unsigned swptr; - int cnt; - unsigned copied = 0; - - CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4, - printk("cs46xx: cs_read()+ %zd\n",count) ); - state = card->states[0]; - if (!state) - return -ENODEV; - dmabuf = &state->dmabuf; - - if (dmabuf->mapped) - return -ENXIO; - if (!access_ok(VERIFY_WRITE, buffer, count)) - return -EFAULT; - - mutex_lock(&state->sem); - if (!dmabuf->ready && (ret = __prog_dmabuf(state))) - goto out2; - - add_wait_queue(&state->dmabuf.wait, &wait); - while (count > 0) { - while (!(card->pm.flags & CS46XX_PM_IDLE)) { - schedule(); - if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; - goto out; - } - } - spin_lock_irqsave(&state->card->lock, flags); - swptr = dmabuf->swptr; - cnt = dmabuf->dmasize - swptr; - if (dmabuf->count < cnt) - cnt = dmabuf->count; - if (cnt <= 0) - __set_current_state(TASK_INTERRUPTIBLE); - spin_unlock_irqrestore(&state->card->lock, flags); - - if (cnt > (count * dmabuf->divisor)) - cnt = count * dmabuf->divisor; - if (cnt <= 0) { - /* buffer is empty, start the dma machine and wait for data to be - recorded */ - start_adc(state); - if (file->f_flags & O_NONBLOCK) { - if (!ret) - ret = -EAGAIN; - goto out; - } - mutex_unlock(&state->sem); - schedule(); - if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; - goto out; - } - mutex_lock(&state->sem); - if (dmabuf->mapped) { - if (!ret) - ret = -ENXIO; - goto out; - } - continue; - } - - CS_DBGOUT(CS_WAVE_READ, 2, printk(KERN_INFO - "_read() copy_to cnt=%d count=%zd ", cnt,count) ); - CS_DBGOUT(CS_WAVE_READ, 8, printk(KERN_INFO - " .dmasize=%d .count=%d buffer=%p ret=%zd\n", - dmabuf->dmasize,dmabuf->count,buffer,ret)); - - if (cs_copy_to_user(state, buffer, - (char *)dmabuf->rawbuf + swptr, cnt, &copied)) { - if (!ret) - ret = -EFAULT; - goto out; - } - swptr = (swptr + cnt) % dmabuf->dmasize; - spin_lock_irqsave(&card->lock, flags); - dmabuf->swptr = swptr; - dmabuf->count -= cnt; - spin_unlock_irqrestore(&card->lock, flags); - count -= copied; - buffer += copied; - ret += copied; - start_adc(state); - } -out: - remove_wait_queue(&state->dmabuf.wait, &wait); -out2: - mutex_unlock(&state->sem); - set_current_state(TASK_RUNNING); - CS_DBGOUT(CS_WAVE_READ | CS_FUNCTION, 4, - printk("cs46xx: cs_read()- %zd\n",ret) ); - return ret; -} - -/* in this loop, dmabuf.count signifies the amount of data that is waiting to be dma to - the soundcard. it is drained by the dma machine and filled by this loop. */ -static ssize_t cs_write(struct file *file, const char __user *buffer, size_t count, loff_t *ppos) -{ - struct cs_card *card = file->private_data; - struct cs_state *state; - DECLARE_WAITQUEUE(wait, current); - struct dmabuf *dmabuf; - ssize_t ret; - unsigned long flags; - unsigned swptr; - int cnt; - - CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 4, - printk("cs46xx: cs_write called, count = %zd\n", count) ); - state = card->states[1]; - if (!state) - return -ENODEV; - if (!access_ok(VERIFY_READ, buffer, count)) - return -EFAULT; - dmabuf = &state->dmabuf; - - mutex_lock(&state->sem); - if (dmabuf->mapped) { - ret = -ENXIO; - goto out; - } - - if (!dmabuf->ready && (ret = __prog_dmabuf(state))) - goto out; - add_wait_queue(&state->dmabuf.wait, &wait); - ret = 0; -/* -* Start the loop to read from the user's buffer and write to the dma buffer. -* check for PM events and underrun/overrun in the loop. -*/ - while (count > 0) { - while (!(card->pm.flags & CS46XX_PM_IDLE)) { - schedule(); - if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; - goto out; - } - } - spin_lock_irqsave(&state->card->lock, flags); - if (dmabuf->count < 0) { - /* buffer underrun, we are recovering from sleep_on_timeout, - resync hwptr and swptr */ - dmabuf->count = 0; - dmabuf->swptr = dmabuf->hwptr; - } - if (dmabuf->underrun) { - dmabuf->underrun = 0; - dmabuf->hwptr = cs_get_dma_addr(state); - dmabuf->swptr = dmabuf->hwptr; - } - - swptr = dmabuf->swptr; - cnt = dmabuf->dmasize - swptr; - if (dmabuf->count + cnt > dmabuf->dmasize) - cnt = dmabuf->dmasize - dmabuf->count; - if (cnt <= 0) - __set_current_state(TASK_INTERRUPTIBLE); - spin_unlock_irqrestore(&state->card->lock, flags); - - if (cnt > count) - cnt = count; - if (cnt <= 0) { - /* buffer is full, start the dma machine and wait for data to be - played */ - start_dac(state); - if (file->f_flags & O_NONBLOCK) { - if (!ret) - ret = -EAGAIN; - goto out; - } - mutex_unlock(&state->sem); - schedule(); - if (signal_pending(current)) { - if (!ret) - ret = -ERESTARTSYS; - goto out; - } - mutex_lock(&state->sem); - if (dmabuf->mapped) { - if (!ret) - ret = -ENXIO; - goto out; - } - continue; - } - if (copy_from_user(dmabuf->rawbuf + swptr, buffer, cnt)) { - if (!ret) - ret = -EFAULT; - goto out; - } - spin_lock_irqsave(&state->card->lock, flags); - swptr = (swptr + cnt) % dmabuf->dmasize; - dmabuf->swptr = swptr; - dmabuf->count += cnt; - if (dmabuf->count > dmabuf->dmasize) { - CS_DBGOUT(CS_WAVE_WRITE | CS_ERROR, 2, printk( - "cs46xx: cs_write() d->count > dmasize - resetting\n")); - dmabuf->count = dmabuf->dmasize; - } - dmabuf->endcleared = 0; - spin_unlock_irqrestore(&state->card->lock, flags); - - count -= cnt; - buffer += cnt; - ret += cnt; - start_dac(state); - } -out: - mutex_unlock(&state->sem); - remove_wait_queue(&state->dmabuf.wait, &wait); - set_current_state(TASK_RUNNING); - - CS_DBGOUT(CS_WAVE_WRITE | CS_FUNCTION, 2, - printk("cs46xx: cs_write()- ret=%zd\n", ret)); - return ret; -} - -static unsigned int cs_poll(struct file *file, struct poll_table_struct *wait) -{ - struct cs_card *card = file->private_data; - struct dmabuf *dmabuf; - struct cs_state *state; - unsigned long flags; - unsigned int mask = 0; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_poll()+ \n")); - if (!(file->f_mode & (FMODE_WRITE | FMODE_READ))) { - return -EINVAL; - } - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - poll_wait(file, &dmabuf->wait, wait); - } - } - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - poll_wait(file, &dmabuf->wait, wait); - } - } - - spin_lock_irqsave(&card->lock, flags); - cs_update_ptr(card, CS_FALSE); - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - if (dmabuf->count >= (signed)dmabuf->fragsize) - mask |= POLLIN | POLLRDNORM; - } - } - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - if (dmabuf->mapped) { - if (dmabuf->count >= (signed)dmabuf->fragsize) - mask |= POLLOUT | POLLWRNORM; - } else { - if ((signed)dmabuf->dmasize >= dmabuf->count - + (signed)dmabuf->fragsize) - mask |= POLLOUT | POLLWRNORM; - } - } - } - spin_unlock_irqrestore(&card->lock, flags); - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_poll()- (0x%x) \n", - mask)); - return mask; -} - -/* - * We let users mmap the ring buffer. Its not the real DMA buffer but - * that side of the code is hidden in the IRQ handling. We do a software - * emulation of DMA from a 64K or so buffer into a 2K FIFO. - * (the hardware probably deserves a moan here but Crystal send me nice - * toys ;)). - */ - -static int cs_mmap(struct file *file, struct vm_area_struct *vma) -{ - struct cs_card *card = file->private_data; - struct cs_state *state; - struct dmabuf *dmabuf; - int ret = 0; - unsigned long size; - - CS_DBGOUT(CS_FUNCTION | CS_PARMS, 2, printk("cs46xx: cs_mmap()+ file=%p %s %s\n", - file, vma->vm_flags & VM_WRITE ? "VM_WRITE" : "", - vma->vm_flags & VM_READ ? "VM_READ" : "") ); - - if (vma->vm_flags & VM_WRITE) { - state = card->states[1]; - if (state) { - CS_DBGOUT(CS_OPEN, 2, printk( - "cs46xx: cs_mmap() VM_WRITE - state TRUE prog_dmabuf DAC\n") ); - if ((ret = prog_dmabuf(state)) != 0) - return ret; - } - } else if (vma->vm_flags & VM_READ) { - state = card->states[0]; - if (state) { - CS_DBGOUT(CS_OPEN, 2, printk( - "cs46xx: cs_mmap() VM_READ - state TRUE prog_dmabuf ADC\n") ); - if ((ret = prog_dmabuf(state)) != 0) - return ret; - } - } else { - CS_DBGOUT(CS_ERROR, 2, printk( - "cs46xx: cs_mmap() return -EINVAL\n") ); - return -EINVAL; - } - -/* - * For now ONLY support playback, but seems like the only way to use - * mmap() is to open an FD with RDWR, just read or just write access - * does not function, get an error back from the kernel. - * Also, QuakeIII opens with RDWR! So, there must be something - * to needing read/write access mapping. So, allow read/write but - * use the DAC only. - */ - state = card->states[1]; - if (!state) { - ret = -EINVAL; - goto out; - } - - mutex_lock(&state->sem); - dmabuf = &state->dmabuf; - if (cs4x_pgoff(vma) != 0) { - ret = -EINVAL; - goto out; - } - size = vma->vm_end - vma->vm_start; - - CS_DBGOUT(CS_PARMS, 2, printk("cs46xx: cs_mmap(): size=%d\n",(unsigned)size) ); - - if (size > (PAGE_SIZE << dmabuf->buforder)) { - ret = -EINVAL; - goto out; - } - if (remap_pfn_range(vma, vma->vm_start, - virt_to_phys(dmabuf->rawbuf) >> PAGE_SHIFT, - size, vma->vm_page_prot)) { - ret = -EAGAIN; - goto out; - } - dmabuf->mapped = 1; - - CS_DBGOUT(CS_FUNCTION, 2, printk("cs46xx: cs_mmap()-\n") ); -out: - mutex_unlock(&state->sem); - return ret; -} - -static int cs_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) -{ - struct cs_card *card = file->private_data; - struct cs_state *state; - struct dmabuf *dmabuf = NULL; - unsigned long flags; - audio_buf_info abinfo; - count_info cinfo; - int val, valsave, ret; - int mapped = 0; - void __user *argp = (void __user *)arg; - int __user *p = argp; - - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - mapped = (file->f_mode & FMODE_READ) && dmabuf->mapped; - } - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - mapped |= (file->f_mode & FMODE_WRITE) && dmabuf->mapped; - } - -#if CSDEBUG - printioctl(cmd); -#endif - - switch (cmd) { - case OSS_GETVERSION: - return put_user(SOUND_VERSION, p); - case SNDCTL_DSP_RESET: - /* FIXME: spin_lock ? */ - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - stop_dac(state); - synchronize_irq(card->irq); - dmabuf->ready = 0; - resync_dma_ptrs(state); - dmabuf->swptr = dmabuf->hwptr = 0; - dmabuf->count = dmabuf->total_bytes = 0; - dmabuf->blocks = 0; - dmabuf->SGok = 0; - } - } - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - stop_adc(state); - synchronize_irq(card->irq); - resync_dma_ptrs(state); - dmabuf->ready = 0; - dmabuf->swptr = dmabuf->hwptr = 0; - dmabuf->count = dmabuf->total_bytes = 0; - dmabuf->blocks = 0; - dmabuf->SGok = 0; - } - } - CS_DBGOUT(CS_IOCTL, 2, printk("cs46xx: DSP_RESET()-\n") ); - return 0; - case SNDCTL_DSP_SYNC: - if (file->f_mode & FMODE_WRITE) - return drain_dac(state, file->f_flags & O_NONBLOCK); - return 0; - case SNDCTL_DSP_SPEED: /* set sample rate */ - if (get_user(val, p)) - return -EFAULT; - if (val >= 0) { - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - stop_adc(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - cs_set_adc_rate(state, val); - cs_set_divisor(dmabuf); - } - } - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - stop_dac(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - cs_set_dac_rate(state, val); - cs_set_divisor(dmabuf); - } - } - CS_DBGOUT(CS_IOCTL | CS_PARMS, 4, printk( - "cs46xx: cs_ioctl() DSP_SPEED %s %s %d\n", - file->f_mode & FMODE_WRITE ? "DAC" : "", - file->f_mode & FMODE_READ ? "ADC" : "", - dmabuf->rate ) ); - return put_user(dmabuf->rate, p); - } - return put_user(0, p); - case SNDCTL_DSP_STEREO: /* set stereo or mono channel */ - if (get_user(val, p)) - return -EFAULT; - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - stop_dac(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - if (val) - dmabuf->fmt |= CS_FMT_STEREO; - else - dmabuf->fmt &= ~CS_FMT_STEREO; - cs_set_divisor(dmabuf); - CS_DBGOUT(CS_IOCTL | CS_PARMS, 4, printk( - "cs46xx: DSP_STEREO() DAC %s\n", - (dmabuf->fmt & CS_FMT_STEREO) ? - "STEREO":"MONO") ); - } - } - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - stop_adc(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - if (val) - dmabuf->fmt |= CS_FMT_STEREO; - else - dmabuf->fmt &= ~CS_FMT_STEREO; - cs_set_divisor(dmabuf); - CS_DBGOUT(CS_IOCTL | CS_PARMS, 4, printk( - "cs46xx: DSP_STEREO() ADC %s\n", - (dmabuf->fmt & CS_FMT_STEREO) ? - "STEREO":"MONO") ); - } - } - return 0; - case SNDCTL_DSP_GETBLKSIZE: - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - if ((val = prog_dmabuf(state))) - return val; - return put_user(dmabuf->fragsize, p); - } - } - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - if ((val = prog_dmabuf(state))) - return val; - return put_user(dmabuf->fragsize/dmabuf->divisor, - p); - } - } - return put_user(0, p); - case SNDCTL_DSP_GETFMTS: /* Returns a mask of supported sample format*/ - return put_user(AFMT_S16_LE | AFMT_U8, p); - case SNDCTL_DSP_SETFMT: /* Select sample format */ - if (get_user(val, p)) - return -EFAULT; - CS_DBGOUT(CS_IOCTL | CS_PARMS, 4, printk( - "cs46xx: cs_ioctl() DSP_SETFMT %s %s %s %s\n", - file->f_mode & FMODE_WRITE ? "DAC" : "", - file->f_mode & FMODE_READ ? "ADC" : "", - val == AFMT_S16_LE ? "16Bit Signed" : "", - val == AFMT_U8 ? "8Bit Unsigned" : "") ); - valsave = val; - if (val != AFMT_QUERY) { - if (val==AFMT_S16_LE || val==AFMT_U8) { - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - stop_dac(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - if (val == AFMT_S16_LE) - dmabuf->fmt |= CS_FMT_16BIT; - else - dmabuf->fmt &= ~CS_FMT_16BIT; - cs_set_divisor(dmabuf); - if ((ret = prog_dmabuf(state))) - return ret; - } - } - if (file->f_mode & FMODE_READ) { - val = valsave; - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - stop_adc(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - if (val == AFMT_S16_LE) - dmabuf->fmt |= CS_FMT_16BIT; - else - dmabuf->fmt &= ~CS_FMT_16BIT; - cs_set_divisor(dmabuf); - if ((ret = prog_dmabuf(state))) - return ret; - } - } - } else { - CS_DBGOUT(CS_IOCTL | CS_ERROR, 2, printk( - "cs46xx: DSP_SETFMT() Unsupported format (0x%x)\n", - valsave) ); - } - } else { - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) - dmabuf = &state->dmabuf; - } else if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) - dmabuf = &state->dmabuf; - } - } - if (dmabuf) { - if (dmabuf->fmt & CS_FMT_16BIT) - return put_user(AFMT_S16_LE, p); - else - return put_user(AFMT_U8, p); - } - return put_user(0, p); - case SNDCTL_DSP_CHANNELS: - if (get_user(val, p)) - return -EFAULT; - if (val != 0) { - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - stop_dac(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - if (val > 1) - dmabuf->fmt |= CS_FMT_STEREO; - else - dmabuf->fmt &= ~CS_FMT_STEREO; - cs_set_divisor(dmabuf); - if (prog_dmabuf(state)) - return 0; - } - } - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - stop_adc(state); - dmabuf->ready = 0; - dmabuf->SGok = 0; - if (val > 1) - dmabuf->fmt |= CS_FMT_STEREO; - else - dmabuf->fmt &= ~CS_FMT_STEREO; - cs_set_divisor(dmabuf); - if (prog_dmabuf(state)) - return 0; - } - } - } - return put_user((dmabuf->fmt & CS_FMT_STEREO) ? 2 : 1, - p); - case SNDCTL_DSP_POST: - /* - * There will be a longer than normal pause in the data. - * so... do nothing, because there is nothing that we can do. - */ - return 0; - case SNDCTL_DSP_SUBDIVIDE: - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - if (dmabuf->subdivision) - return -EINVAL; - if (get_user(val, p)) - return -EFAULT; - if (val != 1 && val != 2) - return -EINVAL; - dmabuf->subdivision = val; - } - } - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - if (dmabuf->subdivision) - return -EINVAL; - if (get_user(val, p)) - return -EFAULT; - if (val != 1 && val != 2) - return -EINVAL; - dmabuf->subdivision = val; - } - } - return 0; - case SNDCTL_DSP_SETFRAGMENT: - if (get_user(val, p)) - return -EFAULT; - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - dmabuf->ossfragshift = val & 0xffff; - dmabuf->ossmaxfrags = (val >> 16) & 0xffff; - } - } - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - dmabuf->ossfragshift = val & 0xffff; - dmabuf->ossmaxfrags = (val >> 16) & 0xffff; - } - } - return 0; - case SNDCTL_DSP_GETOSPACE: - if (!(file->f_mode & FMODE_WRITE)) - return -EINVAL; - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - spin_lock_irqsave(&state->card->lock, flags); - cs_update_ptr(card, CS_TRUE); - abinfo.fragsize = dmabuf->fragsize; - abinfo.fragstotal = dmabuf->numfrag; - /* - * for mmap we always have total space available - */ - if (dmabuf->mapped) - abinfo.bytes = dmabuf->dmasize; - else - abinfo.bytes = dmabuf->dmasize - dmabuf->count; - - abinfo.fragments = abinfo.bytes >> dmabuf->fragshift; - spin_unlock_irqrestore(&state->card->lock, flags); - return copy_to_user(argp, &abinfo, sizeof(abinfo)) ? -EFAULT : 0; - } - return -ENODEV; - case SNDCTL_DSP_GETISPACE: - if (!(file->f_mode & FMODE_READ)) - return -EINVAL; - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - spin_lock_irqsave(&state->card->lock, flags); - cs_update_ptr(card, CS_TRUE); - abinfo.fragsize = dmabuf->fragsize/dmabuf->divisor; - abinfo.bytes = dmabuf->count/dmabuf->divisor; - abinfo.fragstotal = dmabuf->numfrag; - abinfo.fragments = abinfo.bytes >> dmabuf->fragshift; - spin_unlock_irqrestore(&state->card->lock, flags); - return copy_to_user(argp, &abinfo, sizeof(abinfo)) ? -EFAULT : 0; - } - return -ENODEV; - case SNDCTL_DSP_NONBLOCK: - file->f_flags |= O_NONBLOCK; - return 0; - case SNDCTL_DSP_GETCAPS: - return put_user(DSP_CAP_REALTIME|DSP_CAP_TRIGGER|DSP_CAP_MMAP, - p); - case SNDCTL_DSP_GETTRIGGER: - val = 0; - CS_DBGOUT(CS_IOCTL, 2, printk("cs46xx: DSP_GETTRIGGER()+\n") ); - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - if (dmabuf->enable & DAC_RUNNING) - val |= PCM_ENABLE_INPUT; - } - } - if (file->f_mode & FMODE_READ) { - if (state) { - state = card->states[0]; - dmabuf = &state->dmabuf; - if (dmabuf->enable & ADC_RUNNING) - val |= PCM_ENABLE_OUTPUT; - } - } - CS_DBGOUT(CS_IOCTL, 2, printk("cs46xx: DSP_GETTRIGGER()- val=0x%x\n",val) ); - return put_user(val, p); - case SNDCTL_DSP_SETTRIGGER: - if (get_user(val, p)) - return -EFAULT; - if (file->f_mode & FMODE_READ) { - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - if (val & PCM_ENABLE_INPUT) { - if (!dmabuf->ready && (ret = prog_dmabuf(state))) - return ret; - start_adc(state); - } else - stop_adc(state); - } - } - if (file->f_mode & FMODE_WRITE) { - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - if (val & PCM_ENABLE_OUTPUT) { - if (!dmabuf->ready && (ret = prog_dmabuf(state))) - return ret; - start_dac(state); - } else - stop_dac(state); - } - } - return 0; - case SNDCTL_DSP_GETIPTR: - if (!(file->f_mode & FMODE_READ)) - return -EINVAL; - state = card->states[0]; - if (state) { - dmabuf = &state->dmabuf; - spin_lock_irqsave(&state->card->lock, flags); - cs_update_ptr(card, CS_TRUE); - cinfo.bytes = dmabuf->total_bytes/dmabuf->divisor; - cinfo.blocks = dmabuf->count/dmabuf->divisor >> dmabuf->fragshift; - cinfo.ptr = dmabuf->hwptr/dmabuf->divisor; - spin_unlock_irqrestore(&state->card->lock, flags); - if (copy_to_user(argp, &cinfo, sizeof(cinfo))) - return -EFAULT; - return 0; - } - return -ENODEV; - case SNDCTL_DSP_GETOPTR: - if (!(file->f_mode & FMODE_WRITE)) - return -EINVAL; - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - spin_lock_irqsave(&state->card->lock, flags); - cs_update_ptr(card, CS_TRUE); - cinfo.bytes = dmabuf->total_bytes; - if (dmabuf->mapped) { - cinfo.blocks = (cinfo.bytes >> dmabuf->fragshift) - - dmabuf->blocks; - CS_DBGOUT(CS_PARMS, 8, - printk("total_bytes=%d blocks=%d dmabuf->blocks=%d\n", - cinfo.bytes,cinfo.blocks,dmabuf->blocks) ); - dmabuf->blocks = cinfo.bytes >> dmabuf->fragshift; - } else { - cinfo.blocks = dmabuf->count >> dmabuf->fragshift; - } - cinfo.ptr = dmabuf->hwptr; - - CS_DBGOUT(CS_PARMS, 4, printk( - "cs46xx: GETOPTR bytes=%d blocks=%d ptr=%d\n", - cinfo.bytes,cinfo.blocks,cinfo.ptr) ); - spin_unlock_irqrestore(&state->card->lock, flags); - if (copy_to_user(argp, &cinfo, sizeof(cinfo))) - return -EFAULT; - return 0; - } - return -ENODEV; - case SNDCTL_DSP_SETDUPLEX: - return 0; - case SNDCTL_DSP_GETODELAY: - if (!(file->f_mode & FMODE_WRITE)) - return -EINVAL; - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - spin_lock_irqsave(&state->card->lock, flags); - cs_update_ptr(card, CS_TRUE); - val = dmabuf->count; - spin_unlock_irqrestore(&state->card->lock, flags); - } else - val = 0; - return put_user(val, p); - case SOUND_PCM_READ_RATE: - if (file->f_mode & FMODE_READ) - state = card->states[0]; - else - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - return put_user(dmabuf->rate, p); - } - return put_user(0, p); - case SOUND_PCM_READ_CHANNELS: - if (file->f_mode & FMODE_READ) - state = card->states[0]; - else - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - return put_user((dmabuf->fmt & CS_FMT_STEREO) ? 2 : 1, - p); - } - return put_user(0, p); - case SOUND_PCM_READ_BITS: - if (file->f_mode & FMODE_READ) - state = card->states[0]; - else - state = card->states[1]; - if (state) { - dmabuf = &state->dmabuf; - return put_user((dmabuf->fmt & CS_FMT_16BIT) ? - AFMT_S16_LE : AFMT_U8, p); - - } - return put_user(0, p); - case SNDCTL_DSP_MAPINBUF: - case SNDCTL_DSP_MAPOUTBUF: - case SNDCTL_DSP_SETSYNCRO: - case SOUND_PCM_WRITE_FILTER: - case SOUND_PCM_READ_FILTER: - return -EINVAL; - } - return -EINVAL; -} - - -/* - * AMP control - null AMP - */ - -static void amp_none(struct cs_card *card, int change) -{ -} - -/* - * Crystal EAPD mode - */ - -static void amp_voyetra(struct cs_card *card, int change) -{ - /* Manage the EAPD bit on the Crystal 4297 - and the Analog AD1885 */ - - int old = card->amplifier; - - card->amplifier+=change; - if (card->amplifier && !old) { - /* Turn the EAPD amp on */ - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, - cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) | - 0x8000); - } else if(old && !card->amplifier) { - /* Turn the EAPD amp off */ - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, - cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - ~0x8000); - } -} - - -/* - * Game Theatre XP card - EGPIO[2] is used to enable the external amp. - */ - -static void amp_hercules(struct cs_card *card, int change) -{ - int old = card->amplifier; - if (!card) { - CS_DBGOUT(CS_ERROR, 2, printk(KERN_INFO - "cs46xx: amp_hercules() called before initialized.\n")); - return; - } - card->amplifier+=change; - if ((card->amplifier && !old) && !(hercules_egpio_disable)) { - CS_DBGOUT(CS_PARMS, 4, printk(KERN_INFO - "cs46xx: amp_hercules() external amp enabled\n")); - cs461x_pokeBA0(card, BA0_EGPIODR, - EGPIODR_GPOE2); /* enable EGPIO2 output */ - cs461x_pokeBA0(card, BA0_EGPIOPTR, - EGPIOPTR_GPPT2); /* open-drain on output */ - } else if (old && !card->amplifier) { - CS_DBGOUT(CS_PARMS, 4, printk(KERN_INFO - "cs46xx: amp_hercules() external amp disabled\n")); - cs461x_pokeBA0(card, BA0_EGPIODR, 0); /* disable */ - cs461x_pokeBA0(card, BA0_EGPIOPTR, 0); /* disable */ - } -} - -/* - * Handle the CLKRUN on a thinkpad. We must disable CLKRUN support - * whenever we need to beat on the chip. - * - * The original idea and code for this hack comes from David Kaiser at - * Linuxcare. Perhaps one day Crystal will document their chips well - * enough to make them useful. - */ - -static void clkrun_hack(struct cs_card *card, int change) -{ - struct pci_dev *acpi_dev; - u16 control; - u8 pp; - unsigned long port; - int old = card->active; - - card->active+=change; - - acpi_dev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, NULL); - if (acpi_dev == NULL) - return; /* Not a thinkpad thats for sure */ - - /* Find the control port */ - pci_read_config_byte(acpi_dev, 0x41, &pp); - port = pp << 8; - - /* Read ACPI port */ - control = inw(port + 0x10); - - /* Flip CLKRUN off while running */ - if (!card->active && old) { - CS_DBGOUT(CS_PARMS , 9, printk( KERN_INFO - "cs46xx: clkrun() enable clkrun - change=%d active=%d\n", - change,card->active)); - outw(control|0x2000, port+0x10); - } else { - /* - * sometimes on a resume the bit is set, so always reset the bit. - */ - CS_DBGOUT(CS_PARMS , 9, printk( KERN_INFO - "cs46xx: clkrun() disable clkrun - change=%d active=%d\n", - change,card->active)); - outw(control&~0x2000, port+0x10); - } - pci_dev_put(acpi_dev); -} - - -static int cs_open(struct inode *inode, struct file *file) -{ - struct cs_card *card = file->private_data; - struct cs_state *state = NULL; - struct dmabuf *dmabuf = NULL; - struct list_head *entry; - unsigned int minor = iminor(inode); - int ret = 0; - unsigned int tmp; - - CS_DBGOUT(CS_OPEN | CS_FUNCTION, 2, printk("cs46xx: cs_open()+ file=%p %s %s\n", - file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "", - file->f_mode & FMODE_READ ? "FMODE_READ" : "") ); - - list_for_each(entry, &cs46xx_devs) { - card = list_entry(entry, struct cs_card, list); - - if (!((card->dev_audio ^ minor) & ~0xf)) - break; - } - if (entry == &cs46xx_devs) - return -ENODEV; - if (!card) { - CS_DBGOUT(CS_FUNCTION | CS_OPEN, 2, printk(KERN_INFO - "cs46xx: cs_open(): Error - unable to find audio card struct\n")); - return -ENODEV; - } - - /* - * hardcode state[0] for capture, [1] for playback - */ - if (file->f_mode & FMODE_READ) { - CS_DBGOUT(CS_WAVE_READ, 2, printk("cs46xx: cs_open() FMODE_READ\n") ); - if (card->states[0] == NULL) { - state = card->states[0] = - kzalloc(sizeof(struct cs_state), GFP_KERNEL); - if (state == NULL) - return -ENOMEM; - mutex_init(&state->sem); - dmabuf = &state->dmabuf; - dmabuf->pbuf = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); - if (dmabuf->pbuf == NULL) { - kfree(state); - card->states[0] = NULL; - return -ENOMEM; - } - } else { - state = card->states[0]; - if (state->open_mode & FMODE_READ) - return -EBUSY; - } - dmabuf->channel = card->alloc_rec_pcm_channel(card); - - if (dmabuf->channel == NULL) { - kfree(card->states[0]); - card->states[0] = NULL; - return -ENODEV; - } - - /* Now turn on external AMP if needed */ - state->card = card; - state->card->active_ctrl(state->card, 1); - state->card->amplifier_ctrl(state->card, 1); - - if ((tmp = cs46xx_powerup(card, CS_POWER_ADC))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs46xx_powerup of ADC failed (0x%x)\n", tmp)); - return -EIO; - } - - dmabuf->channel->state = state; - /* initialize the virtual channel */ - state->virt = 0; - state->magic = CS_STATE_MAGIC; - init_waitqueue_head(&dmabuf->wait); - mutex_init(&state->open_mutex); - file->private_data = card; - - mutex_lock(&state->open_mutex); - - /* set default sample format. According to OSS Programmer's Guide /dev/dsp - should be default to unsigned 8-bits, mono, with sample rate 8kHz and - /dev/dspW will accept 16-bits sample */ - - /* Default input is 8bit mono */ - dmabuf->fmt &= ~CS_FMT_MASK; - dmabuf->type = CS_TYPE_ADC; - dmabuf->ossfragshift = 0; - dmabuf->ossmaxfrags = 0; - dmabuf->subdivision = 0; - cs_set_adc_rate(state, 8000); - cs_set_divisor(dmabuf); - - state->open_mode |= FMODE_READ; - mutex_unlock(&state->open_mutex); - } - if (file->f_mode & FMODE_WRITE) { - CS_DBGOUT(CS_OPEN, 2, printk("cs46xx: cs_open() FMODE_WRITE\n") ); - if (card->states[1] == NULL) { - state = card->states[1] = - kzalloc(sizeof(struct cs_state), GFP_KERNEL); - if (state == NULL) - return -ENOMEM; - mutex_init(&state->sem); - dmabuf = &state->dmabuf; - dmabuf->pbuf = (void *)get_zeroed_page(GFP_KERNEL | GFP_DMA); - if (dmabuf->pbuf == NULL) { - kfree(state); - card->states[1] = NULL; - return -ENOMEM; - } - } else { - state = card->states[1]; - if (state->open_mode & FMODE_WRITE) - return -EBUSY; - } - dmabuf->channel = card->alloc_pcm_channel(card); - - if (dmabuf->channel == NULL) { - kfree(card->states[1]); - card->states[1] = NULL; - return -ENODEV; - } - - /* Now turn on external AMP if needed */ - state->card = card; - state->card->active_ctrl(state->card, 1); - state->card->amplifier_ctrl(state->card, 1); - - if ((tmp = cs46xx_powerup(card, CS_POWER_DAC))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs46xx_powerup of DAC failed (0x%x)\n", tmp)); - return -EIO; - } - - dmabuf->channel->state = state; - /* initialize the virtual channel */ - state->virt = 1; - state->magic = CS_STATE_MAGIC; - init_waitqueue_head(&dmabuf->wait); - mutex_init(&state->open_mutex); - file->private_data = card; - - mutex_lock(&state->open_mutex); - - /* set default sample format. According to OSS Programmer's Guide /dev/dsp - should be default to unsigned 8-bits, mono, with sample rate 8kHz and - /dev/dspW will accept 16-bits sample */ - - /* Default output is 8bit mono. */ - dmabuf->fmt &= ~CS_FMT_MASK; - dmabuf->type = CS_TYPE_DAC; - dmabuf->ossfragshift = 0; - dmabuf->ossmaxfrags = 0; - dmabuf->subdivision = 0; - cs_set_dac_rate(state, 8000); - cs_set_divisor(dmabuf); - - state->open_mode |= FMODE_WRITE; - mutex_unlock(&state->open_mutex); - if ((ret = prog_dmabuf(state))) - return ret; - } - CS_DBGOUT(CS_OPEN | CS_FUNCTION, 2, printk("cs46xx: cs_open()- 0\n")); - return nonseekable_open(inode, file); -} - -static int cs_release(struct inode *inode, struct file *file) -{ - struct cs_card *card = file->private_data; - struct dmabuf *dmabuf; - struct cs_state *state; - unsigned int tmp; - CS_DBGOUT(CS_RELEASE | CS_FUNCTION, 2, printk("cs46xx: cs_release()+ file=%p %s %s\n", - file, file->f_mode & FMODE_WRITE ? "FMODE_WRITE" : "", - file->f_mode & FMODE_READ ? "FMODE_READ" : "")); - - if (!(file->f_mode & (FMODE_WRITE | FMODE_READ))) - return -EINVAL; - state = card->states[1]; - if (state) { - if ((state->open_mode & FMODE_WRITE) & (file->f_mode & FMODE_WRITE)) { - CS_DBGOUT(CS_RELEASE, 2, printk("cs46xx: cs_release() FMODE_WRITE\n")); - dmabuf = &state->dmabuf; - cs_clear_tail(state); - drain_dac(state, file->f_flags & O_NONBLOCK); - /* stop DMA state machine and free DMA buffers/channels */ - mutex_lock(&state->open_mutex); - stop_dac(state); - dealloc_dmabuf(state); - state->card->free_pcm_channel(state->card, dmabuf->channel->num); - free_page((unsigned long)state->dmabuf.pbuf); - - /* we're covered by the open_mutex */ - mutex_unlock(&state->open_mutex); - state->card->states[state->virt] = NULL; - state->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE); - - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC, CS_FALSE))) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO - "cs46xx: cs_release_mixdev() powerdown DAC failure (0x%x)\n",tmp) ); - } - - /* Now turn off external AMP if needed */ - state->card->amplifier_ctrl(state->card, -1); - state->card->active_ctrl(state->card, -1); - kfree(state); - } - } - - state = card->states[0]; - if (state) { - if ((state->open_mode & FMODE_READ) & (file->f_mode & FMODE_READ)) { - CS_DBGOUT(CS_RELEASE, 2, printk("cs46xx: cs_release() FMODE_READ\n")); - dmabuf = &state->dmabuf; - mutex_lock(&state->open_mutex); - stop_adc(state); - dealloc_dmabuf(state); - state->card->free_pcm_channel(state->card, dmabuf->channel->num); - free_page((unsigned long)state->dmabuf.pbuf); - - /* we're covered by the open_mutex */ - mutex_unlock(&state->open_mutex); - state->card->states[state->virt] = NULL; - state->open_mode &= (~file->f_mode) & (FMODE_READ|FMODE_WRITE); - - if ((tmp = cs461x_powerdown(card, CS_POWER_ADC, CS_FALSE))) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO - "cs46xx: cs_release_mixdev() powerdown ADC failure (0x%x)\n",tmp) ); - } - - /* Now turn off external AMP if needed */ - state->card->amplifier_ctrl(state->card, -1); - state->card->active_ctrl(state->card, -1); - kfree(state); - } - } - - CS_DBGOUT(CS_FUNCTION | CS_RELEASE, 2, printk("cs46xx: cs_release()- 0\n")); - return 0; -} - -static void printpm(struct cs_card *s) -{ - CS_DBGOUT(CS_PM, 9, printk("pm struct:\n")); - CS_DBGOUT(CS_PM, 9, printk("flags:0x%x u32CLKCR1_SAVE: 0%x u32SSPMValue: 0x%x\n", - (unsigned)s->pm.flags,s->pm.u32CLKCR1_SAVE,s->pm.u32SSPMValue)); - CS_DBGOUT(CS_PM, 9, printk("u32PPLVCvalue: 0x%x u32PPRVCvalue: 0x%x\n", - s->pm.u32PPLVCvalue,s->pm.u32PPRVCvalue)); - CS_DBGOUT(CS_PM, 9, printk("u32FMLVCvalue: 0x%x u32FMRVCvalue: 0x%x\n", - s->pm.u32FMLVCvalue,s->pm.u32FMRVCvalue)); - CS_DBGOUT(CS_PM, 9, printk("u32GPIORvalue: 0x%x u32JSCTLvalue: 0x%x\n", - s->pm.u32GPIORvalue,s->pm.u32JSCTLvalue)); - CS_DBGOUT(CS_PM, 9, printk("u32SSCR: 0x%x u32SRCSA: 0x%x\n", - s->pm.u32SSCR,s->pm.u32SRCSA)); - CS_DBGOUT(CS_PM, 9, printk("u32DacASR: 0x%x u32AdcASR: 0x%x\n", - s->pm.u32DacASR,s->pm.u32AdcASR)); - CS_DBGOUT(CS_PM, 9, printk("u32DacSR: 0x%x u32AdcSR: 0x%x\n", - s->pm.u32DacSR,s->pm.u32AdcSR)); - CS_DBGOUT(CS_PM, 9, printk("u32MIDCR_Save: 0x%x\n", - s->pm.u32MIDCR_Save)); - CS_DBGOUT(CS_PM, 9, printk("u32AC97_powerdown: 0x%x _general_purpose 0x%x\n", - s->pm.u32AC97_powerdown,s->pm.u32AC97_general_purpose)); - CS_DBGOUT(CS_PM, 9, printk("u32AC97_master_volume: 0x%x\n", - s->pm.u32AC97_master_volume)); - CS_DBGOUT(CS_PM, 9, printk("u32AC97_headphone_volume: 0x%x\n", - s->pm.u32AC97_headphone_volume)); - CS_DBGOUT(CS_PM, 9, printk("u32AC97_master_volume_mono: 0x%x\n", - s->pm.u32AC97_master_volume_mono)); - CS_DBGOUT(CS_PM, 9, printk("u32AC97_pcm_out_volume: 0x%x\n", - s->pm.u32AC97_pcm_out_volume)); - CS_DBGOUT(CS_PM, 9, printk("dmabuf_swptr_play: 0x%x dmabuf_count_play: %d\n", - s->pm.dmabuf_swptr_play,s->pm.dmabuf_count_play)); - CS_DBGOUT(CS_PM, 9, printk("dmabuf_swptr_capture: 0x%x dmabuf_count_capture: %d\n", - s->pm.dmabuf_swptr_capture,s->pm.dmabuf_count_capture)); - -} - -/**************************************************************************** -* -* Suspend - save the ac97 regs, mute the outputs and power down the part. -* -****************************************************************************/ -static void cs46xx_ac97_suspend(struct cs_card *card) -{ - int Count,i; - struct ac97_codec *dev=card->ac97_codec[0]; - unsigned int tmp; - - CS_DBGOUT(CS_PM, 9, printk("cs46xx: cs46xx_ac97_suspend()+\n")); - - if (card->states[1]) { - stop_dac(card->states[1]); - resync_dma_ptrs(card->states[1]); - } - if (card->states[0]) { - stop_adc(card->states[0]); - resync_dma_ptrs(card->states[0]); - } - - for (Count = 0x2, i = 0; (Count <= CS46XX_AC97_HIGHESTREGTORESTORE) - && (i < CS46XX_AC97_NUMBER_RESTORE_REGS); - Count += 2, i++) { - card->pm.ac97[i] = cs_ac97_get(dev, BA0_AC97_RESET + Count); - } -/* -* Save the ac97 volume registers as well as the current powerdown state. -* Now, mute the all the outputs (master, headphone, and mono), as well -* as the PCM volume, in preparation for powering down the entire part. - card->pm.u32AC97_master_volume = (u32)cs_ac97_get( dev, - (u8)BA0_AC97_MASTER_VOLUME); - card->pm.u32AC97_headphone_volume = (u32)cs_ac97_get(dev, - (u8)BA0_AC97_HEADPHONE_VOLUME); - card->pm.u32AC97_master_volume_mono = (u32)cs_ac97_get(dev, - (u8)BA0_AC97_MASTER_VOLUME_MONO); - card->pm.u32AC97_pcm_out_volume = (u32)cs_ac97_get(dev, - (u8)BA0_AC97_PCM_OUT_VOLUME); -*/ -/* -* mute the outputs -*/ - cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME, 0x8000); - cs_ac97_set(dev, (u8)BA0_AC97_HEADPHONE_VOLUME, 0x8000); - cs_ac97_set(dev, (u8)BA0_AC97_MASTER_VOLUME_MONO, 0x8000); - cs_ac97_set(dev, (u8)BA0_AC97_PCM_OUT_VOLUME, 0x8000); - -/* -* save the registers that cause pops -*/ - card->pm.u32AC97_powerdown = (u32)cs_ac97_get(dev, (u8)AC97_POWER_CONTROL); - card->pm.u32AC97_general_purpose = (u32)cs_ac97_get(dev, (u8)BA0_AC97_GENERAL_PURPOSE); -/* -* And power down everything on the AC97 codec. -* well, for now, only power down the DAC/ADC and MIXER VREFON components. -* trouble with removing VREF. -*/ - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON, CS_TRUE))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs46xx_ac97_suspend() failure (0x%x)\n",tmp)); - } - - CS_DBGOUT(CS_PM, 9, printk("cs46xx: cs46xx_ac97_suspend()-\n")); -} - -/**************************************************************************** -* -* Resume - power up the part and restore its registers.. -* -****************************************************************************/ -static void cs46xx_ac97_resume(struct cs_card *card) -{ - int Count,i; - struct ac97_codec *dev=card->ac97_codec[0]; - - CS_DBGOUT(CS_PM, 9, printk("cs46xx: cs46xx_ac97_resume()+\n")); - -/* -* First, we restore the state of the general purpose register. This -* contains the mic select (mic1 or mic2) and if we restore this after -* we restore the mic volume/boost state and mic2 was selected at -* suspend time, we will end up with a brief period of time where mic1 -* is selected with the volume/boost settings for mic2, causing -* acoustic feedback. So we restore the general purpose register -* first, thereby getting the correct mic selected before we restore -* the mic volume/boost. -*/ - cs_ac97_set(dev, (u8)BA0_AC97_GENERAL_PURPOSE, - (u16)card->pm.u32AC97_general_purpose); -/* -* Now, while the outputs are still muted, restore the state of power -* on the AC97 part. -*/ - cs_ac97_set(dev, (u8)BA0_AC97_POWERDOWN, (u16)card->pm.u32AC97_powerdown); - mdelay(5 * cs_laptop_wait); -/* -* Restore just the first set of registers, from register number -* 0x02 to the register number that ulHighestRegToRestore specifies. -*/ - for (Count = 0x2, i=0; (Count <= CS46XX_AC97_HIGHESTREGTORESTORE) && - (i < CS46XX_AC97_NUMBER_RESTORE_REGS); Count += 2, i++) { - cs_ac97_set(dev, (u8)(BA0_AC97_RESET + Count), (u16)card->pm.ac97[i]); - } - - /* Check if we have to init the amplifier */ - if (card->amp_init) - card->amp_init(card); - - CS_DBGOUT(CS_PM, 9, printk("cs46xx: cs46xx_ac97_resume()-\n")); -} - - -static int cs46xx_restart_part(struct cs_card *card) -{ - struct dmabuf *dmabuf; - - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, - printk( "cs46xx: cs46xx_restart_part()+\n")); - if (card->states[1]) { - dmabuf = &card->states[1]->dmabuf; - dmabuf->ready = 0; - resync_dma_ptrs(card->states[1]); - cs_set_divisor(dmabuf); - if (__prog_dmabuf(card->states[1])) { - CS_DBGOUT(CS_PM | CS_ERROR, 1, - printk("cs46xx: cs46xx_restart_part()- (-1) prog_dmabuf() dac error\n")); - return -1; - } - cs_set_dac_rate(card->states[1], dmabuf->rate); - } - if (card->states[0]) { - dmabuf = &card->states[0]->dmabuf; - dmabuf->ready = 0; - resync_dma_ptrs(card->states[0]); - cs_set_divisor(dmabuf); - if (__prog_dmabuf(card->states[0])) { - CS_DBGOUT(CS_PM | CS_ERROR, 1, - printk("cs46xx: cs46xx_restart_part()- (-1) prog_dmabuf() adc error\n")); - return -1; - } - cs_set_adc_rate(card->states[0], dmabuf->rate); - } - card->pm.flags |= CS46XX_PM_RESUMED; - if (card->states[0]) - start_adc(card->states[0]); - if (card->states[1]) - start_dac(card->states[1]); - - card->pm.flags |= CS46XX_PM_IDLE; - card->pm.flags &= ~(CS46XX_PM_SUSPENDING | CS46XX_PM_SUSPENDED - | CS46XX_PM_RESUMING | CS46XX_PM_RESUMED); - if (card->states[0]) - wake_up(&card->states[0]->dmabuf.wait); - if (card->states[1]) - wake_up(&card->states[1]->dmabuf.wait); - - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, - printk( "cs46xx: cs46xx_restart_part()-\n")); - return 0; -} - -static void cs461x_reset(struct cs_card *card); -static void cs461x_proc_stop(struct cs_card *card); -static int cs46xx_suspend(struct cs_card *card, pm_message_t state) -{ - unsigned int tmp; - - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, - printk("cs46xx: cs46xx_suspend()+ flags=0x%x s=%p\n", - (unsigned)card->pm.flags,card)); -/* -* check the current state, only suspend if IDLE -*/ - if (!(card->pm.flags & CS46XX_PM_IDLE)) { - CS_DBGOUT(CS_PM | CS_ERROR, 2, - printk("cs46xx: cs46xx_suspend() unable to suspend, not IDLE\n")); - return 1; - } - card->pm.flags &= ~CS46XX_PM_IDLE; - card->pm.flags |= CS46XX_PM_SUSPENDING; - - card->active_ctrl(card,1); - - tmp = cs461x_peek(card, BA1_PFIE); - tmp &= ~0x0000f03f; - tmp |= 0x00000010; - cs461x_poke(card, BA1_PFIE, tmp); /* playback interrupt disable */ - - tmp = cs461x_peek(card, BA1_CIE); - tmp &= ~0x0000003f; - tmp |= 0x00000011; - cs461x_poke(card, BA1_CIE, tmp); /* capture interrupt disable */ - - /* - * Stop playback DMA. - */ - tmp = cs461x_peek(card, BA1_PCTL); - cs461x_poke(card, BA1_PCTL, tmp & 0x0000ffff); - - /* - * Stop capture DMA. - */ - tmp = cs461x_peek(card, BA1_CCTL); - cs461x_poke(card, BA1_CCTL, tmp & 0xffff0000); - - if (card->states[1]) { - card->pm.dmabuf_swptr_play = card->states[1]->dmabuf.swptr; - card->pm.dmabuf_count_play = card->states[1]->dmabuf.count; - } - if (card->states[0]) { - card->pm.dmabuf_swptr_capture = card->states[0]->dmabuf.swptr; - card->pm.dmabuf_count_capture = card->states[0]->dmabuf.count; - } - - cs46xx_ac97_suspend(card); - - /* - * Reset the processor. - */ - cs461x_reset(card); - - cs461x_proc_stop(card); - - /* - * Power down the DAC and ADC. For now leave the other areas on. - */ - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, 0x0300); - - /* - * Power down the PLL. - */ - cs461x_pokeBA0(card, BA0_CLKCR1, 0); - - /* - * Turn off the Processor by turning off the software clock enable flag in - * the clock control register. - */ - tmp = cs461x_peekBA0(card, BA0_CLKCR1) & ~CLKCR1_SWCE; - cs461x_pokeBA0(card, BA0_CLKCR1, tmp); - - card->active_ctrl(card,-1); - - card->pm.flags &= ~CS46XX_PM_SUSPENDING; - card->pm.flags |= CS46XX_PM_SUSPENDED; - - printpm(card); - - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, - printk("cs46xx: cs46xx_suspend()- flags=0x%x\n", - (unsigned)card->pm.flags)); - return 0; -} - -static int cs46xx_resume(struct cs_card *card) -{ - int i; - - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, - printk( "cs46xx: cs46xx_resume()+ flags=0x%x\n", - (unsigned)card->pm.flags)); - if (!(card->pm.flags & CS46XX_PM_SUSPENDED)) { - CS_DBGOUT(CS_PM | CS_ERROR, 2, - printk("cs46xx: cs46xx_resume() unable to resume, not SUSPENDED\n")); - return 1; - } - card->pm.flags |= CS46XX_PM_RESUMING; - card->pm.flags &= ~CS46XX_PM_SUSPENDED; - printpm(card); - card->active_ctrl(card, 1); - - for (i = 0; i < 5; i++) { - if (cs_hardware_init(card) != 0) { - CS_DBGOUT(CS_PM | CS_ERROR, 4, printk( - "cs46xx: cs46xx_resume()- ERROR in cs_hardware_init()\n")); - mdelay(10 * cs_laptop_wait); - cs461x_reset(card); - continue; - } - break; - } - if (i >= 4) { - CS_DBGOUT(CS_PM | CS_ERROR, 1, printk( - "cs46xx: cs46xx_resume()- cs_hardware_init() failed, retried %d times.\n",i)); - return 0; - } - - if (cs46xx_restart_part(card)) { - CS_DBGOUT(CS_PM | CS_ERROR, 4, printk( - "cs46xx: cs46xx_resume(): cs46xx_restart_part() returned error\n")); - } - - card->active_ctrl(card, -1); - - CS_DBGOUT(CS_PM | CS_FUNCTION, 4, printk("cs46xx: cs46xx_resume()- flags=0x%x\n", - (unsigned)card->pm.flags)); - return 0; -} - -static /*const*/ struct file_operations cs461x_fops = { - CS_OWNER CS_THIS_MODULE - .llseek = no_llseek, - .read = cs_read, - .write = cs_write, - .poll = cs_poll, - .ioctl = cs_ioctl, - .mmap = cs_mmap, - .open = cs_open, - .release = cs_release, -}; - -/* Write AC97 codec registers */ - - -static u16 _cs_ac97_get(struct ac97_codec *dev, u8 reg) -{ - struct cs_card *card = dev->private_data; - int count,loopcnt; - unsigned int tmp; - u16 ret; - - /* - * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address - * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 - * 3. Write ACCTL = Control Register = 460h for initiating the write - * 4. Read ACCTL = 460h, DCV should be reset by now and 460h = 17h - * 5. if DCV not cleared, break and return error - * 6. Read ACSTS = Status Register = 464h, check VSTS bit - */ - - cs461x_peekBA0(card, BA0_ACSDA); - - /* - * Setup the AC97 control registers on the CS461x to send the - * appropriate command to the AC97 to perform the read. - * ACCAD = Command Address Register = 46Ch - * ACCDA = Command Data Register = 470h - * ACCTL = Control Register = 460h - * set DCV - will clear when process completed - * set CRW - Read command - * set VFRM - valid frame enabled - * set ESYN - ASYNC generation enabled - * set RSTN - ARST# inactive, AC97 codec not reset - */ - - cs461x_pokeBA0(card, BA0_ACCAD, reg); - cs461x_pokeBA0(card, BA0_ACCDA, 0); - cs461x_pokeBA0(card, BA0_ACCTL, ACCTL_DCV | ACCTL_CRW | - ACCTL_VFRM | ACCTL_ESYN | - ACCTL_RSTN); - - - /* - * Wait for the read to occur. - */ - if (!(card->pm.flags & CS46XX_PM_IDLE)) - loopcnt = 2000; - else - loopcnt = 500 * cs_laptop_wait; - loopcnt *= cs_laptop_wait; - for (count = 0; count < loopcnt; count++) { - /* - * First, we want to wait for a short time. - */ - udelay(10 * cs_laptop_wait); - /* - * Now, check to see if the read has completed. - * ACCTL = 460h, DCV should be reset by now and 460h = 17h - */ - if (!(cs461x_peekBA0(card, BA0_ACCTL) & ACCTL_DCV)) - break; - } - - /* - * Make sure the read completed. - */ - if (cs461x_peekBA0(card, BA0_ACCTL) & ACCTL_DCV) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: AC'97 read problem (ACCTL_DCV), reg = 0x%x returning 0xffff\n", reg)); - return 0xffff; - } - - /* - * Wait for the valid status bit to go active. - */ - - if (!(card->pm.flags & CS46XX_PM_IDLE)) - loopcnt = 2000; - else - loopcnt = 1000; - loopcnt *= cs_laptop_wait; - for (count = 0; count < loopcnt; count++) { - /* - * Read the AC97 status register. - * ACSTS = Status Register = 464h - * VSTS - Valid Status - */ - if (cs461x_peekBA0(card, BA0_ACSTS) & ACSTS_VSTS) - break; - udelay(10 * cs_laptop_wait); - } - - /* - * Make sure we got valid status. - */ - if (!((tmp = cs461x_peekBA0(card, BA0_ACSTS)) & ACSTS_VSTS)) { - CS_DBGOUT(CS_ERROR, 2, printk(KERN_WARNING - "cs46xx: AC'97 read problem (ACSTS_VSTS), reg = 0x%x val=0x%x 0xffff \n", - reg, tmp)); - return 0xffff; - } - - /* - * Read the data returned from the AC97 register. - * ACSDA = Status Data Register = 474h - */ - CS_DBGOUT(CS_FUNCTION, 9, printk(KERN_INFO - "cs46xx: cs_ac97_get() reg = 0x%x, val = 0x%x, BA0_ACCAD = 0x%x\n", - reg, cs461x_peekBA0(card, BA0_ACSDA), - cs461x_peekBA0(card, BA0_ACCAD))); - ret = cs461x_peekBA0(card, BA0_ACSDA); - return ret; -} - -static u16 cs_ac97_get(struct ac97_codec *dev, u8 reg) -{ - u16 ret; - struct cs_card *card = dev->private_data; - - spin_lock(&card->ac97_lock); - ret = _cs_ac97_get(dev, reg); - spin_unlock(&card->ac97_lock); - return ret; -} - -static void cs_ac97_set(struct ac97_codec *dev, u8 reg, u16 val) -{ - struct cs_card *card = dev->private_data; - int count; - int val2 = 0; - - spin_lock(&card->ac97_lock); - - if (reg == AC97_CD_VOL) - val2 = _cs_ac97_get(dev, AC97_CD_VOL); - - /* - * 1. Write ACCAD = Command Address Register = 46Ch for AC97 register address - * 2. Write ACCDA = Command Data Register = 470h for data to write to AC97 - * 3. Write ACCTL = Control Register = 460h for initiating the write - * 4. Read ACCTL = 460h, DCV should be reset by now and 460h = 07h - * 5. if DCV not cleared, break and return error - */ - - /* - * Setup the AC97 control registers on the CS461x to send the - * appropriate command to the AC97 to perform the read. - * ACCAD = Command Address Register = 46Ch - * ACCDA = Command Data Register = 470h - * ACCTL = Control Register = 460h - * set DCV - will clear when process completed - * reset CRW - Write command - * set VFRM - valid frame enabled - * set ESYN - ASYNC generation enabled - * set RSTN - ARST# inactive, AC97 codec not reset - */ - cs461x_pokeBA0(card, BA0_ACCAD, reg); - cs461x_pokeBA0(card, BA0_ACCDA, val); - cs461x_peekBA0(card, BA0_ACCTL); - cs461x_pokeBA0(card, BA0_ACCTL, 0 | ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); - cs461x_pokeBA0(card, BA0_ACCTL, ACCTL_DCV | ACCTL_VFRM | - ACCTL_ESYN | ACCTL_RSTN); - for (count = 0; count < 1000; count++) { - /* - * First, we want to wait for a short time. - */ - udelay(10 * cs_laptop_wait); - /* - * Now, check to see if the write has completed. - * ACCTL = 460h, DCV should be reset by now and 460h = 07h - */ - if (!(cs461x_peekBA0(card, BA0_ACCTL) & ACCTL_DCV)) - break; - } - /* - * Make sure the write completed. - */ - if (cs461x_peekBA0(card, BA0_ACCTL) & ACCTL_DCV) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: AC'97 write problem, reg = 0x%x, val = 0x%x\n", reg, val)); - } - - spin_unlock(&card->ac97_lock); - - /* - * Adjust power if the mixer is selected/deselected according - * to the CD. - * - * IF the CD is a valid input source (mixer or direct) AND - * the CD is not muted THEN power is needed - * - * We do two things. When record select changes the input to - * add/remove the CD we adjust the power count if the CD is - * unmuted. - * - * When the CD mute changes we adjust the power level if the - * CD was a valid input. - * - * We also check for CD volume != 0, as the CD mute isn't - * normally tweaked from userspace. - */ - - /* CD mute change ? */ - - if (reg == AC97_CD_VOL) { - /* Mute bit change ? */ - if ((val2^val) & 0x8000 || - ((val2 == 0x1f1f || val == 0x1f1f) && val2 != val)) { - /* This is a hack but its cleaner than the alternatives. - Right now card->ac97_codec[0] might be NULL as we are - still doing codec setup. This does an early assignment - to avoid the problem if it occurs */ - - if (card->ac97_codec[0] == NULL) - card->ac97_codec[0] = dev; - - /* Mute on */ - if (val & 0x8000 || val == 0x1f1f) - card->amplifier_ctrl(card, -1); - else { /* Mute off power on */ - if (card->amp_init) - card->amp_init(card); - card->amplifier_ctrl(card, 1); - } - } - } -} - -/* OSS /dev/mixer file operation methods */ - -static int cs_open_mixdev(struct inode *inode, struct file *file) -{ - int i = 0; - unsigned int minor = iminor(inode); - struct cs_card *card = NULL; - struct list_head *entry; - unsigned int tmp; - - CS_DBGOUT(CS_FUNCTION | CS_OPEN, 4, - printk(KERN_INFO "cs46xx: cs_open_mixdev()+\n")); - - list_for_each(entry, &cs46xx_devs) { - card = list_entry(entry, struct cs_card, list); - for (i = 0; i < NR_AC97; i++) - if (card->ac97_codec[i] != NULL && - card->ac97_codec[i]->dev_mixer == minor) - goto match; - } - if (!card) { - CS_DBGOUT(CS_FUNCTION | CS_OPEN | CS_ERROR, 2, - printk(KERN_INFO "cs46xx: cs46xx_open_mixdev()- -ENODEV\n")); - return -ENODEV; - } - match: - if (!card->ac97_codec[i]) - return -ENODEV; - file->private_data = card->ac97_codec[i]; - - card->active_ctrl(card,1); - if (!CS_IN_USE(&card->mixer_use_cnt)) { - if ((tmp = cs46xx_powerup(card, CS_POWER_MIXVON))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs_open_mixdev() powerup failure (0x%x)\n", tmp)); - return -EIO; - } - } - card->amplifier_ctrl(card, 1); - CS_INC_USE_COUNT(&card->mixer_use_cnt); - CS_DBGOUT(CS_FUNCTION | CS_OPEN, 4, - printk(KERN_INFO "cs46xx: cs_open_mixdev()- 0\n")); - return nonseekable_open(inode, file); -} - -static int cs_release_mixdev(struct inode *inode, struct file *file) -{ - unsigned int minor = iminor(inode); - struct cs_card *card = NULL; - struct list_head *entry; - int i; - unsigned int tmp; - - CS_DBGOUT(CS_FUNCTION | CS_RELEASE, 4, - printk(KERN_INFO "cs46xx: cs_release_mixdev()+\n")); - list_for_each(entry, &cs46xx_devs) - { - card = list_entry(entry, struct cs_card, list); - for (i = 0; i < NR_AC97; i++) - if (card->ac97_codec[i] != NULL && - card->ac97_codec[i]->dev_mixer == minor) - goto match; - } - if (!card) { - CS_DBGOUT(CS_FUNCTION | CS_OPEN | CS_ERROR, 2, - printk(KERN_INFO "cs46xx: cs46xx_open_mixdev()- -ENODEV\n")); - return -ENODEV; - } -match: - if (!CS_DEC_AND_TEST(&card->mixer_use_cnt)) { - CS_DBGOUT(CS_FUNCTION | CS_RELEASE, 4, - printk(KERN_INFO "cs46xx: cs_release_mixdev()- no powerdown, usecnt>0\n")); - card->active_ctrl(card, -1); - card->amplifier_ctrl(card, -1); - return 0; - } -/* -* ok, no outstanding mixer opens, so powerdown. -*/ - if ((tmp = cs461x_powerdown(card, CS_POWER_MIXVON, CS_FALSE))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs_release_mixdev() powerdown MIXVON failure (0x%x)\n", tmp)); - card->active_ctrl(card, -1); - card->amplifier_ctrl(card, -1); - return -EIO; - } - card->active_ctrl(card, -1); - card->amplifier_ctrl(card, -1); - CS_DBGOUT(CS_FUNCTION | CS_RELEASE, 4, - printk(KERN_INFO "cs46xx: cs_release_mixdev()- 0\n")); - return 0; -} - -static int cs_ioctl_mixdev(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg) -{ - struct ac97_codec *codec = file->private_data; - struct cs_card *card = NULL; - struct list_head *entry; - unsigned long __user *p = (long __user *)arg; -#if CSDEBUG_INTERFACE - int val; - - if ( (cmd == SOUND_MIXER_CS_GETDBGMASK) || - (cmd == SOUND_MIXER_CS_SETDBGMASK) || - (cmd == SOUND_MIXER_CS_GETDBGLEVEL) || - (cmd == SOUND_MIXER_CS_SETDBGLEVEL) || - (cmd == SOUND_MIXER_CS_APM)) { - switch (cmd) { - case SOUND_MIXER_CS_GETDBGMASK: - return put_user(cs_debugmask, p); - case SOUND_MIXER_CS_GETDBGLEVEL: - return put_user(cs_debuglevel, p); - case SOUND_MIXER_CS_SETDBGMASK: - if (get_user(val, p)) - return -EFAULT; - cs_debugmask = val; - return 0; - case SOUND_MIXER_CS_SETDBGLEVEL: - if (get_user(val, p)) - return -EFAULT; - cs_debuglevel = val; - return 0; - case SOUND_MIXER_CS_APM: - if (get_user(val, p)) - return -EFAULT; - if (val == CS_IOCTL_CMD_SUSPEND) { - list_for_each(entry, &cs46xx_devs) { - card = list_entry(entry, struct cs_card, list); - cs46xx_suspend(card, PMSG_ON); - } - - } else if (val == CS_IOCTL_CMD_RESUME) { - list_for_each(entry, &cs46xx_devs) { - card = list_entry(entry, struct cs_card, list); - cs46xx_resume(card); - } - } else { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO - "cs46xx: mixer_ioctl(): invalid APM cmd (%d)\n", - val)); - } - return 0; - default: - CS_DBGOUT(CS_ERROR, 1, printk(KERN_INFO - "cs46xx: mixer_ioctl(): ERROR unknown debug cmd\n")); - return 0; - } - } -#endif - return codec->mixer_ioctl(codec, cmd, arg); -} - -static /*const*/ struct file_operations cs_mixer_fops = { - CS_OWNER CS_THIS_MODULE - .llseek = no_llseek, - .ioctl = cs_ioctl_mixdev, - .open = cs_open_mixdev, - .release = cs_release_mixdev, -}; - -/* AC97 codec initialisation. */ -static int __init cs_ac97_init(struct cs_card *card) -{ - int num_ac97 = 0; - int ready_2nd = 0; - struct ac97_codec *codec; - u16 eid; - - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_ac97_init()+\n") ); - - for (num_ac97 = 0; num_ac97 < NR_AC97; num_ac97++) { - if ((codec = ac97_alloc_codec()) == NULL) - return -ENOMEM; - - /* initialize some basic codec information, other fields will be filled - in ac97_probe_codec */ - codec->private_data = card; - codec->id = num_ac97; - - codec->codec_read = cs_ac97_get; - codec->codec_write = cs_ac97_set; - - if (ac97_probe_codec(codec) == 0) { - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_ac97_init()- codec number %d not found\n", - num_ac97) ); - card->ac97_codec[num_ac97] = NULL; - break; - } - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_ac97_init() found codec %d\n",num_ac97)); - - eid = cs_ac97_get(codec, AC97_EXTENDED_ID); - - if (eid == 0xFFFF) { - printk(KERN_WARNING "cs46xx: codec %d not present\n",num_ac97); - ac97_release_codec(codec); - break; - } - - card->ac97_features = eid; - - if ((codec->dev_mixer = register_sound_mixer(&cs_mixer_fops, -1)) < 0) { - printk(KERN_ERR "cs46xx: couldn't register mixer!\n"); - ac97_release_codec(codec); - break; - } - card->ac97_codec[num_ac97] = codec; - - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_ac97_init() ac97_codec[%d] set to %p\n", - (unsigned int)num_ac97, - codec)); - /* if there is no secondary codec at all, don't probe any more */ - if (!ready_2nd) - { - num_ac97 += 1; - break; - } - } - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_ac97_init()- %d\n", (unsigned int)num_ac97)); - return num_ac97; -} - -/* - * load the static image into the DSP - */ -#include "cs461x_image.h" -static void cs461x_download_image(struct cs_card *card) -{ - unsigned i, j, temp1, temp2, offset, count; - unsigned char __iomem *pBA1 = ioremap(card->ba1_addr, 0x40000); - for (i = 0; i < CLEAR__COUNT; i++) { - offset = ClrStat[i].BA1__DestByteOffset; - count = ClrStat[i].BA1__SourceSize; - for (temp1 = offset; temp1 < (offset + count); temp1 += 4) - writel(0, pBA1+temp1); - } - - for (i = 0; i < FILL__COUNT; i++) { - temp2 = FillStat[i].Offset; - for (j = 0; j < (FillStat[i].Size) / 4; j++) { - temp1 = (FillStat[i]).pFill[j]; - writel(temp1, pBA1+temp2 + j * 4); - } - } - iounmap(pBA1); -} - -/* - * Chip reset - */ - -static void cs461x_reset(struct cs_card *card) -{ - int idx; - - /* - * Write the reset bit of the SP control register. - */ - cs461x_poke(card, BA1_SPCR, SPCR_RSTSP); - - /* - * Write the control register. - */ - cs461x_poke(card, BA1_SPCR, SPCR_DRQEN); - - /* - * Clear the trap registers. - */ - for (idx = 0; idx < 8; idx++) { - cs461x_poke(card, BA1_DREG, DREG_REGID_TRAP_SELECT + idx); - cs461x_poke(card, BA1_TWPR, 0xFFFF); - } - cs461x_poke(card, BA1_DREG, 0); - - /* - * Set the frame timer to reflect the number of cycles per frame. - */ - cs461x_poke(card, BA1_FRMT, 0xadf); -} - -static void cs461x_clear_serial_FIFOs(struct cs_card *card, int type) -{ - int idx, loop, startfifo=0, endfifo=0, powerdown1 = 0; - unsigned int tmp; - - /* - * See if the devices are powered down. If so, we must power them up first - * or they will not respond. - */ - if (!((tmp = cs461x_peekBA0(card, BA0_CLKCR1)) & CLKCR1_SWCE)) { - cs461x_pokeBA0(card, BA0_CLKCR1, tmp | CLKCR1_SWCE); - powerdown1 = 1; - } - - /* - * We want to clear out the serial port FIFOs so we don't end up playing - * whatever random garbage happens to be in them. We fill the sample FIFOS - * with zero (silence). - */ - cs461x_pokeBA0(card, BA0_SERBWP, 0); - - /* - * Check for which FIFO locations to clear, if we are currently - * playing or capturing then we don't want to put in 128 bytes of - * "noise". - */ - if (type & CS_TYPE_DAC) { - startfifo = 128; - endfifo = 256; - } - if (type & CS_TYPE_ADC) { - startfifo = 0; - if (!endfifo) - endfifo = 128; - } - /* - * Fill sample FIFO locations (256 locations total). - */ - for (idx = startfifo; idx < endfifo; idx++) { - /* - * Make sure the previous FIFO write operation has completed. - */ - for (loop = 0; loop < 5; loop++) { - udelay(50); - if (!(cs461x_peekBA0(card, BA0_SERBST) & SERBST_WBSY)) - break; - } - if (cs461x_peekBA0(card, BA0_SERBST) & SERBST_WBSY) { - if (powerdown1) - cs461x_pokeBA0(card, BA0_CLKCR1, tmp); - } - /* - * Write the serial port FIFO index. - */ - cs461x_pokeBA0(card, BA0_SERBAD, idx); - /* - * Tell the serial port to load the new value into the FIFO location. - */ - cs461x_pokeBA0(card, BA0_SERBCM, SERBCM_WRC); - } - /* - * Now, if we powered up the devices, then power them back down again. - * This is kinda ugly, but should never happen. - */ - if (powerdown1) - cs461x_pokeBA0(card, BA0_CLKCR1, tmp); -} - - -static int cs461x_powerdown(struct cs_card *card, unsigned int type, int suspendflag) -{ - int count; - unsigned int tmp=0,muted=0; - - CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO - "cs46xx: cs461x_powerdown()+ type=0x%x\n",type)); - if (!cs_powerdown && !suspendflag) { - CS_DBGOUT(CS_FUNCTION, 8, printk(KERN_INFO - "cs46xx: cs461x_powerdown() DISABLED exiting\n")); - return 0; - } - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - CS_DBGOUT(CS_FUNCTION, 8, printk(KERN_INFO - "cs46xx: cs461x_powerdown() powerdown reg=0x%x\n",tmp)); -/* -* if powering down only the VREF, and not powering down the DAC/ADC, -* then do not power down the VREF, UNLESS both the DAC and ADC are not -* currently powered down. If powering down DAC and ADC, then -* it is possible to power down the VREF (ON). -*/ - if (((type & CS_POWER_MIXVON) && - (!(type & CS_POWER_ADC) || (!(type & CS_POWER_DAC)))) - && - ((tmp & CS_AC97_POWER_CONTROL_ADC_ON) || - (tmp & CS_AC97_POWER_CONTROL_DAC_ON))) { - CS_DBGOUT(CS_FUNCTION, 8, printk(KERN_INFO - "cs46xx: cs461x_powerdown()- 0 unable to powerdown. tmp=0x%x\n",tmp)); - return 0; - } -/* -* for now, always keep power to the mixer block. -* not sure why it's a problem but it seems to be if we power off. -*/ - type &= ~CS_POWER_MIXVON; - type &= ~CS_POWER_MIXVOFF; - - /* - * Power down indicated areas. - */ - if (type & CS_POWER_MIXVOFF) { - - CS_DBGOUT(CS_FUNCTION, 4, - printk(KERN_INFO "cs46xx: cs461x_powerdown()+ MIXVOFF\n")); - /* - * Power down the MIXER (VREF ON) on the AC97 card. - */ - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_MIXVOFF_ON) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp |= CS_AC97_POWER_CONTROL_MIXVOFF; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVOFF_ON)) - break; - } - - /* - * Check the status.. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVOFF_ON) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerdown MIXVOFF failed\n")); - return 1; - } - } - } - if (type & CS_POWER_MIXVON) { - - CS_DBGOUT(CS_FUNCTION, 4, - printk(KERN_INFO "cs46xx: cs461x_powerdown()+ MIXVON\n")); - /* - * Power down the MIXER (VREF ON) on the AC97 card. - */ - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_MIXVON_ON) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp |= CS_AC97_POWER_CONTROL_MIXVON; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp); - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVON_ON)) - break; - } - - /* - * Check the status.. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVON_ON) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerdown MIXVON failed\n")); - return 1; - } - } - } - if (type & CS_POWER_ADC) { - /* - * Power down the ADC on the AC97 card. - */ - CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs461x_powerdown()+ ADC\n")); - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_ADC_ON) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp |= CS_AC97_POWER_CONTROL_ADC; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp); - - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_ADC_ON)) - break; - } - - /* - * Check the status.. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_ADC_ON) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerdown ADC failed\n")); - return 1; - } - } - } - if (type & CS_POWER_DAC) { - /* - * Power down the DAC on the AC97 card. - */ - - CS_DBGOUT(CS_FUNCTION, 4, - printk(KERN_INFO "cs46xx: cs461x_powerdown()+ DAC\n")); - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (tmp & CS_AC97_POWER_CONTROL_DAC_ON) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp |= CS_AC97_POWER_CONTROL_DAC; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp); - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_DAC_ON)) - break; - } - - /* - * Check the status.. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_DAC_ON) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerdown DAC failed\n")); - return 1; - } - } - } - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (muted) - cs_mute(card, CS_FALSE); - CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO - "cs46xx: cs461x_powerdown()- 0 tmp=0x%x\n",tmp)); - return 0; -} - -static int cs46xx_powerup(struct cs_card *card, unsigned int type) -{ - int count; - unsigned int tmp = 0, muted = 0; - - CS_DBGOUT(CS_FUNCTION, 8, printk(KERN_INFO - "cs46xx: cs46xx_powerup()+ type=0x%x\n",type)); - /* - * check for VREF and powerup if need to. - */ - if (type & CS_POWER_MIXVON) - type |= CS_POWER_MIXVOFF; - if (type & (CS_POWER_DAC | CS_POWER_ADC)) - type |= CS_POWER_MIXVON | CS_POWER_MIXVOFF; - - /* - * Power up indicated areas. - */ - if (type & CS_POWER_MIXVOFF) { - - CS_DBGOUT(CS_FUNCTION, 4, - printk(KERN_INFO "cs46xx: cs46xx_powerup()+ MIXVOFF\n")); - /* - * Power up the MIXER (VREF ON) on the AC97 card. - */ - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_MIXVOFF_ON)) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp &= ~CS_AC97_POWER_CONTROL_MIXVOFF; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVOFF_ON) - break; - } - - /* - * Check the status.. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVOFF_ON)) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerup MIXVOFF failed\n")); - return 1; - } - } - } - if(type & CS_POWER_MIXVON) { - - CS_DBGOUT(CS_FUNCTION, 4, - printk(KERN_INFO "cs46xx: cs46xx_powerup()+ MIXVON\n")); - /* - * Power up the MIXER (VREF ON) on the AC97 card. - */ - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_MIXVON_ON)) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp &= ~CS_AC97_POWER_CONTROL_MIXVON; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVON_ON) - break; - } - - /* - * Check the status.. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_MIXVON_ON)) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerup MIXVON failed\n")); - return 1; - } - } - } - if (type & CS_POWER_ADC) { - /* - * Power up the ADC on the AC97 card. - */ - CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO "cs46xx: cs46xx_powerup()+ ADC\n")); - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_ADC_ON)) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp &= ~CS_AC97_POWER_CONTROL_ADC; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); - - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_ADC_ON) - break; - } - - /* - * Check the status.. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_ADC_ON)) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerup ADC failed\n")); - return 1; - } - } - } - if (type & CS_POWER_DAC) { - /* - * Power up the DAC on the AC97 card. - */ - - CS_DBGOUT(CS_FUNCTION, 4, - printk(KERN_INFO "cs46xx: cs46xx_powerup()+ DAC\n")); - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (!(tmp & CS_AC97_POWER_CONTROL_DAC_ON)) { - if (!muted) { - cs_mute(card, CS_TRUE); - muted = 1; - } - tmp &= ~CS_AC97_POWER_CONTROL_DAC; - cs_ac97_set(card->ac97_codec[0], AC97_POWER_CONTROL, tmp ); - /* - * Now, we wait until we sample a ready state. - */ - for (count = 0; count < 32; count++) { - /* - * First, lets wait a short while to let things settle out a - * bit, and to prevent retrying the read too quickly. - */ - udelay(500); - - /* - * Read the current state of the power control register. - */ - if (cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_DAC_ON) - break; - } - - /* - * Check the status.. - */ - if (!(cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL) & - CS_AC97_POWER_CONTROL_DAC_ON)) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_WARNING - "cs46xx: powerup DAC failed\n")); - return 1; - } - } - } - tmp = cs_ac97_get(card->ac97_codec[0], AC97_POWER_CONTROL); - if (muted) - cs_mute(card, CS_FALSE); - CS_DBGOUT(CS_FUNCTION, 4, printk(KERN_INFO - "cs46xx: cs46xx_powerup()- 0 tmp=0x%x\n",tmp)); - return 0; -} - -static void cs461x_proc_start(struct cs_card *card) -{ - int cnt; - - /* - * Set the frame timer to reflect the number of cycles per frame. - */ - cs461x_poke(card, BA1_FRMT, 0xadf); - /* - * Turn on the run, run at frame, and DMA enable bits in the local copy of - * the SP control register. - */ - cs461x_poke(card, BA1_SPCR, SPCR_RUN | SPCR_RUNFR | SPCR_DRQEN); - /* - * Wait until the run at frame bit resets itself in the SP control - * register. - */ - for (cnt = 0; cnt < 25; cnt++) { - udelay(50); - if (!(cs461x_peek(card, BA1_SPCR) & SPCR_RUNFR)) - break; - } - - if (cs461x_peek(card, BA1_SPCR) & SPCR_RUNFR) - printk(KERN_WARNING "cs46xx: SPCR_RUNFR never reset\n"); -} - -static void cs461x_proc_stop(struct cs_card *card) -{ - /* - * Turn off the run, run at frame, and DMA enable bits in the local copy of - * the SP control register. - */ - cs461x_poke(card, BA1_SPCR, 0); -} - -static int cs_hardware_init(struct cs_card *card) -{ - unsigned long end_time; - unsigned int tmp,count; - - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_hardware_init()+\n") ); - /* - * First, blast the clock control register to zero so that the PLL starts - * out in a known state, and blast the master serial port control register - * to zero so that the serial ports also start out in a known state. - */ - cs461x_pokeBA0(card, BA0_CLKCR1, 0); - cs461x_pokeBA0(card, BA0_SERMC1, 0); - - /* - * If we are in AC97 mode, then we must set the part to a host controlled - * AC-link. Otherwise, we won't be able to bring up the link. - */ - cs461x_pokeBA0(card, BA0_SERACC, SERACC_HSP | SERACC_CODEC_TYPE_1_03); /* 1.03 card */ - /* cs461x_pokeBA0(card, BA0_SERACC, SERACC_HSP | SERACC_CODEC_TYPE_2_0); */ /* 2.00 card */ - - /* - * Drive the ARST# pin low for a minimum of 1uS (as defined in the AC97 - * spec) and then drive it high. This is done for non AC97 modes since - * there might be logic external to the CS461x that uses the ARST# line - * for a reset. - */ - cs461x_pokeBA0(card, BA0_ACCTL, 1); - udelay(50); - cs461x_pokeBA0(card, BA0_ACCTL, 0); - udelay(50); - cs461x_pokeBA0(card, BA0_ACCTL, ACCTL_RSTN); - - /* - * The first thing we do here is to enable sync generation. As soon - * as we start receiving bit clock, we'll start producing the SYNC - * signal. - */ - cs461x_pokeBA0(card, BA0_ACCTL, ACCTL_ESYN | ACCTL_RSTN); - - /* - * Now wait for a short while to allow the AC97 part to start - * generating bit clock (so we don't try to start the PLL without an - * input clock). - */ - mdelay(5 * cs_laptop_wait); /* 1 should be enough ?? (and pigs might fly) */ - - /* - * Set the serial port timing configuration, so that - * the clock control circuit gets its clock from the correct place. - */ - cs461x_pokeBA0(card, BA0_SERMC1, SERMC1_PTC_AC97); - - /* - * The part seems to not be ready for a while after a resume. - * so, if we are resuming, then wait for 700 mils. Note that 600 mils - * is not enough for some platforms! tested on an IBM Thinkpads and - * reference cards. - */ - if (!(card->pm.flags & CS46XX_PM_IDLE)) - mdelay(initdelay); - /* - * Write the selected clock control setup to the hardware. Do not turn on - * SWCE yet (if requested), so that the devices clocked by the output of - * PLL are not clocked until the PLL is stable. - */ - cs461x_pokeBA0(card, BA0_PLLCC, PLLCC_LPF_1050_2780_KHZ | PLLCC_CDR_73_104_MHZ); - cs461x_pokeBA0(card, BA0_PLLM, 0x3a); - cs461x_pokeBA0(card, BA0_CLKCR2, CLKCR2_PDIVS_8); - - /* - * Power up the PLL. - */ - cs461x_pokeBA0(card, BA0_CLKCR1, CLKCR1_PLLP); - - /* - * Wait until the PLL has stabilized. - */ - mdelay(5 * cs_laptop_wait); /* Again 1 should be enough ?? */ - - /* - * Turn on clocking of the core so that we can setup the serial ports. - */ - tmp = cs461x_peekBA0(card, BA0_CLKCR1) | CLKCR1_SWCE; - cs461x_pokeBA0(card, BA0_CLKCR1, tmp); - - /* - * Fill the serial port FIFOs with silence. - */ - cs461x_clear_serial_FIFOs(card,CS_TYPE_DAC | CS_TYPE_ADC); - - /* - * Set the serial port FIFO pointer to the first sample in the FIFO. - */ - /* cs461x_pokeBA0(card, BA0_SERBSP, 0); */ - - /* - * Write the serial port configuration to the part. The master - * enable bit is not set until all other values have been written. - */ - cs461x_pokeBA0(card, BA0_SERC1, SERC1_SO1F_AC97 | SERC1_SO1EN); - cs461x_pokeBA0(card, BA0_SERC2, SERC2_SI1F_AC97 | SERC1_SO1EN); - cs461x_pokeBA0(card, BA0_SERMC1, SERMC1_PTC_AC97 | SERMC1_MSPE); - - - mdelay(5 * cs_laptop_wait); /* Shouldnt be needed ?? */ - -/* -* If we are resuming under 2.2.x then we cannot schedule a timeout, -* so just spin the CPU. -*/ - if (card->pm.flags & CS46XX_PM_IDLE) { - /* - * Wait for the card ready signal from the AC97 card. - */ - end_time = jiffies + 3 * (HZ >> 2); - do { - /* - * Read the AC97 status register to see if we've seen a CODEC READY - * signal from the AC97 card. - */ - if (cs461x_peekBA0(card, BA0_ACSTS) & ACSTS_CRDY) - break; - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(1); - } while (time_before(jiffies, end_time)); - } else { - for (count = 0; count < 100; count++) { - // First, we want to wait for a short time. - udelay(25 * cs_laptop_wait); - - if (cs461x_peekBA0(card, BA0_ACSTS) & ACSTS_CRDY) - break; - } - } - - /* - * Make sure CODEC is READY. - */ - if (!(cs461x_peekBA0(card, BA0_ACSTS) & ACSTS_CRDY)) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_WARNING - "cs46xx: create - never read card ready from AC'97\n")); - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_WARNING - "cs46xx: probably not a bug, try using the CS4232 driver,\n")); - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_WARNING - "cs46xx: or turn off any automatic Power Management support in the BIOS.\n")); - return -EIO; - } - - /* - * Assert the vaid frame signal so that we can start sending commands - * to the AC97 card. - */ - cs461x_pokeBA0(card, BA0_ACCTL, ACCTL_VFRM | ACCTL_ESYN | ACCTL_RSTN); - - if (card->pm.flags & CS46XX_PM_IDLE) { - /* - * Wait until we've sampled input slots 3 and 4 as valid, meaning that - * the card is pumping ADC data across the AC-link. - */ - end_time = jiffies + 3 * (HZ >> 2); - do { - /* - * Read the input slot valid register and see if input slots 3 and - * 4 are valid yet. - */ - if ((cs461x_peekBA0(card, BA0_ACISV) & (ACISV_ISV3 | ACISV_ISV4)) == (ACISV_ISV3 | ACISV_ISV4)) - break; - current->state = TASK_UNINTERRUPTIBLE; - schedule_timeout(1); - } while (time_before(jiffies, end_time)); - } else { - for (count = 0; count < 100; count++) { - // First, we want to wait for a short time. - udelay(25 * cs_laptop_wait); - - if ((cs461x_peekBA0(card, BA0_ACISV) & (ACISV_ISV3 | ACISV_ISV4)) == (ACISV_ISV3 | ACISV_ISV4)) - break; - } - } - /* - * Make sure input slots 3 and 4 are valid. If not, then return - * an error. - */ - if ((cs461x_peekBA0(card, BA0_ACISV) & (ACISV_ISV3 | ACISV_ISV4)) != (ACISV_ISV3 | ACISV_ISV4)) { - printk(KERN_WARNING "cs46xx: create - never read ISV3 & ISV4 from AC'97\n"); - return -EIO; - } - - /* - * Now, assert valid frame and the slot 3 and 4 valid bits. This will - * commense the transfer of digital audio data to the AC97 card. - */ - cs461x_pokeBA0(card, BA0_ACOSV, ACOSV_SLV3 | ACOSV_SLV4); - - /* - * Turn off the Processor by turning off the software clock enable flag in - * the clock control register. - */ - /* tmp = cs461x_peekBA0(card, BA0_CLKCR1) & ~CLKCR1_SWCE; */ - /* cs461x_pokeBA0(card, BA0_CLKCR1, tmp); */ - - /* - * Reset the processor. - */ - cs461x_reset(card); - - /* - * Download the image to the processor. - */ - - cs461x_download_image(card); - - /* - * Stop playback DMA. - */ - tmp = cs461x_peek(card, BA1_PCTL); - card->pctl = tmp & 0xffff0000; - cs461x_poke(card, BA1_PCTL, tmp & 0x0000ffff); - - /* - * Stop capture DMA. - */ - tmp = cs461x_peek(card, BA1_CCTL); - card->cctl = tmp & 0x0000ffff; - cs461x_poke(card, BA1_CCTL, tmp & 0xffff0000); - - /* initialize AC97 codec and register /dev/mixer */ - if (card->pm.flags & CS46XX_PM_IDLE) { - if (cs_ac97_init(card) <= 0) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs_ac97_init() failure\n")); - return -EIO; - } - } else { - cs46xx_ac97_resume(card); - } - - cs461x_proc_start(card); - - /* - * Enable interrupts on the part. - */ - cs461x_pokeBA0(card, BA0_HICR, HICR_IEV | HICR_CHGM); - - tmp = cs461x_peek(card, BA1_PFIE); - tmp &= ~0x0000f03f; - cs461x_poke(card, BA1_PFIE, tmp); /* playback interrupt enable */ - - tmp = cs461x_peek(card, BA1_CIE); - tmp &= ~0x0000003f; - tmp |= 0x00000001; - cs461x_poke(card, BA1_CIE, tmp); /* capture interrupt enable */ - - /* - * If IDLE then Power down the part. We will power components up - * when we need them. - */ - if (card->pm.flags & CS46XX_PM_IDLE) { - if (!cs_powerdown) { - if ((tmp = cs46xx_powerup(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs461x_powerup() failure (0x%x)\n",tmp) ); - return -EIO; - } - } else { - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON, CS_FALSE))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs461x_powerdown() failure (0x%x)\n",tmp) ); - return -EIO; - } - } - } - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, printk(KERN_INFO - "cs46xx: cs_hardware_init()- 0\n")); - return 0; -} - -/* install the driver, we do not allocate hardware channel nor DMA buffer now, they are defered - until "ACCESS" time (in prog_dmabuf called by open/read/write/ioctl/mmap) */ - -/* - * Card subid table - */ - -struct cs_card_type -{ - u16 vendor; - u16 id; - char *name; - void (*amp)(struct cs_card *, int); - void (*amp_init)(struct cs_card *); - void (*active)(struct cs_card *, int); -}; - -static struct cs_card_type cards[] = { - { - .vendor = 0x1489, - .id = 0x7001, - .name = "Genius Soundmaker 128 value", - .amp = amp_none, - }, - { - .vendor = 0x5053, - .id = 0x3357, - .name = "Voyetra", - .amp = amp_voyetra, - }, - { - .vendor = 0x1071, - .id = 0x6003, - .name = "Mitac MI6020/21", - .amp = amp_voyetra, - }, - { - .vendor = 0x14AF, - .id = 0x0050, - .name = "Hercules Game Theatre XP", - .amp = amp_hercules, - }, - { - .vendor = 0x1681, - .id = 0x0050, - .name = "Hercules Game Theatre XP", - .amp = amp_hercules, - }, - { - .vendor = 0x1681, - .id = 0x0051, - .name = "Hercules Game Theatre XP", - .amp = amp_hercules, - }, - { - .vendor = 0x1681, - .id = 0x0052, - .name = "Hercules Game Theatre XP", - .amp = amp_hercules, - }, - { - .vendor = 0x1681, - .id = 0x0053, - .name = "Hercules Game Theatre XP", - .amp = amp_hercules, - }, - { - .vendor = 0x1681, - .id = 0x0054, - .name = "Hercules Game Theatre XP", - .amp = amp_hercules, - }, - { - .vendor = 0x1681, - .id = 0xa010, - .name = "Hercules Fortissimo II", - .amp = amp_none, - }, - /* Not sure if the 570 needs the clkrun hack */ - { - .vendor = PCI_VENDOR_ID_IBM, - .id = 0x0132, - .name = "Thinkpad 570", - .amp = amp_none, - .active = clkrun_hack, - }, - { - .vendor = PCI_VENDOR_ID_IBM, - .id = 0x0153, - .name = "Thinkpad 600X/A20/T20", - .amp = amp_none, - .active = clkrun_hack, - }, - { - .vendor = PCI_VENDOR_ID_IBM, - .id = 0x1010, - .name = "Thinkpad 600E (unsupported)", - }, - { - .name = "Card without SSID set", - }, - { 0, }, -}; - -MODULE_AUTHOR("Alan Cox , Jaroslav Kysela, "); -MODULE_DESCRIPTION("Crystal SoundFusion Audio Support"); -MODULE_LICENSE("GPL"); - -static const char cs46xx_banner[] = KERN_INFO "Crystal 4280/46xx + AC97 Audio, version " CS46XX_MAJOR_VERSION "." CS46XX_MINOR_VERSION "." CS46XX_ARCH ", " __TIME__ " " __DATE__ "\n"; -static const char fndmsg[] = KERN_INFO "cs46xx: Found %d audio device(s).\n"; - -static int __devinit cs46xx_probe(struct pci_dev *pci_dev, - const struct pci_device_id *pciid) -{ - int i, j; - u16 ss_card, ss_vendor; - struct cs_card *card; - dma_addr_t dma_mask; - struct cs_card_type *cp = &cards[0]; - - CS_DBGOUT(CS_FUNCTION | CS_INIT, 2, - printk(KERN_INFO "cs46xx: probe()+\n")); - - dma_mask = 0xffffffff; /* this enables playback and recording */ - if (pci_enable_device(pci_dev)) { - CS_DBGOUT(CS_INIT | CS_ERROR, 1, printk(KERN_ERR - "cs46xx: pci_enable_device() failed\n")); - return -1; - } - if (!RSRCISMEMORYREGION(pci_dev, 0) || - !RSRCISMEMORYREGION(pci_dev, 1)) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_ERR - "cs46xx: probe()- Memory region not assigned\n")); - return -1; - } - if (pci_dev->irq == 0) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_ERR - "cs46xx: probe() IRQ not assigned\n")); - return -1; - } - if (!pci_dma_supported(pci_dev, 0xffffffff)) { - CS_DBGOUT(CS_ERROR, 1, printk(KERN_ERR - "cs46xx: probe() architecture does not support 32bit PCI busmaster DMA\n")); - return -1; - } - pci_read_config_word(pci_dev, PCI_SUBSYSTEM_VENDOR_ID, &ss_vendor); - pci_read_config_word(pci_dev, PCI_SUBSYSTEM_ID, &ss_card); - - if ((card = kzalloc(sizeof(struct cs_card), GFP_KERNEL)) == NULL) { - printk(KERN_ERR "cs46xx: out of memory\n"); - return -ENOMEM; - } - card->ba0_addr = RSRCADDRESS(pci_dev, 0); - card->ba1_addr = RSRCADDRESS(pci_dev, 1); - card->pci_dev = pci_dev; - card->irq = pci_dev->irq; - card->magic = CS_CARD_MAGIC; - spin_lock_init(&card->lock); - spin_lock_init(&card->ac97_lock); - - pci_set_master(pci_dev); - - printk(cs46xx_banner); - printk(KERN_INFO "cs46xx: Card found at 0x%08lx and 0x%08lx, IRQ %d\n", - card->ba0_addr, card->ba1_addr, card->irq); - - card->alloc_pcm_channel = cs_alloc_pcm_channel; - card->alloc_rec_pcm_channel = cs_alloc_rec_pcm_channel; - card->free_pcm_channel = cs_free_pcm_channel; - card->amplifier_ctrl = amp_none; - card->active_ctrl = amp_none; - - while (cp->name) - { - if (cp->vendor == ss_vendor && cp->id == ss_card) { - card->amplifier_ctrl = cp->amp; - if (cp->active) - card->active_ctrl = cp->active; - if (cp->amp_init) - card->amp_init = cp->amp_init; - break; - } - cp++; - } - if (cp->name == NULL) { - printk(KERN_INFO "cs46xx: Unknown card (%04X:%04X) at 0x%08lx/0x%08lx, IRQ %d\n", - ss_vendor, ss_card, card->ba0_addr, card->ba1_addr, card->irq); - } else { - printk(KERN_INFO "cs46xx: %s (%04X:%04X) at 0x%08lx/0x%08lx, IRQ %d\n", - cp->name, ss_vendor, ss_card, card->ba0_addr, card->ba1_addr, card->irq); - } - - if (card->amplifier_ctrl == NULL) { - card->amplifier_ctrl = amp_none; - card->active_ctrl = clkrun_hack; - } - - if (external_amp == 1) { - printk(KERN_INFO "cs46xx: Crystal EAPD support forced on.\n"); - card->amplifier_ctrl = amp_voyetra; - } - - if (thinkpad == 1) { - printk(KERN_INFO "cs46xx: Activating CLKRUN hack for Thinkpad.\n"); - card->active_ctrl = clkrun_hack; - } -/* -* The thinkpads don't work well without runtime updating on their kernel -* delay values (or any laptop with variable CPU speeds really). -* so, just to be safe set the init delay to 2100. Eliminates -* failures on T21 Thinkpads. remove this code when the udelay -* and mdelay kernel code is replaced by a pm timer, or the delays -* work well for battery and/or AC power both. -*/ - if (card->active_ctrl == clkrun_hack) { - initdelay = 2100; - cs_laptop_wait = 5; - } - if ((card->active_ctrl == clkrun_hack) && !(powerdown == 1)) { -/* -* for some currently unknown reason, powering down the DAC and ADC component -* blocks on thinkpads causes some funky behavior... distoorrrtion and ac97 -* codec access problems. probably the serial clock becomes unsynced. -* added code to sync the chips back up, but only helped about 70% the time. -*/ - cs_powerdown = 0; - } - if (powerdown == 0) - cs_powerdown = 0; - card->active_ctrl(card, 1); - - /* claim our iospace and irq */ - - card->ba0 = ioremap_nocache(card->ba0_addr, CS461X_BA0_SIZE); - card->ba1.name.data0 = ioremap_nocache(card->ba1_addr + BA1_SP_DMEM0, CS461X_BA1_DATA0_SIZE); - card->ba1.name.data1 = ioremap_nocache(card->ba1_addr + BA1_SP_DMEM1, CS461X_BA1_DATA1_SIZE); - card->ba1.name.pmem = ioremap_nocache(card->ba1_addr + BA1_SP_PMEM, CS461X_BA1_PRG_SIZE); - card->ba1.name.reg = ioremap_nocache(card->ba1_addr + BA1_SP_REG, CS461X_BA1_REG_SIZE); - - CS_DBGOUT(CS_INIT, 4, printk(KERN_INFO - "cs46xx: card=%p card->ba0=%p\n",card,card->ba0) ); - CS_DBGOUT(CS_INIT, 4, printk(KERN_INFO - "cs46xx: card->ba1=%p %p %p %p\n", - card->ba1.name.data0, - card->ba1.name.data1, - card->ba1.name.pmem, - card->ba1.name.reg) ); - - if (card->ba0 == 0 || card->ba1.name.data0 == 0 || - card->ba1.name.data1 == 0 || card->ba1.name.pmem == 0 || - card->ba1.name.reg == 0) - goto fail2; - - if (request_irq(card->irq, &cs_interrupt, IRQF_SHARED, "cs46xx", card)) { - printk(KERN_ERR "cs46xx: unable to allocate irq %d\n", card->irq); - goto fail2; - } - /* register /dev/dsp */ - if ((card->dev_audio = register_sound_dsp(&cs461x_fops, -1)) < 0) { - printk(KERN_ERR "cs46xx: unable to register dsp\n"); - goto fail; - } - - /* register /dev/midi */ - if ((card->dev_midi = register_sound_midi(&cs_midi_fops, -1)) < 0) - printk(KERN_ERR "cs46xx: unable to register midi\n"); - - card->pm.flags |= CS46XX_PM_IDLE; - for (i = 0; i < 5; i++) { - if (cs_hardware_init(card) != 0) { - CS_DBGOUT(CS_ERROR, 4, printk( - "cs46xx: ERROR in cs_hardware_init()... retrying\n")); - for (j = 0; j < NR_AC97; j++) - if (card->ac97_codec[j] != NULL) { - unregister_sound_mixer(card->ac97_codec[j]->dev_mixer); - ac97_release_codec(card->ac97_codec[j]); - } - mdelay(10 * cs_laptop_wait); - continue; - } - break; - } - if(i >= 4) { - CS_DBGOUT(CS_PM | CS_ERROR, 1, printk( - "cs46xx: cs46xx_probe()- cs_hardware_init() failed, retried %d times.\n",i)); - unregister_sound_dsp(card->dev_audio); - if (card->dev_midi) - unregister_sound_midi(card->dev_midi); - goto fail; - } - - init_waitqueue_head(&card->midi.open_wait); - mutex_init(&card->midi.open_mutex); - init_waitqueue_head(&card->midi.iwait); - init_waitqueue_head(&card->midi.owait); - cs461x_pokeBA0(card, BA0_MIDCR, MIDCR_MRST); - cs461x_pokeBA0(card, BA0_MIDCR, 0); - - /* - * Check if we have to init the amplifier, but probably already done - * since the CD logic in the ac97 init code will turn on the ext amp. - */ - if (cp->amp_init) - cp->amp_init(card); - card->active_ctrl(card, -1); - - PCI_SET_DRIVER_DATA(pci_dev, card); - PCI_SET_DMA_MASK(pci_dev, dma_mask); - list_add(&card->list, &cs46xx_devs); - - CS_DBGOUT(CS_PM, 9, printk(KERN_INFO "cs46xx: pm.flags=0x%x card=%p\n", - (unsigned)card->pm.flags,card)); - - CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO - "cs46xx: probe()- device allocated successfully\n")); - return 0; - -fail: - free_irq(card->irq, card); -fail2: - if (card->ba0) - iounmap(card->ba0); - if (card->ba1.name.data0) - iounmap(card->ba1.name.data0); - if (card->ba1.name.data1) - iounmap(card->ba1.name.data1); - if (card->ba1.name.pmem) - iounmap(card->ba1.name.pmem); - if (card->ba1.name.reg) - iounmap(card->ba1.name.reg); - kfree(card); - CS_DBGOUT(CS_INIT | CS_ERROR, 1, printk(KERN_INFO - "cs46xx: probe()- no device allocated\n")); - return -ENODEV; -} // probe_cs46xx - -// --------------------------------------------------------------------- - -static void __devexit cs46xx_remove(struct pci_dev *pci_dev) -{ - struct cs_card *card = PCI_GET_DRIVER_DATA(pci_dev); - int i; - unsigned int tmp; - - CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO - "cs46xx: cs46xx_remove()+\n")); - - card->active_ctrl(card,1); - - tmp = cs461x_peek(card, BA1_PFIE); - tmp &= ~0x0000f03f; - tmp |= 0x00000010; - cs461x_poke(card, BA1_PFIE, tmp); /* playback interrupt disable */ - - tmp = cs461x_peek(card, BA1_CIE); - tmp &= ~0x0000003f; - tmp |= 0x00000011; - cs461x_poke(card, BA1_CIE, tmp); /* capture interrupt disable */ - - /* - * Stop playback DMA. - */ - tmp = cs461x_peek(card, BA1_PCTL); - cs461x_poke(card, BA1_PCTL, tmp & 0x0000ffff); - - /* - * Stop capture DMA. - */ - tmp = cs461x_peek(card, BA1_CCTL); - cs461x_poke(card, BA1_CCTL, tmp & 0xffff0000); - - /* - * Reset the processor. - */ - cs461x_reset(card); - - cs461x_proc_stop(card); - - /* - * Power down the DAC and ADC. We will power them up (if) when we need - * them. - */ - if ((tmp = cs461x_powerdown(card, CS_POWER_DAC | CS_POWER_ADC | - CS_POWER_MIXVON, CS_TRUE))) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk(KERN_INFO - "cs46xx: cs461x_powerdown() failure (0x%x)\n",tmp) ); - } - - /* - * Power down the PLL. - */ - cs461x_pokeBA0(card, BA0_CLKCR1, 0); - - /* - * Turn off the Processor by turning off the software clock enable flag in - * the clock control register. - */ - tmp = cs461x_peekBA0(card, BA0_CLKCR1) & ~CLKCR1_SWCE; - cs461x_pokeBA0(card, BA0_CLKCR1, tmp); - - card->active_ctrl(card,-1); - - /* free hardware resources */ - free_irq(card->irq, card); - iounmap(card->ba0); - iounmap(card->ba1.name.data0); - iounmap(card->ba1.name.data1); - iounmap(card->ba1.name.pmem); - iounmap(card->ba1.name.reg); - - /* unregister audio devices */ - for (i = 0; i < NR_AC97; i++) - if (card->ac97_codec[i] != NULL) { - unregister_sound_mixer(card->ac97_codec[i]->dev_mixer); - ac97_release_codec(card->ac97_codec[i]); - } - unregister_sound_dsp(card->dev_audio); - if (card->dev_midi) - unregister_sound_midi(card->dev_midi); - list_del(&card->list); - kfree(card); - PCI_SET_DRIVER_DATA(pci_dev,NULL); - - CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO - "cs46xx: cs46xx_remove()-: remove successful\n")); -} - -enum { - CS46XX_4610 = 0, - CS46XX_4612, /* same as 4630 */ - CS46XX_4615, /* same as 4624 */ -}; - -static struct pci_device_id cs46xx_pci_tbl[] = { - { - .vendor = PCI_VENDOR_ID_CIRRUS, - .device = PCI_DEVICE_ID_CIRRUS_4610, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .driver_data = CS46XX_4610, - }, - { - .vendor = PCI_VENDOR_ID_CIRRUS, - .device = PCI_DEVICE_ID_CIRRUS_4612, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .driver_data = CS46XX_4612, - }, - { - .vendor = PCI_VENDOR_ID_CIRRUS, - .device = PCI_DEVICE_ID_CIRRUS_4615, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, - .driver_data = CS46XX_4615, - }, - { 0, }, -}; - -MODULE_DEVICE_TABLE(pci, cs46xx_pci_tbl); - -static struct pci_driver cs46xx_pci_driver = { - .name = "cs46xx", - .id_table = cs46xx_pci_tbl, - .probe = cs46xx_probe, - .remove = __devexit_p(cs46xx_remove), -#ifdef CONFIG_PM - .suspend = cs46xx_suspend_tbl, - .resume = cs46xx_resume_tbl, -#endif -}; - -static int __init cs46xx_init_module(void) -{ - int rtn = 0; - CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, printk(KERN_INFO - "cs46xx: cs46xx_init_module()+ \n")); - rtn = pci_register_driver(&cs46xx_pci_driver); - - if (rtn == -ENODEV) { - CS_DBGOUT(CS_ERROR | CS_INIT, 1, printk( - "cs46xx: Unable to detect valid cs46xx device\n")); - } - - CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, - printk(KERN_INFO "cs46xx: cs46xx_init_module()- (%d)\n",rtn)); - return rtn; -} - -static void __exit cs46xx_cleanup_module(void) -{ - pci_unregister_driver(&cs46xx_pci_driver); - CS_DBGOUT(CS_INIT | CS_FUNCTION, 2, - printk(KERN_INFO "cs46xx: cleanup_cs46xx() finished\n")); -} - -module_init(cs46xx_init_module); -module_exit(cs46xx_cleanup_module); - -#ifdef CONFIG_PM -static int cs46xx_suspend_tbl(struct pci_dev *pcidev, pm_message_t state) -{ - struct cs_card *s = PCI_GET_DRIVER_DATA(pcidev); - CS_DBGOUT(CS_PM | CS_FUNCTION, 2, - printk(KERN_INFO "cs46xx: cs46xx_suspend_tbl request\n")); - cs46xx_suspend(s, state); - return 0; -} - -static int cs46xx_resume_tbl(struct pci_dev *pcidev) -{ - struct cs_card *s = PCI_GET_DRIVER_DATA(pcidev); - CS_DBGOUT(CS_PM | CS_FUNCTION, 2, - printk(KERN_INFO "cs46xx: cs46xx_resume_tbl request\n")); - cs46xx_resume(s); - return 0; -} -#endif diff --git a/sound/oss/cs46xx_wrapper-24.h b/sound/oss/cs46xx_wrapper-24.h deleted file mode 100644 index f68e01181a7c..000000000000 --- a/sound/oss/cs46xx_wrapper-24.h +++ /dev/null @@ -1,56 +0,0 @@ -/******************************************************************************* -* -* "cs46xx_wrapper.c" -- Cirrus Logic-Crystal CS46XX linux audio driver. -* -* Copyright (C) 2000,2001 Cirrus Logic Corp. -* -- tom woller (twoller@crystal.cirrus.com) or -* (pcaudio@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. -* -* 01/11/2001 trw - new file from cs4281 wrapper code. -* -*******************************************************************************/ -#ifndef __CS46XX_WRAPPER24_H -#define __CS46XX_WRAPPER24_H - -#include - -#define CS_OWNER .owner = -#define CS_THIS_MODULE THIS_MODULE, -static inline void cs46xx_null(struct pci_dev *pcidev) { return; } -#define cs4x_mem_map_reserve(page) SetPageReserved(page) -#define cs4x_mem_map_unreserve(page) ClearPageReserved(page) - -#define free_dmabuf(card, dmabuf) \ - pci_free_consistent((card)->pci_dev, \ - PAGE_SIZE << (dmabuf)->buforder, \ - (dmabuf)->rawbuf, (dmabuf)->dmaaddr); -#define free_dmabuf2(card, dmabuf) \ - pci_free_consistent((card)->pci_dev, \ - PAGE_SIZE << (dmabuf)->buforder_tmpbuff, \ - (dmabuf)->tmpbuff, (dmabuf)->dmaaddr_tmpbuff); -#define cs4x_pgoff(vma) ((vma)->vm_pgoff) - -#define RSRCISIOREGION(dev,num) ((dev)->resource[(num)].start != 0 && \ - ((dev)->resource[(num)].flags & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_IO) -#define RSRCISMEMORYREGION(dev,num) ((dev)->resource[(num)].start != 0 && \ - ((dev)->resource[(num)].flags & PCI_BASE_ADDRESS_SPACE) == PCI_BASE_ADDRESS_SPACE_MEMORY) -#define RSRCADDRESS(dev,num) ((dev)->resource[(num)].start) -#define PCI_GET_DRIVER_DATA pci_get_drvdata -#define PCI_SET_DRIVER_DATA pci_set_drvdata -#define PCI_SET_DMA_MASK(pcidev,mask) pcidev->dma_mask = mask - -#endif diff --git a/sound/oss/cs46xxpm.h b/sound/oss/cs46xxpm.h deleted file mode 100644 index 2932b6e0e0bb..000000000000 --- a/sound/oss/cs46xxpm.h +++ /dev/null @@ -1,70 +0,0 @@ -/******************************************************************************* -* -* "cs46xxpm.h" -- Cirrus Logic-Crystal CS46XX linux audio driver. -* -* Copyright (C) 2000,2001 Cirrus Logic Corp. -* -- tom woller (twoller@crystal.cirrus.com) or -* (pcaudio@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 __CS46XXPM_H -#define __CS46XXPM_H - -#define CS46XX_AC97_HIGHESTREGTORESTORE 0x26 -#define CS46XX_AC97_NUMBER_RESTORE_REGS (CS46XX_AC97_HIGHESTREGTORESTORE/2-1) - -/* PM state defintions */ -#define CS46XX_PM_NOT_REGISTERED 0x1000 -#define CS46XX_PM_IDLE 0x0001 -#define CS46XX_PM_SUSPENDING 0x0002 -#define CS46XX_PM_SUSPENDED 0x0004 -#define CS46XX_PM_RESUMING 0x0008 -#define CS46XX_PM_RESUMED 0x0010 - -#define CS_POWER_DAC 0x0001 -#define CS_POWER_ADC 0x0002 -#define CS_POWER_MIXVON 0x0004 -#define CS_POWER_MIXVOFF 0x0008 -#define CS_AC97_POWER_CONTROL_ON 0xf000 /* always on bits (inverted) */ -#define CS_AC97_POWER_CONTROL_ADC 0x0100 -#define CS_AC97_POWER_CONTROL_DAC 0x0200 -#define CS_AC97_POWER_CONTROL_MIXVON 0x0400 -#define CS_AC97_POWER_CONTROL_MIXVOFF 0x0800 -#define CS_AC97_POWER_CONTROL_ADC_ON 0x0001 -#define CS_AC97_POWER_CONTROL_DAC_ON 0x0002 -#define CS_AC97_POWER_CONTROL_MIXVON_ON 0x0004 -#define CS_AC97_POWER_CONTROL_MIXVOFF_ON 0x0008 - -struct cs46xx_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[CS46XX_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; - unsigned dmabuf_swptr_play; - int dmabuf_count_play; - unsigned dmabuf_swptr_capture; - int dmabuf_count_capture; -}; - -#endif diff --git a/sound/oss/emu10k1/8010.h b/sound/oss/emu10k1/8010.h deleted file mode 100644 index 61c6c42bbc36..000000000000 --- a/sound/oss/emu10k1/8010.h +++ /dev/null @@ -1,737 +0,0 @@ -/* - ********************************************************************** - * 8010.h - * Copyright 1999-2001 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox Cleaned of 8bit chars, DOS - * line endings - * December 8, 1999 Jon Taylor Added lots of new register info - * May 16, 2001 Daniel Bertrand Added unofficial DBG register info - * Oct-Nov 2001 D.B. Added unofficial Audigy registers - * - ********************************************************************** - * - * 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 _8010_H -#define _8010_H - -#include - -// Driver version: -#define MAJOR_VER 0 -#define MINOR_VER 20 -#define DRIVER_VERSION "0.20a" - - -// Audigy specify registers are prefixed with 'A_' - -/************************************************************************************************/ -/* PCI function 0 registers, address = + PCIBASE0 */ -/************************************************************************************************/ - -#define PTR 0x00 /* Indexed register set pointer register */ - /* NOTE: The CHANNELNUM and ADDRESS words can */ - /* be modified independently of each other. */ -#define PTR_CHANNELNUM_MASK 0x0000003f /* For each per-channel register, indicates the */ - /* channel number of the register to be */ - /* accessed. For non per-channel registers the */ - /* value should be set to zero. */ -#define PTR_ADDRESS_MASK 0x07ff0000 /* Register index */ - -#define DATA 0x04 /* Indexed register set data register */ - -#define IPR 0x08 /* Global interrupt pending register */ - /* Clear pending interrupts by writing a 1 to */ - /* the relevant bits and zero to the other bits */ - -/* The next two interrupts are for the midi port on the Audigy Drive (A_MPU1) */ -#define A_IPR_MIDITRANSBUFEMPTY2 0x10000000 /* MIDI UART transmit buffer empty */ -#define A_IPR_MIDIRECVBUFEMPTY2 0x08000000 /* MIDI UART receive buffer empty */ - -#define IPR_SAMPLERATETRACKER 0x01000000 /* Sample rate tracker lock status change */ -#define IPR_FXDSP 0x00800000 /* Enable FX DSP interrupts */ -#define IPR_FORCEINT 0x00400000 /* Force Sound Blaster interrupt */ -#define IPR_PCIERROR 0x00200000 /* PCI bus error */ -#define IPR_VOLINCR 0x00100000 /* Volume increment button pressed */ -#define IPR_VOLDECR 0x00080000 /* Volume decrement button pressed */ -#define IPR_MUTE 0x00040000 /* Mute button pressed */ -#define IPR_MICBUFFULL 0x00020000 /* Microphone buffer full */ -#define IPR_MICBUFHALFFULL 0x00010000 /* Microphone buffer half full */ -#define IPR_ADCBUFFULL 0x00008000 /* ADC buffer full */ -#define IPR_ADCBUFHALFFULL 0x00004000 /* ADC buffer half full */ -#define IPR_EFXBUFFULL 0x00002000 /* Effects buffer full */ -#define IPR_EFXBUFHALFFULL 0x00001000 /* Effects buffer half full */ -#define IPR_GPSPDIFSTATUSCHANGE 0x00000800 /* GPSPDIF channel status change */ -#define IPR_CDROMSTATUSCHANGE 0x00000400 /* CD-ROM channel status change */ -#define IPR_INTERVALTIMER 0x00000200 /* Interval timer terminal count */ -#define IPR_MIDITRANSBUFEMPTY 0x00000100 /* MIDI UART transmit buffer empty */ -#define IPR_MIDIRECVBUFEMPTY 0x00000080 /* MIDI UART receive buffer empty */ -#define IPR_CHANNELLOOP 0x00000040 /* One or more channel loop interrupts pending */ -#define IPR_CHANNELNUMBERMASK 0x0000003f /* When IPR_CHANNELLOOP is set, indicates the */ - /* Highest set channel in CLIPL or CLIPH. When */ - /* IP is written with CL set, the bit in CLIPL */ - /* or CLIPH corresponding to the CIN value */ - /* written will be cleared. */ -#define A_IPR_MIDITRANSBUFEMPTY1 IPR_MIDITRANSBUFEMPTY /* MIDI UART transmit buffer empty */ -#define A_IPR_MIDIRECVBUFEMPTY1 IPR_MIDIRECVBUFEMPTY /* MIDI UART receive buffer empty */ - - - -#define INTE 0x0c /* Interrupt enable register */ -#define INTE_VIRTUALSB_MASK 0xc0000000 /* Virtual Soundblaster I/O port capture */ -#define INTE_VIRTUALSB_220 0x00000000 /* Capture at I/O base address 0x220-0x22f */ -#define INTE_VIRTUALSB_240 0x40000000 /* Capture at I/O base address 0x240 */ -#define INTE_VIRTUALSB_260 0x80000000 /* Capture at I/O base address 0x260 */ -#define INTE_VIRTUALSB_280 0xc0000000 /* Capture at I/O base address 0x280 */ -#define INTE_VIRTUALMPU_MASK 0x30000000 /* Virtual MPU I/O port capture */ -#define INTE_VIRTUALMPU_300 0x00000000 /* Capture at I/O base address 0x300-0x301 */ -#define INTE_VIRTUALMPU_310 0x10000000 /* Capture at I/O base address 0x310 */ -#define INTE_VIRTUALMPU_320 0x20000000 /* Capture at I/O base address 0x320 */ -#define INTE_VIRTUALMPU_330 0x30000000 /* Capture at I/O base address 0x330 */ -#define INTE_MASTERDMAENABLE 0x08000000 /* Master DMA emulation at 0x000-0x00f */ -#define INTE_SLAVEDMAENABLE 0x04000000 /* Slave DMA emulation at 0x0c0-0x0df */ -#define INTE_MASTERPICENABLE 0x02000000 /* Master PIC emulation at 0x020-0x021 */ -#define INTE_SLAVEPICENABLE 0x01000000 /* Slave PIC emulation at 0x0a0-0x0a1 */ -#define INTE_VSBENABLE 0x00800000 /* Enable virtual Soundblaster */ -#define INTE_ADLIBENABLE 0x00400000 /* Enable AdLib emulation at 0x388-0x38b */ -#define INTE_MPUENABLE 0x00200000 /* Enable virtual MPU */ -#define INTE_FORCEINT 0x00100000 /* Continuously assert INTAN */ - -#define INTE_MRHANDENABLE 0x00080000 /* Enable the "Mr. Hand" logic */ - /* NOTE: There is no reason to use this under */ - /* Linux, and it will cause odd hardware */ - /* behavior and possibly random segfaults and */ - /* lockups if enabled. */ - -/* The next two interrupts are for the midi port on the Audigy Drive (A_MPU1) */ -#define A_INTE_MIDITXENABLE2 0x00020000 /* Enable MIDI transmit-buffer-empty interrupts */ -#define A_INTE_MIDIRXENABLE2 0x00010000 /* Enable MIDI receive-buffer-empty interrupts */ - - -#define INTE_SAMPLERATETRACKER 0x00002000 /* Enable sample rate tracker interrupts */ - /* NOTE: This bit must always be enabled */ -#define INTE_FXDSPENABLE 0x00001000 /* Enable FX DSP interrupts */ -#define INTE_PCIERRORENABLE 0x00000800 /* Enable PCI bus error interrupts */ -#define INTE_VOLINCRENABLE 0x00000400 /* Enable volume increment button interrupts */ -#define INTE_VOLDECRENABLE 0x00000200 /* Enable volume decrement button interrupts */ -#define INTE_MUTEENABLE 0x00000100 /* Enable mute button interrupts */ -#define INTE_MICBUFENABLE 0x00000080 /* Enable microphone buffer interrupts */ -#define INTE_ADCBUFENABLE 0x00000040 /* Enable ADC buffer interrupts */ -#define INTE_EFXBUFENABLE 0x00000020 /* Enable Effects buffer interrupts */ -#define INTE_GPSPDIFENABLE 0x00000010 /* Enable GPSPDIF status interrupts */ -#define INTE_CDSPDIFENABLE 0x00000008 /* Enable CDSPDIF status interrupts */ -#define INTE_INTERVALTIMERENB 0x00000004 /* Enable interval timer interrupts */ -#define INTE_MIDITXENABLE 0x00000002 /* Enable MIDI transmit-buffer-empty interrupts */ -#define INTE_MIDIRXENABLE 0x00000001 /* Enable MIDI receive-buffer-empty interrupts */ - -/* The next two interrupts are for the midi port on the Audigy (A_MPU2) */ -#define A_INTE_MIDITXENABLE1 INTE_MIDITXENABLE -#define A_INTE_MIDIRXENABLE1 INTE_MIDIRXENABLE - -#define WC 0x10 /* Wall Clock register */ -#define WC_SAMPLECOUNTER_MASK 0x03FFFFC0 /* Sample periods elapsed since reset */ -#define WC_SAMPLECOUNTER 0x14060010 -#define WC_CURRENTCHANNEL 0x0000003F /* Channel [0..63] currently being serviced */ - /* NOTE: Each channel takes 1/64th of a sample */ - /* period to be serviced. */ - -#define HCFG 0x14 /* Hardware config register */ - /* NOTE: There is no reason to use the legacy */ - /* SoundBlaster emulation stuff described below */ - /* under Linux, and all kinds of weird hardware */ - /* behavior can result if you try. Don't. */ -#define HCFG_LEGACYFUNC_MASK 0xe0000000 /* Legacy function number */ -#define HCFG_LEGACYFUNC_MPU 0x00000000 /* Legacy MPU */ -#define HCFG_LEGACYFUNC_SB 0x40000000 /* Legacy SB */ -#define HCFG_LEGACYFUNC_AD 0x60000000 /* Legacy AD */ -#define HCFG_LEGACYFUNC_MPIC 0x80000000 /* Legacy MPIC */ -#define HCFG_LEGACYFUNC_MDMA 0xa0000000 /* Legacy MDMA */ -#define HCFG_LEGACYFUNC_SPCI 0xc0000000 /* Legacy SPCI */ -#define HCFG_LEGACYFUNC_SDMA 0xe0000000 /* Legacy SDMA */ -#define HCFG_IOCAPTUREADDR 0x1f000000 /* The 4 LSBs of the captured I/O address. */ -#define HCFG_LEGACYWRITE 0x00800000 /* 1 = write, 0 = read */ -#define HCFG_LEGACYWORD 0x00400000 /* 1 = word, 0 = byte */ -#define HCFG_LEGACYINT 0x00200000 /* 1 = legacy event captured. Write 1 to clear. */ - /* NOTE: The rest of the bits in this register */ - /* _are_ relevant under Linux. */ -#define HCFG_CODECFORMAT_MASK 0x00070000 /* CODEC format */ -#define HCFG_CODECFORMAT_AC97 0x00000000 /* AC97 CODEC format -- Primary Output */ -#define HCFG_CODECFORMAT_I2S 0x00010000 /* I2S CODEC format -- Secondary (Rear) Output */ -#define HCFG_GPINPUT0 0x00004000 /* External pin112 */ -#define HCFG_GPINPUT1 0x00002000 /* External pin110 */ - -#define HCFG_GPOUTPUT_MASK 0x00001c00 /* External pins which may be controlled */ -#define HCFG_GPOUT0 0x00001000 /* set to enable digital out on 5.1 cards */ - -#define HCFG_JOYENABLE 0x00000200 /* Internal joystick enable */ -#define HCFG_PHASETRACKENABLE 0x00000100 /* Phase tracking enable */ - /* 1 = Force all 3 async digital inputs to use */ - /* the same async sample rate tracker (ZVIDEO) */ -#define HCFG_AC3ENABLE_MASK 0x0x0000e0 /* AC3 async input control - Not implemented */ -#define HCFG_AC3ENABLE_ZVIDEO 0x00000080 /* Channels 0 and 1 replace ZVIDEO */ -#define HCFG_AC3ENABLE_CDSPDIF 0x00000040 /* Channels 0 and 1 replace CDSPDIF */ -#define HCFG_AC3ENABLE_GPSPDIF 0x00000020 /* Channels 0 and 1 replace GPSPDIF */ -#define HCFG_AUTOMUTE 0x00000010 /* When set, the async sample rate convertors */ - /* will automatically mute their output when */ - /* they are not rate-locked to the external */ - /* async audio source */ -#define HCFG_LOCKSOUNDCACHE 0x00000008 /* 1 = Cancel bustmaster accesses to soundcache */ - /* NOTE: This should generally never be used. */ -#define HCFG_LOCKTANKCACHE_MASK 0x00000004 /* 1 = Cancel bustmaster accesses to tankcache */ - /* NOTE: This should generally never be used. */ -#define HCFG_LOCKTANKCACHE 0x01020014 -#define HCFG_MUTEBUTTONENABLE 0x00000002 /* 1 = Master mute button sets AUDIOENABLE = 0. */ - /* NOTE: This is a 'cheap' way to implement a */ - /* master mute function on the mute button, and */ - /* in general should not be used unless a more */ - /* sophisticated master mute function has not */ - /* been written. */ -#define HCFG_AUDIOENABLE 0x00000001 /* 0 = CODECs transmit zero-valued samples */ - /* Should be set to 1 when the EMU10K1 is */ - /* completely initialized. */ - -//For Audigy, MPU port move to 0x70-0x74 ptr register - -#define MUDATA 0x18 /* MPU401 data register (8 bits) */ - -#define MUCMD 0x19 /* MPU401 command register (8 bits) */ -#define MUCMD_RESET 0xff /* RESET command */ -#define MUCMD_ENTERUARTMODE 0x3f /* Enter_UART_mode command */ - /* NOTE: All other commands are ignored */ - -#define MUSTAT MUCMD /* MPU401 status register (8 bits) */ -#define MUSTAT_IRDYN 0x80 /* 0 = MIDI data or command ACK */ -#define MUSTAT_ORDYN 0x40 /* 0 = MUDATA can accept a command or data */ - -#define A_IOCFG 0x18 /* GPIO on Audigy card (16bits) */ -#define A_GPINPUT_MASK 0xff00 -#define A_GPOUTPUT_MASK 0x00ff - -#define TIMER 0x1a /* Timer terminal count register (16-bit) */ - /* NOTE: After the rate is changed, a maximum */ - /* of 1024 sample periods should be allowed */ - /* before the new rate is guaranteed accurate. */ -#define TIMER_RATE_MASK 0x03ff /* Timer interrupt rate in sample periods */ - /* 0 == 1024 periods, [1..4] are not useful */ - -#define AC97DATA 0x1c /* AC97 register set data register (16 bit) */ - -#define AC97ADDRESS 0x1e /* AC97 register set address register (8 bit) */ -#define AC97ADDRESS_READY 0x80 /* Read-only bit, reflects CODEC READY signal */ -#define AC97ADDRESS_ADDRESS 0x7f /* Address of indexed AC97 register */ - -/********************************************************************************************************/ -/* Emu10k1 pointer-offset register set, accessed through the PTR and DATA registers */ -/********************************************************************************************************/ - -#define CPF 0x00 /* Current pitch and fraction register */ -#define CPF_CURRENTPITCH_MASK 0xffff0000 /* Current pitch (linear, 0x4000 == unity pitch shift) */ -#define CPF_CURRENTPITCH 0x10100000 -#define CPF_STEREO_MASK 0x00008000 /* 1 = Even channel interleave, odd channel locked */ -#define CPF_STOP_MASK 0x00004000 /* 1 = Current pitch forced to 0 */ -#define CPF_FRACADDRESS_MASK 0x00003fff /* Linear fractional address of the current channel */ - -#define PTRX 0x01 /* Pitch target and send A/B amounts register */ -#define PTRX_PITCHTARGET_MASK 0xffff0000 /* Pitch target of specified channel */ -#define PTRX_PITCHTARGET 0x10100001 -#define PTRX_FXSENDAMOUNT_A_MASK 0x0000ff00 /* Linear level of channel output sent to FX send bus A */ -#define PTRX_FXSENDAMOUNT_A 0x08080001 -#define PTRX_FXSENDAMOUNT_B_MASK 0x000000ff /* Linear level of channel output sent to FX send bus B */ -#define PTRX_FXSENDAMOUNT_B 0x08000001 - -#define CVCF 0x02 /* Current volume and filter cutoff register */ -#define CVCF_CURRENTVOL_MASK 0xffff0000 /* Current linear volume of specified channel */ -#define CVCF_CURRENTVOL 0x10100002 -#define CVCF_CURRENTFILTER_MASK 0x0000ffff /* Current filter cutoff frequency of specified channel */ -#define CVCF_CURRENTFILTER 0x10000002 - -#define VTFT 0x03 /* Volume target and filter cutoff target register */ -#define VTFT_VOLUMETARGET_MASK 0xffff0000 /* Volume target of specified channel */ -#define VTFT_FILTERTARGET_MASK 0x0000ffff /* Filter cutoff target of specified channel */ - -#define Z1 0x05 /* Filter delay memory 1 register */ - -#define Z2 0x04 /* Filter delay memory 2 register */ - -#define PSST 0x06 /* Send C amount and loop start address register */ -#define PSST_FXSENDAMOUNT_C_MASK 0xff000000 /* Linear level of channel output sent to FX send bus C */ - -#define PSST_FXSENDAMOUNT_C 0x08180006 - -#define PSST_LOOPSTARTADDR_MASK 0x00ffffff /* Loop start address of the specified channel */ -#define PSST_LOOPSTARTADDR 0x18000006 - -#define DSL 0x07 /* Send D amount and loop start address register */ -#define DSL_FXSENDAMOUNT_D_MASK 0xff000000 /* Linear level of channel output sent to FX send bus D */ - -#define DSL_FXSENDAMOUNT_D 0x08180007 - -#define DSL_LOOPENDADDR_MASK 0x00ffffff /* Loop end address of the specified channel */ -#define DSL_LOOPENDADDR 0x18000007 - -#define CCCA 0x08 /* Filter Q, interp. ROM, byte size, cur. addr register */ -#define CCCA_RESONANCE 0xf0000000 /* Lowpass filter resonance (Q) height */ -#define CCCA_INTERPROMMASK 0x0e000000 /* Selects passband of interpolation ROM */ - /* 1 == full band, 7 == lowpass */ - /* ROM 0 is used when pitch shifting downward or less */ - /* then 3 semitones upward. Increasingly higher ROM */ - /* numbers are used, typically in steps of 3 semitones, */ - /* as upward pitch shifting is performed. */ -#define CCCA_INTERPROM_0 0x00000000 /* Select interpolation ROM 0 */ -#define CCCA_INTERPROM_1 0x02000000 /* Select interpolation ROM 1 */ -#define CCCA_INTERPROM_2 0x04000000 /* Select interpolation ROM 2 */ -#define CCCA_INTERPROM_3 0x06000000 /* Select interpolation ROM 3 */ -#define CCCA_INTERPROM_4 0x08000000 /* Select interpolation ROM 4 */ -#define CCCA_INTERPROM_5 0x0a000000 /* Select interpolation ROM 5 */ -#define CCCA_INTERPROM_6 0x0c000000 /* Select interpolation ROM 6 */ -#define CCCA_INTERPROM_7 0x0e000000 /* Select interpolation ROM 7 */ -#define CCCA_8BITSELECT 0x01000000 /* 1 = Sound memory for this channel uses 8-bit samples */ -#define CCCA_CURRADDR_MASK 0x00ffffff /* Current address of the selected channel */ -#define CCCA_CURRADDR 0x18000008 - -#define CCR 0x09 /* Cache control register */ -#define CCR_CACHEINVALIDSIZE 0x07190009 -#define CCR_CACHEINVALIDSIZE_MASK 0xfe000000 /* Number of invalid samples cache for this channel */ -#define CCR_CACHELOOPFLAG 0x01000000 /* 1 = Cache has a loop service pending */ -#define CCR_INTERLEAVEDSAMPLES 0x00800000 /* 1 = A cache service will fetch interleaved samples */ -#define CCR_WORDSIZEDSAMPLES 0x00400000 /* 1 = A cache service will fetch word sized samples */ -#define CCR_READADDRESS 0x06100009 -#define CCR_READADDRESS_MASK 0x003f0000 /* Location of cache just beyond current cache service */ -#define CCR_LOOPINVALSIZE 0x0000fe00 /* Number of invalid samples in cache prior to loop */ - /* NOTE: This is valid only if CACHELOOPFLAG is set */ -#define CCR_LOOPFLAG 0x00000100 /* Set for a single sample period when a loop occurs */ -#define CCR_CACHELOOPADDRHI 0x000000ff /* DSL_LOOPSTARTADDR's hi byte if CACHELOOPFLAG is set */ - -#define CLP 0x0a /* Cache loop register (valid if CCR_CACHELOOPFLAG = 1) */ - /* NOTE: This register is normally not used */ -#define CLP_CACHELOOPADDR 0x0000ffff /* Cache loop address (DSL_LOOPSTARTADDR [0..15]) */ - -#define FXRT 0x0b /* Effects send routing register */ - /* NOTE: It is illegal to assign the same routing to */ - /* two effects sends. */ -#define FXRT_CHANNELA 0x000f0000 /* Effects send bus number for channel's effects send A */ -#define FXRT_CHANNELB 0x00f00000 /* Effects send bus number for channel's effects send B */ -#define FXRT_CHANNELC 0x0f000000 /* Effects send bus number for channel's effects send C */ -#define FXRT_CHANNELD 0xf0000000 /* Effects send bus number for channel's effects send D */ - -#define MAPA 0x0c /* Cache map A */ - -#define MAPB 0x0d /* Cache map B */ - -#define MAP_PTE_MASK 0xffffe000 /* The 19 MSBs of the PTE indexed by the PTI */ -#define MAP_PTI_MASK 0x00001fff /* The 13 bit index to one of the 8192 PTE dwords */ - -#define ENVVOL 0x10 /* Volume envelope register */ -#define ENVVOL_MASK 0x0000ffff /* Current value of volume envelope state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define ATKHLDV 0x11 /* Volume envelope hold and attack register */ -#define ATKHLDV_PHASE0 0x00008000 /* 0 = Begin attack phase */ -#define ATKHLDV_HOLDTIME_MASK 0x00007f00 /* Envelope hold time (127-n == n*88.2msec) */ -#define ATKHLDV_ATTACKTIME_MASK 0x0000007f /* Envelope attack time, log encoded */ - /* 0 = infinite, 1 = 10.9msec, ... 0x7f = 5.5msec */ - -#define DCYSUSV 0x12 /* Volume envelope sustain and decay register */ -#define DCYSUSV_PHASE1_MASK 0x00008000 /* 0 = Begin attack phase, 1 = begin release phase */ -#define DCYSUSV_SUSTAINLEVEL_MASK 0x00007f00 /* 127 = full, 0 = off, 0.75dB increments */ -#define DCYSUSV_CHANNELENABLE_MASK 0x00000080 /* 1 = Inhibit envelope engine from writing values in */ - /* this channel and from writing to pitch, filter and */ - /* volume targets. */ -#define DCYSUSV_DECAYTIME_MASK 0x0000007f /* Volume envelope decay time, log encoded */ - /* 0 = 43.7msec, 1 = 21.8msec, 0x7f = 22msec */ - -#define LFOVAL1 0x13 /* Modulation LFO value */ -#define LFOVAL_MASK 0x0000ffff /* Current value of modulation LFO state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define ENVVAL 0x14 /* Modulation envelope register */ -#define ENVVAL_MASK 0x0000ffff /* Current value of modulation envelope state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define ATKHLDM 0x15 /* Modulation envelope hold and attack register */ -#define ATKHLDM_PHASE0 0x00008000 /* 0 = Begin attack phase */ -#define ATKHLDM_HOLDTIME 0x00007f00 /* Envelope hold time (127-n == n*42msec) */ -#define ATKHLDM_ATTACKTIME 0x0000007f /* Envelope attack time, log encoded */ - /* 0 = infinite, 1 = 11msec, ... 0x7f = 5.5msec */ - -#define DCYSUSM 0x16 /* Modulation envelope decay and sustain register */ -#define DCYSUSM_PHASE1_MASK 0x00008000 /* 0 = Begin attack phase, 1 = begin release phase */ -#define DCYSUSM_SUSTAINLEVEL_MASK 0x00007f00 /* 127 = full, 0 = off, 0.75dB increments */ -#define DCYSUSM_DECAYTIME_MASK 0x0000007f /* Envelope decay time, log encoded */ - /* 0 = 43.7msec, 1 = 21.8msec, 0x7f = 22msec */ - -#define LFOVAL2 0x17 /* Vibrato LFO register */ -#define LFOVAL2_MASK 0x0000ffff /* Current value of vibrato LFO state variable */ - /* 0x8000-n == 666*n usec delay */ - -#define IP 0x18 /* Initial pitch register */ -#define IP_MASK 0x0000ffff /* Exponential initial pitch shift */ - /* 4 bits of octave, 12 bits of fractional octave */ -#define IP_UNITY 0x0000e000 /* Unity pitch shift */ - -#define IFATN 0x19 /* Initial filter cutoff and attenuation register */ -#define IFATN_FILTERCUTOFF_MASK 0x0000ff00 /* Initial filter cutoff frequency in exponential units */ - /* 6 most significant bits are semitones */ - /* 2 least significant bits are fractions */ -#define IFATN_FILTERCUTOFF 0x08080019 -#define IFATN_ATTENUATION_MASK 0x000000ff /* Initial attenuation in 0.375dB steps */ -#define IFATN_ATTENUATION 0x08000019 - - -#define PEFE 0x1a /* Pitch envelope and filter envelope amount register */ -#define PEFE_PITCHAMOUNT_MASK 0x0000ff00 /* Pitch envlope amount */ - /* Signed 2's complement, +/- one octave peak extremes */ -#define PEFE_PITCHAMOUNT 0x0808001a -#define PEFE_FILTERAMOUNT_MASK 0x000000ff /* Filter envlope amount */ - /* Signed 2's complement, +/- six octaves peak extremes */ -#define PEFE_FILTERAMOUNT 0x0800001a -#define FMMOD 0x1b /* Vibrato/filter modulation from LFO register */ -#define FMMOD_MODVIBRATO 0x0000ff00 /* Vibrato LFO modulation depth */ - /* Signed 2's complement, +/- one octave extremes */ -#define FMMOD_MOFILTER 0x000000ff /* Filter LFO modulation depth */ - /* Signed 2's complement, +/- three octave extremes */ - - -#define TREMFRQ 0x1c /* Tremolo amount and modulation LFO frequency register */ -#define TREMFRQ_DEPTH 0x0000ff00 /* Tremolo depth */ - /* Signed 2's complement, with +/- 12dB extremes */ -#define TREMFRQ_FREQUENCY 0x000000ff /* Tremolo LFO frequency */ - /* ??Hz steps, maximum of ?? Hz. */ - -#define FM2FRQ2 0x1d /* Vibrato amount and vibrato LFO frequency register */ -#define FM2FRQ2_DEPTH 0x0000ff00 /* Vibrato LFO vibrato depth */ - /* Signed 2's complement, +/- one octave extremes */ -#define FM2FRQ2_FREQUENCY 0x000000ff /* Vibrato LFO frequency */ - /* 0.039Hz steps, maximum of 9.85 Hz. */ - -#define TEMPENV 0x1e /* Tempory envelope register */ -#define TEMPENV_MASK 0x0000ffff /* 16-bit value */ - /* NOTE: All channels contain internal variables; do */ - /* not write to these locations. */ - -#define CD0 0x20 /* Cache data 0 register */ -#define CD1 0x21 /* Cache data 1 register */ -#define CD2 0x22 /* Cache data 2 register */ -#define CD3 0x23 /* Cache data 3 register */ -#define CD4 0x24 /* Cache data 4 register */ -#define CD5 0x25 /* Cache data 5 register */ -#define CD6 0x26 /* Cache data 6 register */ -#define CD7 0x27 /* Cache data 7 register */ -#define CD8 0x28 /* Cache data 8 register */ -#define CD9 0x29 /* Cache data 9 register */ -#define CDA 0x2a /* Cache data A register */ -#define CDB 0x2b /* Cache data B register */ -#define CDC 0x2c /* Cache data C register */ -#define CDD 0x2d /* Cache data D register */ -#define CDE 0x2e /* Cache data E register */ -#define CDF 0x2f /* Cache data F register */ - -#define PTB 0x40 /* Page table base register */ -#define PTB_MASK 0xfffff000 /* Physical address of the page table in host memory */ - -#define TCB 0x41 /* Tank cache base register */ -#define TCB_MASK 0xfffff000 /* Physical address of the bottom of host based TRAM */ - -#define ADCCR 0x42 /* ADC sample rate/stereo control register */ -#define ADCCR_RCHANENABLE 0x00000010 /* Enables right channel for writing to the host */ -#define ADCCR_LCHANENABLE 0x00000008 /* Enables left channel for writing to the host */ - /* NOTE: To guarantee phase coherency, both channels */ - /* must be disabled prior to enabling both channels. */ -#define A_ADCCR_RCHANENABLE 0x00000020 -#define A_ADCCR_LCHANENABLE 0x00000010 - -#define A_ADCCR_SAMPLERATE_MASK 0x0000000F /* Audigy sample rate convertor output rate */ -#define ADCCR_SAMPLERATE_MASK 0x00000007 /* Sample rate convertor output rate */ - -#define ADCCR_SAMPLERATE_48 0x00000000 /* 48kHz sample rate */ -#define ADCCR_SAMPLERATE_44 0x00000001 /* 44.1kHz sample rate */ -#define ADCCR_SAMPLERATE_32 0x00000002 /* 32kHz sample rate */ -#define ADCCR_SAMPLERATE_24 0x00000003 /* 24kHz sample rate */ -#define ADCCR_SAMPLERATE_22 0x00000004 /* 22.05kHz sample rate */ -#define ADCCR_SAMPLERATE_16 0x00000005 /* 16kHz sample rate */ -#define ADCCR_SAMPLERATE_11 0x00000006 /* 11.025kHz sample rate */ -#define ADCCR_SAMPLERATE_8 0x00000007 /* 8kHz sample rate */ - -#define A_ADCCR_SAMPLERATE_12 0x00000006 /* 12kHz sample rate */ -#define A_ADCCR_SAMPLERATE_11 0x00000007 /* 11.025kHz sample rate */ -#define A_ADCCR_SAMPLERATE_8 0x00000008 /* 8kHz sample rate */ - -#define FXWC 0x43 /* FX output write channels register */ - /* When set, each bit enables the writing of the */ - /* corresponding FX output channel (internal registers */ - /* 0x20-0x3f) into host memory. This mode of recording */ - /* is 16bit, 48KHz only. All 32 channels can be enabled */ - /* simultaneously. */ -#define TCBS 0x44 /* Tank cache buffer size register */ -#define TCBS_MASK 0x00000007 /* Tank cache buffer size field */ -#define TCBS_BUFFSIZE_16K 0x00000000 -#define TCBS_BUFFSIZE_32K 0x00000001 -#define TCBS_BUFFSIZE_64K 0x00000002 -#define TCBS_BUFFSIZE_128K 0x00000003 -#define TCBS_BUFFSIZE_256K 0x00000004 -#define TCBS_BUFFSIZE_512K 0x00000005 -#define TCBS_BUFFSIZE_1024K 0x00000006 -#define TCBS_BUFFSIZE_2048K 0x00000007 - -#define MICBA 0x45 /* AC97 microphone buffer address register */ -#define MICBA_MASK 0xfffff000 /* 20 bit base address */ - -#define ADCBA 0x46 /* ADC buffer address register */ -#define ADCBA_MASK 0xfffff000 /* 20 bit base address */ - -#define FXBA 0x47 /* FX Buffer Address */ -#define FXBA_MASK 0xfffff000 /* 20 bit base address */ - -#define MICBS 0x49 /* Microphone buffer size register */ - -#define ADCBS 0x4a /* ADC buffer size register */ - -#define FXBS 0x4b /* FX buffer size register */ - -/* The following mask values define the size of the ADC, MIX and FX buffers in bytes */ -#define ADCBS_BUFSIZE_NONE 0x00000000 -#define ADCBS_BUFSIZE_384 0x00000001 -#define ADCBS_BUFSIZE_448 0x00000002 -#define ADCBS_BUFSIZE_512 0x00000003 -#define ADCBS_BUFSIZE_640 0x00000004 -#define ADCBS_BUFSIZE_768 0x00000005 -#define ADCBS_BUFSIZE_896 0x00000006 -#define ADCBS_BUFSIZE_1024 0x00000007 -#define ADCBS_BUFSIZE_1280 0x00000008 -#define ADCBS_BUFSIZE_1536 0x00000009 -#define ADCBS_BUFSIZE_1792 0x0000000a -#define ADCBS_BUFSIZE_2048 0x0000000b -#define ADCBS_BUFSIZE_2560 0x0000000c -#define ADCBS_BUFSIZE_3072 0x0000000d -#define ADCBS_BUFSIZE_3584 0x0000000e -#define ADCBS_BUFSIZE_4096 0x0000000f -#define ADCBS_BUFSIZE_5120 0x00000010 -#define ADCBS_BUFSIZE_6144 0x00000011 -#define ADCBS_BUFSIZE_7168 0x00000012 -#define ADCBS_BUFSIZE_8192 0x00000013 -#define ADCBS_BUFSIZE_10240 0x00000014 -#define ADCBS_BUFSIZE_12288 0x00000015 -#define ADCBS_BUFSIZE_14366 0x00000016 -#define ADCBS_BUFSIZE_16384 0x00000017 -#define ADCBS_BUFSIZE_20480 0x00000018 -#define ADCBS_BUFSIZE_24576 0x00000019 -#define ADCBS_BUFSIZE_28672 0x0000001a -#define ADCBS_BUFSIZE_32768 0x0000001b -#define ADCBS_BUFSIZE_40960 0x0000001c -#define ADCBS_BUFSIZE_49152 0x0000001d -#define ADCBS_BUFSIZE_57344 0x0000001e -#define ADCBS_BUFSIZE_65536 0x0000001f - - -#define CDCS 0x50 /* CD-ROM digital channel status register */ - -#define GPSCS 0x51 /* General Purpose SPDIF channel status register*/ - -#define DBG 0x52 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ - -/* definitions for debug register - taken from the alsa drivers */ -#define DBG_ZC 0x80000000 /* zero tram counter */ -#define DBG_SATURATION_OCCURED 0x02000000 /* saturation control */ -#define DBG_SATURATION_ADDR 0x01ff0000 /* saturation address */ -#define DBG_SINGLE_STEP 0x00008000 /* single step mode */ -#define DBG_STEP 0x00004000 /* start single step */ -#define DBG_CONDITION_CODE 0x00003e00 /* condition code */ -#define DBG_SINGLE_STEP_ADDR 0x000001ff /* single step address */ - - -#define REG53 0x53 /* DO NOT PROGRAM THIS REGISTER!!! MAY DESTROY CHIP */ - -#define A_DBG 0x53 -#define A_DBG_SINGLE_STEP 0x00020000 /* Set to zero to start dsp */ -#define A_DBG_ZC 0x40000000 /* zero tram counter */ -#define A_DBG_STEP_ADDR 0x000003ff -#define A_DBG_SATURATION_OCCURED 0x20000000 -#define A_DBG_SATURATION_ADDR 0x0ffc0000 - -#define SPCS0 0x54 /* SPDIF output Channel Status 0 register */ - -#define SPCS1 0x55 /* SPDIF output Channel Status 1 register */ - -#define SPCS2 0x56 /* SPDIF output Channel Status 2 register */ - -#define SPCS_CLKACCYMASK 0x30000000 /* Clock accuracy */ -#define SPCS_CLKACCY_1000PPM 0x00000000 /* 1000 parts per million */ -#define SPCS_CLKACCY_50PPM 0x10000000 /* 50 parts per million */ -#define SPCS_CLKACCY_VARIABLE 0x20000000 /* Variable accuracy */ -#define SPCS_SAMPLERATEMASK 0x0f000000 /* Sample rate */ -#define SPCS_SAMPLERATE_44 0x00000000 /* 44.1kHz sample rate */ -#define SPCS_SAMPLERATE_48 0x02000000 /* 48kHz sample rate */ -#define SPCS_SAMPLERATE_32 0x03000000 /* 32kHz sample rate */ -#define SPCS_CHANNELNUMMASK 0x00f00000 /* Channel number */ -#define SPCS_CHANNELNUM_UNSPEC 0x00000000 /* Unspecified channel number */ -#define SPCS_CHANNELNUM_LEFT 0x00100000 /* Left channel */ -#define SPCS_CHANNELNUM_RIGHT 0x00200000 /* Right channel */ -#define SPCS_SOURCENUMMASK 0x000f0000 /* Source number */ -#define SPCS_SOURCENUM_UNSPEC 0x00000000 /* Unspecified source number */ -#define SPCS_GENERATIONSTATUS 0x00008000 /* Originality flag (see IEC-958 spec) */ -#define SPCS_CATEGORYCODEMASK 0x00007f00 /* Category code (see IEC-958 spec) */ -#define SPCS_MODEMASK 0x000000c0 /* Mode (see IEC-958 spec) */ -#define SPCS_EMPHASISMASK 0x00000038 /* Emphasis */ -#define SPCS_EMPHASIS_NONE 0x00000000 /* No emphasis */ -#define SPCS_EMPHASIS_50_15 0x00000008 /* 50/15 usec 2 channel */ -#define SPCS_COPYRIGHT 0x00000004 /* Copyright asserted flag -- do not modify */ -#define SPCS_NOTAUDIODATA 0x00000002 /* 0 = Digital audio, 1 = not audio */ -#define SPCS_PROFESSIONAL 0x00000001 /* 0 = Consumer (IEC-958), 1 = pro (AES3-1992) */ - -/* The 32-bit CLIx and SOLx registers all have one bit per channel control/status */ -#define CLIEL 0x58 /* Channel loop interrupt enable low register */ - -#define CLIEH 0x59 /* Channel loop interrupt enable high register */ - -#define CLIPL 0x5a /* Channel loop interrupt pending low register */ - -#define CLIPH 0x5b /* Channel loop interrupt pending high register */ - -#define SOLEL 0x5c /* Stop on loop enable low register */ - -#define SOLEH 0x5d /* Stop on loop enable high register */ - -#define SPBYPASS 0x5e /* SPDIF BYPASS mode register */ -#define SPBYPASS_ENABLE 0x00000001 /* Enable SPDIF bypass mode */ - -#define AC97SLOT 0x5f /* additional AC97 slots enable bits */ -#define AC97SLOT_CNTR 0x10 /* Center enable */ -#define AC97SLOT_LFE 0x20 /* LFE enable */ - -#define CDSRCS 0x60 /* CD-ROM Sample Rate Converter status register */ - -#define GPSRCS 0x61 /* General Purpose SPDIF sample rate cvt status */ - -#define ZVSRCS 0x62 /* ZVideo sample rate converter status */ - /* NOTE: This one has no SPDIFLOCKED field */ - /* Assumes sample lock */ - -/* These three bitfields apply to CDSRCS, GPSRCS, and (except as noted) ZVSRCS. */ -#define SRCS_SPDIFLOCKED 0x02000000 /* SPDIF stream locked */ -#define SRCS_RATELOCKED 0x01000000 /* Sample rate locked */ -#define SRCS_ESTSAMPLERATE 0x0007ffff /* Do not modify this field. */ - - -/* Note that these values can vary +/- by a small amount */ -#define SRCS_SPDIFRATE_44 0x0003acd9 -#define SRCS_SPDIFRATE_48 0x00040000 -#define SRCS_SPDIFRATE_96 0x00080000 - -#define MICIDX 0x63 /* Microphone recording buffer index register */ -#define MICIDX_MASK 0x0000ffff /* 16-bit value */ -#define MICIDX_IDX 0x10000063 - -#define A_ADCIDX 0x63 -#define A_ADCIDX_IDX 0x10000063 - -#define ADCIDX 0x64 /* ADC recording buffer index register */ -#define ADCIDX_MASK 0x0000ffff /* 16 bit index field */ -#define ADCIDX_IDX 0x10000064 - -#define FXIDX 0x65 /* FX recording buffer index register */ -#define FXIDX_MASK 0x0000ffff /* 16-bit value */ -#define FXIDX_IDX 0x10000065 - -/* This is the MPU port on the card (via the game port) */ -#define A_MUDATA1 0x70 -#define A_MUCMD1 0x71 -#define A_MUSTAT1 A_MUCMD1 - -/* This is the MPU port on the Audigy Drive */ -#define A_MUDATA2 0x72 -#define A_MUCMD2 0x73 -#define A_MUSTAT2 A_MUCMD2 - -/* The next two are the Audigy equivalent of FXWC */ -/* the Audigy can record any output (16bit, 48kHz, up to 64 channel simultaneously) */ -/* Each bit selects a channel for recording */ -#define A_FXWC1 0x74 /* Selects 0x7f-0x60 for FX recording */ -#define A_FXWC2 0x75 /* Selects 0x9f-0x80 for FX recording */ - -#define A_SPDIF_SAMPLERATE 0x76 /* Set the sample rate of SPDIF output */ -#define A_SPDIF_48000 0x00000080 -#define A_SPDIF_44100 0x00000000 -#define A_SPDIF_96000 0x00000040 - -#define A_FXRT2 0x7c -#define A_FXRT_CHANNELE 0x0000003f /* Effects send bus number for channel's effects send E */ -#define A_FXRT_CHANNELF 0x00003f00 /* Effects send bus number for channel's effects send F */ -#define A_FXRT_CHANNELG 0x003f0000 /* Effects send bus number for channel's effects send G */ -#define A_FXRT_CHANNELH 0x3f000000 /* Effects send bus number for channel's effects send H */ - -#define A_SENDAMOUNTS 0x7d -#define A_FXSENDAMOUNT_E_MASK 0xff000000 -#define A_FXSENDAMOUNT_F_MASK 0x00ff0000 -#define A_FXSENDAMOUNT_G_MASK 0x0000ff00 -#define A_FXSENDAMOUNT_H_MASK 0x000000ff - -/* The send amounts for this one are the same as used with the emu10k1 */ -#define A_FXRT1 0x7e -#define A_FXRT_CHANNELA 0x0000003f -#define A_FXRT_CHANNELB 0x00003f00 -#define A_FXRT_CHANNELC 0x003f0000 -#define A_FXRT_CHANNELD 0x3f000000 - - -/* Each FX general purpose register is 32 bits in length, all bits are used */ -#define FXGPREGBASE 0x100 /* FX general purpose registers base */ -#define A_FXGPREGBASE 0x400 /* Audigy GPRs, 0x400 to 0x5ff */ -/* Tank audio data is logarithmically compressed down to 16 bits before writing to TRAM and is */ -/* decompressed back to 20 bits on a read. There are a total of 160 locations, the last 32 */ -/* locations are for external TRAM. */ -#define TANKMEMDATAREGBASE 0x200 /* Tank memory data registers base */ -#define TANKMEMDATAREG_MASK 0x000fffff /* 20 bit tank audio data field */ - -/* Combined address field and memory opcode or flag field. 160 locations, last 32 are external */ -#define TANKMEMADDRREGBASE 0x300 /* Tank memory address registers base */ -#define TANKMEMADDRREG_ADDR_MASK 0x000fffff /* 20 bit tank address field */ -#define TANKMEMADDRREG_CLEAR 0x00800000 /* Clear tank memory */ -#define TANKMEMADDRREG_ALIGN 0x00400000 /* Align read or write relative to tank access */ -#define TANKMEMADDRREG_WRITE 0x00200000 /* Write to tank memory */ -#define TANKMEMADDRREG_READ 0x00100000 /* Read from tank memory */ - -#define MICROCODEBASE 0x400 /* Microcode data base address */ - -/* Each DSP microcode instruction is mapped into 2 doublewords */ -/* NOTE: When writing, always write the LO doubleword first. Reads can be in either order. */ -#define LOWORD_OPX_MASK 0x000ffc00 /* Instruction operand X */ -#define LOWORD_OPY_MASK 0x000003ff /* Instruction operand Y */ -#define HIWORD_OPCODE_MASK 0x00f00000 /* Instruction opcode */ -#define HIWORD_RESULT_MASK 0x000ffc00 /* Instruction result */ -#define HIWORD_OPA_MASK 0x000003ff /* Instruction operand A */ - - -/* Audigy Soundcard have a different instruction format */ -#define AUDIGY_CODEBASE 0x600 -#define A_LOWORD_OPY_MASK 0x000007ff -#define A_LOWORD_OPX_MASK 0x007ff000 -#define A_HIWORD_OPCODE_MASK 0x0f000000 -#define A_HIWORD_RESULT_MASK 0x007ff000 -#define A_HIWORD_OPA_MASK 0x000007ff - - -#endif /* _8010_H */ diff --git a/sound/oss/emu10k1/Makefile b/sound/oss/emu10k1/Makefile deleted file mode 100644 index b3af9ccb0579..000000000000 --- a/sound/oss/emu10k1/Makefile +++ /dev/null @@ -1,17 +0,0 @@ -# Makefile for Creative Labs EMU10K1 -# -# 12 Apr 2000 Rui Sousa - -obj-$(CONFIG_SOUND_EMU10K1) += emu10k1.o - -emu10k1-objs := audio.o cardmi.o cardmo.o cardwi.o cardwo.o ecard.o \ - efxmgr.o emuadxmg.o hwaccess.o irqmgr.o main.o midi.o \ - mixer.o passthrough.o recmgr.o timer.o voicemgr.o - -ifdef DEBUG - EXTRA_CFLAGS += -DEMU10K1_DEBUG -endif - -ifdef CONFIG_MIDI_EMU10K1 - EXTRA_CFLAGS += -DEMU10K1_SEQUENCER -endif diff --git a/sound/oss/emu10k1/audio.c b/sound/oss/emu10k1/audio.c deleted file mode 100644 index e75ea21eb811..000000000000 --- a/sound/oss/emu10k1/audio.c +++ /dev/null @@ -1,1595 +0,0 @@ -/* - ********************************************************************** - * audio.c -- /dev/dsp interface for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox cleaned up types/leaks - * - ********************************************************************** - * - * 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 -#include -#include -#include -#include -#include -#include -#include - -#include "hwaccess.h" -#include "cardwo.h" -#include "cardwi.h" -#include "recmgr.h" -#include "irqmgr.h" -#include "audio.h" -#include "8010.h" - -static void calculate_ofrag(struct woinst *); -static void calculate_ifrag(struct wiinst *); - -static void emu10k1_waveout_bh(unsigned long refdata); -static void emu10k1_wavein_bh(unsigned long refdata); - -/* Audio file operations */ -static ssize_t emu10k1_audio_read(struct file *file, char __user *buffer, size_t count, loff_t * ppos) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) file->private_data; - struct wiinst *wiinst = wave_dev->wiinst; - ssize_t ret = 0; - unsigned long flags; - - DPD(3, "emu10k1_audio_read(), buffer=%p, count=%d\n", buffer, (u32) count); - - if (!access_ok(VERIFY_WRITE, buffer, count)) - return -EFAULT; - - spin_lock_irqsave(&wiinst->lock, flags); - - if (wiinst->mmapped) { - spin_unlock_irqrestore(&wiinst->lock, flags); - return -ENXIO; - } - - if (wiinst->state == WAVE_STATE_CLOSED) { - calculate_ifrag(wiinst); - - while (emu10k1_wavein_open(wave_dev) < 0) { - spin_unlock_irqrestore(&wiinst->lock, flags); - - if (file->f_flags & O_NONBLOCK) - return -EAGAIN; - - interruptible_sleep_on(&wave_dev->card->open_wait); - - if (signal_pending(current)) - return -ERESTARTSYS; - - spin_lock_irqsave(&wiinst->lock, flags); - } - } - - spin_unlock_irqrestore(&wiinst->lock, flags); - - while (count > 0) { - u32 bytestocopy; - - spin_lock_irqsave(&wiinst->lock, flags); - - if (!(wiinst->state & WAVE_STATE_STARTED) - && (wave_dev->enablebits & PCM_ENABLE_INPUT)) - emu10k1_wavein_start(wave_dev); - - emu10k1_wavein_update(wave_dev->card, wiinst); - emu10k1_wavein_getxfersize(wiinst, &bytestocopy); - - spin_unlock_irqrestore(&wiinst->lock, flags); - - DPD(3, "bytestocopy --> %d\n", bytestocopy); - - if ((bytestocopy >= wiinst->buffer.fragment_size) - || (bytestocopy >= count)) { - int rc; - - bytestocopy = min_t(u32, bytestocopy, count); - - rc = emu10k1_wavein_xferdata(wiinst, - (u8 __user *)buffer, - &bytestocopy); - if (rc) - return rc; - - count -= bytestocopy; - buffer += bytestocopy; - ret += bytestocopy; - } - - if (count > 0) { - if ((file->f_flags & O_NONBLOCK) - || (!(wave_dev->enablebits & PCM_ENABLE_INPUT))) - return (ret ? ret : -EAGAIN); - - interruptible_sleep_on(&wiinst->wait_queue); - - if (signal_pending(current)) - return (ret ? ret : -ERESTARTSYS); - - } - } - - DPD(3, "bytes copied -> %d\n", (u32) ret); - - return ret; -} - -static ssize_t emu10k1_audio_write(struct file *file, const char __user *buffer, size_t count, loff_t * ppos) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) file->private_data; - struct woinst *woinst = wave_dev->woinst; - ssize_t ret; - unsigned long flags; - - DPD(3, "emu10k1_audio_write(), buffer=%p, count=%d\n", buffer, (u32) count); - - if (!access_ok(VERIFY_READ, buffer, count)) - return -EFAULT; - - spin_lock_irqsave(&woinst->lock, flags); - - if (woinst->mmapped) { - spin_unlock_irqrestore(&woinst->lock, flags); - return -ENXIO; - } - // This is for emu10k1 revs less than 7, we need to go through tram - if (woinst->format.passthrough == 1) { - int r; - - woinst->buffer.ossfragshift = PT_BLOCKSIZE_LOG2; - woinst->buffer.numfrags = PT_BLOCKCOUNT; - calculate_ofrag(woinst); - - r = emu10k1_pt_write(file, buffer, count); - spin_unlock_irqrestore(&woinst->lock, flags); - return r; - } - - if (woinst->state == WAVE_STATE_CLOSED) { - calculate_ofrag(woinst); - - while (emu10k1_waveout_open(wave_dev) < 0) { - spin_unlock_irqrestore(&woinst->lock, flags); - - if (file->f_flags & O_NONBLOCK) - return -EAGAIN; - - interruptible_sleep_on(&wave_dev->card->open_wait); - - if (signal_pending(current)) - return -ERESTARTSYS; - - spin_lock_irqsave(&woinst->lock, flags); - } - } - - spin_unlock_irqrestore(&woinst->lock, flags); - - ret = 0; - if (count % woinst->format.bytespersample) - return -EINVAL; - - count /= woinst->num_voices; - - while (count > 0) { - u32 bytestocopy; - - spin_lock_irqsave(&woinst->lock, flags); - emu10k1_waveout_update(woinst); - emu10k1_waveout_getxfersize(woinst, &bytestocopy); - spin_unlock_irqrestore(&woinst->lock, flags); - - DPD(3, "bytestocopy --> %d\n", bytestocopy); - - if ((bytestocopy >= woinst->buffer.fragment_size) - || (bytestocopy >= count)) { - - bytestocopy = min_t(u32, bytestocopy, count); - - emu10k1_waveout_xferdata(woinst, (u8 __user *) buffer, &bytestocopy); - - count -= bytestocopy; - buffer += bytestocopy * woinst->num_voices; - ret += bytestocopy * woinst->num_voices; - - spin_lock_irqsave(&woinst->lock, flags); - woinst->total_copied += bytestocopy; - - if (!(woinst->state & WAVE_STATE_STARTED) - && (wave_dev->enablebits & PCM_ENABLE_OUTPUT) - && (woinst->total_copied >= woinst->buffer.fragment_size)) - emu10k1_waveout_start(wave_dev); - - spin_unlock_irqrestore(&woinst->lock, flags); - } - - if (count > 0) { - if ((file->f_flags & O_NONBLOCK) - || (!(wave_dev->enablebits & PCM_ENABLE_OUTPUT))) - return (ret ? ret : -EAGAIN); - - interruptible_sleep_on(&woinst->wait_queue); - - if (signal_pending(current)) - return (ret ? ret : -ERESTARTSYS); - } - } - - DPD(3, "bytes copied -> %d\n", (u32) ret); - - return ret; -} - -static int emu10k1_audio_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) file->private_data; - struct woinst *woinst = NULL; - struct wiinst *wiinst = NULL; - int val = 0; - u32 bytestocopy; - unsigned long flags; - int __user *p = (int __user *)arg; - - DPF(4, "emu10k1_audio_ioctl()\n"); - - if (file->f_mode & FMODE_WRITE) - woinst = wave_dev->woinst; - - if (file->f_mode & FMODE_READ) - wiinst = wave_dev->wiinst; - - switch (cmd) { - case OSS_GETVERSION: - DPF(2, "OSS_GETVERSION:\n"); - return put_user(SOUND_VERSION, p); - - case SNDCTL_DSP_RESET: - DPF(2, "SNDCTL_DSP_RESET:\n"); - wave_dev->enablebits = PCM_ENABLE_OUTPUT | PCM_ENABLE_INPUT; - - if (file->f_mode & FMODE_WRITE) { - spin_lock_irqsave(&woinst->lock, flags); - - if (woinst->state & WAVE_STATE_OPEN) { - emu10k1_waveout_close(wave_dev); - } - - woinst->mmapped = 0; - woinst->total_copied = 0; - woinst->total_played = 0; - woinst->blocks = 0; - - spin_unlock_irqrestore(&woinst->lock, flags); - } - - if (file->f_mode & FMODE_READ) { - spin_lock_irqsave(&wiinst->lock, flags); - - if (wiinst->state & WAVE_STATE_OPEN) { - emu10k1_wavein_close(wave_dev); - } - - wiinst->mmapped = 0; - wiinst->total_recorded = 0; - wiinst->blocks = 0; - spin_unlock_irqrestore(&wiinst->lock, flags); - } - - break; - - case SNDCTL_DSP_SYNC: - DPF(2, "SNDCTL_DSP_SYNC:\n"); - - if (file->f_mode & FMODE_WRITE) { - - spin_lock_irqsave(&woinst->lock, flags); - - if (woinst->state & WAVE_STATE_OPEN) { - - if (woinst->state & WAVE_STATE_STARTED) - while ((woinst->total_played < woinst->total_copied) - && !signal_pending(current)) { - spin_unlock_irqrestore(&woinst->lock, flags); - interruptible_sleep_on(&woinst->wait_queue); - spin_lock_irqsave(&woinst->lock, flags); - } - emu10k1_waveout_close(wave_dev); - } - - woinst->mmapped = 0; - woinst->total_copied = 0; - woinst->total_played = 0; - woinst->blocks = 0; - - spin_unlock_irqrestore(&woinst->lock, flags); - } - - if (file->f_mode & FMODE_READ) { - spin_lock_irqsave(&wiinst->lock, flags); - - if (wiinst->state & WAVE_STATE_OPEN) { - emu10k1_wavein_close(wave_dev); - } - - wiinst->mmapped = 0; - wiinst->total_recorded = 0; - wiinst->blocks = 0; - spin_unlock_irqrestore(&wiinst->lock, flags); - } - - break; - - case SNDCTL_DSP_SETDUPLEX: - DPF(2, "SNDCTL_DSP_SETDUPLEX:\n"); - break; - - case SNDCTL_DSP_GETCAPS: - DPF(2, "SNDCTL_DSP_GETCAPS:\n"); - return put_user(DSP_CAP_DUPLEX | DSP_CAP_REALTIME | - DSP_CAP_TRIGGER | DSP_CAP_MMAP | - DSP_CAP_COPROC| DSP_CAP_MULTI, p); - case SNDCTL_DSP_SPEED: - DPF(2, "SNDCTL_DSP_SPEED:\n"); - - if (get_user(val, p)) - return -EFAULT; - - DPD(2, "val is %d\n", val); - - if (val > 0) { - if (file->f_mode & FMODE_READ) { - struct wave_format format; - - spin_lock_irqsave(&wiinst->lock, flags); - - format = wiinst->format; - format.samplingrate = val; - - if (emu10k1_wavein_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&wiinst->lock, flags); - return -EINVAL; - } - - val = wiinst->format.samplingrate; - - spin_unlock_irqrestore(&wiinst->lock, flags); - - DPD(2, "set recording sampling rate -> %d\n", val); - } - - if (file->f_mode & FMODE_WRITE) { - struct wave_format format; - - spin_lock_irqsave(&woinst->lock, flags); - - format = woinst->format; - format.samplingrate = val; - - if (emu10k1_waveout_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&woinst->lock, flags); - return -EINVAL; - } - - val = woinst->format.samplingrate; - - spin_unlock_irqrestore(&woinst->lock, flags); - - DPD(2, "set playback sampling rate -> %d\n", val); - } - - return put_user(val, p); - } else { - if (file->f_mode & FMODE_READ) - val = wiinst->format.samplingrate; - else if (file->f_mode & FMODE_WRITE) - val = woinst->format.samplingrate; - - return put_user(val, p); - } - break; - - case SNDCTL_DSP_STEREO: - DPF(2, "SNDCTL_DSP_STEREO:\n"); - - if (get_user(val, p)) - return -EFAULT; - - DPD(2, " val is %d\n", val); - - if (file->f_mode & FMODE_READ) { - struct wave_format format; - - spin_lock_irqsave(&wiinst->lock, flags); - - format = wiinst->format; - format.channels = val ? 2 : 1; - - if (emu10k1_wavein_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&wiinst->lock, flags); - return -EINVAL; - } - - val = wiinst->format.channels - 1; - - spin_unlock_irqrestore(&wiinst->lock, flags); - DPD(2, "set recording stereo -> %d\n", val); - } - - if (file->f_mode & FMODE_WRITE) { - struct wave_format format; - - spin_lock_irqsave(&woinst->lock, flags); - - format = woinst->format; - format.channels = val ? 2 : 1; - - if (emu10k1_waveout_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&woinst->lock, flags); - return -EINVAL; - } - - val = woinst->format.channels - 1; - - spin_unlock_irqrestore(&woinst->lock, flags); - - DPD(2, "set playback stereo -> %d\n", val); - } - - return put_user(val, p); - - break; - - case SNDCTL_DSP_CHANNELS: - DPF(2, "SNDCTL_DSP_CHANNELS:\n"); - - if (get_user(val, p)) - return -EFAULT; - - DPD(2, " val is %d\n", val); - - if (val > 0) { - if (file->f_mode & FMODE_READ) { - struct wave_format format; - - spin_lock_irqsave(&wiinst->lock, flags); - - format = wiinst->format; - format.channels = val; - - if (emu10k1_wavein_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&wiinst->lock, flags); - return -EINVAL; - } - val = wiinst->format.channels; - - spin_unlock_irqrestore(&wiinst->lock, flags); - DPD(2, "set recording number of channels -> %d\n", val); - } - - if (file->f_mode & FMODE_WRITE) { - struct wave_format format; - - spin_lock_irqsave(&woinst->lock, flags); - - format = woinst->format; - format.channels = val; - - if (emu10k1_waveout_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&woinst->lock, flags); - return -EINVAL; - } - - val = woinst->format.channels; - - spin_unlock_irqrestore(&woinst->lock, flags); - DPD(2, "set playback number of channels -> %d\n", val); - } - - return put_user(val, p); - } else { - if (file->f_mode & FMODE_READ) - val = wiinst->format.channels; - else if (file->f_mode & FMODE_WRITE) - val = woinst->format.channels; - - return put_user(val, p); - } - break; - - case SNDCTL_DSP_GETFMTS: - DPF(2, "SNDCTL_DSP_GETFMTS:\n"); - - if (file->f_mode & FMODE_READ) - val = AFMT_S16_LE; - else if (file->f_mode & FMODE_WRITE) { - val = AFMT_S16_LE | AFMT_U8; - if (emu10k1_find_control_gpr(&wave_dev->card->mgr, - wave_dev->card->pt.patch_name, - wave_dev->card->pt.enable_gpr_name) >= 0) - val |= AFMT_AC3; - } - return put_user(val, p); - - case SNDCTL_DSP_SETFMT: /* Same as SNDCTL_DSP_SAMPLESIZE */ - DPF(2, "SNDCTL_DSP_SETFMT:\n"); - - if (get_user(val, p)) - return -EFAULT; - - DPD(2, " val is %d\n", val); - - if (val != AFMT_QUERY) { - if (file->f_mode & FMODE_READ) { - struct wave_format format; - - spin_lock_irqsave(&wiinst->lock, flags); - - format = wiinst->format; - format.id = val; - - if (emu10k1_wavein_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&wiinst->lock, flags); - return -EINVAL; - } - - val = wiinst->format.id; - - spin_unlock_irqrestore(&wiinst->lock, flags); - DPD(2, "set recording format -> %d\n", val); - } - - if (file->f_mode & FMODE_WRITE) { - struct wave_format format; - - spin_lock_irqsave(&woinst->lock, flags); - - format = woinst->format; - format.id = val; - - if (emu10k1_waveout_setformat(wave_dev, &format) < 0) { - spin_unlock_irqrestore(&woinst->lock, flags); - return -EINVAL; - } - - val = woinst->format.id; - - spin_unlock_irqrestore(&woinst->lock, flags); - DPD(2, "set playback format -> %d\n", val); - } - - return put_user(val, p); - } else { - if (file->f_mode & FMODE_READ) - val = wiinst->format.id; - else if (file->f_mode & FMODE_WRITE) - val = woinst->format.id; - - return put_user(val, p); - } - break; - - case SOUND_PCM_READ_BITS: - - if (file->f_mode & FMODE_READ) - val = wiinst->format.bitsperchannel; - else if (file->f_mode & FMODE_WRITE) - val = woinst->format.bitsperchannel; - - return put_user(val, p); - - case SOUND_PCM_READ_RATE: - - if (file->f_mode & FMODE_READ) - val = wiinst->format.samplingrate; - else if (file->f_mode & FMODE_WRITE) - val = woinst->format.samplingrate; - - return put_user(val, p); - - case SOUND_PCM_READ_CHANNELS: - - if (file->f_mode & FMODE_READ) - val = wiinst->format.channels; - else if (file->f_mode & FMODE_WRITE) - val = woinst->format.channels; - - return put_user(val, p); - - case SOUND_PCM_WRITE_FILTER: - DPF(2, "SOUND_PCM_WRITE_FILTER: not implemented\n"); - break; - - case SOUND_PCM_READ_FILTER: - DPF(2, "SOUND_PCM_READ_FILTER: not implemented\n"); - break; - - case SNDCTL_DSP_SETSYNCRO: - DPF(2, "SNDCTL_DSP_SETSYNCRO: not implemented\n"); - break; - - case SNDCTL_DSP_GETTRIGGER: - DPF(2, "SNDCTL_DSP_GETTRIGGER:\n"); - - if (file->f_mode & FMODE_WRITE && (wave_dev->enablebits & PCM_ENABLE_OUTPUT)) - val |= PCM_ENABLE_OUTPUT; - - if (file->f_mode & FMODE_READ && (wave_dev->enablebits & PCM_ENABLE_INPUT)) - val |= PCM_ENABLE_INPUT; - - return put_user(val, p); - - case SNDCTL_DSP_SETTRIGGER: - DPF(2, "SNDCTL_DSP_SETTRIGGER:\n"); - - if (get_user(val, p)) - return -EFAULT; - - if (file->f_mode & FMODE_WRITE) { - spin_lock_irqsave(&woinst->lock, flags); - - if (val & PCM_ENABLE_OUTPUT) { - wave_dev->enablebits |= PCM_ENABLE_OUTPUT; - if (woinst->state & WAVE_STATE_OPEN) - emu10k1_waveout_start(wave_dev); - } else { - wave_dev->enablebits &= ~PCM_ENABLE_OUTPUT; - if (woinst->state & WAVE_STATE_STARTED) - emu10k1_waveout_stop(wave_dev); - } - - spin_unlock_irqrestore(&woinst->lock, flags); - } - - if (file->f_mode & FMODE_READ) { - spin_lock_irqsave(&wiinst->lock, flags); - - if (val & PCM_ENABLE_INPUT) { - wave_dev->enablebits |= PCM_ENABLE_INPUT; - if (wiinst->state & WAVE_STATE_OPEN) - emu10k1_wavein_start(wave_dev); - } else { - wave_dev->enablebits &= ~PCM_ENABLE_INPUT; - if (wiinst->state & WAVE_STATE_STARTED) - emu10k1_wavein_stop(wave_dev); - } - - spin_unlock_irqrestore(&wiinst->lock, flags); - } - break; - - case SNDCTL_DSP_GETOSPACE: - { - audio_buf_info info; - - DPF(4, "SNDCTL_DSP_GETOSPACE:\n"); - - if (!(file->f_mode & FMODE_WRITE)) - return -EINVAL; - - spin_lock_irqsave(&woinst->lock, flags); - - if (woinst->state & WAVE_STATE_OPEN) { - emu10k1_waveout_update(woinst); - emu10k1_waveout_getxfersize(woinst, &bytestocopy); - info.bytes = bytestocopy; - } else { - calculate_ofrag(woinst); - info.bytes = woinst->buffer.size; - } - spin_unlock_irqrestore(&woinst->lock, flags); - - info.bytes *= woinst->num_voices; - info.fragsize = woinst->buffer.fragment_size * woinst->num_voices; - info.fragstotal = woinst->buffer.numfrags * woinst->num_voices; - info.fragments = info.bytes / info.fragsize; - - if (copy_to_user(p, &info, sizeof(info))) - return -EFAULT; - } - break; - - case SNDCTL_DSP_GETISPACE: - { - audio_buf_info info; - - DPF(4, "SNDCTL_DSP_GETISPACE:\n"); - - if (!(file->f_mode & FMODE_READ)) - return -EINVAL; - - spin_lock_irqsave(&wiinst->lock, flags); - if (wiinst->state & WAVE_STATE_OPEN) { - emu10k1_wavein_update(wave_dev->card, wiinst); - emu10k1_wavein_getxfersize(wiinst, &bytestocopy); - info.bytes = bytestocopy; - } else { - calculate_ifrag(wiinst); - info.bytes = 0; - } - spin_unlock_irqrestore(&wiinst->lock, flags); - - info.fragstotal = wiinst->buffer.numfrags; - info.fragments = info.bytes / wiinst->buffer.fragment_size; - info.fragsize = wiinst->buffer.fragment_size; - - if (copy_to_user(p, &info, sizeof(info))) - return -EFAULT; - } - break; - - case SNDCTL_DSP_NONBLOCK: - DPF(2, "SNDCTL_DSP_NONBLOCK:\n"); - - file->f_flags |= O_NONBLOCK; - break; - - case SNDCTL_DSP_GETODELAY: - DPF(4, "SNDCTL_DSP_GETODELAY:\n"); - - if (!(file->f_mode & FMODE_WRITE)) - return -EINVAL; - - spin_lock_irqsave(&woinst->lock, flags); - if (woinst->state & WAVE_STATE_OPEN) { - emu10k1_waveout_update(woinst); - emu10k1_waveout_getxfersize(woinst, &bytestocopy); - val = woinst->buffer.size - bytestocopy; - } else - val = 0; - - val *= woinst->num_voices; - spin_unlock_irqrestore(&woinst->lock, flags); - - return put_user(val, p); - - case SNDCTL_DSP_GETIPTR: - { - count_info cinfo; - - DPF(4, "SNDCTL_DSP_GETIPTR: \n"); - - if (!(file->f_mode & FMODE_READ)) - return -EINVAL; - - spin_lock_irqsave(&wiinst->lock, flags); - - if (wiinst->state & WAVE_STATE_OPEN) { - emu10k1_wavein_update(wave_dev->card, wiinst); - cinfo.ptr = wiinst->buffer.hw_pos; - cinfo.bytes = cinfo.ptr + wiinst->total_recorded - wiinst->total_recorded % wiinst->buffer.size; - cinfo.blocks = cinfo.bytes / wiinst->buffer.fragment_size - wiinst->blocks; - wiinst->blocks = cinfo.bytes / wiinst->buffer.fragment_size; - } else { - cinfo.ptr = 0; - cinfo.bytes = 0; - cinfo.blocks = 0; - } - - if (wiinst->mmapped) - wiinst->buffer.bytestocopy %= wiinst->buffer.fragment_size; - - spin_unlock_irqrestore(&wiinst->lock, flags); - - if (copy_to_user(p, &cinfo, sizeof(cinfo))) - return -EFAULT; - } - break; - - case SNDCTL_DSP_GETOPTR: - { - count_info cinfo; - - DPF(4, "SNDCTL_DSP_GETOPTR:\n"); - - if (!(file->f_mode & FMODE_WRITE)) - return -EINVAL; - - spin_lock_irqsave(&woinst->lock, flags); - - if (woinst->state & WAVE_STATE_OPEN || - ((woinst->format.passthrough == 1) && wave_dev->card->pt.state)) { - int num_fragments; - - if (woinst->format.passthrough == 1) { - emu10k1_pt_waveout_update(wave_dev); - cinfo.bytes = woinst->total_played; - } else { - emu10k1_waveout_update(woinst); - cinfo.bytes = woinst->total_played; - } - - cinfo.ptr = woinst->buffer.hw_pos; - num_fragments = cinfo.bytes / woinst->buffer.fragment_size; - cinfo.blocks = num_fragments - woinst->blocks; - woinst->blocks = num_fragments; - - cinfo.bytes *= woinst->num_voices; - cinfo.ptr *= woinst->num_voices; - } else { - cinfo.ptr = 0; - cinfo.bytes = 0; - cinfo.blocks = 0; - } - - if (woinst->mmapped) - woinst->buffer.free_bytes %= woinst->buffer.fragment_size; - - spin_unlock_irqrestore(&woinst->lock, flags); - - if (copy_to_user(p, &cinfo, sizeof(cinfo))) - return -EFAULT; - } - break; - - case SNDCTL_DSP_GETBLKSIZE: - DPF(2, "SNDCTL_DSP_GETBLKSIZE:\n"); - - if (file->f_mode & FMODE_WRITE) { - spin_lock_irqsave(&woinst->lock, flags); - - calculate_ofrag(woinst); - val = woinst->buffer.fragment_size * woinst->num_voices; - - spin_unlock_irqrestore(&woinst->lock, flags); - } - - if (file->f_mode & FMODE_READ) { - spin_lock_irqsave(&wiinst->lock, flags); - - calculate_ifrag(wiinst); - val = wiinst->buffer.fragment_size; - - spin_unlock_irqrestore(&wiinst->lock, flags); - } - - return put_user(val, p); - - break; - - case SNDCTL_DSP_POST: - if (file->f_mode & FMODE_WRITE) { - spin_lock_irqsave(&woinst->lock, flags); - - if (!(woinst->state & WAVE_STATE_STARTED) - && (wave_dev->enablebits & PCM_ENABLE_OUTPUT) - && (woinst->total_copied > 0)) - emu10k1_waveout_start(wave_dev); - - spin_unlock_irqrestore(&woinst->lock, flags); - } - - break; - - case SNDCTL_DSP_SUBDIVIDE: - DPF(2, "SNDCTL_DSP_SUBDIVIDE: not implemented\n"); - break; - - case SNDCTL_DSP_SETFRAGMENT: - DPF(2, "SNDCTL_DSP_SETFRAGMENT:\n"); - - if (get_user(val, p)) - return -EFAULT; - - DPD(2, "val is %#x\n", val); - - if (val == 0) - return -EIO; - - if (file->f_mode & FMODE_WRITE) { - /* digital pass-through fragment count and size are fixed values */ - if (woinst->state & WAVE_STATE_OPEN || (woinst->format.passthrough == 1)) - return -EINVAL; /* too late to change */ - - woinst->buffer.ossfragshift = val & 0xffff; - woinst->buffer.numfrags = (val >> 16) & 0xffff; - } - - if (file->f_mode & FMODE_READ) { - if (wiinst->state & WAVE_STATE_OPEN) - return -EINVAL; /* too late to change */ - - wiinst->buffer.ossfragshift = val & 0xffff; - wiinst->buffer.numfrags = (val >> 16) & 0xffff; - } - - break; - - case SNDCTL_COPR_LOAD: - { - copr_buffer *buf; - u32 i; - - DPF(4, "SNDCTL_COPR_LOAD:\n"); - - buf = kmalloc(sizeof(copr_buffer), GFP_KERNEL); - if (!buf) - return -ENOMEM; - - if (copy_from_user(buf, p, sizeof(copr_buffer))) { - kfree (buf); - return -EFAULT; - } - - if ((buf->command != CMD_READ) && (buf->command != CMD_WRITE)) { - kfree (buf); - return -EINVAL; - } - - if (buf->command == CMD_WRITE) { - -#ifdef DBGEMU - if ((buf->offs < 0) || (buf->offs + buf->len > 0xe00) || (buf->len > 1000)) { -#else - if (((buf->offs < 0x100) || (buf->offs + buf->len > (wave_dev->card->is_audigy ? 0xe00 : 0x800)) || (buf->len > 1000) - ) && !( - //any register allowed raw access to users goes here: - (buf->offs == DBG || - buf->offs == A_DBG) - && (buf->len == 1))) { -#endif - kfree(buf); - return -EINVAL; - } - } else { - if ((buf->offs < 0) || (buf->offs + buf->len > 0xe00) || (buf->len > 1000)) { - kfree(buf); - return -EINVAL; - } - } - - if (((unsigned)buf->flags) > 0x3f) - buf->flags = 0; - - if (buf->command == CMD_READ) { - for (i = 0; i < buf->len; i++) - ((u32 *) buf->data)[i] = sblive_readptr(wave_dev->card, buf->offs + i, buf->flags); - - if (copy_to_user(p, buf, sizeof(copr_buffer))) { - kfree(buf); - return -EFAULT; - } - } else { - for (i = 0; i < buf->len; i++) - sblive_writeptr(wave_dev->card, buf->offs + i, buf->flags, ((u32 *) buf->data)[i]); - } - - kfree (buf); - break; - } - - default: /* Default is unrecognized command */ - DPD(2, "default: %#x\n", cmd); - return -EINVAL; - } - return 0; -} - -static struct page *emu10k1_mm_nopage (struct vm_area_struct * vma, unsigned long address, int *type) -{ - struct emu10k1_wavedevice *wave_dev = vma->vm_private_data; - struct woinst *woinst = wave_dev->woinst; - struct wiinst *wiinst = wave_dev->wiinst; - struct page *dmapage; - unsigned long pgoff; - int rd, wr; - - DPF(3, "emu10k1_mm_nopage()\n"); - DPD(3, "addr: %#lx\n", address); - - if (address > vma->vm_end) { - DPF(1, "EXIT, returning NOPAGE_SIGBUS\n"); - return NOPAGE_SIGBUS; /* Disallow mremap */ - } - - pgoff = vma->vm_pgoff + ((address - vma->vm_start) >> PAGE_SHIFT); - if (woinst != NULL) - wr = woinst->mmapped; - else - wr = 0; - - if (wiinst != NULL) - rd = wiinst->mmapped; - else - rd = 0; - - /* if full-duplex (read+write) and we have two sets of bufs, - * then the playback buffers come first, sez soundcard.c */ - if (wr) { - if (pgoff >= woinst->buffer.pages) { - pgoff -= woinst->buffer.pages; - dmapage = virt_to_page ((u8 *) wiinst->buffer.addr + pgoff * PAGE_SIZE); - } else - dmapage = virt_to_page (woinst->voice[0].mem.addr[pgoff]); - } else { - dmapage = virt_to_page ((u8 *) wiinst->buffer.addr + pgoff * PAGE_SIZE); - } - - get_page (dmapage); - - DPD(3, "page: %#lx\n", (unsigned long) dmapage); - if (type) - *type = VM_FAULT_MINOR; - return dmapage; -} - -static struct vm_operations_struct emu10k1_mm_ops = { - .nopage = emu10k1_mm_nopage, -}; - -static int emu10k1_audio_mmap(struct file *file, struct vm_area_struct *vma) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) file->private_data; - unsigned long max_pages, n_pages, pgoffset; - struct woinst *woinst = NULL; - struct wiinst *wiinst = NULL; - unsigned long flags; - - DPF(2, "emu10k1_audio_mmap()\n"); - - max_pages = 0; - if (vma->vm_flags & VM_WRITE) { - woinst = wave_dev->woinst; - - spin_lock_irqsave(&woinst->lock, flags); - - /* No m'mapping possible for multichannel */ - if (woinst->num_voices > 1) { - spin_unlock_irqrestore(&woinst->lock, flags); - return -EINVAL; - } - - if (woinst->state == WAVE_STATE_CLOSED) { - calculate_ofrag(woinst); - - if (emu10k1_waveout_open(wave_dev) < 0) { - spin_unlock_irqrestore(&woinst->lock, flags); - ERROR(); - return -EINVAL; - } - } - - woinst->mmapped = 1; - max_pages += woinst->buffer.pages; - spin_unlock_irqrestore(&woinst->lock, flags); - } - - if (vma->vm_flags & VM_READ) { - wiinst = wave_dev->wiinst; - - spin_lock_irqsave(&wiinst->lock, flags); - if (wiinst->state == WAVE_STATE_CLOSED) { - calculate_ifrag(wiinst); - - if (emu10k1_wavein_open(wave_dev) < 0) { - spin_unlock_irqrestore(&wiinst->lock, flags); - ERROR(); - return -EINVAL; - } - } - - wiinst->mmapped = 1; - max_pages += wiinst->buffer.pages; - spin_unlock_irqrestore(&wiinst->lock, flags); - } - - n_pages = ((vma->vm_end - vma->vm_start) + PAGE_SIZE - 1) >> PAGE_SHIFT; - pgoffset = vma->vm_pgoff; - - DPD(2, "vma_start: %#lx, vma_end: %#lx, vma_offset: %ld\n", vma->vm_start, vma->vm_end, pgoffset); - DPD(2, "n_pages: %ld, max_pages: %ld\n", n_pages, max_pages); - - if (pgoffset + n_pages > max_pages) - return -EINVAL; - - vma->vm_flags |= VM_RESERVED; - vma->vm_ops = &emu10k1_mm_ops; - vma->vm_private_data = wave_dev; - return 0; -} - -static int emu10k1_audio_open(struct inode *inode, struct file *file) -{ - int minor = iminor(inode); - struct emu10k1_card *card = NULL; - struct list_head *entry; - struct emu10k1_wavedevice *wave_dev; - - DPF(2, "emu10k1_audio_open()\n"); - - /* Check for correct device to open */ - - list_for_each(entry, &emu10k1_devs) { - card = list_entry(entry, struct emu10k1_card, list); - - if (!((card->audio_dev ^ minor) & ~0xf) || !((card->audio_dev1 ^ minor) & ~0xf)) - goto match; - } - - return -ENODEV; - -match: - - wave_dev = kmalloc(sizeof(struct emu10k1_wavedevice), GFP_KERNEL); - - if (wave_dev == NULL) { - ERROR(); - return -ENOMEM; - } - - wave_dev->card = card; - wave_dev->wiinst = NULL; - wave_dev->woinst = NULL; - wave_dev->enablebits = PCM_ENABLE_OUTPUT | PCM_ENABLE_INPUT; /* Default */ - - if (file->f_mode & FMODE_READ) { - /* Recording */ - struct wiinst *wiinst; - - if ((wiinst = kmalloc(sizeof(struct wiinst), GFP_KERNEL)) == NULL) { - ERROR(); - kfree(wave_dev); - return -ENOMEM; - } - - wiinst->recsrc = card->wavein.recsrc; - wiinst->fxwc = card->wavein.fxwc; - - switch (wiinst->recsrc) { - case WAVERECORD_AC97: - wiinst->format.id = AFMT_S16_LE; - wiinst->format.samplingrate = 8000; - wiinst->format.bitsperchannel = 16; - wiinst->format.channels = 1; - break; - case WAVERECORD_MIC: - wiinst->format.id = AFMT_S16_LE; - wiinst->format.samplingrate = 8000; - wiinst->format.bitsperchannel = 16; - wiinst->format.channels = 1; - break; - case WAVERECORD_FX: - wiinst->format.id = AFMT_S16_LE; - wiinst->format.samplingrate = 48000; - wiinst->format.bitsperchannel = 16; - wiinst->format.channels = hweight32(wiinst->fxwc); - break; - default: - kfree(wave_dev); - kfree(wiinst); - BUG(); - break; - } - - wiinst->state = WAVE_STATE_CLOSED; - - wiinst->buffer.ossfragshift = 0; - wiinst->buffer.fragment_size = 0; - wiinst->buffer.numfrags = 0; - - init_waitqueue_head(&wiinst->wait_queue); - - wiinst->mmapped = 0; - wiinst->total_recorded = 0; - wiinst->blocks = 0; - spin_lock_init(&wiinst->lock); - tasklet_init(&wiinst->timer.tasklet, emu10k1_wavein_bh, (unsigned long) wave_dev); - wave_dev->wiinst = wiinst; - emu10k1_wavein_setformat(wave_dev, &wiinst->format); - } - - if (file->f_mode & FMODE_WRITE) { - struct woinst *woinst; - int i; - - if ((woinst = kmalloc(sizeof(struct woinst), GFP_KERNEL)) == NULL) { - ERROR(); - kfree(wave_dev); - return -ENOMEM; - } - - if (wave_dev->wiinst != NULL) { - woinst->format = wave_dev->wiinst->format; - } else { - woinst->format.id = AFMT_U8; - woinst->format.samplingrate = 8000; - woinst->format.bitsperchannel = 8; - woinst->format.channels = 1; - } - - woinst->state = WAVE_STATE_CLOSED; - - woinst->buffer.fragment_size = 0; - woinst->buffer.ossfragshift = 0; - woinst->buffer.numfrags = 0; - woinst->device = (card->audio_dev1 == minor); - woinst->timer.state = TIMER_STATE_UNINSTALLED; - woinst->num_voices = 1; - for (i = 0; i < WAVEOUT_MAXVOICES; i++) { - woinst->voice[i].usage = VOICE_USAGE_FREE; - woinst->voice[i].mem.emupageindex = -1; - } - - init_waitqueue_head(&woinst->wait_queue); - - woinst->mmapped = 0; - woinst->total_copied = 0; - woinst->total_played = 0; - woinst->blocks = 0; - spin_lock_init(&woinst->lock); - tasklet_init(&woinst->timer.tasklet, emu10k1_waveout_bh, (unsigned long) wave_dev); - wave_dev->woinst = woinst; - emu10k1_waveout_setformat(wave_dev, &woinst->format); - } - - file->private_data = (void *) wave_dev; - - return nonseekable_open(inode, file); -} - -static int emu10k1_audio_release(struct inode *inode, struct file *file) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) file->private_data; - struct emu10k1_card *card; - unsigned long flags; - - card = wave_dev->card; - - DPF(2, "emu10k1_audio_release()\n"); - - if (file->f_mode & FMODE_WRITE) { - struct woinst *woinst = wave_dev->woinst; - - spin_lock_irqsave(&woinst->lock, flags); - if(woinst->format.passthrough==2) - card->pt.state=PT_STATE_PLAYING; - if (woinst->format.passthrough && card->pt.state != PT_STATE_INACTIVE){ - spin_lock(&card->pt.lock); - emu10k1_pt_stop(card); - spin_unlock(&card->pt.lock); - } - if (woinst->state & WAVE_STATE_OPEN) { - if (woinst->state & WAVE_STATE_STARTED) { - if (!(file->f_flags & O_NONBLOCK)) { - while (!signal_pending(current) - && (woinst->total_played < woinst->total_copied)) { - DPF(4, "Buffer hasn't been totally played, sleep....\n"); - spin_unlock_irqrestore(&woinst->lock, flags); - interruptible_sleep_on(&woinst->wait_queue); - spin_lock_irqsave(&woinst->lock, flags); - } - } - } - emu10k1_waveout_close(wave_dev); - } - - spin_unlock_irqrestore(&woinst->lock, flags); - /* remove the tasklet */ - tasklet_kill(&woinst->timer.tasklet); - kfree(wave_dev->woinst); - } - - if (file->f_mode & FMODE_READ) { - struct wiinst *wiinst = wave_dev->wiinst; - - spin_lock_irqsave(&wiinst->lock, flags); - - if (wiinst->state & WAVE_STATE_OPEN) { - emu10k1_wavein_close(wave_dev); - } - - spin_unlock_irqrestore(&wiinst->lock, flags); - tasklet_kill(&wiinst->timer.tasklet); - kfree(wave_dev->wiinst); - } - - kfree(wave_dev); - - if (waitqueue_active(&card->open_wait)) - wake_up_interruptible(&card->open_wait); - - return 0; -} - -/* FIXME sort out poll() + mmap() */ -static unsigned int emu10k1_audio_poll(struct file *file, struct poll_table_struct *wait) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) file->private_data; - struct woinst *woinst = wave_dev->woinst; - struct wiinst *wiinst = wave_dev->wiinst; - unsigned int mask = 0; - u32 bytestocopy; - unsigned long flags; - - DPF(4, "emu10k1_audio_poll()\n"); - - if (file->f_mode & FMODE_WRITE) - poll_wait(file, &woinst->wait_queue, wait); - - if (file->f_mode & FMODE_READ) - poll_wait(file, &wiinst->wait_queue, wait); - - if (file->f_mode & FMODE_WRITE) { - spin_lock_irqsave(&woinst->lock, flags); - - if (woinst->state & WAVE_STATE_OPEN) { - emu10k1_waveout_update(woinst); - emu10k1_waveout_getxfersize(woinst, &bytestocopy); - - if (bytestocopy >= woinst->buffer.fragment_size) - mask |= POLLOUT | POLLWRNORM; - } else - mask |= POLLOUT | POLLWRNORM; - - spin_unlock_irqrestore(&woinst->lock, flags); - } - - if (file->f_mode & FMODE_READ) { - spin_lock_irqsave(&wiinst->lock, flags); - - if (wiinst->state & WAVE_STATE_OPEN) { - emu10k1_wavein_update(wave_dev->card, wiinst); - emu10k1_wavein_getxfersize(wiinst, &bytestocopy); - - if (bytestocopy >= wiinst->buffer.fragment_size) - mask |= POLLIN | POLLRDNORM; - } - - spin_unlock_irqrestore(&wiinst->lock, flags); - } - - return mask; -} - -static void calculate_ofrag(struct woinst *woinst) -{ - struct waveout_buffer *buffer = &woinst->buffer; - u32 fragsize; - - if (buffer->fragment_size) - return; - - if (!buffer->ossfragshift) { - fragsize = (woinst->format.bytespervoicesample * woinst->format.samplingrate * WAVEOUT_DEFAULTFRAGLEN) / 1000 - 1; - - while (fragsize) { - fragsize >>= 1; - buffer->ossfragshift++; - } - } - - if (buffer->ossfragshift < WAVEOUT_MINFRAGSHIFT) - buffer->ossfragshift = WAVEOUT_MINFRAGSHIFT; - - buffer->fragment_size = 1 << buffer->ossfragshift; - - while (buffer->fragment_size * WAVEOUT_MINFRAGS > WAVEOUT_MAXBUFSIZE) - buffer->fragment_size >>= 1; - - /* now we are sure that: - (2^WAVEOUT_MINFRAGSHIFT) <= (fragment_size = 2^n) <= (WAVEOUT_MAXBUFSIZE / WAVEOUT_MINFRAGS) - */ - - if (!buffer->numfrags) { - u32 numfrags; - - numfrags = (woinst->format.bytespervoicesample * woinst->format.samplingrate * WAVEOUT_DEFAULTBUFLEN) / - (buffer->fragment_size * 1000) - 1; - - buffer->numfrags = 1; - - while (numfrags) { - numfrags >>= 1; - buffer->numfrags <<= 1; - } - } - - if (buffer->numfrags < WAVEOUT_MINFRAGS) - buffer->numfrags = WAVEOUT_MINFRAGS; - - if (buffer->numfrags * buffer->fragment_size > WAVEOUT_MAXBUFSIZE) - buffer->numfrags = WAVEOUT_MAXBUFSIZE / buffer->fragment_size; - - if (buffer->numfrags < WAVEOUT_MINFRAGS) - BUG(); - - buffer->size = buffer->fragment_size * buffer->numfrags; - buffer->pages = buffer->size / PAGE_SIZE + ((buffer->size % PAGE_SIZE) ? 1 : 0); - - DPD(2, " calculated playback fragment_size -> %d\n", buffer->fragment_size); - DPD(2, " calculated playback numfrags -> %d\n", buffer->numfrags); - - return; -} - -static void calculate_ifrag(struct wiinst *wiinst) -{ - struct wavein_buffer *buffer = &wiinst->buffer; - u32 fragsize, bufsize, size[4]; - int i, j; - - if (buffer->fragment_size) - return; - - if (!buffer->ossfragshift) { - fragsize = (wiinst->format.bytespersec * WAVEIN_DEFAULTFRAGLEN) / 1000 - 1; - - while (fragsize) { - fragsize >>= 1; - buffer->ossfragshift++; - } - } - - if (buffer->ossfragshift < WAVEIN_MINFRAGSHIFT) - buffer->ossfragshift = WAVEIN_MINFRAGSHIFT; - - buffer->fragment_size = 1 << buffer->ossfragshift; - - while (buffer->fragment_size * WAVEIN_MINFRAGS > WAVEIN_MAXBUFSIZE) - buffer->fragment_size >>= 1; - - /* now we are sure that: - (2^WAVEIN_MINFRAGSHIFT) <= (fragment_size = 2^n) <= (WAVEIN_MAXBUFSIZE / WAVEIN_MINFRAGS) - */ - - - if (!buffer->numfrags) - buffer->numfrags = (wiinst->format.bytespersec * WAVEIN_DEFAULTBUFLEN) / (buffer->fragment_size * 1000) - 1; - - if (buffer->numfrags < WAVEIN_MINFRAGS) - buffer->numfrags = WAVEIN_MINFRAGS; - - if (buffer->numfrags * buffer->fragment_size > WAVEIN_MAXBUFSIZE) - buffer->numfrags = WAVEIN_MAXBUFSIZE / buffer->fragment_size; - - if (buffer->numfrags < WAVEIN_MINFRAGS) - BUG(); - - bufsize = buffer->fragment_size * buffer->numfrags; - - /* the buffer size for recording is restricted to certain values, adjust it now */ - if (bufsize >= 0x10000) { - buffer->size = 0x10000; - buffer->sizeregval = 0x1f; - } else { - buffer->size = 0; - size[0] = 384; - size[1] = 448; - size[2] = 512; - size[3] = 640; - - for (i = 0; i < 8; i++) - for (j = 0; j < 4; j++) - if (bufsize >= size[j]) { - buffer->size = size[j]; - size[j] *= 2; - buffer->sizeregval = i * 4 + j + 1; - } else - goto exitloop; - exitloop: - if (buffer->size == 0) { - buffer->size = 384; - buffer->sizeregval = 0x01; - } - } - - /* adjust the fragment size so that buffer size is an integer multiple */ - while (buffer->size % buffer->fragment_size) - buffer->fragment_size >>= 1; - - buffer->numfrags = buffer->size / buffer->fragment_size; - buffer->pages = buffer->size / PAGE_SIZE + ((buffer->size % PAGE_SIZE) ? 1 : 0); - - DPD(2, " calculated recording fragment_size -> %d\n", buffer->fragment_size); - DPD(2, " calculated recording numfrags -> %d\n", buffer->numfrags); - DPD(2, " buffer size register -> %#04x\n", buffer->sizeregval); - - return; -} - -static void emu10k1_wavein_bh(unsigned long refdata) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) refdata; - struct wiinst *wiinst = wave_dev->wiinst; - u32 bytestocopy; - unsigned long flags; - - if (!wiinst) - return; - - spin_lock_irqsave(&wiinst->lock, flags); - - if (!(wiinst->state & WAVE_STATE_STARTED)) { - spin_unlock_irqrestore(&wiinst->lock, flags); - return; - } - - emu10k1_wavein_update(wave_dev->card, wiinst); - emu10k1_wavein_getxfersize(wiinst, &bytestocopy); - - spin_unlock_irqrestore(&wiinst->lock, flags); - - if (bytestocopy >= wiinst->buffer.fragment_size) { - if (waitqueue_active(&wiinst->wait_queue)) - wake_up_interruptible(&wiinst->wait_queue); - } else - DPD(3, "Not enough transfer size, %d\n", bytestocopy); - - return; -} - -static void emu10k1_waveout_bh(unsigned long refdata) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) refdata; - struct woinst *woinst = wave_dev->woinst; - u32 bytestocopy; - unsigned long flags; - - if (!woinst) - return; - - spin_lock_irqsave(&woinst->lock, flags); - - if (!(woinst->state & WAVE_STATE_STARTED)) { - spin_unlock_irqrestore(&woinst->lock, flags); - return; - } - - emu10k1_waveout_update(woinst); - emu10k1_waveout_getxfersize(woinst, &bytestocopy); - - if (woinst->buffer.fill_silence) { - spin_unlock_irqrestore(&woinst->lock, flags); - emu10k1_waveout_fillsilence(woinst); - } else - spin_unlock_irqrestore(&woinst->lock, flags); - - if (bytestocopy >= woinst->buffer.fragment_size) { - if (waitqueue_active(&woinst->wait_queue)) - wake_up_interruptible(&woinst->wait_queue); - } else - DPD(3, "Not enough transfer size -> %d\n", bytestocopy); - - return; -} - -const struct file_operations emu10k1_audio_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .read = emu10k1_audio_read, - .write = emu10k1_audio_write, - .poll = emu10k1_audio_poll, - .ioctl = emu10k1_audio_ioctl, - .mmap = emu10k1_audio_mmap, - .open = emu10k1_audio_open, - .release = emu10k1_audio_release, -}; diff --git a/sound/oss/emu10k1/audio.h b/sound/oss/emu10k1/audio.h deleted file mode 100644 index 26ee81bbd6c6..000000000000 --- a/sound/oss/emu10k1/audio.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - ********************************************************************** - * audio.c -- /dev/dsp interface for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox cleaned up types/leaks - * - ********************************************************************** - * - * 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 _AUDIO_H -#define _AUDIO_H - -struct emu10k1_wavedevice -{ - struct emu10k1_card *card; - struct wiinst *wiinst; - struct woinst *woinst; - u16 enablebits; -}; - -#endif /* _AUDIO_H */ diff --git a/sound/oss/emu10k1/cardmi.c b/sound/oss/emu10k1/cardmi.c deleted file mode 100644 index 57674f8c8a2e..000000000000 --- a/sound/oss/emu10k1/cardmi.c +++ /dev/null @@ -1,832 +0,0 @@ -/* - ********************************************************************** - * sblive_mi.c - MIDI UART input HAL for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox clean up - * - ********************************************************************** - * - * 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 -#include - -#include "hwaccess.h" -#include "8010.h" -#include "cardmi.h" -#include "irqmgr.h" - - -static int emu10k1_mpuin_callback(struct emu10k1_mpuin *card_mpuin, u32 msg, unsigned long data, u32 bytesvalid); - -static int sblive_miStateInit(struct emu10k1_mpuin *); -static int sblive_miStateEntry(struct emu10k1_mpuin *, u8); -static int sblive_miStateParse(struct emu10k1_mpuin *, u8); -static int sblive_miState3Byte(struct emu10k1_mpuin *, u8); -static int sblive_miState3ByteKey(struct emu10k1_mpuin *, u8); -static int sblive_miState3ByteVel(struct emu10k1_mpuin *, u8); -static int sblive_miState2Byte(struct emu10k1_mpuin *, u8); -static int sblive_miState2ByteKey(struct emu10k1_mpuin *, u8); -static int sblive_miStateSysCommon2(struct emu10k1_mpuin *, u8); -static int sblive_miStateSysCommon2Key(struct emu10k1_mpuin *, u8); -static int sblive_miStateSysCommon3(struct emu10k1_mpuin *, u8); -static int sblive_miStateSysCommon3Key(struct emu10k1_mpuin *, u8); -static int sblive_miStateSysCommon3Vel(struct emu10k1_mpuin *, u8); -static int sblive_miStateSysExNorm(struct emu10k1_mpuin *, u8); -static int sblive_miStateSysReal(struct emu10k1_mpuin *, u8); - - -static struct { - int (*Fn) (struct emu10k1_mpuin *, u8); -} midistatefn[] = { - - { - sblive_miStateParse}, { - sblive_miState3Byte}, /* 0x8n, 0x9n, 0xAn, 0xBn, 0xEn */ - { - sblive_miState3ByteKey}, /* Byte 1 */ - { - sblive_miState3ByteVel}, /* Byte 2 */ - { - sblive_miState2Byte}, /* 0xCn, 0xDn */ - { - sblive_miState2ByteKey}, /* Byte 1 */ - { - sblive_miStateSysCommon2}, /* 0xF1 , 0xF3 */ - { - sblive_miStateSysCommon2Key}, /* 0xF1 , 0xF3, Byte 1 */ - { - sblive_miStateSysCommon3}, /* 0xF2 */ - { - sblive_miStateSysCommon3Key}, /* 0xF2 , Byte 1 */ - { - sblive_miStateSysCommon3Vel}, /* 0xF2 , Byte 2 */ - { - sblive_miStateSysExNorm}, /* 0xF0, 0xF7, Normal mode */ - { - sblive_miStateSysReal} /* 0xF4 - 0xF6 ,0xF8 - 0xFF */ -}; - - -/* Installs the IRQ handler for the MPU in port */ - -/* and initialize parameters */ - -int emu10k1_mpuin_open(struct emu10k1_card *card, struct midi_openinfo *openinfo) -{ - struct emu10k1_mpuin *card_mpuin = card->mpuin; - - DPF(2, "emu10k1_mpuin_open\n"); - - if (!(card_mpuin->status & FLAGS_AVAILABLE)) - return -1; - - /* Copy open info and mark channel as in use */ - card_mpuin->openinfo = *openinfo; - card_mpuin->status &= ~FLAGS_AVAILABLE; /* clear */ - card_mpuin->status |= FLAGS_READY; /* set */ - card_mpuin->status &= ~FLAGS_MIDM_STARTED; /* clear */ - card_mpuin->firstmidiq = NULL; - card_mpuin->lastmidiq = NULL; - card_mpuin->qhead = 0; - card_mpuin->qtail = 0; - - sblive_miStateInit(card_mpuin); - - emu10k1_mpu_reset(card); - emu10k1_mpu_acquire(card); - - return 0; -} - -int emu10k1_mpuin_close(struct emu10k1_card *card) -{ - struct emu10k1_mpuin *card_mpuin = card->mpuin; - - DPF(2, "emu10k1_mpuin_close()\n"); - - /* Check if there are pending input SysEx buffers */ - if (card_mpuin->firstmidiq != NULL) { - ERROR(); - return -1; - } - - /* Disable RX interrupt */ - emu10k1_irq_disable(card, card->is_audigy ? A_INTE_MIDIRXENABLE : INTE_MIDIRXENABLE); - - emu10k1_mpu_release(card); - - card_mpuin->status |= FLAGS_AVAILABLE; /* set */ - card_mpuin->status &= ~FLAGS_MIDM_STARTED; /* clear */ - - return 0; -} - -/* Adds MIDI buffer to local queue list */ - -int emu10k1_mpuin_add_buffer(struct emu10k1_mpuin *card_mpuin, struct midi_hdr *midihdr) -{ - struct midi_queue *midiq; - unsigned long flags; - - DPF(2, "emu10k1_mpuin_add_buffer()\n"); - - /* Update MIDI buffer flags */ - midihdr->flags |= MIDIBUF_INQUEUE; /* set */ - midihdr->flags &= ~MIDIBUF_DONE; /* clear */ - - if ((midiq = kmalloc(sizeof(struct midi_queue), GFP_ATOMIC)) == NULL) { - /* Message lost */ - return -1; - } - - midiq->next = NULL; - midiq->qtype = 1; - midiq->length = midihdr->bufferlength; - midiq->sizeLeft = midihdr->bufferlength; - midiq->midibyte = midihdr->data; - midiq->refdata = (unsigned long) midihdr; - - spin_lock_irqsave(&card_mpuin->lock, flags); - - if (card_mpuin->firstmidiq == NULL) { - card_mpuin->firstmidiq = midiq; - card_mpuin->lastmidiq = midiq; - } else { - (card_mpuin->lastmidiq)->next = midiq; - card_mpuin->lastmidiq = midiq; - } - - spin_unlock_irqrestore(&card_mpuin->lock, flags); - - return 0; -} - -/* First set the Time Stamp if MIDI IN has not started. */ - -/* Then enable RX Irq. */ - -int emu10k1_mpuin_start(struct emu10k1_card *card) -{ - struct emu10k1_mpuin *card_mpuin = card->mpuin; - u8 dummy; - - DPF(2, "emu10k1_mpuin_start()\n"); - - /* Set timestamp if not set */ - if (card_mpuin->status & FLAGS_MIDM_STARTED) { - DPF(2, "Time Stamp not changed\n"); - } else { - while (!emu10k1_mpu_read_data(card, &dummy)); - - card_mpuin->status |= FLAGS_MIDM_STARTED; /* set */ - - /* Set new time stamp */ - card_mpuin->timestart = (jiffies * 1000) / HZ; - DPD(2, "New Time Stamp = %d\n", card_mpuin->timestart); - - card_mpuin->qhead = 0; - card_mpuin->qtail = 0; - - emu10k1_irq_enable(card, card->is_audigy ? A_INTE_MIDIRXENABLE : INTE_MIDIRXENABLE); - } - - return 0; -} - -/* Disable the RX Irq. If a partial recorded buffer */ - -/* exist, send it up to IMIDI level. */ - -int emu10k1_mpuin_stop(struct emu10k1_card *card) -{ - struct emu10k1_mpuin *card_mpuin = card->mpuin; - struct midi_queue *midiq; - unsigned long flags; - - DPF(2, "emu10k1_mpuin_stop()\n"); - - emu10k1_irq_disable(card, card->is_audigy ? A_INTE_MIDIRXENABLE : INTE_MIDIRXENABLE); - - card_mpuin->status &= ~FLAGS_MIDM_STARTED; /* clear */ - - if (card_mpuin->firstmidiq) { - spin_lock_irqsave(&card_mpuin->lock, flags); - - midiq = card_mpuin->firstmidiq; - if (midiq != NULL) { - if (midiq->sizeLeft == midiq->length) - midiq = NULL; - else { - card_mpuin->firstmidiq = midiq->next; - if (card_mpuin->firstmidiq == NULL) - card_mpuin->lastmidiq = NULL; - } - } - - spin_unlock_irqrestore(&card_mpuin->lock, flags); - - if (midiq) { - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGERROR, (unsigned long) midiq, 0); - kfree(midiq); - } - } - - return 0; -} - -/* Disable the RX Irq. If any buffer */ - -/* exist, send it up to IMIDI level. */ -int emu10k1_mpuin_reset(struct emu10k1_card *card) -{ - struct emu10k1_mpuin *card_mpuin = card->mpuin; - struct midi_queue *midiq; - - DPF(2, "emu10k1_mpuin_reset()\n"); - - emu10k1_irq_disable(card, card->is_audigy ? A_INTE_MIDIRXENABLE : INTE_MIDIRXENABLE); - - while (card_mpuin->firstmidiq) { - midiq = card_mpuin->firstmidiq; - card_mpuin->firstmidiq = midiq->next; - - if (midiq->sizeLeft == midiq->length) - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGDATA, (unsigned long) midiq, 0); - else - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGERROR, (unsigned long) midiq, 0); - - kfree(midiq); - } - - card_mpuin->lastmidiq = NULL; - card_mpuin->status &= ~FLAGS_MIDM_STARTED; - - return 0; -} - -/* Passes the message with the data back to the client */ - -/* via IRQ & DPC callbacks to Ring 3 */ -static int emu10k1_mpuin_callback(struct emu10k1_mpuin *card_mpuin, u32 msg, unsigned long data, u32 bytesvalid) -{ - unsigned long timein; - struct midi_queue *midiq; - unsigned long callback_msg[3]; - struct midi_hdr *midihdr; - - /* Called during ISR. The data & code touched are: - * 1. card_mpuin - * 2. The function to be called - */ - - timein = card_mpuin->timein; - if (card_mpuin->timestart <= timein) - callback_msg[0] = timein - card_mpuin->timestart; - else - callback_msg[0] = (~0x0L - card_mpuin->timestart) + timein; - - if (msg == ICARDMIDI_INDATA || msg == ICARDMIDI_INDATAERROR) { - callback_msg[1] = data; - callback_msg[2] = bytesvalid; - DPD(2, "emu10k1_mpuin_callback: midimsg = %#lx\n", data); - } else { - midiq = (struct midi_queue *) data; - midihdr = (struct midi_hdr *) midiq->refdata; - - callback_msg[1] = midiq->length - midiq->sizeLeft; - callback_msg[2] = midiq->refdata; - midihdr->flags &= ~MIDIBUF_INQUEUE; - midihdr->flags |= MIDIBUF_DONE; - - midihdr->bytesrecorded = midiq->length - midiq->sizeLeft; - } - - /* Notify client that Sysex buffer has been sent */ - emu10k1_midi_callback(msg, card_mpuin->openinfo.refdata, callback_msg); - - return 0; -} - -void emu10k1_mpuin_bh(unsigned long refdata) -{ - u8 data; - unsigned idx; - struct emu10k1_mpuin *card_mpuin = (struct emu10k1_mpuin *) refdata; - unsigned long flags; - - while (card_mpuin->qhead != card_mpuin->qtail) { - spin_lock_irqsave(&card_mpuin->lock, flags); - idx = card_mpuin->qhead; - data = card_mpuin->midiq[idx].data; - card_mpuin->timein = card_mpuin->midiq[idx].timein; - idx = (idx + 1) % MIDIIN_MAX_BUFFER_SIZE; - card_mpuin->qhead = idx; - spin_unlock_irqrestore(&card_mpuin->lock, flags); - - sblive_miStateEntry(card_mpuin, data); - } - - return; -} - -/* IRQ callback handler routine for the MPU in port */ - -int emu10k1_mpuin_irqhandler(struct emu10k1_card *card) -{ - unsigned idx; - unsigned count; - u8 MPUIvalue; - struct emu10k1_mpuin *card_mpuin = card->mpuin; - - /* IRQ service routine. The data and code touched are: - * 1. card_mpuin - */ - - count = 0; - idx = card_mpuin->qtail; - - while (1) { - if (emu10k1_mpu_read_data(card, &MPUIvalue) < 0) { - break; - } else { - ++count; - card_mpuin->midiq[idx].data = MPUIvalue; - card_mpuin->midiq[idx].timein = (jiffies * 1000) / HZ; - idx = (idx + 1) % MIDIIN_MAX_BUFFER_SIZE; - } - } - - if (count) { - card_mpuin->qtail = idx; - - tasklet_hi_schedule(&card_mpuin->tasklet); - } - - return 0; -} - -/*****************************************************************************/ - -/* Supporting functions for Midi-In Interpretation State Machine */ - -/*****************************************************************************/ - -/* FIXME: This should be a macro */ -static int sblive_miStateInit(struct emu10k1_mpuin *card_mpuin) -{ - card_mpuin->status = 0; /* For MIDI running status */ - card_mpuin->fstatus = 0; /* For 0xFn status only */ - card_mpuin->curstate = STIN_PARSE; - card_mpuin->laststate = STIN_PARSE; - card_mpuin->data = 0; - card_mpuin->timestart = 0; - card_mpuin->timein = 0; - - return 0; -} - -/* FIXME: This should be a macro */ -static int sblive_miStateEntry(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - return midistatefn[card_mpuin->curstate].Fn(card_mpuin, data); -} - -static int sblive_miStateParse(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - switch (data & 0xf0) { - case 0x80: - case 0x90: - case 0xA0: - case 0xB0: - case 0xE0: - card_mpuin->curstate = STIN_3BYTE; - break; - - case 0xC0: - case 0xD0: - card_mpuin->curstate = STIN_2BYTE; - break; - - case 0xF0: - /* System messages do not affect the previous running status! */ - switch (data & 0x0f) { - case 0x0: - card_mpuin->laststate = card_mpuin->curstate; - card_mpuin->curstate = STIN_SYS_EX_NORM; - - if (card_mpuin->firstmidiq) { - struct midi_queue *midiq; - - midiq = card_mpuin->firstmidiq; - *midiq->midibyte = data; - --midiq->sizeLeft; - ++midiq->midibyte; - } - - return CTSTATUS_NEXT_BYTE; - - case 0x7: - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATAERROR, 0xf7, 0); - return -1; - - case 0x2: - card_mpuin->laststate = card_mpuin->curstate; - card_mpuin->curstate = STIN_SYS_COMMON_3; - break; - - case 0x1: - case 0x3: - card_mpuin->laststate = card_mpuin->curstate; - card_mpuin->curstate = STIN_SYS_COMMON_2; - break; - - default: - /* includes 0xF4 - 0xF6, 0xF8 - 0xFF */ - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - } - - break; - - default: - DPF(2, "BUG: default case hit\n"); - return -1; - } - - return midistatefn[card_mpuin->curstate].Fn(card_mpuin, data); -} - -static int sblive_miState3Byte(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - u8 temp = data & 0xf0; - - if (temp < 0x80) { - return midistatefn[STIN_3BYTE_KEY].Fn(card_mpuin, data); - } else if (temp <= 0xe0 && temp != 0xc0 && temp != 0xd0) { - card_mpuin->status = data; - card_mpuin->curstate = STIN_3BYTE_KEY; - - return CTSTATUS_NEXT_BYTE; - } - - return midistatefn[STIN_PARSE].Fn(card_mpuin, data); -} - -static int sblive_miState3ByteKey(struct emu10k1_mpuin *card_mpuin, u8 data) -/* byte 1 */ -{ - unsigned long tmp; - - if (data > 0x7f) { - /* Real-time messages check */ - if (data > 0xf7) - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - - /* Invalid data! */ - DPF(2, "Invalid data!\n"); - - card_mpuin->curstate = STIN_PARSE; - tmp = ((unsigned long) data) << 8; - tmp |= (unsigned long) card_mpuin->status; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATAERROR, tmp, 0); - - return -1; - } - - card_mpuin->data = data; - card_mpuin->curstate = STIN_3BYTE_VEL; - - return CTSTATUS_NEXT_BYTE; -} - -static int sblive_miState3ByteVel(struct emu10k1_mpuin *card_mpuin, u8 data) -/* byte 2 */ -{ - unsigned long tmp; - - if (data > 0x7f) { - /* Real-time messages check */ - if (data > 0xf7) - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - - /* Invalid data! */ - DPF(2, "Invalid data!\n"); - - card_mpuin->curstate = STIN_PARSE; - tmp = ((unsigned long) data) << 8; - tmp |= card_mpuin->data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->status; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATAERROR, tmp, 0); - - return -1; - } - - card_mpuin->curstate = STIN_3BYTE; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->status; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATA, tmp, 3); - - return 0; -} - -static int sblive_miState2Byte(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - u8 temp = data & 0xf0; - - if ((temp == 0xc0) || (temp == 0xd0)) { - card_mpuin->status = data; - card_mpuin->curstate = STIN_2BYTE_KEY; - - return CTSTATUS_NEXT_BYTE; - } - - if (temp < 0x80) - return midistatefn[STIN_2BYTE_KEY].Fn(card_mpuin, data); - - return midistatefn[STIN_PARSE].Fn(card_mpuin, data); -} - -static int sblive_miState2ByteKey(struct emu10k1_mpuin *card_mpuin, u8 data) -/* byte 1 */ -{ - unsigned long tmp; - - if (data > 0x7f) { - /* Real-time messages check */ - if (data > 0xf7) - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - - /* Invalid data! */ - DPF(2, "Invalid data!\n"); - - card_mpuin->curstate = STIN_PARSE; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->status; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATAERROR, tmp, 0); - - return -1; - } - - card_mpuin->curstate = STIN_2BYTE; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->status; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATA, tmp, 2); - - return 0; -} - -static int sblive_miStateSysCommon2(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - card_mpuin->fstatus = data; - card_mpuin->curstate = STIN_SYS_COMMON_2_KEY; - - return CTSTATUS_NEXT_BYTE; -} - -static int sblive_miStateSysCommon2Key(struct emu10k1_mpuin *card_mpuin, u8 data) -/* byte 1 */ -{ - unsigned long tmp; - - if (data > 0x7f) { - /* Real-time messages check */ - if (data > 0xf7) - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - - /* Invalid data! */ - DPF(2, "Invalid data!\n"); - - card_mpuin->curstate = card_mpuin->laststate; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->fstatus; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATAERROR, tmp, 0); - - return -1; - } - - card_mpuin->curstate = card_mpuin->laststate; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->fstatus; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATA, tmp, 2); - - return 0; -} - -static int sblive_miStateSysCommon3(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - card_mpuin->fstatus = data; - card_mpuin->curstate = STIN_SYS_COMMON_3_KEY; - - return CTSTATUS_NEXT_BYTE; -} - -static int sblive_miStateSysCommon3Key(struct emu10k1_mpuin *card_mpuin, u8 data) -/* byte 1 */ -{ - unsigned long tmp; - - if (data > 0x7f) { - /* Real-time messages check */ - if (data > 0xf7) - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - - /* Invalid data! */ - DPF(2, "Invalid data!\n"); - - card_mpuin->curstate = card_mpuin->laststate; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->fstatus; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATAERROR, tmp, 0); - - return -1; - } - - card_mpuin->data = data; - card_mpuin->curstate = STIN_SYS_COMMON_3_VEL; - - return CTSTATUS_NEXT_BYTE; -} - -static int sblive_miStateSysCommon3Vel(struct emu10k1_mpuin *card_mpuin, u8 data) -/* byte 2 */ -{ - unsigned long tmp; - - if (data > 0x7f) { - /* Real-time messages check */ - if (data > 0xf7) - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - - /* Invalid data! */ - DPF(2, "Invalid data!\n"); - - card_mpuin->curstate = card_mpuin->laststate; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->fstatus; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATAERROR, tmp, 0); - - return -1; - } - - card_mpuin->curstate = card_mpuin->laststate; - tmp = (unsigned long) data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->data; - tmp = tmp << 8; - tmp |= (unsigned long) card_mpuin->fstatus; - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATA, tmp, 3); - - return 0; -} - -static int sblive_miStateSysExNorm(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - unsigned long flags; - - if ((data > 0x7f) && (data != 0xf7)) { - /* Real-time messages check */ - if (data > 0xf7) - return midistatefn[STIN_SYS_REAL].Fn(card_mpuin, data); - - /* Invalid Data! */ - DPF(2, "Invalid data!\n"); - - card_mpuin->curstate = card_mpuin->laststate; - - if (card_mpuin->firstmidiq) { - struct midi_queue *midiq; - - midiq = card_mpuin->firstmidiq; - *midiq->midibyte = data; - --midiq->sizeLeft; - ++midiq->midibyte; - - spin_lock_irqsave(&card_mpuin->lock, flags); - - card_mpuin->firstmidiq = midiq->next; - if (card_mpuin->firstmidiq == NULL) - card_mpuin->lastmidiq = NULL; - - spin_unlock_irqrestore(&card_mpuin->lock, flags); - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGERROR, (unsigned long) midiq, 0); - - kfree(midiq); - } - - return -1; - } - - if (card_mpuin->firstmidiq) { - struct midi_queue *midiq; - - midiq = card_mpuin->firstmidiq; - *midiq->midibyte = data; - --midiq->sizeLeft; - ++midiq->midibyte; - } - - if (data == 0xf7) { - /* End of Sysex buffer */ - /* Send down the buffer */ - - card_mpuin->curstate = card_mpuin->laststate; - - if (card_mpuin->firstmidiq) { - struct midi_queue *midiq; - - midiq = card_mpuin->firstmidiq; - - spin_lock_irqsave(&card_mpuin->lock, flags); - - card_mpuin->firstmidiq = midiq->next; - if (card_mpuin->firstmidiq == NULL) - card_mpuin->lastmidiq = NULL; - - spin_unlock_irqrestore(&card_mpuin->lock, flags); - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGDATA, (unsigned long) midiq, 0); - - kfree(midiq); - } - - return 0; - } - - if (card_mpuin->firstmidiq) { - struct midi_queue *midiq; - - midiq = card_mpuin->firstmidiq; - - if (midiq->sizeLeft == 0) { - /* Special case */ - - spin_lock_irqsave(&card_mpuin->lock, flags); - - card_mpuin->firstmidiq = midiq->next; - if (card_mpuin->firstmidiq == NULL) - card_mpuin->lastmidiq = NULL; - - spin_unlock_irqrestore(&card_mpuin->lock, flags); - - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INLONGDATA, (unsigned long) midiq, 0); - - kfree(midiq); - - return CTSTATUS_NEXT_BYTE; - } - } - - return CTSTATUS_NEXT_BYTE; -} - -static int sblive_miStateSysReal(struct emu10k1_mpuin *card_mpuin, u8 data) -{ - emu10k1_mpuin_callback(card_mpuin, ICARDMIDI_INDATA, data, 1); - - return CTSTATUS_NEXT_BYTE; -} diff --git a/sound/oss/emu10k1/cardmi.h b/sound/oss/emu10k1/cardmi.h deleted file mode 100644 index d12c24116307..000000000000 --- a/sound/oss/emu10k1/cardmi.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - ********************************************************************** - * sblive_mi.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox cleaned up - * - ********************************************************************** - * - * 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 _CARDMI_H -#define _CARDMI_H - -#include "icardmid.h" -#include - -typedef enum -{ - STIN_PARSE = 0, - STIN_3BYTE, /* 0x80, 0x90, 0xA0, 0xB0, 0xE0 */ - STIN_3BYTE_KEY, /* Byte 1 */ - STIN_3BYTE_VEL, /* Byte 1 */ - STIN_2BYTE, /* 0xC0, 0xD0 */ - STIN_2BYTE_KEY, /* Byte 1 */ - STIN_SYS_COMMON_2, /* 0xF1, 0xF3 */ - STIN_SYS_COMMON_2_KEY, - STIN_SYS_COMMON_3, /* 0xF2 */ - STIN_SYS_COMMON_3_KEY, - STIN_SYS_COMMON_3_VEL, - STIN_SYS_EX_NORM, /* 0xF0, Normal mode */ - STIN_SYS_REAL -} midi_in_state; - - -/* flags for card MIDI in object */ -#define FLAGS_MIDM_STARTED 0x00001000 // Data has started to come in after Midm Start -#define MIDIIN_MAX_BUFFER_SIZE 200 // Definition for struct emu10k1_mpuin - -struct midi_data -{ - u8 data; - u32 timein; -}; - -struct emu10k1_mpuin -{ - spinlock_t lock; - struct midi_queue *firstmidiq; - struct midi_queue *lastmidiq; - unsigned qhead, qtail; - struct midi_data midiq[MIDIIN_MAX_BUFFER_SIZE]; - struct tasklet_struct tasklet; - struct midi_openinfo openinfo; - - /* For MIDI state machine */ - u8 status; /* For MIDI running status */ - u8 fstatus; /* For 0xFn status only */ - midi_in_state curstate; - midi_in_state laststate; - u32 timestart; - u32 timein; - u8 data; -}; - -int emu10k1_mpuin_open(struct emu10k1_card *, struct midi_openinfo *); -int emu10k1_mpuin_close(struct emu10k1_card *); -int emu10k1_mpuin_add_buffer(struct emu10k1_mpuin *, struct midi_hdr *); -int emu10k1_mpuin_start(struct emu10k1_card *); -int emu10k1_mpuin_stop(struct emu10k1_card *); -int emu10k1_mpuin_reset(struct emu10k1_card *); - -int emu10k1_mpuin_irqhandler(struct emu10k1_card *); -void emu10k1_mpuin_bh(unsigned long); - -#endif /* _CARDMI_H */ diff --git a/sound/oss/emu10k1/cardmo.c b/sound/oss/emu10k1/cardmo.c deleted file mode 100644 index a8cc75db3e45..000000000000 --- a/sound/oss/emu10k1/cardmo.c +++ /dev/null @@ -1,229 +0,0 @@ -/* - ********************************************************************** - * cardmo.c - MIDI UART output HAL for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox cleaned up - * - ********************************************************************** - * - * 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 - -#include "hwaccess.h" -#include "8010.h" -#include "cardmo.h" -#include "irqmgr.h" - -/* Installs the IRQ handler for the MPU out port * - * and initialize parameters */ - -int emu10k1_mpuout_open(struct emu10k1_card *card, struct midi_openinfo *openinfo) -{ - struct emu10k1_mpuout *card_mpuout = card->mpuout; - - DPF(2, "emu10k1_mpuout_open()\n"); - - if (!(card_mpuout->status & FLAGS_AVAILABLE)) - return -1; - - /* Copy open info and mark channel as in use */ - card_mpuout->intr = 0; - card_mpuout->openinfo = *openinfo; - card_mpuout->status &= ~FLAGS_AVAILABLE; - card_mpuout->laststatus = 0x80; - card_mpuout->firstmidiq = NULL; - card_mpuout->lastmidiq = NULL; - - emu10k1_mpu_reset(card); - emu10k1_mpu_acquire(card); - - return 0; -} - -int emu10k1_mpuout_close(struct emu10k1_card *card) -{ - struct emu10k1_mpuout *card_mpuout = card->mpuout; - struct midi_queue *midiq; - struct midi_hdr *midihdr; - unsigned long flags; - - DPF(2, "emu10k1_mpuout_close()\n"); - - emu10k1_irq_disable(card, card->is_audigy ? A_INTE_MIDITXENABLE : INTE_MIDITXENABLE); - - spin_lock_irqsave(&card_mpuout->lock, flags); - - while (card_mpuout->firstmidiq != NULL) { - midiq = card_mpuout->firstmidiq; - midihdr = (struct midi_hdr *) midiq->refdata; - - card_mpuout->firstmidiq = midiq->next; - - kfree(midihdr->data); - kfree(midihdr); - kfree(midiq); - } - - card_mpuout->lastmidiq = NULL; - - emu10k1_mpu_release(card); - - card_mpuout->status |= FLAGS_AVAILABLE; - - spin_unlock_irqrestore(&card_mpuout->lock, flags); - - return 0; -} - -/* If there isn't enough buffer space, reject Midi Buffer. * -* Otherwise, disable TX, create object to hold Midi * -* uffer, update buffer flags and other parameters * -* before enabling TX again. */ - -int emu10k1_mpuout_add_buffer(struct emu10k1_card *card, struct midi_hdr *midihdr) -{ - struct emu10k1_mpuout *card_mpuout = card->mpuout; - struct midi_queue *midiq; - unsigned long flags; - - DPF(2, "emu10k1_mpuout_add_buffer()\n"); - - if (card_mpuout->state == CARDMIDIOUT_STATE_SUSPEND) - return 0; - - midihdr->flags |= MIDIBUF_INQUEUE; - midihdr->flags &= ~MIDIBUF_DONE; - - if ((midiq = kmalloc(sizeof(struct midi_queue), GFP_KERNEL)) == NULL) { - /* Message lost */ - return -1; - } - - midiq->next = NULL; - midiq->qtype = 1; - midiq->length = midihdr->bufferlength; - midiq->sizeLeft = midihdr->bufferlength; - midiq->midibyte = midihdr->data; - - midiq->refdata = (unsigned long) midihdr; - - spin_lock_irqsave(&card_mpuout->lock, flags); - - if (card_mpuout->firstmidiq == NULL) { - card_mpuout->firstmidiq = midiq; - card_mpuout->lastmidiq = midiq; - } else { - (card_mpuout->lastmidiq)->next = midiq; - card_mpuout->lastmidiq = midiq; - } - - card_mpuout->intr = 0; - - emu10k1_irq_enable(card, card->is_audigy ? A_INTE_MIDITXENABLE : INTE_MIDITXENABLE); - - spin_unlock_irqrestore(&card_mpuout->lock, flags); - - return 0; -} - -void emu10k1_mpuout_bh(unsigned long refdata) -{ - struct emu10k1_card *card = (struct emu10k1_card *) refdata; - struct emu10k1_mpuout *card_mpuout = card->mpuout; - int cByteSent = 0; - struct midi_queue *midiq; - struct midi_queue *doneq = NULL; - unsigned long flags; - - spin_lock_irqsave(&card_mpuout->lock, flags); - - while (card_mpuout->firstmidiq != NULL) { - midiq = card_mpuout->firstmidiq; - - while (cByteSent < 4 && midiq->sizeLeft) { - if (emu10k1_mpu_write_data(card, *midiq->midibyte) < 0) { - DPF(2, "emu10k1_mpuoutDpcCallback error!!\n"); - } else { - ++cByteSent; - --midiq->sizeLeft; - ++midiq->midibyte; - } - } - - if (midiq->sizeLeft == 0) { - if (doneq == NULL) - doneq = midiq; - card_mpuout->firstmidiq = midiq->next; - } else - break; - } - - if (card_mpuout->firstmidiq == NULL) - card_mpuout->lastmidiq = NULL; - - if (doneq != NULL) { - while (doneq != card_mpuout->firstmidiq) { - unsigned long callback_msg[3]; - - midiq = doneq; - doneq = midiq->next; - - if (midiq->qtype) { - callback_msg[0] = 0; - callback_msg[1] = midiq->length; - callback_msg[2] = midiq->refdata; - - emu10k1_midi_callback(ICARDMIDI_OUTLONGDATA, card_mpuout->openinfo.refdata, callback_msg); - } else if (((u8) midiq->refdata) < 0xF0 && ((u8) midiq->refdata) > 0x7F) - card_mpuout->laststatus = (u8) midiq->refdata; - - kfree(midiq); - } - } - - if ((card_mpuout->firstmidiq != NULL) || cByteSent) { - card_mpuout->intr = 0; - emu10k1_irq_enable(card, card->is_audigy ? A_INTE_MIDITXENABLE : INTE_MIDITXENABLE); - } - - spin_unlock_irqrestore(&card_mpuout->lock, flags); - - return; -} - -int emu10k1_mpuout_irqhandler(struct emu10k1_card *card) -{ - struct emu10k1_mpuout *card_mpuout = card->mpuout; - - DPF(4, "emu10k1_mpuout_irqhandler\n"); - - card_mpuout->intr = 1; - emu10k1_irq_disable(card, card->is_audigy ? A_INTE_MIDITXENABLE : INTE_MIDITXENABLE); - - tasklet_hi_schedule(&card_mpuout->tasklet); - - return 0; -} diff --git a/sound/oss/emu10k1/cardmo.h b/sound/oss/emu10k1/cardmo.h deleted file mode 100644 index 7026eb3a85af..000000000000 --- a/sound/oss/emu10k1/cardmo.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - ********************************************************************** - * cardmo.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox cleaned up - * - ********************************************************************** - * - * 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 _CARDMO_H -#define _CARDMO_H - -#include "icardmid.h" -#include - -#define CARDMIDIOUT_STATE_DEFAULT 0x00000000 -#define CARDMIDIOUT_STATE_SUSPEND 0x00000001 - -struct emu10k1_mpuout -{ - u32 status; - u32 state; - volatile int intr; - struct midi_queue *firstmidiq; - struct midi_queue *lastmidiq; - u8 laststatus; - struct tasklet_struct tasklet; - spinlock_t lock; - struct midi_openinfo openinfo; -}; - -int emu10k1_mpuout_open(struct emu10k1_card *, struct midi_openinfo *); -int emu10k1_mpuout_close(struct emu10k1_card *); -int emu10k1_mpuout_add_buffer(struct emu10k1_card *, struct midi_hdr *); - -int emu10k1_mpuout_irqhandler(struct emu10k1_card *); -void emu10k1_mpuout_bh(unsigned long); - -#endif /* _CARDMO_H */ diff --git a/sound/oss/emu10k1/cardwi.c b/sound/oss/emu10k1/cardwi.c deleted file mode 100644 index 060d1be94d33..000000000000 --- a/sound/oss/emu10k1/cardwi.c +++ /dev/null @@ -1,384 +0,0 @@ -/* - ********************************************************************** - * cardwi.c - PCM input HAL for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 -#include "hwaccess.h" -#include "timer.h" -#include "recmgr.h" -#include "audio.h" -#include "cardwi.h" - -/** - * query_format - returns a valid sound format - * - * This function will return a valid sound format as close - * to the requested one as possible. - */ -static void query_format(int recsrc, struct wave_format *wave_fmt) -{ - - switch (recsrc) { - case WAVERECORD_AC97: - - if ((wave_fmt->channels != 1) && (wave_fmt->channels != 2)) - wave_fmt->channels = 2; - - if (wave_fmt->samplingrate >= (0xBB80 + 0xAC44) / 2) - wave_fmt->samplingrate = 0xBB80; - else if (wave_fmt->samplingrate >= (0xAC44 + 0x7D00) / 2) - wave_fmt->samplingrate = 0xAC44; - else if (wave_fmt->samplingrate >= (0x7D00 + 0x5DC0) / 2) - wave_fmt->samplingrate = 0x7D00; - else if (wave_fmt->samplingrate >= (0x5DC0 + 0x5622) / 2) - wave_fmt->samplingrate = 0x5DC0; - else if (wave_fmt->samplingrate >= (0x5622 + 0x3E80) / 2) - wave_fmt->samplingrate = 0x5622; - else if (wave_fmt->samplingrate >= (0x3E80 + 0x2B11) / 2) - wave_fmt->samplingrate = 0x3E80; - else if (wave_fmt->samplingrate >= (0x2B11 + 0x1F40) / 2) - wave_fmt->samplingrate = 0x2B11; - else - wave_fmt->samplingrate = 0x1F40; - - switch (wave_fmt->id) { - case AFMT_S16_LE: - wave_fmt->bitsperchannel = 16; - break; - case AFMT_U8: - wave_fmt->bitsperchannel = 8; - break; - default: - wave_fmt->id = AFMT_S16_LE; - wave_fmt->bitsperchannel = 16; - break; - } - - break; - - /* these can't be changed from the original values */ - case WAVERECORD_MIC: - case WAVERECORD_FX: - break; - - default: - BUG(); - break; - } - - wave_fmt->bytesperchannel = wave_fmt->bitsperchannel >> 3; - wave_fmt->bytespersample = wave_fmt->channels * wave_fmt->bytesperchannel; - wave_fmt->bytespersec = wave_fmt->bytespersample * wave_fmt->samplingrate; - wave_fmt->bytespervoicesample = wave_fmt->bytespersample; -} - -static int alloc_buffer(struct emu10k1_card *card, struct wavein_buffer *buffer) -{ - buffer->addr = pci_alloc_consistent(card->pci_dev, buffer->size * buffer->cov, - &buffer->dma_handle); - if (buffer->addr == NULL) - return -1; - - return 0; -} - -static void free_buffer(struct emu10k1_card *card, struct wavein_buffer *buffer) -{ - if (buffer->addr != NULL) - pci_free_consistent(card->pci_dev, buffer->size * buffer->cov, - buffer->addr, buffer->dma_handle); -} - -int emu10k1_wavein_open(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct wiinst *wiinst = wave_dev->wiinst; - struct wiinst **wiinst_tmp = NULL; - u16 delay; - unsigned long flags; - - DPF(2, "emu10k1_wavein_open()\n"); - - switch (wiinst->recsrc) { - case WAVERECORD_AC97: - wiinst_tmp = &card->wavein.ac97; - break; - case WAVERECORD_MIC: - wiinst_tmp = &card->wavein.mic; - break; - case WAVERECORD_FX: - wiinst_tmp = &card->wavein.fx; - break; - default: - BUG(); - break; - } - - spin_lock_irqsave(&card->lock, flags); - if (*wiinst_tmp != NULL) { - spin_unlock_irqrestore(&card->lock, flags); - return -1; - } - - *wiinst_tmp = wiinst; - spin_unlock_irqrestore(&card->lock, flags); - - /* handle 8 bit recording */ - if (wiinst->format.bytesperchannel == 1) { - if (wiinst->buffer.size > 0x8000) { - wiinst->buffer.size = 0x8000; - wiinst->buffer.sizeregval = 0x1f; - } else - wiinst->buffer.sizeregval += 4; - - wiinst->buffer.cov = 2; - } else - wiinst->buffer.cov = 1; - - if (alloc_buffer(card, &wiinst->buffer) < 0) { - ERROR(); - return -1; - } - - emu10k1_set_record_src(card, wiinst); - - emu10k1_reset_record(card, &wiinst->buffer); - - wiinst->buffer.hw_pos = 0; - wiinst->buffer.pos = 0; - wiinst->buffer.bytestocopy = 0; - - delay = (48000 * wiinst->buffer.fragment_size) / wiinst->format.bytespersec; - - emu10k1_timer_install(card, &wiinst->timer, delay / 2); - - wiinst->state = WAVE_STATE_OPEN; - - return 0; -} - -void emu10k1_wavein_close(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct wiinst *wiinst = wave_dev->wiinst; - unsigned long flags; - - DPF(2, "emu10k1_wavein_close()\n"); - - emu10k1_wavein_stop(wave_dev); - - emu10k1_timer_uninstall(card, &wiinst->timer); - - free_buffer(card, &wiinst->buffer); - - spin_lock_irqsave(&card->lock, flags); - switch (wave_dev->wiinst->recsrc) { - case WAVERECORD_AC97: - card->wavein.ac97 = NULL; - break; - case WAVERECORD_MIC: - card->wavein.mic = NULL; - break; - case WAVERECORD_FX: - card->wavein.fx = NULL; - break; - default: - BUG(); - break; - } - spin_unlock_irqrestore(&card->lock, flags); - - wiinst->state = WAVE_STATE_CLOSED; -} - -void emu10k1_wavein_start(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct wiinst *wiinst = wave_dev->wiinst; - - DPF(2, "emu10k1_wavein_start()\n"); - - emu10k1_start_record(card, &wiinst->buffer); - emu10k1_timer_enable(wave_dev->card, &wiinst->timer); - - wiinst->state |= WAVE_STATE_STARTED; -} - -void emu10k1_wavein_stop(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct wiinst *wiinst = wave_dev->wiinst; - - DPF(2, "emu10k1_wavein_stop()\n"); - - if (!(wiinst->state & WAVE_STATE_STARTED)) - return; - - emu10k1_timer_disable(card, &wiinst->timer); - emu10k1_stop_record(card, &wiinst->buffer); - - wiinst->state &= ~WAVE_STATE_STARTED; -} - -int emu10k1_wavein_setformat(struct emu10k1_wavedevice *wave_dev, struct wave_format *format) -{ - struct emu10k1_card *card = wave_dev->card; - struct wiinst *wiinst = wave_dev->wiinst; - u16 delay; - - DPF(2, "emu10k1_wavein_setformat()\n"); - - if (wiinst->state & WAVE_STATE_STARTED) - return -1; - - query_format(wiinst->recsrc, format); - - if ((wiinst->format.samplingrate != format->samplingrate) - || (wiinst->format.bitsperchannel != format->bitsperchannel) - || (wiinst->format.channels != format->channels)) { - - wiinst->format = *format; - - if (wiinst->state == WAVE_STATE_CLOSED) - return 0; - - wiinst->buffer.size *= wiinst->buffer.cov; - - if (wiinst->format.bytesperchannel == 1) { - wiinst->buffer.cov = 2; - wiinst->buffer.size /= wiinst->buffer.cov; - } else - wiinst->buffer.cov = 1; - - emu10k1_timer_uninstall(card, &wiinst->timer); - - delay = (48000 * wiinst->buffer.fragment_size) / wiinst->format.bytespersec; - - emu10k1_timer_install(card, &wiinst->timer, delay / 2); - } - - return 0; -} - -void emu10k1_wavein_getxfersize(struct wiinst *wiinst, u32 * size) -{ - struct wavein_buffer *buffer = &wiinst->buffer; - - *size = buffer->bytestocopy; - - if (wiinst->mmapped) - return; - - if (*size > buffer->size) { - *size = buffer->size; - buffer->pos = buffer->hw_pos; - buffer->bytestocopy = buffer->size; - DPF(1, "buffer overrun\n"); - } -} - -static int copy_block(u8 __user *dst, u8 * src, u32 str, u32 len, u8 cov) -{ - if (cov == 1) { - if (__copy_to_user(dst, src + str, len)) - return -EFAULT; - } else { - u8 byte; - u32 i; - - src += 1 + 2 * str; - - for (i = 0; i < len; i++) { - byte = src[2 * i] ^ 0x80; - if (__copy_to_user(dst + i, &byte, 1)) - return -EFAULT; - } - } - - return 0; -} - -int emu10k1_wavein_xferdata(struct wiinst *wiinst, u8 __user *data, u32 * size) -{ - struct wavein_buffer *buffer = &wiinst->buffer; - u32 sizetocopy, sizetocopy_now, start; - unsigned long flags; - int ret; - - sizetocopy = min_t(u32, buffer->size, *size); - *size = sizetocopy; - - if (!sizetocopy) - return 0; - - spin_lock_irqsave(&wiinst->lock, flags); - start = buffer->pos; - buffer->pos += sizetocopy; - buffer->pos %= buffer->size; - buffer->bytestocopy -= sizetocopy; - sizetocopy_now = buffer->size - start; - - spin_unlock_irqrestore(&wiinst->lock, flags); - - if (sizetocopy > sizetocopy_now) { - sizetocopy -= sizetocopy_now; - - ret = copy_block(data, buffer->addr, start, sizetocopy_now, - buffer->cov); - if (ret == 0) - ret = copy_block(data + sizetocopy_now, buffer->addr, 0, - sizetocopy, buffer->cov); - } else { - ret = copy_block(data, buffer->addr, start, sizetocopy, - buffer->cov); - } - - return ret; -} - -void emu10k1_wavein_update(struct emu10k1_card *card, struct wiinst *wiinst) -{ - u32 hw_pos; - u32 diff; - - /* There is no actual start yet */ - if (!(wiinst->state & WAVE_STATE_STARTED)) { - hw_pos = wiinst->buffer.hw_pos; - } else { - /* hw_pos in byte units */ - hw_pos = sblive_readptr(card, wiinst->buffer.idxreg, 0) / wiinst->buffer.cov; - } - - diff = (wiinst->buffer.size + hw_pos - wiinst->buffer.hw_pos) % wiinst->buffer.size; - wiinst->total_recorded += diff; - wiinst->buffer.bytestocopy += diff; - - wiinst->buffer.hw_pos = hw_pos; -} diff --git a/sound/oss/emu10k1/cardwi.h b/sound/oss/emu10k1/cardwi.h deleted file mode 100644 index e82029b46ad1..000000000000 --- a/sound/oss/emu10k1/cardwi.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - ********************************************************************** - * cardwi.h -- header file for card wave input functions - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _CARDWI_H -#define _CARDWI_H - -#include "icardwav.h" -#include "audio.h" -#include "timer.h" - -struct wavein_buffer { - u16 ossfragshift; - u32 fragment_size; - u32 numfrags; - u32 hw_pos; /* hardware cursor position */ - u32 pos; /* software cursor position */ - u32 bytestocopy; /* bytes of recorded data available */ - u32 size; - u32 pages; - u32 sizereg; - u32 sizeregval; - u32 addrreg; - u32 idxreg; - u32 adcctl; - void *addr; - u8 cov; - dma_addr_t dma_handle; -}; - -struct wiinst -{ - u8 state; - struct emu_timer timer; - struct wave_format format; - struct wavein_buffer buffer; - wait_queue_head_t wait_queue; - u8 mmapped; - u32 total_recorded; /* total bytes read() from device */ - u32 blocks; - spinlock_t lock; - u8 recsrc; - u16 fxwc; -}; - -#define WAVEIN_MAXBUFSIZE 65536 -#define WAVEIN_MINBUFSIZE 368 - -#define WAVEIN_DEFAULTFRAGLEN 100 -#define WAVEIN_DEFAULTBUFLEN 1000 - -#define WAVEIN_MINFRAGSHIFT 8 -#define WAVEIN_MINFRAGS 2 - -int emu10k1_wavein_open(struct emu10k1_wavedevice *); -void emu10k1_wavein_close(struct emu10k1_wavedevice *); -void emu10k1_wavein_start(struct emu10k1_wavedevice *); -void emu10k1_wavein_stop(struct emu10k1_wavedevice *); -void emu10k1_wavein_getxfersize(struct wiinst *, u32 *); -int emu10k1_wavein_xferdata(struct wiinst *, u8 __user *, u32 *); -int emu10k1_wavein_setformat(struct emu10k1_wavedevice *, struct wave_format *); -void emu10k1_wavein_update(struct emu10k1_card *, struct wiinst *); - - -#endif /* _CARDWI_H */ diff --git a/sound/oss/emu10k1/cardwo.c b/sound/oss/emu10k1/cardwo.c deleted file mode 100644 index 54daca4f57b4..000000000000 --- a/sound/oss/emu10k1/cardwo.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - ********************************************************************** - * cardwo.c - PCM output HAL for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 -#include "hwaccess.h" -#include "8010.h" -#include "voicemgr.h" -#include "cardwo.h" -#include "audio.h" - -static u32 samplerate_to_linearpitch(u32 samplingrate) -{ - samplingrate = (samplingrate << 8) / 375; - return (samplingrate >> 1) + (samplingrate & 1); -} - -static void query_format(struct emu10k1_wavedevice *wave_dev, struct wave_format *wave_fmt) -{ - int i, j, do_passthrough = 0, is_ac3 = 0; - struct emu10k1_card *card = wave_dev->card; - struct woinst *woinst = wave_dev->woinst; - - if ((wave_fmt->channels > 2) && (wave_fmt->id != AFMT_S16_LE) && (wave_fmt->id != AFMT_U8)) - wave_fmt->channels = 2; - - if ((wave_fmt->channels < 1) || (wave_fmt->channels > WAVEOUT_MAXVOICES)) - wave_fmt->channels = 2; - - if (wave_fmt->channels == 2) - woinst->num_voices = 1; - else - woinst->num_voices = wave_fmt->channels; - - if (wave_fmt->samplingrate >= 0x2ee00) - wave_fmt->samplingrate = 0x2ee00; - - wave_fmt->passthrough = 0; - do_passthrough = is_ac3 = 0; - - if (card->pt.selected) - do_passthrough = 1; - - switch (wave_fmt->id) { - case AFMT_S16_LE: - wave_fmt->bitsperchannel = 16; - break; - case AFMT_U8: - wave_fmt->bitsperchannel = 8; - break; - case AFMT_AC3: - do_passthrough = 1; - is_ac3 = 1; - break; - default: - wave_fmt->id = AFMT_S16_LE; - wave_fmt->bitsperchannel = 16; - break; - } - if (do_passthrough) { - /* currently only one waveout instance may use pass-through */ - if (woinst->state != WAVE_STATE_CLOSED || - card->pt.state != PT_STATE_INACTIVE || - (wave_fmt->samplingrate != 48000 && !is_ac3)) { - DPF(2, "unable to set pass-through mode\n"); - } else if (USE_PT_METHOD1) { - i = emu10k1_find_control_gpr(&card->mgr, card->pt.patch_name, card->pt.intr_gpr_name); - j = emu10k1_find_control_gpr(&card->mgr, card->pt.patch_name, card->pt.enable_gpr_name); - if (i < 0 || j < 0) - DPF(2, "unable to set pass-through mode\n"); - else { - wave_fmt->samplingrate = 48000; - wave_fmt->channels = 2; - card->pt.pos_gpr = emu10k1_find_control_gpr(&card->mgr, card->pt.patch_name, - card->pt.pos_gpr_name); - wave_fmt->passthrough = 1; - card->pt.intr_gpr = i; - card->pt.enable_gpr = j; - card->pt.state = PT_STATE_INACTIVE; - - DPD(2, "is_ac3 is %d\n", is_ac3); - card->pt.ac3data = is_ac3; - wave_fmt->bitsperchannel = 16; - } - }else{ - DPF(2, "Using Passthrough Method 2\n"); - card->pt.enable_gpr = emu10k1_find_control_gpr(&card->mgr, card->pt.patch_name, - card->pt.enable_gpr_name); - wave_fmt->passthrough = 2; - wave_fmt->bitsperchannel = 16; - } - } - - wave_fmt->bytesperchannel = wave_fmt->bitsperchannel >> 3; - wave_fmt->bytespersample = wave_fmt->channels * wave_fmt->bytesperchannel; - wave_fmt->bytespersec = wave_fmt->bytespersample * wave_fmt->samplingrate; - - if (wave_fmt->channels == 2) - wave_fmt->bytespervoicesample = wave_fmt->channels * wave_fmt->bytesperchannel; - else - wave_fmt->bytespervoicesample = wave_fmt->bytesperchannel; -} - -static int get_voice(struct emu10k1_card *card, struct woinst *woinst, unsigned int voicenum) -{ - struct emu_voice *voice = &woinst->voice[voicenum]; - - /* Allocate voices here, if no voices available, return error. */ - - voice->usage = VOICE_USAGE_PLAYBACK; - - voice->flags = 0; - - if (woinst->format.channels == 2) - voice->flags |= VOICE_FLAGS_STEREO; - - if (woinst->format.bitsperchannel == 16) - voice->flags |= VOICE_FLAGS_16BIT; - - if (emu10k1_voice_alloc(card, voice) < 0) { - voice->usage = VOICE_USAGE_FREE; - return -1; - } - - /* Calculate pitch */ - voice->initial_pitch = (u16) (srToPitch(woinst->format.samplingrate) >> 8); - voice->pitch_target = samplerate_to_linearpitch(woinst->format.samplingrate); - - DPD(2, "Initial pitch --> %#x\n", voice->initial_pitch); - - voice->startloop = (voice->mem.emupageindex << 12) / - woinst->format.bytespervoicesample; - voice->endloop = voice->startloop + woinst->buffer.size / woinst->format.bytespervoicesample; - voice->start = voice->startloop; - - - voice->params[0].volume_target = 0xffff; - voice->params[0].initial_fc = 0xff; - voice->params[0].initial_attn = 0x00; - voice->params[0].byampl_env_sustain = 0x7f; - voice->params[0].byampl_env_decay = 0x7f; - - - if (voice->flags & VOICE_FLAGS_STEREO) { - if (woinst->format.passthrough == 2) { - voice->params[0].send_routing = voice->params[1].send_routing = card->waveout.send_routing[ROUTE_PT]; - voice->params[0].send_routing2 = voice->params[1].send_routing2 = card->waveout.send_routing2[ROUTE_PT]; - voice->params[0].send_dcba = 0xff; - voice->params[1].send_dcba = 0xff00; - voice->params[0].send_hgfe = voice->params[1].send_hgfe=0; - } else { - voice->params[0].send_dcba = card->waveout.send_dcba[SEND_LEFT]; - voice->params[0].send_hgfe = card->waveout.send_hgfe[SEND_LEFT]; - voice->params[1].send_dcba = card->waveout.send_dcba[SEND_RIGHT]; - voice->params[1].send_hgfe = card->waveout.send_hgfe[SEND_RIGHT]; - - if (woinst->device) { - // /dev/dps1 - voice->params[0].send_routing = voice->params[1].send_routing = card->waveout.send_routing[ROUTE_PCM1]; - voice->params[0].send_routing2 = voice->params[1].send_routing2 = card->waveout.send_routing2[ROUTE_PCM1]; - } else { - voice->params[0].send_routing = voice->params[1].send_routing = card->waveout.send_routing[ROUTE_PCM]; - voice->params[0].send_routing2 = voice->params[1].send_routing2 = card->waveout.send_routing2[ROUTE_PCM]; - } - } - - voice->params[1].volume_target = 0xffff; - voice->params[1].initial_fc = 0xff; - voice->params[1].initial_attn = 0x00; - voice->params[1].byampl_env_sustain = 0x7f; - voice->params[1].byampl_env_decay = 0x7f; - } else { - if (woinst->num_voices > 1) { - // Multichannel pcm - voice->params[0].send_dcba=0xff; - voice->params[0].send_hgfe=0; - if (card->is_audigy) { - voice->params[0].send_routing = 0x3f3f3f00 + card->mchannel_fx + voicenum; - voice->params[0].send_routing2 = 0x3f3f3f3f; - } else { - voice->params[0].send_routing = 0xfff0 + card->mchannel_fx + voicenum; - } - - } else { - voice->params[0].send_dcba = card->waveout.send_dcba[SEND_MONO]; - voice->params[0].send_hgfe = card->waveout.send_hgfe[SEND_MONO]; - - if (woinst->device) { - voice->params[0].send_routing = card->waveout.send_routing[ROUTE_PCM1]; - voice->params[0].send_routing2 = card->waveout.send_routing2[ROUTE_PCM1]; - } else { - voice->params[0].send_routing = card->waveout.send_routing[ROUTE_PCM]; - voice->params[0].send_routing2 = card->waveout.send_routing2[ROUTE_PCM]; - } - } - } - - DPD(2, "voice: startloop=%#x, endloop=%#x\n", voice->startloop, voice->endloop); - - emu10k1_voice_playback_setup(voice); - - return 0; -} - -int emu10k1_waveout_open(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct woinst *woinst = wave_dev->woinst; - struct waveout_buffer *buffer = &woinst->buffer; - unsigned int voicenum; - u16 delay; - - DPF(2, "emu10k1_waveout_open()\n"); - - for (voicenum = 0; voicenum < woinst->num_voices; voicenum++) { - if (emu10k1_voice_alloc_buffer(card, &woinst->voice[voicenum].mem, woinst->buffer.pages) < 0) { - ERROR(); - emu10k1_waveout_close(wave_dev); - return -1; - } - - if (get_voice(card, woinst, voicenum) < 0) { - ERROR(); - emu10k1_waveout_close(wave_dev); - return -1; - } - } - - buffer->fill_silence = 0; - buffer->silence_bytes = 0; - buffer->silence_pos = 0; - buffer->hw_pos = 0; - buffer->free_bytes = woinst->buffer.size; - - delay = (48000 * woinst->buffer.fragment_size) / - (woinst->format.samplingrate * woinst->format.bytespervoicesample); - - emu10k1_timer_install(card, &woinst->timer, delay); - - woinst->state = WAVE_STATE_OPEN; - - return 0; -} - -void emu10k1_waveout_close(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct woinst *woinst = wave_dev->woinst; - unsigned int voicenum; - - DPF(2, "emu10k1_waveout_close()\n"); - - emu10k1_waveout_stop(wave_dev); - - emu10k1_timer_uninstall(card, &woinst->timer); - - for (voicenum = 0; voicenum < woinst->num_voices; voicenum++) { - emu10k1_voice_free(&woinst->voice[voicenum]); - emu10k1_voice_free_buffer(card, &woinst->voice[voicenum].mem); - } - - woinst->state = WAVE_STATE_CLOSED; -} - -void emu10k1_waveout_start(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct woinst *woinst = wave_dev->woinst; - struct pt_data *pt = &card->pt; - - DPF(2, "emu10k1_waveout_start()\n"); - - if (woinst->format.passthrough == 2) { - emu10k1_pt_setup(wave_dev); - sblive_writeptr(card, (card->is_audigy ? A_GPR_BASE : GPR_BASE) + pt->enable_gpr, 0, 1); - pt->state = PT_STATE_PLAYING; - } - - /* Actual start */ - emu10k1_voices_start(woinst->voice, woinst->num_voices, woinst->total_played); - - emu10k1_timer_enable(card, &woinst->timer); - - woinst->state |= WAVE_STATE_STARTED; -} - -int emu10k1_waveout_setformat(struct emu10k1_wavedevice *wave_dev, struct wave_format *format) -{ - struct emu10k1_card *card = wave_dev->card; - struct woinst *woinst = wave_dev->woinst; - unsigned int voicenum; - u16 delay; - - DPF(2, "emu10k1_waveout_setformat()\n"); - - if (woinst->state & WAVE_STATE_STARTED) - return -1; - - query_format(wave_dev, format); - - if (woinst->format.samplingrate != format->samplingrate || - woinst->format.channels != format->channels || - woinst->format.bitsperchannel != format->bitsperchannel) { - - woinst->format = *format; - - if (woinst->state == WAVE_STATE_CLOSED) - return 0; - - emu10k1_timer_uninstall(card, &woinst->timer); - - for (voicenum = 0; voicenum < woinst->num_voices; voicenum++) { - emu10k1_voice_free(&woinst->voice[voicenum]); - - if (get_voice(card, woinst, voicenum) < 0) { - ERROR(); - emu10k1_waveout_close(wave_dev); - return -1; - } - } - - delay = (48000 * woinst->buffer.fragment_size) / - (woinst->format.samplingrate * woinst->format.bytespervoicesample); - - emu10k1_timer_install(card, &woinst->timer, delay); - } - - return 0; -} - -void emu10k1_waveout_stop(struct emu10k1_wavedevice *wave_dev) -{ - struct emu10k1_card *card = wave_dev->card; - struct woinst *woinst = wave_dev->woinst; - - DPF(2, "emu10k1_waveout_stop()\n"); - - if (!(woinst->state & WAVE_STATE_STARTED)) - return; - - emu10k1_timer_disable(card, &woinst->timer); - - /* Stop actual voices */ - emu10k1_voices_stop(woinst->voice, woinst->num_voices); - - emu10k1_waveout_update(woinst); - - woinst->state &= ~WAVE_STATE_STARTED; -} - -/** - * emu10k1_waveout_getxfersize - - * - * gives the total free bytes on the voice buffer, including silence bytes - * (basically: total_free_bytes = free_bytes + silence_bytes). - * - */ -void emu10k1_waveout_getxfersize(struct woinst *woinst, u32 *total_free_bytes) -{ - struct waveout_buffer *buffer = &woinst->buffer; - int pending_bytes; - - if (woinst->mmapped) { - *total_free_bytes = buffer->free_bytes; - return; - } - - pending_bytes = buffer->size - buffer->free_bytes; - - buffer->fill_silence = (pending_bytes < (signed) buffer->fragment_size * 2) ? 1 : 0; - - if (pending_bytes > (signed) buffer->silence_bytes) { - *total_free_bytes = (buffer->free_bytes + buffer->silence_bytes); - } else { - *total_free_bytes = buffer->size; - buffer->silence_bytes = pending_bytes; - if (pending_bytes < 0) { - buffer->silence_pos = buffer->hw_pos; - buffer->silence_bytes = 0; - buffer->free_bytes = buffer->size; - DPF(1, "buffer underrun\n"); - } - } -} - -/** - * copy_block - - * - * copies a block of pcm data to a voice buffer. - * Notice that the voice buffer is actually a set of disjointed memory pages. - * - */ -static void copy_block(void **dst, u32 str, u8 __user *src, u32 len) -{ - unsigned int pg; - unsigned int pgoff; - unsigned int k; - - pg = str / PAGE_SIZE; - pgoff = str % PAGE_SIZE; - - if (len > PAGE_SIZE - pgoff) { - k = PAGE_SIZE - pgoff; - if (__copy_from_user((u8 *)dst[pg] + pgoff, src, k)) - return; - len -= k; - while (len > PAGE_SIZE) { - if (__copy_from_user(dst[++pg], src + k, PAGE_SIZE)) - return; - k += PAGE_SIZE; - len -= PAGE_SIZE; - } - if (__copy_from_user(dst[++pg], src + k, len)) - return; - - } else - __copy_from_user((u8 *)dst[pg] + pgoff, src, len); -} - -/** - * copy_ilv_block - - * - * copies a block of pcm data containing n interleaved channels to n mono voice buffers. - * Notice that the voice buffer is actually a set of disjointed memory pages. - * - */ -static void copy_ilv_block(struct woinst *woinst, u32 str, u8 __user *src, u32 len) -{ - unsigned int pg; - unsigned int pgoff; - unsigned int voice_num; - struct emu_voice *voice = woinst->voice; - - pg = str / PAGE_SIZE; - pgoff = str % PAGE_SIZE; - - while (len) { - for (voice_num = 0; voice_num < woinst->num_voices; voice_num++) { - if (__copy_from_user((u8 *)(voice[voice_num].mem.addr[pg]) + pgoff, src, woinst->format.bytespervoicesample)) - return; - src += woinst->format.bytespervoicesample; - } - - len -= woinst->format.bytespervoicesample; - - pgoff += woinst->format.bytespervoicesample; - if (pgoff >= PAGE_SIZE) { - pgoff = 0; - pg++; - } - } -} - -/** - * fill_block - - * - * fills a set voice buffers with a block of a given sample. - * - */ -static void fill_block(struct woinst *woinst, u32 str, u8 data, u32 len) -{ - unsigned int pg; - unsigned int pgoff; - unsigned int voice_num; - struct emu_voice *voice = woinst->voice; - unsigned int k; - - pg = str / PAGE_SIZE; - pgoff = str % PAGE_SIZE; - - if (len > PAGE_SIZE - pgoff) { - k = PAGE_SIZE - pgoff; - for (voice_num = 0; voice_num < woinst->num_voices; voice_num++) - memset((u8 *)voice[voice_num].mem.addr[pg] + pgoff, data, k); - len -= k; - while (len > PAGE_SIZE) { - pg++; - for (voice_num = 0; voice_num < woinst->num_voices; voice_num++) - memset(voice[voice_num].mem.addr[pg], data, PAGE_SIZE); - - len -= PAGE_SIZE; - } - pg++; - for (voice_num = 0; voice_num < woinst->num_voices; voice_num++) - memset(voice[voice_num].mem.addr[pg], data, len); - - } else { - for (voice_num = 0; voice_num < woinst->num_voices; voice_num++) - memset((u8 *)voice[voice_num].mem.addr[pg] + pgoff, data, len); - } -} - -/** - * emu10k1_waveout_xferdata - - * - * copies pcm data to the voice buffer. Silence samples - * previously added to the buffer are overwritten. - * - */ -void emu10k1_waveout_xferdata(struct woinst *woinst, u8 __user *data, u32 *size) -{ - struct waveout_buffer *buffer = &woinst->buffer; - struct voice_mem *mem = &woinst->voice[0].mem; - u32 sizetocopy, sizetocopy_now, start; - unsigned long flags; - - sizetocopy = min_t(u32, buffer->size, *size); - *size = sizetocopy; - - if (!sizetocopy) - return; - - spin_lock_irqsave(&woinst->lock, flags); - start = (buffer->size + buffer->silence_pos - buffer->silence_bytes) % buffer->size; - - if (sizetocopy > buffer->silence_bytes) { - buffer->silence_pos += sizetocopy - buffer->silence_bytes; - buffer->free_bytes -= sizetocopy - buffer->silence_bytes; - buffer->silence_bytes = 0; - } else - buffer->silence_bytes -= sizetocopy; - - spin_unlock_irqrestore(&woinst->lock, flags); - - sizetocopy_now = buffer->size - start; - if (sizetocopy > sizetocopy_now) { - sizetocopy -= sizetocopy_now; - if (woinst->num_voices > 1) { - copy_ilv_block(woinst, start, data, sizetocopy_now); - copy_ilv_block(woinst, 0, data + sizetocopy_now * woinst->num_voices, sizetocopy); - } else { - copy_block(mem->addr, start, data, sizetocopy_now); - copy_block(mem->addr, 0, data + sizetocopy_now, sizetocopy); - } - } else { - if (woinst->num_voices > 1) - copy_ilv_block(woinst, start, data, sizetocopy); - else - copy_block(mem->addr, start, data, sizetocopy); - } -} - -/** - * emu10k1_waveout_fillsilence - - * - * adds samples of silence to the voice buffer so that we - * don't loop over stale pcm data. - * - */ -void emu10k1_waveout_fillsilence(struct woinst *woinst) -{ - struct waveout_buffer *buffer = &woinst->buffer; - u32 sizetocopy, sizetocopy_now, start; - u8 filldata; - unsigned long flags; - - sizetocopy = buffer->fragment_size; - - if (woinst->format.bitsperchannel == 16) - filldata = 0x00; - else - filldata = 0x80; - - spin_lock_irqsave(&woinst->lock, flags); - buffer->silence_bytes += sizetocopy; - buffer->free_bytes -= sizetocopy; - buffer->silence_pos %= buffer->size; - start = buffer->silence_pos; - buffer->silence_pos += sizetocopy; - spin_unlock_irqrestore(&woinst->lock, flags); - - sizetocopy_now = buffer->size - start; - - if (sizetocopy > sizetocopy_now) { - sizetocopy -= sizetocopy_now; - fill_block(woinst, start, filldata, sizetocopy_now); - fill_block(woinst, 0, filldata, sizetocopy); - } else { - fill_block(woinst, start, filldata, sizetocopy); - } -} - -/** - * emu10k1_waveout_update - - * - * updates the position of the voice buffer hardware pointer (hw_pos) - * and the number of free bytes on the buffer (free_bytes). - * The free bytes _don't_ include silence bytes that may have been - * added to the buffer. - * - */ -void emu10k1_waveout_update(struct woinst *woinst) -{ - u32 hw_pos; - u32 diff; - - /* There is no actual start yet */ - if (!(woinst->state & WAVE_STATE_STARTED)) { - hw_pos = woinst->buffer.hw_pos; - } else { - /* hw_pos in sample units */ - hw_pos = sblive_readptr(woinst->voice[0].card, CCCA_CURRADDR, woinst->voice[0].num); - - if(hw_pos < woinst->voice[0].start) - hw_pos += woinst->buffer.size / woinst->format.bytespervoicesample - woinst->voice[0].start; - else - hw_pos -= woinst->voice[0].start; - - hw_pos *= woinst->format.bytespervoicesample; - } - - diff = (woinst->buffer.size + hw_pos - woinst->buffer.hw_pos) % woinst->buffer.size; - woinst->total_played += diff; - woinst->buffer.free_bytes += diff; - woinst->buffer.hw_pos = hw_pos; -} diff --git a/sound/oss/emu10k1/cardwo.h b/sound/oss/emu10k1/cardwo.h deleted file mode 100644 index 1dece8853e5c..000000000000 --- a/sound/oss/emu10k1/cardwo.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - ********************************************************************** - * cardwo.h -- header file for card wave out functions - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _CARDWO_H -#define _CARDWO_H - -#include "icardwav.h" -#include "audio.h" -#include "voicemgr.h" -#include "timer.h" - -/* setting this to other than a power of two may break some applications */ -#define WAVEOUT_MAXBUFSIZE MAXBUFSIZE - -#define WAVEOUT_DEFAULTFRAGLEN 20 /* Time to play a fragment in ms (latency) */ -#define WAVEOUT_DEFAULTBUFLEN 500 /* Time to play the entire buffer in ms */ - -#define WAVEOUT_MINFRAGSHIFT 6 /* Minimum fragment size in bytes is 2^6 */ -#define WAVEOUT_MINFRAGS 3 /* _don't_ go bellow 3, it would break silence filling */ -#define WAVEOUT_MAXVOICES 6 - -struct waveout_buffer { - u16 ossfragshift; - u32 numfrags; - u32 fragment_size; /* in bytes units */ - u32 size; /* in bytes units */ - u32 pages; /* buffer size in page units*/ - u32 silence_pos; /* software cursor position (including silence bytes) */ - u32 hw_pos; /* hardware cursor position */ - u32 free_bytes; /* free bytes available on the buffer (not including silence bytes) */ - u8 fill_silence; - u32 silence_bytes; /* silence bytes on the buffer */ -}; - -struct woinst -{ - u8 state; - u8 num_voices; - struct emu_voice voice[WAVEOUT_MAXVOICES]; - struct emu_timer timer; - struct wave_format format; - struct waveout_buffer buffer; - wait_queue_head_t wait_queue; - u8 mmapped; - u32 total_copied; /* total number of bytes written() to the buffer (excluding silence) */ - u32 total_played; /* total number of bytes played including silence */ - u32 blocks; - u8 device; - spinlock_t lock; -}; - -int emu10k1_waveout_open(struct emu10k1_wavedevice *); -void emu10k1_waveout_close(struct emu10k1_wavedevice *); -void emu10k1_waveout_start(struct emu10k1_wavedevice *); -void emu10k1_waveout_stop(struct emu10k1_wavedevice *); -void emu10k1_waveout_getxfersize(struct woinst*, u32 *); -void emu10k1_waveout_xferdata(struct woinst*, u8 __user *, u32 *); -void emu10k1_waveout_fillsilence(struct woinst*); -int emu10k1_waveout_setformat(struct emu10k1_wavedevice*, struct wave_format*); -void emu10k1_waveout_update(struct woinst*); - -#endif /* _CARDWO_H */ diff --git a/sound/oss/emu10k1/ecard.c b/sound/oss/emu10k1/ecard.c deleted file mode 100644 index 4ae635fe1402..000000000000 --- a/sound/oss/emu10k1/ecard.c +++ /dev/null @@ -1,157 +0,0 @@ -/* - ********************************************************************** - * ecard.c - E-card initialization code - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 "ecard.h" -#include "hwaccess.h" - -/* Private routines */ -static void ecard_setadcgain(struct emu10k1_card *, struct ecard_state *, u16); -static void ecard_write(struct emu10k1_card *, u32); - -/************************************************************************** - * @func Set the gain of the ECARD's CS3310 Trim/gain controller. The - * trim value consists of a 16bit value which is composed of two - * 8 bit gain/trim values, one for the left channel and one for the - * right channel. The following table maps from the Gain/Attenuation - * value in decibels into the corresponding bit pattern for a single - * channel. - */ - -static void ecard_setadcgain(struct emu10k1_card *card, struct ecard_state *ecard, u16 gain) -{ - u32 currbit; - ecard->adc_gain = gain; - - /* Enable writing to the TRIM registers */ - ecard_write(card, ecard->control_bits & ~EC_TRIM_CSN); - - /* Do it again to insure that we meet hold time requirements */ - ecard_write(card, ecard->control_bits & ~EC_TRIM_CSN); - - for (currbit = (1L << 15); currbit; currbit >>= 1) { - - u32 value = ecard->control_bits & ~(EC_TRIM_CSN|EC_TRIM_SDATA); - - if (gain & currbit) - value |= EC_TRIM_SDATA; - - /* Clock the bit */ - ecard_write(card, value); - ecard_write(card, value | EC_TRIM_SCLK); - ecard_write(card, value); - } - - ecard_write(card, ecard->control_bits); -} - -/************************************************************************** - * @func Clock bits into the Ecard's control latch. The Ecard uses a - * control latch will is loaded bit-serially by toggling the Modem control - * lines from function 2 on the E8010. This function hides these details - * and presents the illusion that we are actually writing to a distinct - * register. - */ -static void ecard_write(struct emu10k1_card *card, u32 value) -{ - u16 count; - u32 data, hcvalue; - unsigned long flags; - - spin_lock_irqsave(&card->lock, flags); - - hcvalue = inl(card->iobase + HCFG) & ~(HOOKN_BIT|HANDN_BIT|PULSEN_BIT); - - outl(card->iobase + HCFG, hcvalue); - - for (count = 0 ; count < EC_NUM_CONTROL_BITS; count++) { - - /* Set up the value */ - data = ((value & 0x1) ? PULSEN_BIT : 0); - value >>= 1; - - outl(card->iobase + HCFG, hcvalue | data); - - /* Clock the shift register */ - outl(card->iobase + HCFG, hcvalue | data | HANDN_BIT); - outl(card->iobase + HCFG, hcvalue | data); - } - - /* Latch the bits */ - outl(card->iobase + HCFG, hcvalue | HOOKN_BIT); - outl(card->iobase + HCFG, hcvalue); - - spin_unlock_irqrestore(&card->lock, flags); -} - -void __devinit emu10k1_ecard_init(struct emu10k1_card *card) -{ - u32 hcvalue; - struct ecard_state ecard; - - /* Set up the initial settings */ - ecard.mux0_setting = EC_DEFAULT_SPDIF0_SEL; - ecard.mux1_setting = EC_DEFAULT_SPDIF1_SEL; - ecard.mux2_setting = 0; - ecard.adc_gain = EC_DEFAULT_ADC_GAIN; - ecard.control_bits = EC_RAW_RUN_MODE | - EC_SPDIF0_SELECT(ecard.mux0_setting) | - EC_SPDIF1_SELECT(ecard.mux1_setting); - - - /* Step 0: Set the codec type in the hardware control register - * and enable audio output */ - hcvalue = emu10k1_readfn0(card, HCFG); - emu10k1_writefn0(card, HCFG, hcvalue | HCFG_AUDIOENABLE | HCFG_CODECFORMAT_I2S); - - /* Step 1: Turn off the led and deassert TRIM_CS */ - ecard_write(card, EC_ADCCAL | EC_LEDN | EC_TRIM_CSN); - - /* Step 2: Calibrate the ADC and DAC */ - ecard_write(card, EC_DACCAL | EC_LEDN | EC_TRIM_CSN); - - /* Step 3: Wait for awhile; FIXME: Is this correct? */ - - current->state = TASK_INTERRUPTIBLE; - schedule_timeout(HZ); - - /* Step 4: Switch off the DAC and ADC calibration. Note - * That ADC_CAL is actually an inverted signal, so we assert - * it here to stop calibration. */ - ecard_write(card, EC_ADCCAL | EC_LEDN | EC_TRIM_CSN); - - /* Step 4: Switch into run mode */ - ecard_write(card, ecard.control_bits); - - /* Step 5: Set the analog input gain */ - ecard_setadcgain(card, &ecard, ecard.adc_gain); -} - - diff --git a/sound/oss/emu10k1/ecard.h b/sound/oss/emu10k1/ecard.h deleted file mode 100644 index 67aead16e8ec..000000000000 --- a/sound/oss/emu10k1/ecard.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - ********************************************************************** - * ecard.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * 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 _ECARD_H -#define _ECARD_H - -#include "8010.h" -#include "hwaccess.h" -#include - -/* In A1 Silicon, these bits are in the HC register */ -#define HOOKN_BIT (1L << 12) -#define HANDN_BIT (1L << 11) -#define PULSEN_BIT (1L << 10) - -#define EC_GDI1 (1 << 13) -#define EC_GDI0 (1 << 14) - -#define EC_NUM_CONTROL_BITS 20 - -#define EC_AC3_DATA_SELN 0x0001L -#define EC_EE_DATA_SEL 0x0002L -#define EC_EE_CNTRL_SELN 0x0004L -#define EC_EECLK 0x0008L -#define EC_EECS 0x0010L -#define EC_EESDO 0x0020L -#define EC_TRIM_CSN 0x0040L -#define EC_TRIM_SCLK 0x0080L -#define EC_TRIM_SDATA 0x0100L -#define EC_TRIM_MUTEN 0x0200L -#define EC_ADCCAL 0x0400L -#define EC_ADCRSTN 0x0800L -#define EC_DACCAL 0x1000L -#define EC_DACMUTEN 0x2000L -#define EC_LEDN 0x4000L - -#define EC_SPDIF0_SEL_SHIFT 15 -#define EC_SPDIF1_SEL_SHIFT 17 -#define EC_SPDIF0_SEL_MASK (0x3L << EC_SPDIF0_SEL_SHIFT) -#define EC_SPDIF1_SEL_MASK (0x7L << EC_SPDIF1_SEL_SHIFT) -#define EC_SPDIF0_SELECT(_x) (((_x) << EC_SPDIF0_SEL_SHIFT) & EC_SPDIF0_SEL_MASK) -#define EC_SPDIF1_SELECT(_x) (((_x) << EC_SPDIF1_SEL_SHIFT) & EC_SPDIF1_SEL_MASK) -#define EC_CURRENT_PROM_VERSION 0x01 /* Self-explanatory. This should - * be incremented any time the EEPROM's - * format is changed. */ - -#define EC_EEPROM_SIZE 0x40 /* ECARD EEPROM has 64 16-bit words */ - -/* Addresses for special values stored in to EEPROM */ -#define EC_PROM_VERSION_ADDR 0x20 /* Address of the current prom version */ -#define EC_BOARDREV0_ADDR 0x21 /* LSW of board rev */ -#define EC_BOARDREV1_ADDR 0x22 /* MSW of board rev */ - -#define EC_LAST_PROMFILE_ADDR 0x2f - -#define EC_SERIALNUM_ADD 0x30 /* First word of serial number. The number - * can be up to 30 characters in length - * and is stored as a NULL-terminated - * ASCII string. Any unused bytes must be - * filled with zeros */ -#define EC_CHECKSUM_ADDR 0x3f /* Location at which checksum is stored */ - - - -/* Most of this stuff is pretty self-evident. According to the hardware - * dudes, we need to leave the ADCCAL bit low in order to avoid a DC - * offset problem. Weird. - */ -#define EC_RAW_RUN_MODE (EC_DACMUTEN | EC_ADCRSTN | EC_TRIM_MUTEN | EC_TRIM_CSN) - - -#define EC_DEFAULT_ADC_GAIN 0xC4C4 -#define EC_DEFAULT_SPDIF0_SEL 0x0 -#define EC_DEFAULT_SPDIF1_SEL 0x4 - -#define HC_EA 0x01L - -/* ECARD state structure. This structure maintains the state - * for various portions of the ECARD's onboard hardware. - */ -struct ecard_state { - u32 control_bits; - u16 adc_gain; - u16 mux0_setting; - u16 mux1_setting; - u16 mux2_setting; -}; - -void emu10k1_ecard_init(struct emu10k1_card *) __devinit; - -#endif /* _ECARD_H */ diff --git a/sound/oss/emu10k1/efxmgr.c b/sound/oss/emu10k1/efxmgr.c deleted file mode 100644 index 7d5865de4c2e..000000000000 --- a/sound/oss/emu10k1/efxmgr.c +++ /dev/null @@ -1,220 +0,0 @@ -/* - ********************************************************************** - * efxmgr.c - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 -#include "hwaccess.h" -#include "efxmgr.h" - -int emu10k1_find_control_gpr(struct patch_manager *mgr, const char *patch_name, const char *gpr_name) -{ - struct dsp_patch *patch; - struct dsp_rpatch *rpatch; - char s[PATCH_NAME_SIZE + 4]; - unsigned long *gpr_used; - int i; - - DPD(2, "emu10k1_find_control_gpr(): %s %s\n", patch_name, gpr_name); - - rpatch = &mgr->rpatch; - if (!strcmp(rpatch->name, patch_name)) { - gpr_used = rpatch->gpr_used; - goto match; - } - - for (i = 0; i < mgr->current_pages * PATCHES_PER_PAGE; i++) { - patch = PATCH(mgr, i); - sprintf(s,"%s", patch->name); - - if (!strcmp(s, patch_name)) { - gpr_used = patch->gpr_used; - goto match; - } - } - - return -1; - - match: - for (i = 0; i < NUM_GPRS; i++) - if (mgr->gpr[i].type == GPR_TYPE_CONTROL && - test_bit(i, gpr_used) && - !strcmp(mgr->gpr[i].name, gpr_name)) - return i; - - return -1; -} - -void emu10k1_set_control_gpr(struct emu10k1_card *card, int addr, s32 val, int flag) -{ - struct patch_manager *mgr = &card->mgr; - - DPD(2, "emu10k1_set_control_gpr(): %d %x\n", addr, val); - - if (addr < 0 || addr >= NUM_GPRS) - return; - - //fixme: once patch manager is up, remember to fix this for the audigy - if (card->is_audigy) { - sblive_writeptr(card, A_GPR_BASE + addr, 0, val); - } else { - if (flag) - val += sblive_readptr(card, GPR_BASE + addr, 0); - if (val > mgr->gpr[addr].max) - val = mgr->gpr[addr].max; - else if (val < mgr->gpr[addr].min) - val = mgr->gpr[addr].min; - sblive_writeptr(card, GPR_BASE + addr, 0, val); - } - - -} - -//TODO: make this configurable: -#define VOLCTRL_CHANNEL SOUND_MIXER_VOLUME -#define VOLCTRL_STEP_SIZE 5 - -//An internal function for setting OSS mixer controls. -static void emu10k1_set_oss_vol(struct emu10k1_card *card, int oss_mixer, - unsigned int left, unsigned int right) -{ - extern char volume_params[SOUND_MIXER_NRDEVICES]; - - card->ac97->mixer_state[oss_mixer] = (right << 8) | left; - - if (!card->is_aps) - card->ac97->write_mixer(card->ac97, oss_mixer, left, right); - - emu10k1_set_volume_gpr(card, card->mgr.ctrl_gpr[oss_mixer][0], left, - volume_params[oss_mixer]); - - emu10k1_set_volume_gpr(card, card->mgr.ctrl_gpr[oss_mixer][1], right, - volume_params[oss_mixer]); -} - -//FIXME: mute should unmute when pressed a second time -void emu10k1_mute_irqhandler(struct emu10k1_card *card) -{ - int oss_channel = VOLCTRL_CHANNEL; - int left, right; - static int val; - - if (val) { - left = val & 0xff; - right = (val >> 8) & 0xff; - val = 0; - } else { - val = card->ac97->mixer_state[oss_channel]; - left = 0; - right = 0; - } - - emu10k1_set_oss_vol(card, oss_channel, left, right); -} - -void emu10k1_volincr_irqhandler(struct emu10k1_card *card) -{ - int oss_channel = VOLCTRL_CHANNEL; - int left, right; - - left = card->ac97->mixer_state[oss_channel] & 0xff; - right = (card->ac97->mixer_state[oss_channel] >> 8) & 0xff; - - if ((left += VOLCTRL_STEP_SIZE) > 100) - left = 100; - - if ((right += VOLCTRL_STEP_SIZE) > 100) - right = 100; - - emu10k1_set_oss_vol(card, oss_channel, left, right); -} - -void emu10k1_voldecr_irqhandler(struct emu10k1_card *card) -{ - int oss_channel = VOLCTRL_CHANNEL; - int left, right; - - left = card->ac97->mixer_state[oss_channel] & 0xff; - right = (card->ac97->mixer_state[oss_channel] >> 8) & 0xff; - - if ((left -= VOLCTRL_STEP_SIZE) < 0) - left = 0; - - if ((right -= VOLCTRL_STEP_SIZE) < 0) - right = 0; - - emu10k1_set_oss_vol(card, oss_channel, left, right); -} - -void emu10k1_set_volume_gpr(struct emu10k1_card *card, int addr, s32 vol, int scale) -{ - struct patch_manager *mgr = &card->mgr; - unsigned long flags; - - static const s32 log2lin[4] ={ // attenuation (dB) - 0x7fffffff, // 0.0 - 0x7fffffff * 0.840896415253715 , // 1.5 - 0x7fffffff * 0.707106781186548, // 3.0 - 0x7fffffff * 0.594603557501361 , // 4.5 - }; - - if (addr < 0) - return; - - vol = (100 - vol ) * scale / 100; - - // Thanks to the comp.dsp newsgroup for this neat trick: - vol = (vol >= scale) ? 0 : (log2lin[vol & 3] >> (vol >> 2)); - - spin_lock_irqsave(&mgr->lock, flags); - emu10k1_set_control_gpr(card, addr, vol, 0); - spin_unlock_irqrestore(&mgr->lock, flags); -} - -void emu10k1_dsp_irqhandler(struct emu10k1_card *card) -{ - unsigned long flags; - - if (card->pt.state != PT_STATE_INACTIVE) { - u32 bc; - bc = sblive_readptr(card, GPR_BASE + card->pt.intr_gpr, 0); - if (bc != 0) { - DPD(3, "pt interrupt, bc = %d\n", bc); - spin_lock_irqsave(&card->pt.lock, flags); - card->pt.blocks_played = bc; - if (card->pt.blocks_played >= card->pt.blocks_copied) { - DPF(1, "buffer underrun in passthrough playback\n"); - emu10k1_pt_stop(card); - } - wake_up_interruptible(&card->pt.wait); - spin_unlock_irqrestore(&card->pt.lock, flags); - } - } -} - diff --git a/sound/oss/emu10k1/efxmgr.h b/sound/oss/emu10k1/efxmgr.h deleted file mode 100644 index ef48e5c70d1f..000000000000 --- a/sound/oss/emu10k1/efxmgr.h +++ /dev/null @@ -1,270 +0,0 @@ -/* - ********************************************************************** - * sblive_fx.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _EFXMGR_H -#define _EFXMGR_H - -struct emu_efx_info_t{ - int opcode_shift; - int high_operand_shift; - int instruction_start; - int gpr_base; - int output_base; -}; - - -#define WRITE_EFX(a, b, c) sblive_writeptr((a), emu_efx_info[card->is_audigy].instruction_start + (b), 0, (c)) - -#define OP(op, z, w, x, y) \ - do { WRITE_EFX(card, (pc) * 2, ((x) << emu_efx_info[card->is_audigy].high_operand_shift) | (y)); \ - WRITE_EFX(card, (pc) * 2 + 1, ((op) << emu_efx_info[card->is_audigy].opcode_shift ) | ((z) << emu_efx_info[card->is_audigy].high_operand_shift) | (w)); \ - ++pc; } while (0) - -#define NUM_INPUTS 0x20 -#define NUM_OUTPUTS 0x20 -#define NUM_GPRS 0x100 - -#define A_NUM_INPUTS 0x60 -#define A_NUM_OUTPUTS 0x60 //fixme: this may or may not be true -#define A_NUM_GPRS 0x200 - -#define GPR_NAME_SIZE 32 -#define PATCH_NAME_SIZE 32 - -struct dsp_rpatch { - char name[PATCH_NAME_SIZE]; - u16 code_start; - u16 code_size; - - unsigned long gpr_used[NUM_GPRS / (sizeof(unsigned long) * 8) + 1]; - unsigned long gpr_input[NUM_GPRS / (sizeof(unsigned long) * 8) + 1]; - unsigned long route[NUM_OUTPUTS]; - unsigned long route_v[NUM_OUTPUTS]; -}; - -struct dsp_patch { - char name[PATCH_NAME_SIZE]; - u8 id; - unsigned long input; /* bitmap of the lines used as inputs */ - unsigned long output; /* bitmap of the lines used as outputs */ - u16 code_start; - u16 code_size; - - unsigned long gpr_used[NUM_GPRS / (sizeof(unsigned long) * 8) + 1]; /* bitmap of used gprs */ - unsigned long gpr_input[NUM_GPRS / (sizeof(unsigned long) * 8) + 1]; - u8 traml_istart; /* starting address of the internal tram lines used */ - u8 traml_isize; /* number of internal tram lines used */ - - u8 traml_estart; - u8 traml_esize; - - u16 tramb_istart; /* starting address of the internal tram memory used */ - u16 tramb_isize; /* amount of internal memory used */ - u32 tramb_estart; - u32 tramb_esize; -}; - -struct dsp_gpr { - u8 type; /* gpr type, STATIC, DYNAMIC, INPUT, OUTPUT, CONTROL */ - char name[GPR_NAME_SIZE]; /* gpr value, only valid for control gprs */ - s32 min, max; /* value range for this gpr, only valid for control gprs */ - u8 line; /* which input/output line is the gpr attached, only valid for input/output gprs */ - u8 usage; -}; - -enum { - GPR_TYPE_NULL = 0, - GPR_TYPE_IO, - GPR_TYPE_STATIC, - GPR_TYPE_DYNAMIC, - GPR_TYPE_CONTROL, - GPR_TYPE_CONSTANT -}; - -#define GPR_BASE 0x100 -#define OUTPUT_BASE 0x20 - -#define A_GPR_BASE 0x400 -#define A_OUTPUT_BASE 0x60 - -#define MAX_PATCHES_PAGES 32 - -struct patch_manager { - void *patch[MAX_PATCHES_PAGES]; - int current_pages; - struct dsp_rpatch rpatch; - struct dsp_gpr gpr[NUM_GPRS]; /* gpr usage table */ - spinlock_t lock; - s16 ctrl_gpr[SOUND_MIXER_NRDEVICES][2]; -}; - -#define PATCHES_PER_PAGE (PAGE_SIZE / sizeof(struct dsp_patch)) - -#define PATCH(mgr, i) ((struct dsp_patch *) (mgr)->patch[(i) / PATCHES_PER_PAGE] + (i) % PATCHES_PER_PAGE) - -/* PCM volume control */ -#define TMP_PCM_L 0x100 //temp PCM L (after the vol control) -#define TMP_PCM_R 0x101 -#define VOL_PCM_L 0x102 //vol PCM -#define VOL_PCM_R 0x103 - -/* Routing patch */ -#define TMP_AC_L 0x104 //tmp ac97 out -#define TMP_AC_R 0x105 -#define TMP_REAR_L 0x106 //output - Temp Rear -#define TMP_REAR_R 0x107 -#define TMP_DIGI_L 0x108 //output - Temp digital -#define TMP_DIGI_R 0x109 -#define DSP_VOL_L 0x10a // main dsp volume -#define DSP_VOL_R 0x10b - -/* hw inputs */ -#define PCM_IN_L 0x00 -#define PCM_IN_R 0x01 - -#define PCM1_IN_L 0x04 -#define PCM1_IN_R 0x05 -//mutilchannel playback stream appear here: - -#define MULTI_FRONT_L 0x08 -#define MULTI_FRONT_R 0x09 -#define MULTI_REAR_L 0x0a -#define MULTI_REAR_R 0x0b -#define MULTI_CENTER 0x0c -#define MULTI_LFE 0x0d - -#define AC97_IN_L 0x10 -#define AC97_IN_R 0x11 -#define SPDIF_CD_L 0x12 -#define SPDIF_CD_R 0x13 - -/* hw outputs */ -#define AC97_FRONT_L 0x20 -#define AC97_FRONT_R 0x21 -#define DIGITAL_OUT_L 0x22 -#define DIGITAL_OUT_R 0x23 -#define DIGITAL_CENTER 0x24 -#define DIGITAL_LFE 0x25 - -#define ANALOG_REAR_L 0x28 -#define ANALOG_REAR_R 0x29 -#define ADC_REC_L 0x2a -#define ADC_REC_R 0x2b - -#define ANALOG_CENTER 0x31 -#define ANALOG_LFE 0x32 - - -#define INPUT_PATCH_START(patch, nm, ln, i) \ -do { \ - patch = PATCH(mgr, patch_n); \ - strcpy(patch->name, nm); \ - patch->code_start = pc * 2; \ - patch->input = (1<<(0x1f&ln)); \ - patch->output= (1<<(0x1f&ln)); \ - patch->id = i; \ -} while(0) - -#define INPUT_PATCH_END(patch) \ -do { \ - patch->code_size = pc * 2 - patch->code_start; \ - patch_n++; \ -} while(0) - - -#define ROUTING_PATCH_START(patch, nm) \ -do { \ - patch = &mgr->rpatch; \ - strcpy(patch->name, nm); \ - patch->code_start = pc * 2; \ -} while(0) - -#define ROUTING_PATCH_END(patch) \ -do { \ - patch->code_size = pc * 2 - patch->code_start; \ -} while(0) - -#define CONNECT(input, output) set_bit(input, &rpatch->route[(output) - OUTPUT_BASE]); - -#define CONNECT_V(input, output) set_bit(input, &rpatch->route_v[(output) - OUTPUT_BASE]); - -#define OUTPUT_PATCH_START(patch, nm, ln, i) \ -do { \ - patch = PATCH(mgr, patch_n); \ - strcpy(patch->name, nm); \ - patch->code_start = pc * 2; \ - patch->input = (1<<(0x1f&ln)); \ - patch->output= (1<<(0x1f&ln)); \ - patch->id = i; \ -} while(0) - -#define OUTPUT_PATCH_END(patch) \ -do { \ - patch->code_size = pc * 2 - patch->code_start; \ - patch_n++; \ -} while(0) - -#define GET_OUTPUT_GPR(patch, g, ln) \ -do { \ - mgr->gpr[(g) - GPR_BASE].type = GPR_TYPE_IO; \ - mgr->gpr[(g) - GPR_BASE].usage++; \ - mgr->gpr[(g) - GPR_BASE].line = ln; \ - set_bit((g) - GPR_BASE, patch->gpr_used); \ -} while(0) - -#define GET_INPUT_GPR(patch, g, ln) \ -do { \ - mgr->gpr[(g) - GPR_BASE].type = GPR_TYPE_IO; \ - mgr->gpr[(g) - GPR_BASE].usage++; \ - mgr->gpr[(g) - GPR_BASE].line = ln; \ - set_bit((g) - GPR_BASE, patch->gpr_used); \ - set_bit((g) - GPR_BASE, patch->gpr_input); \ -} while(0) - -#define GET_DYNAMIC_GPR(patch, g) \ -do { \ - mgr->gpr[(g) - GPR_BASE].type = GPR_TYPE_DYNAMIC; \ - mgr->gpr[(g) - GPR_BASE].usage++; \ - set_bit((g) - GPR_BASE, patch->gpr_used); \ -} while(0) - -#define GET_CONTROL_GPR(patch, g, nm, a, b) \ -do { \ - strcpy(mgr->gpr[(g) - GPR_BASE].name, nm); \ - mgr->gpr[(g) - GPR_BASE].type = GPR_TYPE_CONTROL; \ - mgr->gpr[(g) - GPR_BASE].usage++; \ - mgr->gpr[(g) - GPR_BASE].min = a; \ - mgr->gpr[(g) - GPR_BASE].max = b; \ - sblive_writeptr(card, g, 0, b); \ - set_bit((g) - GPR_BASE, patch->gpr_used); \ -} while(0) - -#endif /* _EFXMGR_H */ diff --git a/sound/oss/emu10k1/emuadxmg.c b/sound/oss/emu10k1/emuadxmg.c deleted file mode 100644 index d7d2d4caf7ba..000000000000 --- a/sound/oss/emu10k1/emuadxmg.c +++ /dev/null @@ -1,104 +0,0 @@ - -/* - ********************************************************************** - * emuadxmg.c - Address space manager for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 "hwaccess.h" - -/* Allocates emu address space */ - -int emu10k1_addxmgr_alloc(u32 size, struct emu10k1_card *card) -{ - u16 *pagetable = card->emupagetable; - u16 index = 0; - u16 numpages; - unsigned long flags; - - /* Convert bytes to pages */ - numpages = (size / EMUPAGESIZE) + ((size % EMUPAGESIZE) ? 1 : 0); - - spin_lock_irqsave(&card->lock, flags); - - while (index < (MAXPAGES - 1)) { - if (pagetable[index] & 0x8000) { - /* This block of pages is in use, jump to the start of the next block. */ - index += (pagetable[index] & 0x7fff); - } else { - /* Found free block */ - if (pagetable[index] >= numpages) { - - /* Block is large enough */ - - /* If free block is larger than the block requested - * then adjust the size of the block remaining */ - if (pagetable[index] > numpages) - pagetable[index + numpages] = pagetable[index] - numpages; - - pagetable[index] = (numpages | 0x8000); /* Mark block as used */ - - spin_unlock_irqrestore(&card->lock, flags); - - return index; - } else { - /* Block too small, jump to the start of the next block */ - index += pagetable[index]; - } - } - } - - spin_unlock_irqrestore(&card->lock, flags); - - return -1; -} - -/* Frees a previously allocated emu address space. */ - -void emu10k1_addxmgr_free(struct emu10k1_card *card, int index) -{ - u16 *pagetable = card->emupagetable; - u16 origsize = 0; - unsigned long flags; - - spin_lock_irqsave(&card->lock, flags); - - if (pagetable[index] & 0x8000) { - /* Block is allocated - mark block as free */ - origsize = pagetable[index] & 0x7fff; - pagetable[index] = origsize; - - /* If next block is free, we concat both blocks */ - if (!(pagetable[index + origsize] & 0x8000)) - pagetable[index] += pagetable[index + origsize] & 0x7fff; - } - - spin_unlock_irqrestore(&card->lock, flags); - - return; -} diff --git a/sound/oss/emu10k1/hwaccess.c b/sound/oss/emu10k1/hwaccess.c deleted file mode 100644 index 2dc16a841fa1..000000000000 --- a/sound/oss/emu10k1/hwaccess.c +++ /dev/null @@ -1,507 +0,0 @@ -/* - ********************************************************************** - * hwaccess.c -- Hardware access layer - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * December 9, 1999 Jon Taylor rewrote the I/O subsystem - * - ********************************************************************** - * - * 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 - -#include "hwaccess.h" -#include "8010.h" -#include "icardmid.h" - -/************************************************************************* -* Function : srToPitch * -* Input : sampleRate - sampling rate * -* Return : pitch value * -* About : convert sampling rate to pitch * -* Note : for 8010, sampling rate is at 48kHz, this function should * -* be changed. * -*************************************************************************/ -u32 srToPitch(u32 sampleRate) -{ - int i; - - /* FIXME: These tables should be defined in a headerfile */ - static u32 logMagTable[128] = { - 0x00000, 0x02dfc, 0x05b9e, 0x088e6, 0x0b5d6, 0x0e26f, 0x10eb3, 0x13aa2, - 0x1663f, 0x1918a, 0x1bc84, 0x1e72e, 0x2118b, 0x23b9a, 0x2655d, 0x28ed5, - 0x2b803, 0x2e0e8, 0x30985, 0x331db, 0x359eb, 0x381b6, 0x3a93d, 0x3d081, - 0x3f782, 0x41e42, 0x444c1, 0x46b01, 0x49101, 0x4b6c4, 0x4dc49, 0x50191, - 0x5269e, 0x54b6f, 0x57006, 0x59463, 0x5b888, 0x5dc74, 0x60029, 0x623a7, - 0x646ee, 0x66a00, 0x68cdd, 0x6af86, 0x6d1fa, 0x6f43c, 0x7164b, 0x73829, - 0x759d4, 0x77b4f, 0x79c9a, 0x7bdb5, 0x7dea1, 0x7ff5e, 0x81fed, 0x8404e, - 0x86082, 0x88089, 0x8a064, 0x8c014, 0x8df98, 0x8fef1, 0x91e20, 0x93d26, - 0x95c01, 0x97ab4, 0x9993e, 0x9b79f, 0x9d5d9, 0x9f3ec, 0xa11d8, 0xa2f9d, - 0xa4d3c, 0xa6ab5, 0xa8808, 0xaa537, 0xac241, 0xadf26, 0xafbe7, 0xb1885, - 0xb3500, 0xb5157, 0xb6d8c, 0xb899f, 0xba58f, 0xbc15e, 0xbdd0c, 0xbf899, - 0xc1404, 0xc2f50, 0xc4a7b, 0xc6587, 0xc8073, 0xc9b3f, 0xcb5ed, 0xcd07c, - 0xceaec, 0xd053f, 0xd1f73, 0xd398a, 0xd5384, 0xd6d60, 0xd8720, 0xda0c3, - 0xdba4a, 0xdd3b4, 0xded03, 0xe0636, 0xe1f4e, 0xe384a, 0xe512c, 0xe69f3, - 0xe829f, 0xe9b31, 0xeb3a9, 0xecc08, 0xee44c, 0xefc78, 0xf148a, 0xf2c83, - 0xf4463, 0xf5c2a, 0xf73da, 0xf8b71, 0xfa2f0, 0xfba57, 0xfd1a7, 0xfe8df - }; - - static char logSlopeTable[128] = { - 0x5c, 0x5c, 0x5b, 0x5a, 0x5a, 0x59, 0x58, 0x58, - 0x57, 0x56, 0x56, 0x55, 0x55, 0x54, 0x53, 0x53, - 0x52, 0x52, 0x51, 0x51, 0x50, 0x50, 0x4f, 0x4f, - 0x4e, 0x4d, 0x4d, 0x4d, 0x4c, 0x4c, 0x4b, 0x4b, - 0x4a, 0x4a, 0x49, 0x49, 0x48, 0x48, 0x47, 0x47, - 0x47, 0x46, 0x46, 0x45, 0x45, 0x45, 0x44, 0x44, - 0x43, 0x43, 0x43, 0x42, 0x42, 0x42, 0x41, 0x41, - 0x41, 0x40, 0x40, 0x40, 0x3f, 0x3f, 0x3f, 0x3e, - 0x3e, 0x3e, 0x3d, 0x3d, 0x3d, 0x3c, 0x3c, 0x3c, - 0x3b, 0x3b, 0x3b, 0x3b, 0x3a, 0x3a, 0x3a, 0x39, - 0x39, 0x39, 0x39, 0x38, 0x38, 0x38, 0x38, 0x37, - 0x37, 0x37, 0x37, 0x36, 0x36, 0x36, 0x36, 0x35, - 0x35, 0x35, 0x35, 0x34, 0x34, 0x34, 0x34, 0x34, - 0x33, 0x33, 0x33, 0x33, 0x32, 0x32, 0x32, 0x32, - 0x32, 0x31, 0x31, 0x31, 0x31, 0x31, 0x30, 0x30, - 0x30, 0x30, 0x30, 0x2f, 0x2f, 0x2f, 0x2f, 0x2f - }; - - if (sampleRate == 0) - return 0; /* Bail out if no leading "1" */ - - sampleRate *= 11185; /* Scale 48000 to 0x20002380 */ - - for (i = 31; i > 0; i--) { - if (sampleRate & 0x80000000) { /* Detect leading "1" */ - return (u32) (((s32) (i - 15) << 20) + - logMagTable[0x7f & (sampleRate >> 24)] + - (0x7f & (sampleRate >> 17)) * logSlopeTable[0x7f & (sampleRate >> 24)]); - } - sampleRate = sampleRate << 1; - } - - DPF(2, "srToPitch: BUG!\n"); - return 0; /* Should never reach this point */ -} - -/******************************************* -* write/read PCI function 0 registers * -********************************************/ -void emu10k1_writefn0(struct emu10k1_card *card, u32 reg, u32 data) -{ - unsigned long flags; - - if (reg & 0xff000000) { - u32 mask; - u8 size, offset; - - size = (reg >> 24) & 0x3f; - offset = (reg >> 16) & 0x1f; - mask = ((1 << size) - 1) << offset; - data = (data << offset) & mask; - reg &= 0x7f; - - spin_lock_irqsave(&card->lock, flags); - data |= inl(card->iobase + reg) & ~mask; - outl(data, card->iobase + reg); - spin_unlock_irqrestore(&card->lock, flags); - } else { - spin_lock_irqsave(&card->lock, flags); - outl(data, card->iobase + reg); - spin_unlock_irqrestore(&card->lock, flags); - } - - return; -} - -#ifdef DBGEMU -void emu10k1_writefn0_2(struct emu10k1_card *card, u32 reg, u32 data, int size) -{ - unsigned long flags; - - spin_lock_irqsave(&card->lock, flags); - - if (size == 32) - outl(data, card->iobase + (reg & 0x1F)); - else if (size == 16) - outw(data, card->iobase + (reg & 0x1F)); - else - outb(data, card->iobase + (reg & 0x1F)); - - spin_unlock_irqrestore(&card->lock, flags); - - return; -} -#endif /* DBGEMU */ - -u32 emu10k1_readfn0(struct emu10k1_card * card, u32 reg) -{ - u32 val; - unsigned long flags; - - if (reg & 0xff000000) { - u32 mask; - u8 size, offset; - - size = (reg >> 24) & 0x3f; - offset = (reg >> 16) & 0x1f; - mask = ((1 << size) - 1) << offset; - reg &= 0x7f; - - spin_lock_irqsave(&card->lock, flags); - val = inl(card->iobase + reg); - spin_unlock_irqrestore(&card->lock, flags); - - return (val & mask) >> offset; - } else { - spin_lock_irqsave(&card->lock, flags); - val = inl(card->iobase + reg); - spin_unlock_irqrestore(&card->lock, flags); - return val; - } -} - -void emu10k1_timer_set(struct emu10k1_card * card, u16 data) -{ - unsigned long flags; - - spin_lock_irqsave(&card->lock, flags); - outw(data & TIMER_RATE_MASK, card->iobase + TIMER); - spin_unlock_irqrestore(&card->lock, flags); -} - -/************************************************************************ -* write/read Emu10k1 pointer-offset register set, accessed through * -* the PTR and DATA registers * -*************************************************************************/ -#define A_PTR_ADDRESS_MASK 0x0fff0000 -void sblive_writeptr(struct emu10k1_card *card, u32 reg, u32 channel, u32 data) -{ - u32 regptr; - unsigned long flags; - - regptr = ((reg << 16) & A_PTR_ADDRESS_MASK) | (channel & PTR_CHANNELNUM_MASK); - - if (reg & 0xff000000) { - u32 mask; - u8 size, offset; - - size = (reg >> 24) & 0x3f; - offset = (reg >> 16) & 0x1f; - mask = ((1 << size) - 1) << offset; - data = (data << offset) & mask; - - spin_lock_irqsave(&card->lock, flags); - outl(regptr, card->iobase + PTR); - data |= inl(card->iobase + DATA) & ~mask; - outl(data, card->iobase + DATA); - spin_unlock_irqrestore(&card->lock, flags); - } else { - spin_lock_irqsave(&card->lock, flags); - outl(regptr, card->iobase + PTR); - outl(data, card->iobase + DATA); - spin_unlock_irqrestore(&card->lock, flags); - } -} - -/* ... : data, reg, ... , TAGLIST_END */ -void sblive_writeptr_tag(struct emu10k1_card *card, u32 channel, ...) -{ - va_list args; - - unsigned long flags; - u32 reg; - - va_start(args, channel); - - spin_lock_irqsave(&card->lock, flags); - while ((reg = va_arg(args, u32)) != TAGLIST_END) { - u32 data = va_arg(args, u32); - u32 regptr = (((reg << 16) & A_PTR_ADDRESS_MASK) - | (channel & PTR_CHANNELNUM_MASK)); - outl(regptr, card->iobase + PTR); - if (reg & 0xff000000) { - int size = (reg >> 24) & 0x3f; - int offset = (reg >> 16) & 0x1f; - u32 mask = ((1 << size) - 1) << offset; - data = (data << offset) & mask; - - data |= inl(card->iobase + DATA) & ~mask; - } - outl(data, card->iobase + DATA); - } - spin_unlock_irqrestore(&card->lock, flags); - - va_end(args); - - return; -} - -u32 sblive_readptr(struct emu10k1_card * card, u32 reg, u32 channel) -{ - u32 regptr, val; - unsigned long flags; - - regptr = ((reg << 16) & A_PTR_ADDRESS_MASK) | (channel & PTR_CHANNELNUM_MASK); - - if (reg & 0xff000000) { - u32 mask; - u8 size, offset; - - size = (reg >> 24) & 0x3f; - offset = (reg >> 16) & 0x1f; - mask = ((1 << size) - 1) << offset; - - spin_lock_irqsave(&card->lock, flags); - outl(regptr, card->iobase + PTR); - val = inl(card->iobase + DATA); - spin_unlock_irqrestore(&card->lock, flags); - - return (val & mask) >> offset; - } else { - spin_lock_irqsave(&card->lock, flags); - outl(regptr, card->iobase + PTR); - val = inl(card->iobase + DATA); - spin_unlock_irqrestore(&card->lock, flags); - - return val; - } -} - -void emu10k1_irq_enable(struct emu10k1_card *card, u32 irq_mask) -{ - u32 val; - unsigned long flags; - - DPF(2,"emu10k1_irq_enable()\n"); - - spin_lock_irqsave(&card->lock, flags); - val = inl(card->iobase + INTE) | irq_mask; - outl(val, card->iobase + INTE); - spin_unlock_irqrestore(&card->lock, flags); - return; -} - -void emu10k1_irq_disable(struct emu10k1_card *card, u32 irq_mask) -{ - u32 val; - unsigned long flags; - - DPF(2,"emu10k1_irq_disable()\n"); - - spin_lock_irqsave(&card->lock, flags); - val = inl(card->iobase + INTE) & ~irq_mask; - outl(val, card->iobase + INTE); - spin_unlock_irqrestore(&card->lock, flags); - return; -} - -void emu10k1_clear_stop_on_loop(struct emu10k1_card *card, u32 voicenum) -{ - /* Voice interrupt */ - if (voicenum >= 32) - sblive_writeptr(card, SOLEH | ((0x0100 | (voicenum - 32)) << 16), 0, 0); - else - sblive_writeptr(card, SOLEL | ((0x0100 | voicenum) << 16), 0, 0); - - return; -} - -static void sblive_wcwait(struct emu10k1_card *card, u32 wait) -{ - volatile unsigned uCount; - u32 newtime = 0, curtime; - - curtime = emu10k1_readfn0(card, WC_SAMPLECOUNTER); - while (wait--) { - uCount = 0; - while (uCount++ < TIMEOUT) { - newtime = emu10k1_readfn0(card, WC_SAMPLECOUNTER); - if (newtime != curtime) - break; - } - - if (uCount >= TIMEOUT) - break; - - curtime = newtime; - } -} - -u16 emu10k1_ac97_read(struct ac97_codec *codec, u8 reg) -{ - struct emu10k1_card *card = codec->private_data; - u16 data; - unsigned long flags; - - spin_lock_irqsave(&card->lock, flags); - - outb(reg, card->iobase + AC97ADDRESS); - data = inw(card->iobase + AC97DATA); - - spin_unlock_irqrestore(&card->lock, flags); - - return data; -} - -void emu10k1_ac97_write(struct ac97_codec *codec, u8 reg, u16 value) -{ - struct emu10k1_card *card = codec->private_data; - unsigned long flags; - - spin_lock_irqsave(&card->lock, flags); - - outb(reg, card->iobase + AC97ADDRESS); - outw(value, card->iobase + AC97DATA); - outb( AC97_EXTENDED_ID, card->iobase + AC97ADDRESS); - spin_unlock_irqrestore(&card->lock, flags); -} - -/********************************************************* -* MPU access functions * -**********************************************************/ - -int emu10k1_mpu_write_data(struct emu10k1_card *card, u8 data) -{ - unsigned long flags; - int ret; - - if (card->is_audigy) { - if ((sblive_readptr(card, A_MUSTAT,0) & MUSTAT_ORDYN) == 0) { - sblive_writeptr(card, A_MUDATA, 0, data); - ret = 0; - } else - ret = -1; - } else { - spin_lock_irqsave(&card->lock, flags); - - if ((inb(card->iobase + MUSTAT) & MUSTAT_ORDYN) == 0) { - outb(data, card->iobase + MUDATA); - ret = 0; - } else - ret = -1; - - spin_unlock_irqrestore(&card->lock, flags); - } - - return ret; -} - -int emu10k1_mpu_read_data(struct emu10k1_card *card, u8 * data) -{ - unsigned long flags; - int ret; - - if (card->is_audigy) { - if ((sblive_readptr(card, A_MUSTAT,0) & MUSTAT_IRDYN) == 0) { - *data = sblive_readptr(card, A_MUDATA,0); - ret = 0; - } else - ret = -1; - } else { - spin_lock_irqsave(&card->lock, flags); - - if ((inb(card->iobase + MUSTAT) & MUSTAT_IRDYN) == 0) { - *data = inb(card->iobase + MUDATA); - ret = 0; - } else - ret = -1; - - spin_unlock_irqrestore(&card->lock, flags); - } - - return ret; -} - -int emu10k1_mpu_reset(struct emu10k1_card *card) -{ - u8 status; - unsigned long flags; - - DPF(2, "emu10k1_mpu_reset()\n"); - if (card->is_audigy) { - if (card->mpuacqcount == 0) { - sblive_writeptr(card, A_MUCMD, 0, MUCMD_RESET); - sblive_wcwait(card, 8); - sblive_writeptr(card, A_MUCMD, 0, MUCMD_RESET); - sblive_wcwait(card, 8); - sblive_writeptr(card, A_MUCMD, 0, MUCMD_ENTERUARTMODE); - sblive_wcwait(card, 8); - status = sblive_readptr(card, A_MUDATA, 0); - if (status == 0xfe) - return 0; - else - return -1; - } - - return 0; - } else { - if (card->mpuacqcount == 0) { - spin_lock_irqsave(&card->lock, flags); - outb(MUCMD_RESET, card->iobase + MUCMD); - spin_unlock_irqrestore(&card->lock, flags); - - sblive_wcwait(card, 8); - - spin_lock_irqsave(&card->lock, flags); - outb(MUCMD_RESET, card->iobase + MUCMD); - spin_unlock_irqrestore(&card->lock, flags); - - sblive_wcwait(card, 8); - - spin_lock_irqsave(&card->lock, flags); - outb(MUCMD_ENTERUARTMODE, card->iobase + MUCMD); - spin_unlock_irqrestore(&card->lock, flags); - - sblive_wcwait(card, 8); - - spin_lock_irqsave(&card->lock, flags); - status = inb(card->iobase + MUDATA); - spin_unlock_irqrestore(&card->lock, flags); - - if (status == 0xfe) - return 0; - else - return -1; - } - - return 0; - } -} - -int emu10k1_mpu_acquire(struct emu10k1_card *card) -{ - /* FIXME: This should be a macro */ - ++card->mpuacqcount; - - return 0; -} - -int emu10k1_mpu_release(struct emu10k1_card *card) -{ - /* FIXME: this should be a macro */ - --card->mpuacqcount; - - return 0; -} diff --git a/sound/oss/emu10k1/hwaccess.h b/sound/oss/emu10k1/hwaccess.h deleted file mode 100644 index 85e27bda694b..000000000000 --- a/sound/oss/emu10k1/hwaccess.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - ********************************************************************** - * hwaccess.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _HWACCESS_H -#define _HWACCESS_H - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "efxmgr.h" -#include "passthrough.h" -#include "midi.h" - -#define EMUPAGESIZE 4096 /* don't change */ -#define NUM_G 64 /* use all channels */ -#define NUM_FXSENDS 4 /* don't change */ -/* setting this to other than a power of two may break some applications */ -#define MAXBUFSIZE 65536 -#define MAXPAGES 8192 -#define BUFMAXPAGES (MAXBUFSIZE / PAGE_SIZE) - -#define FLAGS_AVAILABLE 0x0001 -#define FLAGS_READY 0x0002 - -struct memhandle -{ - dma_addr_t dma_handle; - void *addr; - u32 size; -}; - -#define DEBUG_LEVEL 2 - -#ifdef EMU10K1_DEBUG -# define DPD(level,x,y...) do {if(level <= DEBUG_LEVEL) printk( KERN_NOTICE "emu10k1: %s: %d: " x , __FILE__ , __LINE__ , y );} while(0) -# define DPF(level,x) do {if(level <= DEBUG_LEVEL) printk( KERN_NOTICE "emu10k1: %s: %d: " x , __FILE__ , __LINE__ );} while(0) -#else -# define DPD(level,x,y...) do { } while (0) /* not debugging: nothing */ -# define DPF(level,x) do { } while (0) -#endif /* EMU10K1_DEBUG */ - -#define ERROR() DPF(1,"error\n") - -/* DATA STRUCTURES */ - -struct emu10k1_waveout -{ - u32 send_routing[3]; - // audigy only: - u32 send_routing2[3]; - - u32 send_dcba[3]; - // audigy only: - u32 send_hgfe[3]; -}; -#define ROUTE_PCM 0 -#define ROUTE_PT 1 -#define ROUTE_PCM1 2 - -#define SEND_MONO 0 -#define SEND_LEFT 1 -#define SEND_RIGHT 2 - -struct emu10k1_wavein -{ - struct wiinst *ac97; - struct wiinst *mic; - struct wiinst *fx; - - u8 recsrc; - u32 fxwc; -}; - -#define CMD_READ 1 -#define CMD_WRITE 2 - -struct mixer_private_ioctl { - u32 cmd; - u32 val[90]; -}; - -/* bogus ioctls numbers to escape from OSS mixer limitations */ -#define CMD_WRITEFN0 _IOW('D', 0, struct mixer_private_ioctl) -#define CMD_READFN0 _IOR('D', 1, struct mixer_private_ioctl) -#define CMD_WRITEPTR _IOW('D', 2, struct mixer_private_ioctl) -#define CMD_READPTR _IOR('D', 3, struct mixer_private_ioctl) -#define CMD_SETRECSRC _IOW('D', 4, struct mixer_private_ioctl) -#define CMD_GETRECSRC _IOR('D', 5, struct mixer_private_ioctl) -#define CMD_GETVOICEPARAM _IOR('D', 6, struct mixer_private_ioctl) -#define CMD_SETVOICEPARAM _IOW('D', 7, struct mixer_private_ioctl) -#define CMD_GETPATCH _IOR('D', 8, struct mixer_private_ioctl) -#define CMD_GETGPR _IOR('D', 9, struct mixer_private_ioctl) -#define CMD_GETCTLGPR _IOR('D', 10, struct mixer_private_ioctl) -#define CMD_SETPATCH _IOW('D', 11, struct mixer_private_ioctl) -#define CMD_SETGPR _IOW('D', 12, struct mixer_private_ioctl) -#define CMD_SETCTLGPR _IOW('D', 13, struct mixer_private_ioctl) -#define CMD_SETGPOUT _IOW('D', 14, struct mixer_private_ioctl) -#define CMD_GETGPR2OSS _IOR('D', 15, struct mixer_private_ioctl) -#define CMD_SETGPR2OSS _IOW('D', 16, struct mixer_private_ioctl) -#define CMD_SETMCH_FX _IOW('D', 17, struct mixer_private_ioctl) -#define CMD_SETPASSTHROUGH _IOW('D', 18, struct mixer_private_ioctl) -#define CMD_PRIVATE3_VERSION _IOW('D', 19, struct mixer_private_ioctl) -#define CMD_AC97_BOOST _IOW('D', 20, struct mixer_private_ioctl) - -//up this number when breaking compatibility -#define PRIVATE3_VERSION 2 - -struct emu10k1_card -{ - struct list_head list; - - struct memhandle virtualpagetable; - struct memhandle tankmem; - struct memhandle silentpage; - - spinlock_t lock; - - u8 voicetable[NUM_G]; - u16 emupagetable[MAXPAGES]; - - struct list_head timers; - u16 timer_delay; - spinlock_t timer_lock; - - struct pci_dev *pci_dev; - unsigned long iobase; - unsigned long length; - unsigned short model; - unsigned int irq; - - int audio_dev; - int audio_dev1; - int midi_dev; -#ifdef EMU10K1_SEQUENCER - int seq_dev; - struct emu10k1_mididevice *seq_mididev; -#endif - - struct ac97_codec *ac97; - int ac97_supported_mixers; - int ac97_stereo_mixers; - - /* Number of first fx voice for multichannel output */ - u8 mchannel_fx; - struct emu10k1_waveout waveout; - struct emu10k1_wavein wavein; - struct emu10k1_mpuout *mpuout; - struct emu10k1_mpuin *mpuin; - - struct mutex open_sem; - mode_t open_mode; - wait_queue_head_t open_wait; - - u32 mpuacqcount; // Mpu acquire count - u32 has_toslink; // TOSLink detection - - u8 chiprev; /* Chip revision */ - u8 is_audigy; - u8 is_aps; - - struct patch_manager mgr; - struct pt_data pt; -}; - -int emu10k1_addxmgr_alloc(u32, struct emu10k1_card *); -void emu10k1_addxmgr_free(struct emu10k1_card *, int); - -int emu10k1_find_control_gpr(struct patch_manager *, const char *, const char *); -void emu10k1_set_control_gpr(struct emu10k1_card *, int , s32, int ); - -void emu10k1_set_volume_gpr(struct emu10k1_card *, int, s32, int); - - -#define VOL_6BIT 0x40 -#define VOL_5BIT 0x20 -#define VOL_4BIT 0x10 - -#define TIMEOUT 16384 - -u32 srToPitch(u32); - -extern struct list_head emu10k1_devs; - -/* Hardware Abstraction Layer access functions */ - -void emu10k1_writefn0(struct emu10k1_card *, u32, u32); -void emu10k1_writefn0_2(struct emu10k1_card *, u32, u32, int); -u32 emu10k1_readfn0(struct emu10k1_card *, u32); - -void emu10k1_timer_set(struct emu10k1_card *, u16); - -void sblive_writeptr(struct emu10k1_card *, u32, u32, u32); -void sblive_writeptr_tag(struct emu10k1_card *, u32, ...); -#define TAGLIST_END 0 - -u32 sblive_readptr(struct emu10k1_card *, u32 , u32 ); - -void emu10k1_irq_enable(struct emu10k1_card *, u32); -void emu10k1_irq_disable(struct emu10k1_card *, u32); -void emu10k1_clear_stop_on_loop(struct emu10k1_card *, u32); - -/* AC97 Codec register access function */ -u16 emu10k1_ac97_read(struct ac97_codec *, u8); -void emu10k1_ac97_write(struct ac97_codec *, u8, u16); - -/* MPU access function*/ -int emu10k1_mpu_write_data(struct emu10k1_card *, u8); -int emu10k1_mpu_read_data(struct emu10k1_card *, u8 *); -int emu10k1_mpu_reset(struct emu10k1_card *); -int emu10k1_mpu_acquire(struct emu10k1_card *); -int emu10k1_mpu_release(struct emu10k1_card *); - -#endif /* _HWACCESS_H */ diff --git a/sound/oss/emu10k1/icardmid.h b/sound/oss/emu10k1/icardmid.h deleted file mode 100644 index 6a6ef419401f..000000000000 --- a/sound/oss/emu10k1/icardmid.h +++ /dev/null @@ -1,163 +0,0 @@ -/* - ********************************************************************** - * isblive_mid.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _ICARDMIDI_H -#define _ICARDMIDI_H - -/* MIDI defines */ -#define MIDI_DATA_FIRST 0x00 -#define MIDI_DATA_LAST 0x7F -#define MIDI_STATUS_FIRST 0x80 -#define MIDI_STATUS_LAST 0xFF - -/* Channel status bytes */ -#define MIDI_STATUS_CHANNEL_FIRST 0x80 -#define MIDI_STATUS_CHANNEL_LAST 0xE0 -#define MIDI_STATUS_CHANNEL_MASK 0xF0 - -/* Channel voice messages */ -#define MIDI_VOICE_NOTE_OFF 0x80 -#define MIDI_VOICE_NOTE_ON 0x90 -#define MIDI_VOICE_POLY_PRESSURE 0xA0 -#define MIDI_VOICE_CONTROL_CHANGE 0xB0 -#define MIDI_VOICE_PROGRAM_CHANGE 0xC0 -#define MIDI_VOICE_CHANNEL_PRESSURE 0xD0 -#define MIDI_VOICE_PITCH_BEND 0xE0 - -/* Channel mode messages */ -#define MIDI_MODE_CHANNEL MIDI_VOICE_CONTROL_CHANGE - -/* System status bytes */ -#define MIDI_STATUS_SYSTEM_FIRST 0xF0 -#define MIDI_STATUS_SYSTEM_LAST 0xFF - -/* System exclusive messages */ -#define MIDI_SYSEX_BEGIN 0xF0 -#define MIDI_SYSEX_EOX 0xF7 - -/* System common messages */ -#define MIDI_COMMON_TCQF 0xF1 /* Time code quarter frame */ -#define MIDI_COMMON_SONG_POSITION 0xF2 -#define MIDI_COMMON_SONG_SELECT 0xF3 -#define MIDI_COMMON_UNDEFINED_F4 0xF4 -#define MIDI_COMMON_UNDEFINED_F5 0xF5 -#define MIDI_COMMON_TUNE_REQUEST 0xF6 - -/* System real-time messages */ -#define MIDI_RTIME_TIMING_CLOCK 0xF8 -#define MIDI_RTIME_UNDEFINED_F9 0xF9 -#define MIDI_RTIME_START 0xFA -#define MIDI_RTIME_CONTINUE 0xFB -#define MIDI_RTIME_STOP 0xFC -#define MIDI_RTIME_UNDEFINED_FD 0xFD -#define MIDI_RTIME_ACTIVE_SENSING 0xFE -#define MIDI_RTIME_SYSTEM_RESET 0xFF - -/* Flags for flags parm of midiOutCachePatches(), midiOutCacheDrumPatches() */ -#define MIDI_CACHE_ALL 1 -#define MIDI_CACHE_BESTFIT 2 -#define MIDI_CACHE_QUERY 3 -#define MIDI_UNCACHE 4 - -/* Event declarations for MPU IRQ Callbacks */ -#define ICARDMIDI_INLONGDATA 0x00000001 /* MIM_LONGDATA */ -#define ICARDMIDI_INLONGERROR 0x00000002 /* MIM_LONGERROR */ -#define ICARDMIDI_OUTLONGDATA 0x00000004 /* MOM_DONE for MPU OUT buffer */ -#define ICARDMIDI_INDATA 0x00000010 /* MIM_DATA */ -#define ICARDMIDI_INDATAERROR 0x00000020 /* MIM_ERROR */ - -/* Declaration for flags in CARDMIDIBUFFERHDR */ -/* Make it the same as MHDR_DONE, MHDR_INQUEUE in mmsystem.h */ -#define MIDIBUF_DONE 0x00000001 -#define MIDIBUF_INQUEUE 0x00000004 - -/* Declaration for msg parameter in midiCallbackFn */ -#define ICARDMIDI_OUTBUFFEROK 0x00000001 -#define ICARDMIDI_INMIDIOK 0x00000002 - -/* Declaration for technology in struct midi_caps */ -#define MT_MIDIPORT 0x00000001 /* In original MIDIOUTCAPS structure */ -#define MT_FMSYNTH 0x00000004 /* In original MIDIOUTCAPS structure */ -#define MT_AWESYNTH 0x00001000 -#define MT_PCISYNTH 0x00002000 -#define MT_PCISYNTH64 0x00004000 -#define CARDMIDI_AWEMASK 0x0000F000 - -enum LocalErrorCode -{ - CTSTATUS_NOTENABLED = 0x7000, - CTSTATUS_READY, - CTSTATUS_BUSY, - CTSTATUS_DATAAVAIL, - CTSTATUS_NODATA, - CTSTATUS_NEXT_BYTE -}; - -/* MIDI data block header */ -struct midi_hdr -{ - u8 *reserved; /* Pointer to original locked data block */ - u32 bufferlength; /* Length of data in data block */ - u32 bytesrecorded; /* Used for input only */ - u32 user; /* For client's use */ - u32 flags; /* Assorted flags (see defines) */ - struct list_head list; /* Reserved for driver */ - u8 *data; /* Second copy of first pointer */ -}; - -/* Enumeration for SetControl */ -enum -{ - MIDIOBJVOLUME = 0x1, - MIDIQUERYACTIVEINST -}; - -struct midi_queue -{ - struct midi_queue *next; - u32 qtype; /* 0 = short message, 1 = long data */ - u32 length; - u32 sizeLeft; - u8 *midibyte; - unsigned long refdata; -}; - -struct midi_openinfo -{ - u32 cbsize; - u32 flags; - unsigned long refdata; - u32 streamid; -}; - -int emu10k1_midi_callback(unsigned long , unsigned long, unsigned long *); - -#endif /* _ICARDMIDI_H */ diff --git a/sound/oss/emu10k1/icardwav.h b/sound/oss/emu10k1/icardwav.h deleted file mode 100644 index 25be40928b4d..000000000000 --- a/sound/oss/emu10k1/icardwav.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - ********************************************************************** - * icardwav.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _ICARDWAV_H -#define _ICARDWAV_H - -struct wave_format -{ - int id; - int samplingrate; - u8 bitsperchannel; - u8 channels; /* 1 = Mono, 2 = Stereo, 3, ... = Multichannel */ - u8 bytesperchannel; - u8 bytespervoicesample; - u8 bytespersample; - int bytespersec; - u8 passthrough; -}; - -/* emu10k1_wave states */ -#define WAVE_STATE_OPEN 0x01 -#define WAVE_STATE_STARTED 0x02 -#define WAVE_STATE_CLOSED 0x04 - -#endif /* _ICARDWAV_H */ diff --git a/sound/oss/emu10k1/irqmgr.c b/sound/oss/emu10k1/irqmgr.c deleted file mode 100644 index fb2ce638f01c..000000000000 --- a/sound/oss/emu10k1/irqmgr.c +++ /dev/null @@ -1,113 +0,0 @@ -/* - ********************************************************************** - * irqmgr.c - IRQ manager for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 "hwaccess.h" -#include "8010.h" -#include "cardmi.h" -#include "cardmo.h" -#include "irqmgr.h" - -/* Interrupt handler */ - -irqreturn_t emu10k1_interrupt(int irq, void *dev_id) -{ - struct emu10k1_card *card = (struct emu10k1_card *) dev_id; - u32 irqstatus, irqstatus_tmp; - int handled = 0; - - DPD(4, "emu10k1_interrupt called, irq = %u\n", irq); - - /* - ** NOTE : - ** We do a 'while loop' here cos on certain machines, with both - ** playback and recording going on at the same time, IRQs will - ** stop coming in after a while. Checking IPND indeed shows that - ** there are interrupts pending but the PIC says no IRQs pending. - ** I suspect that some boards need edge-triggered IRQs but are not - ** getting that condition if we don't completely clear the IPND - ** (make sure no more interrupts are pending). - ** - Eric - */ - - while ((irqstatus = inl(card->iobase + IPR))) { - DPD(4, "irq status %#x\n", irqstatus); - - irqstatus_tmp = irqstatus; - - if (irqstatus & IRQTYPE_TIMER) { - emu10k1_timer_irqhandler(card); - irqstatus &= ~IRQTYPE_TIMER; - } - - if (irqstatus & IRQTYPE_DSP) { - emu10k1_dsp_irqhandler(card); - irqstatus &= ~IRQTYPE_DSP; - } - - if (irqstatus & IRQTYPE_MPUIN) { - emu10k1_mpuin_irqhandler(card); - irqstatus &= ~IRQTYPE_MPUIN; - } - - if (irqstatus & IRQTYPE_MPUOUT) { - emu10k1_mpuout_irqhandler(card); - irqstatus &= ~IRQTYPE_MPUOUT; - } - - if (irqstatus & IPR_MUTE) { - emu10k1_mute_irqhandler(card); - irqstatus &=~IPR_MUTE; - } - - if (irqstatus & IPR_VOLINCR) { - emu10k1_volincr_irqhandler(card); - irqstatus &=~IPR_VOLINCR; - } - - if (irqstatus & IPR_VOLDECR) { - emu10k1_voldecr_irqhandler(card); - irqstatus &=~IPR_VOLDECR; - } - - if (irqstatus){ - printk(KERN_ERR "emu10k1: Warning, unhandled interrupt: %#08x\n", irqstatus); - //make sure any interrupts we don't handle are disabled: - emu10k1_irq_disable(card, ~(INTE_MIDIRXENABLE | INTE_MIDITXENABLE | INTE_INTERVALTIMERENB | - INTE_VOLDECRENABLE | INTE_VOLINCRENABLE | INTE_MUTEENABLE | - INTE_FXDSPENABLE)); - } - - /* acknowledge interrupt */ - outl(irqstatus_tmp, card->iobase + IPR); - handled = 1; - } - return IRQ_RETVAL(handled); -} diff --git a/sound/oss/emu10k1/irqmgr.h b/sound/oss/emu10k1/irqmgr.h deleted file mode 100644 index 7e7c9ca1098c..000000000000 --- a/sound/oss/emu10k1/irqmgr.h +++ /dev/null @@ -1,52 +0,0 @@ -/* - ********************************************************************** - * irq.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _IRQ_H -#define _IRQ_H - -/* EMU Irq Types */ -#define IRQTYPE_PCIBUSERROR IPR_PCIERROR -#define IRQTYPE_MIXERBUTTON (IPR_VOLINCR | IPR_VOLDECR | IPR_MUTE) -#define IRQTYPE_VOICE (IPR_CHANNELLOOP | IPR_CHANNELNUMBERMASK) -#define IRQTYPE_RECORD (IPR_ADCBUFFULL | IPR_ADCBUFHALFFULL | IPR_MICBUFFULL | IPR_MICBUFHALFFULL | IPR_EFXBUFFULL | IPR_EFXBUFHALFFULL) -#define IRQTYPE_MPUOUT (IPR_MIDITRANSBUFEMPTY | A_IPR_MIDITRANSBUFEMPTY2) -#define IRQTYPE_MPUIN (IPR_MIDIRECVBUFEMPTY | A_IPR_MIDIRECVBUFEMPTY2) -#define IRQTYPE_TIMER IPR_INTERVALTIMER -#define IRQTYPE_SPDIF (IPR_GPSPDIFSTATUSCHANGE | IPR_CDROMSTATUSCHANGE) -#define IRQTYPE_DSP IPR_FXDSP - -void emu10k1_timer_irqhandler(struct emu10k1_card *); -void emu10k1_dsp_irqhandler(struct emu10k1_card *); -void emu10k1_mute_irqhandler(struct emu10k1_card *); -void emu10k1_volincr_irqhandler(struct emu10k1_card *); -void emu10k1_voldecr_irqhandler(struct emu10k1_card *); - -#endif /* _IRQ_H */ diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c deleted file mode 100644 index 5058411b7524..000000000000 --- a/sound/oss/emu10k1/main.c +++ /dev/null @@ -1,1471 +0,0 @@ - /* - ********************************************************************** - * main.c - Creative EMU10K1 audio driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox cleaned up stuff - * - ********************************************************************** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, - * USA. - * - ********************************************************************** - * - * Supported devices: - * /dev/dsp: Standard /dev/dsp device, OSS-compatible - * /dev/dsp1: Routes to rear speakers only - * /dev/mixer: Standard /dev/mixer device, OSS-compatible - * /dev/midi: Raw MIDI UART device, mostly OSS-compatible - * /dev/sequencer: Sequencer Interface (requires sound.o) - * - * Revision history: - * 0.1 beta Initial release - * 0.2 Lowered initial mixer vol. Improved on stuttering wave playback. Added MIDI UART support. - * 0.3 Fixed mixer routing bug, added APS, joystick support. - * 0.4 Added rear-channel, SPDIF support. - * 0.5 Source cleanup, SMP fixes, multiopen support, 64 bit arch fixes, - * moved bh's to tasklets, moved to the new PCI driver initialization style. - * 0.6 Make use of pci_alloc_consistent, improve compatibility layer for 2.2 kernels, - * code reorganization and cleanup. - * 0.7 Support for the Emu-APS. Bug fixes for voice cache setup, mmaped sound + poll(). - * Support for setting external TRAM size. - * 0.8 Make use of the kernel ac97 interface. Support for a dsp patch manager. - * 0.9 Re-enables rear speakers volume controls - * 0.10 Initializes rear speaker volume. - * Dynamic patch storage allocation. - * New private ioctls to change control gpr values. - * Enable volume control interrupts. - * By default enable dsp routes to digital out. - * 0.11 Fixed fx / 4 problem. - * 0.12 Implemented mmaped for recording. - * Fixed bug: not unreserving mmaped buffer pages. - * IRQ handler cleanup. - * 0.13 Fixed problem with dsp1 - * Simplified dsp patch writing (inside the driver) - * Fixed several bugs found by the Stanford tools - * 0.14 New control gpr to oss mixer mapping feature (Chris Purnell) - * Added AC3 Passthrough Support (Juha Yrjola) - * Added Support for 5.1 cards (digital out and the third analog out) - * 0.15 Added Sequencer Support (Daniel Mack) - * Support for multichannel pcm playback (Eduard Hasenleithner) - * 0.16 Mixer improvements, added old treble/bass support (Daniel Bertrand) - * Small code format cleanup. - * Deadlock bug fix for emu10k1_volxxx_irqhandler(). - * 0.17 Fix for mixer SOUND_MIXER_INFO ioctl. - * Fix for HIGHMEM machines (emu10k1 can only do 31 bit bus master) - * midi poll initial implementation. - * Small mixer fixes/cleanups. - * Improved support for 5.1 cards. - * 0.18 Fix for possible leak in pci_alloc_consistent() - * Cleaned up poll() functions (audio and midi). Don't start input. - * Restrict DMA pages used to 512Mib range. - * New AC97_BOOST mixer ioctl. - * 0.19a Added Support for Audigy Cards - * Real fix for kernel with highmem support (cast dma_handle to u32). - * Fix recording buffering parameters calculation. - * Use unsigned long for variables in bit ops. - * 0.20a Fixed recording startup - * Fixed timer rate setting (it's a 16-bit register) - * 0.21 Converted code to use pci_name() instead of accessing slot_name - * directly (Eugene Teo) - *********************************************************************/ - -/* These are only included once per module */ -#include -#include -#include -#include -#include -#include - -#include "hwaccess.h" -#include "8010.h" -#include "efxmgr.h" -#include "cardwo.h" -#include "cardwi.h" -#include "cardmo.h" -#include "cardmi.h" -#include "recmgr.h" -#include "ecard.h" - - -#ifdef EMU10K1_SEQUENCER -#define MIDI_SYNTH_NAME "EMU10K1 MIDI" -#define MIDI_SYNTH_CAPS SYNTH_CAP_INPUT - -#include "../sound_config.h" -#include "../midi_synth.h" - -/* this should be in dev_table.h */ -#define SNDCARD_EMU10K1 46 -#endif - - -/* the emu10k1 _seems_ to only supports 29 bit (512MiB) bit bus master */ -#define EMU10K1_DMA_MASK DMA_29BIT_MASK /* DMA buffer mask for pci_alloc_consist */ - -#ifndef PCI_VENDOR_ID_CREATIVE -#define PCI_VENDOR_ID_CREATIVE 0x1102 -#endif - -#ifndef PCI_DEVICE_ID_CREATIVE_EMU10K1 -#define PCI_DEVICE_ID_CREATIVE_EMU10K1 0x0002 -#endif -#ifndef PCI_DEVICE_ID_CREATIVE_AUDIGY -#define PCI_DEVICE_ID_CREATIVE_AUDIGY 0x0004 -#endif - -#define EMU_APS_SUBID 0x40011102 - -enum { - EMU10K1 = 0, - AUDIGY, -}; - -static char *card_names[] __devinitdata = { - "EMU10K1", - "Audigy", -}; - -static struct pci_device_id emu10k1_pci_tbl[] = { - {PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_EMU10K1, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, EMU10K1}, - {PCI_VENDOR_ID_CREATIVE, PCI_DEVICE_ID_CREATIVE_AUDIGY, - PCI_ANY_ID, PCI_ANY_ID, 0, 0, AUDIGY}, - {0,} -}; - -MODULE_DEVICE_TABLE(pci, emu10k1_pci_tbl); - -/* Global var instantiation */ - -LIST_HEAD(emu10k1_devs); - -extern struct file_operations emu10k1_audio_fops; -extern struct file_operations emu10k1_mixer_fops; -extern struct file_operations emu10k1_midi_fops; - -#ifdef EMU10K1_SEQUENCER -static struct midi_operations emu10k1_midi_operations; -#endif - -extern irqreturn_t emu10k1_interrupt(int, void *); - -static int __devinit emu10k1_audio_init(struct emu10k1_card *card) -{ - /* Assign default playback voice parameters */ - if (card->is_audigy) - card->mchannel_fx = 0; - else - card->mchannel_fx = 8; - - - if (card->is_audigy) { - /* mono voice */ - card->waveout.send_dcba[SEND_MONO] = 0xffffffff; - card->waveout.send_hgfe[SEND_MONO] = 0x0000ffff; - - /* stereo voice */ - /* left */ - card->waveout.send_dcba[SEND_LEFT] = 0x00ff00ff; - card->waveout.send_hgfe[SEND_LEFT] = 0x00007f7f; - /* right */ - card->waveout.send_dcba[SEND_RIGHT] = 0xff00ff00; - card->waveout.send_hgfe[SEND_RIGHT] = 0x00007f7f; - - card->waveout.send_routing[ROUTE_PCM] = 0x03020100; // Regular pcm - card->waveout.send_routing2[ROUTE_PCM] = 0x07060504; - - card->waveout.send_routing[ROUTE_PT] = 0x3f3f3d3c; // Passthrough - card->waveout.send_routing2[ROUTE_PT] = 0x3f3f3f3f; - - card->waveout.send_routing[ROUTE_PCM1] = 0x03020100; // Spare - card->waveout.send_routing2[ROUTE_PCM1] = 0x07060404; - - } else { - /* mono voice */ - card->waveout.send_dcba[SEND_MONO] = 0x0000ffff; - - /* stereo voice */ - /* left */ - card->waveout.send_dcba[SEND_LEFT] = 0x000000ff; - /* right */ - card->waveout.send_dcba[SEND_RIGHT] = 0x0000ff00; - - card->waveout.send_routing[ROUTE_PCM] = 0x3210; // pcm - card->waveout.send_routing[ROUTE_PT] = 0x3210; // passthrough - card->waveout.send_routing[ROUTE_PCM1] = 0x7654; // /dev/dsp1 - } - - /* Assign default recording parameters */ - /* FIXME */ - if (card->is_aps) - card->wavein.recsrc = WAVERECORD_FX; - else - card->wavein.recsrc = WAVERECORD_AC97; - - card->wavein.fxwc = 0x0003; - return 0; -} - -static void emu10k1_audio_cleanup(struct emu10k1_card *card) -{ -} - -static int __devinit emu10k1_register_devices(struct emu10k1_card *card) -{ - card->audio_dev = register_sound_dsp(&emu10k1_audio_fops, -1); - if (card->audio_dev < 0) { - printk(KERN_ERR "emu10k1: cannot register first audio device!\n"); - goto err_dev; - } - - card->audio_dev1 = register_sound_dsp(&emu10k1_audio_fops, -1); - if (card->audio_dev1 < 0) { - printk(KERN_ERR "emu10k1: cannot register second audio device!\n"); - goto err_dev1; - } - - card->ac97->dev_mixer = register_sound_mixer(&emu10k1_mixer_fops, -1); - if (card->ac97->dev_mixer < 0) { - printk(KERN_ERR "emu10k1: cannot register mixer device\n"); - goto err_mixer; - } - - card->midi_dev = register_sound_midi(&emu10k1_midi_fops, -1); - if (card->midi_dev < 0) { - printk(KERN_ERR "emu10k1: cannot register midi device!\n"); - goto err_midi; - } - -#ifdef EMU10K1_SEQUENCER - card->seq_dev = sound_alloc_mididev(); - if (card->seq_dev == -1) - printk(KERN_WARNING "emu10k1: unable to register sequencer device!"); - else { - std_midi_synth.midi_dev = card->seq_dev; - midi_devs[card->seq_dev] = - (struct midi_operations *) - kmalloc(sizeof(struct midi_operations), GFP_KERNEL); - - if (midi_devs[card->seq_dev] == NULL) { - printk(KERN_ERR "emu10k1: unable to allocate memory!"); - sound_unload_mididev(card->seq_dev); - card->seq_dev = -1; - /* return without error */ - } else { - memcpy((char *)midi_devs[card->seq_dev], - (char *)&emu10k1_midi_operations, - sizeof(struct midi_operations)); - midi_devs[card->seq_dev]->devc = card; - sequencer_init(); - card->seq_mididev = NULL; - } - } -#endif - return 0; - -err_midi: - unregister_sound_mixer(card->ac97->dev_mixer); -err_mixer: - unregister_sound_dsp(card->audio_dev); -err_dev1: - unregister_sound_dsp(card->audio_dev); -err_dev: - return -ENODEV; -} - -static void emu10k1_unregister_devices(struct emu10k1_card *card) -{ -#ifdef EMU10K1_SEQUENCER - if (card->seq_dev > -1) { - kfree(midi_devs[card->seq_dev]); - midi_devs[card->seq_dev] = NULL; - sound_unload_mididev(card->seq_dev); - card->seq_dev = -1; - } -#endif - - unregister_sound_midi(card->midi_dev); - unregister_sound_mixer(card->ac97->dev_mixer); - unregister_sound_dsp(card->audio_dev1); - unregister_sound_dsp(card->audio_dev); -} - -static int emu10k1_info_proc (char *page, char **start, off_t off, - int count, int *eof, void *data) -{ - struct emu10k1_card *card = data; - int len = 0; - - if (card == NULL) - return -ENODEV; - - len += sprintf (page + len, "Driver Version : %s\n", DRIVER_VERSION); - len += sprintf (page + len, "Card type : %s\n", card->is_aps ? "Aps" : (card->is_audigy ? "Audigy" : "Emu10k1")); - len += sprintf (page + len, "Revision : %d\n", card->chiprev); - len += sprintf (page + len, "Model : %#06x\n", card->model); - len += sprintf (page + len, "IO : %#06lx-%#06lx\n", card->iobase, card->iobase + card->length - 1); - len += sprintf (page + len, "IRQ : %d\n\n", card->irq); - - len += sprintf (page + len, "Registered /dev Entries:\n"); - len += sprintf (page + len, "/dev/dsp%d\n", card->audio_dev / 16); - len += sprintf (page + len, "/dev/dsp%d\n", card->audio_dev1 / 16); - len += sprintf (page + len, "/dev/mixer%d\n", card->ac97->dev_mixer / 16); - len += sprintf (page + len, "/dev/midi%d\n", card->midi_dev / 16); - -#ifdef EMU10K1_SEQUENCER - len += sprintf (page + len, "/dev/sequencer\n"); -#endif - - return len; -} - -static int __devinit emu10k1_proc_init(struct emu10k1_card *card) -{ - char s[48]; - - if (!proc_mkdir ("driver/emu10k1", NULL)) { - printk(KERN_ERR "emu10k1: unable to create proc directory driver/emu10k1\n"); - goto err_out; - } - - sprintf(s, "driver/emu10k1/%s", pci_name(card->pci_dev)); - if (!proc_mkdir (s, NULL)) { - printk(KERN_ERR "emu10k1: unable to create proc directory %s\n", s); - goto err_emu10k1_proc; - } - - sprintf(s, "driver/emu10k1/%s/info", pci_name(card->pci_dev)); - if (!create_proc_read_entry (s, 0, NULL, emu10k1_info_proc, card)) { - printk(KERN_ERR "emu10k1: unable to create proc entry %s\n", s); - goto err_dev_proc; - } - - if (!card->is_aps) { - sprintf(s, "driver/emu10k1/%s/ac97", pci_name(card->pci_dev)); - if (!create_proc_read_entry (s, 0, NULL, ac97_read_proc, card->ac97)) { - printk(KERN_ERR "emu10k1: unable to create proc entry %s\n", s); - goto err_proc_ac97; - } - } - - return 0; - -err_proc_ac97: - sprintf(s, "driver/emu10k1/%s/info", pci_name(card->pci_dev)); - remove_proc_entry(s, NULL); - -err_dev_proc: - sprintf(s, "driver/emu10k1/%s", pci_name(card->pci_dev)); - remove_proc_entry(s, NULL); - -err_emu10k1_proc: - remove_proc_entry("driver/emu10k1", NULL); - -err_out: - return -EIO; -} - -static void emu10k1_proc_cleanup(struct emu10k1_card *card) -{ - char s[48]; - - if (!card->is_aps) { - sprintf(s, "driver/emu10k1/%s/ac97", pci_name(card->pci_dev)); - remove_proc_entry(s, NULL); - } - - sprintf(s, "driver/emu10k1/%s/info", pci_name(card->pci_dev)); - remove_proc_entry(s, NULL); - - sprintf(s, "driver/emu10k1/%s", pci_name(card->pci_dev)); - remove_proc_entry(s, NULL); - - remove_proc_entry("driver/emu10k1", NULL); -} - -static int __devinit emu10k1_mixer_init(struct emu10k1_card *card) -{ - struct ac97_codec *codec = ac97_alloc_codec(); - - if(codec == NULL) - { - printk(KERN_ERR "emu10k1: cannot allocate mixer\n"); - return -EIO; - } - card->ac97 = codec; - card->ac97->private_data = card; - - if (!card->is_aps) { - card->ac97->id = 0; - card->ac97->codec_read = emu10k1_ac97_read; - card->ac97->codec_write = emu10k1_ac97_write; - - if (ac97_probe_codec (card->ac97) == 0) { - printk(KERN_ERR "emu10k1: unable to probe AC97 codec\n"); - goto err_out; - } - /* 5.1: Enable the additional AC97 Slots and unmute extra channels on AC97 codec */ - if (codec->codec_read(codec, AC97_EXTENDED_ID) & 0x0080){ - printk(KERN_INFO "emu10k1: SBLive! 5.1 card detected\n"); - sblive_writeptr(card, AC97SLOT, 0, AC97SLOT_CNTR | AC97SLOT_LFE); - codec->codec_write(codec, AC97_SURROUND_MASTER, 0x0); - } - - // Force 5bit: - //card->ac97->bit_resolution=5; - - /* these will store the original values and never be modified */ - card->ac97_supported_mixers = card->ac97->supported_mixers; - card->ac97_stereo_mixers = card->ac97->stereo_mixers; - } - - return 0; - - err_out: - ac97_release_codec(card->ac97); - return -EIO; -} - -static void emu10k1_mixer_cleanup(struct emu10k1_card *card) -{ - ac97_release_codec(card->ac97); -} - -static int __devinit emu10k1_midi_init(struct emu10k1_card *card) -{ - int ret; - - card->mpuout = kzalloc(sizeof(struct emu10k1_mpuout), GFP_KERNEL); - if (card->mpuout == NULL) { - printk(KERN_WARNING "emu10k1: Unable to allocate emu10k1_mpuout: out of memory\n"); - ret = -ENOMEM; - goto err_out1; - } - - card->mpuout->intr = 1; - card->mpuout->status = FLAGS_AVAILABLE; - card->mpuout->state = CARDMIDIOUT_STATE_DEFAULT; - - tasklet_init(&card->mpuout->tasklet, emu10k1_mpuout_bh, (unsigned long) card); - - spin_lock_init(&card->mpuout->lock); - - card->mpuin = kzalloc(sizeof(struct emu10k1_mpuin), GFP_KERNEL); - if (card->mpuin == NULL) { - printk(KERN_WARNING "emu10k1: Unable to allocate emu10k1_mpuin: out of memory\n"); - ret = -ENOMEM; - goto err_out2; - } - - card->mpuin->status = FLAGS_AVAILABLE; - - tasklet_init(&card->mpuin->tasklet, emu10k1_mpuin_bh, (unsigned long) card->mpuin); - - spin_lock_init(&card->mpuin->lock); - - /* Reset the MPU port */ - if (emu10k1_mpu_reset(card) < 0) { - ERROR(); - ret = -EIO; - goto err_out3; - } - - return 0; - -err_out3: - kfree(card->mpuin); -err_out2: - kfree(card->mpuout); -err_out1: - return ret; -} - -static void emu10k1_midi_cleanup(struct emu10k1_card *card) -{ - tasklet_kill(&card->mpuout->tasklet); - kfree(card->mpuout); - - tasklet_kill(&card->mpuin->tasklet); - kfree(card->mpuin); -} - -static void __devinit voice_init(struct emu10k1_card *card) -{ - int i; - - for (i = 0; i < NUM_G; i++) - card->voicetable[i] = VOICE_USAGE_FREE; -} - -static void __devinit timer_init(struct emu10k1_card *card) -{ - INIT_LIST_HEAD(&card->timers); - card->timer_delay = TIMER_STOPPED; - spin_lock_init(&card->timer_lock); -} - -static void __devinit addxmgr_init(struct emu10k1_card *card) -{ - u32 count; - - for (count = 0; count < MAXPAGES; count++) - card->emupagetable[count] = 0; - - /* Mark first page as used */ - /* This page is reserved by the driver */ - card->emupagetable[0] = 0x8001; - card->emupagetable[1] = MAXPAGES - 1; -} - -static void fx_cleanup(struct patch_manager *mgr) -{ - int i; - for(i = 0; i < mgr->current_pages; i++) - free_page((unsigned long) mgr->patch[i]); -} - -static int __devinit fx_init(struct emu10k1_card *card) -{ - struct patch_manager *mgr = &card->mgr; - struct dsp_patch *patch; - struct dsp_rpatch *rpatch; - s32 left, right; - int i; - u32 pc = 0; - u32 patch_n=0; - struct emu_efx_info_t emu_efx_info[2]= - {{ 20, 10, 0x400, 0x100, 0x20 }, - { 24, 12, 0x600, 0x400, 0x60 }, - }; - - - for (i = 0; i < SOUND_MIXER_NRDEVICES; i++) { - mgr->ctrl_gpr[i][0] = -1; - mgr->ctrl_gpr[i][1] = -1; - } - - - if (card->is_audigy) - mgr->current_pages = (2 + PATCHES_PER_PAGE - 1) / PATCHES_PER_PAGE; - else - /* !! The number below must equal the number of patches, currently 11 !! */ - mgr->current_pages = (11 + PATCHES_PER_PAGE - 1) / PATCHES_PER_PAGE; - - for (i = 0; i < mgr->current_pages; i++) { - mgr->patch[i] = (void *)__get_free_page(GFP_KERNEL); - if (mgr->patch[i] == NULL) { - mgr->current_pages = i; - fx_cleanup(mgr); - return -ENOMEM; - } - memset(mgr->patch[i], 0, PAGE_SIZE); - } - - if (card->is_audigy) { - for (i = 0; i < 1024; i++) - OP(0xf, 0x0c0, 0x0c0, 0x0cf, 0x0c0); - - for (i = 0; i < 512 ; i++) - sblive_writeptr(card, A_GPR_BASE+i,0,0); - - pc=0; - - //Pcm input volume - OP(0, 0x402, 0x0c0, 0x406, 0x000); - OP(0, 0x403, 0x0c0, 0x407, 0x001); - - //CD-Digital input Volume - OP(0, 0x404, 0x0c0, 0x40d, 0x42); - OP(0, 0x405, 0x0c0, 0x40f, 0x43); - - // CD + PCM - OP(6, 0x400, 0x0c0, 0x402, 0x404); - OP(6, 0x401, 0x0c0, 0x403, 0x405); - - // Front Output + Master Volume - OP(0, 0x68, 0x0c0, 0x408, 0x400); - OP(0, 0x69, 0x0c0, 0x409, 0x401); - - // Add-in analog inputs for other speakers - OP(6, 0x400, 0x40, 0x400, 0xc0); - OP(6, 0x401, 0x41, 0x401, 0xc0); - - // Digital Front + Master Volume - OP(0, 0x60, 0x0c0, 0x408, 0x400); - OP(0, 0x61, 0x0c0, 0x409, 0x401); - - // Rear Output + Rear Volume - OP(0, 0x06e, 0x0c0, 0x419, 0x400); - OP(0, 0x06f, 0x0c0, 0x41a, 0x401); - - // Digital Rear Output + Rear Volume - OP(0, 0x066, 0x0c0, 0x419, 0x400); - OP(0, 0x067, 0x0c0, 0x41a, 0x401); - - // Audigy Drive, Headphone out - OP(6, 0x64, 0x0c0, 0x0c0, 0x400); - OP(6, 0x65, 0x0c0, 0x0c0, 0x401); - - // ac97 Recording - OP(6, 0x76, 0x0c0, 0x0c0, 0x40); - OP(6, 0x77, 0x0c0, 0x0c0, 0x41); - - // Center = sub = Left/2 + Right/2 - OP(0xe, 0x400, 0x401, 0xcd, 0x400); - - // center/sub Volume (master) - OP(0, 0x06a, 0x0c0, 0x408, 0x400); - OP(0, 0x06b, 0x0c0, 0x409, 0x400); - - // Digital center/sub Volume (master) - OP(0, 0x062, 0x0c0, 0x408, 0x400); - OP(0, 0x063, 0x0c0, 0x409, 0x400); - - ROUTING_PATCH_START(rpatch, "Routing"); - ROUTING_PATCH_END(rpatch); - - /* delimiter patch */ - patch = PATCH(mgr, patch_n); - patch->code_size = 0; - - - sblive_writeptr(card, 0x53, 0, 0); - } else { - for (i = 0; i < 512 ; i++) - OP(6, 0x40, 0x40, 0x40, 0x40); - - for (i = 0; i < 256; i++) - sblive_writeptr_tag(card, 0, - FXGPREGBASE + i, 0, - TANKMEMADDRREGBASE + i, 0, - TAGLIST_END); - - - pc = 0; - - //first free GPR = 0x11b - - - /* FX volume correction and Volume control*/ - INPUT_PATCH_START(patch, "Pcm L vol", 0x0, 0); - GET_OUTPUT_GPR(patch, 0x100, 0x0); - GET_CONTROL_GPR(patch, 0x106, "Vol", 0, 0x7fffffff); - GET_DYNAMIC_GPR(patch, 0x112); - - OP(4, 0x112, 0x40, PCM_IN_L, 0x44); //*4 - OP(0, 0x100, 0x040, 0x112, 0x106); //*vol - INPUT_PATCH_END(patch); - - - INPUT_PATCH_START(patch, "Pcm R vol", 0x1, 0); - GET_OUTPUT_GPR(patch, 0x101, 0x1); - GET_CONTROL_GPR(patch, 0x107, "Vol", 0, 0x7fffffff); - GET_DYNAMIC_GPR(patch, 0x112); - - OP(4, 0x112, 0x40, PCM_IN_R, 0x44); - OP(0, 0x101, 0x040, 0x112, 0x107); - - INPUT_PATCH_END(patch); - - - // CD-Digital In Volume control - INPUT_PATCH_START(patch, "CD-Digital Vol L", 0x12, 0); - GET_OUTPUT_GPR(patch, 0x10c, 0x12); - GET_CONTROL_GPR(patch, 0x10d, "Vol", 0, 0x7fffffff); - - OP(0, 0x10c, 0x040, SPDIF_CD_L, 0x10d); - INPUT_PATCH_END(patch); - - INPUT_PATCH_START(patch, "CD-Digital Vol R", 0x13, 0); - GET_OUTPUT_GPR(patch, 0x10e, 0x13); - GET_CONTROL_GPR(patch, 0x10f, "Vol", 0, 0x7fffffff); - - OP(0, 0x10e, 0x040, SPDIF_CD_R, 0x10f); - INPUT_PATCH_END(patch); - - //Volume Correction for Multi-channel Inputs - INPUT_PATCH_START(patch, "Multi-Channel Gain", 0x08, 0); - patch->input=patch->output=0x3F00; - - GET_OUTPUT_GPR(patch, 0x113, MULTI_FRONT_L); - GET_OUTPUT_GPR(patch, 0x114, MULTI_FRONT_R); - GET_OUTPUT_GPR(patch, 0x115, MULTI_REAR_L); - GET_OUTPUT_GPR(patch, 0x116, MULTI_REAR_R); - GET_OUTPUT_GPR(patch, 0x117, MULTI_CENTER); - GET_OUTPUT_GPR(patch, 0x118, MULTI_LFE); - - OP(4, 0x113, 0x40, MULTI_FRONT_L, 0x44); - OP(4, 0x114, 0x40, MULTI_FRONT_R, 0x44); - OP(4, 0x115, 0x40, MULTI_REAR_L, 0x44); - OP(4, 0x116, 0x40, MULTI_REAR_R, 0x44); - OP(4, 0x117, 0x40, MULTI_CENTER, 0x44); - OP(4, 0x118, 0x40, MULTI_LFE, 0x44); - - INPUT_PATCH_END(patch); - - - //Routing patch start - ROUTING_PATCH_START(rpatch, "Routing"); - GET_INPUT_GPR(rpatch, 0x100, 0x0); - GET_INPUT_GPR(rpatch, 0x101, 0x1); - GET_INPUT_GPR(rpatch, 0x10c, 0x12); - GET_INPUT_GPR(rpatch, 0x10e, 0x13); - GET_INPUT_GPR(rpatch, 0x113, MULTI_FRONT_L); - GET_INPUT_GPR(rpatch, 0x114, MULTI_FRONT_R); - GET_INPUT_GPR(rpatch, 0x115, MULTI_REAR_L); - GET_INPUT_GPR(rpatch, 0x116, MULTI_REAR_R); - GET_INPUT_GPR(rpatch, 0x117, MULTI_CENTER); - GET_INPUT_GPR(rpatch, 0x118, MULTI_LFE); - - GET_DYNAMIC_GPR(rpatch, 0x102); - GET_DYNAMIC_GPR(rpatch, 0x103); - - GET_OUTPUT_GPR(rpatch, 0x104, 0x8); - GET_OUTPUT_GPR(rpatch, 0x105, 0x9); - GET_OUTPUT_GPR(rpatch, 0x10a, 0x2); - GET_OUTPUT_GPR(rpatch, 0x10b, 0x3); - - - /* input buffer */ - OP(6, 0x102, AC97_IN_L, 0x40, 0x40); - OP(6, 0x103, AC97_IN_R, 0x40, 0x40); - - - /* Digital In + PCM + MULTI_FRONT-> AC97 out (front speakers)*/ - OP(6, AC97_FRONT_L, 0x100, 0x10c, 0x113); - - CONNECT(MULTI_FRONT_L, AC97_FRONT_L); - CONNECT(PCM_IN_L, AC97_FRONT_L); - CONNECT(SPDIF_CD_L, AC97_FRONT_L); - - OP(6, AC97_FRONT_R, 0x101, 0x10e, 0x114); - - CONNECT(MULTI_FRONT_R, AC97_FRONT_R); - CONNECT(PCM_IN_R, AC97_FRONT_R); - CONNECT(SPDIF_CD_R, AC97_FRONT_R); - - /* Digital In + PCM + AC97 In + PCM1 + MULTI_REAR --> Rear Channel */ - OP(6, 0x104, PCM1_IN_L, 0x100, 0x115); - OP(6, 0x104, 0x104, 0x10c, 0x102); - - CONNECT(MULTI_REAR_L, ANALOG_REAR_L); - CONNECT(AC97_IN_L, ANALOG_REAR_L); - CONNECT(PCM_IN_L, ANALOG_REAR_L); - CONNECT(SPDIF_CD_L, ANALOG_REAR_L); - CONNECT(PCM1_IN_L, ANALOG_REAR_L); - - OP(6, 0x105, PCM1_IN_R, 0x101, 0x116); - OP(6, 0x105, 0x105, 0x10e, 0x103); - - CONNECT(MULTI_REAR_R, ANALOG_REAR_R); - CONNECT(AC97_IN_R, ANALOG_REAR_R); - CONNECT(PCM_IN_R, ANALOG_REAR_R); - CONNECT(SPDIF_CD_R, ANALOG_REAR_R); - CONNECT(PCM1_IN_R, ANALOG_REAR_R); - - /* Digital In + PCM + AC97 In + MULTI_FRONT --> Digital out */ - OP(6, 0x10b, 0x100, 0x102, 0x10c); - OP(6, 0x10b, 0x10b, 0x113, 0x40); - - CONNECT(MULTI_FRONT_L, DIGITAL_OUT_L); - CONNECT(PCM_IN_L, DIGITAL_OUT_L); - CONNECT(AC97_IN_L, DIGITAL_OUT_L); - CONNECT(SPDIF_CD_L, DIGITAL_OUT_L); - - OP(6, 0x10a, 0x101, 0x103, 0x10e); - OP(6, 0x10b, 0x10b, 0x114, 0x40); - - CONNECT(MULTI_FRONT_R, DIGITAL_OUT_R); - CONNECT(PCM_IN_R, DIGITAL_OUT_R); - CONNECT(AC97_IN_R, DIGITAL_OUT_R); - CONNECT(SPDIF_CD_R, DIGITAL_OUT_R); - - /* AC97 In --> ADC Recording Buffer */ - OP(6, ADC_REC_L, 0x102, 0x40, 0x40); - - CONNECT(AC97_IN_L, ADC_REC_L); - - OP(6, ADC_REC_R, 0x103, 0x40, 0x40); - - CONNECT(AC97_IN_R, ADC_REC_R); - - - /* fx12:Analog-Center */ - OP(6, ANALOG_CENTER, 0x117, 0x40, 0x40); - CONNECT(MULTI_CENTER, ANALOG_CENTER); - - /* fx11:Analog-LFE */ - OP(6, ANALOG_LFE, 0x118, 0x40, 0x40); - CONNECT(MULTI_LFE, ANALOG_LFE); - - /* fx12:Digital-Center */ - OP(6, DIGITAL_CENTER, 0x117, 0x40, 0x40); - CONNECT(MULTI_CENTER, DIGITAL_CENTER); - - /* fx11:Analog-LFE */ - OP(6, DIGITAL_LFE, 0x118, 0x40, 0x40); - CONNECT(MULTI_LFE, DIGITAL_LFE); - - ROUTING_PATCH_END(rpatch); - - - // Rear volume control - OUTPUT_PATCH_START(patch, "Vol Rear L", 0x8, 0); - GET_INPUT_GPR(patch, 0x104, 0x8); - GET_CONTROL_GPR(patch, 0x119, "Vol", 0, 0x7fffffff); - - OP(0, ANALOG_REAR_L, 0x040, 0x104, 0x119); - OUTPUT_PATCH_END(patch); - - OUTPUT_PATCH_START(patch, "Vol Rear R", 0x9, 0); - GET_INPUT_GPR(patch, 0x105, 0x9); - GET_CONTROL_GPR(patch, 0x11a, "Vol", 0, 0x7fffffff); - - OP(0, ANALOG_REAR_R, 0x040, 0x105, 0x11a); - OUTPUT_PATCH_END(patch); - - - //Master volume control on front-digital - OUTPUT_PATCH_START(patch, "Vol Master L", 0x2, 1); - GET_INPUT_GPR(patch, 0x10a, 0x2); - GET_CONTROL_GPR(patch, 0x108, "Vol", 0, 0x7fffffff); - - OP(0, DIGITAL_OUT_L, 0x040, 0x10a, 0x108); - OUTPUT_PATCH_END(patch); - - - OUTPUT_PATCH_START(patch, "Vol Master R", 0x3, 1); - GET_INPUT_GPR(patch, 0x10b, 0x3); - GET_CONTROL_GPR(patch, 0x109, "Vol", 0, 0x7fffffff); - - OP(0, DIGITAL_OUT_R, 0x040, 0x10b, 0x109); - OUTPUT_PATCH_END(patch); - - - /* delimiter patch */ - patch = PATCH(mgr, patch_n); - patch->code_size = 0; - - - sblive_writeptr(card, DBG, 0, 0); - } - - spin_lock_init(&mgr->lock); - - // Set up Volume controls, try to keep this the same for both Audigy and Live - - //Master volume - mgr->ctrl_gpr[SOUND_MIXER_VOLUME][0] = 8; - mgr->ctrl_gpr[SOUND_MIXER_VOLUME][1] = 9; - - left = card->ac97->mixer_state[SOUND_MIXER_VOLUME] & 0xff; - right = (card->ac97->mixer_state[SOUND_MIXER_VOLUME] >> 8) & 0xff; - - emu10k1_set_volume_gpr(card, 8, left, 1 << card->ac97->bit_resolution); - emu10k1_set_volume_gpr(card, 9, right, 1 << card->ac97->bit_resolution); - - //Rear volume - mgr->ctrl_gpr[ SOUND_MIXER_OGAIN ][0] = 0x19; - mgr->ctrl_gpr[ SOUND_MIXER_OGAIN ][1] = 0x1a; - - left = right = 67; - card->ac97->mixer_state[SOUND_MIXER_OGAIN] = (right << 8) | left; - - card->ac97->supported_mixers |= SOUND_MASK_OGAIN; - card->ac97->stereo_mixers |= SOUND_MASK_OGAIN; - - emu10k1_set_volume_gpr(card, 0x19, left, VOL_5BIT); - emu10k1_set_volume_gpr(card, 0x1a, right, VOL_5BIT); - - //PCM Volume - mgr->ctrl_gpr[SOUND_MIXER_PCM][0] = 6; - mgr->ctrl_gpr[SOUND_MIXER_PCM][1] = 7; - - left = card->ac97->mixer_state[SOUND_MIXER_PCM] & 0xff; - right = (card->ac97->mixer_state[SOUND_MIXER_PCM] >> 8) & 0xff; - - emu10k1_set_volume_gpr(card, 6, left, VOL_5BIT); - emu10k1_set_volume_gpr(card, 7, right, VOL_5BIT); - - //CD-Digital Volume - mgr->ctrl_gpr[SOUND_MIXER_DIGITAL1][0] = 0xd; - mgr->ctrl_gpr[SOUND_MIXER_DIGITAL1][1] = 0xf; - - left = right = 67; - card->ac97->mixer_state[SOUND_MIXER_DIGITAL1] = (right << 8) | left; - - card->ac97->supported_mixers |= SOUND_MASK_DIGITAL1; - card->ac97->stereo_mixers |= SOUND_MASK_DIGITAL1; - - emu10k1_set_volume_gpr(card, 0xd, left, VOL_5BIT); - emu10k1_set_volume_gpr(card, 0xf, right, VOL_5BIT); - - - //hard wire the ac97's pcm, pcm volume is done above using dsp code. - if (card->is_audigy) - //for Audigy, we mute it and use the philips 6 channel DAC instead - emu10k1_ac97_write(card->ac97, 0x18, 0x8000); - else - //For the Live we hardwire it to full volume - emu10k1_ac97_write(card->ac97, 0x18, 0x0); - - //remove it from the ac97_codec's control - card->ac97_supported_mixers &= ~SOUND_MASK_PCM; - card->ac97_stereo_mixers &= ~SOUND_MASK_PCM; - - //set Igain to 0dB by default, maybe consider hardwiring it here. - emu10k1_ac97_write(card->ac97, AC97_RECORD_GAIN, 0x0000); - card->ac97->mixer_state[SOUND_MIXER_IGAIN] = 0x101; - - return 0; -} - -static int __devinit hw_init(struct emu10k1_card *card) -{ - int nCh; - u32 pagecount; /* tmp */ - int ret; - - /* Disable audio and lock cache */ - emu10k1_writefn0(card, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE); - - /* Reset recording buffers */ - sblive_writeptr_tag(card, 0, - MICBS, ADCBS_BUFSIZE_NONE, - MICBA, 0, - FXBS, ADCBS_BUFSIZE_NONE, - FXBA, 0, - ADCBS, ADCBS_BUFSIZE_NONE, - ADCBA, 0, - TAGLIST_END); - - /* Disable channel interrupt */ - emu10k1_writefn0(card, INTE, 0); - sblive_writeptr_tag(card, 0, - CLIEL, 0, - CLIEH, 0, - SOLEL, 0, - SOLEH, 0, - TAGLIST_END); - - if (card->is_audigy) { - sblive_writeptr_tag(card,0, - 0x5e,0xf00, - 0x5f,0x3, - TAGLIST_END); - } - - /* Init envelope engine */ - for (nCh = 0; nCh < NUM_G; nCh++) { - sblive_writeptr_tag(card, nCh, - DCYSUSV, 0, - IP, 0, - VTFT, 0xffff, - CVCF, 0xffff, - PTRX, 0, - //CPF, 0, - CCR, 0, - - PSST, 0, - DSL, 0x10, - CCCA, 0, - Z1, 0, - Z2, 0, - FXRT, 0xd01c0000, - - ATKHLDM, 0, - DCYSUSM, 0, - IFATN, 0xffff, - PEFE, 0, - FMMOD, 0, - TREMFRQ, 24, /* 1 Hz */ - FM2FRQ2, 24, /* 1 Hz */ - TEMPENV, 0, - - /*** These are last so OFF prevents writing ***/ - LFOVAL2, 0, - LFOVAL1, 0, - ATKHLDV, 0, - ENVVOL, 0, - ENVVAL, 0, - TAGLIST_END); - sblive_writeptr(card, CPF, nCh, 0); - /* - Audigy FXRT initialization - reversed eng'd, may not be accurate. - */ - if (card->is_audigy) { - sblive_writeptr_tag(card,nCh, - 0x4c,0x0, - 0x4d,0x0, - 0x4e,0x0, - 0x4f,0x0, - A_FXRT1, 0x3f3f3f3f, - A_FXRT2, 0x3f3f3f3f, - A_SENDAMOUNTS, 0, - TAGLIST_END); - } - } - - - /* - ** Init to 0x02109204 : - ** Clock accuracy = 0 (1000ppm) - ** Sample Rate = 2 (48kHz) - ** Audio Channel = 1 (Left of 2) - ** Source Number = 0 (Unspecified) - ** Generation Status = 1 (Original for Cat Code 12) - ** Cat Code = 12 (Digital Signal Mixer) - ** Mode = 0 (Mode 0) - ** Emphasis = 0 (None) - ** CP = 1 (Copyright unasserted) - ** AN = 0 (Digital audio) - ** P = 0 (Consumer) - */ - - sblive_writeptr_tag(card, 0, - - /* SPDIF0 */ - SPCS0, (SPCS_CLKACCY_1000PPM | 0x002000000 | - SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | 0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT), - - /* SPDIF1 */ - SPCS1, (SPCS_CLKACCY_1000PPM | 0x002000000 | - SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | 0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT), - - /* SPDIF2 & SPDIF3 */ - SPCS2, (SPCS_CLKACCY_1000PPM | 0x002000000 | - SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | 0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT), - - TAGLIST_END); - - if (card->is_audigy && (card->chiprev == 4)) { - /* Hacks for Alice3 to work independent of haP16V driver */ - u32 tmp; - - //Setup SRCMulti_I2S SamplingRate - tmp = sblive_readptr(card, A_SPDIF_SAMPLERATE, 0); - tmp &= 0xfffff1ff; - tmp |= (0x2<<9); - sblive_writeptr(card, A_SPDIF_SAMPLERATE, 0, tmp); - - /* Setup SRCSel (Enable Spdif,I2S SRCMulti) */ - emu10k1_writefn0(card, 0x20, 0x600000); - emu10k1_writefn0(card, 0x24, 0x14); - - /* Setup SRCMulti Input Audio Enable */ - emu10k1_writefn0(card, 0x20, 0x6E0000); - emu10k1_writefn0(card, 0x24, 0xFF00FF00); - } - - ret = fx_init(card); /* initialize effects engine */ - if (ret < 0) - return ret; - - card->tankmem.size = 0; - - card->virtualpagetable.size = MAXPAGES * sizeof(u32); - - card->virtualpagetable.addr = pci_alloc_consistent(card->pci_dev, card->virtualpagetable.size, &card->virtualpagetable.dma_handle); - if (card->virtualpagetable.addr == NULL) { - ERROR(); - ret = -ENOMEM; - goto err0; - } - - card->silentpage.size = EMUPAGESIZE; - - card->silentpage.addr = pci_alloc_consistent(card->pci_dev, card->silentpage.size, &card->silentpage.dma_handle); - if (card->silentpage.addr == NULL) { - ERROR(); - ret = -ENOMEM; - goto err1; - } - - for (pagecount = 0; pagecount < MAXPAGES; pagecount++) - ((u32 *) card->virtualpagetable.addr)[pagecount] = cpu_to_le32(((u32) card->silentpage.dma_handle * 2) | pagecount); - - /* Init page table & tank memory base register */ - sblive_writeptr_tag(card, 0, - PTB, (u32) card->virtualpagetable.dma_handle, - TCB, 0, - TCBS, 0, - TAGLIST_END); - - for (nCh = 0; nCh < NUM_G; nCh++) { - sblive_writeptr_tag(card, nCh, - MAPA, MAP_PTI_MASK | ((u32) card->silentpage.dma_handle * 2), - MAPB, MAP_PTI_MASK | ((u32) card->silentpage.dma_handle * 2), - TAGLIST_END); - } - - /* Hokay, now enable the AUD bit */ - /* Enable Audio = 1 */ - /* Mute Disable Audio = 0 */ - /* Lock Tank Memory = 1 */ - /* Lock Sound Memory = 0 */ - /* Auto Mute = 1 */ - if (card->is_audigy) { - if (card->chiprev == 4) - emu10k1_writefn0(card, HCFG, HCFG_AUDIOENABLE | HCFG_AC3ENABLE_CDSPDIF | HCFG_AC3ENABLE_GPSPDIF | HCFG_AUTOMUTE | HCFG_JOYENABLE); - else - emu10k1_writefn0(card, HCFG, HCFG_AUDIOENABLE | HCFG_AUTOMUTE | HCFG_JOYENABLE); - } else { - if (card->model == 0x20 || card->model == 0xc400 || - (card->model == 0x21 && card->chiprev < 6)) - emu10k1_writefn0(card, HCFG, HCFG_AUDIOENABLE | HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE); - else - emu10k1_writefn0(card, HCFG, HCFG_AUDIOENABLE | HCFG_LOCKTANKCACHE_MASK | HCFG_AUTOMUTE | HCFG_JOYENABLE); - } - /* Enable Vol_Ctrl irqs */ - emu10k1_irq_enable(card, INTE_VOLINCRENABLE | INTE_VOLDECRENABLE | INTE_MUTEENABLE | INTE_FXDSPENABLE); - - if (card->is_audigy && (card->chiprev == 4)) { - /* Unmute Analog now. Set GPO6 to 1 for Apollo. - * This has to be done after init ALice3 I2SOut beyond 48KHz. - * So, sequence is important. */ - u32 tmp = emu10k1_readfn0(card, A_IOCFG); - tmp |= 0x0040; - emu10k1_writefn0(card, A_IOCFG, tmp); - } - - /* FIXME: TOSLink detection */ - card->has_toslink = 0; - - /* Initialize digital passthrough variables */ - card->pt.pos_gpr = card->pt.intr_gpr = card->pt.enable_gpr = -1; - card->pt.selected = 0; - card->pt.state = PT_STATE_INACTIVE; - card->pt.spcs_to_use = 0x01; - card->pt.patch_name = "AC3pass"; - card->pt.intr_gpr_name = "count"; - card->pt.enable_gpr_name = "enable"; - card->pt.pos_gpr_name = "ptr"; - spin_lock_init(&card->pt.lock); - init_waitqueue_head(&card->pt.wait); - -/* tmp = sblive_readfn0(card, HCFG); - if (tmp & (HCFG_GPINPUT0 | HCFG_GPINPUT1)) { - sblive_writefn0(card, HCFG, tmp | 0x800); - - udelay(512); - - if (tmp != (sblive_readfn0(card, HCFG) & ~0x800)) { - card->has_toslink = 1; - sblive_writefn0(card, HCFG, tmp); - } - } -*/ - return 0; - - err1: - pci_free_consistent(card->pci_dev, card->virtualpagetable.size, card->virtualpagetable.addr, card->virtualpagetable.dma_handle); - err0: - fx_cleanup(&card->mgr); - - return ret; -} - -static int __devinit emu10k1_init(struct emu10k1_card *card) -{ - /* Init Card */ - if (hw_init(card) < 0) - return -1; - - voice_init(card); - timer_init(card); - addxmgr_init(card); - - DPD(2, " hw control register -> %#x\n", emu10k1_readfn0(card, HCFG)); - - return 0; -} - -static void emu10k1_cleanup(struct emu10k1_card *card) -{ - int ch; - - emu10k1_writefn0(card, INTE, 0); - - /** Shutdown the chip **/ - for (ch = 0; ch < NUM_G; ch++) - sblive_writeptr(card, DCYSUSV, ch, 0); - - for (ch = 0; ch < NUM_G; ch++) { - sblive_writeptr_tag(card, ch, - VTFT, 0, - CVCF, 0, - PTRX, 0, - //CPF, 0, - TAGLIST_END); - sblive_writeptr(card, CPF, ch, 0); - } - - /* Disable audio and lock cache */ - emu10k1_writefn0(card, HCFG, HCFG_LOCKSOUNDCACHE | HCFG_LOCKTANKCACHE_MASK | HCFG_MUTEBUTTONENABLE); - - sblive_writeptr_tag(card, 0, - PTB, 0, - - /* Reset recording buffers */ - MICBS, ADCBS_BUFSIZE_NONE, - MICBA, 0, - FXBS, ADCBS_BUFSIZE_NONE, - FXBA, 0, - FXWC, 0, - ADCBS, ADCBS_BUFSIZE_NONE, - ADCBA, 0, - TCBS, 0, - TCB, 0, - DBG, 0x8000, - - /* Disable channel interrupt */ - CLIEL, 0, - CLIEH, 0, - SOLEL, 0, - SOLEH, 0, - TAGLIST_END); - - if (card->is_audigy) - sblive_writeptr(card, 0, A_DBG, A_DBG_SINGLE_STEP); - - pci_free_consistent(card->pci_dev, card->virtualpagetable.size, card->virtualpagetable.addr, card->virtualpagetable.dma_handle); - pci_free_consistent(card->pci_dev, card->silentpage.size, card->silentpage.addr, card->silentpage.dma_handle); - - if(card->tankmem.size != 0) - pci_free_consistent(card->pci_dev, card->tankmem.size, card->tankmem.addr, card->tankmem.dma_handle); - - /* release patch storage memory */ - fx_cleanup(&card->mgr); -} - -/* Driver initialization routine */ -static int __devinit emu10k1_probe(struct pci_dev *pci_dev, const struct pci_device_id *pci_id) -{ - struct emu10k1_card *card; - u32 subsysvid; - int ret; - - if (pci_set_dma_mask(pci_dev, EMU10K1_DMA_MASK)) { - printk(KERN_ERR "emu10k1: architecture does not support 29bit PCI busmaster DMA\n"); - return -ENODEV; - } - - if (pci_enable_device(pci_dev)) - return -EIO; - - pci_set_master(pci_dev); - - if ((card = kzalloc(sizeof(struct emu10k1_card), GFP_KERNEL)) == NULL) { - printk(KERN_ERR "emu10k1: out of memory\n"); - return -ENOMEM; - } - - card->iobase = pci_resource_start(pci_dev, 0); - card->length = pci_resource_len(pci_dev, 0); - - if (request_region(card->iobase, card->length, card_names[pci_id->driver_data]) == NULL) { - printk(KERN_ERR "emu10k1: IO space in use\n"); - ret = -EBUSY; - goto err_region; - } - - pci_set_drvdata(pci_dev, card); - - card->irq = pci_dev->irq; - card->pci_dev = pci_dev; - - /* Reserve IRQ Line */ - if (request_irq(card->irq, emu10k1_interrupt, IRQF_SHARED, card_names[pci_id->driver_data], card)) { - printk(KERN_ERR "emu10k1: IRQ in use\n"); - ret = -EBUSY; - goto err_irq; - } - - card->chiprev = pci_dev->revision; - pci_read_config_word(pci_dev, PCI_SUBSYSTEM_ID, &card->model); - - printk(KERN_INFO "emu10k1: %s rev %d model %#04x found, IO at %#04lx-%#04lx, IRQ %d\n", - card_names[pci_id->driver_data], card->chiprev, card->model, card->iobase, - card->iobase + card->length - 1, card->irq); - - if (pci_id->device == PCI_DEVICE_ID_CREATIVE_AUDIGY) - card->is_audigy = 1; - - pci_read_config_dword(pci_dev, PCI_SUBSYSTEM_VENDOR_ID, &subsysvid); - card->is_aps = (subsysvid == EMU_APS_SUBID); - - spin_lock_init(&card->lock); - mutex_init(&card->open_sem); - card->open_mode = 0; - init_waitqueue_head(&card->open_wait); - - ret = emu10k1_audio_init(card); - if (ret < 0) { - printk(KERN_ERR "emu10k1: cannot initialize audio devices\n"); - goto err_audio; - } - - ret = emu10k1_mixer_init(card); - if (ret < 0) { - printk(KERN_ERR "emu10k1: cannot initialize AC97 codec\n"); - goto err_mixer; - } - - ret = emu10k1_midi_init(card); - if (ret < 0) { - printk(KERN_ERR "emu10k1: cannot register midi device\n"); - goto err_midi; - } - - ret = emu10k1_init(card); - if (ret < 0) { - printk(KERN_ERR "emu10k1: cannot initialize device\n"); - goto err_emu10k1_init; - } - - if (card->is_aps) - emu10k1_ecard_init(card); - - ret = emu10k1_register_devices(card); - if (ret < 0) - goto err_register; - - /* proc entries must be created after registering devices, as - * emu10k1_info_proc prints card->audio_dev &co. */ - ret = emu10k1_proc_init(card); - if (ret < 0) { - printk(KERN_ERR "emu10k1: cannot initialize proc directory\n"); - goto err_proc; - } - - list_add(&card->list, &emu10k1_devs); - - return 0; - -err_proc: - emu10k1_unregister_devices(card); - -err_register: - emu10k1_cleanup(card); - -err_emu10k1_init: - emu10k1_midi_cleanup(card); - -err_midi: - emu10k1_mixer_cleanup(card); - -err_mixer: - emu10k1_audio_cleanup(card); - -err_audio: - free_irq(card->irq, card); - -err_irq: - release_region(card->iobase, card->length); - pci_set_drvdata(pci_dev, NULL); - -err_region: - kfree(card); - - return ret; -} - -static void __devexit emu10k1_remove(struct pci_dev *pci_dev) -{ - struct emu10k1_card *card = pci_get_drvdata(pci_dev); - - list_del(&card->list); - - emu10k1_unregister_devices(card); - emu10k1_cleanup(card); - emu10k1_midi_cleanup(card); - emu10k1_mixer_cleanup(card); - emu10k1_proc_cleanup(card); - emu10k1_audio_cleanup(card); - free_irq(card->irq, card); - release_region(card->iobase, card->length); - kfree(card); - pci_set_drvdata(pci_dev, NULL); -} - -MODULE_AUTHOR("Bertrand Lee, Cai Ying. (Email to: emu10k1-devel@lists.sourceforge.net)"); -MODULE_DESCRIPTION("Creative EMU10K1 PCI Audio Driver v" DRIVER_VERSION "\nCopyright (C) 1999 Creative Technology Ltd."); -MODULE_LICENSE("GPL"); - -static struct pci_driver emu10k1_pci_driver = { - .name = "emu10k1", - .id_table = emu10k1_pci_tbl, - .probe = emu10k1_probe, - .remove = __devexit_p(emu10k1_remove), -}; - -static int __init emu10k1_init_module(void) -{ - printk(KERN_INFO "Creative EMU10K1 PCI Audio Driver, version " DRIVER_VERSION ", " __TIME__ " " __DATE__ "\n"); - - return pci_register_driver(&emu10k1_pci_driver); -} - -static void __exit emu10k1_cleanup_module(void) -{ - pci_unregister_driver(&emu10k1_pci_driver); - - return; -} - -module_init(emu10k1_init_module); -module_exit(emu10k1_cleanup_module); - -#ifdef EMU10K1_SEQUENCER - -/* in midi.c */ -extern int emu10k1_seq_midi_open(int dev, int mode, - void (*input)(int dev, unsigned char midi_byte), - void (*output)(int dev)); -extern void emu10k1_seq_midi_close(int dev); -extern int emu10k1_seq_midi_out(int dev, unsigned char midi_byte); -extern int emu10k1_seq_midi_start_read(int dev); -extern int emu10k1_seq_midi_end_read(int dev); -extern void emu10k1_seq_midi_kick(int dev); -extern int emu10k1_seq_midi_buffer_status(int dev); - -static struct midi_operations emu10k1_midi_operations = -{ - THIS_MODULE, - {"EMU10K1 MIDI", 0, 0, SNDCARD_EMU10K1}, - &std_midi_synth, - {0}, - emu10k1_seq_midi_open, - emu10k1_seq_midi_close, - NULL, - emu10k1_seq_midi_out, - emu10k1_seq_midi_start_read, - emu10k1_seq_midi_end_read, - emu10k1_seq_midi_kick, - NULL, - emu10k1_seq_midi_buffer_status, - NULL -}; - -#endif diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c deleted file mode 100644 index df1e990449a0..000000000000 --- a/sound/oss/emu10k1/midi.c +++ /dev/null @@ -1,614 +0,0 @@ -/* - ********************************************************************** - * midi.c - /dev/midi interface for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 -#include -#include -#include -#include -#include - -#include "hwaccess.h" -#include "cardmo.h" -#include "cardmi.h" -#include "midi.h" - -#ifdef EMU10K1_SEQUENCER -#include "../sound_config.h" -#endif - -static DEFINE_SPINLOCK(midi_spinlock); - -static void init_midi_hdr(struct midi_hdr *midihdr) -{ - midihdr->bufferlength = MIDIIN_BUFLEN; - midihdr->bytesrecorded = 0; - midihdr->flags = 0; -} - -static int midiin_add_buffer(struct emu10k1_mididevice *midi_dev, struct midi_hdr **midihdrptr) -{ - struct midi_hdr *midihdr; - - if ((midihdr = kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) { - ERROR(); - return -EINVAL; - } - - init_midi_hdr(midihdr); - - midihdr->data = kmalloc(MIDIIN_BUFLEN, GFP_KERNEL); - if (!midihdr->data) { - ERROR(); - kfree(midihdr); - return -1; - } - - if (emu10k1_mpuin_add_buffer(midi_dev->card->mpuin, midihdr) < 0) { - ERROR(); - kfree(midihdr->data); - kfree(midihdr); - return -1; - } - - *midihdrptr = midihdr; - list_add_tail(&midihdr->list, &midi_dev->mid_hdrs); - - return 0; -} - -static int emu10k1_midi_open(struct inode *inode, struct file *file) -{ - int minor = iminor(inode); - struct emu10k1_card *card = NULL; - struct emu10k1_mididevice *midi_dev; - struct list_head *entry; - - DPF(2, "emu10k1_midi_open()\n"); - - /* Check for correct device to open */ - list_for_each(entry, &emu10k1_devs) { - card = list_entry(entry, struct emu10k1_card, list); - - if (card->midi_dev == minor) - goto match; - } - - return -ENODEV; - -match: -#ifdef EMU10K1_SEQUENCER - if (card->seq_mididev) /* card is opened by sequencer */ - return -EBUSY; -#endif - - /* Wait for device to become free */ - mutex_lock(&card->open_sem); - while (card->open_mode & (file->f_mode << FMODE_MIDI_SHIFT)) { - if (file->f_flags & O_NONBLOCK) { - mutex_unlock(&card->open_sem); - return -EBUSY; - } - - mutex_unlock(&card->open_sem); - interruptible_sleep_on(&card->open_wait); - - if (signal_pending(current)) { - return -ERESTARTSYS; - } - - mutex_lock(&card->open_sem); - } - - if ((midi_dev = kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) - return -EINVAL; - - midi_dev->card = card; - midi_dev->mistate = MIDIIN_STATE_STOPPED; - init_waitqueue_head(&midi_dev->oWait); - init_waitqueue_head(&midi_dev->iWait); - midi_dev->ird = 0; - midi_dev->iwr = 0; - midi_dev->icnt = 0; - INIT_LIST_HEAD(&midi_dev->mid_hdrs); - - if (file->f_mode & FMODE_READ) { - struct midi_openinfo dsCardMidiOpenInfo; - struct midi_hdr *midihdr1; - struct midi_hdr *midihdr2; - - dsCardMidiOpenInfo.refdata = (unsigned long) midi_dev; - - if (emu10k1_mpuin_open(card, &dsCardMidiOpenInfo) < 0) { - ERROR(); - kfree(midi_dev); - return -ENODEV; - } - - /* Add two buffers to receive sysex buffer */ - if (midiin_add_buffer(midi_dev, &midihdr1) < 0) { - kfree(midi_dev); - return -ENODEV; - } - - if (midiin_add_buffer(midi_dev, &midihdr2) < 0) { - list_del(&midihdr1->list); - kfree(midihdr1->data); - kfree(midihdr1); - kfree(midi_dev); - return -ENODEV; - } - } - - if (file->f_mode & FMODE_WRITE) { - struct midi_openinfo dsCardMidiOpenInfo; - - dsCardMidiOpenInfo.refdata = (unsigned long) midi_dev; - - if (emu10k1_mpuout_open(card, &dsCardMidiOpenInfo) < 0) { - ERROR(); - kfree(midi_dev); - return -ENODEV; - } - } - - file->private_data = (void *) midi_dev; - - card->open_mode |= (file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE); - - mutex_unlock(&card->open_sem); - - return nonseekable_open(inode, file); -} - -static int emu10k1_midi_release(struct inode *inode, struct file *file) -{ - struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *) file->private_data; - struct emu10k1_card *card; - - lock_kernel(); - - card = midi_dev->card; - DPF(2, "emu10k1_midi_release()\n"); - - if (file->f_mode & FMODE_WRITE) { - if (!(file->f_flags & O_NONBLOCK)) { - - while (!signal_pending(current) && (card->mpuout->firstmidiq != NULL)) { - DPF(4, "Cannot close - buffers not empty\n"); - - interruptible_sleep_on(&midi_dev->oWait); - - } - } - - emu10k1_mpuout_close(card); - } - - if (file->f_mode & FMODE_READ) { - struct midi_hdr *midihdr; - - if (midi_dev->mistate == MIDIIN_STATE_STARTED) { - emu10k1_mpuin_stop(card); - midi_dev->mistate = MIDIIN_STATE_STOPPED; - } - - emu10k1_mpuin_reset(card); - emu10k1_mpuin_close(card); - - while (!list_empty(&midi_dev->mid_hdrs)) { - midihdr = list_entry(midi_dev->mid_hdrs.next, struct midi_hdr, list); - - list_del(midi_dev->mid_hdrs.next); - kfree(midihdr->data); - kfree(midihdr); - } - } - - kfree(midi_dev); - - mutex_lock(&card->open_sem); - card->open_mode &= ~((file->f_mode << FMODE_MIDI_SHIFT) & (FMODE_MIDI_READ | FMODE_MIDI_WRITE)); - mutex_unlock(&card->open_sem); - wake_up_interruptible(&card->open_wait); - - unlock_kernel(); - - return 0; -} - -static ssize_t emu10k1_midi_read(struct file *file, char __user *buffer, size_t count, loff_t * pos) -{ - struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *) file->private_data; - ssize_t ret = 0; - u16 cnt; - unsigned long flags; - - DPD(4, "emu10k1_midi_read(), count %#x\n", (u32) count); - - if (!access_ok(VERIFY_WRITE, buffer, count)) - return -EFAULT; - - if (midi_dev->mistate == MIDIIN_STATE_STOPPED) { - if (emu10k1_mpuin_start(midi_dev->card) < 0) { - ERROR(); - return -EINVAL; - } - - midi_dev->mistate = MIDIIN_STATE_STARTED; - } - - while (count > 0) { - cnt = MIDIIN_BUFLEN - midi_dev->ird; - - spin_lock_irqsave(&midi_spinlock, flags); - - if (midi_dev->icnt < cnt) - cnt = midi_dev->icnt; - - spin_unlock_irqrestore(&midi_spinlock, flags); - - if (cnt > count) - cnt = count; - - if (cnt <= 0) { - if (file->f_flags & O_NONBLOCK) - return ret ? ret : -EAGAIN; - DPF(2, " Go to sleep...\n"); - - interruptible_sleep_on(&midi_dev->iWait); - - if (signal_pending(current)) - return ret ? ret : -ERESTARTSYS; - - continue; - } - - if (copy_to_user(buffer, midi_dev->iBuf + midi_dev->ird, cnt)) { - ERROR(); - return ret ? ret : -EFAULT; - } - - midi_dev->ird += cnt; - midi_dev->ird %= MIDIIN_BUFLEN; - - spin_lock_irqsave(&midi_spinlock, flags); - - midi_dev->icnt -= cnt; - - spin_unlock_irqrestore(&midi_spinlock, flags); - - count -= cnt; - buffer += cnt; - ret += cnt; - - if (midi_dev->icnt == 0) - break; - } - - return ret; -} - -static ssize_t emu10k1_midi_write(struct file *file, const char __user *buffer, size_t count, loff_t * pos) -{ - struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *) file->private_data; - struct midi_hdr *midihdr; - unsigned long flags; - - DPD(4, "emu10k1_midi_write(), count=%#x\n", (u32) count); - - if (!access_ok(VERIFY_READ, buffer, count)) - return -EFAULT; - - if ((midihdr = kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) - return -EINVAL; - - midihdr->bufferlength = count; - midihdr->bytesrecorded = 0; - midihdr->flags = 0; - - midihdr->data = kmalloc(count, GFP_KERNEL); - if (!midihdr->data) { - ERROR(); - kfree(midihdr); - return -EINVAL; - } - - if (copy_from_user(midihdr->data, buffer, count)) { - kfree(midihdr->data); - kfree(midihdr); - return -EFAULT; - } - - spin_lock_irqsave(&midi_spinlock, flags); - - if (emu10k1_mpuout_add_buffer(midi_dev->card, midihdr) < 0) { - ERROR(); - kfree(midihdr->data); - kfree(midihdr); - spin_unlock_irqrestore(&midi_spinlock, flags); - return -EINVAL; - } - - spin_unlock_irqrestore(&midi_spinlock, flags); - - return count; -} - -static unsigned int emu10k1_midi_poll(struct file *file, struct poll_table_struct *wait) -{ - struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *) file->private_data; - unsigned long flags; - unsigned int mask = 0; - - DPF(4, "emu10k1_midi_poll() called\n"); - - if (file->f_mode & FMODE_WRITE) - poll_wait(file, &midi_dev->oWait, wait); - - if (file->f_mode & FMODE_READ) - poll_wait(file, &midi_dev->iWait, wait); - - spin_lock_irqsave(&midi_spinlock, flags); - - if (file->f_mode & FMODE_WRITE) - mask |= POLLOUT | POLLWRNORM; - - if (file->f_mode & FMODE_READ) { - if (midi_dev->mistate == MIDIIN_STATE_STARTED) - if (midi_dev->icnt > 0) - mask |= POLLIN | POLLRDNORM; - } - - spin_unlock_irqrestore(&midi_spinlock, flags); - - return mask; -} - -int emu10k1_midi_callback(unsigned long msg, unsigned long refdata, unsigned long *pmsg) -{ - struct emu10k1_mididevice *midi_dev = (struct emu10k1_mididevice *) refdata; - struct midi_hdr *midihdr = NULL; - unsigned long flags; - int i; - - DPF(4, "emu10k1_midi_callback()\n"); - - spin_lock_irqsave(&midi_spinlock, flags); - - switch (msg) { - case ICARDMIDI_OUTLONGDATA: - midihdr = (struct midi_hdr *) pmsg[2]; - - kfree(midihdr->data); - kfree(midihdr); - wake_up_interruptible(&midi_dev->oWait); - - break; - - case ICARDMIDI_INLONGDATA: - midihdr = (struct midi_hdr *) pmsg[2]; - - for (i = 0; i < midihdr->bytesrecorded; i++) { - midi_dev->iBuf[midi_dev->iwr++] = midihdr->data[i]; - midi_dev->iwr %= MIDIIN_BUFLEN; - } - - midi_dev->icnt += midihdr->bytesrecorded; - - if (midi_dev->mistate == MIDIIN_STATE_STARTED) { - init_midi_hdr(midihdr); - emu10k1_mpuin_add_buffer(midi_dev->card->mpuin, midihdr); - wake_up_interruptible(&midi_dev->iWait); - } - break; - - case ICARDMIDI_INDATA: - { - u8 *pBuf = (u8 *) & pmsg[1]; - u16 bytesvalid = pmsg[2]; - - for (i = 0; i < bytesvalid; i++) { - midi_dev->iBuf[midi_dev->iwr++] = pBuf[i]; - midi_dev->iwr %= MIDIIN_BUFLEN; - } - - midi_dev->icnt += bytesvalid; - } - - wake_up_interruptible(&midi_dev->iWait); - break; - - default: /* Unknown message */ - spin_unlock_irqrestore(&midi_spinlock, flags); - return -1; - } - - spin_unlock_irqrestore(&midi_spinlock, flags); - - return 0; -} - -/* MIDI file operations */ -const struct file_operations emu10k1_midi_fops = { - .owner = THIS_MODULE, - .read = emu10k1_midi_read, - .write = emu10k1_midi_write, - .poll = emu10k1_midi_poll, - .open = emu10k1_midi_open, - .release = emu10k1_midi_release, -}; - - -#ifdef EMU10K1_SEQUENCER - -/* functions used for sequencer access */ - -int emu10k1_seq_midi_open(int dev, int mode, - void (*input) (int dev, unsigned char data), - void (*output) (int dev)) -{ - struct emu10k1_card *card; - struct midi_openinfo dsCardMidiOpenInfo; - struct emu10k1_mididevice *midi_dev; - - if (midi_devs[dev] == NULL || midi_devs[dev]->devc == NULL) - return -EINVAL; - - card = midi_devs[dev]->devc; - - if (card->open_mode) /* card is opened native */ - return -EBUSY; - - DPF(2, "emu10k1_seq_midi_open()\n"); - - if ((midi_dev = kmalloc(sizeof(*midi_dev), GFP_KERNEL)) == NULL) - return -EINVAL; - - midi_dev->card = card; - midi_dev->mistate = MIDIIN_STATE_STOPPED; - init_waitqueue_head(&midi_dev->oWait); - init_waitqueue_head(&midi_dev->iWait); - midi_dev->ird = 0; - midi_dev->iwr = 0; - midi_dev->icnt = 0; - INIT_LIST_HEAD(&midi_dev->mid_hdrs); - - dsCardMidiOpenInfo.refdata = (unsigned long) midi_dev; - - if (emu10k1_mpuout_open(card, &dsCardMidiOpenInfo) < 0) { - ERROR(); - return -ENODEV; - } - - card->seq_mididev = midi_dev; - - return 0; -} - -void emu10k1_seq_midi_close(int dev) -{ - struct emu10k1_card *card; - - DPF(2, "emu10k1_seq_midi_close()\n"); - if (midi_devs[dev] == NULL || midi_devs[dev]->devc == NULL) - return; - - card = midi_devs[dev]->devc; - emu10k1_mpuout_close(card); - - kfree(card->seq_mididev); - card->seq_mididev = NULL; -} - -int emu10k1_seq_midi_out(int dev, unsigned char midi_byte) -{ - struct emu10k1_card *card; - struct midi_hdr *midihdr; - unsigned long flags; - - if (midi_devs[dev] == NULL || midi_devs[dev]->devc == NULL) - return -EINVAL; - - card = midi_devs[dev]->devc; - - if ((midihdr = kmalloc(sizeof(struct midi_hdr), GFP_KERNEL)) == NULL) - return -EINVAL; - - midihdr->bufferlength = 1; - midihdr->bytesrecorded = 0; - midihdr->flags = 0; - - midihdr->data = kmalloc(1, GFP_KERNEL); - if (!midihdr->data) { - ERROR(); - kfree(midihdr); - return -EINVAL; - } - - *(midihdr->data) = midi_byte; - - spin_lock_irqsave(&midi_spinlock, flags); - - if (emu10k1_mpuout_add_buffer(card, midihdr) < 0) { - ERROR(); - kfree(midihdr->data); - kfree(midihdr); - spin_unlock_irqrestore(&midi_spinlock, flags); - return -EINVAL; - } - - spin_unlock_irqrestore(&midi_spinlock, flags); - - return 1; -} - -int emu10k1_seq_midi_start_read(int dev) -{ - return 0; -} - -int emu10k1_seq_midi_end_read(int dev) -{ - return 0; -} - -void emu10k1_seq_midi_kick(int dev) -{ -} - -int emu10k1_seq_midi_buffer_status(int dev) -{ - int count; - struct midi_queue *queue; - struct emu10k1_card *card; - - if (midi_devs[dev] == NULL || midi_devs[dev]->devc == NULL) - return -EINVAL; - - count = 0; - - card = midi_devs[dev]->devc; - queue = card->mpuout->firstmidiq; - - while (queue != NULL) { - count++; - if (queue == card->mpuout->lastmidiq) - break; - - queue = queue->next; - } - - return count; -} - -#endif - diff --git a/sound/oss/emu10k1/midi.h b/sound/oss/emu10k1/midi.h deleted file mode 100644 index 2459ec929e8d..000000000000 --- a/sound/oss/emu10k1/midi.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - ********************************************************************** - * midi.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _MIDI_H -#define _MIDI_H - -#define FMODE_MIDI_SHIFT 3 -#define FMODE_MIDI_READ (FMODE_READ << FMODE_MIDI_SHIFT) -#define FMODE_MIDI_WRITE (FMODE_WRITE << FMODE_MIDI_SHIFT) - -#define MIDIIN_STATE_STARTED 0x00000001 -#define MIDIIN_STATE_STOPPED 0x00000002 - -#define MIDIIN_BUFLEN 1024 - -struct emu10k1_mididevice -{ - struct emu10k1_card *card; - u32 mistate; - wait_queue_head_t oWait; - wait_queue_head_t iWait; - s8 iBuf[MIDIIN_BUFLEN]; - u16 ird, iwr, icnt; - struct list_head mid_hdrs; -}; - -/* uncomment next line to use midi port on Audigy drive */ -//#define USE_AUDIGY_DRIVE_MIDI - -#ifdef USE_AUDIGY_DRIVE_MIDI -#define A_MUDATA A_MUDATA2 -#define A_MUCMD A_MUCMD2 -#define A_MUSTAT A_MUCMD2 -#define A_IPR_MIDITRANSBUFEMPTY A_IPR_MIDITRANSBUFEMPTY2 -#define A_IPR_MIDIRECVBUFEMPTY A_IPR_MIDIRECVBUFEMPTY2 -#define A_INTE_MIDITXENABLE A_INTE_MIDITXENABLE2 -#define A_INTE_MIDIRXENABLE A_INTE_MIDIRXENABLE2 -#else -#define A_MUDATA A_MUDATA1 -#define A_MUCMD A_MUCMD1 -#define A_MUSTAT A_MUCMD1 -#define A_IPR_MIDITRANSBUFEMPTY A_IPR_MIDITRANSBUFEMPTY1 -#define A_IPR_MIDIRECVBUFEMPTY A_IPR_MIDIRECVBUFEMPTY1 -#define A_INTE_MIDITXENABLE A_INTE_MIDITXENABLE1 -#define A_INTE_MIDIRXENABLE A_INTE_MIDIRXENABLE1 -#endif - - -#endif /* _MIDI_H */ - diff --git a/sound/oss/emu10k1/mixer.c b/sound/oss/emu10k1/mixer.c deleted file mode 100644 index bc3805fb0701..000000000000 --- a/sound/oss/emu10k1/mixer.c +++ /dev/null @@ -1,690 +0,0 @@ -/* - ********************************************************************** - * mixer.c - /dev/mixer interface for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * November 2, 1999 Alan Cox cleaned up stuff - * - ********************************************************************** - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation; either version 2 of - * the License, or (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the Free - * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, - * USA. - * - ********************************************************************** - */ - -#include -#include -#include - -#include "hwaccess.h" -#include "8010.h" -#include "recmgr.h" - - -static const u32 bass_table[41][5] = { - { 0x3e4f844f, 0x84ed4cc3, 0x3cc69927, 0x7b03553a, 0xc4da8486 }, - { 0x3e69a17a, 0x84c280fb, 0x3cd77cd4, 0x7b2f2a6f, 0xc4b08d1d }, - { 0x3e82ff42, 0x849991d5, 0x3ce7466b, 0x7b5917c6, 0xc48863ee }, - { 0x3e9bab3c, 0x847267f0, 0x3cf5ffe8, 0x7b813560, 0xc461f22c }, - { 0x3eb3b275, 0x844ced29, 0x3d03b295, 0x7ba79a1c, 0xc43d223b }, - { 0x3ecb2174, 0x84290c8b, 0x3d106714, 0x7bcc5ba3, 0xc419dfa5 }, - { 0x3ee2044b, 0x8406b244, 0x3d1c2561, 0x7bef8e77, 0xc3f8170f }, - { 0x3ef86698, 0x83e5cb96, 0x3d26f4d8, 0x7c114600, 0xc3d7b625 }, - { 0x3f0e5390, 0x83c646c9, 0x3d30dc39, 0x7c319498, 0xc3b8ab97 }, - { 0x3f23d60b, 0x83a81321, 0x3d39e1af, 0x7c508b9c, 0xc39ae704 }, - { 0x3f38f884, 0x838b20d2, 0x3d420ad2, 0x7c6e3b75, 0xc37e58f1 }, - { 0x3f4dc52c, 0x836f60ef, 0x3d495cab, 0x7c8ab3a6, 0xc362f2be }, - { 0x3f6245e8, 0x8354c565, 0x3d4fdbb8, 0x7ca602d6, 0xc348a69b }, - { 0x3f76845f, 0x833b40ec, 0x3d558bf0, 0x7cc036df, 0xc32f677c }, - { 0x3f8a8a03, 0x8322c6fb, 0x3d5a70c4, 0x7cd95cd7, 0xc317290b }, - { 0x3f9e6014, 0x830b4bc3, 0x3d5e8d25, 0x7cf1811a, 0xc2ffdfa5 }, - { 0x3fb20fae, 0x82f4c420, 0x3d61e37f, 0x7d08af56, 0xc2e9804a }, - { 0x3fc5a1cc, 0x82df2592, 0x3d6475c3, 0x7d1ef294, 0xc2d40096 }, - { 0x3fd91f55, 0x82ca6632, 0x3d664564, 0x7d345541, 0xc2bf56b9 }, - { 0x3fec9120, 0x82b67cac, 0x3d675356, 0x7d48e138, 0xc2ab796e }, - { 0x40000000, 0x82a36037, 0x3d67a012, 0x7d5c9fc9, 0xc2985fee }, - { 0x401374c7, 0x8291088a, 0x3d672b93, 0x7d6f99c3, 0xc28601f2 }, - { 0x4026f857, 0x827f6dd7, 0x3d65f559, 0x7d81d77c, 0xc27457a3 }, - { 0x403a939f, 0x826e88c5, 0x3d63fc63, 0x7d9360d4, 0xc2635996 }, - { 0x404e4faf, 0x825e5266, 0x3d613f32, 0x7da43d42, 0xc25300c6 }, - { 0x406235ba, 0x824ec434, 0x3d5dbbc3, 0x7db473d7, 0xc243468e }, - { 0x40764f1f, 0x823fd80c, 0x3d596f8f, 0x7dc40b44, 0xc23424a2 }, - { 0x408aa576, 0x82318824, 0x3d545787, 0x7dd309e2, 0xc2259509 }, - { 0x409f4296, 0x8223cf0b, 0x3d4e7012, 0x7de175b5, 0xc2179218 }, - { 0x40b430a0, 0x8216a7a1, 0x3d47b505, 0x7def5475, 0xc20a1670 }, - { 0x40c97a0a, 0x820a0d12, 0x3d4021a1, 0x7dfcab8d, 0xc1fd1cf5 }, - { 0x40df29a6, 0x81fdfad6, 0x3d37b08d, 0x7e098028, 0xc1f0a0ca }, - { 0x40f54ab1, 0x81f26ca9, 0x3d2e5bd1, 0x7e15d72b, 0xc1e49d52 }, - { 0x410be8da, 0x81e75e89, 0x3d241cce, 0x7e21b544, 0xc1d90e24 }, - { 0x41231051, 0x81dcccb3, 0x3d18ec37, 0x7e2d1ee6, 0xc1cdef10 }, - { 0x413acdd0, 0x81d2b39e, 0x3d0cc20a, 0x7e38184e, 0xc1c33c13 }, - { 0x41532ea7, 0x81c90ffb, 0x3cff9585, 0x7e42a58b, 0xc1b8f15a }, - { 0x416c40cd, 0x81bfdeb2, 0x3cf15d21, 0x7e4cca7c, 0xc1af0b3f }, - { 0x418612ea, 0x81b71cdc, 0x3ce20e85, 0x7e568ad3, 0xc1a58640 }, - { 0x41a0b465, 0x81aec7c5, 0x3cd19e7c, 0x7e5fea1e, 0xc19c5f03 }, - { 0x41bc3573, 0x81a6dcea, 0x3cc000e9, 0x7e68ebc2, 0xc1939250 } -}; - -static const u32 treble_table[41][5] = { - { 0x0125cba9, 0xfed5debd, 0x00599b6c, 0x0d2506da, 0xfa85b354 }, - { 0x0142f67e, 0xfeb03163, 0x0066cd0f, 0x0d14c69d, 0xfa914473 }, - { 0x016328bd, 0xfe860158, 0x0075b7f2, 0x0d03eb27, 0xfa9d32d2 }, - { 0x0186b438, 0xfe56c982, 0x00869234, 0x0cf27048, 0xfaa97fca }, - { 0x01adf358, 0xfe21f5fe, 0x00999842, 0x0ce051c2, 0xfab62ca5 }, - { 0x01d949fa, 0xfde6e287, 0x00af0d8d, 0x0ccd8b4a, 0xfac33aa7 }, - { 0x02092669, 0xfda4d8bf, 0x00c73d4c, 0x0cba1884, 0xfad0ab07 }, - { 0x023e0268, 0xfd5b0e4a, 0x00e27b54, 0x0ca5f509, 0xfade7ef2 }, - { 0x0278645c, 0xfd08a2b0, 0x01012509, 0x0c911c63, 0xfaecb788 }, - { 0x02b8e091, 0xfcac9d1a, 0x0123a262, 0x0c7b8a14, 0xfafb55df }, - { 0x03001a9a, 0xfc45e9ce, 0x014a6709, 0x0c65398f, 0xfb0a5aff }, - { 0x034ec6d7, 0xfbd3576b, 0x0175f397, 0x0c4e2643, 0xfb19c7e4 }, - { 0x03a5ac15, 0xfb5393ee, 0x01a6d6ed, 0x0c364b94, 0xfb299d7c }, - { 0x0405a562, 0xfac52968, 0x01ddafae, 0x0c1da4e2, 0xfb39dca5 }, - { 0x046fa3fe, 0xfa267a66, 0x021b2ddd, 0x0c042d8d, 0xfb4a8631 }, - { 0x04e4b17f, 0xf975be0f, 0x0260149f, 0x0be9e0f2, 0xfb5b9ae0 }, - { 0x0565f220, 0xf8b0fbe5, 0x02ad3c29, 0x0bceba73, 0xfb6d1b60 }, - { 0x05f4a745, 0xf7d60722, 0x030393d4, 0x0bb2b578, 0xfb7f084d }, - { 0x06923236, 0xf6e279bd, 0x03642465, 0x0b95cd75, 0xfb916233 }, - { 0x07401713, 0xf5d3aef9, 0x03d01283, 0x0b77fded, 0xfba42984 }, - { 0x08000000, 0xf4a6bd88, 0x0448a161, 0x0b594278, 0xfbb75e9f }, - { 0x08d3c097, 0xf3587131, 0x04cf35a4, 0x0b3996c9, 0xfbcb01cb }, - { 0x09bd59a2, 0xf1e543f9, 0x05655880, 0x0b18f6b2, 0xfbdf1333 }, - { 0x0abefd0f, 0xf04956ca, 0x060cbb12, 0x0af75e2c, 0xfbf392e8 }, - { 0x0bdb123e, 0xee806984, 0x06c739fe, 0x0ad4c962, 0xfc0880dd }, - { 0x0d143a94, 0xec85d287, 0x0796e150, 0x0ab134b0, 0xfc1ddce5 }, - { 0x0e6d5664, 0xea547598, 0x087df0a0, 0x0a8c9cb6, 0xfc33a6ad }, - { 0x0fe98a2a, 0xe7e6ba35, 0x097edf83, 0x0a66fe5b, 0xfc49ddc2 }, - { 0x118c4421, 0xe536813a, 0x0a9c6248, 0x0a4056d7, 0xfc608185 }, - { 0x1359422e, 0xe23d19eb, 0x0bd96efb, 0x0a18a3bf, 0xfc77912c }, - { 0x1554982b, 0xdef33645, 0x0d3942bd, 0x09efe312, 0xfc8f0bc1 }, - { 0x1782b68a, 0xdb50deb1, 0x0ebf676d, 0x09c6133f, 0xfca6f019 }, - { 0x19e8715d, 0xd74d64fd, 0x106fb999, 0x099b3337, 0xfcbf3cd6 }, - { 0x1c8b07b8, 0xd2df56ab, 0x124e6ec8, 0x096f4274, 0xfcd7f060 }, - { 0x1f702b6d, 0xcdfc6e92, 0x14601c10, 0x0942410b, 0xfcf108e5 }, - { 0x229e0933, 0xc89985cd, 0x16a9bcfa, 0x09142fb5, 0xfd0a8451 }, - { 0x261b5118, 0xc2aa8409, 0x1930bab6, 0x08e50fdc, 0xfd24604d }, - { 0x29ef3f5d, 0xbc224f28, 0x1bfaf396, 0x08b4e3aa, 0xfd3e9a3b }, - { 0x2e21a59b, 0xb4f2ba46, 0x1f0ec2d6, 0x0883ae15, 0xfd592f33 }, - { 0x32baf44b, 0xad0c7429, 0x227308a3, 0x085172eb, 0xfd741bfd }, - { 0x37c4448b, 0xa45ef51d, 0x262f3267, 0x081e36dc, 0xfd8f5d14 } -}; - - -static void set_bass(struct emu10k1_card *card, int l, int r) -{ - int i; - - l = (l * 40 + 50) / 100; - r = (r * 40 + 50) / 100; - - for (i = 0; i < 5; i++) - sblive_writeptr(card, (card->is_audigy ? A_GPR_BASE : GPR_BASE) + card->mgr.ctrl_gpr[SOUND_MIXER_BASS][0] + i, 0, bass_table[l][i]); -} - -static void set_treble(struct emu10k1_card *card, int l, int r) -{ - int i; - - l = (l * 40 + 50) / 100; - r = (r * 40 + 50) / 100; - - for (i = 0; i < 5; i++) - sblive_writeptr(card, (card->is_audigy ? A_GPR_BASE : GPR_BASE) + card->mgr.ctrl_gpr[SOUND_MIXER_TREBLE][0] + i , 0, treble_table[l][i]); -} - -const char volume_params[SOUND_MIXER_NRDEVICES]= { -/* Used by the ac97 driver */ - [SOUND_MIXER_VOLUME] = VOL_6BIT, - [SOUND_MIXER_BASS] = VOL_4BIT, - [SOUND_MIXER_TREBLE] = VOL_4BIT, - [SOUND_MIXER_PCM] = VOL_5BIT, - [SOUND_MIXER_SPEAKER] = VOL_4BIT, - [SOUND_MIXER_LINE] = VOL_5BIT, - [SOUND_MIXER_MIC] = VOL_5BIT, - [SOUND_MIXER_CD] = VOL_5BIT, - [SOUND_MIXER_ALTPCM] = VOL_6BIT, - [SOUND_MIXER_IGAIN] = VOL_4BIT, - [SOUND_MIXER_LINE1] = VOL_5BIT, - [SOUND_MIXER_PHONEIN] = VOL_5BIT, - [SOUND_MIXER_PHONEOUT] = VOL_6BIT, - [SOUND_MIXER_VIDEO] = VOL_5BIT, -/* Not used by the ac97 driver */ - [SOUND_MIXER_SYNTH] = VOL_5BIT, - [SOUND_MIXER_IMIX] = VOL_5BIT, - [SOUND_MIXER_RECLEV] = VOL_5BIT, - [SOUND_MIXER_OGAIN] = VOL_5BIT, - [SOUND_MIXER_LINE2] = VOL_5BIT, - [SOUND_MIXER_LINE3] = VOL_5BIT, - [SOUND_MIXER_DIGITAL1] = VOL_5BIT, - [SOUND_MIXER_DIGITAL2] = VOL_5BIT, - [SOUND_MIXER_DIGITAL3] = VOL_5BIT, - [SOUND_MIXER_RADIO] = VOL_5BIT, - [SOUND_MIXER_MONITOR] = VOL_5BIT -}; - -/* Mixer file operations */ -static int emu10k1_private_mixer(struct emu10k1_card *card, unsigned int cmd, unsigned long arg) -{ - struct mixer_private_ioctl *ctl; - struct dsp_patch *patch; - u32 size, page; - int addr, size_reg, i, ret; - unsigned int id, ch; - void __user *argp = (void __user *)arg; - - switch (cmd) { - - case SOUND_MIXER_PRIVATE3: - - ctl = kmalloc(sizeof(struct mixer_private_ioctl), GFP_KERNEL); - if (ctl == NULL) - return -ENOMEM; - - if (copy_from_user(ctl, argp, sizeof(struct mixer_private_ioctl))) { - kfree(ctl); - return -EFAULT; - } - - ret = 0; - switch (ctl->cmd) { -#ifdef DBGEMU - case CMD_WRITEFN0: - emu10k1_writefn0_2(card, ctl->val[0], ctl->val[1], ctl->val[2]); - break; -#endif - case CMD_WRITEPTR: -#ifdef DBGEMU - if (ctl->val[1] >= 0x40 || ctl->val[0] >= 0x1000) { -#else - if (ctl->val[1] >= 0x40 || ctl->val[0] >= 0x1000 || ((ctl->val[0] < 0x100 ) && - //Any register allowed raw access goes here: - (ctl->val[0] != A_SPDIF_SAMPLERATE) && (ctl->val[0] != A_DBG) - ) - ) { -#endif - ret = -EINVAL; - break; - } - sblive_writeptr(card, ctl->val[0], ctl->val[1], ctl->val[2]); - break; - - case CMD_READFN0: - ctl->val[2] = emu10k1_readfn0(card, ctl->val[0]); - - if (copy_to_user(argp, ctl, sizeof(struct mixer_private_ioctl))) - ret = -EFAULT; - - break; - - case CMD_READPTR: - if (ctl->val[1] >= 0x40 || (ctl->val[0] & 0x7ff) > 0xff) { - ret = -EINVAL; - break; - } - - if ((ctl->val[0] & 0x7ff) > 0x3f) - ctl->val[1] = 0x00; - - ctl->val[2] = sblive_readptr(card, ctl->val[0], ctl->val[1]); - - if (copy_to_user(argp, ctl, sizeof(struct mixer_private_ioctl))) - ret = -EFAULT; - - break; - - case CMD_SETRECSRC: - switch (ctl->val[0]) { - case WAVERECORD_AC97: - if (card->is_aps) { - ret = -EINVAL; - break; - } - - card->wavein.recsrc = WAVERECORD_AC97; - break; - - case WAVERECORD_MIC: - card->wavein.recsrc = WAVERECORD_MIC; - break; - - case WAVERECORD_FX: - card->wavein.recsrc = WAVERECORD_FX; - card->wavein.fxwc = ctl->val[1] & 0xffff; - - if (!card->wavein.fxwc) - ret = -EINVAL; - - break; - - default: - ret = -EINVAL; - break; - } - break; - - case CMD_GETRECSRC: - ctl->val[0] = card->wavein.recsrc; - ctl->val[1] = card->wavein.fxwc; - if (copy_to_user(argp, ctl, sizeof(struct mixer_private_ioctl))) - ret = -EFAULT; - - break; - - case CMD_GETVOICEPARAM: - ctl->val[0] = card->waveout.send_routing[0]; - ctl->val[1] = card->waveout.send_dcba[0]; - - ctl->val[2] = card->waveout.send_routing[1]; - ctl->val[3] = card->waveout.send_dcba[1]; - - ctl->val[4] = card->waveout.send_routing[2]; - ctl->val[5] = card->waveout.send_dcba[2]; - - if (copy_to_user(argp, ctl, sizeof(struct mixer_private_ioctl))) - ret = -EFAULT; - - break; - - case CMD_SETVOICEPARAM: - card->waveout.send_routing[0] = ctl->val[0]; - card->waveout.send_dcba[0] = ctl->val[1]; - - card->waveout.send_routing[1] = ctl->val[2]; - card->waveout.send_dcba[1] = ctl->val[3]; - - card->waveout.send_routing[2] = ctl->val[4]; - card->waveout.send_dcba[2] = ctl->val[5]; - - break; - - case CMD_SETMCH_FX: - card->mchannel_fx = ctl->val[0] & 0x000f; - break; - - case CMD_GETPATCH: - if (ctl->val[0] == 0) { - if (copy_to_user(argp, &card->mgr.rpatch, sizeof(struct dsp_rpatch))) - ret = -EFAULT; - } else { - if ((ctl->val[0] - 1) / PATCHES_PER_PAGE >= card->mgr.current_pages) { - ret = -EINVAL; - break; - } - - if (copy_to_user(argp, PATCH(&card->mgr, ctl->val[0] - 1), sizeof(struct dsp_patch))) - ret = -EFAULT; - } - - break; - - case CMD_GETGPR: - id = ctl->val[0]; - - if (id > NUM_GPRS) { - ret = -EINVAL; - break; - } - - if (copy_to_user(argp, &card->mgr.gpr[id], sizeof(struct dsp_gpr))) - ret = -EFAULT; - - break; - - case CMD_GETCTLGPR: - addr = emu10k1_find_control_gpr(&card->mgr, (char *) ctl->val, &((char *) ctl->val)[PATCH_NAME_SIZE]); - ctl->val[0] = sblive_readptr(card, addr, 0); - - if (copy_to_user(argp, ctl, sizeof(struct mixer_private_ioctl))) - ret = -EFAULT; - - break; - - case CMD_SETPATCH: - if (ctl->val[0] == 0) - memcpy(&card->mgr.rpatch, &ctl->val[1], sizeof(struct dsp_rpatch)); - else { - page = (ctl->val[0] - 1) / PATCHES_PER_PAGE; - if (page > MAX_PATCHES_PAGES) { - ret = -EINVAL; - break; - } - - if (page >= card->mgr.current_pages) { - for (i = card->mgr.current_pages; i < page + 1; i++) { - card->mgr.patch[i] = (void *)__get_free_page(GFP_KERNEL); - if(card->mgr.patch[i] == NULL) { - card->mgr.current_pages = i; - ret = -ENOMEM; - break; - } - memset(card->mgr.patch[i], 0, PAGE_SIZE); - } - card->mgr.current_pages = page + 1; - } - - patch = PATCH(&card->mgr, ctl->val[0] - 1); - - memcpy(patch, &ctl->val[1], sizeof(struct dsp_patch)); - - if (patch->code_size == 0) { - for(i = page + 1; i < card->mgr.current_pages; i++) - free_page((unsigned long) card->mgr.patch[i]); - - card->mgr.current_pages = page + 1; - } - } - break; - - case CMD_SETGPR: - if (ctl->val[0] > NUM_GPRS) { - ret = -EINVAL; - break; - } - - memcpy(&card->mgr.gpr[ctl->val[0]], &ctl->val[1], sizeof(struct dsp_gpr)); - break; - - case CMD_SETCTLGPR: - addr = emu10k1_find_control_gpr(&card->mgr, (char *) ctl->val, (char *) ctl->val + PATCH_NAME_SIZE); - emu10k1_set_control_gpr(card, addr, *((s32 *)((char *) ctl->val + 2 * PATCH_NAME_SIZE)), 0); - break; - - case CMD_SETGPOUT: - if ( ((ctl->val[0] > 2) && (!card->is_audigy)) - || (ctl->val[0] > 15) || ctl->val[1] > 1) { - ret= -EINVAL; - break; - } - - if (card->is_audigy) - emu10k1_writefn0(card, (1 << 24) | ((ctl->val[0]) << 16) | A_IOCFG, ctl->val[1]); - else - emu10k1_writefn0(card, (1 << 24) | (((ctl->val[0]) + 10) << 16) | HCFG, ctl->val[1]); - break; - - case CMD_GETGPR2OSS: - id = ctl->val[0]; - ch = ctl->val[1]; - - if (id >= SOUND_MIXER_NRDEVICES || ch >= 2) { - ret = -EINVAL; - break; - } - - ctl->val[2] = card->mgr.ctrl_gpr[id][ch]; - - if (copy_to_user(argp, ctl, sizeof(struct mixer_private_ioctl))) - ret = -EFAULT; - - break; - - case CMD_SETGPR2OSS: - id = ctl->val[0]; - /* 0 == left, 1 == right */ - ch = ctl->val[1]; - addr = ctl->val[2]; - - if (id >= SOUND_MIXER_NRDEVICES || ch >= 2) { - ret = -EINVAL; - break; - } - - card->mgr.ctrl_gpr[id][ch] = addr; - - if (card->is_aps) - break; - - if (addr >= 0) { - unsigned int state = card->ac97->mixer_state[id]; - - if (ch == 1) { - state >>= 8; - card->ac97->stereo_mixers |= (1 << id); - } - - card->ac97->supported_mixers |= (1 << id); - - if (id == SOUND_MIXER_TREBLE) { - set_treble(card, card->ac97->mixer_state[id] & 0xff, (card->ac97->mixer_state[id] >> 8) & 0xff); - } else if (id == SOUND_MIXER_BASS) { - set_bass(card, card->ac97->mixer_state[id] & 0xff, (card->ac97->mixer_state[id] >> 8) & 0xff); - } else - emu10k1_set_volume_gpr(card, addr, state & 0xff, - volume_params[id]); - } else { - card->ac97->stereo_mixers &= ~(1 << id); - card->ac97->stereo_mixers |= card->ac97_stereo_mixers; - - if (ch == 0) { - card->ac97->supported_mixers &= ~(1 << id); - card->ac97->supported_mixers |= card->ac97_supported_mixers; - } - } - break; - - case CMD_SETPASSTHROUGH: - card->pt.selected = ctl->val[0] ? 1 : 0; - if (card->pt.state != PT_STATE_INACTIVE) - break; - - card->pt.spcs_to_use = ctl->val[0] & 0x07; - break; - - case CMD_PRIVATE3_VERSION: - ctl->val[0] = PRIVATE3_VERSION; //private3 version - ctl->val[1] = MAJOR_VER; //major driver version - ctl->val[2] = MINOR_VER; //minor driver version - ctl->val[3] = card->is_audigy; //1=card is audigy - - if (card->is_audigy) - ctl->val[4]=emu10k1_readfn0(card, 0x18); - - if (copy_to_user(argp, ctl, sizeof(struct mixer_private_ioctl))) - ret = -EFAULT; - break; - - case CMD_AC97_BOOST: - if (ctl->val[0]) - emu10k1_ac97_write(card->ac97, 0x18, 0x0); - else - emu10k1_ac97_write(card->ac97, 0x18, 0x0808); - break; - default: - ret = -EINVAL; - break; - } - - kfree(ctl); - return ret; - break; - - case SOUND_MIXER_PRIVATE4: - - if (copy_from_user(&size, argp, sizeof(size))) - return -EFAULT; - - DPD(2, "External tram size %#x\n", size); - - if (size > 0x1fffff) - return -EINVAL; - - size_reg = 0; - - if (size != 0) { - size = (size - 1) >> 14; - - while (size) { - size >>= 1; - size_reg++; - } - - size = 0x4000 << size_reg; - } - - DPD(2, "External tram size %#x %#x\n", size, size_reg); - - if (size != card->tankmem.size) { - if (card->tankmem.size > 0) { - emu10k1_writefn0(card, HCFG_LOCKTANKCACHE, 1); - - sblive_writeptr_tag(card, 0, TCB, 0, TCBS, 0, TAGLIST_END); - - pci_free_consistent(card->pci_dev, card->tankmem.size, card->tankmem.addr, card->tankmem.dma_handle); - - card->tankmem.size = 0; - } - - if (size != 0) { - card->tankmem.addr = pci_alloc_consistent(card->pci_dev, size, &card->tankmem.dma_handle); - if (card->tankmem.addr == NULL) - return -ENOMEM; - - card->tankmem.size = size; - - sblive_writeptr_tag(card, 0, TCB, (u32) card->tankmem.dma_handle, TCBS,(u32) size_reg, TAGLIST_END); - - emu10k1_writefn0(card, HCFG_LOCKTANKCACHE, 0); - } - } - return 0; - break; - - default: - break; - } - - return -EINVAL; -} - -static int emu10k1_dsp_mixer(struct emu10k1_card *card, unsigned int oss_mixer, unsigned long arg) -{ - unsigned int left, right; - int val; - int scale; - - card->ac97->modcnt++; - - if (get_user(val, (int __user *)arg)) - return -EFAULT; - - /* cleanse input a little */ - right = ((val >> 8) & 0xff); - left = (val & 0xff); - - if (right > 100) right = 100; - if (left > 100) left = 100; - - card->ac97->mixer_state[oss_mixer] = (right << 8) | left; - if (oss_mixer == SOUND_MIXER_TREBLE) { - set_treble(card, left, right); - return 0; - } if (oss_mixer == SOUND_MIXER_BASS) { - set_bass(card, left, right); - return 0; - } - - if (oss_mixer == SOUND_MIXER_VOLUME) - scale = 1 << card->ac97->bit_resolution; - else - scale = volume_params[oss_mixer]; - - emu10k1_set_volume_gpr(card, card->mgr.ctrl_gpr[oss_mixer][0], left, scale); - emu10k1_set_volume_gpr(card, card->mgr.ctrl_gpr[oss_mixer][1], right, scale); - - if (card->ac97_supported_mixers & (1 << oss_mixer)) - card->ac97->write_mixer(card->ac97, oss_mixer, left, right); - - return 0; -} - -static int emu10k1_mixer_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) -{ - int ret; - struct emu10k1_card *card = file->private_data; - unsigned int oss_mixer = _IOC_NR(cmd); - - ret = -EINVAL; - if (!card->is_aps) { - if (cmd == SOUND_MIXER_INFO) { - mixer_info info; - - strlcpy(info.id, card->ac97->name, sizeof(info.id)); - - if (card->is_audigy) - strlcpy(info.name, "Audigy - Emu10k1", sizeof(info.name)); - else - strlcpy(info.name, "Creative SBLive - Emu10k1", sizeof(info.name)); - - info.modify_counter = card->ac97->modcnt; - - if (copy_to_user((void __user *)arg, &info, sizeof(info))) - return -EFAULT; - - return 0; - } - - if ((_SIOC_DIR(cmd) == (_SIOC_WRITE|_SIOC_READ)) && oss_mixer <= SOUND_MIXER_NRDEVICES) - ret = emu10k1_dsp_mixer(card, oss_mixer, arg); - else - ret = card->ac97->mixer_ioctl(card->ac97, cmd, arg); - } - - if (ret < 0) - ret = emu10k1_private_mixer(card, cmd, arg); - - return ret; -} - -static int emu10k1_mixer_open(struct inode *inode, struct file *file) -{ - int minor = iminor(inode); - struct emu10k1_card *card = NULL; - struct list_head *entry; - - DPF(4, "emu10k1_mixer_open()\n"); - - list_for_each(entry, &emu10k1_devs) { - card = list_entry(entry, struct emu10k1_card, list); - - if (card->ac97->dev_mixer == minor) - goto match; - } - - return -ENODEV; - - match: - file->private_data = card; - return 0; -} - -static int emu10k1_mixer_release(struct inode *inode, struct file *file) -{ - DPF(4, "emu10k1_mixer_release()\n"); - return 0; -} - -const struct file_operations emu10k1_mixer_fops = { - .owner = THIS_MODULE, - .llseek = no_llseek, - .ioctl = emu10k1_mixer_ioctl, - .open = emu10k1_mixer_open, - .release = emu10k1_mixer_release, -}; diff --git a/sound/oss/emu10k1/passthrough.c b/sound/oss/emu10k1/passthrough.c deleted file mode 100644 index 6d21d4368dec..000000000000 --- a/sound/oss/emu10k1/passthrough.c +++ /dev/null @@ -1,240 +0,0 @@ -/* - ********************************************************************** - * passthrough.c -- Emu10k1 digital passthrough - * Copyright (C) 2001 Juha Yrjölä - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * May 15, 2001 Juha Yrjölä base code release - * - ********************************************************************** - * - * 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 -#include -#include -#include -#include -#include -#include - -#include "hwaccess.h" -#include "cardwo.h" -#include "cardwi.h" -#include "recmgr.h" -#include "irqmgr.h" -#include "audio.h" -#include "8010.h" - -static void pt_putsamples(struct pt_data *pt, u16 *ptr, u16 left, u16 right) -{ - unsigned int idx; - - ptr[pt->copyptr] = left; - idx = pt->copyptr + PT_SAMPLES/2; - idx %= PT_SAMPLES; - ptr[idx] = right; -} - -static inline int pt_can_write(struct pt_data *pt) -{ - return pt->blocks_copied < pt->blocks_played + 8; -} - -static int pt_wait_for_write(struct emu10k1_wavedevice *wavedev, int nonblock) -{ - struct emu10k1_card *card = wavedev->card; - struct pt_data *pt = &card->pt; - - if (nonblock && !pt_can_write(pt)) - return -EAGAIN; - while (!pt_can_write(pt) && pt->state != PT_STATE_INACTIVE) { - interruptible_sleep_on(&pt->wait); - if (signal_pending(current)) - return -ERESTARTSYS; - } - if (pt->state == PT_STATE_INACTIVE) - return -EAGAIN; - - return 0; -} - -static int pt_putblock(struct emu10k1_wavedevice *wave_dev, u16 *block, int nonblock) -{ - struct woinst *woinst = wave_dev->woinst; - struct emu10k1_card *card = wave_dev->card; - struct pt_data *pt = &card->pt; - u16 *ptr = (u16 *) card->tankmem.addr; - int i = 0, r; - unsigned long flags; - - r = pt_wait_for_write(wave_dev, nonblock); - if (r < 0) - return r; - spin_lock_irqsave(&card->pt.lock, flags); - while (i < PT_BLOCKSAMPLES) { - pt_putsamples(pt, ptr, block[2*i], block[2*i+1]); - if (pt->copyptr == 0) - pt->copyptr = PT_SAMPLES; - pt->copyptr--; - i++; - } - woinst->total_copied += PT_BLOCKSIZE; - pt->blocks_copied++; - if (pt->blocks_copied >= 4 && pt->state != PT_STATE_PLAYING) { - DPF(2, "activating digital pass-through playback\n"); - sblive_writeptr(card, GPR_BASE + pt->enable_gpr, 0, 1); - pt->state = PT_STATE_PLAYING; - } - spin_unlock_irqrestore(&card->pt.lock, flags); - return 0; -} - -int emu10k1_pt_setup(struct emu10k1_wavedevice *wave_dev) -{ - u32 bits; - struct emu10k1_card *card = wave_dev->card; - struct pt_data *pt = &card->pt; - int i; - - for (i = 0; i < 3; i++) { - pt->old_spcs[i] = sblive_readptr(card, SPCS0 + i, 0); - if (pt->spcs_to_use & (1 << i)) { - DPD(2, "using S/PDIF port %d\n", i); - bits = SPCS_CLKACCY_1000PPM | SPCS_SAMPLERATE_48 | - SPCS_CHANNELNUM_LEFT | SPCS_SOURCENUM_UNSPEC | SPCS_GENERATIONSTATUS | - 0x00001200 | SPCS_EMPHASIS_NONE | SPCS_COPYRIGHT; - if (pt->ac3data) - bits |= SPCS_NOTAUDIODATA; - sblive_writeptr(card, SPCS0 + i, 0, bits); - } - } - return 0; -} - -ssize_t emu10k1_pt_write(struct file *file, const char __user *buffer, size_t count) -{ - struct emu10k1_wavedevice *wave_dev = (struct emu10k1_wavedevice *) file->private_data; - struct emu10k1_card *card = wave_dev->card; - struct pt_data *pt = &card->pt; - int nonblock, i, r, blocks, blocks_copied, bytes_copied = 0; - - DPD(3, "emu10k1_pt_write(): %d bytes\n", count); - - nonblock = file->f_flags & O_NONBLOCK; - - if (card->tankmem.size < PT_SAMPLES*2) - return -EFAULT; - if (pt->state == PT_STATE_INACTIVE) { - DPF(2, "bufptr init\n"); - pt->playptr = PT_SAMPLES-1; - pt->copyptr = PT_INITPTR; - pt->blocks_played = pt->blocks_copied = 0; - memset(card->tankmem.addr, 0, card->tankmem.size); - pt->state = PT_STATE_ACTIVATED; - pt->buf = kmalloc(PT_BLOCKSIZE, GFP_KERNEL); - pt->prepend_size = 0; - if (pt->buf == NULL) - return -ENOMEM; - emu10k1_pt_setup(wave_dev); - } - if (pt->prepend_size) { - int needed = PT_BLOCKSIZE - pt->prepend_size; - - DPD(3, "prepend size %d, prepending %d bytes\n", pt->prepend_size, needed); - if (count < needed) { - if (copy_from_user(pt->buf + pt->prepend_size, - buffer, count)) - return -EFAULT; - pt->prepend_size += count; - DPD(3, "prepend size now %d\n", pt->prepend_size); - return count; - } - if (copy_from_user(pt->buf + pt->prepend_size, buffer, needed)) - return -EFAULT; - r = pt_putblock(wave_dev, (u16 *) pt->buf, nonblock); - if (r) - return r; - bytes_copied += needed; - pt->prepend_size = 0; - } - blocks = (count-bytes_copied)/PT_BLOCKSIZE; - blocks_copied = 0; - while (blocks > 0) { - u16 __user *bufptr = (u16 __user *) buffer + (bytes_copied/2); - if (copy_from_user(pt->buf, bufptr, PT_BLOCKSIZE)) - return -EFAULT; - r = pt_putblock(wave_dev, (u16 *)pt->buf, nonblock); - if (r) { - if (bytes_copied) - return bytes_copied; - else - return r; - } - bytes_copied += PT_BLOCKSIZE; - blocks--; - blocks_copied++; - } - i = count - bytes_copied; - if (i) { - pt->prepend_size = i; - if (copy_from_user(pt->buf, buffer + bytes_copied, i)) - return -EFAULT; - bytes_copied += i; - DPD(3, "filling prepend buffer with %d bytes", i); - } - return bytes_copied; -} - -void emu10k1_pt_stop(struct emu10k1_card *card) -{ - struct pt_data *pt = &card->pt; - int i; - - if (pt->state != PT_STATE_INACTIVE) { - DPF(2, "digital pass-through stopped\n"); - sblive_writeptr(card, (card->is_audigy ? A_GPR_BASE : GPR_BASE) + pt->enable_gpr, 0, 0); - for (i = 0; i < 3; i++) { - if (pt->spcs_to_use & (1 << i)) - sblive_writeptr(card, SPCS0 + i, 0, pt->old_spcs[i]); - } - pt->state = PT_STATE_INACTIVE; - kfree(pt->buf); - } -} - -void emu10k1_pt_waveout_update(struct emu10k1_wavedevice *wave_dev) -{ - struct woinst *woinst = wave_dev->woinst; - struct pt_data *pt = &wave_dev->card->pt; - u32 pos; - - if (pt->state == PT_STATE_PLAYING && pt->pos_gpr >= 0) { - pos = sblive_readptr(wave_dev->card, GPR_BASE + pt->pos_gpr, 0); - if (pos > PT_BLOCKSAMPLES) - pos = PT_BLOCKSAMPLES; - pos = 4 * (PT_BLOCKSAMPLES - pos); - } else - pos = 0; - woinst->total_played = pt->blocks_played * woinst->buffer.fragment_size + pos; - woinst->buffer.hw_pos = pos; -} diff --git a/sound/oss/emu10k1/passthrough.h b/sound/oss/emu10k1/passthrough.h deleted file mode 100644 index 420cc9784251..000000000000 --- a/sound/oss/emu10k1/passthrough.h +++ /dev/null @@ -1,99 +0,0 @@ -/* - ********************************************************************** - * passthrough.h -- Emu10k1 digital passthrough header file - * Copyright (C) 2001 Juha Yrjölä - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * May 15, 2001 Juha Yrjölä base code release - * - ********************************************************************** - * - * 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 _PASSTHROUGH_H -#define _PASSTHROUGH_H - -#include "audio.h" - -/* number of 16-bit stereo samples in XTRAM buffer */ -#define PT_SAMPLES 0x8000 -#define PT_BLOCKSAMPLES 0x400 -#define PT_BLOCKSIZE (PT_BLOCKSAMPLES*4) -#define PT_BLOCKSIZE_LOG2 12 -#define PT_BLOCKCOUNT (PT_SAMPLES/PT_BLOCKSAMPLES) -#define PT_INITPTR (PT_SAMPLES/2-1) - -#define PT_STATE_INACTIVE 0 -#define PT_STATE_ACTIVATED 1 -#define PT_STATE_PLAYING 2 - -/* passthrough struct */ -struct pt_data -{ - u8 selected, state, spcs_to_use; - int intr_gpr, enable_gpr, pos_gpr; - u32 blocks_played, blocks_copied, old_spcs[3]; - u32 playptr, copyptr; - u32 prepend_size; - u8 *buf; - u8 ac3data; - - char *patch_name, *intr_gpr_name, *enable_gpr_name, *pos_gpr_name; - - wait_queue_head_t wait; - spinlock_t lock; -}; - -/* - Passthrough can be done in two methods: - - Method 1 : tram - In original emu10k1, we couldn't bypass the sample rate converters. Even at 48kHz - (the internal sample rate of the emu10k1) the samples would get messed up. - To over come this, samples are copied into the tram and a special dsp patch copies - the samples out and generates interrupts when a block has finnished playing. - - Method 2 : Interpolator bypass - - Creative fixed the sample rate convert problem in emu10k1 rev 7 and higher - (including the emu10k2 (audigy)). This allows us to use the regular, and much simpler - playback method. - - - In both methods, dsp code is used to mux audio and passthrough. This ensures that the spdif - doesn't receive audio and pasthrough data at the same time. The spdif flag SPCS_NOTAUDIODATA - is set to tell - - */ - -// emu10k1 revs greater than or equal to 7 can use method2 - -#define USE_PT_METHOD2 (card->is_audigy) -#define USE_PT_METHOD1 !USE_PT_METHOD2 - -ssize_t emu10k1_pt_write(struct file *file, const char __user *buf, size_t count); - -int emu10k1_pt_setup(struct emu10k1_wavedevice *wave_dev); -void emu10k1_pt_stop(struct emu10k1_card *card); -void emu10k1_pt_waveout_update(struct emu10k1_wavedevice *wave_dev); - -#endif /* _PASSTHROUGH_H */ diff --git a/sound/oss/emu10k1/recmgr.c b/sound/oss/emu10k1/recmgr.c deleted file mode 100644 index 2ce56180e7d4..000000000000 --- a/sound/oss/emu10k1/recmgr.c +++ /dev/null @@ -1,147 +0,0 @@ -/* - ********************************************************************** - * recmgr.c -- Recording manager for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 -#include "8010.h" -#include "recmgr.h" - -void emu10k1_reset_record(struct emu10k1_card *card, struct wavein_buffer *buffer) -{ - DPF(2, "emu10k1_reset_record()\n"); - - sblive_writeptr(card, buffer->sizereg, 0, ADCBS_BUFSIZE_NONE); - - sblive_writeptr(card, buffer->sizereg, 0, buffer->sizeregval); - - while (sblive_readptr(card, buffer->idxreg, 0)) - udelay(5); -} - -void emu10k1_start_record(struct emu10k1_card *card, struct wavein_buffer *buffer) -{ - DPF(2, "emu10k1_start_record()\n"); - - if (buffer->adcctl) - sblive_writeptr(card, ADCCR, 0, buffer->adcctl); -} - -void emu10k1_stop_record(struct emu10k1_card *card, struct wavein_buffer *buffer) -{ - DPF(2, "emu10k1_stop_record()\n"); - - /* Disable record transfer */ - if (buffer->adcctl) - sblive_writeptr(card, ADCCR, 0, 0); -} - -void emu10k1_set_record_src(struct emu10k1_card *card, struct wiinst *wiinst) -{ - struct wavein_buffer *buffer = &wiinst->buffer; - - DPF(2, "emu10k1_set_record_src()\n"); - - switch (wiinst->recsrc) { - - case WAVERECORD_AC97: - DPF(2, "recording source: AC97\n"); - buffer->sizereg = ADCBS; - buffer->addrreg = ADCBA; - buffer->idxreg = card->is_audigy ? A_ADCIDX_IDX : ADCIDX_IDX; - - switch (wiinst->format.samplingrate) { - case 0xBB80: - buffer->adcctl = ADCCR_SAMPLERATE_48; - break; - case 0xAC44: - buffer->adcctl = ADCCR_SAMPLERATE_44; - break; - case 0x7D00: - buffer->adcctl = ADCCR_SAMPLERATE_32; - break; - case 0x5DC0: - buffer->adcctl = ADCCR_SAMPLERATE_24; - break; - case 0x5622: - buffer->adcctl = ADCCR_SAMPLERATE_22; - break; - case 0x3E80: - buffer->adcctl = ADCCR_SAMPLERATE_16; - break; - // FIXME: audigy supports 12kHz recording - /* - case ????: - buffer->adcctl = A_ADCCR_SAMPLERATE_12; - break; - */ - case 0x2B11: - buffer->adcctl = card->is_audigy ? A_ADCCR_SAMPLERATE_11 : ADCCR_SAMPLERATE_11; - break; - case 0x1F40: - buffer->adcctl = card->is_audigy ? A_ADCCR_SAMPLERATE_8 : ADCCR_SAMPLERATE_8; - break; - default: - BUG(); - break; - } - - buffer->adcctl |= card->is_audigy ? A_ADCCR_LCHANENABLE : ADCCR_LCHANENABLE; - - if (wiinst->format.channels == 2) - buffer->adcctl |= card->is_audigy ? A_ADCCR_RCHANENABLE : ADCCR_RCHANENABLE; - - break; - - case WAVERECORD_MIC: - DPF(2, "recording source: MIC\n"); - buffer->sizereg = MICBS; - buffer->addrreg = MICBA; - buffer->idxreg = MICIDX_IDX; - buffer->adcctl = 0; - break; - - case WAVERECORD_FX: - DPF(2, "recording source: FX\n"); - buffer->sizereg = FXBS; - buffer->addrreg = FXBA; - buffer->idxreg = FXIDX_IDX; - buffer->adcctl = 0; - - sblive_writeptr(card, FXWC, 0, wiinst->fxwc); - break; - default: - BUG(); - break; - } - - DPD(2, "bus addx: %#lx\n", (unsigned long) buffer->dma_handle); - - sblive_writeptr(card, buffer->addrreg, 0, (u32)buffer->dma_handle); -} diff --git a/sound/oss/emu10k1/recmgr.h b/sound/oss/emu10k1/recmgr.h deleted file mode 100644 index a68766ac4fd5..000000000000 --- a/sound/oss/emu10k1/recmgr.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - ********************************************************************** - * recmgr.h - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _RECORDMGR_H -#define _RECORDMGR_H - -#include "hwaccess.h" -#include "cardwi.h" - -/* Recording resources */ -#define WAVERECORD_AC97 0x01 -#define WAVERECORD_MIC 0x02 -#define WAVERECORD_FX 0x03 - -void emu10k1_reset_record(struct emu10k1_card *card, struct wavein_buffer *buffer); -void emu10k1_start_record(struct emu10k1_card *, struct wavein_buffer *); -void emu10k1_stop_record(struct emu10k1_card *, struct wavein_buffer *); -void emu10k1_set_record_src(struct emu10k1_card *, struct wiinst *wiinst); - -#endif /* _RECORDMGR_H */ diff --git a/sound/oss/emu10k1/timer.c b/sound/oss/emu10k1/timer.c deleted file mode 100644 index d10d30739f41..000000000000 --- a/sound/oss/emu10k1/timer.c +++ /dev/null @@ -1,176 +0,0 @@ - -/* - ********************************************************************** - * timer.c - * Copyright (C) 1999, 2000 Creative Labs, inc. - * - ********************************************************************** - * - * 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. - * - ********************************************************************** - */ - -/* 3/6/2000 Improved support for different timer delays Rui Sousa */ - -/* 4/3/2000 Implemented timer list using list.h Rui Sousa */ - -#include "hwaccess.h" -#include "8010.h" -#include "irqmgr.h" -#include "timer.h" - -/* Try to schedule only once per fragment */ - -void emu10k1_timer_irqhandler(struct emu10k1_card *card) -{ - struct emu_timer *t; - struct list_head *entry; - - spin_lock(&card->timer_lock); - - list_for_each(entry, &card->timers) { - t = list_entry(entry, struct emu_timer, list); - - if (t->state & TIMER_STATE_ACTIVE) { - t->count++; - if (t->count == t->count_max) { - t->count = 0; - tasklet_hi_schedule(&t->tasklet); - } - } - } - - spin_unlock(&card->timer_lock); - - return; -} - -void emu10k1_timer_install(struct emu10k1_card *card, struct emu_timer *timer, u16 delay) -{ - struct emu_timer *t; - struct list_head *entry; - unsigned long flags; - - if (delay < 5) - delay = 5; - - timer->delay = delay; - timer->state = TIMER_STATE_INSTALLED; - - spin_lock_irqsave(&card->timer_lock, flags); - - timer->count_max = timer->delay / (card->timer_delay < 1024 ? card->timer_delay : 1024); - timer->count = timer->count_max - 1; - - list_add(&timer->list, &card->timers); - - if (card->timer_delay > delay) { - if (card->timer_delay == TIMER_STOPPED) - emu10k1_irq_enable(card, INTE_INTERVALTIMERENB); - - card->timer_delay = delay; - delay = (delay < 1024 ? delay : 1024); - - emu10k1_timer_set(card, delay); - - list_for_each(entry, &card->timers) { - t = list_entry(entry, struct emu_timer, list); - - t->count_max = t->delay / delay; - /* don't want to think much, just force scheduling - on the next interrupt */ - t->count = t->count_max - 1; - } - - DPD(2, "timer rate --> %u\n", delay); - } - - spin_unlock_irqrestore(&card->timer_lock, flags); - - return; -} - -void emu10k1_timer_uninstall(struct emu10k1_card *card, struct emu_timer *timer) -{ - struct emu_timer *t; - struct list_head *entry; - u16 delay = TIMER_STOPPED; - unsigned long flags; - - if (timer->state == TIMER_STATE_UNINSTALLED) - return; - - spin_lock_irqsave(&card->timer_lock, flags); - - list_del(&timer->list); - - list_for_each(entry, &card->timers) { - t = list_entry(entry, struct emu_timer, list); - - if (t->delay < delay) - delay = t->delay; - } - - if (card->timer_delay != delay) { - card->timer_delay = delay; - - if (delay == TIMER_STOPPED) - emu10k1_irq_disable(card, INTE_INTERVALTIMERENB); - else { - delay = (delay < 1024 ? delay : 1024); - - emu10k1_timer_set(card, delay); - - list_for_each(entry, &card->timers) { - t = list_entry(entry, struct emu_timer, list); - - t->count_max = t->delay / delay; - t->count = t->count_max - 1; - } - } - - DPD(2, "timer rate --> %u\n", delay); - } - - spin_unlock_irqrestore(&card->timer_lock, flags); - - timer->state = TIMER_STATE_UNINSTALLED; - - return; -} - -void emu10k1_timer_enable(struct emu10k1_card *card, struct emu_timer *timer) -{ - unsigned long flags; - - spin_lock_irqsave(&card->timer_lock, flags); - timer->state |= TIMER_STATE_ACTIVE; - spin_unlock_irqrestore(&card->timer_lock, flags); - - return; -} - -void emu10k1_timer_disable(struct emu10k1_card *card, struct emu_timer *timer) -{ - unsigned long flags; - - spin_lock_irqsave(&card->timer_lock, flags); - timer->state &= ~TIMER_STATE_ACTIVE; - spin_unlock_irqrestore(&card->timer_lock, flags); - - return; -} diff --git a/sound/oss/emu10k1/timer.h b/sound/oss/emu10k1/timer.h deleted file mode 100644 index b2543b4d53a8..000000000000 --- a/sound/oss/emu10k1/timer.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - ********************************************************************** - * timer.h - * Copyright (C) 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * 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 _TIMER_H -#define _TIMER_H - -#include -#include -#include "hwaccess.h" - -struct emu_timer -{ - struct list_head list; - struct tasklet_struct tasklet; - u8 state; - u16 count; /* current number of interrupts */ - u16 count_max; /* number of interrupts needed to schedule the bh */ - u16 delay; /* timer delay */ -}; - -void emu10k1_timer_install(struct emu10k1_card *, struct emu_timer *, u16); -void emu10k1_timer_uninstall(struct emu10k1_card *, struct emu_timer *); -void emu10k1_timer_enable(struct emu10k1_card *, struct emu_timer *); -void emu10k1_timer_disable(struct emu10k1_card *, struct emu_timer *); - -#define TIMER_STOPPED 0xffff -#define TIMER_STATE_INSTALLED 0x01 -#define TIMER_STATE_ACTIVE 0x02 -#define TIMER_STATE_UNINSTALLED 0x04 - -#endif /* _TIMER_H */ diff --git a/sound/oss/emu10k1/voicemgr.c b/sound/oss/emu10k1/voicemgr.c deleted file mode 100644 index d88b602c07c2..000000000000 --- a/sound/oss/emu10k1/voicemgr.c +++ /dev/null @@ -1,398 +0,0 @@ -/* - ********************************************************************** - * voicemgr.c - Voice manager for emu10k1 driver - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 "voicemgr.h" -#include "8010.h" - -#define PITCH_48000 0x00004000 -#define PITCH_96000 0x00008000 -#define PITCH_85000 0x00007155 -#define PITCH_80726 0x00006ba2 -#define PITCH_67882 0x00005a82 -#define PITCH_57081 0x00004c1c - -static u32 emu10k1_select_interprom(struct emu10k1_card *card, - struct emu_voice *voice) -{ - if(voice->pitch_target==PITCH_48000) - return CCCA_INTERPROM_0; - else if(voice->pitch_targetpitch_target>=PITCH_96000) - return CCCA_INTERPROM_0; - else if(voice->pitch_target>=PITCH_85000) - return CCCA_INTERPROM_6; - else if(voice->pitch_target>=PITCH_80726) - return CCCA_INTERPROM_5; - else if(voice->pitch_target>=PITCH_67882) - return CCCA_INTERPROM_4; - else if(voice->pitch_target>=PITCH_57081) - return CCCA_INTERPROM_3; - else - return CCCA_INTERPROM_2; -} - - -/** - * emu10k1_voice_alloc_buffer - - * - * allocates the memory buffer for a voice. Two page tables are kept for each buffer. - * One (dma_handle) keeps track of the host memory pages used and the other (virtualpagetable) - * is passed to the device so that it can do DMA to host memory. - * - */ -int emu10k1_voice_alloc_buffer(struct emu10k1_card *card, struct voice_mem *mem, u32 pages) -{ - u32 pageindex, pagecount; - u32 busaddx; - int i; - - DPD(2, "requested pages is: %d\n", pages); - - if ((mem->emupageindex = emu10k1_addxmgr_alloc(pages * PAGE_SIZE, card)) < 0) - { - DPF(1, "couldn't allocate emu10k1 address space\n"); - return -1; - } - - /* Fill in virtual memory table */ - for (pagecount = 0; pagecount < pages; pagecount++) { - if ((mem->addr[pagecount] = pci_alloc_consistent(card->pci_dev, PAGE_SIZE, &mem->dma_handle[pagecount])) - == NULL) { - mem->pages = pagecount; - DPF(1, "couldn't allocate dma memory\n"); - return -1; - } - - DPD(2, "Virtual Addx: %p\n", mem->addr[pagecount]); - - for (i = 0; i < PAGE_SIZE / EMUPAGESIZE; i++) { - busaddx = (u32) mem->dma_handle[pagecount] + i * EMUPAGESIZE; - - DPD(3, "Bus Addx: %#x\n", busaddx); - - pageindex = mem->emupageindex + pagecount * PAGE_SIZE / EMUPAGESIZE + i; - - ((u32 *) card->virtualpagetable.addr)[pageindex] = cpu_to_le32((busaddx * 2) | pageindex); - } - } - - mem->pages = pagecount; - - return 0; -} - -/** - * emu10k1_voice_free_buffer - - * - * frees the memory buffer for a voice. - */ -void emu10k1_voice_free_buffer(struct emu10k1_card *card, struct voice_mem *mem) -{ - u32 pagecount, pageindex; - int i; - - if (mem->emupageindex < 0) - return; - - for (pagecount = 0; pagecount < mem->pages; pagecount++) { - pci_free_consistent(card->pci_dev, PAGE_SIZE, - mem->addr[pagecount], - mem->dma_handle[pagecount]); - - for (i = 0; i < PAGE_SIZE / EMUPAGESIZE; i++) { - pageindex = mem->emupageindex + pagecount * PAGE_SIZE / EMUPAGESIZE + i; - ((u32 *) card->virtualpagetable.addr)[pageindex] = - cpu_to_le32(((u32) card->silentpage.dma_handle * 2) | pageindex); - } - } - - emu10k1_addxmgr_free(card, mem->emupageindex); - mem->emupageindex = -1; -} - -int emu10k1_voice_alloc(struct emu10k1_card *card, struct emu_voice *voice) -{ - u8 *voicetable = card->voicetable; - int i; - unsigned long flags; - - DPF(2, "emu10k1_voice_alloc()\n"); - - spin_lock_irqsave(&card->lock, flags); - - if (voice->flags & VOICE_FLAGS_STEREO) { - for (i = 0; i < NUM_G; i += 2) - if ((voicetable[i] == VOICE_USAGE_FREE) && (voicetable[i + 1] == VOICE_USAGE_FREE)) { - voicetable[i] = voice->usage; - voicetable[i + 1] = voice->usage; - break; - } - } else { - for (i = 0; i < NUM_G; i++) - if (voicetable[i] == VOICE_USAGE_FREE) { - voicetable[i] = voice->usage; - break; - } - } - - spin_unlock_irqrestore(&card->lock, flags); - - if (i >= NUM_G) - return -1; - - voice->card = card; - voice->num = i; - - for (i = 0; i < (voice->flags & VOICE_FLAGS_STEREO ? 2 : 1); i++) { - DPD(2, " voice allocated -> %d\n", voice->num + i); - - sblive_writeptr_tag(card, voice->num + i, IFATN, 0xffff, - DCYSUSV, 0, - VTFT, 0x0000ffff, - PTRX, 0, - TAGLIST_END); - } - - return 0; -} - -void emu10k1_voice_free(struct emu_voice *voice) -{ - struct emu10k1_card *card = voice->card; - int i; - unsigned long flags; - - DPF(2, "emu10k1_voice_free()\n"); - - if (voice->usage == VOICE_USAGE_FREE) - return; - - for (i = 0; i < (voice->flags & VOICE_FLAGS_STEREO ? 2 : 1); i++) { - DPD(2, " voice released -> %d\n", voice->num + i); - - sblive_writeptr_tag(card, voice->num + i, DCYSUSV, 0, - VTFT, 0x0000ffff, - PTRX_PITCHTARGET, 0, - CVCF, 0x0000ffff, - //CPF, 0, - TAGLIST_END); - - sblive_writeptr(card, CPF, voice->num + i, 0); - } - - voice->usage = VOICE_USAGE_FREE; - - spin_lock_irqsave(&card->lock, flags); - - card->voicetable[voice->num] = VOICE_USAGE_FREE; - - if (voice->flags & VOICE_FLAGS_STEREO) - card->voicetable[voice->num + 1] = VOICE_USAGE_FREE; - - spin_unlock_irqrestore(&card->lock, flags); -} - -void emu10k1_voice_playback_setup(struct emu_voice *voice) -{ - struct emu10k1_card *card = voice->card; - u32 start; - int i; - - DPF(2, "emu10k1_voice_playback_setup()\n"); - - if (voice->flags & VOICE_FLAGS_STEREO) { - /* Set stereo bit */ - start = 28; - sblive_writeptr(card, CPF, voice->num, CPF_STEREO_MASK); - sblive_writeptr(card, CPF, voice->num + 1, CPF_STEREO_MASK); - } else { - start = 30; - sblive_writeptr(card, CPF, voice->num, 0); - } - - if(!(voice->flags & VOICE_FLAGS_16BIT)) - start *= 2; - - voice->start += start; - - for (i = 0; i < (voice->flags & VOICE_FLAGS_STEREO ? 2 : 1); i++) { - if (card->is_audigy) { - sblive_writeptr(card, A_FXRT1, voice->num + i, voice->params[i].send_routing); - sblive_writeptr(card, A_FXRT2, voice->num + i, voice->params[i].send_routing2); - sblive_writeptr(card, A_SENDAMOUNTS, voice->num + i, voice->params[i].send_hgfe); - } else { - sblive_writeptr(card, FXRT, voice->num + i, voice->params[i].send_routing << 16); - } - - /* Stop CA */ - /* Assumption that PT is already 0 so no harm overwriting */ - sblive_writeptr(card, PTRX, voice->num + i, ((voice->params[i].send_dcba & 0xff) << 8) - | ((voice->params[i].send_dcba & 0xff00) >> 8)); - - sblive_writeptr_tag(card, voice->num + i, - /* CSL, ST, CA */ - DSL, voice->endloop | (voice->params[i].send_dcba & 0xff000000), - PSST, voice->startloop | ((voice->params[i].send_dcba & 0x00ff0000) << 8), - CCCA, (voice->start) | emu10k1_select_interprom(card,voice) | - ((voice->flags & VOICE_FLAGS_16BIT) ? 0 : CCCA_8BITSELECT), - /* Clear filter delay memory */ - Z1, 0, - Z2, 0, - /* Invalidate maps */ - MAPA, MAP_PTI_MASK | ((u32) card->silentpage.dma_handle * 2), - MAPB, MAP_PTI_MASK | ((u32) card->silentpage.dma_handle * 2), - /* modulation envelope */ - CVCF, 0x0000ffff, - VTFT, 0x0000ffff, - ATKHLDM, 0, - DCYSUSM, 0x007f, - LFOVAL1, 0x8000, - LFOVAL2, 0x8000, - FMMOD, 0, - TREMFRQ, 0, - FM2FRQ2, 0, - ENVVAL, 0x8000, - /* volume envelope */ - ATKHLDV, 0x7f7f, - ENVVOL, 0x8000, - /* filter envelope */ - PEFE_FILTERAMOUNT, 0x7f, - /* pitch envelope */ - PEFE_PITCHAMOUNT, 0, TAGLIST_END); - - voice->params[i].fc_target = 0xffff; - } -} - -void emu10k1_voices_start(struct emu_voice *first_voice, unsigned int num_voices, int set) -{ - struct emu10k1_card *card = first_voice->card; - struct emu_voice *voice; - unsigned int voicenum; - int j; - - DPF(2, "emu10k1_voices_start()\n"); - - for (voicenum = 0; voicenum < num_voices; voicenum++) - { - voice = first_voice + voicenum; - - if (!set) { - u32 cra, ccis, cs, sample; - if (voice->flags & VOICE_FLAGS_STEREO) { - cra = 64; - ccis = 28; - cs = 4; - } else { - cra = 64; - ccis = 30; - cs = 2; - } - - if(voice->flags & VOICE_FLAGS_16BIT) { - sample = 0x00000000; - } else { - sample = 0x80808080; - ccis *= 2; - } - - for(j = 0; j < cs; j++) - sblive_writeptr(card, CD0 + j, voice->num, sample); - - /* Reset cache */ - sblive_writeptr(card, CCR_CACHEINVALIDSIZE, voice->num, 0); - if (voice->flags & VOICE_FLAGS_STEREO) - sblive_writeptr(card, CCR_CACHEINVALIDSIZE, voice->num + 1, 0); - - sblive_writeptr(card, CCR_READADDRESS, voice->num, cra); - - if (voice->flags & VOICE_FLAGS_STEREO) - sblive_writeptr(card, CCR_READADDRESS, voice->num + 1, cra); - - /* Fill cache */ - sblive_writeptr(card, CCR_CACHEINVALIDSIZE, voice->num, ccis); - } - - for (j = 0; j < (voice->flags & VOICE_FLAGS_STEREO ? 2 : 1); j++) { - sblive_writeptr_tag(card, voice->num + j, - IFATN, (voice->params[j].initial_fc << 8) | voice->params[j].initial_attn, - VTFT, (voice->params[j].volume_target << 16) | voice->params[j].fc_target, - CVCF, (voice->params[j].volume_target << 16) | voice->params[j].fc_target, - DCYSUSV, (voice->params[j].byampl_env_sustain << 8) | voice->params[j].byampl_env_decay, - TAGLIST_END); - - emu10k1_clear_stop_on_loop(card, voice->num + j); - } - } - - - for (voicenum = 0; voicenum < num_voices; voicenum++) - { - voice = first_voice + voicenum; - - for (j = 0; j < (voice->flags & VOICE_FLAGS_STEREO ? 2 : 1); j++) { - sblive_writeptr(card, PTRX_PITCHTARGET, voice->num + j, voice->pitch_target); - - if (j == 0) - sblive_writeptr(card, CPF_CURRENTPITCH, voice->num, voice->pitch_target); - - sblive_writeptr(card, IP, voice->num + j, voice->initial_pitch); - } - } -} - -void emu10k1_voices_stop(struct emu_voice *first_voice, int num_voices) -{ - struct emu10k1_card *card = first_voice->card; - struct emu_voice *voice; - unsigned int voice_num; - int j; - - DPF(2, "emu10k1_voice_stop()\n"); - - for (voice_num = 0; voice_num < num_voices; voice_num++) - { - voice = first_voice + voice_num; - - for (j = 0; j < (voice->flags & VOICE_FLAGS_STEREO ? 2 : 1); j++) { - sblive_writeptr_tag(card, voice->num + j, - PTRX_PITCHTARGET, 0, - CPF_CURRENTPITCH, 0, - IFATN, 0xffff, - VTFT, 0x0000ffff, - CVCF, 0x0000ffff, - IP, 0, - TAGLIST_END); - } - } -} - diff --git a/sound/oss/emu10k1/voicemgr.h b/sound/oss/emu10k1/voicemgr.h deleted file mode 100644 index 099a8cb7f2c5..000000000000 --- a/sound/oss/emu10k1/voicemgr.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - ********************************************************************** - * sblive_voice.h -- EMU Voice Resource Manager header file - * Copyright 1999, 2000 Creative Labs, Inc. - * - ********************************************************************** - * - * Date Author Summary of changes - * ---- ------ ------------------ - * October 20, 1999 Bertrand Lee base code release - * - ********************************************************************** - * - * 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 _VOICEMGR_H -#define _VOICEMGR_H - -#include "hwaccess.h" - -/* struct emu_voice.usage flags */ -#define VOICE_USAGE_FREE 0x01 -#define VOICE_USAGE_MIDI 0x02 -#define VOICE_USAGE_PLAYBACK 0x04 - -/* struct emu_voice.flags flags */ -#define VOICE_FLAGS_STEREO 0x02 -#define VOICE_FLAGS_16BIT 0x04 - -struct voice_param -{ - /* FX bus amount send */ - - u32 send_routing; - // audigy only: - u32 send_routing2; - - u32 send_dcba; - // audigy only: - u32 send_hgfe; - - - u32 initial_fc; - u32 fc_target; - - u32 initial_attn; - u32 volume_target; - - u32 byampl_env_sustain; - u32 byampl_env_decay; -}; - -struct voice_mem { - int emupageindex; - void *addr[BUFMAXPAGES]; - dma_addr_t dma_handle[BUFMAXPAGES]; - u32 pages; -}; - -struct emu_voice -{ - struct emu10k1_card *card; - u8 usage; /* Free, MIDI, playback */ - u8 num; /* Voice ID */ - u8 flags; /* Stereo/mono, 8/16 bit */ - - u32 startloop; - u32 endloop; - u32 start; - - u32 initial_pitch; - u32 pitch_target; - - struct voice_param params[2]; - - struct voice_mem mem; -}; - -int emu10k1_voice_alloc_buffer(struct emu10k1_card *, struct voice_mem *, u32); -void emu10k1_voice_free_buffer(struct emu10k1_card *, struct voice_mem *); -int emu10k1_voice_alloc(struct emu10k1_card *, struct emu_voice *); -void emu10k1_voice_free(struct emu_voice *); -void emu10k1_voice_playback_setup(struct emu_voice *); -void emu10k1_voices_start(struct emu_voice *, unsigned int, int); -void emu10k1_voices_stop(struct emu_voice *, int); - -#endif /* _VOICEMGR_H */ diff --git a/sound/oss/nm256.h b/sound/oss/nm256.h deleted file mode 100644 index 1dade9033995..000000000000 --- a/sound/oss/nm256.h +++ /dev/null @@ -1,292 +0,0 @@ -#ifndef _NM256_H_ -#define _NM256_H_ - -#include -#include - -#include "ac97.h" - -/* The revisions that we currently handle. */ -enum nm256rev { - REV_NM256AV, REV_NM256ZX -}; - -/* Per-card structure. */ -struct nm256_info -{ - /* Magic number used to verify that this struct is valid. */ -#define NM_MAGIC_SIG 0x55aa00ff - int magsig; - - /* Revision number */ - enum nm256rev rev; - - struct ac97_hwint mdev; - - /* Our audio device numbers. */ - int dev[2]; - - /* The # of times each device has been opened. (Should only be - 0 or 1). */ - int opencnt[2]; - - /* We use two devices, because we can do simultaneous play and record. - This keeps track of which device is being used for what purpose; - these are the actual device numbers. */ - int dev_for_play; - int dev_for_record; - - spinlock_t lock; - - /* The mixer device. */ - int mixer_oss_dev; - - /* - * Can only be opened once for each operation. These aren't set - * until an actual I/O operation is performed; this allows one - * device to be open for read/write without inhibiting I/O to - * the other device. - */ - int is_open_play; - int is_open_record; - - /* Non-zero if we're currently playing a sample. */ - int playing; - /* Ditto for recording a sample. */ - int recording; - - /* The two memory ports. */ - struct nm256_ports { - /* Physical address of the port. */ - u32 physaddr; - /* Our mapped-in pointer. */ - char __iomem *ptr; - /* PTR's offset within the physical port. */ - u32 start_offset; - /* And the offset of the end of the buffer. */ - u32 end_offset; - } port[2]; - - /* The following are offsets within memory port 1. */ - u32 coeffBuf; - u32 allCoeffBuf; - - /* Record and playback buffers. */ - u32 abuf1, abuf2; - - /* Offset of the AC97 mixer in memory port 2. */ - u32 mixer; - - /* Offset of the mixer status register in memory port 2. */ - u32 mixer_status_offset; - - /* Non-zero if we have written initial values to the mixer. */ - u8 mixer_values_init; - - /* - * Status mask bit; (*mixer_status_loc & mixer_status_mask) == 0 means - * it's ready. - */ - u16 mixer_status_mask; - - /* The sizes of the playback and record ring buffers. */ - u32 playbackBufferSize; - u32 recordBufferSize; - - /* Are the coefficient values in the memory cache current? */ - u8 coeffsCurrent; - - /* For writes, the amount we last wrote. */ - u32 requested_amt; - /* The start of the block currently playing. */ - u32 curPlayPos; - - /* The amount of data we were requested to record. */ - u32 requestedRecAmt; - /* The offset of the currently-recording block. */ - u32 curRecPos; - /* The destination buffer. */ - char *recBuf; - - /* Our IRQ number. */ - int irq; - - /* A flag indicating how many times we've grabbed the IRQ. */ - int has_irq; - - /* The card interrupt service routine. */ - irq_handler_t introutine; - - /* Current audio config, cached. */ - struct sinfo { - u32 samplerate; - u8 bits; - u8 stereo; - } sinfo[2]; /* goes with each device */ - - /* The cards are stored in a chain; this is the next card. */ - struct nm256_info *next_card; -}; - -/* The BIOS signature. */ -#define NM_SIGNATURE 0x4e4d0000 -/* Signature mask. */ -#define NM_SIG_MASK 0xffff0000 - -/* Size of the second memory area. */ -#define NM_PORT2_SIZE 4096 - -/* The base offset of the mixer in the second memory area. */ -#define NM_MIXER_OFFSET 0x600 - -/* The maximum size of a coefficient entry. */ -#define NM_MAX_COEFFICIENT 0x5000 - -/* The interrupt register. */ -#define NM_INT_REG 0xa04 -/* And its bits. */ -#define NM_PLAYBACK_INT 0x40 -#define NM_RECORD_INT 0x100 -#define NM_MISC_INT_1 0x4000 -#define NM_MISC_INT_2 0x1 -#define NM_ACK_INT(CARD, X) nm256_writePort16((CARD), 2, NM_INT_REG, (X) << 1) - -/* The AV's "mixer ready" status bit and location. */ -#define NM_MIXER_STATUS_OFFSET 0xa04 -#define NM_MIXER_READY_MASK 0x0800 -#define NM_MIXER_PRESENCE 0xa06 -#define NM_PRESENCE_MASK 0x0050 -#define NM_PRESENCE_VALUE 0x0040 - -/* - * For the ZX. It uses the same interrupt register, but it holds 32 - * bits instead of 16. - */ -#define NM2_PLAYBACK_INT 0x10000 -#define NM2_RECORD_INT 0x80000 -#define NM2_MISC_INT_1 0x8 -#define NM2_MISC_INT_2 0x2 -#define NM2_ACK_INT(CARD, X) nm256_writePort32((CARD), 2, NM_INT_REG, (X)) - -/* The ZX's "mixer ready" status bit and location. */ -#define NM2_MIXER_STATUS_OFFSET 0xa06 -#define NM2_MIXER_READY_MASK 0x0800 - -/* The playback registers start from here. */ -#define NM_PLAYBACK_REG_OFFSET 0x0 -/* The record registers start from here. */ -#define NM_RECORD_REG_OFFSET 0x200 - -/* The rate register is located 2 bytes from the start of the register area. */ -#define NM_RATE_REG_OFFSET 2 - -/* Mono/stereo flag, number of bits on playback, and rate mask. */ -#define NM_RATE_STEREO 1 -#define NM_RATE_BITS_16 2 -#define NM_RATE_MASK 0xf0 - -/* Playback enable register. */ -#define NM_PLAYBACK_ENABLE_REG (NM_PLAYBACK_REG_OFFSET + 0x1) -#define NM_PLAYBACK_ENABLE_FLAG 1 -#define NM_PLAYBACK_ONESHOT 2 -#define NM_PLAYBACK_FREERUN 4 - -/* Mutes the audio output. */ -#define NM_AUDIO_MUTE_REG (NM_PLAYBACK_REG_OFFSET + 0x18) -#define NM_AUDIO_MUTE_LEFT 0x8000 -#define NM_AUDIO_MUTE_RIGHT 0x0080 - -/* Recording enable register. */ -#define NM_RECORD_ENABLE_REG (NM_RECORD_REG_OFFSET + 0) -#define NM_RECORD_ENABLE_FLAG 1 -#define NM_RECORD_FREERUN 2 - -#define NM_RBUFFER_START (NM_RECORD_REG_OFFSET + 0x4) -#define NM_RBUFFER_END (NM_RECORD_REG_OFFSET + 0x10) -#define NM_RBUFFER_WMARK (NM_RECORD_REG_OFFSET + 0xc) -#define NM_RBUFFER_CURRP (NM_RECORD_REG_OFFSET + 0x8) - -#define NM_PBUFFER_START (NM_PLAYBACK_REG_OFFSET + 0x4) -#define NM_PBUFFER_END (NM_PLAYBACK_REG_OFFSET + 0x14) -#define NM_PBUFFER_WMARK (NM_PLAYBACK_REG_OFFSET + 0xc) -#define NM_PBUFFER_CURRP (NM_PLAYBACK_REG_OFFSET + 0x8) - -/* A few trivial routines to make it easier to work with the registers - on the chip. */ - -/* This is a common code portion used to fix up the port offsets. */ -#define NM_FIX_PORT \ - if (port < 1 || port > 2 || card == NULL) \ - return -1; \ -\ - if (offset < card->port[port - 1].start_offset \ - || offset >= card->port[port - 1].end_offset) { \ - printk (KERN_ERR "Bad access: port %d, offset 0x%x\n", port, offset); \ - return -1; \ - } \ - offset -= card->port[port - 1].start_offset; - -#define DEFwritePortX(X, func) \ -static inline int nm256_writePort##X (struct nm256_info *card,\ - int port, int offset, int value)\ -{\ - u##X __iomem *addr;\ -\ - if (nm256_debug > 1)\ - printk (KERN_DEBUG "Writing 0x%x to %d:0x%x\n", value, port, offset);\ -\ - NM_FIX_PORT;\ -\ - addr = (u##X __iomem *)(card->port[port - 1].ptr + offset);\ - func (value, addr);\ - return 0;\ -} - -DEFwritePortX (8, writeb) -DEFwritePortX (16, writew) -DEFwritePortX (32, writel) - -#define DEFreadPortX(X, func) \ -static inline u##X nm256_readPort##X (struct nm256_info *card,\ - int port, int offset)\ -{\ - u##X __iomem *addr;\ -\ - NM_FIX_PORT\ -\ - addr = (u##X __iomem *)(card->port[port - 1].ptr + offset);\ - return func(addr);\ -} - -DEFreadPortX (8, readb) -DEFreadPortX (16, readw) -DEFreadPortX (32, readl) - -static inline int -nm256_writeBuffer8 (struct nm256_info *card, u8 *src, int port, int offset, - int amt) -{ - NM_FIX_PORT; - memcpy_toio (card->port[port - 1].ptr + offset, src, amt); - return 0; -} - -static inline int -nm256_readBuffer8 (struct nm256_info *card, u8 *dst, int port, int offset, - int amt) -{ - NM_FIX_PORT; - memcpy_fromio (dst, card->port[port - 1].ptr + offset, amt); - return 0; -} - -/* Returns a non-zero value if we should use the coefficient cache. */ -static int nm256_cachedCoefficients (struct nm256_info *card); - -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/sound/oss/nm256_audio.c b/sound/oss/nm256_audio.c deleted file mode 100644 index 44cd15505001..000000000000 --- a/sound/oss/nm256_audio.c +++ /dev/null @@ -1,1662 +0,0 @@ -/* - * Audio driver for the NeoMagic 256AV and 256ZX chipsets in native - * mode, with AC97 mixer support. - * - * Overall design and parts of this code stolen from vidc_*.c and - * skeleton.c. - * - * Yeah, there are a lot of magic constants in here. You tell ME what - * they are. I just get this stuff psychically, remember? - * - * This driver was written by someone who wishes to remain anonymous. - * It is in the public domain, so share and enjoy. Try to make a profit - * off of it; go on, I dare you. - * - * Changes: - * 11-10-2000 Bartlomiej Zolnierkiewicz - * Added some __init - * 19-04-2001 Marcus Meissner - * Ported to 2.4 PCI API. - */ - -#include -#include -#include -#include -#include -#include -#include -#include "sound_config.h" - -static int nm256_debug; -static int force_load; - -#include "nm256.h" -#include "nm256_coeff.h" - -/* - * The size of the playback reserve. When the playback buffer has less - * than NM256_PLAY_WMARK_SIZE bytes to output, we request a new - * buffer. - */ -#define NM256_PLAY_WMARK_SIZE 512 - -static struct audio_driver nm256_audio_driver; - -static int nm256_grabInterrupt (struct nm256_info *card); -static int nm256_releaseInterrupt (struct nm256_info *card); -static irqreturn_t nm256_interrupt (int irq, void *dev_id); -static irqreturn_t nm256_interrupt_zx (int irq, void *dev_id); - -/* These belong in linux/pci.h. */ -#define PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO 0x8005 -#define PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO 0x8006 -#define PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO 0x8016 - -/* List of cards. */ -static struct nm256_info *nmcard_list; - -/* Release the mapped-in memory for CARD. */ -static void -nm256_release_ports (struct nm256_info *card) -{ - int x; - - for (x = 0; x < 2; x++) { - if (card->port[x].ptr != NULL) { - iounmap (card->port[x].ptr); - card->port[x].ptr = NULL; - } - } -} - -/* - * Map in the memory ports for CARD, if they aren't already mapped in - * and have been configured. If successful, a zero value is returned; - * otherwise any previously mapped-in areas are released and a non-zero - * value is returned. - * - * This is invoked twice, once for each port. Ideally it would only be - * called once, but we now need to map in the second port in order to - * check how much memory the card has on the 256ZX. - */ -static int -nm256_remap_ports (struct nm256_info *card) -{ - int x; - - for (x = 0; x < 2; x++) { - if (card->port[x].ptr == NULL && card->port[x].end_offset > 0) { - u32 physaddr - = card->port[x].physaddr + card->port[x].start_offset; - u32 size - = card->port[x].end_offset - card->port[x].start_offset; - - card->port[x].ptr = ioremap_nocache (physaddr, size); - - if (card->port[x].ptr == NULL) { - printk (KERN_ERR "NM256: Unable to remap port %d\n", x + 1); - nm256_release_ports (card); - return -1; - } - } - } - return 0; -} - -/* Locate the card in our list. */ -static struct nm256_info * -nm256_find_card (int dev) -{ - struct nm256_info *card; - - for (card = nmcard_list; card != NULL; card = card->next_card) - if (card->dev[0] == dev || card->dev[1] == dev) - return card; - - return NULL; -} - -/* - * Ditto, but find the card struct corresponding to the mixer device DEV - * instead. - */ -static struct nm256_info * -nm256_find_card_for_mixer (int dev) -{ - struct nm256_info *card; - - for (card = nmcard_list; card != NULL; card = card->next_card) - if (card->mixer_oss_dev == dev) - return card; - - return NULL; -} - -static int usecache; -static int buffertop; - -/* Check to see if we're using the bank of cached coefficients. */ -static int -nm256_cachedCoefficients (struct nm256_info *card) -{ - return usecache; -} - -/* The actual rates supported by the card. */ -static int samplerates[9] = { - 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000, 99999999 -}; - -/* - * Set the card samplerate, word size and stereo mode to correspond to - * the settings in the CARD struct for the specified device in DEV. - * We keep two separate sets of information, one for each device; the - * hardware is not actually configured until a read or write is - * attempted. - */ - -static int -nm256_setInfo (int dev, struct nm256_info *card) -{ - int x; - int w; - int targetrate; - - if (card->dev[0] == dev) - w = 0; - else if (card->dev[1] == dev) - w = 1; - else - return -ENODEV; - - targetrate = card->sinfo[w].samplerate; - - if ((card->sinfo[w].bits != 8 && card->sinfo[w].bits != 16) - || targetrate < samplerates[0] - || targetrate > samplerates[7]) - return -EINVAL; - - for (x = 0; x < 8; x++) - if (targetrate < ((samplerates[x] + samplerates[x + 1]) / 2)) - break; - - if (x < 8) { - u8 ratebits = ((x << 4) & NM_RATE_MASK); - if (card->sinfo[w].bits == 16) - ratebits |= NM_RATE_BITS_16; - if (card->sinfo[w].stereo) - ratebits |= NM_RATE_STEREO; - - card->sinfo[w].samplerate = samplerates[x]; - - - if (card->dev_for_play == dev && card->playing) { - if (nm256_debug) - printk (KERN_DEBUG "Setting play ratebits to 0x%x\n", - ratebits); - nm256_loadCoefficient (card, 0, x); - nm256_writePort8 (card, 2, - NM_PLAYBACK_REG_OFFSET + NM_RATE_REG_OFFSET, - ratebits); - } - - if (card->dev_for_record == dev && card->recording) { - if (nm256_debug) - printk (KERN_DEBUG "Setting record ratebits to 0x%x\n", - ratebits); - nm256_loadCoefficient (card, 1, x); - nm256_writePort8 (card, 2, - NM_RECORD_REG_OFFSET + NM_RATE_REG_OFFSET, - ratebits); - } - return 0; - } - else - return -EINVAL; -} - -/* Start the play process going. */ -static void -startPlay (struct nm256_info *card) -{ - if (! card->playing) { - card->playing = 1; - if (nm256_grabInterrupt (card) == 0) { - nm256_setInfo (card->dev_for_play, card); - - /* Enable playback engine and interrupts. */ - nm256_writePort8 (card, 2, NM_PLAYBACK_ENABLE_REG, - NM_PLAYBACK_ENABLE_FLAG | NM_PLAYBACK_FREERUN); - - /* Enable both channels. */ - nm256_writePort16 (card, 2, NM_AUDIO_MUTE_REG, 0x0); - } - } -} - -/* - * Request one chunk of AMT bytes from the recording device. When the - * operation is complete, the data will be copied into BUFFER and the - * function DMAbuf_inputintr will be invoked. - */ - -static void -nm256_startRecording (struct nm256_info *card, char *buffer, u32 amt) -{ - u32 endpos; - int enableEngine = 0; - u32 ringsize = card->recordBufferSize; - unsigned long flags; - - if (amt > (ringsize / 2)) { - /* - * Of course this won't actually work right, because the - * caller is going to assume we will give what we got asked - * for. - */ - printk (KERN_ERR "NM256: Read request too large: %d\n", amt); - amt = ringsize / 2; - } - - if (amt < 8) { - printk (KERN_ERR "NM256: Read request too small; %d\n", amt); - return; - } - - spin_lock_irqsave(&card->lock,flags); - /* - * If we're not currently recording, set up the start and end registers - * for the recording engine. - */ - if (! card->recording) { - card->recording = 1; - if (nm256_grabInterrupt (card) == 0) { - card->curRecPos = 0; - nm256_setInfo (card->dev_for_record, card); - nm256_writePort32 (card, 2, NM_RBUFFER_START, card->abuf2); - nm256_writePort32 (card, 2, NM_RBUFFER_END, - card->abuf2 + ringsize); - - nm256_writePort32 (card, 2, NM_RBUFFER_CURRP, - card->abuf2 + card->curRecPos); - enableEngine = 1; - } - else { - /* Not sure what else to do here. */ - spin_unlock_irqrestore(&card->lock,flags); - return; - } - } - - /* - * If we happen to go past the end of the buffer a bit (due to a - * delayed interrupt) it's OK. So might as well set the watermark - * right at the end of the data we want. - */ - endpos = card->abuf2 + ((card->curRecPos + amt) % ringsize); - - card->recBuf = buffer; - card->requestedRecAmt = amt; - nm256_writePort32 (card, 2, NM_RBUFFER_WMARK, endpos); - /* Enable recording engine and interrupts. */ - if (enableEngine) - nm256_writePort8 (card, 2, NM_RECORD_ENABLE_REG, - NM_RECORD_ENABLE_FLAG | NM_RECORD_FREERUN); - - spin_unlock_irqrestore(&card->lock,flags); -} - -/* Stop the play engine. */ -static void -stopPlay (struct nm256_info *card) -{ - /* Shut off sound from both channels. */ - nm256_writePort16 (card, 2, NM_AUDIO_MUTE_REG, - NM_AUDIO_MUTE_LEFT | NM_AUDIO_MUTE_RIGHT); - /* Disable play engine. */ - nm256_writePort8 (card, 2, NM_PLAYBACK_ENABLE_REG, 0); - if (card->playing) { - nm256_releaseInterrupt (card); - - /* Reset the relevant state bits. */ - card->playing = 0; - card->curPlayPos = 0; - } -} - -/* Stop recording. */ -static void -stopRecord (struct nm256_info *card) -{ - /* Disable recording engine. */ - nm256_writePort8 (card, 2, NM_RECORD_ENABLE_REG, 0); - - if (card->recording) { - nm256_releaseInterrupt (card); - - card->recording = 0; - card->curRecPos = 0; - } -} - -/* - * Ring buffers, man. That's where the hip-hop, wild-n-wooly action's at. - * 1972? (Well, I suppose it was cheep-n-easy to implement.) - * - * Write AMT bytes of BUFFER to the playback ring buffer, and start the - * playback engine running. It will only accept up to 1/2 of the total - * size of the ring buffer. No check is made that we're about to overwrite - * the currently-playing sample. - */ - -static void -nm256_write_block (struct nm256_info *card, char *buffer, u32 amt) -{ - u32 ringsize = card->playbackBufferSize; - u32 endstop; - unsigned long flags; - - if (amt > (ringsize / 2)) { - printk (KERN_ERR "NM256: Write request too large: %d\n", amt); - amt = (ringsize / 2); - } - - if (amt < NM256_PLAY_WMARK_SIZE) { - printk (KERN_ERR "NM256: Write request too small: %d\n", amt); - return; - } - - card->curPlayPos %= ringsize; - - card->requested_amt = amt; - - spin_lock_irqsave(&card->lock,flags); - - if ((card->curPlayPos + amt) >= ringsize) { - u32 rem = ringsize - card->curPlayPos; - - nm256_writeBuffer8 (card, buffer, 1, - card->abuf1 + card->curPlayPos, - rem); - if (amt > rem) - nm256_writeBuffer8 (card, buffer + rem, 1, card->abuf1, - amt - rem); - } - else - nm256_writeBuffer8 (card, buffer, 1, - card->abuf1 + card->curPlayPos, - amt); - - /* - * Setup the start-n-stop-n-limit registers, and start that engine - * goin'. - * - * Normally we just let it wrap around to avoid the click-click - * action scene. - */ - if (! card->playing) { - /* The PBUFFER_END register in this case points to one sample - before the end of the buffer. */ - int w = (card->dev_for_play == card->dev[0] ? 0 : 1); - int sampsize = (card->sinfo[w].bits == 16 ? 2 : 1); - - if (card->sinfo[w].stereo) - sampsize *= 2; - - /* Need to set the not-normally-changing-registers up. */ - nm256_writePort32 (card, 2, NM_PBUFFER_START, - card->abuf1 + card->curPlayPos); - nm256_writePort32 (card, 2, NM_PBUFFER_END, - card->abuf1 + ringsize - sampsize); - nm256_writePort32 (card, 2, NM_PBUFFER_CURRP, - card->abuf1 + card->curPlayPos); - } - endstop = (card->curPlayPos + amt - NM256_PLAY_WMARK_SIZE) % ringsize; - nm256_writePort32 (card, 2, NM_PBUFFER_WMARK, card->abuf1 + endstop); - - if (! card->playing) - startPlay (card); - - spin_unlock_irqrestore(&card->lock,flags); -} - -/* We just got a card playback interrupt; process it. */ -static void -nm256_get_new_block (struct nm256_info *card) -{ - /* Check to see how much got played so far. */ - u32 amt = nm256_readPort32 (card, 2, NM_PBUFFER_CURRP) - card->abuf1; - - if (amt >= card->playbackBufferSize) { - printk (KERN_ERR "NM256: Sound playback pointer invalid!\n"); - amt = 0; - } - - if (amt < card->curPlayPos) - amt = (card->playbackBufferSize - card->curPlayPos) + amt; - else - amt -= card->curPlayPos; - - if (card->requested_amt > (amt + NM256_PLAY_WMARK_SIZE)) { - u32 endstop = - card->curPlayPos + card->requested_amt - NM256_PLAY_WMARK_SIZE; - nm256_writePort32 (card, 2, NM_PBUFFER_WMARK, card->abuf1 + endstop); - } - else { - card->curPlayPos += card->requested_amt; - /* Get a new block to write. This will eventually invoke - nm256_write_block () or stopPlay (). */ - DMAbuf_outputintr (card->dev_for_play, 1); - } -} - -/* - * Read the last-recorded block from the ring buffer, copy it into the - * saved buffer pointer, and invoke DMAuf_inputintr() with the recording - * device. - */ - -static void -nm256_read_block (struct nm256_info *card) -{ - /* Grab the current position of the recording pointer. */ - u32 currptr = nm256_readPort32 (card, 2, NM_RBUFFER_CURRP) - card->abuf2; - u32 amtToRead = card->requestedRecAmt; - u32 ringsize = card->recordBufferSize; - - if (currptr >= card->recordBufferSize) { - printk (KERN_ERR "NM256: Sound buffer record pointer invalid!\n"); - currptr = 0; - } - - /* - * This test is probably redundant; we shouldn't be here unless - * it's true. - */ - if (card->recording) { - /* If we wrapped around, copy everything from the start of our - recording buffer to the end of the buffer. */ - if (currptr < card->curRecPos) { - u32 amt = min (ringsize - card->curRecPos, amtToRead); - - nm256_readBuffer8 (card, card->recBuf, 1, - card->abuf2 + card->curRecPos, - amt); - amtToRead -= amt; - card->curRecPos += amt; - card->recBuf += amt; - if (card->curRecPos == ringsize) - card->curRecPos = 0; - } - - if ((card->curRecPos < currptr) && (amtToRead > 0)) { - u32 amt = min (currptr - card->curRecPos, amtToRead); - nm256_readBuffer8 (card, card->recBuf, 1, - card->abuf2 + card->curRecPos, amt); - card->curRecPos = ((card->curRecPos + amt) % ringsize); - } - card->recBuf = NULL; - card->requestedRecAmt = 0; - DMAbuf_inputintr (card->dev_for_record); - } -} - -/* - * Initialize the hardware. - */ -static void -nm256_initHw (struct nm256_info *card) -{ - /* Reset everything. */ - nm256_writePort8 (card, 2, 0x0, 0x11); - nm256_writePort16 (card, 2, 0x214, 0); - - stopRecord (card); - stopPlay (card); -} - -/* - * Handle a potential interrupt for the device referred to by DEV_ID. - * - * I don't like the cut-n-paste job here either between the two routines, - * but there are sufficient differences between the two interrupt handlers - * that parameterizing it isn't all that great either. (Could use a macro, - * I suppose...yucky bleah.) - */ - -static irqreturn_t -nm256_interrupt (int irq, void *dev_id) -{ - struct nm256_info *card = (struct nm256_info *)dev_id; - u16 status; - static int badintrcount; - int handled = 0; - - if ((card == NULL) || (card->magsig != NM_MAGIC_SIG)) { - printk (KERN_ERR "NM256: Bad card pointer\n"); - return IRQ_NONE; - } - - status = nm256_readPort16 (card, 2, NM_INT_REG); - - /* Not ours. */ - if (status == 0) { - if (badintrcount++ > 1000) { - /* - * I'm not sure if the best thing is to stop the card from - * playing or just release the interrupt (after all, we're in - * a bad situation, so doing fancy stuff may not be such a good - * idea). - * - * I worry about the card engine continuing to play noise - * over and over, however--that could become a very - * obnoxious problem. And we know that when this usually - * happens things are fairly safe, it just means the user's - * inserted a PCMCIA card and someone's spamming us with IRQ 9s. - */ - - handled = 1; - if (card->playing) - stopPlay (card); - if (card->recording) - stopRecord (card); - badintrcount = 0; - } - return IRQ_RETVAL(handled); - } - - badintrcount = 0; - - /* Rather boring; check for individual interrupts and process them. */ - - if (status & NM_PLAYBACK_INT) { - handled = 1; - status &= ~NM_PLAYBACK_INT; - NM_ACK_INT (card, NM_PLAYBACK_INT); - - if (card->playing) - nm256_get_new_block (card); - } - - if (status & NM_RECORD_INT) { - handled = 1; - status &= ~NM_RECORD_INT; - NM_ACK_INT (card, NM_RECORD_INT); - - if (card->recording) - nm256_read_block (card); - } - - if (status & NM_MISC_INT_1) { - u8 cbyte; - - handled = 1; - status &= ~NM_MISC_INT_1; - printk (KERN_ERR "NM256: Got misc interrupt #1\n"); - NM_ACK_INT (card, NM_MISC_INT_1); - nm256_writePort16 (card, 2, NM_INT_REG, 0x8000); - cbyte = nm256_readPort8 (card, 2, 0x400); - nm256_writePort8 (card, 2, 0x400, cbyte | 2); - } - - if (status & NM_MISC_INT_2) { - u8 cbyte; - - handled = 1; - status &= ~NM_MISC_INT_2; - printk (KERN_ERR "NM256: Got misc interrupt #2\n"); - NM_ACK_INT (card, NM_MISC_INT_2); - cbyte = nm256_readPort8 (card, 2, 0x400); - nm256_writePort8 (card, 2, 0x400, cbyte & ~2); - } - - /* Unknown interrupt. */ - if (status) { - handled = 1; - printk (KERN_ERR "NM256: Fire in the hole! Unknown status 0x%x\n", - status); - /* Pray. */ - NM_ACK_INT (card, status); - } - return IRQ_RETVAL(handled); -} - -/* - * Handle a potential interrupt for the device referred to by DEV_ID. - * This handler is for the 256ZX, and is very similar to the non-ZX - * routine. - */ - -static irqreturn_t -nm256_interrupt_zx (int irq, void *dev_id) -{ - struct nm256_info *card = (struct nm256_info *)dev_id; - u32 status; - static int badintrcount; - int handled = 0; - - if ((card == NULL) || (card->magsig != NM_MAGIC_SIG)) { - printk (KERN_ERR "NM256: Bad card pointer\n"); - return IRQ_NONE; - } - - status = nm256_readPort32 (card, 2, NM_INT_REG); - - /* Not ours. */ - if (status == 0) { - if (badintrcount++ > 1000) { - printk (KERN_ERR "NM256: Releasing interrupt, over 1000 invalid interrupts\n"); - /* - * I'm not sure if the best thing is to stop the card from - * playing or just release the interrupt (after all, we're in - * a bad situation, so doing fancy stuff may not be such a good - * idea). - * - * I worry about the card engine continuing to play noise - * over and over, however--that could become a very - * obnoxious problem. And we know that when this usually - * happens things are fairly safe, it just means the user's - * inserted a PCMCIA card and someone's spamming us with - * IRQ 9s. - */ - - handled = 1; - if (card->playing) - stopPlay (card); - if (card->recording) - stopRecord (card); - badintrcount = 0; - } - return IRQ_RETVAL(handled); - } - - badintrcount = 0; - - /* Rather boring; check for individual interrupts and process them. */ - - if (status & NM2_PLAYBACK_INT) { - handled = 1; - status &= ~NM2_PLAYBACK_INT; - NM2_ACK_INT (card, NM2_PLAYBACK_INT); - - if (card->playing) - nm256_get_new_block (card); - } - - if (status & NM2_RECORD_INT) { - handled = 1; - status &= ~NM2_RECORD_INT; - NM2_ACK_INT (card, NM2_RECORD_INT); - - if (card->recording) - nm256_read_block (card); - } - - if (status & NM2_MISC_INT_1) { - u8 cbyte; - - handled = 1; - status &= ~NM2_MISC_INT_1; - printk (KERN_ERR "NM256: Got misc interrupt #1\n"); - NM2_ACK_INT (card, NM2_MISC_INT_1); - cbyte = nm256_readPort8 (card, 2, 0x400); - nm256_writePort8 (card, 2, 0x400, cbyte | 2); - } - - if (status & NM2_MISC_INT_2) { - u8 cbyte; - - handled = 1; - status &= ~NM2_MISC_INT_2; - printk (KERN_ERR "NM256: Got misc interrupt #2\n"); - NM2_ACK_INT (card, NM2_MISC_INT_2); - cbyte = nm256_readPort8 (card, 2, 0x400); - nm256_writePort8 (card, 2, 0x400, cbyte & ~2); - } - - /* Unknown interrupt. */ - if (status) { - handled = 1; - printk (KERN_ERR "NM256: Fire in the hole! Unknown status 0x%x\n", - status); - /* Pray. */ - NM2_ACK_INT (card, status); - } - return IRQ_RETVAL(handled); -} - -/* - * Request our interrupt. - */ -static int -nm256_grabInterrupt (struct nm256_info *card) -{ - if (card->has_irq++ == 0) { - if (request_irq (card->irq, card->introutine, IRQF_SHARED, - "NM256_audio", card) < 0) { - printk (KERN_ERR "NM256: can't obtain IRQ %d\n", card->irq); - return -1; - } - } - return 0; -} - -/* - * Release our interrupt. - */ -static int -nm256_releaseInterrupt (struct nm256_info *card) -{ - if (card->has_irq <= 0) { - printk (KERN_ERR "nm256: too many calls to releaseInterrupt\n"); - return -1; - } - card->has_irq--; - if (card->has_irq == 0) { - free_irq (card->irq, card); - } - return 0; -} - -/* - * Waits for the mixer to become ready to be written; returns a zero value - * if it timed out. - */ - -static int -nm256_isReady (struct ac97_hwint *dev) -{ - struct nm256_info *card = (struct nm256_info *)dev->driver_private; - int t2 = 10; - u32 testaddr; - u16 testb; - int done = 0; - - if (card->magsig != NM_MAGIC_SIG) { - printk (KERN_ERR "NM256: Bad magic signature in isReady!\n"); - return 0; - } - - testaddr = card->mixer_status_offset; - testb = card->mixer_status_mask; - - /* - * Loop around waiting for the mixer to become ready. - */ - while (! done && t2-- > 0) { - if ((nm256_readPort16 (card, 2, testaddr) & testb) == 0) - done = 1; - else - udelay (100); - } - return done; -} - -/* - * Return the contents of the AC97 mixer register REG. Returns a positive - * value if successful, or a negative error code. - */ -static int -nm256_readAC97Reg (struct ac97_hwint *dev, u8 reg) -{ - struct nm256_info *card = (struct nm256_info *)dev->driver_private; - - if (card->magsig != NM_MAGIC_SIG) { - printk (KERN_ERR "NM256: Bad magic signature in readAC97Reg!\n"); - return -EINVAL; - } - - if (reg < 128) { - int res; - - nm256_isReady (dev); - res = nm256_readPort16 (card, 2, card->mixer + reg); - /* Magic delay. Bleah yucky. */ - udelay (1000); - return res; - } - else - return -EINVAL; -} - -/* - * Writes VALUE to AC97 mixer register REG. Returns 0 if successful, or - * a negative error code. - */ -static int -nm256_writeAC97Reg (struct ac97_hwint *dev, u8 reg, u16 value) -{ - unsigned long flags; - int tries = 2; - int done = 0; - u32 base; - - struct nm256_info *card = (struct nm256_info *)dev->driver_private; - - if (card->magsig != NM_MAGIC_SIG) { - printk (KERN_ERR "NM256: Bad magic signature in writeAC97Reg!\n"); - return -EINVAL; - } - - base = card->mixer; - - spin_lock_irqsave(&card->lock,flags); - - nm256_isReady (dev); - - /* Wait for the write to take, too. */ - while ((tries-- > 0) && !done) { - nm256_writePort16 (card, 2, base + reg, value); - if (nm256_isReady (dev)) { - done = 1; - break; - } - - } - - spin_unlock_irqrestore(&card->lock,flags); - udelay (1000); - - return ! done; -} - -/* - * Initial register values to be written to the AC97 mixer. - * While most of these are identical to the reset values, we do this - * so that we have most of the register contents cached--this avoids - * reading from the mixer directly (which seems to be problematic, - * probably due to ignorance). - */ -struct initialValues -{ - unsigned short port; - unsigned short value; -}; - -static struct initialValues nm256_ac97_initial_values[] = -{ - { AC97_MASTER_VOL_STEREO, 0x8000 }, - { AC97_HEADPHONE_VOL, 0x8000 }, - { AC97_MASTER_VOL_MONO, 0x0000 }, - { AC97_PCBEEP_VOL, 0x0000 }, - { AC97_PHONE_VOL, 0x0008 }, - { AC97_MIC_VOL, 0x8000 }, - { AC97_LINEIN_VOL, 0x8808 }, - { AC97_CD_VOL, 0x8808 }, - { AC97_VIDEO_VOL, 0x8808 }, - { AC97_AUX_VOL, 0x8808 }, - { AC97_PCMOUT_VOL, 0x0808 }, - { AC97_RECORD_SELECT, 0x0000 }, - { AC97_RECORD_GAIN, 0x0B0B }, - { AC97_GENERAL_PURPOSE, 0x0000 }, - { 0xffff, 0xffff } -}; - -/* Initialize the AC97 into a known state. */ -static int -nm256_resetAC97 (struct ac97_hwint *dev) -{ - struct nm256_info *card = (struct nm256_info *)dev->driver_private; - int x; - - if (card->magsig != NM_MAGIC_SIG) { - printk (KERN_ERR "NM256: Bad magic signature in resetAC97!\n"); - return -EINVAL; - } - - /* Reset the mixer. 'Tis magic! */ - nm256_writePort8 (card, 2, 0x6c0, 1); -// nm256_writePort8 (card, 2, 0x6cc, 0x87); /* This crashes Dell latitudes */ - nm256_writePort8 (card, 2, 0x6cc, 0x80); - nm256_writePort8 (card, 2, 0x6cc, 0x0); - - if (! card->mixer_values_init) { - for (x = 0; nm256_ac97_initial_values[x].port != 0xffff; x++) { - ac97_put_register (dev, - nm256_ac97_initial_values[x].port, - nm256_ac97_initial_values[x].value); - card->mixer_values_init = 1; - } - } - - return 0; -} - -/* - * We don't do anything particularly special here; it just passes the - * mixer ioctl to the AC97 driver. - */ -static int -nm256_default_mixer_ioctl (int dev, unsigned int cmd, void __user *arg) -{ - struct nm256_info *card = nm256_find_card_for_mixer (dev); - if (card != NULL) - return ac97_mixer_ioctl (&(card->mdev), cmd, arg); - else - return -ENODEV; -} - -static struct mixer_operations nm256_mixer_operations = { - .owner = THIS_MODULE, - .id = "NeoMagic", - .name = "NM256AC97Mixer", - .ioctl = nm256_default_mixer_ioctl -}; - -/* - * Default settings for the OSS mixer. These are set last, after the - * mixer is initialized. - * - * I "love" C sometimes. Got braces? - */ -static struct ac97_mixer_value_list mixer_defaults[] = { - { SOUND_MIXER_VOLUME, { { 85, 85 } } }, - { SOUND_MIXER_SPEAKER, { { 100 } } }, - { SOUND_MIXER_PCM, { { 65, 65 } } }, - { SOUND_MIXER_CD, { { 65, 65 } } }, - { -1, { { 0, 0 } } } -}; - - -/* Installs the AC97 mixer into CARD. */ -static int __devinit -nm256_install_mixer (struct nm256_info *card) -{ - int mixer; - - card->mdev.reset_device = nm256_resetAC97; - card->mdev.read_reg = nm256_readAC97Reg; - card->mdev.write_reg = nm256_writeAC97Reg; - card->mdev.driver_private = (void *)card; - - if (ac97_init (&(card->mdev))) - return -1; - - mixer = sound_alloc_mixerdev(); - if (num_mixers >= MAX_MIXER_DEV) { - printk ("NM256 mixer: Unable to alloc mixerdev\n"); - return -1; - } - - mixer_devs[mixer] = &nm256_mixer_operations; - card->mixer_oss_dev = mixer; - - /* Some reasonable default values. */ - ac97_set_values (&(card->mdev), mixer_defaults); - - printk(KERN_INFO "Initialized AC97 mixer\n"); - return 0; -} - -/* - * See if the signature left by the NM256 BIOS is intact; if so, we use - * the associated address as the end of our audio buffer in the video - * RAM. - */ - -static void __devinit -nm256_peek_for_sig (struct nm256_info *card) -{ - u32 port1offset - = card->port[0].physaddr + card->port[0].end_offset - 0x0400; - /* The signature is located 1K below the end of video RAM. */ - char __iomem *temp = ioremap_nocache (port1offset, 16); - /* Default buffer end is 5120 bytes below the top of RAM. */ - u32 default_value = card->port[0].end_offset - 0x1400; - u32 sig; - - /* Install the default value first, so we don't have to repeatedly - do it if there is a problem. */ - card->port[0].end_offset = default_value; - - if (temp == NULL) { - printk (KERN_ERR "NM256: Unable to scan for card signature in video RAM\n"); - return; - } - sig = readl (temp); - if ((sig & NM_SIG_MASK) == NM_SIGNATURE) { - u32 pointer = readl (temp + 4); - - /* - * If it's obviously invalid, don't use it (the port already has a - * suitable default value set). - */ - if (pointer != 0xffffffff) - card->port[0].end_offset = pointer; - - printk (KERN_INFO "NM256: Found card signature in video RAM: 0x%x\n", - pointer); - } - - iounmap (temp); -} - -/* - * Install a driver for the PCI device referenced by PCIDEV. - * VERSTR is a human-readable version string. - */ - -static int __devinit -nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr) -{ - struct nm256_info *card; - int x; - - if (pci_enable_device(pcidev)) - return 0; - - card = kmalloc (sizeof (struct nm256_info), GFP_KERNEL); - if (card == NULL) { - printk (KERN_ERR "NM256: out of memory!\n"); - return 0; - } - - card->magsig = NM_MAGIC_SIG; - card->playing = 0; - card->recording = 0; - card->rev = rev; - spin_lock_init(&card->lock); - - /* Init the memory port info. */ - for (x = 0; x < 2; x++) { - card->port[x].physaddr = pci_resource_start (pcidev, x); - card->port[x].ptr = NULL; - card->port[x].start_offset = 0; - card->port[x].end_offset = 0; - } - - /* Port 2 is easy. */ - card->port[1].start_offset = 0; - card->port[1].end_offset = NM_PORT2_SIZE; - - /* Yuck. But we have to map in port 2 so we can check how much RAM the - card has. */ - if (nm256_remap_ports (card)) { - kfree (card); - return 0; - } - - /* - * The NM256 has two memory ports. The first port is nothing - * more than a chunk of video RAM, which is used as the I/O ring - * buffer. The second port has the actual juicy stuff (like the - * mixer and the playback engine control registers). - */ - - if (card->rev == REV_NM256AV) { - /* Ok, try to see if this is a non-AC97 version of the hardware. */ - int pval = nm256_readPort16 (card, 2, NM_MIXER_PRESENCE); - if ((pval & NM_PRESENCE_MASK) != NM_PRESENCE_VALUE) { - if (! force_load) { - printk (KERN_ERR "NM256: This doesn't look to me like the AC97-compatible version.\n"); - printk (KERN_ERR " You can force the driver to load by passing in the module\n"); - printk (KERN_ERR " parameter:\n"); - printk (KERN_ERR " force_load = 1\n"); - printk (KERN_ERR "\n"); - printk (KERN_ERR " More likely, you should be using the appropriate SB-16 or\n"); - printk (KERN_ERR " CS4232 driver instead. (If your BIOS has settings for\n"); - printk (KERN_ERR " IRQ and/or DMA for the sound card, this is *not* the correct\n"); - printk (KERN_ERR " driver to use.)\n"); - nm256_release_ports (card); - kfree (card); - return 0; - } - else { - printk (KERN_INFO "NM256: Forcing driver load as per user request.\n"); - } - } - else { - /* printk (KERN_INFO "NM256: Congratulations. You're not running Eunice.\n")*/; - } - card->port[0].end_offset = 2560 * 1024; - card->introutine = nm256_interrupt; - card->mixer_status_offset = NM_MIXER_STATUS_OFFSET; - card->mixer_status_mask = NM_MIXER_READY_MASK; - } - else { - /* Not sure if there is any relevant detect for the ZX or not. */ - if (nm256_readPort8 (card, 2, 0xa0b) != 0) - card->port[0].end_offset = 6144 * 1024; - else - card->port[0].end_offset = 4096 * 1024; - - card->introutine = nm256_interrupt_zx; - card->mixer_status_offset = NM2_MIXER_STATUS_OFFSET; - card->mixer_status_mask = NM2_MIXER_READY_MASK; - } - - if (buffertop >= 98304 && buffertop < card->port[0].end_offset) - card->port[0].end_offset = buffertop; - else - nm256_peek_for_sig (card); - - card->port[0].start_offset = card->port[0].end_offset - 98304; - - printk (KERN_INFO "NM256: Mapping port 1 from 0x%x - 0x%x\n", - card->port[0].start_offset, card->port[0].end_offset); - - if (nm256_remap_ports (card)) { - kfree (card); - return 0; - } - - /* See if we can get the interrupt. */ - - card->irq = pcidev->irq; - card->has_irq = 0; - - if (nm256_grabInterrupt (card) != 0) { - nm256_release_ports (card); - kfree (card); - return 0; - } - - nm256_releaseInterrupt (card); - - /* - * Init the board. - */ - - card->playbackBufferSize = 16384; - card->recordBufferSize = 16384; - - card->coeffBuf = card->port[0].end_offset - NM_MAX_COEFFICIENT; - card->abuf2 = card->coeffBuf - card->recordBufferSize; - card->abuf1 = card->abuf2 - card->playbackBufferSize; - card->allCoeffBuf = card->abuf2 - (NM_TOTAL_COEFF_COUNT * 4); - - /* Fixed setting. */ - card->mixer = NM_MIXER_OFFSET; - card->mixer_values_init = 0; - - card->is_open_play = 0; - card->is_open_record = 0; - - card->coeffsCurrent = 0; - - card->opencnt[0] = 0; card->opencnt[1] = 0; - - /* Reasonable default settings, but largely unnecessary. */ - for (x = 0; x < 2; x++) { - card->sinfo[x].bits = 8; - card->sinfo[x].stereo = 0; - card->sinfo[x].samplerate = 8000; - } - - nm256_initHw (card); - - for (x = 0; x < 2; x++) { - if ((card->dev[x] = - sound_install_audiodrv(AUDIO_DRIVER_VERSION, - "NM256", &nm256_audio_driver, - sizeof(struct audio_driver), - DMA_NODMA, AFMT_U8 | AFMT_S16_LE, - NULL, -1, -1)) >= 0) { - /* 1K minimum buffer size. */ - audio_devs[card->dev[x]]->min_fragment = 10; - /* Maximum of 8K buffer size. */ - audio_devs[card->dev[x]]->max_fragment = 13; - } - else { - printk(KERN_ERR "NM256: Too many PCM devices available\n"); - nm256_release_ports (card); - kfree (card); - return 0; - } - } - - pci_set_drvdata(pcidev,card); - - /* Insert the card in the list. */ - card->next_card = nmcard_list; - nmcard_list = card; - - printk(KERN_INFO "Initialized NeoMagic %s audio in PCI native mode\n", - verstr); - - /* - * And our mixer. (We should allow support for other mixers, maybe.) - */ - - nm256_install_mixer (card); - - return 1; -} - - -static int __devinit -nm256_probe(struct pci_dev *pcidev,const struct pci_device_id *pciid) -{ - if (pcidev->device == PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO) - return nm256_install(pcidev, REV_NM256AV, "256AV"); - if (pcidev->device == PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO) - return nm256_install(pcidev, REV_NM256ZX, "256ZX"); - if (pcidev->device == PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO) - return nm256_install(pcidev, REV_NM256ZX, "256XL+"); - return -1; /* should not come here ... */ -} - -static void __devinit -nm256_remove(struct pci_dev *pcidev) { - struct nm256_info *xcard = pci_get_drvdata(pcidev); - struct nm256_info *card,*next_card = NULL; - - for (card = nmcard_list; card != NULL; card = next_card) { - next_card = card->next_card; - if (card == xcard) { - stopPlay (card); - stopRecord (card); - if (card->has_irq) - free_irq (card->irq, card); - nm256_release_ports (card); - sound_unload_mixerdev (card->mixer_oss_dev); - sound_unload_audiodev (card->dev[0]); - sound_unload_audiodev (card->dev[1]); - kfree (card); - break; - } - } - if (nmcard_list == card) - nmcard_list = next_card; -} - -/* - * Open the device - * - * DEV - device - * MODE - mode to open device (logical OR of OPEN_READ and OPEN_WRITE) - * - * Called when opening the DMAbuf (dmabuf.c:259) - */ -static int -nm256_audio_open(int dev, int mode) -{ - struct nm256_info *card = nm256_find_card (dev); - int w; - - if (card == NULL) - return -ENODEV; - - if (card->dev[0] == dev) - w = 0; - else if (card->dev[1] == dev) - w = 1; - else - return -ENODEV; - - if (card->opencnt[w] > 0) - return -EBUSY; - - /* No bits set? Huh? */ - if (! ((mode & OPEN_READ) || (mode & OPEN_WRITE))) - return -EIO; - - /* - * If it's open for both read and write, and the card's currently - * being read or written to, then do the opposite of what has - * already been done. Otherwise, don't specify any mode until the - * user actually tries to do I/O. (Some programs open the device - * for both read and write, but only actually do reading or writing.) - */ - - if ((mode & OPEN_WRITE) && (mode & OPEN_READ)) { - if (card->is_open_play) - mode = OPEN_WRITE; - else if (card->is_open_record) - mode = OPEN_READ; - else mode = 0; - } - - if (mode & OPEN_WRITE) { - if (card->is_open_play == 0) { - card->dev_for_play = dev; - card->is_open_play = 1; - } - else - return -EBUSY; - } - - if (mode & OPEN_READ) { - if (card->is_open_record == 0) { - card->dev_for_record = dev; - card->is_open_record = 1; - } - else - return -EBUSY; - } - - card->opencnt[w]++; - return 0; -} - -/* - * Close the device - * - * DEV - device - * - * Called when closing the DMAbuf (dmabuf.c:477) - * after halt_xfer - */ -static void -nm256_audio_close(int dev) -{ - struct nm256_info *card = nm256_find_card (dev); - - if (card != NULL) { - int w; - - if (card->dev[0] == dev) - w = 0; - else if (card->dev[1] == dev) - w = 1; - else - return; - - card->opencnt[w]--; - if (card->opencnt[w] <= 0) { - card->opencnt[w] = 0; - - if (card->dev_for_play == dev) { - stopPlay (card); - card->is_open_play = 0; - card->dev_for_play = -1; - } - - if (card->dev_for_record == dev) { - stopRecord (card); - card->is_open_record = 0; - card->dev_for_record = -1; - } - } - } -} - -/* Standard ioctl handler. */ -static int -nm256_audio_ioctl(int dev, unsigned int cmd, void __user *arg) -{ - int ret; - u32 oldinfo; - int w; - - struct nm256_info *card = nm256_find_card (dev); - - if (card == NULL) - return -ENODEV; - - if (dev == card->dev[0]) - w = 0; - else - w = 1; - - /* - * The code here is messy. There are probably better ways to do - * it. (It should be possible to handle it the same way the AC97 mixer - * is done.) - */ - switch (cmd) - { - case SOUND_PCM_WRITE_RATE: - if (get_user(ret, (int __user *) arg)) - return -EFAULT; - - if (ret != 0) { - oldinfo = card->sinfo[w].samplerate; - card->sinfo[w].samplerate = ret; - ret = nm256_setInfo(dev, card); - if (ret != 0) - card->sinfo[w].samplerate = oldinfo; - } - if (ret == 0) - ret = card->sinfo[w].samplerate; - break; - - case SOUND_PCM_READ_RATE: - ret = card->sinfo[w].samplerate; - break; - - case SNDCTL_DSP_STEREO: - if (get_user(ret, (int __user *) arg)) - return -EFAULT; - - card->sinfo[w].stereo = ret ? 1 : 0; - ret = nm256_setInfo (dev, card); - if (ret == 0) - ret = card->sinfo[w].stereo; - - break; - - case SOUND_PCM_WRITE_CHANNELS: - if (get_user(ret, (int __user *) arg)) - return -EFAULT; - - if (ret < 1 || ret > 3) - ret = card->sinfo[w].stereo + 1; - else { - card->sinfo[w].stereo = ret - 1; - ret = nm256_setInfo (dev, card); - if (ret == 0) - ret = card->sinfo[w].stereo + 1; - } - break; - - case SOUND_PCM_READ_CHANNELS: - ret = card->sinfo[w].stereo + 1; - break; - - case SNDCTL_DSP_SETFMT: - if (get_user(ret, (int __user *) arg)) - return -EFAULT; - - if (ret != 0) { - oldinfo = card->sinfo[w].bits; - card->sinfo[w].bits = ret; - ret = nm256_setInfo (dev, card); - if (ret != 0) - card->sinfo[w].bits = oldinfo; - } - if (ret == 0) - ret = card->sinfo[w].bits; - break; - - case SOUND_PCM_READ_BITS: - ret = card->sinfo[w].bits; - break; - - default: - return -EINVAL; - } - return put_user(ret, (int __user *) arg); -} - -/* - * Given the sound device DEV and an associated physical buffer PHYSBUF, - * return a pointer to the actual buffer in kernel space. - * - * This routine should exist as part of the soundcore routines. - */ - -static char * -nm256_getDMAbuffer (int dev, unsigned long physbuf) -{ - struct audio_operations *adev = audio_devs[dev]; - struct dma_buffparms *dmap = adev->dmap_out; - char *dma_start = - (char *)(physbuf - (unsigned long)dmap->raw_buf_phys - + (unsigned long)dmap->raw_buf); - - return dma_start; -} - - -/* - * Output a block to sound device - * - * dev - device number - * buf - physical address of buffer - * total_count - total byte count in buffer - * intrflag - set if this has been called from an interrupt - * (via DMAbuf_outputintr) - * restart_dma - set if engine needs to be re-initialised - * - * Called when: - * 1. Starting output (dmabuf.c:1327) - * 2. (dmabuf.c:1504) - * 3. A new buffer needs to be sent to the device (dmabuf.c:1579) - */ -static void -nm256_audio_output_block(int dev, unsigned long physbuf, - int total_count, int intrflag) -{ - struct nm256_info *card = nm256_find_card (dev); - - if (card != NULL) { - char *dma_buf = nm256_getDMAbuffer (dev, physbuf); - card->is_open_play = 1; - card->dev_for_play = dev; - nm256_write_block (card, dma_buf, total_count); - } -} - -/* Ditto, but do recording instead. */ -static void -nm256_audio_start_input(int dev, unsigned long physbuf, int count, - int intrflag) -{ - struct nm256_info *card = nm256_find_card (dev); - - if (card != NULL) { - char *dma_buf = nm256_getDMAbuffer (dev, physbuf); - card->is_open_record = 1; - card->dev_for_record = dev; - nm256_startRecording (card, dma_buf, count); - } -} - -/* - * Prepare for inputting samples to DEV. - * Each requested buffer will be BSIZE byes long, with a total of - * BCOUNT buffers. - */ - -static int -nm256_audio_prepare_for_input(int dev, int bsize, int bcount) -{ - struct nm256_info *card = nm256_find_card (dev); - - if (card == NULL) - return -ENODEV; - - if (card->is_open_record && card->dev_for_record != dev) - return -EBUSY; - - audio_devs[dev]->dmap_in->flags |= DMA_NODMA; - return 0; -} - -/* - * Prepare for outputting samples to `dev' - * - * Each buffer that will be passed will be `bsize' bytes long, - * with a total of `bcount' buffers. - * - * Called when: - * 1. A trigger enables audio output (dmabuf.c:978) - * 2. We get a write buffer without dma_mode setup (dmabuf.c:1152) - * 3. We restart a transfer (dmabuf.c:1324) - */ - -static int -nm256_audio_prepare_for_output(int dev, int bsize, int bcount) -{ - struct nm256_info *card = nm256_find_card (dev); - - if (card == NULL) - return -ENODEV; - - if (card->is_open_play && card->dev_for_play != dev) - return -EBUSY; - - audio_devs[dev]->dmap_out->flags |= DMA_NODMA; - return 0; -} - -/* Stop the current operations associated with DEV. */ -static void -nm256_audio_reset(int dev) -{ - struct nm256_info *card = nm256_find_card (dev); - - if (card != NULL) { - if (card->dev_for_play == dev) - stopPlay (card); - if (card->dev_for_record == dev) - stopRecord (card); - } -} - -static int -nm256_audio_local_qlen(int dev) -{ - return 0; -} - -static struct audio_driver nm256_audio_driver = -{ - .owner = THIS_MODULE, - .open = nm256_audio_open, - .close = nm256_audio_close, - .output_block = nm256_audio_output_block, - .start_input = nm256_audio_start_input, - .ioctl = nm256_audio_ioctl, - .prepare_for_input = nm256_audio_prepare_for_input, - .prepare_for_output = nm256_audio_prepare_for_output, - .halt_io = nm256_audio_reset, - .local_qlen = nm256_audio_local_qlen, -}; - -static struct pci_device_id nm256_pci_tbl[] = { - {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256AV_AUDIO, - PCI_ANY_ID, PCI_ANY_ID, 0, 0}, - {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256ZX_AUDIO, - PCI_ANY_ID, PCI_ANY_ID, 0, 0}, - {PCI_VENDOR_ID_NEOMAGIC, PCI_DEVICE_ID_NEOMAGIC_NM256XL_PLUS_AUDIO, - PCI_ANY_ID, PCI_ANY_ID, 0, 0}, - {0,} -}; -MODULE_DEVICE_TABLE(pci, nm256_pci_tbl); -MODULE_LICENSE("GPL"); - - -static struct pci_driver nm256_pci_driver = { - .name = "nm256_audio", - .id_table = nm256_pci_tbl, - .probe = nm256_probe, - .remove = nm256_remove, -}; - -module_param(usecache, bool, 0); -module_param(buffertop, int, 0); -module_param(nm256_debug, bool, 0644); -module_param(force_load, bool, 0); - -static int __init do_init_nm256(void) -{ - printk (KERN_INFO "NeoMagic 256AV/256ZX audio driver, version 1.1p\n"); - return pci_register_driver(&nm256_pci_driver); -} - -static void __exit cleanup_nm256 (void) -{ - pci_unregister_driver(&nm256_pci_driver); -} - -module_init(do_init_nm256); -module_exit(cleanup_nm256); - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/sound/oss/nm256_coeff.h b/sound/oss/nm256_coeff.h deleted file mode 100644 index 6fc07f3cb33b..000000000000 --- a/sound/oss/nm256_coeff.h +++ /dev/null @@ -1,4697 +0,0 @@ -#ifndef NM256_COEFF_H -#define NM256_COEFF_H - -#define NM_TOTAL_COEFF_COUNT 0x3158 - -static char coefficients[NM_TOTAL_COEFF_COUNT * 4] = { - 0xFF, 0xFF, 0x2F, 0x00, 0x4B, 0xFF, 0xA5, 0x01, 0xEF, 0xFC, 0x21, - 0x05, 0x87, 0xF7, 0x62, 0x11, 0xE9, 0x45, 0x5E, 0xF9, 0xB5, 0x01, - 0xDE, 0xFF, 0xA4, 0xFF, 0x60, 0x00, 0xCA, 0xFF, 0x0D, 0x00, 0xFD, - 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x3D, 0xFC, 0xD6, 0x06, - 0x4C, 0xF3, 0xED, 0x20, 0x3D, 0x3D, 0x4A, 0xF3, 0x4E, 0x05, 0xB1, - 0xFD, 0xE1, 0x00, 0xC3, 0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B, 0xFF, 0xEE, 0xFF, 0x98, 0x01, 0x93, - 0xF9, 0x10, 0x46, 0x03, 0x11, 0xA7, 0xF7, 0x12, 0x05, 0xF6, 0xFC, - 0xA2, 0x01, 0x4C, 0xFF, 0x2F, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x26, - 0x00, 0x6A, 0xFF, 0x53, 0x01, 0xA6, 0xFD, 0xA6, 0x03, 0xA1, 0xFA, - 0xDE, 0x08, 0x76, 0x48, 0x0C, 0xFF, 0xDE, 0xFE, 0x73, 0x01, 0xC9, - 0xFE, 0xCA, 0x00, 0xA0, 0xFF, 0x17, 0x00, 0xFE, 0xFF, 0x36, 0x00, - 0x36, 0xFF, 0xE1, 0x01, 0x52, 0xFC, 0x93, 0x06, 0x10, 0xF4, 0x78, - 0x1D, 0x90, 0x3F, 0x3E, 0xF4, 0xAA, 0x04, 0x19, 0xFE, 0xA4, 0x00, - 0xE2, 0xFF, 0xFA, 0xFF, 0x03, 0x00, 0xFD, 0xFF, 0x26, 0x00, 0x68, - 0xFF, 0x93, 0x01, 0x92, 0xFC, 0xE2, 0x06, 0x83, 0xF1, 0x8C, 0x32, - 0xED, 0x2D, 0x90, 0xF1, 0x1E, 0x07, 0x57, 0xFC, 0xBD, 0x01, 0x51, - 0xFF, 0x2E, 0x00, 0xFD, 0xFF, 0x07, 0x00, 0xE8, 0xFF, 0x12, 0x00, - 0x42, 0x00, 0xC4, 0xFE, 0x94, 0x03, 0x02, 0xF6, 0x89, 0x42, 0x76, - 0x18, 0x5C, 0xF5, 0x12, 0x06, 0x84, 0xFC, 0xD1, 0x01, 0x3B, 0xFF, - 0x34, 0x00, 0xFE, 0xFF, 0x1D, 0x00, 0x8A, 0xFF, 0x03, 0x01, 0x53, - 0xFE, 0x53, 0x02, 0x39, 0xFD, 0xA9, 0x02, 0xF2, 0x48, 0xB9, 0x04, - 0x54, 0xFC, 0xCA, 0x02, 0x16, 0xFE, 0x20, 0x01, 0x7F, 0xFF, 0x20, - 0x00,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2, 0xC5, 0x05, 0x62, 0xFD, - 0x10, 0x01, 0xAB, 0xFF, 0x0E, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x19, - 0x00, 0x8E, 0xFF, 0x49, 0x01, 0x04, 0xFD, 0x4D, 0x06, 0x00, 0xF2, - 0xFE, 0x37, 0xCB, 0x27, 0x21, 0xF2, 0x23, 0x07, 0x34, 0xFC, 0xDD, - 0x01, 0x3F, 0xFF, 0x34, 0x00, 0xFD, 0xFF, 0x0C, 0x00, 0xCE, 0xFF, - 0x56, 0x00, 0xB9, 0xFF, 0xB8, 0xFF, 0xF7, 0x01, 0xE2, 0xF8, 0x8D, - 0x45, 0x46, 0x12, 0x3C, 0xF7, 0x43, 0x05, 0xDF, 0xFC, 0xAC, 0x01, - 0x48, 0xFF, 0x30, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x24, 0x00, 0x70, - 0xFF, 0x46, 0x01, 0xC3, 0xFD, 0x6D, 0x03, 0x14, 0xFB, 0xBE, 0x07, - 0xA6, 0x48, 0xF8, 0xFF, 0x70, 0xFE, 0xAE, 0x01, 0xAA, 0xFE, 0xD9, - 0x00, 0x9A, 0xFF, 0x19, 0x00, 0xFE, 0xFF, 0x36, 0x00, 0x37, 0xFF, - 0xDE, 0x01, 0x5D, 0xFC, 0x74, 0x06, 0x63, 0xF4, 0x23, 0x1C, 0x66, - 0x40, 0xAA, 0xF4, 0x65, 0x04, 0x44, 0xFE, 0x8B, 0x00, 0xEE, 0xFF, - 0xF5, 0xFF, 0x04, 0x00, 0xFD, 0xFF, 0x29, 0x00, 0x61, 0xFF, 0x9F, - 0x01, 0x80, 0xFC, 0xF7, 0x06, 0x7D, 0xF1, 0x5A, 0x31, 0x2C, 0x2F, - 0x83, 0xF1, 0x13, 0x07, 0x64, 0xFC, 0xB3, 0x01, 0x57, 0xFF, 0x2C, - 0x00, 0xFD, 0xFF, 0x06, 0x00, 0xED, 0xFF, 0x05, 0x00, 0x5D, 0x00, - 0x95, 0xFE, 0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x00, 0x00, 0x2B, - 0x00, 0x58, 0xFF, 0x82, 0x01, 0x3F, 0xFD, 0x78, 0x04, 0xF2, 0xF8, - 0x50, 0x0D, 0x5E, 0x47, 0xD5, 0xFB, 0x6F, 0x00, 0x96, 0x00, 0x40, - 0xFF, 0x91, 0x00, 0xB7, 0xFF, 0x12, 0x00, 0xFD, 0xFF, 0x36, 0x00, - 0x37, 0xFF, 0xE6, 0x01, 0x36, 0xFC, 0xEF, 0x06, 0xFC, 0xF2, 0x81, - 0x22, 0x1C, 0x3C, 0xEC, 0xF2, 0x90, 0x05, 0x85, 0xFD, 0xFB, 0x00, - 0xB6, 0xFF, 0x0A, 0x00, 0x01, 0x00, 0xFE, 0xFF, 0x1C, 0x00, 0x85, - 0xFF, 0x5B, 0x01, 0xE9, 0xFC, 0x73, 0x06, 0xD8, 0xF1, 0xE5, 0x36, - 0x19, 0x29, 0xF8, 0xF1, 0x29, 0x07, 0x37, 0xFC, 0xD8, 0x01, 0x42, - 0xFF, 0x33, 0x00, 0xFD, 0xFF, 0x0B, 0x00, 0xD3, 0xFF, 0x47, 0x00, - 0xD7, 0xFF, 0x82, 0xFF, 0x53, 0x02, 0x39, 0xF8, 0xFD, 0x44, 0x8D, - 0x13, 0xD3, 0xF6, 0x72, 0x05, 0xCA, 0xFC, 0xB5, 0x01, 0x45, 0xFF, - 0x31, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x23, 0x00, 0x75, 0xFF, 0x39, - 0x01, 0xE0, 0xFD, 0x33, 0x03, 0x87, 0xFB, 0xA2, 0x06, 0xCB, 0x48, - 0xEA, 0x00, 0x01, 0xFE, 0xE9, 0x01, 0x8A, 0xFE, 0xE8, 0x00, 0x95, - 0xFF, 0x1A, 0x00, 0xFE, 0xFF, 0x35, 0x00, 0x38, 0xFF, 0xDA, 0x01, - 0x6A, 0xFC, 0x53, 0x06, 0xBA, 0xF4, 0xCE, 0x1A, 0x32, 0x41, 0x1F, - 0xF5, 0x1D, 0x04, 0x71, 0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 0xA2, 0x34, 0xAD, 0x2B, 0xB6, 0xF1, - 0x29, 0x07, 0x45, 0xFC, 0xCB, 0x01, 0x49, 0xFF, 0x31, 0x00, 0xFD, - 0xFF, 0x09, 0x00, 0xDE, 0xFF, 0x2B, 0x00, 0x11, 0x00, 0x1B, 0xFF, - 0x02, 0x03, 0xFE, 0xF6, 0xC3, 0x43, 0x22, 0x16, 0x07, 0xF6, 0xCA, - 0x05, 0xA3, 0xFC, 0xC5, 0x01, 0x3F, 0xFF, 0x33, 0x00, 0xFF, 0xFF, - 0x00, 0x00, 0x20, 0x00, 0x80, 0xFF, 0x1C, 0x01, 0x1C, 0xFE, 0xBD, - 0x02, 0x6E, 0xFC, 0x7D, 0x04, 0xF3, 0x48, 0xE2, 0x02, 0x1F, 0xFD, - 0x60, 0x02, 0x4C, 0xFE, 0x06, 0x01, 0x89, 0xFF, 0x1D, 0x00, 0xFE, - 0xFF, 0x34, 0x00, 0x3C, 0xFF, 0xCF, 0x01, 0x88, 0xFC, 0x09, 0x06, - 0x71, 0xF5, 0x2B, 0x18, 0xB2, 0x42, 0x20, 0xF6, 0x83, 0x03, 0xCF, - 0xFE, 0x3C, 0x00, 0x15, 0x00, 0xE6, 0xFF, 0x07, 0x00, 0xFD, 0xFF, - 0x2E, 0x00, 0x50, 0xFF, 0xBF, 0x01, 0x54, 0xFC, 0x20, 0x07, 0x94, - 0xF1, 0xA6, 0x2D, 0xD0, 0x32, 0x85, 0xF1, 0xDD, 0x06, 0x96, 0xFC, - 0x90, 0x01, 0x69, 0xFF, 0x26, 0x00, 0xFD, 0xFF, 0x03, 0x00, 0xFB, - 0xFF, 0xDF, 0xFF, 0xA9, 0x00, 0x10, 0xFE, 0xB9, 0x04, 0x27, 0xF4, - 0x5E, 0x3F, 0xC3, 0x1D, 0xFE, 0xF3, 0x99, 0x06, 0x50, 0xFC, 0xE2, - 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x17, 0x00, 0xA2, 0xFF, - 0xC7, 0x00, 0xD0, 0xFE, 0x65, 0x01, 0xF6, 0xFE, 0xD9, 0xFE, 0x6A, - 0x48, 0x1F, 0x09, 0x87, 0xFA, 0xB3, 0x03, 0xA0, 0xFD, 0x56, 0x01, - 0x69, 0xFF, 0x26, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x2F, 0x00, 0x4D, - 0xFF, 0xA0, 0x01, 0xFB, 0xFC, 0x07, 0x05, 0xBF, 0xF7, 0xBB, 0x10, - 0x2B, 0x46, 0xBB, 0xF9, 0x83, 0x01, 0xFA, 0xFF, 0x95, 0xFF, 0x68, - 0x00, 0xC7, 0xFF, 0x0E, 0x00, 0xFD, 0xFF, 0x35, 0x00, 0x3C, 0xFF, - 0xE1, 0x01, 0x31, 0xFC, 0x19, 0x07, 0x5B, 0xF2, 0x30, 0x26, 0x4B, - 0x39, 0x3B, 0xF2, 0x1A, 0x06, 0x29, 0xFD, 0x33, 0x01, 0x99, 0xFF, - 0x15, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x13, 0x00, 0x9F, 0xFF, 0x28, - 0x01, 0x3A, 0xFD, 0x00, 0x06, 0x5A, 0xF2, 0xDF, 0x39, 0x73, 0x25, - 0x79, 0xF2, 0x12, 0x07, 0x31, 0xFC, 0xE3, 0x01, 0x3B, 0xFF, 0x35, - 0x00, 0xFD, 0xFF, 0x0F, 0x00, 0xC4, 0xFF, 0x70, 0x00, 0x84, 0xFF, - 0x19, 0x00, 0x4D, 0x01, 0x22, 0xFA, 0x70, 0x46, 0x0A, 0x10, 0xFC, - 0xF7, 0xEB, 0x04, 0x08, 0xFD, 0x9A, 0x01, 0x4F, 0xFF, 0x2E, 0x00, - 0xFF, 0xFF, 0x00, 0x00, 0x27, 0x00, 0x66, 0xFF, 0x5E, 0x01, 0x90, - 0xFD, 0xD2, 0x03, 0x47, 0xFA, 0xC3, 0x09, 0x48, 0x48, 0x5A, 0xFE, - 0x33, 0xFF, 0x45, 0x01, 0xE2, 0xFE, 0xBE, 0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0xFF, 0x20, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x33, 0x00, 0x40, - 0xFF, 0xC1, 0x01, 0xAB, 0xFC, 0xB7, 0x05, 0x34, 0xF6, 0x8E, 0x15, - 0x0B, 0x44, 0x42, 0xF7, 0xDC, 0x02, 0x32, 0xFF, 0x04, 0x00, 0x31, - 0x00, 0xDC, 0xFF, 0x09, 0x00, 0xFD, 0xFF, 0x31, 0x00, 0x47, 0xFF, - 0xCE, 0x01, 0x41, 0xFC, 0x2A, 0x07, 0xC2, 0xF1, 0x1B, 0x2B, 0x25, - 0x35, 0xA8, 0xF1, 0xA7, 0x06, 0xC2, 0xFC, 0x74, 0x01, 0x78, 0xFF, - 0x20, 0x00, 0xFE, 0xFF, 0x02, 0x00, 0x04, 0x00, 0xC7, 0xFF, 0xD9, - 0x00, 0xBF, 0xFD, 0x38, 0x05, 0x69, 0xF3, 0x96, 0x3D, 0x6F, 0x20, - 0x66, 0xF3, 0xCE, 0x06, 0x3F, 0xFC, 0xE6, 0x01, 0x36, 0xFF, 0x36, - 0x00, 0xFD, 0xFF, 0x14, 0x00, 0xAE, 0xFF, 0xA9, 0x00, 0x0F, 0xFF, - 0xF0, 0x00, 0xCD, 0xFF, 0x1B, 0xFD, 0xE4, 0x47, 0x73, 0x0B, 0xA2, - 0xF9, 0x23, 0x04, 0x68, 0xFD, 0x70, 0x01, 0x5F, 0xFF, 0x29, 0x00, - 0x00, 0x00, 0xFF, 0xFF, 0x2C, 0x00, 0x55, 0xFF, 0x8B, 0x01, 0x2B, - 0xFD, 0xA1, 0x04, 0x9B, 0xF8, 0x42, 0x0E, 0x0F, 0x47, 0x38, 0xFB, - 0xBE, 0x00, 0x6A, 0x00, 0x58, 0xFF, 0x85, 0x00, 0xBB, 0xFF, 0x10, - 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x38, 0xFF, 0xE6, 0x01, 0x34, 0xFC, - 0xFD, 0x06, 0xCB, 0xF2, 0x8A, 0x23, 0x58, 0x3B, 0xB4, 0xF2, 0xBA, - 0x05, 0x6A, 0xFD, 0x0B, 0x01, 0xAE, 0xFF, 0x0D, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0x19, 0x00, 0x8C, 0xFF, 0x4D, 0x01, 0xFE, 0xFC, 0x56, - 0x06, 0xF7, 0xF1, 0xBF, 0x37, 0x15, 0x28, 0x18, 0xF2, 0x25, 0x07, - 0x34, 0xFC, 0xDC, 0x01, 0x3F, 0xFF, 0x34, 0x00, 0xFD, 0xFF, 0x0C, - 0x00, 0xCF, 0xFF, 0x52, 0x00, 0xC0, 0xFF, 0xAC, 0xFF, 0x0C, 0x02, - 0xBC, 0xF8, 0x6D, 0x45, 0x8E, 0x12, 0x24, 0xF7, 0x4D, 0x05, 0xDB, - 0xFC, 0xAE, 0x01, 0x48, 0xFF, 0x30, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x24, 0x00, 0x71, 0xFF, 0x43, 0x01, 0xC9, 0xFD, 0x60, 0x03, 0x2E, - 0xFB, 0x7E, 0x07, 0xAF, 0x48, 0x2D, 0x00, 0x58, 0xFE, 0xBB, 0x01, - 0xA3, 0xFE, 0xDD, 0x00, 0x99, 0xFF, 0x19, 0x00, 0xFE, 0xFF, 0x36, - 0x00, 0x37, 0xFF, 0xDD, 0x01, 0x60, 0xFC, 0x6D, 0x06, 0x76, 0xF4, - 0xD8, 0x1B, 0x95, 0x40, 0xC3, 0xF4, 0x56, 0x04, 0x4E, 0xFE, 0x85, - 0x00, 0xF1, 0xFF, 0xF4, 0xFF, 0x04, 0x00, 0xFD, 0xFF, 0x29, 0x00, - 0x60, 0xFF, 0xA2, 0x01, 0x7C, 0xFC, 0xFB, 0x06, 0x7C, 0xF1, 0x15, - 0x31, 0x73, 0x2F, 0x81, 0xF1, 0x10, 0x07, 0x67, 0xFC, 0xB1, 0x01, - 0x58, 0xFF, 0x2C, 0x00, 0xFD, 0xFF, 0x06, 0x00, 0xEE, 0xFF, 0x02, - 0x00, 0x63, 0x00, 0x8A, 0xFE, 0xF3, 0x03, 0x63, 0xF5, 0xA1, 0x41, - 0x12, 0x1A, 0xEB, 0xF4, 0x3F, 0x06, 0x72, 0xFC, 0xD7, 0x01, 0x39, - 0xFF, 0x35, 0x00, 0xFE, 0xFF, 0x1B, 0x00, 0x91, 0xFF, 0xF1, 0x00, - 0x79, 0xFE, 0x0A, 0x02, 0xC3, 0xFD, 0x73, 0x01, 0xDB, 0x48, 0x07, - 0x06, 0xC7, 0xFB, 0x12, 0x03, 0xF1, 0xFD, 0x31, 0x01, 0x78, 0xFF, - 0x22, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x32, 0x00, 0x43, 0xFF, 0xBA, - 0x01, 0xBF, 0xFC, 0x8B, 0x05, 0x99, 0xF6, 0x43, 0x14, 0xA9, 0x44, - 0xDE, 0xF7, 0x85, 0x02, 0x65, 0xFF, 0xE7, 0xFF, 0x3F, 0x00, 0xD6, - 0xFF, 0x0A, 0x00, 0xFD, 0xFF, 0x32, 0x00, 0x44, 0xFF, 0xD5, 0x01, - 0x3A, 0xFC, 0x2A, 0x07, 0xE3, 0xF1, 0xD1, 0x29, 0x46, 0x36, 0xC5, - 0xF1, 0x87, 0x06, 0xDA, 0xFC, 0x64, 0x01, 0x80, 0xFF, 0x1E, 0x00, - 0xFE, 0xFF, 0x01, 0x00, 0x08, 0x00, 0xBC, 0xFF, 0xEF, 0x00, 0x9A, - 0xFD, 0x72, 0x05, 0x16, 0xF3, 0xA5, 0x3C, 0xC4, 0x21, 0x21, 0xF3, - 0xE4, 0x06, 0x39, 0xFC, 0xE6, 0x01, 0x37, 0xFF, 0x36, 0x00, 0xFD, - 0xFF, 0x12, 0x00, 0xB3, 0xFF, 0x99, 0x00, 0x2E, 0xFF, 0xB6, 0x00, - 0x36, 0x00, 0x47, 0xFC, 0x90, 0x47, 0xA4, 0x0C, 0x31, 0xF9, 0x5A, - 0x04, 0x4E, 0xFD, 0x7C, 0x01, 0x5B, 0xFF, 0x2A, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x2B, 0x00, 0x59, 0xFF, 0x80, 0x01, 0x45, 0xFD, 0x6C, - 0x04, 0x0B, 0xF9, 0x0B, 0x0D, 0x73, 0x47, 0x02, 0xFC, 0x58, 0x00, - 0xA3, 0x00, 0x39, 0xFF, 0x94, 0x00, 0xB5, 0xFF, 0x12, 0x00, 0xFD, - 0xFF, 0x36, 0x00, 0x37, 0xFF, 0xE6, 0x01, 0x37, 0xFC, 0xEB, 0x06, - 0x0B, 0xF3, 0x35, 0x22, 0x52, 0x3C, 0xFD, 0xF2, 0x84, 0x05, 0x8D, - 0xFD, 0xF6, 0x00, 0xB8, 0xFF, 0x09, 0x00, 0x01, 0x00, 0xFE, 0xFF, - 0x1D, 0x00, 0x83, 0xFF, 0x5E, 0x01, 0xE3, 0xFC, 0x7B, 0x06, 0xD0, - 0xF1, 0xA5, 0x36, 0x62, 0x29, 0xEF, 0xF1, 0x29, 0x07, 0x39, 0xFC, - 0xD7, 0x01, 0x42, 0xFF, 0x33, 0x00, 0xFD, 0xFF, 0x0B, 0x00, 0xD5, - 0xFF, 0x44, 0x00, 0xDD, 0xFF, 0x77, 0xFF, 0x67, 0x02, 0x14, 0xF8, - 0xDC, 0x44, 0xD5, 0x13, 0xBC, 0xF6, 0x7C, 0x05, 0xC5, 0xFC, 0xB7, - 0x01, 0x44, 0xFF, 0x31, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x22, 0x00, - 0x76, 0xFF, 0x35, 0x01, 0xE7, 0xFD, 0x26, 0x03, 0xA1, 0xFB, 0x64, - 0x06, 0xD2, 0x48, 0x21, 0x01, 0xE8, 0xFD, 0xF7, 0x01, 0x83, 0xFE, - 0xEC, 0x00, 0x93, 0xFF, 0x1A, 0x00, 0xFE, 0xFF, 0x35, 0x00, 0x39, - 0xFF, 0xD9, 0x01, 0x6D, 0xFC, 0x4B, 0x06, 0xCD, 0xF4, 0x83, 0x1A, - 0x5F, 0x41, 0x3A, 0xF5, 0x0C, 0x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, 0x00, 0x00, 0x21, 0x00, 0x7C, 0xFF, - 0x27, 0x01, 0x05, 0xFE, 0xEB, 0x02, 0x14, 0xFC, 0x50, 0x05, 0xEA, - 0x48, 0x1B, 0x02, 0x78, 0xFD, 0x32, 0x02, 0x64, 0xFE, 0xFA, 0x00, - 0x8D, 0xFF, 0x1C, 0x00, 0xFE, 0xFF, 0x35, 0x00, 0x3A, 0xFF, 0xD4, - 0x01, 0x7C, 0xFC, 0x27, 0x06, 0x28, 0xF5, 0x31, 0x19, 0x21, 0x42, - 0xB8, 0xF5, 0xC0, 0x03, 0xAA, 0xFE, 0x51, 0x00, 0x0B, 0x00, 0xEA, - 0xFF, 0x06, 0x00, 0xFD, 0xFF, 0x2D, 0x00, 0x54, 0xFF, 0xB7, 0x01, - 0x5E, 0xFC, 0x19, 0x07, 0x88, 0xF1, 0x9F, 0x2E, 0xE3, 0x31, 0x7E, - 0xF1, 0xEE, 0x06, 0x88, 0xFC, 0x9A, 0x01, 0x64, 0xFF, 0x28, 0x00, - 0xFD, 0xFF, 0x04, 0x00, 0xF7, 0xFF, 0xE8, 0xFF, 0x96, 0x00, 0x31, - 0xFE, 0x84, 0x04, 0x79, 0xF4, 0x07, 0x40, 0xBA, 0x1C, 0x3E, 0xF4, - 0x82, 0x06, 0x58, 0xFC, 0xE0, 0x01, 0x37, 0xFF, 0x36, 0x00, 0xFE, - 0xFF, 0x18, 0x00, 0x9D, 0xFF, 0xD3, 0x00, 0xB8, 0xFE, 0x93, 0x01, - 0xA1, 0xFE, 0x8E, 0xFF, 0x92, 0x48, 0x3D, 0x08, 0xE1, 0xFA, 0x86, - 0x03, 0xB6, 0xFD, 0x4C, 0x01, 0x6D, 0xFF, 0x25, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0x30, 0x00, 0x4A, 0xFF, 0xA8, 0x01, 0xE9, 0xFC, 0x2D, - 0x05, 0x6B, 0xF7, 0xB6, 0x11, 0xC8, 0x45, 0x30, 0xF9, 0xCD, 0x01, - 0xD0, 0xFF, 0xAC, 0xFF, 0x5C, 0x00, 0xCB, 0xFF, 0x0D, 0x00, 0xFD, - 0xFF, 0x34, 0x00, 0x3E, 0xFF, 0xDF, 0x01, 0x33, 0xFC, 0x20, 0x07, - 0x35, 0xF2, 0x36, 0x27, 0x78, 0x38, 0x14, 0xF2, 0x3B, 0x06, 0x11, - 0xFD, 0x41, 0x01, 0x92, 0xFF, 0x17, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x10, 0x00, 0xA7, 0xFF, 0x19, 0x01, 0x53, 0xFD, 0xDB, 0x05, 0x88, - 0xF2, 0xAD, 0x3A, 0x6D, 0x24, 0xA4, 0xF2, 0x08, 0x07, 0x32, 0xFC, - 0xE5, 0x01, 0x39, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x10, 0x00, 0xBF, - 0xFF, 0x7B, 0x00, 0x6C, 0xFF, 0x44, 0x00, 0x01, 0x01, 0xB6, 0xFA, - 0xC8, 0x46, 0x13, 0x0F, 0x51, 0xF8, 0xC4, 0x04, 0x1B, 0xFD, 0x92, - 0x01, 0x52, 0xFF, 0x2D, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x28, 0x00, - 0x63, 0xFF, 0x67, 0x01, 0x7A, 0xFD, 0xFE, 0x03, 0xEE, 0xF9, 0xAA, - 0x0A, 0x16, 0x48, 0xAC, 0xFD, 0x86, 0xFF, 0x17, 0x01, 0xFA, 0xFE, - 0xB3, 0x00, 0xAA, 0xFF, 0x15, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x36, - 0xFF, 0xE5, 0x01, 0x44, 0xFC, 0xBD, 0x06, 0x97, 0xF3, 0x8A, 0x1F, - 0x31, 0x3E, 0xA5, 0xF3, 0x0F, 0x05, 0xDA, 0xFD, 0xC9, 0x00, 0xCF, - 0xFF, 0x01, 0x00, 0x02, 0x00, 0xFE, 0xFF, 0x22, 0x00, 0x73, 0xFF, - 0x7D, 0x01, 0xB3, 0xFC, 0xBB, 0x06, 0x9A, 0xF1, 0x60, 0x34, 0xF5, - 0x2B, 0xB0, 0xF1, 0x28, 0x07, 0x47, 0xFC, 0xCA, 0x01, 0x4A, 0xFF, - 0x30, 0x00, 0xFD, 0xFF, 0x09, 0x00, 0xDF, 0xFF, 0x28, 0x00, 0x17, - 0x00, 0x10, 0xFF, 0x15, 0x03, 0xDD, 0xF6, 0x9E, 0x43, 0x6C, 0x16, - 0xF1, 0xF5, 0xD3, 0x05, 0x9F, 0xFC, 0xC6, 0x01, 0x3F, 0xFF, 0x33, - 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x1F, 0x00, 0x81, 0xFF, 0x19, 0x01, - 0x23, 0xFE, 0xB0, 0x02, 0x87, 0xFC, 0x41, 0x04, 0xF4, 0x48, 0x1C, - 0x03, 0x06, 0xFD, 0x6E, 0x02, 0x45, 0xFE, 0x09, 0x01, 0x88, 0xFF, - 0x1D, 0x00, 0xFE, 0xFF, 0x34, 0x00, 0x3C, 0xFF, 0xCE, 0x01, 0x8C, - 0xFC, 0x00, 0x06, 0x86, 0xF5, 0xE0, 0x17, 0xDB, 0x42, 0x3F, 0xF6, - 0x71, 0x03, 0xD9, 0xFE, 0x36, 0x00, 0x18, 0x00, 0xE5, 0xFF, 0x07, - 0x00, 0xFD, 0xFF, 0x2F, 0x00, 0x4F, 0xFF, 0xC1, 0x01, 0x52, 0xFC, - 0x22, 0x07, 0x98, 0xF1, 0x5E, 0x2D, 0x13, 0x33, 0x87, 0xF1, 0xD8, - 0x06, 0x9B, 0xFC, 0x8D, 0x01, 0x6B, 0xFF, 0x25, 0x00, 0xFD, 0xFF, - 0x03, 0x00, 0xFC, 0xFF, 0xDC, 0xFF, 0xAF, 0x00, 0x07, 0xFE, 0xC8, - 0x04, 0x10, 0xF4, 0x2D, 0x3F, 0x0F, 0x1E, 0xED, 0xF3, 0xA0, 0x06, - 0x4E, 0xFC, 0xE3, 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x16, - 0x00, 0xA3, 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 0x7C, 0xFF, 0x21, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x32, 0x00, 0x41, 0xFF, 0xC0, 0x01, 0xAF, 0xFC, 0xAD, 0x05, 0x4A, - 0xF6, 0x44, 0x15, 0x2F, 0x44, 0x64, 0xF7, 0xC9, 0x02, 0x3D, 0xFF, - 0xFE, 0xFF, 0x34, 0x00, 0xDB, 0xFF, 0x09, 0x00, 0xFD, 0xFF, 0x32, - 0x00, 0x47, 0xFF, 0xD0, 0x01, 0x40, 0xFC, 0x2A, 0x07, 0xCA, 0xF1, - 0xD1, 0x2A, 0x65, 0x35, 0xAE, 0xF1, 0xA0, 0x06, 0xC7, 0xFC, 0x70, - 0x01, 0x7A, 0xFF, 0x20, 0x00, 0xFE, 0xFF, 0x02, 0x00, 0x05, 0x00, - 0xC5, 0xFF, 0xDE, 0x00, 0xB7, 0xFD, 0x45, 0x05, 0x56, 0xF3, 0x61, - 0x3D, 0xBA, 0x20, 0x56, 0xF3, 0xD3, 0x06, 0x3E, 0xFC, 0xE6, 0x01, - 0x36, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x13, 0x00, 0xAF, 0xFF, 0xA5, - 0x00, 0x16, 0xFF, 0xE3, 0x00, 0xE4, 0xFF, 0xEB, 0xFC, 0xD2, 0x47, - 0xB6, 0x0B, 0x89, 0xF9, 0x2F, 0x04, 0x62, 0xFD, 0x72, 0x01, 0x5E, - 0xFF, 0x29, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x2C, 0x00, 0x56, 0xFF, - 0x88, 0x01, 0x31, 0xFD, 0x95, 0x04, 0xB4, 0xF8, 0xFC, 0x0D, 0x26, - 0x47, 0x64, 0xFB, 0xA7, 0x00, 0x77, 0x00, 0x51, 0xFF, 0x89, 0x00, - 0xBA, 0xFF, 0x11, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x38, 0xFF, 0xE6, - 0x01, 0x34, 0xFC, 0xF9, 0x06, 0xD9, 0xF2, 0x3F, 0x23, 0x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69, 0x00, 0x80, 0xFE, 0x04, 0x04, 0x48, - 0xF5, 0x74, 0x41, 0x5D, 0x1A, 0xD7, 0xF4, 0x47, 0x06, 0x6F, 0xFC, - 0xD8, 0x01, 0x39, 0xFF, 0x35, 0x00, 0xFE, 0xFF, 0x1B, 0x00, 0x93, - 0xFF, 0xED, 0x00, 0x80, 0xFE, 0xFD, 0x01, 0xDC, 0xFD, 0x3C, 0x01, - 0xD5, 0x48, 0x45, 0x06, 0xAE, 0xFB, 0x1F, 0x03, 0xEA, 0xFD, 0x34, - 0x01, 0x77, 0xFF, 0x22, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x31, 0x00, - 0x44, 0xFF, 0xB8, 0x01, 0xC3, 0xFC, 0x81, 0x05, 0xB0, 0xF6, 0xFA, - 0x13, 0xCC, 0x44, 0x02, 0xF8, 0x71, 0x02, 0x71, 0xFF, 0xE1, 0xFF, - 0x42, 0x00, 0xD5, 0xFF, 0x0B, 0x00, 0xFD, 0xFF, 0x33, 0x00, 0x43, - 0xFF, 0xD6, 0x01, 0x39, 0xFC, 0x2A, 0x07, 0xEB, 0xF1, 0x87, 0x29, - 0x85, 0x36, 0xCC, 0xF1, 0x7F, 0x06, 0xE0, 0xFC, 0x60, 0x01, 0x82, - 0xFF, 0x1D, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x09, 0x00, 0xBA, 0xFF, - 0xF4, 0x00, 0x91, 0xFD, 0x7E, 0x05, 0x05, 0xF3, 0x6E, 0x3C, 0x10, - 0x22, 0x12, 0xF3, 0xE9, 0x06, 0x38, 0xFC, 0xE6, 0x01, 0x37, 0xFF, - 0x36, 0x00, 0xFD, 0xFF, 0x12, 0x00, 0xB5, 0xFF, 0x96, 0x00, 0x35, - 0xFF, 0xA9, 0x00, 0x4D, 0x00, 0x19, 0xFC, 0x7C, 0x47, 0xE8, 0x0C, - 0x18, 0xF9, 0x66, 0x04, 0x48, 0xFD, 0x7E, 0x01, 0x5A, 0xFF, 0x2B, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x5A, 0xFF, 0x7D, 0x01, - 0x4B, 0xFD, 0x60, 0x04, 0x24, 0xF9, 0xC6, 0x0C, 0x86, 0x47, 0x30, - 0xFC, 0x41, 0x00, 0xB0, 0x00, 0x32, 0xFF, 0x98, 0x00, 0xB4, 0xFF, - 0x12, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x37, 0xFF, 0xE6, 0x01, 0x38, - 0xFC, 0xE6, 0x06, 0x19, 0xF3, 0xEA, 0x21, 0x8A, 0x3C, 0x0E, 0xF3, - 0x78, 0x05, 0x96, 0xFD, 0xF1, 0x00, 0xBB, 0xFF, 0x08, 0x00, 0x01, - 0x00, 0xFE, 0xFF, 0x1D, 0x00, 0x81, 0xFF, 0x62, 0x01, 0xDD, 0xFC, - 0x83, 0x06, 0xC9, 0xF1, 0x66, 0x36, 0xAC, 0x29, 0xE7, 0xF1, 0x2A, - 0x07, 0x3A, 0xFC, 0xD5, 0x01, 0x43, 0xFF, 0x33, 0x00, 0xFD, 0xFF, - 0x0B, 0x00, 0xD6, 0xFF, 0x41, 0x00, 0xE4, 0xFF, 0x6B, 0xFF, 0x7B, - 0x02, 0xF0, 0xF7, 0xBA, 0x44, 0x1E, 0x14, 0xA5, 0xF6, 0x86, 0x05, - 0xC1, 0xFC, 0xB9, 0x01, 0x44, 0xFF, 0x32, 0x00, 0xFF, 0xFF, 0x00, - 0x00, 0x22, 0x00, 0x77, 0xFF, 0x32, 0x01, 0xED, 0xFD, 0x19, 0x03, - 0xBB, 0xFB, 0x26, 0x06, 0xD7, 0x48, 0x58, 0x01, 0xCF, 0xFD, 0x04, - 0x02, 0x7D, 0xFE, 0xEF, 0x00, 0x92, 0xFF, 0x1B, 0x00, 0xFE, 0xFF, - 0x35, 0x00, 0x39, 0xFF, 0xD8, 0x01, 0x70, 0xFC, 0x43, 0x06, 0xE1, - 0xF4, 0x38, 0x1A, 0x8C, 0x41, 0x55, 0xF5, 0xFC, 0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0x05, 0xBC, 0xF2, 0x73, 0x3B, 0x64, 0x23, 0xD2, - 0xF2, 0xFB, 0x06, 0x34, 0xFC, 0xE6, 0x01, 0x38, 0xFF, 0x36, 0x00, - 0xFD, 0xFF, 0x11, 0x00, 0xBB, 0xFF, 0x87, 0x00, 0x54, 0xFF, 0x70, - 0x00, 0xB3, 0x00, 0x4E, 0xFB, 0x1A, 0x47, 0x1F, 0x0E, 0xA8, 0xF8, - 0x9B, 0x04, 0x2E, 0xFD, 0x8A, 0x01, 0x55, 0xFF, 0x2C, 0x00, 0xFF, - 0xFF, 0x00, 0x00, 0x29, 0x00, 0x5F, 0xFF, 0x71, 0x01, 0x65, 0xFD, - 0x29, 0x04, 0x96, 0xF9, 0x95, 0x0B, 0xDC, 0x47, 0x03, 0xFD, 0xD9, - 0xFF, 0xEA, 0x00, 0x12, 0xFF, 0xA7, 0x00, 0xAE, 0xFF, 0x14, 0x00, - 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x3E, 0xFC, 0xD0, - 0x06, 0x5E, 0xF3, 0x94, 0x20, 0x7B, 0x3D, 0x60, 0xF3, 0x3E, 0x05, - 0xBB, 0xFD, 0xDB, 0x00, 0xC6, 0xFF, 0x04, 0x00, 0x02, 0x00, 0xFE, - 0xFF, 0x20, 0x00, 0x79, 0xFF, 0x72, 0x01, 0xC4, 0xFC, 0xA4, 0x06, - 0xAB, 0xF1, 0x46, 0x35, 0xF7, 0x2A, 0xC6, 0xF1, 0x2A, 0x07, 0x40, - 0xFC, 0xCF, 0x01, 0x47, 0xFF, 0x31, 0x00, 0xFD, 0xFF, 0x09, 0x00, - 0xDB, 0xFF, 0x33, 0x00, 0x01, 0x00, 0x38, 0xFF, 0xD3, 0x02, 0x53, - 0xF7, 0x1F, 0x44, 0x69, 0x15, 0x3F, 0xF6, 0xB2, 0x05, 0xAD, 0xFC, - 0xC1, 0x01, 0x41, 0xFF, 0x32, 0x00, 0xFF, 0xFF, 0x00, 0x00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DC, 0xFF, 0xA5, 0xFF, 0x5F, 0x00, 0xCA, 0xFF, - 0x0D, 0x00, 0xFD, 0xFF, 0x35, 0x00, 0x3D, 0xFF, 0xDF, 0x01, 0x32, - 0xFC, 0x1E, 0x07, 0x40, 0xF2, 0xEB, 0x26, 0xB5, 0x38, 0x1F, 0xF2, - 0x32, 0x06, 0x18, 0xFD, 0x3D, 0x01, 0x94, 0xFF, 0x16, 0x00, 0xFF, - 0xFF, 0x00, 0x00, 0x11, 0x00, 0xA4, 0xFF, 0x1D, 0x01, 0x4C, 0xFD, - 0xE6, 0x05, 0x7B, 0xF2, 0x71, 0x3A, 0xB8, 0x24, 0x97, 0xF2, 0x0B, - 0x07, 0x32, 0xFC, 0xE4, 0x01, 0x39, 0xFF, 0x36, 0x00, 0xFD, 0xFF, - 0x0F, 0x00, 0xC0, 0xFF, 0x78, 0x00, 0x73, 0xFF, 0x38, 0x00, 0x17, - 0x01, 0x8B, 0xFA, 0xAF, 0x46, 0x59, 0x0F, 0x39, 0xF8, 0xCF, 0x04, - 0x15, 0xFD, 0x95, 0x01, 0x51, 0xFF, 0x2D, 0x00, 0xFF, 0xFF, 0x00, - 0x00, 0x28, 0x00, 0x64, 0xFF, 0x65, 0x01, 0x81, 0xFD, 0xF2, 0x03, - 0x08, 0xFA, 0x68, 0x0A, 0x25, 0x48, 0xDE, 0xFD, 0x6E, 0xFF, 0x24, - 0x01, 0xF3, 0xFE, 0xB6, 0x00, 0xA8, 0xFF, 0x15, 0x00, 0xFD, 0xFF, - 0x36, 0x00, 0x36, 0xFF, 0xE5, 0x01, 0x46, 0xFC, 0xB8, 0x06, 0xA8, - 0xF3, 0x3F, 0x1F, 0x64, 0x3E, 0xBA, 0xF3, 0x01, 0x05, 0xE2, 0xFD, - 0xC4, 0x00, 0xD2, 0xFF, 0x00, 0x00, 0x02, 0x00, 0xFE, 0xFF, 0x23, - 0x00, 0x71, 0xFF, 0x81, 0x01, 0xAE, 0xFC, 0xC1, 0x06, 0x95, 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x00, 0xA4, 0xFF, 0xC0, 0x00, 0xDE, 0xFE, 0x4B, - 0x01, 0x27, 0xFF, 0x73, 0xFE, 0x4F, 0x48, 0xA2, 0x09, 0x54, 0xFA, - 0xCC, 0x03, 0x93, 0xFD, 0x5C, 0x01, 0x67, 0xFF, 0x27, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0x2E, 0x00, 0x4E, 0xFF, 0x9C, 0x01, 0x05, 0xFD, - 0xF1, 0x04, 0xF0, 0xF7, 0x2D, 0x10, 0x61, 0x46, 0x0D, 0xFA, 0x58, - 0x01, 0x13, 0x00, 0x87, 0xFF, 0x6E, 0x00, 0xC4, 0xFF, 0x0E, 0x00, - 0xFD, 0xFF, 0x35, 0x00, 0x3B, 0xFF, 0xE3, 0x01, 0x31, 0xFC, 0x14, - 0x07, 0x73, 0xF2, 0x99, 0x25, 0xC2, 0x39, 0x54, 0xF2, 0x05, 0x06, - 0x37, 0xFD, 0x2B, 0x01, 0x9E, 0xFF, 0x13, 0x00, 0xFF, 0xFF, 0xFF, - 0xFF, 0x14, 0x00, 0x9B, 0xFF, 0x31, 0x01, 0x2C, 0xFD, 0x15, 0x06, - 0x41, 0xF2, 0x6A, 0x39, 0x0A, 0x26, 0x61, 0xF2, 0x17, 0x07, 0x31, - 0xFC, 0xE2, 0x01, 0x3B, 0xFF, 0x35, 0x00, 0xFD, 0xFF, 0x0E, 0x00, - 0xC6, 0xFF, 0x69, 0x00, 0x91, 0xFF, 0x00, 0x00, 0x78, 0x01, 0xD0, - 0xF9, 0x39, 0x46, 0x98, 0x10, 0xCB, 0xF7, 0x02, 0x05, 0xFE, 0xFC, - 0x9F, 0x01, 0x4D, 0xFF, 0x2E, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x26, - 0x00, 0x69, 0xFF, 0x58, 0x01, 0x9D, 0xFD, 0xB9, 0x03, 0x7B, 0xFA, - 0x40, 0x09, 0x63, 0x48, 0xBF, 0xFE, 0x03, 0xFF, 0x5F, 0x01, 0xD4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0xFF, 0x6E, 0x00, 0x76, 0xFE, - 0x15, 0x04, 0x2C, 0xF5, 0x49, 0x41, 0xA9, 0x1A, 0xC3, 0xF4, 0x4F, - 0x06, 0x6C, 0xFC, 0xD9, 0x01, 0x38, 0xFF, 0x35, 0x00, 0xFE, 0xFF, - 0x1A, 0x00, 0x94, 0xFF, 0xEA, 0x00, 0x87, 0xFE, 0xF0, 0x01, 0xF5, - 0xFD, 0x05, 0x01, 0xCE, 0x48, 0x83, 0x06, 0x94, 0xFB, 0x2C, 0x03, - 0xE4, 0xFD, 0x37, 0x01, 0x76, 0xFF, 0x22, 0x00, 0x00, 0x00, 0xFF, - 0xFF, 0x31, 0x00, 0x45, 0xFF, 0xB6, 0x01, 0xC8, 0xFC, 0x77, 0x05, - 0xC7, 0xF6, 0xB1, 0x13, 0xED, 0x44, 0x26, 0xF8, 0x5D, 0x02, 0x7D, - 0xFF, 0xDA, 0xFF, 0x46, 0x00, 0xD4, 0xFF, 0x0B, 0x00, 0xFD, 0xFF, - 0x33, 0x00, 0x42, 0xFF, 0xD7, 0x01, 0x38, 0xFC, 0x29, 0x07, 0xF3, - 0xF1, 0x3E, 0x29, 0xC6, 0x36, 0xD4, 0xF1, 0x77, 0x06, 0xE6, 0xFC, - 0x5C, 0x01, 0x84, 0xFF, 0x1C, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x0A, - 0x00, 0xB7, 0xFF, 0xF9, 0x00, 0x89, 0xFD, 0x8A, 0x05, 0xF4, 0xF2, - 0x37, 0x3C, 0x5B, 0x22, 0x03, 0xF3, 0xED, 0x06, 0x37, 0xFC, 0xE6, - 0x01, 0x37, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x12, 0x00, 0xB6, 0xFF, - 0x93, 0x00, 0x3C, 0xFF, 0x9D, 0x00, 0x63, 0x00, 0xEB, 0xFB, 0x69, - 0x47, 0x2D, 0x0D, 0xFF, 0xF8, 0x72, 0x04, 0x42, 0xFD, 0x81, 0x01, - 0x59, 0xFF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41, 0x71, 0xF5, 0xEB, - 0x03, 0x90, 0xFE, 0x60, 0x00, 0x04, 0x00, 0xED, 0xFF, 0x06, 0x00, - 0xFD, 0xFF, 0x2C, 0x00, 0x57, 0xFF, 0xB2, 0x01, 0x65, 0xFC, 0x12, - 0x07, 0x82, 0xF1, 0x50, 0x2F, 0x38, 0x31, 0x7C, 0xF1, 0xF9, 0x06, - 0x7E, 0xFC, 0xA1, 0x01, 0x61, 0xFF, 0x29, 0x00, 0xFD, 0xFF, 0x04, - 0x00, 0xF5, 0xFF, 0xEF, 0xFF, 0x88, 0x00, 0x49, 0xFE, 0x5D, 0x04, - 0xB7, 0xF4, 0x7D, 0x40, 0xFD, 0x1B, 0x6C, 0xF4, 0x70, 0x06, 0x5F, - 0xFC, 0xDE, 0x01, 0x37, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x19, 0x00, - 0x9A, 0xFF, 0xDB, 0x00, 0xA6, 0xFE, 0xB4, 0x01, 0x64, 0xFE, 0x12, - 0x00, 0xAA, 0x48, 0x9E, 0x07, 0x21, 0xFB, 0x66, 0x03, 0xC6, 0xFD, - 0x45, 0x01, 0x70, 0xFF, 0x24, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x30, - 0x00, 0x48, 0xFF, 0xAD, 0x01, 0xDD, 0xFC, 0x48, 0x05, 0x30, 0xF7, - 0x6B, 0x12, 0x7D, 0x45, 0xCF, 0xF8, 0x01, 0x02, 0xB2, 0xFF, 0xBD, - 0xFF, 0x54, 0x00, 0xCE, 0xFF, 0x0C, 0x00, 0xFD, 0xFF, 0x34, 0x00, - 0x3F, 0xFF, 0xDC, 0x01, 0x34, 0xFC, 0x24, 0x07, 0x1C, 0xF2, 0xF0, - 0x27, 0xDF, 0x37, 0xFB, 0xF1, 0x51, 0x06, 0x01, 0xFD, 0x4B, 0x01, - 0x8D, 0xFF, 0x19, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x0E, 0x00, 0xAC, - 0xFF, 0x0E, 0x01, 0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FF, 0xFF, - 0x00, 0x00, 0x20, 0x00, 0x7E, 0xFF, 0x21, 0x01, 0x12, 0xFE, 0xD1, - 0x02, 0x47, 0xFC, 0xD7, 0x04, 0xF0, 0x48, 0x8D, 0x02, 0x45, 0xFD, - 0x4D, 0x02, 0x56, 0xFE, 0x01, 0x01, 0x8B, 0xFF, 0x1D, 0x00, 0xFE, - 0xFF, 0x34, 0x00, 0x3B, 0xFF, 0xD1, 0x01, 0x83, 0xFC, 0x16, 0x06, - 0x51, 0xF5, 0x9B, 0x18, 0x75, 0x42, 0xF3, 0xF5, 0x9D, 0x03, 0xBF, - 0xFE, 0x45, 0x00, 0x11, 0x00, 0xE8, 0xFF, 0x07, 0x00, 0xFD, 0xFF, - 0x2E, 0x00, 0x52, 0xFF, 0xBC, 0x01, 0x58, 0xFC, 0x1D, 0x07, 0x8E, - 0xF1, 0x11, 0x2E, 0x6B, 0x32, 0x81, 0xF1, 0xE5, 0x06, 0x90, 0xFC, - 0x94, 0x01, 0x67, 0xFF, 0x26, 0x00, 0xFD, 0xFF, 0x04, 0x00, 0xF9, - 0xFF, 0xE3, 0xFF, 0xA1, 0x00, 0x1E, 0xFE, 0xA3, 0x04, 0x49, 0xF4, - 0xA8, 0x3F, 0x52, 0x1D, 0x19, 0xF4, 0x90, 0x06, 0x53, 0xFC, 0xE1, - 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x17, 0x00, 0xA0, 0xFF, - 0xCC, 0x00, 0xC6, 0xFE, 0x79, 0x01, 0xD2, 0xFE, 0x26, 0xFF, 0x7C, - 0x48, 0xBE, 0x08, 0xAE, 0xFA, 0xA0, 0x03, 0xA9, 0xFD, 0x52, 0x01, - 0x6B, 0xFF, 0x25, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x2F, 0x00, 0x4C, - 0xFF, 0xA3, 0x01, 0xF3, 0xFC, 0x18, 0x05, 0x9B, 0xF7, 0x27, 0x11, - 0x02, 0x46, 0x7F, 0xF9, 0xA3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xFE, - 0x6C, 0x01, 0xCD, 0xFE, 0xC9, 0x00, 0xA1, 0xFF, 0x17, 0x00, 0xFE, - 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE2, 0x01, 0x51, 0xFC, 0x96, 0x06, - 0x07, 0xF4, 0x9E, 0x1D, 0x77, 0x3F, 0x32, 0xF4, 0xB2, 0x04, 0x15, - 0xFE, 0xA7, 0x00, 0xE0, 0xFF, 0xFA, 0xFF, 0x03, 0x00, 0xFD, 0xFF, - 0x26, 0x00, 0x69, 0xFF, 0x91, 0x01, 0x94, 0xFC, 0xE0, 0x06, 0x84, - 0xF1, 0xAF, 0x32, 0xCA, 0x2D, 0x92, 0xF1, 0x1F, 0x07, 0x56, 0xFC, - 0xBE, 0x01, 0x51, 0xFF, 0x2E, 0x00, 0xFD, 0xFF, 0x07, 0x00, 0xE7, - 0xFF, 0x14, 0x00, 0x3F, 0x00, 0xC9, 0xFE, 0x8C, 0x03, 0x11, 0xF6, - 0x9E, 0x42, 0x50, 0x18, 0x66, 0xF5, 0x0D, 0x06, 0x86, 0xFC, 0xD0, - 0x01, 0x3B, 0xFF, 0x34, 0x00, 0xFE, 0xFF, 0x1D, 0x00, 0x8A, 0xFF, - 0x04, 0x01, 0x50, 0xFE, 0x5A, 0x02, 0x2C, 0xFD, 0xC6, 0x02, 0xF2, - 0x48, 0x9B, 0x04, 0x61, 0xFC, 0xC3, 0x02, 0x19, 0xFE, 0x1E, 0x01, - 0x7F, 0xFF, 0x20, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x33, 0x00, 0x40, - 0xFF, 0xC4, 0x01, 0xA5, 0xFC, 0xC5, 0x05, 0x13, 0xF6, 0xFD, 0x15, - 0xD4, 0x43, 0x0F, 0xF7, 0xF9, 0x02, 0x21, 0xFF, 0x0D, 0x00, 0x2C, - 0x00, 0xDE, 0xFF, 0x09, 0x00, 0xFD, 0xFF, 0x31, 0x00, 0x49, 0xFF, - 0xCC, 0x01, 0x44, 0xFC, 0x29, 0x07, 0xB9, 0xF1, 0x89, 0x2B, 0xC3, - 0x34, 0xA0, 0xF1, 0xB1, 0x06, 0xBA, 0xFC, 0x79, 0x01, 0x76, 0xFF, - 0x21, 0x00, 0xFE, 0xFF, 0x02, 0x00, 0x02, 0x00, 0xCB, 0xFF, 0xD1, - 0x00, 0xCC, 0xFD, 0x24, 0x05, 0x87, 0xF3, 0xE4, 0x3D, 0xFD, 0x1F, - 0x7F, 0xF3, 0xC6, 0x06, 0x41, 0xFC, 0xE5, 0x01, 0x36, 0xFF, 0x36, - 0x00, 0xFD, 0xFF, 0x14, 0x00, 0xAC, 0xFF, 0xAE, 0x00, 0x05, 0xFF, - 0x03, 0x01, 0xAA, 0xFF, 0x63, 0xFD, 0xFD, 0x47, 0x0E, 0x0B, 0xC8, - 0xF9, 0x11, 0x04, 0x71, 0xFD, 0x6C, 0x01, 0x61, 0xFF, 0x28, 0x00, - 0x00, 0x00, 0xFF, 0xFF, 0x2D, 0x00, 0x53, 0xFF, 0x8F, 0x01, 0x23, - 0xFD, 0xB2, 0x04, 0x76, 0xF8, 0xAA, 0x0E, 0xED, 0x46, 0xF7, 0xFA, - 0xDF, 0x00, 0x57, 0x00, 0x62, 0xFF, 0x80, 0x00, 0xBD, 0xFF, 0x10, - 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x39, 0xFF, 0xE5, 0x01, 0x33, 0xFC, - 0x03, 0x07, 0xB7, 0xF2, 0xFC, 0x23, 0x03, 0x3B, 0x9E, 0xF2, 0xCB, - 0x05, 0x5F, 0xFD, 0x12, 0x01, 0xAA, 0xFF, 0x0E, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0x18, 0x00, 0x8F, 0xFF, 0x47, 0x01, 0x08, 0xFD, 0x49, - 0x06, 0x05, 0xF2, 0x1D, 0x38, 0xA6, 0x27, 0x26, 0xF2, 0x23, 0x07, - 0x33, 0xFC, 0xDD, 0x01, 0x3E, 0xFF, 0x34, 0x00, 0xFD, 0xFF, 0x0C, - 0x00, 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 0x36, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x15, 0x00, 0xA7, - 0xFF, 0xB9, 0x00, 0xEC, 0xFE, 0x31, 0x01, 0x57, 0xFF, 0x0F, 0xFE, - 0x33, 0x48, 0x25, 0x0A, 0x21, 0xFA, 0xE5, 0x03, 0x87, 0xFD, 0x62, - 0x01, 0x65, 0xFF, 0x27, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x2E, 0x00, - 0x50, 0xFF, 0x97, 0x01, 0x10, 0xFD, 0xDA, 0x04, 0x20, 0xF8, 0xA0, - 0x0F, 0x97, 0x46, 0x61, 0xFA, 0x2D, 0x01, 0x2B, 0x00, 0x7A, 0xFF, - 0x75, 0x00, 0xC2, 0xFF, 0x0F, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x3A, - 0xFF, 0xE4, 0x01, 0x32, 0xFC, 0x0E, 0x07, 0x8B, 0xF2, 0x03, 0x25, - 0x38, 0x3A, 0x6D, 0xF2, 0xF1, 0x05, 0x45, 0xFD, 0x22, 0x01, 0xA2, - 0xFF, 0x11, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x16, 0x00, 0x96, 0xFF, - 0x39, 0x01, 0x1F, 0xFD, 0x28, 0x06, 0x2A, 0xF2, 0xF2, 0x38, 0xA0, - 0x26, 0x4B, 0xF2, 0x1C, 0x07, 0x32, 0xFC, 0xE0, 0x01, 0x3C, 0xFF, - 0x35, 0x00, 0xFD, 0xFF, 0x0D, 0x00, 0xC9, 0xFF, 0x63, 0x00, 0x9F, - 0xFF, 0xE8, 0xFF, 0xA3, 0x01, 0x7F, 0xF9, 0x02, 0x46, 0x27, 0x11, - 0x9B, 0xF7, 0x18, 0x05, 0xF3, 0xFC, 0xA3, 0x01, 0x4C, 0xFF, 0x2F, - 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x25, 0x00, 0x6B, 0xFF, 0x52, 0x01, - 0xA9, 0xFD, 0xA0, 0x03, 0xAE, 0xFA, 0xBE, 0x08, 0x7C, 0x48, 0x26, - 0xFF, 0xD2, 0xFE, 0x79, 0x01, 0xC6, 0xFE, 0xCC, 0x00, 0xA0, 0xFF, - 0x17, 0x00, 0xFE, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE1, 0x01, 0x53, - 0xFC, 0x90, 0x06, 0x19, 0xF4, 0x52, 0x1D, 0xA8, 0x3F, 0x49, 0xF4, - 0xA3, 0x04, 0x1E, 0xFE, 0xA1, 0x00, 0xE3, 0xFF, 0xF9, 0xFF, 0x04, - 0x00, 0xFD, 0xFF, 0x26, 0x00, 0x67, 0xFF, 0x94, 0x01, 0x90, 0xFC, - 0xE5, 0x06, 0x81, 0xF1, 0x6B, 0x32, 0x11, 0x2E, 0x8E, 0xF1, 0x1D, - 0x07, 0x58, 0xFC, 0xBC, 0x01, 0x52, 0xFF, 0x2E, 0x00, 0xFD, 0xFF, - 0x07, 0x00, 0xE8, 0xFF, 0x11, 0x00, 0x45, 0x00, 0xBF, 0xFE, 0x9D, - 0x03, 0xF3, 0xF5, 0x75, 0x42, 0x9B, 0x18, 0x51, 0xF5, 0x16, 0x06, - 0x83, 0xFC, 0xD1, 0x01, 0x3B, 0xFF, 0x34, 0x00, 0xFE, 0xFF, 0x1D, - 0x00, 0x8B, 0xFF, 0x01, 0x01, 0x56, 0xFE, 0x4D, 0x02, 0x45, 0xFD, - 0x8D, 0x02, 0xF0, 0x48, 0xD7, 0x04, 0x47, 0xFC, 0xD1, 0x02, 0x12, - 0xFE, 0x21, 0x01, 0x7E, 0xFF, 0x20, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x33, 0x00, 0x40, 0xFF, 0xC2, 0x01, 0xA9, 0xFC, 0xBC, 0x05, 0x29, - 0xF6, 0xB3, 0x15, 0xFA, 0x43, 0x31, 0xF7, 0xE6, 0x02, 0x2C, 0xFF, - 0x07, 0x00, 0x2F, 0x00, 0xDC, 0xFF, 0x09, 0x00, 0xFD, 0xFF, 0x31, - 0x00, 0x48, 0xFF, 0xCE, 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0x00, - 0xFD, 0xFF, 0x0C, 0x00, 0xCE, 0xFF, 0x54, 0x00, 0xBD, 0xFF, 0xB2, - 0xFF, 0x01, 0x02, 0xCF, 0xF8, 0x7D, 0x45, 0x6B, 0x12, 0x30, 0xF7, - 0x48, 0x05, 0xDD, 0xFC, 0xAD, 0x01, 0x48, 0xFF, 0x30, 0x00, 0xFF, - 0xFF, 0x00, 0x00, 0x24, 0x00, 0x70, 0xFF, 0x45, 0x01, 0xC6, 0xFD, - 0x66, 0x03, 0x21, 0xFB, 0x9E, 0x07, 0xAA, 0x48, 0x12, 0x00, 0x64, - 0xFE, 0xB4, 0x01, 0xA6, 0xFE, 0xDB, 0x00, 0x9A, 0xFF, 0x19, 0x00, - 0xFE, 0xFF, 0x36, 0x00, 0x37, 0xFF, 0xDE, 0x01, 0x5F, 0xFC, 0x70, - 0x06, 0x6C, 0xF4, 0xFD, 0x1B, 0x7D, 0x40, 0xB7, 0xF4, 0x5D, 0x04, - 0x49, 0xFE, 0x88, 0x00, 0xEF, 0xFF, 0xF5, 0xFF, 0x04, 0x00, 0xFD, - 0xFF, 0x29, 0x00, 0x61, 0xFF, 0xA1, 0x01, 0x7E, 0xFC, 0xF9, 0x06, - 0x7C, 0xF1, 0x38, 0x31, 0x50, 0x2F, 0x82, 0xF1, 0x12, 0x07, 0x65, - 0xFC, 0xB2, 0x01, 0x57, 0xFF, 0x2C, 0x00, 0xFD, 0xFF, 0x06, 0x00, - 0xED, 0xFF, 0x04, 0x00, 0x60, 0x00, 0x90, 0xFE, 0xEB, 0x03, 0x71, - 0xF5, 0xB7, 0x41, 0xED, 0x19, 0xF5, 0xF4, 0x3B, 0x06, 0x73, 0xFC, - 0xD7, 0x01, 0x39, 0xFF, 0x35, 0x00, 0xFE, 0xFF, 0x1B, 0x00, 0x91, - 0xFF, 0xF2, 0x00, 0x76, 0xFE, 0x11, 0x02, 0xB6, 0xFD, 0x8F, 0x01, - 0xDE, 0x48, 0xE9, 0x05, 0xD4, 0xFB,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xFF, 0x05, 0x00, 0xF2, 0xFF, - 0xF7, 0xFF, 0x7A, 0x00, 0x62, 0xFE, 0x35, 0x04, 0xF7, 0xF4, 0xEF, - 0x40, 0x40, 0x1B, 0x9C, 0xF4, 0x5E, 0x06, 0x66, 0xFC, 0xDB, 0x01, - 0x38, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x1A, 0x00, 0x96, 0xFF, 0xE3, - 0x00, 0x95, 0xFE, 0xD5, 0x01, 0x26, 0xFE, 0x98, 0x00, 0xBF, 0x48, - 0x00, 0x07, 0x61, 0xFB, 0x46, 0x03, 0xD6, 0xFD, 0x3D, 0x01, 0x73, - 0xFF, 0x23, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x31, 0x00, 0x46, 0xFF, - 0xB2, 0x01, 0xD1, 0xFC, 0x62, 0x05, 0xF6, 0xF6, 0x20, 0x13, 0x2E, - 0x45, 0x70, 0xF8, 0x34, 0x02, 0x94, 0xFF, 0xCD, 0xFF, 0x4C, 0x00, - 0xD2, 0xFF, 0x0B, 0x00, 0xFD, 0xFF, 0x33, 0x00, 0x41, 0xFF, 0xDA, - 0x01, 0x36, 0xFC, 0x27, 0x07, 0x05, 0xF2, 0xAA, 0x28, 0x44, 0x37, - 0xE4, 0xF1, 0x67, 0x06, 0xF2, 0xFC, 0x55, 0x01, 0x88, 0xFF, 0x1B, - 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x0B, 0x00, 0xB2, 0xFF, 0x02, 0x01, - 0x7A, 0xFD, 0xA2, 0x05, 0xD4, 0xF2, 0xC7, 0x3B, 0xF2, 0x22, 0xE7, - 0xF2, 0xF5, 0x06, 0x35, 0xFC, 0xE6, 0x01, 0x38, 0xFF, 0x36, 0x00, - 0xFD, 0xFF, 0x11, 0x00, 0xB9, 0xFF, 0x8C, 0x00, 0x4A, 0xFF, 0x83, - 0x00, 0x91, 0x00, 0x91, 0xFB, 0x3D, 0x47, 0xB7, 0x0D, 0xCD, 0xF8, - 0x89, 0x04, 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xE5, 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFD, 0xFF, - 0x15, 0x00, 0xA8, 0xFF, 0xB6, 0x00, 0xF3, 0xFE, 0x24, 0x01, 0x6E, - 0xFF, 0xDE, 0xFD, 0x25, 0x48, 0x68, 0x0A, 0x08, 0xFA, 0xF2, 0x03, - 0x81, 0xFD, 0x65, 0x01, 0x64, 0xFF, 0x28, 0x00, 0x00, 0x00, 0xFF, - 0xFF, 0x2D, 0x00, 0x51, 0xFF, 0x95, 0x01, 0x15, 0xFD, 0xCF, 0x04, - 0x39, 0xF8, 0x59, 0x0F, 0xAF, 0x46, 0x8B, 0xFA, 0x17, 0x01, 0x38, - 0x00, 0x73, 0xFF, 0x78, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0xFD, 0xFF, - 0x36, 0x00, 0x39, 0xFF, 0xE4, 0x01, 0x32, 0xFC, 0x0B, 0x07, 0x97, - 0xF2, 0xB8, 0x24, 0x71, 0x3A, 0x7B, 0xF2, 0xE6, 0x05, 0x4C, 0xFD, - 0x1D, 0x01, 0xA4, 0xFF, 0x11, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x16, - 0x00, 0x94, 0xFF, 0x3D, 0x01, 0x18, 0xFD, 0x32, 0x06, 0x1F, 0xF2, - 0xB5, 0x38, 0xEB, 0x26, 0x40, 0xF2, 0x1E, 0x07, 0x32, 0xFC, 0xDF, - 0x01, 0x3D, 0xFF, 0x35, 0x00, 0xFD, 0xFF, 0x0D, 0x00, 0xCA, 0xFF, - 0x5F, 0x00, 0xA5, 0xFF, 0xDC, 0xFF, 0xB8, 0x01, 0x57, 0xF9, 0xE5, - 0x45, 0x6E, 0x11, 0x83, 0xF7, 0x23, 0x05, 0xEE, 0xFC, 0xA6, 0x01, - 0x4B, 0xFF, 0x2F, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x25, 0x00, 0x6C, - 0xFF, 0x4F, 0x01, 0xB0, 0xFD, 0x93, 0x03, 0xC7, 0xFA, 0x7D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 0x40, - 0xFF, 0x34, 0x00, 0xFD, 0xFF, 0x0C, 0x00, 0xD0, 0xFF, 0x51, 0x00, - 0xC3, 0xFF, 0xA6, 0xFF, 0x16, 0x02, 0xA9, 0xF8, 0x5C, 0x45, 0xB2, - 0x12, 0x19, 0xF7, 0x52, 0x05, 0xD8, 0xFC, 0xAF, 0x01, 0x47, 0xFF, - 0x30, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x24, 0x00, 0x71, 0xFF, 0x42, - 0x01, 0xCD, 0xFD, 0x59, 0x03, 0x3B, 0xFB, 0x5E, 0x07, 0xB3, 0x48, - 0x48, 0x00, 0x4B, 0xFE, 0xC2, 0x01, 0x9F, 0xFE, 0xDE, 0x00, 0x98, - 0xFF, 0x19, 0x00, 0xFE, 0xFF, 0x36, 0x00, 0x38, 0xFF, 0xDD, 0x01, - 0x62, 0xFC, 0x69, 0x06, 0x7F, 0xF4, 0xB2, 0x1B, 0xAB, 0x40, 0xD0, - 0xF4, 0x4E, 0x04, 0x53, 0xFE, 0x83, 0x00, 0xF2, 0xFF, 0xF4, 0xFF, - 0x05, 0x00, 0xFD, 0xFF, 0x29, 0x00, 0x5F, 0xFF, 0xA3, 0x01, 0x7A, - 0xFC, 0xFD, 0x06, 0x7C, 0xF1, 0xF2, 0x30, 0x96, 0x2F, 0x80, 0xF1, - 0x0F, 0x07, 0x69, 0xFC, 0xB0, 0x01, 0x59, 0xFF, 0x2B, 0x00, 0xFD, - 0xFF, 0x06, 0x00, 0xEE, 0xFF, 0x01, 0x00, 0x66, 0x00, 0x85, 0xFE, - 0xFC, 0x03, 0x55, 0xF5, 0x8C, 0x41, 0x38, 0x1A, 0xE1, 0xF4, 0x43, - 0x06, 0x70, 0xFC, 0xD8, 0x01, 0x39, 0xFF, 0x35, 0x00, 0xFE, 0xFF, - 0x1B, 0x00, 0x92, 0xFF, 0xEF, 0x00, 0x7D, 0xFE, 0x04, 0x02, 0xCF, - 0xFD, 0x58, 0x01, 0xD7, 0x48, 0x26, 0x06, 0xBB, 0xFB, 0x19, 0x03, - 0xED, 0xFD, 0x32, 0x01, 0x77, 0xFF, 0x22, 0x00, 0x00, 0x00, 0xFF, - 0xFF, 0x32, 0x00, 0x44, 0xFF, 0xB9, 0x01, 0xC1, 0xFC, 0x86, 0x05, - 0xA5, 0xF6, 0x1E, 0x14, 0xBA, 0x44, 0xF0, 0xF7, 0x7B, 0x02, 0x6B, - 0xFF, 0xE4, 0xFF, 0x41, 0x00, 0xD6, 0xFF, 0x0B, 0x00, 0xFD, 0xFF, - 0x33, 0x00, 0x43, 0xFF, 0xD5, 0x01, 0x3A, 0xFC, 0x2A, 0x07, 0xE7, - 0xF1, 0xAC, 0x29, 0x66, 0x36, 0xC9, 0xF1, 0x83, 0x06, 0xDD, 0xFC, - 0x62, 0x01, 0x81, 0xFF, 0x1D, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x08, - 0x00, 0xBB, 0xFF, 0xF1, 0x00, 0x96, 0xFD, 0x78, 0x05, 0x0E, 0xF3, - 0x8A, 0x3C, 0xEA, 0x21, 0x19, 0xF3, 0xE6, 0x06, 0x38, 0xFC, 0xE6, - 0x01, 0x37, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x12, 0x00, 0xB4, 0xFF, - 0x98, 0x00, 0x32, 0xFF, 0xB0, 0x00, 0x41, 0x00, 0x30, 0xFC, 0x86, - 0x47, 0xC6, 0x0C, 0x24, 0xF9, 0x60, 0x04, 0x4B, 0xFD, 0x7D, 0x01, - 0x5A, 0xFF, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x5A, - 0xFF, 0x7E, 0x01, 0x48, 0xFD, 0x66, 0x04, 0x18, 0xF9, 0xE8, 0x0C, - 0x7C, 0x47, 0x19, 0xFC, 0x4D, 0x00, 0xA9, 0x00, 0x35, 0xFF, 0x96, - 0x00, 0xB5, 0xFF, 0x12, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x37, 0xFF, - 0xE6, 0x01, 0x38, 0xFC, 0xE9, 0x06, 0x12, 0xF3, 0x10, 0x22, 0x6E, - 0x3C, 0x05, 0xF3, 0x7E, 0x05, 0x91, 0xFD, 0xF4, 0x00, 0xBA, 0xFF, - 0x09, 0x00, 0x01, 0x00, 0xFE, 0xFF, 0x1D, 0x00, 0x82, 0xFF, 0x60, - 0x01, 0xE0, 0xFC, 0x7F, 0x06, 0xCC, 0xF1, 0x85, 0x36, 0x87, 0x29, - 0xEB, 0xF1, 0x2A, 0x07, 0x39, 0xFC, 0xD6, 0x01, 0x43, 0xFF, 0x33, - 0x00, 0xFD, 0xFF, 0x0B, 0x00, 0xD5, 0xFF, 0x42, 0x00, 0xE1, 0xFF, - 0x71, 0xFF, 0x71, 0x02, 0x02, 0xF8, 0xCC, 0x44, 0xFA, 0x13, 0xB0, - 0xF6, 0x81, 0x05, 0xC3, 0xFC, 0xB8, 0x01, 0x44, 0xFF, 0x31, 0x00, - 0xFF, 0xFF, 0x00, 0x00, 0x22, 0x00, 0x77, 0xFF, 0x34, 0x01, 0xEA, - 0xFD, 0x1F, 0x03, 0xAE, 0xFB, 0x45, 0x06, 0xD5, 0x48, 0x3C, 0x01, - 0xDC, 0xFD, 0xFD, 0x01, 0x80, 0xFE, 0xED, 0x00, 0x93, 0xFF, 0x1B, - 0x00, 0xFE, 0xFF, 0x35, 0x00, 0x39, 0xFF, 0xD8, 0x01, 0x6F, 0xFC, - 0x47, 0x06, 0xD7, 0xF4, 0x5D, 0x1A, 0x74, 0x41, 0x48, 0xF5, 0x04, - 0x04, 0x80, 0xFE, 0x69, 0x00, 0xFF, 0xFF, 0xEF, 0xFF, 0x05, 0x00, - 0xFD, 0xFF, 0x2B, 0x00, 0x59, 0xFF, 0xAE, 0x01, 0x6A, 0xFC, 0x0D, - 0x07, 0x80, 0xF1, 0xB8, 0x2F, 0xCF, 0x30, 0x7D, 0xF1, 0xFF, 0x06, - 0x78, 0xFC, 0xA5, 0x01, 0x5F, 0xFF, 0x29, 0x00, 0xFD, 0xFF, 0x05, - 0x00, 0xF3, 0xFF, 0xF4, 0xFF, 0x80, 0x00, 0x58, 0xFE, 0x46, 0x04, - 0xDD, 0xF4, 0xC3, 0x40, 0x8C, 0x1B, 0x89, 0xF4, 0x66, 0x06, 0x63, - 0xFC, 0xDC, 0x01, 0x38, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x19, 0x00, - 0x98, 0xFF, 0xE0, 0x00, 0x9C, 0xFE, 0xC8, 0x01, 0x3F, 0xFE, 0x62, - 0x00, 0xB8, 0x48, 0x3F, 0x07, 0x47, 0xFB, 0x53, 0x03, 0xD0, 0xFD, - 0x40, 0x01, 0x72, 0xFF, 0x23, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x30, - 0x00, 0x47, 0xFF, 0xB0, 0x01, 0xD6, 0xFC, 0x58, 0x05, 0x0D, 0xF7, - 0xD7, 0x12, 0x4E, 0x45, 0x96, 0xF8, 0x20, 0x02, 0xA0, 0xFF, 0xC7, - 0xFF, 0x4F, 0x00, 0xD0, 0xFF, 0x0C, 0x00, 0xFD, 0xFF, 0x34, 0x00, - 0x40, 0xFF, 0xDB, 0x01, 0x35, 0xFC, 0x26, 0x07, 0x0E, 0xF2, 0x60, - 0x28, 0x82, 0x37, 0xED, 0xF1, 0x5E, 0x06, 0xF8, 0xFC, 0x51, 0x01, - 0x8A, 0xFF, 0x1A, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x0C, 0x00, 0xB0, - 0xFF, 0x07, 0x01, 0x72, 0xFD, 0xAE, 0x05, 0xC4, 0xF2, 0x90, 0x3B, - 0x3F, 0x23, 0xD9, 0xF2, 0xF9, 0x06, 0x34, 0xFC, 0xE6, 0x01, 0x38, - 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x11, 0x00, 0xBA, 0xFF, 0x89, 0x00, - 0x51, 0xFF, 0x77, 0x00, 0xA7, 0x00, 0x64, 0xFB, 0x26, 0x47, 0xFC, - 0x0D, 0xB4, 0xF8, 0x95, 0x04, 0x31, 0xFD, 0x88, 0x01, 0x56, 0xFF, - 0x2C, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x29, 0x00, 0x5E, 0xFF, 0x72, - 0x01, 0x62, 0xFD, 0x2F, 0x04, 0x89, 0xF9, 0xB6, 0x0B, 0xD2, 0x47, - 0xEB, 0xFC, 0xE4, 0xFF, 0xE3, 0x00, 0x16, 0xFF, 0xA5, 0x00, 0xAF, - 0xFF, 0x13, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, - 0x3E, 0xFC, 0xD3, 0x06, 0x56, 0xF3, 0xBA, 0x20, 0x61, 0x3D, 0x56, - 0xF3, 0x45, 0x05, 0xB7, 0xFD, 0xDE, 0x00, 0xC5, 0xFF, 0x05, 0x00, - 0x02, 0x00, 0xFE, 0xFF, 0x20, 0x00, 0x7A, 0xFF, 0x70, 0x01, 0xC7, - 0xFC, 0xA0, 0x06, 0xAE, 0xF1, 0x65, 0x35, 0xD1, 0x2A, 0xCA, 0xF1, - 0x2A, 0x07, 0x40, 0xFC, 0xD0, 0x01, 0x47, 0xFF, 0x32, 0x00, 0xFD, - 0xFF, 0x09, 0x00, 0xDB, 0xFF, 0x34, 0x00, 0xFE, 0xFF, 0x3D, 0xFF, - 0xC9, 0x02, 0x64, 0xF7, 0x2F, 0x44, 0x44, 0x15, 0x4A, 0xF6, 0xAD, - 0x05, 0xAF, 0xFC, 0xC0, 0x01, 0x41, 0xFF, 0x32, 0x00, 0xFF, 0xFF, - 0x00, 0x00, 0x21, 0x00, 0x7C, 0xFF, 0x26, 0x01, 0x08, 0xFE, 0xE4, - 0x02, 0x21, 0xFC, 0x31, 0x05, 0xEB, 0x48, 0x37, 0x02, 0x6B, 0xFD, - 0x39, 0x02, 0x61, 0xFE, 0xFC, 0x00, 0x8D, 0xFF, 0x1C, 0x00, 0xFE, - 0xFF, 0x35, 0x00, 0x3A, 0xFF, 0xD3, 0x01, 0x7D, 0xFC, 0x23, 0x06,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, - 0x25, 0x00, 0x6B, 0xFF, 0x8D, 0x01, 0x9B, 0xFC, 0xD8, 0x06, 0x87, - 0xF1, 0x13, 0x33, 0x5E, 0x2D, 0x98, 0xF1, 0x22, 0x07, 0x52, 0xFC, - 0xC1, 0x01, 0x4F, 0xFF, 0x2F, 0x00, 0xFD, 0xFF, 0x07, 0x00, 0xE5, - 0xFF, 0x18, 0x00, 0x36, 0x00, 0xD9, 0xFE, 0x71, 0x03, 0x3F, 0xF6, - 0xDB, 0x42, 0xE0, 0x17, 0x86, 0xF5, 0x00, 0x06, 0x8C, 0xFC, 0xCE, - 0x01, 0x3C, 0xFF, 0x34, 0x00, 0xFE, 0xFF, 0x1D, 0x00, 0x88, 0xFF, - 0x09, 0x01, 0x45, 0xFE, 0x6E, 0x02, 0x06, 0xFD, 0x1C, 0x03, 0xF4, - 0x48, 0x41, 0x04, 0x87, 0xFC, 0xB0, 0x02, 0x23, 0xFE, 0x19, 0x01, - 0x81, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x33, 0x00, 0x3F, - 0xFF, 0xC6, 0x01, 0x9F, 0xFC, 0xD3, 0x05, 0xF1, 0xF5, 0x6C, 0x16, - 0x9E, 0x43, 0xDD, 0xF6, 0x15, 0x03, 0x10, 0xFF, 0x17, 0x00, 0x28, - 0x00, 0xDF, 0xFF, 0x09, 0x00, 0xFD, 0xFF, 0x30, 0x00, 0x4A, 0xFF, - 0xCA, 0x01, 0x47, 0xFC, 0x28, 0x07, 0xB0, 0xF1, 0xF5, 0x2B, 0x60, - 0x34, 0x9A, 0xF1, 0xBB, 0x06, 0xB3, 0xFC, 0x7D, 0x01, 0x73, 0xFF, - 0x22, 0x00, 0xFE, 0xFF, 0x02, 0x00, 0x01, 0x00, 0xCF, 0xFF, 0xC9, - 0x00, 0xDA, 0xFD, 0x0F, 0x05, 0xA5, 0xF3, 0x31, 0x3E, 0x8A, 0x1F, - 0x97, 0xF3, 0xBD, 0x06, 0x44, 0xFC, 0xE5, 0x01, 0x36, 0xFF, 0x36, - 0x00, 0xFD, 0xFF, 0x15, 0x00, 0xAA, 0xFF, 0xB3, 0x00, 0xFA, 0xFE, - 0x17, 0x01, 0x86, 0xFF, 0xAC, 0xFD, 0x16, 0x48, 0xAA, 0x0A, 0xEE, - 0xF9, 0xFE, 0x03, 0x7A, 0xFD, 0x67, 0x01, 0x63, 0xFF, 0x28, 0x00, - 0x00, 0x00, 0xFF, 0xFF, 0x2D, 0x00, 0x52, 0xFF, 0x92, 0x01, 0x1B, - 0xFD, 0xC4, 0x04, 0x51, 0xF8, 0x13, 0x0F, 0xC8, 0x46, 0xB6, 0xFA, - 0x01, 0x01, 0x44, 0x00, 0x6C, 0xFF, 0x7B, 0x00, 0xBF, 0xFF, 0x10, - 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x39, 0xFF, 0xE5, 0x01, 0x32, 0xFC, - 0x08, 0x07, 0xA4, 0xF2, 0x6D, 0x24, 0xAD, 0x3A, 0x88, 0xF2, 0xDB, - 0x05, 0x53, 0xFD, 0x19, 0x01, 0xA7, 0xFF, 0x10, 0x00, 0x00, 0x00, - 0xFF, 0xFF, 0x17, 0x00, 0x92, 0xFF, 0x41, 0x01, 0x11, 0xFD, 0x3B, - 0x06, 0x14, 0xF2, 0x78, 0x38, 0x36, 0x27, 0x35, 0xF2, 0x20, 0x07, - 0x33, 0xFC, 0xDF, 0x01, 0x3E, 0xFF, 0x34, 0x00, 0xFD, 0xFF, 0x0D, - 0x00, 0xCB, 0xFF, 0x5C, 0x00, 0xAC, 0xFF, 0xD0, 0xFF, 0xCD, 0x01, - 0x30, 0xF9, 0xC8, 0x45, 0xB6, 0x11, 0x6B, 0xF7, 0x2D, 0x05, 0xE9, - 0xFC, 0xA8, 0x01, 0x4A, 0xFF, 0x30, 0x00, 0xFF, 0xFF, 0x00, 0x00, - 0x25, 0x00, 0x6D, 0xFF, 0x4C, 0x01, 0xB6, 0xFD, 0x86, 0x03, 0xE1, - 0xFA, 0x3D, 0x08, 0x92, 0x48, 0x8E, 0xFF, 0xA1, 0xFE, 0x93, 0x01, - 0xB8, 0xFE, 0xD3, 0x00, 0x9D, 0xFF, 0x18, 0x00, 0xFE, 0xFF, 0x36, - 0x00, 0x37, 0xFF, 0xE0, 0x01, 0x58, 0xFC, 0x82, 0x06, 0x3E, 0xF4, - 0xBA, 0x1C, 0x07, 0x40, 0x79, 0xF4, 0x84, 0x04, 0x31, 0xFE, 0x96, - 0x00, 0xE8, 0xFF, 0xF7, 0xFF, 0x04, 0x00, 0xFD, 0xFF, 0x28, 0x00, - 0x64, 0xFF, 0x9A, 0x01, 0x88, 0xFC, 0xEE, 0x06, 0x7E, 0xF1, 0xE3, - 0x31, 0x9F, 0x2E, 0x88, 0xF1, 0x19, 0x07, 0x5E, 0xFC, 0xB7, 0x01, - 0x54, 0xFF, 0x2D, 0x00, 0xFD, 0xFF, 0x06, 0x00, 0xEA, 0xFF, 0x0B, - 0x00, 0x51, 0x00, 0xAA, 0xFE, 0xC0, 0x03, 0xB8, 0xF5, 0x21, 0x42, - 0x31, 0x19, 0x28, 0xF5, 0x27, 0x06, 0x7C, 0xFC, 0xD4, 0x01, 0x3A, - 0xFF, 0x35, 0x00, 0xFE, 0xFF, 0x1C, 0x00, 0x8D, 0xFF, 0xFA, 0x00, - 0x64, 0xFE, 0x32, 0x02, 0x78, 0xFD, 0x1B, 0x02, 0xEA, 0x48, 0x50, - 0x05, 0x14, 0xFC, 0xEB, 0x02, 0x05, 0xFE, 0x27, 0x01, 0x7C, 0xFF, - 0x21, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x32, 0x00, 0x41, 0xFF, 0xBF, - 0x01, 0xB2, 0xFC, 0xA9, 0x05, 0x55, 0xF6, 0x20, 0x15, 0x42, 0x44, - 0x75, 0xF7, 0xBF, 0x02, 0x43, 0xFF, 0xFA, 0xFF, 0x36, 0x00, 0xDA, - 0xFF, 0x0A, 0x00, 0xFD, 0xFF, 0x32, 0x00, 0x46, 0xFF,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48, 0x64, 0x06, 0xA1, - 0xFB, 0x26, 0x03, 0xE7, 0xFD, 0x35, 0x01, 0x76, 0xFF, 0x22, 0x00, - 0x00, 0x00, 0xFF, 0xFF, 0x31, 0x00, 0x44, 0xFF, 0xB7, 0x01, 0xC5, - 0xFC, 0x7C, 0x05, 0xBC, 0xF6, 0xD5, 0x13, 0xDC, 0x44, 0x14, 0xF8, - 0x67, 0x02, 0x77, 0xFF, 0xDD, 0xFF, 0x44, 0x00, 0xD5, 0xFF, 0x0B, - 0x00, 0xFD, 0xFF, 0x33, 0x00, 0x42, 0xFF, 0xD7, 0x01, 0x39, 0xFC, - 0x29, 0x07, 0xEF, 0xF1, 0x62, 0x29, 0xA5, 0x36, 0xD0, 0xF1, 0x7B, - 0x06, 0xE3, 0xFC, 0x5E, 0x01, 0x83, 0xFF, 0x1D, 0x00, 0xFE, 0xFF, - 0x01, 0x00, 0x09, 0x00, 0xB8, 0xFF, 0xF6, 0x00, 0x8D, 0xFD, 0x84, - 0x05, 0xFD, 0xF2, 0x52, 0x3C, 0x35, 0x22, 0x0B, 0xF3, 0xEB, 0x06, - 0x37, 0xFC, 0xE6, 0x01, 0x37, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x12, - 0x00, 0xB5, 0xFF, 0x94, 0x00, 0x39, 0xFF, 0xA3, 0x00, 0x58, 0x00, - 0x02, 0xFC, 0x73, 0x47, 0x0B, 0x0D, 0x0B, 0xF9, 0x6C, 0x04, 0x45, - 0xFD, 0x80, 0x01, 0x59, 0xFF, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x2A, 0x00, 0x5B, 0xFF, 0x7C, 0x01, 0x4E, 0xFD, 0x5A, 0x04, 0x31, - 0xF9, 0xA4, 0x0C, 0x90, 0x47, 0x47, 0xFC, 0x36, 0x00, 0xB6, 0x00, - 0x2E, 0xFF, 0x99, 0x00, 0xB3, 0xFF, 0x12, 0x00, 0xFD, 0xFF, 0x36, - 0x00, 0x37, 0xFF, 0xE6, 0x01, 0x39, 0xFC, 0xE4, 0x06, 0x21, 0xF3, - 0xC4, 0x21, 0xA5, 0x3C, 0x16, 0xF3, 0x72, 0x05, 0x9A, 0xFD, 0xEF, - 0x00, 0xBC, 0xFF, 0x08, 0x00, 0x01, 0x00, 0xFE, 0xFF, 0x1E, 0x00, - 0x80, 0xFF, 0x64, 0x01, 0xDA, 0xFC, 0x87, 0x06, 0xC5, 0xF1, 0x46, - 0x36, 0xD1, 0x29, 0xE3, 0xF1, 0x2A, 0x07, 0x3A, 0xFC, 0xD5, 0x01, - 0x44, 0xFF, 0x32, 0x00, 0xFD, 0xFF, 0x0A, 0x00, 0xD6, 0xFF, 0x3F, - 0x00, 0xE7, 0xFF, 0x65, 0xFF, 0x85, 0x02, 0xDE, 0xF7, 0xA9, 0x44, - 0x43, 0x14, 0x99, 0xF6, 0x8B, 0x05, 0xBF, 0xFC, 0xBA, 0x01, 0x43, - 0xFF, 0x32, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x22, 0x00, 0x78, 0xFF, - 0x31, 0x01, 0xF1, 0xFD, 0x12, 0x03, 0xC7, 0xFB, 0x07, 0x06, 0xDB, - 0x48, 0x73, 0x01, 0xC3, 0xFD, 0x0A, 0x02, 0x79, 0xFE, 0xF1, 0x00, - 0x91, 0xFF, 0x1B, 0x00, 0xFE, 0xFF, 0x35, 0x00, 0x39, 0xFF, 0xD7, - 0x01, 0x72, 0xFC, 0x3F, 0x06, 0xEB, 0xF4, 0x12, 0x1A, 0xA1, 0x41, - 0x63, 0xF5, 0xF3, 0x03, 0x8A, 0xFE, 0x63, 0x00, 0x02, 0x00, 0xEE, - 0xFF, 0x06, 0x00, 0xFD, 0xFF, 0x2C, 0x00, 0x58, 0xFF, 0xB1, 0x01, - 0x67, 0xFC, 0x10, 0x07, 0x81, 0xF1, 0x73, 0x2F, 0x15, 0x31, 0x7C, - 0xF1, 0xFB, 0x06, 0x7C, 0xFC, 0xA2, 0x01, 0x60, 0xFF, 0x29, 0x00, -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, 0xA1, 0x04, 0x2B, 0xFD, 0x8B, - 0x01, 0x55, 0xFF, 0x2C, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x29, 0x00, - 0x5F, 0xFF, 0x70, 0x01, 0x68, 0xFD, 0x23, 0x04, 0xA2, 0xF9, 0x73, - 0x0B, 0xE4, 0x47, 0x1B, 0xFD, 0xCD, 0xFF, 0xF0, 0x00, 0x0F, 0xFF, - 0xA9, 0x00, 0xAE, 0xFF, 0x14, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x36, - 0xFF, 0xE6, 0x01, 0x3F, 0xFC, 0xCE, 0x06, 0x66, 0xF3, 0x6F, 0x20, - 0x96, 0x3D, 0x69, 0xF3, 0x38, 0x05, 0xBF, 0xFD, 0xD9, 0x00, 0xC7, - 0xFF, 0x04, 0x00, 0x02, 0x00, 0xFE, 0xFF, 0x20, 0x00, 0x78, 0xFF, - 0x74, 0x01, 0xC2, 0xFC, 0xA7, 0x06, 0xA8, 0xF1, 0x25, 0x35, 0x1B, - 0x2B, 0xC2, 0xF1, 0x2A, 0x07, 0x41, 0xFC, 0xCE, 0x01, 0x47, 0xFF, - 0x31, 0x00, 0xFD, 0xFF, 0x09, 0x00, 0xDC, 0xFF, 0x31, 0x00, 0x04, - 0x00, 0x32, 0xFF, 0xDC, 0x02, 0x42, 0xF7, 0x0B, 0x44, 0x8E, 0x15, - 0x34, 0xF6, 0xB7, 0x05, 0xAB, 0xFC, 0xC1, 0x01, 0x40, 0xFF, 0x33, - 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x20, 0x00, 0x7E, 0xFF, 0x23, 0x01, - 0x0F, 0xFE, 0xD7, 0x02, 0x3B, 0xFC, 0xF5, 0x04, 0xED, 0x48, 0x70, - 0x02, 0x52, 0xFD, 0x46, 0x02, 0x5A, 0xFE, 0xFF, 0x00, 0x8B, 0xFF, - 0x1C, 0x00, 0xFE, 0xFF, 0x35, 0x00, 0x3B, 0xFF, 0xD2, 0x01, 0x81, - 0xFC, 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 0xFF, 0x00, 0x00, 0x11, 0x00, - 0xA3, 0xFF, 0x20, 0x01, 0x49, 0xFD, 0xEB, 0x05, 0x74, 0xF2, 0x54, - 0x3A, 0xDD, 0x24, 0x91, 0xF2, 0x0C, 0x07, 0x32, 0xFC, 0xE4, 0x01, - 0x3A, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x0F, 0x00, 0xC1, 0xFF, 0x76, - 0x00, 0x76, 0xFF, 0x32, 0x00, 0x22, 0x01, 0x76, 0xFA, 0xA3, 0x46, - 0x7D, 0x0F, 0x2C, 0xF8, 0xD5, 0x04, 0x13, 0xFD, 0x96, 0x01, 0x51, - 0xFF, 0x2D, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x27, 0x00, 0x64, 0xFF, - 0x63, 0x01, 0x84, 0xFD, 0xEB, 0x03, 0x14, 0xFA, 0x47, 0x0A, 0x2C, - 0x48, 0xF6, 0xFD, 0x63, 0xFF, 0x2B, 0x01, 0xF0, 0xFE, 0xB8, 0x00, - 0xA8, 0xFF, 0x15, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE4, - 0x01, 0x47, 0xFC, 0xB5, 0x06, 0xB0, 0xF3, 0x19, 0x1F, 0x7E, 0x3E, - 0xC4, 0xF3, 0xFA, 0x04, 0xE7, 0xFD, 0xC1, 0x00, 0xD3, 0xFF, 0xFF, - 0xFF, 0x02, 0x00, 0xFE, 0xFF, 0x23, 0x00, 0x71, 0xFF, 0x82, 0x01, - 0xAB, 0xFC, 0xC4, 0x06, 0x93, 0xF1, 0xFD, 0x33, 0x62, 0x2C, 0xA8, - 0xF1, 0x27, 0x07, 0x4A, 0xFC, 0xC7, 0x01, 0x4C, 0xFF, 0x30, 0x00, - 0xFD, 0xFF, 0x08, 0x00, 0xE1, 0xFF, 0x23, 0x00, 0x20, 0x00, 0x00, - 0xFF, 0x31, 0x03, 0xAD, 0xF6, 0x65, 0x43, 0xDC, 0x16, 0xD1, 0xF5, - 0xE1, 0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xEB, 0x04, 0xFC, 0xF7, 0x0A, - 0x10, 0x70, 0x46, 0x22, 0xFA, 0x4D, 0x01, 0x19, 0x00, 0x84, 0xFF, - 0x70, 0x00, 0xC4, 0xFF, 0x0F, 0x00, 0xFD, 0xFF, 0x35, 0x00, 0x3B, - 0xFF, 0xE3, 0x01, 0x31, 0xFC, 0x12, 0x07, 0x79, 0xF2, 0x73, 0x25, - 0xDF, 0x39, 0x5A, 0xF2, 0x00, 0x06, 0x3A, 0xFD, 0x28, 0x01, 0x9F, - 0xFF, 0x13, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x15, 0x00, 0x99, 0xFF, - 0x33, 0x01, 0x29, 0xFD, 0x1A, 0x06, 0x3B, 0xF2, 0x4B, 0x39, 0x30, - 0x26, 0x5B, 0xF2, 0x19, 0x07, 0x31, 0xFC, 0xE1, 0x01, 0x3C, 0xFF, - 0x35, 0x00, 0xFD, 0xFF, 0x0E, 0x00, 0xC7, 0xFF, 0x68, 0x00, 0x95, - 0xFF, 0xFA, 0xFF, 0x83, 0x01, 0xBB, 0xF9, 0x2B, 0x46, 0xBB, 0x10, - 0xBF, 0xF7, 0x07, 0x05, 0xFB, 0xFC, 0xA0, 0x01, 0x4D, 0xFF, 0x2F, - 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x26, 0x00, 0x69, 0xFF, 0x56, 0x01, - 0xA0, 0xFD, 0xB3, 0x03, 0x87, 0xFA, 0x1F, 0x09, 0x6A, 0x48, 0xD9, - 0xFE, 0xF6, 0xFE, 0x65, 0x01, 0xD0, 0xFE, 0xC7, 0x00, 0xA2, 0xFF, - 0x17, 0x00, 0xFE, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE2, 0x01, 0x50, - 0xFC, 0x99, 0x06, 0xFE, 0xF3, 0xC3, 0x1D, 0x5E, 0x3F, 0x27, 0xF4, - 0xB9, 0x04, 0x10, 0xFE, 0xA9, 0x00, 0xDF, 0xFF, 0xFB, 0xFF, 0x03, - 0x00, 0xFD, 0xFF, 0x26, 0x00, 0x69, 0xFF, 0x90, 0x01, 0x96, 0xFC, - 0xDD, 0x06, 0x85, 0xF1, 0xD0, 0x32, 0xA6, 0x2D, 0x94, 0xF1, 0x20, - 0x07, 0x54, 0xFC, 0xBF, 0x01, 0x50, 0xFF, 0x2E, 0x00, 0xFD, 0xFF, - 0x07, 0x00, 0xE6, 0xFF, 0x15, 0x00, 0x3C, 0x00, 0xCF, 0xFE, 0x83, - 0x03, 0x20, 0xF6, 0xB2, 0x42, 0x2B, 0x18, 0x71, 0xF5, 0x09, 0x06, - 0x88, 0xFC, 0xCF, 0x01, 0x3C, 0xFF, 0x34, 0x00, 0xFE, 0xFF, 0x1D, - 0x00, 0x89, 0xFF, 0x06, 0x01, 0x4C, 0xFE, 0x60, 0x02, 0x1F, 0xFD, - 0xE2, 0x02, 0xF3, 0x48, 0x7D, 0x04, 0x6E, 0xFC, 0xBD, 0x02, 0x1C, - 0xFE, 0x1C, 0x01, 0x80, 0xFF, 0x20, 0x00, 0x00, 0x00, 0xFF, 0xFF, - 0x33, 0x00, 0x3F, 0xFF, 0xC5, 0x01, 0xA3, 0xFC, 0xCA, 0x05, 0x07, - 0xF6, 0x22, 0x16, 0xC3, 0x43, 0xFE, 0xF6, 0x02, 0x03, 0x1B, 0xFF, - 0x11, 0x00, 0x2B, 0x00, 0xDE, 0xFF, 0x09, 0x00, 0xFD, 0xFF, 0x31, - 0x00, 0x49, 0xFF, 0xCB, 0x01, 0x45, 0xFC, 0x29, 0x07, 0xB6, 0xF1, - 0xAD, 0x2B, 0xA2, 0x34, 0x9E, 0xF1, 0xB4, 0x06, 0xB8, 0xFC, 0x7A, - 0x01, 0x75, 0xFF, 0x22, 0x00, 0xFE, 0xFF, 0x02, 0x00, 0x02, 0x00, - 0xCC, 0xFF, 0xCE, 0x00, 0xD1, 0xFD, 0x1D, 0x05, 0x91, 0xF3, 0xFE, - 0x3D, 0xD7, 0x1F, 0x87, 0xF3, 0xC3, 0x06, 0x42, 0xFC, 0xE5, 0x01, - 0x36, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x14, 0x00, 0xAB, 0xFF, 0xAF, - 0x00, 0x01, 0xFF, 0x0A, 0x01, 0x9E, 0xFF, 0x7C, 0xFD, 0x03, 0x48, - 0xED, 0x0A, 0xD5, 0xF9, 0x0A, 0x04, 0x74, 0xFD, 0x6A, 0x01, 0x62, - 0xFF, 0x28, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x2D, 0x00, 0x53, 0xFF, - 0x90, 0x01, 0x20, 0xFD, 0xB8, 0x04, 0x6A, 0xF8, 0xCD, 0x0E, 0xE1, - 0x46, 0xE1, 0xFA, 0xEB, 0x00, 0x51, 0x00, 0x65, 0xFF, 0x7F, 0x00, - 0xBE, 0xFF, 0x10, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x39, 0xFF, 0xE5, - 0x01, 0x33, 0xFC, 0x04, 0x07, 0xB1, 0xF2, 0x21, 0x24, 0xE6, 0x3A, - 0x97, 0xF2, 0xD0, 0x05, 0x5B, 0xFD, 0x15, 0x01, 0xA9, 0xFF, 0x0F, - 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x18, 0x00, 0x90, 0xFF, 0x45, 0x01, - 0x0B, 0xFD, 0x44, 0x06, 0x0A, 0xF2, 0x3B, 0x38, 0x80, 0x27, 0x2B, - 0xF2, 0x22, 0x07, 0x33, 0xFC, 0xDE, 0x01, 0x3E, 0xFF, 0x34, 0x00, - 0xFD, 0xFF, 0x0D, 0x00, 0xCD, 0xFF, 0x59, 0x00, 0xB3, 0xFF, 0xC4, - 0xFF, 0xE2, 0x01, 0x09, 0xF9, 0xAA, 0x45, 0xFE, 0x11, 0x54, 0xF7, - 0x38, 0x05, 0xE4, 0xFC, 0xAA, 0x01, 0x49, 0xFF, 0x30, 0x00, 0xFF, - 0xFF, 0x00, 0x00, 0x24, 0x00, 0x6E, 0xFF, 0x49, 0x01, 0xBC, 0xFD, - 0x7A, 0x03, 0xFA, 0x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32, 0x00, 0x45, - 0xFF, 0xD2, 0x01, 0x3D, 0xFC, 0x2B, 0x07, 0xD4, 0xF1, 0x64, 0x2A, - 0xC6, 0x35, 0xB7, 0xF1, 0x96, 0x06, 0xCF, 0xFC, 0x6B, 0x01, 0x7D, - 0xFF, 0x1F, 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x06, 0x00, 0xC1, 0xFF, - 0xE5, 0x00, 0xAA, 0xFD, 0x58, 0x05, 0x3A, 0xF3, 0x11, 0x3D, 0x2C, - 0x21, 0x3F, 0xF3, 0xDA, 0x06, 0x3B, 0xFC, 0xE6, 0x01, 0x36, 0xFF, - 0x36, 0x00, 0xFD, 0xFF, 0x13, 0x00, 0xB1, 0xFF, 0xA0, 0x00, 0x20, - 0xFF, 0xD0, 0x00, 0x07, 0x00, 0xA4, 0xFC, 0xB6, 0x47, 0x1C, 0x0C, - 0x63, 0xF9, 0x42, 0x04, 0x59, 0xFD, 0x76, 0x01, 0x5D, 0xFF, 0x2A, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x57, 0xFF, 0x85, 0x01, - 0x39, 0xFD, 0x84, 0x04, 0xD9, 0xF8, 0x95, 0x0D, 0x48, 0x47, 0xA7, - 0xFB, 0x86, 0x00, 0x8A, 0x00, 0x46, 0xFF, 0x8E, 0x00, 0xB8, 0xFF, - 0x11, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x37, 0xFF, 0xE6, 0x01, 0x35, - 0xFC, 0xF3, 0x06, 0xEE, 0xF2, 0xCD, 0x22, 0xE4, 0x3B, 0xDC, 0xF2, - 0x9C, 0x05, 0x7E, 0xFD, 0x00, 0x01, 0xB4, 0xFF, 0x0B, 0x00, 0x01, - 0x00, 0xFE, 0xFF, 0x1B, 0x00, 0x87, 0xFF, 0x57, 0x01, 0xEF, 0xFC, - 0x6B, 0x06, 0xE0, 0xF1, 0x23, 0x37, 0xCE, 0x28, 0x01, 0xF2, 0x28, - 0x07, 0x36, 0xFC, 0xD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 0xCB, 0x48, - 0xA2, 0x06, 0x87, 0xFB, 0x33, 0x03, 0xE0, 0xFD, 0x39, 0x01, 0x75, - 0xFF, 0x23, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x31, 0x00, 0x45, 0xFF, - 0xB5, 0x01, 0xCA, 0xFC, 0x72, 0x05, 0xD3, 0xF6, 0x8D, 0x13, 0xFD, - 0x44, 0x39, 0xF8, 0x53, 0x02, 0x82, 0xFF, 0xD7, 0xFF, 0x47, 0x00, - 0xD3, 0xFF, 0x0B, 0x00, 0xFD, 0xFF, 0x33, 0x00, 0x42, 0xFF, 0xD8, - 0x01, 0x37, 0xFC, 0x29, 0x07, 0xF8, 0xF1, 0x19, 0x29, 0xE5, 0x36, - 0xD8, 0xF1, 0x73, 0x06, 0xE9, 0xFC, 0x5B, 0x01, 0x85, 0xFF, 0x1C, - 0x00, 0xFE, 0xFF, 0x01, 0x00, 0x0A, 0x00, 0xB6, 0xFF, 0xFB, 0x00, - 0x85, 0xFD, 0x90, 0x05, 0xEC, 0xF2, 0x1C, 0x3C, 0x81, 0x22, 0xFC, - 0xF2, 0xEF, 0x06, 0x36, 0xFC, 0xE6, 0x01, 0x37, 0xFF, 0x36, 0x00, - 0xFD, 0xFF, 0x12, 0x00, 0xB7, 0xFF, 0x91, 0x00, 0x40, 0xFF, 0x96, - 0x00, 0x6F, 0x00, 0xD5, 0xFB, 0x5E, 0x47, 0x50, 0x0D, 0xF2, 0xF8, - 0x78, 0x04, 0x3F, 0xFD, 0x82, 0x01, 0x58, 0xFF, 0x2B, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x2A, 0x00, 0x5C, 0xFF, 0x79, 0x01, 0x53, 0xFD, - 0x4E, 0x04, 0x4A, 0xF9, 0x60, 0x0C, 0xA3, 0x47, 0x76, 0xFC, 0x1F, - 0x00, 0xC3, 0x00, 0x27, 0xFF, 0x9D, 0x00, 0xB2, 0xFF, 0x13, 0x00, - 0xFD, 0xFF, 0x36, 0x00, 0x37, 0x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E, 0x82, 0xF8, 0xAD, 0x04, - 0x26, 0xFD, 0x8D, 0x01, 0x54, 0xFF, 0x2C, 0x00, 0xFF, 0xFF, 0x00, - 0x00, 0x29, 0x00, 0x60, 0xFF, 0x6D, 0x01, 0x6E, 0xFD, 0x17, 0x04, - 0xBC, 0xF9, 0x30, 0x0B, 0xF4, 0x47, 0x4B, 0xFD, 0xB5, 0xFF, 0xFD, - 0x00, 0x08, 0xFF, 0xAC, 0x00, 0xAC, 0xFF, 0x14, 0x00, 0xFD, 0xFF, - 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x41, 0xFC, 0xC8, 0x06, 0x76, - 0xF3, 0x22, 0x20, 0xCA, 0x3D, 0x7D, 0xF3, 0x2A, 0x05, 0xC8, 0xFD, - 0xD4, 0x00, 0xCA, 0xFF, 0x03, 0x00, 0x02, 0x00, 0xFE, 0xFF, 0x21, - 0x00, 0x77, 0xFF, 0x77, 0x01, 0xBD, 0xFC, 0xAE, 0x06, 0xA3, 0xF1, - 0xE3, 0x34, 0x64, 0x2B, 0xBC, 0xF1, 0x2A, 0x07, 0x43, 0xFC, 0xCD, - 0x01, 0x48, 0xFF, 0x31, 0x00, 0xFD, 0xFF, 0x09, 0x00, 0xDD, 0xFF, - 0x2E, 0x00, 0x0A, 0x00, 0x27, 0xFF, 0xEF, 0x02, 0x20, 0xF7, 0xE7, - 0x43, 0xD8, 0x15, 0x1E, 0xF6, 0xC0, 0x05, 0xA7, 0xFC, 0xC3, 0x01, - 0x40, 0xFF, 0x33, 0x00, 0xFF, 0xFF, 0x00, 0x00, 0x20, 0x00, 0x7F, - 0xFF, 0x20, 0x01, 0x16, 0xFE, 0xCA, 0x02, 0x54, 0xFC, 0xB9, 0x04, - 0xF2, 0x48, 0xA9, 0x02, 0x39, 0xFD, 0x53, 0x02, 0x53, 0xFE, 0x03, - 0x01, 0x8A, 0xFF, 0x1D, 0x00, 0xFE, 0xFF, 0x34, 0x00, 0x3B, 0xFF, - 0xD1, 0x01, 0x84, 0xFC, 0x12, 0x06, 0x5C, 0xF5, 0x76, 0x18, 0x89, - 0x42, 0x02, 0xF6, 0x94, 0x03, 0xC4, 0xFE, 0x42, 0x00, 0x12, 0x00, - 0xE8, 0xFF, 0x07, 0x00, 0xFD, 0xFF, 0x2E, 0x00, 0x51, 0xFF, 0xBD, - 0x01, 0x57, 0xFC, 0x1E, 0x07, 0x90, 0xF1, 0xED, 0x2D, 0x8C, 0x32, - 0x83, 0xF1, 0xE2, 0x06, 0x92, 0xFC, 0x93, 0x01, 0x68, 0xFF, 0x26, - 0x00, 0xFD, 0xFF, 0x03, 0x00, 0xFA, 0xFF, 0xE2, 0xFF, 0xA4, 0x00, - 0x19, 0xFE, 0xAA, 0x04, 0x3E, 0xF4, 0x90, 0x3F, 0x78, 0x1D, 0x10, - 0xF4, 0x93, 0x06, 0x52, 0xFC, 0xE1, 0x01, 0x36, 0xFF, 0x36, 0x00, - 0xFE, 0xFF, 0x17, 0x00, 0xA0, 0xFF, 0xCA, 0x00, 0xC9, 0xFE, 0x73, - 0x01, 0xDE, 0xFE, 0x0C, 0xFF, 0x76, 0x48, 0xDE, 0x08, 0xA1, 0xFA, - 0xA6, 0x03, 0xA6, 0xFD, 0x53, 0x01, 0x6A, 0xFF, 0x26, 0x00, 0x00, - 0x00, 0xFF, 0xFF, 0x2F, 0x00, 0x4C, 0xFF, 0xA2, 0x01, 0xF6, 0xFC, - 0x12, 0x05, 0xA7, 0xF7, 0x03, 0x11, 0x10, 0x46, 0x93, 0xF9, 0x98, - 0x01, 0xEE, 0xFF, 0x9B, 0xFF, 0x64, 0x00, 0xC8, 0xFF, 0x0E, 0x00, - 0xFD, 0xFF, 0x35, 0x00, 0x3C, 0xFF, 0xE1, 0x01, 0x32, 0xFC, 0x1B, - 0x07, 0x50, 0xF2, 0x7B, 0x26, 0x11, 0x39, 0x2F, 0xF2, 0x23, 0x06, - 0x22, 0xFD, 0x37, 0x01, 0x97, 0xFF, 0x15, 0x00, 0xFF, 0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 0x4B, 0xFF, - 0x28, 0xFE, 0x3A, 0x48, 0x04, 0x0A, 0x2E, 0xFA, 0xDF, 0x03, 0x8A, - 0xFD, 0x60, 0x01, 0x65, 0xFF, 0x27, 0x00, 0x00, 0x00, 0xFD, 0xFF, - 0x35, 0x00, 0x3A, 0xFF, 0xE3, 0x01, 0x31, 0xFC, 0x0F, 0x07, 0x84, - 0xF2, 0x29, 0x25, 0x1A, 0x3A, 0x67, 0xF2, 0xF6, 0x05, 0x41, 0xFD, - 0x24, 0x01, 0xA1, 0xFF, 0x12, 0x00, 0x00, 0x00, 0x0E, 0x00, 0xC8, - 0xFF, 0x64, 0x00, 0x9B, 0xFF, 0xEE, 0xFF, 0x98, 0x01, 0x93, 0xF9, - 0x10, 0x46, 0x03, 0x11, 0xA7, 0xF7, 0x12, 0x05, 0xF6, 0xFC, 0xA2, - 0x01, 0x4C, 0xFF, 0x2F, 0x00, 0xFF, 0xFF, 0xFE, 0xFF, 0x36, 0x00, - 0x36, 0xFF, 0xE1, 0x01, 0x52, 0xFC, 0x93, 0x06, 0x10, 0xF4, 0x78, - 0x1D, 0x90, 0x3F, 0x3E, 0xF4, 0xAA, 0x04, 0x19, 0xFE, 0xA4, 0x00, - 0xE2, 0xFF, 0xFA, 0xFF, 0x03, 0x00, 0x07, 0x00, 0xE8, 0xFF, 0x12, - 0x00, 0x42, 0x00, 0xC4, 0xFE, 0x94, 0x03, 0x02, 0xF6, 0x89, 0x42, - 0x76, 0x18, 0x5C, 0xF5, 0x12, 0x06, 0x84, 0xFC, 0xD1, 0x01, 0x3B, - 0xFF, 0x34, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x33, 0x00, 0x40, 0xFF, - 0xC3, 0x01, 0xA7, 0xFC, 0xC0, 0x05, 0x1E, 0xF6, 0xD8, 0x15, 0xE7, - 0x43, 0x20, 0xF7, 0xEF, 0x02, 0x27, 0xFF, 0x0A, 0x00, 0x2E, 0x00, - 0xDD, 0xFF, 0x09, 0x00, 0x02,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xFC, 0xC5, 0x01, 0x3F, 0xFF, 0x33, - 0x00, 0xFF, 0xFF, 0xFE, 0xFF, 0x34, 0x00, 0x3C, 0xFF, 0xCF, 0x01, - 0x88, 0xFC, 0x09, 0x06, 0x71, 0xF5, 0x2B, 0x18, 0xB2, 0x42, 0x20, - 0xF6, 0x83, 0x03, 0xCF, 0xFE, 0x3C, 0x00, 0x15, 0x00, 0xE6, 0xFF, - 0x07, 0x00, 0x03, 0x00, 0xFB, 0xFF, 0xDF, 0xFF, 0xA9, 0x00, 0x10, - 0xFE, 0xB9, 0x04, 0x27, 0xF4, 0x5E, 0x3F, 0xC3, 0x1D, 0xFE, 0xF3, - 0x99, 0x06, 0x50, 0xFC, 0xE2, 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFE, - 0xFF, 0xFF, 0xFF, 0x2F, 0x00, 0x4D, 0xFF, 0xA0, 0x01, 0xFB, 0xFC, - 0x07, 0x05, 0xBF, 0xF7, 0xBB, 0x10, 0x2B, 0x46, 0xBB, 0xF9, 0x83, - 0x01, 0xFA, 0xFF, 0x95, 0xFF, 0x68, 0x00, 0xC7, 0xFF, 0x0E, 0x00, - 0x00, 0x00, 0x13, 0x00, 0x9F, 0xFF, 0x28, 0x01, 0x3A, 0xFD, 0x00, - 0x06, 0x5A, 0xF2, 0xDF, 0x39, 0x73, 0x25, 0x79, 0xF2, 0x12, 0x07, - 0x31, 0xFC, 0xE3, 0x01, 0x3B, 0xFF, 0x35, 0x00, 0xFD, 0xFF, 0x00, - 0x00, 0x27, 0x00, 0x66, 0xFF, 0x5E, 0x01, 0x90, 0xFD, 0xD2, 0x03, - 0x47, 0xFA, 0xC3, 0x09, 0x48, 0x48, 0x5A, 0xFE, 0x33, 0xFF, 0x45, - 0x01, 0xE2, 0xFE, 0xBE, 0x00, 0xA5, 0xFF, 0x16, 0x00, 0xFD, 0xFF, - 0x24, 0x00, 0x6D, 0xFF, 0x88, 0x01, 0xA2, 0xFC, 0xD0, 0x06, 0x8C, - 0x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, 0x00, 0x37, 0xFF, 0xE1, 0x01, - 0x55, 0xFC, 0x8C, 0x06, 0x22, 0xF4, 0x2C, 0x1D, 0xC0, 0x3F, 0x55, - 0xF4, 0x9B, 0x04, 0x23, 0xFE, 0x9F, 0x00, 0xE4, 0xFF, 0xF9, 0xFF, - 0x04, 0x00, 0x07, 0x00, 0xE9, 0xFF, 0x0F, 0x00, 0x48, 0x00, 0xB9, - 0xFE, 0xA6, 0x03, 0xE4, 0xF5, 0x60, 0x42, 0xC1, 0x18, 0x47, 0xF5, - 0x1A, 0x06, 0x81, 0xFC, 0xD2, 0x01, 0x3B, 0xFF, 0x35, 0x00, 0xFE, - 0xFF, 0xFF, 0xFF, 0x33, 0x00, 0x40, 0xFF, 0xC1, 0x01, 0xAB, 0xFC, - 0xB7, 0x05, 0x34, 0xF6, 0x8E, 0x15, 0x0B, 0x44, 0x42, 0xF7, 0xDC, - 0x02, 0x32, 0xFF, 0x04, 0x00, 0x31, 0x00, 0xDC, 0xFF, 0x09, 0x00, - 0x02, 0x00, 0x04, 0x00, 0xC7, 0xFF, 0xD9, 0x00, 0xBF, 0xFD, 0x38, - 0x05, 0x69, 0xF3, 0x96, 0x3D, 0x6F, 0x20, 0x66, 0xF3, 0xCE, 0x06, - 0x3F, 0xFC, 0xE6, 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0xFF, - 0xFF, 0x2C, 0x00, 0x55, 0xFF, 0x8B, 0x01, 0x2B, 0xFD, 0xA1, 0x04, - 0x9B, 0xF8, 0x42, 0x0E, 0x0F, 0x47, 0x38, 0xFB, 0xBE, 0x00, 0x6A, - 0x00, 0x58, 0xFF, 0x85, 0x00, 0xBB, 0xFF, 0x10, 0x00, 0xFF, 0xFF, - 0x19, 0x00, 0x8C, 0xFF, 0x4D, 0x01, 0xFE, 0xFC, 0x56, 0x06, 0xF7, - 0xF1, 0xBF, 0x37, 0x15, 0x28, 0x18, 0xF2, 0x25, 0x07, 0x34, 0xFC, - 0xDC, 0x01, 0x3F, 0xFF, 0x34, 0x00, 0xFD, 0xFF, 0x00, 0x00, 0x24, - 0x00, 0x71, 0xFF, 0x43, 0x01, 0xC9, 0xFD, 0x60, 0x03, 0x2E, 0xFB, - 0x7E, 0x07, 0xAF, 0x48, 0x2D, 0x00, 0x58, 0xFE, 0xBB, 0x01, 0xA3, - 0xFE, 0xDD, 0x00, 0x99, 0xFF, 0x19, 0x00, 0xFD, 0xFF, 0x29, 0x00, - 0x60, 0xFF, 0xA2, 0x01, 0x7C, 0xFC, 0xFB, 0x06, 0x7C, 0xF1, 0x15, - 0x31, 0x73, 0x2F, 0x81, 0xF1, 0x10, 0x07, 0x67, 0xFC, 0xB1, 0x01, - 0x58, 0xFF, 0x2C, 0x00, 0xFD, 0xFF, 0x1B, 0x00, 0x91, 0xFF, 0xF1, - 0x00, 0x79, 0xFE, 0x0A, 0x02, 0xC3, 0xFD, 0x73, 0x01, 0xDB, 0x48, - 0x07, 0x06, 0xC7, 0xFB, 0x12, 0x03, 0xF1, 0xFD, 0x31, 0x01, 0x78, - 0xFF, 0x22, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x32, 0x00, 0x44, 0xFF, - 0xD5, 0x01, 0x3A, 0xFC, 0x2A, 0x07, 0xE3, 0xF1, 0xD1, 0x29, 0x46, - 0x36, 0xC5, 0xF1, 0x87, 0x06, 0xDA, 0xFC, 0x64, 0x01, 0x80, 0xFF, - 0x1E, 0x00, 0xFE, 0xFF, 0x12, 0x00, 0xB3, 0xFF, 0x99, 0x00, 0x2E, - 0xFF, 0xB6, 0x00, 0x36, 0x00, 0x47, 0xFC, 0x90, 0x47, 0xA4, 0x0C, - 0x31, 0xF9, 0x5A, 0x04, 0x4E, 0xFD, 0x7C, 0x01, 0x5B, 0xFF, 0x2A, - 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x37, 0xFF, 0xE6, 0x01, - 0x37, 0xFC, 0xEB, 0x06, 0x0B, 0xF3, 0x35, 0x22, 0x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0xDB, 0xFF, 0x09, 0x00, 0x02, 0x00, 0x05, 0x00, - 0xC5, 0xFF, 0xDE, 0x00, 0xB7, 0xFD, 0x45, 0x05, 0x56, 0xF3, 0x61, - 0x3D, 0xBA, 0x20, 0x56, 0xF3, 0xD3, 0x06, 0x3E, 0xFC, 0xE6, 0x01, - 0x36, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0xFF, 0xFF, 0x2C, 0x00, 0x56, - 0xFF, 0x88, 0x01, 0x31, 0xFD, 0x95, 0x04, 0xB4, 0xF8, 0xFC, 0x0D, - 0x26, 0x47, 0x64, 0xFB, 0xA7, 0x00, 0x77, 0x00, 0x51, 0xFF, 0x89, - 0x00, 0xBA, 0xFF, 0x11, 0x00, 0xFF, 0xFF, 0x1A, 0x00, 0x8A, 0xFF, - 0x51, 0x01, 0xF8, 0xFC, 0x5E, 0x06, 0xED, 0xF1, 0x82, 0x37, 0x60, - 0x28, 0x0E, 0xF2, 0x26, 0x07, 0x35, 0xFC, 0xDB, 0x01, 0x40, 0xFF, - 0x34, 0x00, 0xFD, 0xFF, 0x00, 0x00, 0x23, 0x00, 0x72, 0xFF, 0x40, - 0x01, 0xD0, 0xFD, 0x53, 0x03, 0x47, 0xFB, 0x3F, 0x07, 0xB8, 0x48, - 0x62, 0x00, 0x3F, 0xFE, 0xC8, 0x01, 0x9C, 0xFE, 0xE0, 0x00, 0x98, - 0xFF, 0x19, 0x00, 0xFD, 0xFF, 0x29, 0x00, 0x5F, 0xFF, 0xA5, 0x01, - 0x78, 0xFC, 0xFF, 0x06, 0x7D, 0xF1, 0xCF, 0x30, 0xB8, 0x2F, 0x80, - 0xF1, 0x0D, 0x07, 0x6A, 0xFC, 0xAE, 0x01, 0x59, 0xFF, 0x2B, 0x00, - 0xFD, 0xFF, 0x1B, 0x00, 0x93, 0xFF, 0xED, 0x00, 0x80, 0xFE, 0xFD, - 0x01, 0xDC, 0xFD, 0x3C, 0x01, 0xD5, 0x48, 0x45, 0x06, 0xAE, 0xFB, - 0x1F, 0x03, 0xEA, 0xFD, 0x34, 0x01, 0x77, 0xFF, 0x22, 0x00, 0x00, - 0x00, 0xFD, 0xFF, 0x33, 0x00, 0x43, 0xFF, 0xD6, 0x01, 0x39, 0xFC, - 0x2A, 0x07, 0xEB, 0xF1, 0x87, 0x29, 0x85, 0x36, 0xCC, 0xF1, 0x7F, - 0x06, 0xE0, 0xFC, 0x60, 0x01, 0x82, 0xFF, 0x1D, 0x00, 0xFE, 0xFF, - 0x12, 0x00, 0xB5, 0xFF, 0x96, 0x00, 0x35, 0xFF, 0xA9, 0x00, 0x4D, - 0x00, 0x19, 0xFC, 0x7C, 0x47, 0xE8, 0x0C, 0x18, 0xF9, 0x66, 0x04, - 0x48, 0xFD, 0x7E, 0x01, 0x5A, 0xFF, 0x2B, 0x00, 0x00, 0x00, 0xFD, - 0xFF, 0x36, 0x00, 0x37, 0xFF, 0xE6, 0x01, 0x38, 0xFC, 0xE6, 0x06, - 0x19, 0xF3, 0xEA, 0x21, 0x8A, 0x3C, 0x0E, 0xF3, 0x78, 0x05, 0x96, - 0xFD, 0xF1, 0x00, 0xBB, 0xFF, 0x08, 0x00, 0x01, 0x00, 0x0B, 0x00, - 0xD6, 0xFF, 0x41, 0x00, 0xE4, 0xFF, 0x6B, 0xFF, 0x7B, 0x02, 0xF0, - 0xF7, 0xBA, 0x44, 0x1E, 0x14, 0xA5, 0xF6, 0x86, 0x05, 0xC1, 0xFC, - 0xB9, 0x01, 0x44, 0xFF, 0x32, 0x00, 0xFF, 0xFF, 0xFE, 0xFF, 0x35, - 0x00, 0x39, 0xFF, 0xD8, 0x01, 0x70, 0xFC, 0x43, 0x06, 0xE1, 0xF4, - 0x38, 0x1A, 0x8C, 0x41, 0x55, 0xF5, 0xFC, 0x03, 0x85, 0xFE, 0x66, - 0x00, 0x01, 0x00, 0xEE, 0xFF, 0x06, 0x00, 0x05, 0x00, 0xF4, 0xFF, - 0xF2, 0xFF, 0x83, 0x00, 0x53, 0xFE, 0x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FD, 0xFF, 0x2D, 0x00, 0x53, 0xFF, 0xBA, 0x01, 0x5B, 0xFC, - 0x1B, 0x07, 0x8B, 0xF1, 0x58, 0x2E, 0x26, 0x32, 0x80, 0xF1, 0xEA, - 0x06, 0x8C, 0xFC, 0x97, 0x01, 0x66, 0xFF, 0x27, 0x00, 0xFD, 0xFF, - 0x17, 0x00, 0x9E, 0xFF, 0xCF, 0x00, 0xBF, 0xFE, 0x86, 0x01, 0xBA, - 0xFE, 0x5A, 0xFF, 0x86, 0x48, 0x7D, 0x08, 0xC7, 0xFA, 0x93, 0x03, - 0xB0, 0xFD, 0x4F, 0x01, 0x6C, 0xFF, 0x25, 0x00, 0x00, 0x00, 0xFD, - 0xFF, 0x35, 0x00, 0x3D, 0xFF, 0xDF, 0x01, 0x32, 0xFC, 0x1E, 0x07, - 0x40, 0xF2, 0xEB, 0x26, 0xB5, 0x38, 0x1F, 0xF2, 0x32, 0x06, 0x18, - 0xFD, 0x3D, 0x01, 0x94, 0xFF, 0x16, 0x00, 0xFF, 0xFF, 0x0F, 0x00, - 0xC0, 0xFF, 0x78, 0x00, 0x73, 0xFF, 0x38, 0x00, 0x17, 0x01, 0x8B, - 0xFA, 0xAF, 0x46, 0x59, 0x0F, 0x39, 0xF8, 0xCF, 0x04, 0x15, 0xFD, - 0x95, 0x01, 0x51, 0xFF, 0x2D, 0x00, 0xFF, 0xFF, 0xFD, 0xFF, 0x36, - 0x00, 0x36, 0xFF, 0xE5, 0x01, 0x46, 0xFC, 0xB8, 0x06, 0xA8, 0xF3, - 0x3F, 0x1F, 0x64, 0x3E, 0xBA, 0xF3, 0x01, 0x05, 0xE2, 0xFD, 0xC4, - 0x00, 0xD2, 0xFF, 0x00, 0x00, 0x02, 0x00, 0x08, 0x00, 0xE1, 0xFF, - 0x25, 0x00, 0x1D, 0x00, 0x05, 0xFF, 0x28, 0x03, 0xBD, 0xF6, 0x77, - 0x43, 0xB6, 0x16, 0xDC, 0xF5, 0xDD, 0x05, 0x9B,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, 0x86, 0xF1, 0xF2, 0x32, 0x82, 0x2D, 0x96, 0xF1, 0x21, - 0x07, 0x53, 0xFC, 0xC0, 0x01, 0x50, 0xFF, 0x2E, 0x00, 0xFD, 0xFF, - 0x1D, 0x00, 0x88, 0xFF, 0x07, 0x01, 0x49, 0xFE, 0x67, 0x02, 0x13, - 0xFD, 0xFF, 0x02, 0xF4, 0x48, 0x5F, 0x04, 0x7A, 0xFC, 0xB6, 0x02, - 0x20, 0xFE, 0x1B, 0x01, 0x81, 0xFF, 0x1F, 0x00, 0x00, 0x00, 0xFD, - 0xFF, 0x30, 0x00, 0x4A, 0xFF, 0xCA, 0x01, 0x46, 0xFC, 0x29, 0x07, - 0xB3, 0xF1, 0xD1, 0x2B, 0x81, 0x34, 0x9C, 0xF1, 0xB8, 0x06, 0xB5, - 0xFC, 0x7C, 0x01, 0x74, 0xFF, 0x22, 0x00, 0xFE, 0xFF, 0x15, 0x00, - 0xAA, 0xFF, 0xB1, 0x00, 0xFE, 0xFE, 0x10, 0x01, 0x92, 0xFF, 0x94, - 0xFD, 0x0D, 0x48, 0xCB, 0x0A, 0xE2, 0xF9, 0x04, 0x04, 0x77, 0xFD, - 0x69, 0x01, 0x62, 0xFF, 0x28, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x36, - 0x00, 0x39, 0xFF, 0xE5, 0x01, 0x32, 0xFC, 0x06, 0x07, 0xAA, 0xF2, - 0x46, 0x24, 0xC8, 0x3A, 0x90, 0xF2, 0xD6, 0x05, 0x57, 0xFD, 0x17, - 0x01, 0xA8, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x0D, 0x00, 0xCC, 0xFF, - 0x5A, 0x00, 0xAF, 0xFF, 0xCA, 0xFF, 0xD8, 0x01, 0x1C, 0xF9, 0xB8, - 0x45, 0xDA, 0x11, 0x60, 0xF7, 0x33, 0x05, 0xE7, 0xFC, 0xA9, 0x01, - 0x4A, 0xFF, 0x30, 0x00, 0xFF, 0xFF, 0xFE, 0xFF, 0x36, 0x00, 0x37, - 0xFF, 0xDF, 0x01, 0x5A, 0xFC, 0x7E, 0x06, 0x47, 0xF4, 0x94, 0x1C, - 0x1F, 0x40, 0x85, 0xF4, 0x7D, 0x04, 0x36, 0xFE, 0x93, 0x00, 0xEA, - 0xFF, 0xF7, 0xFF, 0x04, 0x00, 0x06, 0x00, 0xEB, 0xFF, 0x09, 0x00, - 0x54, 0x00, 0xA4, 0xFE, 0xC9, 0x03, 0xAA, 0xF5, 0x0C, 0x42, 0x56, - 0x19, 0x1E, 0xF5, 0x2B, 0x06, 0x7A, 0xFC, 0xD4, 0x01, 0x3A, 0xFF, - 0x35, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x32, 0x00, 0x42, 0xFF, 0xBE, - 0x01, 0xB4, 0xFC, 0xA4, 0x05, 0x61, 0xF6, 0xFB, 0x14, 0x53, 0x44, - 0x86, 0xF7, 0xB6, 0x02, 0x49, 0xFF, 0xF7, 0xFF, 0x37, 0x00, 0xD9, - 0xFF, 0x0A, 0x00, 0x01, 0x00, 0x06, 0x00, 0xC2, 0xFF, 0xE3, 0x00, - 0xAE, 0xFD, 0x52, 0x05, 0x44, 0xF3, 0x2A, 0x3D, 0x06, 0x21, 0x47, - 0xF3, 0xD8, 0x06, 0x3C, 0xFC, 0xE6, 0x01, 0x36, 0xFF, 0x36, 0x00, - 0xFD, 0xFF, 0x00, 0x00, 0x2B, 0x00, 0x57, 0xFF, 0x86, 0x01, 0x36, - 0xFD, 0x89, 0x04, 0xCD, 0xF8, 0xB7, 0x0D, 0x3D, 0x47, 0x91, 0xFB, - 0x91, 0x00, 0x83, 0x00, 0x4A, 0xFF, 0x8C, 0x00, 0xB9, 0xFF, 0x11, - 0x00, 0xFE, 0xFF, 0x1B, 0x00, 0x88, 0xFF, 0x55, 0x01, 0xF2, 0xFC, - 0x67, 0x06, 0xE4, 0xF1, 0x44, 0x37, 0xAA, 0x28, 0x05, 0xF2, 0x27, - 0x07, 0x36, 0xFC, 0xDA, 0x01, 0x41, 0xFF, 0x33, 0x00, 0xFD, 0xFF, - 0x00, 0x00, 0x23, 0x00, 0x73, 0xFF, 0x3D, 0x01, 0xD6, 0xFD, 0x46, - 0x03, 0x61, 0xFB, 0x00, 0x07, 0xBF, 0x48, 0x98, 0x00, 0x26, 0xFE, - 0xD5, 0x01, 0x95, 0xFE, 0xE3, 0x00, 0x96, 0xFF, 0x1A, 0x00, 0xFD, - 0xFF, 0x2A, 0x00, 0x5D, 0xFF, 0xA7, 0x01, 0x75, 0xFC, 0x03, 0x07, - 0x7D, 0xF1, 0x8A, 0x30, 0xFF, 0x2F, 0x7E, 0xF1, 0x0A, 0x07, 0x6E, - 0xFC, 0xAC, 0x01, 0x5A, 0xFF, 0x2B, 0x00, 0xFD, 0xFF, 0x1A, 0x00, - 0x94, 0xFF, 0xEA, 0x00, 0x87, 0xFE, 0xF0, 0x01, 0xF5, 0xFD, 0x05, - 0x01, 0xCE, 0x48, 0x83, 0x06, 0x94, 0xFB, 0x2C, 0x03, 0xE4, 0xFD, - 0x37, 0x01, 0x76, 0xFF, 0x22, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x33, - 0x00, 0x42, 0xFF, 0xD7, 0x01, 0x38, 0xFC, 0x29, 0x07, 0xF3, 0xF1, - 0x3E, 0x29, 0xC6, 0x36, 0xD4, 0xF1, 0x77, 0x06, 0xE6, 0xFC, 0x5C, - 0x01, 0x84, 0xFF, 0x1C, 0x00, 0xFE, 0xFF, 0x12, 0x00, 0xB6, 0xFF, - 0x93, 0x00, 0x3C, 0xFF, 0x9D, 0x00, 0x63, 0x00, 0xEB, 0xFB, 0x69, - 0x47, 0x2D, 0x0D, 0xFF, 0xF8, 0x72, 0x04, 0x42, 0xFD, 0x81, 0x01, - 0x59, 0xFF, 0x2B, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x37, - 0xFF, 0xE6, 0x01, 0x3A, 0xFC, 0xE2, 0x06, 0x28, 0xF3, 0x9E, 0x21, - 0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 0x7C, 0x46, 0x37, 0xFA, 0x42, 0x01, - 0x1F, 0x00, 0x81, 0xFF, 0x71, 0x00, 0xC3, 0xFF, 0x0F, 0x00, 0xFF, - 0xFF, 0x15, 0x00, 0x98, 0xFF, 0x35, 0x01, 0x25, 0xFD, 0x1E, 0x06, - 0x35, 0xF2, 0x2E, 0x39, 0x55, 0x26, 0x56, 0xF2, 0x1A, 0x07, 0x31, - 0xFC, 0xE1, 0x01, 0x3C, 0xFF, 0x35, 0x00, 0xFD, 0xFF, 0x00, 0x00, - 0x26, 0x00, 0x6A, 0xFF, 0x55, 0x01, 0xA3, 0xFD, 0xAD, 0x03, 0x94, - 0xFA, 0xFF, 0x08, 0x70, 0x48, 0xF3, 0xFE, 0xEA, 0xFE, 0x6C, 0x01, - 0xCD, 0xFE, 0xC9, 0x00, 0xA1, 0xFF, 0x17, 0x00, 0xFD, 0xFF, 0x26, - 0x00, 0x69, 0xFF, 0x91, 0x01, 0x94, 0xFC, 0xE0, 0x06, 0x84, 0xF1, - 0xAF, 0x32, 0xCA, 0x2D, 0x92, 0xF1, 0x1F, 0x07, 0x56, 0xFC, 0xBE, - 0x01, 0x51, 0xFF, 0x2E, 0x00, 0xFD, 0xFF, 0x1D, 0x00, 0x8A, 0xFF, - 0x04, 0x01, 0x50, 0xFE, 0x5A, 0x02, 0x2C, 0xFD, 0xC6, 0x02, 0xF2, - 0x48, 0x9B, 0x04, 0x61, 0xFC, 0xC3, 0x02, 0x19, 0xFE, 0x1E, 0x01, - 0x7F, 0xFF, 0x20, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x31, 0x00, 0x49, - 0xFF, 0xCC, 0x01, 0x44, 0xFC, 0x29, 0x07, 0xB9, 0xF1, 0x89, 0x2B, - 0xC3, 0x34, 0xA0, 0xF1, 0xB1, 0x06, 0xBA, 0xFC, 0x79, 0x01, 0x76, - 0xFF, 0x21, 0x00, 0xFE, 0xFF, 0x14, 0x00, 0xAC, 0xFF, 0xAE, 0x00, - 0x05,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7B, 0xFB, 0x39, 0x03, 0xDD, 0xFD, 0x3A, 0x01, 0x74, 0xFF, - 0x23, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x33, 0x00, 0x41, 0xFF, 0xD8, - 0x01, 0x37, 0xFC, 0x28, 0x07, 0xFC, 0xF1, 0xF3, 0x28, 0x04, 0x37, - 0xDC, 0xF1, 0x6F, 0x06, 0xEC, 0xFC, 0x59, 0x01, 0x86, 0xFF, 0x1C, - 0x00, 0xFE, 0xFF, 0x11, 0x00, 0xB7, 0xFF, 0x8F, 0x00, 0x43, 0xFF, - 0x90, 0x00, 0x7A, 0x00, 0xBE, 0xFB, 0x52, 0x47, 0x72, 0x0D, 0xE6, - 0xF8, 0x7E, 0x04, 0x3C, 0xFD, 0x83, 0x01, 0x58, 0xFF, 0x2B, 0x00, - 0x00, 0x00, 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x3B, - 0xFC, 0xDD, 0x06, 0x37, 0xF3, 0x52, 0x21, 0xF6, 0x3C, 0x31, 0xF3, - 0x5F, 0x05, 0xA6, 0xFD, 0xE8, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0x01, - 0x00, 0x0A, 0x00, 0xD8, 0xFF, 0x3A, 0x00, 0xF1, 0xFF, 0x54, 0xFF, - 0xA2, 0x02, 0xA9, 0xF7, 0x77, 0x44, 0xB1, 0x14, 0x77, 0xF6, 0x9A, - 0x05, 0xB8, 0xFC, 0xBC, 0x01, 0x42, 0xFF, 0x32, 0x00, 0xFF, 0xFF, - 0xFE, 0xFF, 0x35, 0x00, 0x3A, 0xFF, 0xD6, 0x01, 0x77, 0xFC, 0x33, - 0x06, 0x09, 0xF5, 0xA1, 0x19, 0xE1, 0x41, 0x8D, 0xF5, 0xDA, 0x03, - 0x9A, 0xFE, 0x5A, 0x00, 0x06, 0x00, 0xEC, 0xFF, 0x06, 0x00, 0x04, - 0x00, 0xF6, 0xFF, 0xED, 0xFF, 0x8E, 0x00, 0x3F,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xFF, 0xFE, 0xFF, - 0x36, 0x00, 0x37, 0xFF, 0xDE, 0x01, 0x5F, 0xFC, 0x70, 0x06, 0x6C, - 0xF4, 0xFD, 0x1B, 0x7D, 0x40, 0xB7, 0xF4, 0x5D, 0x04, 0x49, 0xFE, - 0x88, 0x00, 0xEF, 0xFF, 0xF5, 0xFF, 0x04, 0x00, 0x06, 0x00, 0xED, - 0xFF, 0x04, 0x00, 0x60, 0x00, 0x90, 0xFE, 0xEB, 0x03, 0x71, 0xF5, - 0xB7, 0x41, 0xED, 0x19, 0xF5, 0xF4, 0x3B, 0x06, 0x73, 0xFC, 0xD7, - 0x01, 0x39, 0xFF, 0x35, 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x32, 0x00, - 0x43, 0xFF, 0xBA, 0x01, 0xBC, 0xFC, 0x90, 0x05, 0x8E, 0xF6, 0x68, - 0x14, 0x99, 0x44, 0xCD, 0xF7, 0x8F, 0x02, 0x60, 0xFF, 0xEA, 0xFF, - 0x3E, 0x00, 0xD7, 0xFF, 0x0A, 0x00, 0x01, 0x00, 0x07, 0x00, 0xBD, - 0xFF, 0xED, 0x00, 0x9E, 0xFD, 0x6C, 0x05, 0x1F, 0xF3, 0xC0, 0x3C, - 0x9E, 0x21, 0x28, 0xF3, 0xE2, 0x06, 0x3A, 0xFC, 0xE6, 0x01, 0x37, - 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0x00, 0x00, 0x2B, 0x00, 0x59, 0xFF, - 0x81, 0x01, 0x42, 0xFD, 0x72, 0x04, 0xFF, 0xF8, 0x2D, 0x0D, 0x69, - 0x47, 0xEB, 0xFB, 0x63, 0x00, 0x9D, 0x00, 0x3C, 0xFF, 0x93, 0x00, - 0xB6, 0xFF, 0x12, 0x00, 0xFE, 0xFF, 0x1C, 0x00, 0x84, 0xFF, 0x5C, - 0x01, 0xE6, 0xFC, 0x77, 0x06, 0xD4, 0xF1, 0xC6, 0x36, 0x3E, 0x29, - 0xF3, 0xF1, 0x29, 0x07, 0x38, 0xFC, 0xD7, 0x01, 0x42, 0xFF, 0x33, - 0x00, 0xFD, 0xFF, 0x00, 0x00, 0x22, 0x00, 0x76, 0xFF, 0x37, 0x01, - 0xE4, 0xFD, 0x2C, 0x03, 0x94, 0xFB, 0x83, 0x06, 0xCE, 0x48, 0x05, - 0x01, 0xF5, 0xFD, 0xF0, 0x01, 0x87, 0xFE, 0xEA, 0x00, 0x94, 0xFF, - 0x1A, 0x00, 0xFD, 0xFF, 0x2B, 0x00, 0x5A, 0xFF, 0xAC, 0x01, 0x6E, - 0xFC, 0x0A, 0x07, 0x7E, 0xF1, 0xFF, 0x2F, 0x8A, 0x30, 0x7D, 0xF1, - 0x03, 0x07, 0x75, 0xFC, 0xA7, 0x01, 0x5D, 0xFF, 0x2A, 0x00, 0xFD, - 0xFF, 0x1A, 0x00, 0x96, 0xFF, 0xE3, 0x00, 0x95, 0xFE, 0xD5, 0x01, - 0x26, 0xFE, 0x98, 0x00, 0xBF, 0x48, 0x00, 0x07, 0x61, 0xFB, 0x46, - 0x03, 0xD6, 0xFD, 0x3D, 0x01, 0x73, 0xFF, 0x23, 0x00, 0x00, 0x00, - 0xFD, 0xFF, 0x33, 0x00, 0x41, 0xFF, 0xDA, 0x01, 0x36, 0xFC, 0x27, - 0x07, 0x05, 0xF2, 0xAA, 0x28, 0x44, 0x37, 0xE4, 0xF1, 0x67, 0x06, - 0xF2, 0xFC, 0x55, 0x01, 0x88, 0xFF, 0x1B, 0x00, 0xFE, 0xFF, 0x11, - 0x00, 0xB9, 0xFF, 0x8C, 0x00, 0x4A, 0xFF, 0x83, 0x00, 0x91, 0x00, - 0x91, 0xFB, 0x3D, 0x47, 0xB7, 0x0D, 0xCD, 0xF8, 0x89, 0x04, 0x36, - 0xFD, 0x86, 0x01, 0x57, 0xFF, 0x2B, 0x00, 0x00, 0x00, 0xFD, 0xFF, - 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x3C, 0xFC, 0xD8, 0x06, 0x47, - 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x00, 0x62, 0xFF, 0x69, 0x01, - 0x77, 0xFD, 0x04, 0x04, 0xE2, 0xF9, 0xCB, 0x0A, 0x0D, 0x48, 0x94, - 0xFD, 0x92, 0xFF, 0x10, 0x01, 0xFE, 0xFE, 0xB1, 0x00, 0xAA, 0xFF, - 0x15, 0x00, 0xFE, 0xFF, 0x22, 0x00, 0x74, 0xFF, 0x7C, 0x01, 0xB5, - 0xFC, 0xB8, 0x06, 0x9C, 0xF1, 0x81, 0x34, 0xD1, 0x2B, 0xB3, 0xF1, - 0x29, 0x07, 0x46, 0xFC, 0xCA, 0x01, 0x4A, 0xFF, 0x30, 0x00, 0xFD, - 0xFF, 0x00, 0x00, 0x1F, 0x00, 0x81, 0xFF, 0x1B, 0x01, 0x20, 0xFE, - 0xB6, 0x02, 0x7A, 0xFC, 0x5F, 0x04, 0xF4, 0x48, 0xFF, 0x02, 0x13, - 0xFD, 0x67, 0x02, 0x49, 0xFE, 0x07, 0x01, 0x88, 0xFF, 0x1D, 0x00, - 0xFD, 0xFF, 0x2E, 0x00, 0x50, 0xFF, 0xC0, 0x01, 0x53, 0xFC, 0x21, - 0x07, 0x96, 0xF1, 0x82, 0x2D, 0xF2, 0x32, 0x86, 0xF1, 0xDB, 0x06, - 0x99, 0xFC, 0x8E, 0x01, 0x6A, 0xFF, 0x25, 0x00, 0xFD, 0xFF, 0x16, - 0x00, 0xA2, 0xFF, 0xC5, 0x00, 0xD4, 0xFE, 0x5F, 0x01, 0x03, 0xFF, - 0xBF, 0xFE, 0x63, 0x48, 0x40, 0x09, 0x7B, 0xFA, 0xB9, 0x03, 0x9D, - 0xFD, 0x58, 0x01, 0x69, 0xFF, 0x26, 0x00, 0x00, 0x00, 0xFD, 0xFF, - 0x35, 0x00, 0x3B, 0xFF, 0xE2, 0x01, 0x31, 0xFC, 0x17, 0x07, 0x61, - 0xF2, 0x0A, 0x26, 0x6A, 0x39, 0x41, 0xF2, 0x15, 0x06, 0x2C, 0xFD, - 0x31, 0x01, 0x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 0x00, 0x12, 0xFF, 0xEA, 0x00, 0xD9, 0xFF, 0x03, 0xFD, - 0xDC, 0x47, 0x95, 0x0B, 0x96, 0xF9, 0x29, 0x04, 0x65, 0xFD, 0x71, - 0x01, 0x5F, 0xFF, 0x29, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x36, 0x00, - 0x38, 0xFF, 0xE6, 0x01, 0x34, 0xFC, 0xFB, 0x06, 0xD2, 0xF2, 0x64, - 0x23, 0x73, 0x3B, 0xBC, 0xF2, 0xB4, 0x05, 0x6E, 0xFD, 0x09, 0x01, - 0xAF, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x0C, 0x00, 0xD0, 0xFF, 0x51, - 0x00, 0xC3, 0xFF, 0xA6, 0xFF, 0x16, 0x02, 0xA9, 0xF8, 0x5C, 0x45, - 0xB2, 0x12, 0x19, 0xF7, 0x52, 0x05, 0xD8, 0xFC, 0xAF, 0x01, 0x47, - 0xFF, 0x30, 0x00, 0xFF, 0xFF, 0xFE, 0xFF, 0x36, 0x00, 0x38, 0xFF, - 0xDD, 0x01, 0x62, 0xFC, 0x69, 0x06, 0x7F, 0xF4, 0xB2, 0x1B, 0xAB, - 0x40, 0xD0, 0xF4, 0x4E, 0x04, 0x53, 0xFE, 0x83, 0x00, 0xF2, 0xFF, - 0xF4, 0xFF, 0x05, 0x00, 0x06, 0x00, 0xEE, 0xFF, 0x01, 0x00, 0x66, - 0x00, 0x85, 0xFE, 0xFC, 0x03, 0x55, 0xF5, 0x8C, 0x41, 0x38, 0x1A, - 0xE1, 0xF4, 0x43, 0x06, 0x70, 0xFC, 0xD8, 0x01, 0x39, 0xFF, 0x35, - 0x00, 0xFE, 0xFF, 0xFF, 0xFF, 0x32, 0x00, 0x44, 0xFF, 0xB9, 0x01, - 0xC1, 0xFC, 0x86, 0x05, 0xA5, 0xF6, 0x1E, 0x14, 0xBA, 0x44, 0xF0, - 0xF7, 0x7B, 0x02, 0x6B, 0xFF, 0xE4, 0xFF, 0x41, 0x00, 0xD6, 0xFF, - 0x0B, 0x00, 0x01, 0x00, 0x08, 0x00, 0xBB, 0xFF, 0xF1, 0x00, 0x96, - 0xFD, 0x78, 0x05, 0x0E, 0xF3, 0x8A, 0x3C, 0xEA, 0x21, 0x19, 0xF3, - 0xE6, 0x06, 0x38, 0xFC, 0xE6, 0x01, 0x37, 0xFF, 0x36, 0x00, 0xFD, - 0xFF, 0x00, 0x00, 0x2B, 0x00, 0x5A, 0xFF, 0x7E, 0x01, 0x48, 0xFD, - 0x66, 0x04, 0x18, 0xF9, 0xE8, 0x0C, 0x7C, 0x47, 0x19, 0xFC, 0x4D, - 0x00, 0xA9, 0x00, 0x35, 0xFF, 0x96, 0x00, 0xB5, 0xFF, 0x12, 0x00, - 0xFE, 0xFF, 0x1D, 0x00, 0x82, 0xFF, 0x60, 0x01, 0xE0, 0xFC, 0x7F, - 0x06, 0xCC, 0xF1, 0x85, 0x36, 0x87, 0x29, 0xEB, 0xF1, 0x2A, 0x07, - 0x39, 0xFC, 0xD6, 0x01, 0x43, 0xFF, 0x33, 0x00, 0xFD, 0xFF, 0x00, - 0x00, 0x22, 0x00, 0x77, 0xFF, 0x34, 0x01, 0xEA, 0xFD, 0x1F, 0x03, - 0xAE, 0xFB, 0x45, 0x06, 0xD5, 0x48, 0x3C, 0x01, 0xDC, 0xFD, 0xFD, - 0x01, 0x80, 0xFE, 0xED, 0x00, 0x93, 0xFF, 0x1B, 0x00, 0xFD, 0xFF, - 0x2B, 0x00, 0x59, 0xFF, 0xAE, 0x01, 0x6A, 0xFC, 0x0D, 0x07, 0x80, - 0xF1, 0xB8, 0x2F, 0xCF, 0x30, 0x7D, 0xF1, 0xFF, 0x06, 0x78, 0xFC, - 0xA5, 0x01, 0x5F, 0xFF, 0x29, 0x00, 0xFD, 0xFF, 0x19, 0x00, 0x98, - 0xFF, 0xE0, 0x00, 0x9C, 0xFE, 0xC8, 0x01, 0x3F, 0xFE, 0x62, 0x00, - 0xB8, 0x48, 0x3F, 0x07, 0x47, 0xFB, 0x53, 0x03, 0xD0, 0xFD, 0x40, - 0x01, 0x72, 0xFF, 0x23, 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x34, 0x00, - 0x40, 0xFF, 0xDB, 0x01, 0x35, 0xFC, 0x26, 0x07, 0x0E, 0xF2, 0x60, - 0x28, 0x82, 0x37, 0xED, 0xF1, 0x5E, 0x06, 0xF8, 0xFC, 0x51, 0x01, - 0x8A, 0xFF, 0x1A, 0x00, 0xFF, 0xFF, 0x11, 0x00, 0xBA, 0xFF, 0x89, - 0x00, 0x51, 0xFF, 0x77, 0x00, 0xA7, 0x00, 0x64, 0xFB, 0x26, 0x47, - 0xFC, 0x0D, 0xB4, 0xF8, 0x95, 0x04, 0x31, 0xFD, 0x88, 0x01, 0x56, - 0xFF, 0x2C, 0x00, 0xFF, 0xFF, 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, - 0xE6, 0x01, 0x3E, 0xFC, 0xD3, 0x06, 0x56, 0xF3, 0xBA, 0x20, 0x61, - 0x3D, 0x56, 0xF3, 0x45, 0x05, 0xB7, 0xFD, 0xDE, 0x00, 0xC5, 0xFF, - 0x05, 0x00, 0x02, 0x00, 0x09, 0x00, 0xDB, 0xFF, 0x34, 0x00, 0xFE, - 0xFF, 0x3D, 0xFF, 0xC9, 0x02, 0x64, 0xF7, 0x2F, 0x44, 0x44, 0x15, - 0x4A, 0xF6, 0xAD, 0x05, 0xAF, 0xFC, 0xC0, 0x01, 0x41, 0xFF, 0x32, - 0x00, 0xFF, 0xFF, 0xFE, 0xFF, 0x35, 0x00, 0x3A, 0xFF, 0xD3, 0x01, - 0x7D, 0xFC, 0x23, 0x06, 0x32, 0xF5, 0x0C, 0x19, 0x38, 0x42, 0xC7, - 0xF5, 0xB8, 0x03, 0xAF, 0xFE, 0x4E, 0x00, 0x0C, 0x00, 0xEA, 0xFF, - 0x06, 0x00, 0x04, 0x00, 0xF8, 0xFF, 0xE7, 0xFF, 0x99, 0x00, 0x2C, - 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00, 0x06, 0x8C, 0xFC, 0xCE, 0x01, 0x3C, 0xFF, 0x34, 0x00, 0xFE, - 0xFF, 0xFF, 0xFF, 0x33, 0x00, 0x3F, 0xFF, 0xC6, 0x01, 0x9F, 0xFC, - 0xD3, 0x05, 0xF1, 0xF5, 0x6C, 0x16, 0x9E, 0x43, 0xDD, 0xF6, 0x15, - 0x03, 0x10, 0xFF, 0x17, 0x00, 0x28, 0x00, 0xDF, 0xFF, 0x09, 0x00, - 0x02, 0x00, 0x01, 0x00, 0xCF, 0xFF, 0xC9, 0x00, 0xDA, 0xFD, 0x0F, - 0x05, 0xA5, 0xF3, 0x31, 0x3E, 0x8A, 0x1F, 0x97, 0xF3, 0xBD, 0x06, - 0x44, 0xFC, 0xE5, 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFD, 0xFF, 0xFF, - 0xFF, 0x2D, 0x00, 0x52, 0xFF, 0x92, 0x01, 0x1B, 0xFD, 0xC4, 0x04, - 0x51, 0xF8, 0x13, 0x0F, 0xC8, 0x46, 0xB6, 0xFA, 0x01, 0x01, 0x44, - 0x00, 0x6C, 0xFF, 0x7B, 0x00, 0xBF, 0xFF, 0x10, 0x00, 0xFF, 0xFF, - 0x17, 0x00, 0x92, 0xFF, 0x41, 0x01, 0x11, 0xFD, 0x3B, 0x06, 0x14, - 0xF2, 0x78, 0x38, 0x36, 0x27, 0x35, 0xF2, 0x20, 0x07, 0x33, 0xFC, - 0xDF, 0x01, 0x3E, 0xFF, 0x34, 0x00, 0xFD, 0xFF, 0x00, 0x00, 0x25, - 0x00, 0x6D, 0xFF, 0x4C, 0x01, 0xB6, 0xFD, 0x86, 0x03, 0xE1, 0xFA, - 0x3D, 0x08, 0x92, 0x48, 0x8E, 0xFF, 0xA1, 0xFE, 0x93, 0x01, 0xB8, - 0xFE, 0xD3, 0x00, 0x9D, 0xFF, 0x18, 0x00, 0xFD, 0xFF, 0x28, 0x00, - 0x64, 0xFF, 0x9A, 0x01, 0x88, 0xFC, 0xEE, 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07, 0x3A, 0xFC, 0xD5, 0x01, - 0x44, 0xFF, 0x32, 0x00, 0xFD, 0xFF, 0x00, 0x00, 0x22, 0x00, 0x78, - 0xFF, 0x31, 0x01, 0xF1, 0xFD, 0x12, 0x03, 0xC7, 0xFB, 0x07, 0x06, - 0xDB, 0x48, 0x73, 0x01, 0xC3, 0xFD, 0x0A, 0x02, 0x79, 0xFE, 0xF1, - 0x00, 0x91, 0xFF, 0x1B, 0x00, 0xFD, 0xFF, 0x2C, 0x00, 0x58, 0xFF, - 0xB1, 0x01, 0x67, 0xFC, 0x10, 0x07, 0x81, 0xF1, 0x73, 0x2F, 0x15, - 0x31, 0x7C, 0xF1, 0xFB, 0x06, 0x7C, 0xFC, 0xA2, 0x01, 0x60, 0xFF, - 0x29, 0x00, 0xFD, 0xFF, 0x19, 0x00, 0x99, 0xFF, 0xDD, 0x00, 0xA3, - 0xFE, 0xBB, 0x01, 0x58, 0xFE, 0x2D, 0x00, 0xAF, 0x48, 0x7E, 0x07, - 0x2E, 0xFB, 0x60, 0x03, 0xC9, 0xFD, 0x43, 0x01, 0x71, 0xFF, 0x24, - 0x00, 0x00, 0x00, 0xFD, 0xFF, 0x34, 0x00, 0x3F, 0xFF, 0xDC, 0x01, - 0x34, 0xFC, 0x25, 0x07, 0x18, 0xF2, 0x15, 0x28, 0xBF, 0x37, 0xF7, - 0xF1, 0x56, 0x06, 0xFE, 0xFC, 0x4D, 0x01, 0x8C, 0xFF, 0x19, 0x00, - 0xFF, 0xFF, 0x10, 0x00, 0xBB, 0xFF, 0x85, 0x00, 0x58, 0xFF, 0x6A, - 0x00, 0xBE, 0x00, 0x38, 0xFB, 0x0F, 0x47, 0x42, 0x0E, 0x9B, 0xF8, - 0xA1, 0x04, 0x2B, 0xFD, 0x8B, 0x01, 0x55, 0xFF, 0x2C, 0x00, 0xFF, - 0xFF, 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x3F, 0xFC, - 0xCE, 0x06, 0x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27, 0x00, 0x64, - 0xFF, 0x63, 0x01, 0x84, 0xFD, 0xEB, 0x03, 0x14, 0xFA, 0x47, 0x0A, - 0x2C, 0x48, 0xF6, 0xFD, 0x63, 0xFF, 0x2B, 0x01, 0xF0, 0xFE, 0xB8, - 0x00, 0xA8, 0xFF, 0x15, 0x00, 0xFE, 0xFF, 0x23, 0x00, 0x71, 0xFF, - 0x82, 0x01, 0xAB, 0xFC, 0xC4, 0x06, 0x93, 0xF1, 0xFD, 0x33, 0x62, - 0x2C, 0xA8, 0xF1, 0x27, 0x07, 0x4A, 0xFC, 0xC7, 0x01, 0x4C, 0xFF, - 0x30, 0x00, 0xFD, 0xFF, 0x00, 0x00, 0x1F, 0x00, 0x83, 0xFF, 0x14, - 0x01, 0x2D, 0xFE, 0x9C, 0x02, 0xAD, 0xFC, 0xE9, 0x03, 0xF6, 0x48, - 0x73, 0x03, 0xE0, 0xFC, 0x82, 0x02, 0x3B, 0xFE, 0x0E, 0x01, 0x86, - 0xFF, 0x1E, 0x00, 0xFD, 0xFF, 0x2F, 0x00, 0x4E, 0xFF, 0xC3, 0x01, - 0x4E, 0xFC, 0x24, 0x07, 0x9E, 0xF1, 0xF2, 0x2C, 0x78, 0x33, 0x8C, - 0xF1, 0xD0, 0x06, 0xA2, 0xFC, 0x88, 0x01, 0x6D, 0xFF, 0x24, 0x00, - 0xFD, 0xFF, 0x16, 0x00, 0xA5, 0xFF, 0xBE, 0x00, 0xE2, 0xFE, 0x45, - 0x01, 0x33, 0xFF, 0x5A, 0xFE, 0x48, 0x48, 0xC3, 0x09, 0x47, 0xFA, - 0xD2, 0x03, 0x90, 0xFD, 0x5E, 0x01, 0x66, 0xFF, 0x27, 0x00, 0x00, - 0x00, 0xFD, 0xFF, 0x35, 0x00, 0x3B, 0xFF, 0xE3, 0x01, 0x31, 0xFC, - 0x12, 0x07, 0x79, 0xF2, 0x73, 0x25, 0xDF, 0x39, 0x5A, 0xF2, 0x00, - 0x06, 0x3A, 0xFD, 0x28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xA6, 0x48, 0xBE, 0x07, 0x14, 0xFB, 0x6D, 0x03, - 0xC3, 0xFD, 0x46, 0x01, 0x70, 0xFF, 0x24, 0x00, 0x00, 0x00, 0xFD, - 0xFF, 0x34, 0x00, 0x3F, 0xFF, 0xDD, 0x01, 0x34, 0xFC, 0x23, 0x07, - 0x21, 0xF2, 0xCB, 0x27, 0xFE, 0x37, 0x00, 0xF2, 0x4D, 0x06, 0x04, - 0xFD, 0x49, 0x01, 0x8E, 0xFF, 0x19, 0x00, 0xFF, 0xFF, 0x10, 0x00, - 0xBD, 0xFF, 0x82, 0x00, 0x5E, 0xFF, 0x5D, 0x00, 0xD4, 0x00, 0x0C, - 0xFB, 0xF9, 0x46, 0x87, 0x0E, 0x82, 0xF8, 0xAD, 0x04, 0x26, 0xFD, - 0x8D, 0x01, 0x54, 0xFF, 0x2C, 0x00, 0xFF, 0xFF, 0xFD, 0xFF, 0x36, - 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x41, 0xFC, 0xC8, 0x06, 0x76, 0xF3, - 0x22, 0x20, 0xCA, 0x3D, 0x7D, 0xF3, 0x2A, 0x05, 0xC8, 0xFD, 0xD4, - 0x00, 0xCA, 0xFF, 0x03, 0x00, 0x02, 0x00, 0x09, 0x00, 0xDD, 0xFF, - 0x2E, 0x00, 0x0A, 0x00, 0x27, 0xFF, 0xEF, 0x02, 0x20, 0xF7, 0xE7, - 0x43, 0xD8, 0x15, 0x1E, 0xF6, 0xC0, 0x05, 0xA7, 0xFC, 0xC3, 0x01, - 0x40, 0xFF, 0x33, 0x00, 0xFF, 0xFF, 0xFE, 0xFF, 0x34, 0x00, 0x3B, - 0xFF, 0xD1, 0x01, 0x84, 0xFC, 0x12, 0x06, 0x5C, 0xF5, 0x76, 0x18, - 0x89, 0x42, 0x02, 0xF6, 0x94, 0x03, 0xC4, 0xFE, 0x42, 0x00, 0x12, - 0x00, 0xE8, 0xFF, 0x07, 0x00, 0x03, 0x00, 0xFA, 0xFF, 0xE2, 0x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0A, 0x2E, 0xFA, 0xDF, 0x03, 0x8A, 0xFD, 0x60, 0x01, 0x65, 0xFF, - 0x27, 0x00, 0x00, 0x00, 0x0E, 0x00, 0xC8, 0xFF, 0x64, 0x00, 0x9B, - 0xFF, 0xEE, 0xFF, 0x98, 0x01, 0x93, 0xF9, 0x10, 0x46, 0x03, 0x11, - 0xA7, 0xF7, 0x12, 0x05, 0xF6, 0xFC, 0xA2, 0x01, 0x4C, 0xFF, 0x2F, - 0x00, 0xFF, 0xFF, 0x07, 0x00, 0xE8, 0xFF, 0x12, 0x00, 0x42, 0x00, - 0xC4, 0xFE, 0x94, 0x03, 0x02, 0xF6, 0x89, 0x42, 0x76, 0x18, 0x5C, - 0xF5, 0x12, 0x06, 0x84, 0xFC, 0xD1, 0x01, 0x3B, 0xFF, 0x34, 0x00, - 0xFE, 0xFF, 0x02, 0x00, 0x03, 0x00, 0xCA, 0xFF, 0xD4, 0x00, 0xC8, - 0xFD, 0x2A, 0x05, 0x7D, 0xF3, 0xCA, 0x3D, 0x22, 0x20, 0x76, 0xF3, - 0xC8, 0x06, 0x41, 0xFC, 0xE6, 0x01, 0x36, 0xFF, 0x36, 0x00, 0xFD, - 0xFF, 0xFF, 0xFF, 0x19, 0x00, 0x8E, 0xFF, 0x49, 0x01, 0x04, 0xFD, - 0x4D, 0x06, 0x00, 0xF2, 0xFE, 0x37, 0xCB, 0x27, 0x21, 0xF2, 0x23, - 0x07, 0x34, 0xFC, 0xDD, 0x01, 0x3F, 0xFF, 0x34, 0x00, 0xFD, 0xFF, - 0xFD, 0xFF, 0x29, 0x00, 0x61, 0xFF, 0x9F, 0x01, 0x80, 0xFC, 0xF7, - 0x06, 0x7D, 0xF1, 0x5A, 0x31, 0x2C, 0x2F, 0x83, 0xF1, 0x13, 0x07, - 0x64, 0xFC, 0xB3, 0x01, 0x57, 0xFF, 0x2C, 0x00, 0xFD, 0xFF, 0xFD, - 0xFF, 0x32, 0x00, 0x44, 0xFF, 0xD3, 0x01, 0x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 0xF1, 0x24, 0x07, 0x4E, - 0xFC, 0xC3, 0x01, 0x4E, 0xFF, 0x2F, 0x00, 0xFD, 0xFF, 0xFD, 0xFF, - 0x30, 0x00, 0x4C, 0xFF, 0xC7, 0x01, 0x4A, 0xFC, 0x27, 0x07, 0xA8, - 0xF1, 0x62, 0x2C, 0xFD, 0x33, 0x93, 0xF1, 0xC4, 0x06, 0xAB, 0xFC, - 0x82, 0x01, 0x71, 0xFF, 0x23, 0x00, 0xFE, 0xFF, 0xFD, 0xFF, 0x36, - 0x00, 0x3A, 0xFF, 0xE4, 0x01, 0x32, 0xFC, 0x0C, 0x07, 0x91, 0xF2, - 0xDD, 0x24, 0x54, 0x3A, 0x74, 0xF2, 0xEB, 0x05, 0x49, 0xFD, 0x20, - 0x01, 0xA3, 0xFF, 0x11, 0x00, 0x00, 0x00, 0xFE, 0xFF, 0x36, 0x00, - 0x37, 0xFF, 0xE1, 0x01, 0x55, 0xFC, 0x8C, 0x06, 0x22, 0xF4, 0x2C, - 0x1D, 0xC0, 0x3F, 0x55, 0xF4, 0x9B, 0x04, 0x23, 0xFE, 0x9F, 0x00, - 0xE4, 0xFF, 0xF9, 0xFF, 0x04, 0x00, 0xFF, 0xFF, 0x33, 0x00, 0x40, - 0xFF, 0xC1, 0x01, 0xAB, 0xFC, 0xB7, 0x05, 0x34, 0xF6, 0x8E, 0x15, - 0x0B, 0x44, 0x42, 0xF7, 0xDC, 0x02, 0x32, 0xFF, 0x04, 0x00, 0x31, - 0x00, 0xDC, 0xFF, 0x09, 0x00, 0xFF, 0xFF, 0x2C, 0x00, 0x55, 0xFF, - 0x8B, 0x01, 0x2B, 0xFD, 0xA1, 0x04, 0x9B, 0xF8, 0x42, 0x0E, 0x0F, - 0x47, 0x38, 0xFB, 0xBE, 0x00, 0x6A, 0x00, 0x58, 0xFF, 0x85, 0x00, - 0xBB, 0xFF, 0x10, 0x00, 0x00, 0x00, 0x24, 0x00, 0x71, 0xFF, 0x43, - 0x01, 0xC9, 0xFD, 0x60, 0x03, 0x2E, 0xFB, 0x7E, 0x07, 0xAF, 0x48, - 0x2D, 0x00, 0x58, 0xFE, 0xBB, 0x01, 0xA3, 0xFE, 0xDD, 0x00, 0x99, - 0xFF, 0x19, 0x00, 0x1B, 0x00, 0x91, 0xFF, 0xF1, 0x00, 0x79, 0xFE, - 0x0A, 0x02, 0xC3, 0xFD, 0x73, 0x01, 0xDB, 0x48, 0x07, 0x06, 0xC7, - 0xFB, 0x12, 0x03, 0xF1, 0xFD, 0x31, 0x01, 0x78, 0xFF, 0x22, 0x00, - 0x00, 0x00, 0x12, 0x00, 0xB3, 0xFF, 0x99, 0x00, 0x2E, 0xFF, 0xB6, - 0x00, 0x36, 0x00, 0x47, 0xFC, 0x90, 0x47, 0xA4, 0x0C, 0x31, 0xF9, - 0x5A, 0x04, 0x4E, 0xFD, 0x7C, 0x01, 0x5B, 0xFF, 0x2A, 0x00, 0x00, - 0x00, 0x0B, 0x00, 0xD5, 0xFF, 0x44, 0x00, 0xDD, 0xFF, 0x77, 0xFF, - 0x67, 0x02, 0x14, 0xF8, 0xDC, 0x44, 0xD5, 0x13, 0xBC, 0xF6, 0x7C, - 0x05, 0xC5, 0xFC, 0xB7, 0x01, 0x44, 0xFF, 0x31, 0x00, 0xFF, 0xFF, - 0x05, 0x00, 0xF3, 0xFF, 0xF5, 0xFF, 0x7D, 0x00, 0x5D, 0xFE, 0x3E, - 0x04, 0xEA, 0xF4, 0xD9, 0x40, 0x66, 0x1B, 0x93, 0xF4, 0x62, 0x06, - 0x64, 0xFC, 0xDC, 0x01, 0x38, 0xFF, 0x36, 0x00, 0xFE, 0xFF, 0x00, - 0x00, 0x0C, 0x00, 0xB1, 0xFF, 0x04, 0x01, 0x76, 0xFD, 0xA8, 0x05, - 0xCC, 0xF2, 0xAB, 0x3B, 0x18, 0x23, 0xE0, 0xF2, 0xF7, 0x06, 0x35, - 0xFC, 0xE6, 0x01, 0x38, 0xFF, 0x36, 0x00, 0xFD, 0xFF,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x01, 0x06, 0x00, 0x8E, 0xFF, 0x6B, 0x00, 0xC6, - 0xFF, 0x0E, 0x00, 0x00, 0x00, 0x26, 0x00, 0x68, 0xFF, 0x5B, 0x01, - 0x96, 0xFD, 0xC6, 0x03, 0x61, 0xFA, 0x81, 0x09, 0x57, 0x48, 0x8D, - 0xFE, 0x1B, 0xFF, 0x52, 0x01, 0xDB, 0xFE, 0xC2, 0x00, 0xA4, 0xFF, - 0x16, 0x00, 0x1E, 0x00, 0x87, 0xFF, 0x0B, 0x01, 0x42, 0xFE, 0x74, - 0x02, 0xF9, 0xFC, 0x39, 0x03, 0xF5, 0x48, 0x24, 0x04, 0x94, 0xFC, - 0xA9, 0x02, 0x27, 0xFE, 0x18, 0x01, 0x82, 0xFF, 0x1F, 0x00, 0x00, - 0x00, 0x15, 0x00, 0xA9, 0xFF, 0xB4, 0x00, 0xF7, 0xFE, 0x1D, 0x01, - 0x7A, 0xFF, 0xC5, 0xFD, 0x1D, 0x48, 0x89, 0x0A, 0xFB, 0xF9, 0xF8, - 0x03, 0x7D, 0xFD, 0x66, 0x01, 0x63, 0xFF, 0x28, 0x00, 0x00, 0x00, - 0x0D, 0x00, 0xCB, 0xFF, 0x5E, 0x00, 0xA9, 0xFF, 0xD6, 0xFF, 0xC3, - 0x01, 0x43, 0xF9, 0xD7, 0x45, 0x92, 0x11, 0x77, 0xF7, 0x28, 0x05, - 0xEC, 0xFC, 0xA7, 0x01, 0x4A, 0xFF, 0x2F, 0x00, 0xFF, 0xFF, 0x06, - 0x00, 0xEA, 0xFF, 0x0C, 0x00, 0x4E, 0x00, 0xAF, 0xFE, 0xB8, 0x03, - 0xC7, 0xF5, 0x38, 0x42, 0x0C, 0x19, 0x32, 0xF5, 0x23, 0x06, 0x7D, - 0xFC, 0xD3, 0x01, 0x3A, 0xFF, 0x35, 0x00, 0xFE, 0xFF, 0x02, 0x00, - 0x05, 0x00, 0xC5, 0xFF, 0xDE, 0x00, 0xB7, 0xFD, 0x45, 0x05, 0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x30, 0x00, 0x47, 0xFF, 0xAF, 0x01, - 0xD8, 0xFC, 0x52, 0x05, 0x19, 0xF7, 0xB2, 0x12, 0x5C, 0x45, 0xA9, - 0xF8, 0x16, 0x02, 0xA6, 0xFF, 0xC3, 0xFF, 0x51, 0x00, 0xD0, 0xFF, - 0x0C, 0x00, 0x00, 0x00, 0x29, 0x00, 0x5F, 0xFF, 0x71, 0x01, 0x65, - 0xFD, 0x29, 0x04, 0x96, 0xF9, 0x95, 0x0B, 0xDC, 0x47, 0x03, 0xFD, - 0xD9, 0xFF, 0xEA, 0x00, 0x12, 0xFF, 0xA7, 0x00, 0xAE, 0xFF, 0x14, - 0x00, 0x00, 0x00, 0x20, 0x00, 0x7D, 0xFF, 0x24, 0x01, 0x0C, 0xFE, - 0xDE, 0x02, 0x2E, 0xFC, 0x13, 0x05, 0xEC, 0x48, 0x54, 0x02, 0x5E, - 0xFD, 0x3F, 0x02, 0x5D, 0xFE, 0xFE, 0x00, 0x8C, 0xFF, 0x1C, 0x00, - 0x17, 0x00, 0x9E, 0xFF, 0xCF, 0x00, 0xBF, 0xFE, 0x86, 0x01, 0xBA, - 0xFE, 0x5A, 0xFF, 0x86, 0x48, 0x7D, 0x08, 0xC7, 0xFA, 0x93, 0x03, - 0xB0, 0xFD, 0x4F, 0x01, 0x6C, 0xFF, 0x25, 0x00, 0x00, 0x00, 0x0F, - 0x00, 0xC0, 0xFF, 0x78, 0x00, 0x73, 0xFF, 0x38, 0x00, 0x17, 0x01, - 0x8B, 0xFA, 0xAF, 0x46, 0x59, 0x0F, 0x39, 0xF8, 0xCF, 0x04, 0x15, - 0xFD, 0x95, 0x01, 0x51, 0xFF, 0x2D, 0x00, 0xFF, 0xFF, 0x08, 0x00, - 0xE1, 0xFF, 0x25, 0x00, 0x1D, 0x00, 0x05, 0xFF, 0x28, 0x03, 0xBD, - 0xF6, 0x77, 0x43, 0xB6, 0x16, 0xDC, 0xF5, 0xDD, 0x05, 0x9B, 0xFC, - 0xC8, 0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94, 0x1C, 0x1F, 0x40, 0x85, - 0xF4, 0x7D, 0x04, 0x36, 0xFE, 0x93, 0x00, 0xEA, 0xFF, 0xF7, 0xFF, - 0x04, 0x00, 0xFF, 0xFF, 0x32, 0x00, 0x42, 0xFF, 0xBE, 0x01, 0xB4, - 0xFC, 0xA4, 0x05, 0x61, 0xF6, 0xFB, 0x14, 0x53, 0x44, 0x86, 0xF7, - 0xB6, 0x02, 0x49, 0xFF, 0xF7, 0xFF, 0x37, 0x00, 0xD9, 0xFF, 0x0A, - 0x00, 0x00, 0x00, 0x2B, 0x00, 0x57, 0xFF, 0x86, 0x01, 0x36, 0xFD, - 0x89, 0x04, 0xCD, 0xF8, 0xB7, 0x0D, 0x3D, 0x47, 0x91, 0xFB, 0x91, - 0x00, 0x83, 0x00, 0x4A, 0xFF, 0x8C, 0x00, 0xB9, 0xFF, 0x11, 0x00, - 0x00, 0x00, 0x23, 0x00, 0x73, 0xFF, 0x3D, 0x01, 0xD6, 0xFD, 0x46, - 0x03, 0x61, 0xFB, 0x00, 0x07, 0xBF, 0x48, 0x98, 0x00, 0x26, 0xFE, - 0xD5, 0x01, 0x95, 0xFE, 0xE3, 0x00, 0x96, 0xFF, 0x1A, 0x00, 0x1A, - 0x00, 0x94, 0xFF, 0xEA, 0x00, 0x87, 0xFE, 0xF0, 0x01, 0xF5, 0xFD, - 0x05, 0x01, 0xCE, 0x48, 0x83, 0x06, 0x94, 0xFB, 0x2C, 0x03, 0xE4, - 0xFD, 0x37, 0x01, 0x76, 0xFF, 0x22, 0x00, 0x00, 0x00, 0x12, 0x00, - 0xB6, 0xFF, 0x93, 0x00, 0x3C, 0xFF, 0x9D, 0x00, 0x63, 0x00, 0xEB, - 0xFB, 0x69, 0x47, 0x2D, 0x0D, 0xFF, 0xF8, 0x72, 0x04, 0x42, 0xFD, - 0x81, 0x01, 0x59, 0xFF, 0x2B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xD7, - 0xFF, 0x3E, 0x00, 0xEA, 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01, 0x37, - 0xFC, 0x28, 0x07, 0xFC, 0xF1, 0xF3, 0x28, 0x04, 0x37, 0xDC, 0xF1, - 0x6F, 0x06, 0xEC, 0xFC, 0x59, 0x01, 0x86, 0xFF, 0x1C, 0x00, 0xFE, - 0xFF, 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE6, 0x01, 0x3B, 0xFC, - 0xDD, 0x06, 0x37, 0xF3, 0x52, 0x21, 0xF6, 0x3C, 0x31, 0xF3, 0x5F, - 0x05, 0xA6, 0xFD, 0xE8, 0x00, 0xC0, 0xFF, 0x07, 0x00, 0x01, 0x00, - 0xFE, 0xFF, 0x35, 0x00, 0x3A, 0xFF, 0xD6, 0x01, 0x77, 0xFC, 0x33, - 0x06, 0x09, 0xF5, 0xA1, 0x19, 0xE1, 0x41, 0x8D, 0xF5, 0xDA, 0x03, - 0x9A, 0xFE, 0x5A, 0x00, 0x06, 0x00, 0xEC, 0xFF, 0x06, 0x00, 0xFF, - 0xFF, 0x30, 0x00, 0x49, 0xFF, 0xAB, 0x01, 0xE2, 0xFC, 0x3D, 0x05, - 0x48, 0xF7, 0x22, 0x12, 0x9B, 0x45, 0xF5, 0xF8, 0xED, 0x01, 0xBE, - 0xFF, 0xB6, 0xFF, 0x57, 0x00, 0xCD, 0xFF, 0x0C, 0x00, 0x00, 0x00, - 0x28, 0x00, 0x61, 0xFF, 0x6C, 0x01, 0x71, 0xFD, 0x11, 0x04, 0xC8, - 0xF9, 0x0E, 0x0B, 0xFD, 0x47, 0x63, 0xFD, 0xAA, 0xFF, 0x03, 0x01, - 0x05, 0xFF, 0xAE, 0x00, 0xAC, 0xFF, 0x14, 0x00, 0x00, 0x00, 0x20, - 0x00, 0x7F, 0xFF, 0x1E, 0x01, 0x19, 0xFE, 0xC3, 0x02, 0x61, 0xFC, - 0x9B, 0x04, 0xF2, 0x48, 0xC6, 0x02, 0x2C, 0xFD, 0x5A, 0x02, 0x50, - 0xFE, 0x04, 0x01, 0x8A, 0xFF,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, 0xFD, 0x2C, 0x03, 0x94, 0xFB, 0x83, - 0x06, 0xCE, 0x48, 0x05, 0x01, 0xF5, 0xFD, 0xF0, 0x01, 0x87, 0xFE, - 0xEA, 0x00, 0x94, 0xFF, 0x1A, 0x00, 0x1A, 0x00, 0x96, 0xFF, 0xE3, - 0x00, 0x95, 0xFE, 0xD5, 0x01, 0x26, 0xFE, 0x98, 0x00, 0xBF, 0x48, - 0x00, 0x07, 0x61, 0xFB, 0x46, 0x03, 0xD6, 0xFD, 0x3D, 0x01, 0x73, - 0xFF, 0x23, 0x00, 0x00, 0x00, 0x11, 0x00, 0xB9, 0xFF, 0x8C, 0x00, - 0x4A, 0xFF, 0x83, 0x00, 0x91, 0x00, 0x91, 0xFB, 0x3D, 0x47, 0xB7, - 0x0D, 0xCD, 0xF8, 0x89, 0x04, 0x36, 0xFD, 0x86, 0x01, 0x57, 0xFF, - 0x2B, 0x00, 0x00, 0x00, 0x0A, 0x00, 0xD9, 0xFF, 0x37, 0x00, 0xF7, - 0xFF, 0x49, 0xFF, 0xB6, 0x02, 0x86, 0xF7, 0x53, 0x44, 0xFB, 0x14, - 0x61, 0xF6, 0xA4, 0x05, 0xB4, 0xFC, 0xBE, 0x01, 0x42, 0xFF, 0x32, - 0x00, 0xFF, 0xFF, 0x04, 0x00, 0xF7, 0xFF, 0xEA, 0xFF, 0x93, 0x00, - 0x36, 0xFE, 0x7D, 0x04, 0x85, 0xF4, 0x1F, 0x40, 0x94, 0x1C, 0x47, - 0xF4, 0x7E, 0x06, 0x5A, 0xFC, 0xDF, 0x01, 0x37, 0xFF, 0x36, 0x00, - 0xFE, 0xFF, 0x00, 0x00, 0x0F, 0x00, 0xA8, 0xFF, 0x17, 0x01, 0x57, - 0xFD, 0xD6, 0x05, 0x90, 0xF2, 0xC8, 0x3A, 0x46, 0x24, 0xAA, 0xF2, - 0x06, 0x07, 0x32, 0xFC, 0xE5, 0x01, 0x39, 0xFF, 0x36, 0x00, 0xFD, - 0xFF, 0xFE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 0x38, 0x00, 0x73, 0xFF, - 0x78, 0x00, 0xC0, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0x25, 0x00, 0x6C, - 0xFF, 0x4F, 0x01, 0xB0, 0xFD, 0x93, 0x03, 0xC7, 0xFA, 0x7D, 0x08, - 0x86, 0x48, 0x5A, 0xFF, 0xBA, 0xFE, 0x86, 0x01, 0xBF, 0xFE, 0xCF, - 0x00, 0x9E, 0xFF, 0x17, 0x00, 0x1C, 0x00, 0x8C, 0xFF, 0xFE, 0x00, - 0x5D, 0xFE, 0x3F, 0x02, 0x5E, 0xFD, 0x54, 0x02, 0xEC, 0x48, 0x13, - 0x05, 0x2E, 0xFC, 0xDE, 0x02, 0x0C, 0xFE, 0x24, 0x01, 0x7D, 0xFF, - 0x20, 0x00, 0x00, 0x00, 0x14, 0x00, 0xAE, 0xFF, 0xA7, 0x00, 0x12, - 0xFF, 0xEA, 0x00, 0xD9, 0xFF, 0x03, 0xFD, 0xDC, 0x47, 0x95, 0x0B, - 0x96, 0xF9, 0x29, 0x04, 0x65, 0xFD, 0x71, 0x01, 0x5F, 0xFF, 0x29, - 0x00, 0x00, 0x00, 0x0C, 0x00, 0xD0, 0xFF, 0x51, 0x00, 0xC3, 0xFF, - 0xA6, 0xFF, 0x16, 0x02, 0xA9, 0xF8, 0x5C, 0x45, 0xB2, 0x12, 0x19, - 0xF7, 0x52, 0x05, 0xD8, 0xFC, 0xAF, 0x01, 0x47, 0xFF, 0x30, 0x00, - 0xFF, 0xFF, 0x06, 0x00, 0xEE, 0xFF, 0x01, 0x00, 0x66, 0x00, 0x85, - 0xFE, 0xFC, 0x03, 0x55, 0xF5, 0x8C, 0x41, 0x38, 0x1A, 0xE1, 0xF4, - 0x43, 0x06, 0x70, 0xFC, 0xD8, 0x01, 0x39, 0xFF, 0x35, 0x00, 0xFE, - 0xFF, 0x01, 0x00, 0x08, 0x00, 0xBB, 0xFF, 0xF1, 0x00, 0x96, 0xFD, - 0x78, 0x05, 0x0E, 0x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, 0x00, 0x4A, - 0xFF, 0xA7, 0x01, 0xEC, 0xFC, 0x28, 0x05, 0x77, 0xF7, 0x92, 0x11, - 0xD7, 0x45, 0x43, 0xF9, 0xC3, 0x01, 0xD6, 0xFF, 0xA9, 0xFF, 0x5E, - 0x00, 0xCB, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x28, 0x00, 0x63, 0xFF, - 0x66, 0x01, 0x7D, 0xFD, 0xF8, 0x03, 0xFB, 0xF9, 0x89, 0x0A, 0x1D, - 0x48, 0xC5, 0xFD, 0x7A, 0xFF, 0x1D, 0x01, 0xF7, 0xFE, 0xB4, 0x00, - 0xA9, 0xFF, 0x15, 0x00, 0x00, 0x00, 0x1F, 0x00, 0x82, 0xFF, 0x18, - 0x01, 0x27, 0xFE, 0xA9, 0x02, 0x94, 0xFC, 0x24, 0x04, 0xF5, 0x48, - 0x39, 0x03, 0xF9, 0xFC, 0x74, 0x02, 0x42, 0xFE, 0x0B, 0x01, 0x87, - 0xFF, 0x1E, 0x00, 0x16, 0x00, 0xA4, 0xFF, 0xC2, 0x00, 0xDB, 0xFE, - 0x52, 0x01, 0x1B, 0xFF, 0x8D, 0xFE, 0x57, 0x48, 0x81, 0x09, 0x61, - 0xFA, 0xC6, 0x03, 0x96, 0xFD, 0x5B, 0x01, 0x68, 0xFF, 0x26, 0x00, - 0x00, 0x00, 0x0E, 0x00, 0xC6, 0xFF, 0x6B, 0x00, 0x8E, 0xFF, 0x06, - 0x00, 0x6E, 0x01, 0xE4, 0xF9, 0x48, 0x46, 0x75, 0x10, 0xD7, 0xF7, - 0xFC, 0x04, 0x00, 0xFD, 0x9E, 0x01, 0x4E, 0xFF, 0x2E, 0x00, 0xFF, - 0xFF, 0x07, 0x00, 0xE5, 0xFF, 0x18, 0x00, 0x36, 0x00, 0xD9, 0xFE, - 0x71, 0x03, 0x3F, 0xF6, 0xDB, 0x42, 0xE0, 0x17, 0x86, 0xF5, 0x00, - 0x06, 0x8C, 0xFC, 0xCE, 0x01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B, - 0xD9, 0x40, 0xEA, 0xF4, 0x3E, 0x04, 0x5D, 0xFE, 0x7D, 0x00, 0xF5, - 0xFF, 0xF3, 0xFF, 0x05, 0x00, 0xFF, 0xFF, 0x31, 0x00, 0x44, 0xFF, - 0xB7, 0x01, 0xC5, 0xFC, 0x7C, 0x05, 0xBC, 0xF6, 0xD5, 0x13, 0xDC, - 0x44, 0x14, 0xF8, 0x67, 0x02, 0x77, 0xFF, 0xDD, 0xFF, 0x44, 0x00, - 0xD5, 0xFF, 0x0B, 0x00, 0x00, 0x00, 0x2A, 0x00, 0x5B, 0xFF, 0x7C, - 0x01, 0x4E, 0xFD, 0x5A, 0x04, 0x31, 0xF9, 0xA4, 0x0C, 0x90, 0x47, - 0x47, 0xFC, 0x36, 0x00, 0xB6, 0x00, 0x2E, 0xFF, 0x99, 0x00, 0xB3, - 0xFF, 0x12, 0x00, 0x00, 0x00, 0x22, 0x00, 0x78, 0xFF, 0x31, 0x01, - 0xF1, 0xFD, 0x12, 0x03, 0xC7, 0xFB, 0x07, 0x06, 0xDB, 0x48, 0x73, - 0x01, 0xC3, 0xFD, 0x0A, 0x02, 0x79, 0xFE, 0xF1, 0x00, 0x91, 0xFF, - 0x1B, 0x00, 0x19, 0x00, 0x99, 0xFF, 0xDD, 0x00, 0xA3, 0xFE, 0xBB, - 0x01, 0x58, 0xFE, 0x2D, 0x00, 0xAF, 0x48, 0x7E, 0x07, 0x2E, 0xFB, - 0x60, 0x03, 0xC9, 0xFD, 0x43, 0x01, 0x71, 0xFF, 0x24, 0x00, 0x00, - 0x00, 0x10, 0x00, 0xBB, 0xFF, 0x85, 0x00, 0x58, 0xFF, 0x6A, 0x00, - 0xBE, 0x00, 0x38, 0xFB, 0x0F, 0x47, 0x42, 0x0E, 0x9B, 0xF8, 0xA1, - 0x04, 0x2B, 0xFD, 0x8B, 0x01, 0x55, 0xFF, 0x2C, 0x00, 0xFF, 0xFF, - 0x09, 0x00, 0xDC, 0xFF, 0x31, 0x00, 0x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xDD, 0x01, 0x34, 0xFC, 0x23, 0x07, 0x21, 0xF2, 0xCB, 0x27, 0xFE, - 0x37, 0x00, 0xF2, 0x4D, 0x06, 0x04, 0xFD, 0x49, 0x01, 0x8E, 0xFF, - 0x19, 0x00, 0xFF, 0xFF, 0xFD, 0xFF, 0x36, 0x00, 0x36, 0xFF, 0xE6, - 0x01, 0x41, 0xFC, 0xC8, 0x06, 0x76, 0xF3, 0x22, 0x20, 0xCA, 0x3D, - 0x7D, 0xF3, 0x2A, 0x05, 0xC8, 0xFD, 0xD4, 0x00, 0xCA, 0xFF, 0x03, - 0x00, 0x02, 0x00, 0xFE, 0xFF, 0x34, 0x00, 0x3B, 0xFF, 0xD1, 0x01, - 0x84, 0xFC, 0x12, 0x06, 0x5C, 0xF5, 0x76, 0x18, 0x89, 0x42, 0x02, - 0xF6, 0x94, 0x03, 0xC4, 0xFE, 0x42, 0x00, 0x12, 0x00, 0xE8, 0xFF, - 0x07, 0x00, 0xFF, 0xFF, 0x2F, 0x00, 0x4C, 0xFF, 0xA2, 0x01, 0xF6, - 0xFC, 0x12, 0x05, 0xA7, 0xF7, 0x03, 0x11, 0x10, 0x46, 0x93, 0xF9, - 0x98, 0x01, 0xEE, 0xFF, 0x9B, 0xFF, 0x64, 0x00, 0xC8, 0xFF, 0x0E, - 0x00, 0x00, 0x00, 0x27, 0x00, 0x65, 0xFF, 0x60, 0x01, 0x8A, 0xFD, - 0xDF, 0x03, 0x2E, 0xFA, 0x04, 0x0A, 0x3A, 0x48, 0x28, 0xFE, 0x4B, - 0xFF, 0x38, 0x01, 0xE9, 0xFE, 0xBB, 0x00, 0xA6, 0xFF, 0x16, 0x00, - 0x00, 0x00, 0x1E, 0x00, 0x84, 0xFF, 0x11, 0x01, 0x34, 0xFE, 0x8F, - 0x02, 0xC7, 0xFC, 0xAE, 0x03, 0xF7, 0x48, 0xAE, 0x03, 0xC7, 0xFC, - 0x8F, 0x02, 0x34, 0xFE, 0x11, 0x01, 0x84, 0xFF,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, 0x37, 0xFF, 0x02, 0x10, 0x07, 0x20, 0xF2, 0x1C, - 0x78, 0x0A, 0xCA, 0xFC, 0x50, 0xFC, 0x27, 0x00, 0xDC, 0x00, 0x15, - 0x00, 0xFC, 0xFF, 0xF7, 0xFF, 0x64, 0x00, 0xF5, 0x00, 0x97, 0xFE, - 0x40, 0xFB, 0x5D, 0x01, 0x8B, 0x13, 0x25, 0x21, 0x47, 0x1A, 0x2C, - 0x07, 0xDB, 0xFB, 0x05, 0xFD, 0x8C, 0x00, 0xB9, 0x00, 0x04, 0x00, - 0xFF, 0xFF, 0xFA, 0xFF, 0x8D, 0x00, 0xD3, 0x00, 0xD6, 0xFD, 0x56, - 0xFB, 0xF4, 0x03, 0xF0, 0x16, 0x8A, 0x21, 0x31, 0x17, 0x2B, 0x04, - 0x5B, 0xFB, 0xC7, 0xFD, 0xCF, 0x00, 0x90, 0x00, 0xFA, 0xFF, 0x00, - 0x00, 0xFF, 0xFF, 0x03, 0x00, 0xB6, 0x00, 0x92, 0x00, 0x13, 0xFD, - 0xCD, 0xFB, 0xEE, 0x06, 0x0D, 0x1A, 0x33, 0x21, 0xD0, 0x13, 0x8C, - 0x01, 0x3E, 0xFB, 0x88, 0xFE, 0xF3, 0x00, 0x67, 0x00, 0xF7, 0xFF, - 0x06, 0x00, 0x1D, 0x00, 0x03, 0xFF, 0xFE, 0x00, 0xA1, 0x02, 0xA6, - 0xF8, 0x56, 0x02, 0xA5, 0x28, 0xA5, 0x28, 0x56, 0x02, 0xA6, 0xF8, - 0xA1, 0x02, 0xFE, 0x00, 0x03, 0xFF, 0x1D, 0x00, 0x06, 0x00, 0x00, - 0x00, 0x21, 0x00, 0xA6, 0xFF, 0x3F, 0xFF, 0x0B, 0x03, 0x42, 0xFE, - 0x3E, 0xF8, 0x7F, 0x15, 0xAC, 0x30, 0x7F, 0x15, 0x3E, 0xF8, 0x42, - 0xFE, 0x0B, 0x03, 0x3F, 0xFF, 0xA6, 0xFF, 0x21, 0x00, 0x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x33, 0xFE, 0x2A, 0x00, 0x47, 0x00, 0xD3, - 0xFF, 0x04, 0x00, 0x0F, 0x00, 0x95, 0xFF, 0x17, 0x01, 0x3D, 0xFE, - 0xBD, 0x01, 0x30, 0x00, 0xCC, 0xF8, 0x92, 0x3B, 0x2A, 0x20, 0x2E, - 0xF3, 0x12, 0x06, 0x8F, 0xFD, 0x9A, 0x00, 0x10, 0x00, 0xE5, 0xFF, - 0x02, 0x00, 0x10, 0x00, 0x8C, 0xFF, 0x42, 0x01, 0xBB, 0xFD, 0xE4, - 0x02, 0x01, 0xFE, 0x9C, 0xFC, 0x45, 0x3F, 0x16, 0x19, 0x2D, 0xF4, - 0x41, 0x06, 0x21, 0xFD, 0xF3, 0x00, 0xE0, 0xFF, 0xF4, 0xFF, 0x01, - 0x00, 0x10, 0x00, 0x8B, 0xFF, 0x5D, 0x01, 0x4F, 0xFD, 0xFB, 0x03, - 0xB2, 0xFB, 0x53, 0x01, 0xC2, 0x41, 0x24, 0x12, 0xBA, 0xF5, 0x0F, - 0x06, 0xE9, 0xFC, 0x33, 0x01, 0xBB, 0xFF, 0x00, 0x00, 0x00, 0x00, - 0x0D, 0x00, 0x93, 0xFF, 0x63, 0x01, 0x04, 0xFD, 0xEF, 0x04, 0x62, - 0xF9, 0xD7, 0x06, 0xF2, 0x42, 0x8D, 0x0B, 0xB0, 0xF7, 0x87, 0x05, - 0xE6, 0xFC, 0x58, 0x01, 0xA0, 0xFF, 0x09, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x07, 0x00, 0xA5, 0xFF, 0x52, 0x01, 0xE2, 0xFC, 0xAD, 0x05, - 0x35, 0xF7, 0x08, 0x0D, 0xCB, 0x42, 0x81, 0x05, 0xE8, 0xF9, 0xBB, - 0x04, 0x12, 0xFD, 0x64, 0x01, 0x90, 0xFF, 0x0E, 0x00, 0x00, 0x00, - 0xFE, 0xFF, 0xC2, 0xFF, 0x27, 0x01, 0xF1, 0xFC, 0x22, 0x06, 0x54, - 0xF5,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0x07, 0x01, 0x68, 0xFE, - 0x63, 0x01, 0xD0, 0x00, 0xD0, 0xF7, 0x35, 0x3A, 0x55, 0x22, 0x02, - 0xF3, 0xEF, 0x05, 0xBC, 0xFD, 0x7A, 0x00, 0x20, 0x00, 0xDF, 0xFF, - 0x03, 0x00, 0x10, 0x00, 0x8E, 0xFF, 0x36, 0x01, 0xE1, 0xFD, 0x8A, - 0x02, 0xB2, 0xFE, 0x56, 0xFB, 0x40, 0x3E, 0x42, 0x1B, 0xCE, 0xF3, - 0x3E, 0x06, 0x3D, 0xFD, 0xDB, 0x00, 0xEE, 0xFF, 0xF0, 0xFF, 0x01, - 0x00, 0x11, 0x00, 0x8A, 0xFF, 0x57, 0x01, 0x6D, 0xFD, 0xA8, 0x03, - 0x69, 0xFC, 0xC8, 0xFF, 0x20, 0x41, 0x40, 0x14, 0x33, 0xF5, 0x28, - 0x06, 0xF5, 0xFC, 0x22, 0x01, 0xC5, 0xFF, 0xFD, 0xFF, 0x00, 0x00, - 0x0F, 0x00, 0x8F, 0xFF, 0x64, 0x01, 0x17, 0xFD, 0xA9, 0x04, 0x16, - 0xFA, 0x10, 0x05, 0xB8, 0x42, 0x87, 0x0D, 0x0D, 0xF7, 0xB9, 0x05, - 0xE2, 0xFC, 0x50, 0x01, 0xA7, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0A, 0x00, 0x9E, 0xFF, 0x5A, 0x01, 0xE8, 0xFC, 0x7A, 0x05, - 0xDA, 0xF7, 0x10, 0x0B, 0xFB, 0x42, 0x4B, 0x07, 0x35, 0xF9, 0x00, - 0x05, 0x00, 0xFD, 0x63, 0x01, 0x94, 0xFF, 0x0D, 0x00, 0x00, 0x00, - 0x01, 0x00, 0xB8, 0xFF, 0x37, 0x01, 0xE7, 0xFC, 0x07, 0x06, 0xDE, - 0xF5, 0x9F, 0x11, 0xE4, 0x41, 0xB8, 0x01, 0x84, 0xFB, 0x0F, 0x04, - 0x48, 0xFD, 0x5E, 0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x7D, 0x24, 0xE8, - 0xF2, 0xC1, 0x05, 0xEE, 0xFD, 0x57, 0x00, 0x31, 0x00, 0xDA, 0xFF, - 0x03, 0x00, 0x10, 0x00, 0x91, 0xFF, 0x29, 0x01, 0x09, 0xFE, 0x2F, - 0x02, 0x5F, 0xFF, 0x27, 0xFA, 0x20, 0x3D, 0x70, 0x1D, 0x7D, 0xF3, - 0x31, 0x06, 0x5E, 0xFD, 0xBF, 0x00, 0xFD, 0xFF, 0xEB, 0xFF, 0x02, - 0x00, 0x11, 0x00, 0x8B, 0xFF, 0x4E, 0x01, 0x8E, 0xFD, 0x52, 0x03, - 0x20, 0xFD, 0x52, 0xFE, 0x60, 0x40, 0x63, 0x16, 0xB7, 0xF4, 0x39, - 0x06, 0x05, 0xFD, 0x0F, 0x01, 0xD1, 0xFF, 0xF9, 0xFF, 0x00, 0x00, - 0x10, 0x00, 0x8D, 0xFF, 0x62, 0x01, 0x2E, 0xFD, 0x5E, 0x04, 0xCC, - 0xFA, 0x5B, 0x03, 0x5E, 0x42, 0x8E, 0x0F, 0x71, 0xF6, 0xE4, 0x05, - 0xE2, 0xFC, 0x45, 0x01, 0xAF, 0xFF, 0x04, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x0B, 0x00, 0x99, 0xFF, 0x60, 0x01, 0xF2, 0xFC, 0x40, 0x05, - 0x85, 0xF8, 0x26, 0x09, 0x0C, 0x43, 0x26, 0x09, 0x85, 0xF8, 0x40, - 0x05, 0xF2, 0xFC, 0x60, 0x01, 0x99, 0xFF, 0x0B, 0x00, 0x00, 0x00, - 0x04, 0x00, 0xAF, 0xFF, 0x45, 0x01, 0xE2, 0xFC, 0xE4, 0x05, 0x71, - 0xF6, 0x8E, 0x0F, 0x5E, 0x42, 0x5B, 0x03, 0xCC, 0xFA, 0x5E, 0x04, - 0x2E, 0xFD, 0x62, 0x01, 0x8D, 0xFF, 0x10, 0x00, 0x00, 0x00, 0xF9, - 0xFF, 0xD1, 0xFF, 0x0F, 0x01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, - 0x04, 0x00, 0x0F, 0x00, 0x94, 0xFF, 0x1B, 0x01, 0x33, 0xFE, 0xD4, - 0x01, 0x07, 0x00, 0x0E, 0xF9, 0xE6, 0x3B, 0x9F, 0x1F, 0x3C, 0xF3, - 0x1A, 0x06, 0x85, 0xFD, 0xA2, 0x00, 0x0C, 0x00, 0xE6, 0xFF, 0x02, - 0x00, 0x11, 0x00, 0x8C, 0xFF, 0x45, 0x01, 0xB2, 0xFD, 0xFA, 0x02, - 0xD5, 0xFD, 0xF1, 0xFC, 0x81, 0x3F, 0x8B, 0x18, 0x47, 0xF4, 0x41, - 0x06, 0x1B, 0xFD, 0xF9, 0x00, 0xDD, 0xFF, 0xF5, 0xFF, 0x01, 0x00, - 0x10, 0x00, 0x8B, 0xFF, 0x5E, 0x01, 0x48, 0xFD, 0x0F, 0x04, 0x84, - 0xFB, 0xB8, 0x01, 0xE4, 0x41, 0x9F, 0x11, 0xDE, 0xF5, 0x07, 0x06, - 0xE7, 0xFC, 0x37, 0x01, 0xB8, 0xFF, 0x01, 0x00, 0x00, 0x00, 0x0D, - 0x00, 0x94, 0xFF, 0x63, 0x01, 0x00, 0xFD, 0x00, 0x05, 0x35, 0xF9, - 0x4B, 0x07, 0xFB, 0x42, 0x10, 0x0B, 0xDA, 0xF7, 0x7A, 0x05, 0xE8, - 0xFC, 0x5A, 0x01, 0x9E, 0xFF, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x07, 0x00, 0xA7, 0xFF, 0x50, 0x01, 0xE2, 0xFC, 0xB9, 0x05, 0x0D, - 0xF7, 0x87, 0x0D, 0xB8, 0x42, 0x10, 0x05, 0x16, 0xFA, 0xA9, 0x04, - 0x17, 0xFD, 0x64, 0x01, 0x8F, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xFD, - 0xFF, 0xC5, 0xFF, 0x22, 0x01, 0xF5, 0xFC, 0x28, 0x06, 0x33, 0xF5, - 0x40, 0x14, 0x20, 0x41, 0xC8, 0xFF, 0x69, 0xFC, 0xA8, 0x03, 0x6D, - 0xFD, 0x57, 0x01, 0x8A, 0xFF, 0x11, 0x00, 0x01, 0x00, 0xF0, 0xFF, - 0xEE, 0xFF, 0xDB, 0x00, 0x3D, 0xFD, 0x3E, 0x06, 0xCE, 0xF3, 0x42, - 0x1B, 0x40, 0x3E, 0x56, 0xFB, 0xB2, 0xFE, 0x8A, 0x02, 0xE1, 0xFD, - 0x36, 0x01, 0x8E, 0xFF, 0x10, 0x00, 0x03, 0x00, 0xDF, 0xFF, 0x20, - 0x00, 0x7A, 0x00, 0xBC, 0xFD, 0xEF, 0x05, 0x02, 0xF3, 0x55, 0x22, - 0x35, 0x3A, 0xD0, 0xF7, 0xD0, 0x00, 0x63, 0x01, 0x68, 0xFE, 0x07, - 0x01, 0x99, 0xFF, 0x0E, 0x00, 0x05, 0x00, 0xCD, 0xFF, 0x5A, 0x00, - 0x03, 0x00, 0x70, 0xFE, 0x35, 0x05, 0xF2, 0xF2, 0x3B, 0x29, 0x24, - 0x35, 0x3E, 0xF5, 0xAA, 0x02, 0x44, 0x00, 0xF8, 0xFE, 0xCF, 0x00, - 0xA9, 0xFF, 0x0B, 0x00, 0x08, 0x00, 0xBA, 0xFF, 0x97, 0x00, 0x7C, - 0xFF, 0x52, 0xFF, 0x11, 0x04, 0xB8, 0xF3, 0xB8, 0x2F, 0x3D, 0x2F, - 0xA1, 0xF3, 0x2B, 0x04, 0x3F, 0xFF, 0x87, 0xFF, 0x92, 0x00, 0xBB, - 0xFF, 0x08, 0x00, 0x0B, 0x00, 0xA8, 0xFF, 0xD4, 0x00, 0xED, 0xFE, - 0x5A, 0x00, 0x88, 0x02, 0x68, 0xF5, 0x91, 0x35, 0xB6, 0x28, 0xEC, - 0xF2, 0x48, 0x05, 0x60, 0xFE, 0x0D, 0x00, 0x55, 0x00, 0xCE, 0xFF, - 0x05, 0x00, 0x0E, 0x00, 0x98, 0xFF, 0x0B, 0x01, 0x5D, 0xFE, 0x79, - 0x01, 0xA9, 0x00, 0x0D, 0xF8, 0x8F, 0x3A, 0xCB, 0x21, 0x0C, 0xF3, - 0xF9, 0x05, 0xB0, 0xFD, 0x82, 0x00, 0x1C, 0x00, 0xE1, 0xFF, 0x03, - 0x00, 0x10, 0x00, 0x8E, 0xFF, 0x39, 0x01, 0xD7, 0xFD, 0xA0, 0x02, - 0x86, 0xFE, 0xA6, 0xFB, 0x85, 0x3E, 0xB7, 0x1A, 0xE4, 0xF3, 0x40, - 0x06, 0x35, 0xFD, 0xE1, 0x00, 0xEB, 0xFF, 0xF1, 0xFF, 0x01, 0x00, - 0x11, 0x00, 0x8A, 0xFF, 0x58, 0x01, 0x66, 0xFD, 0xBD, 0x03, 0x3C, - 0xFC, 0x29, 0x00, 0x4A, 0x41, 0xB8, 0x13, 0x54, 0xF5, 0x22, 0x06, - 0xF1, 0xFC, 0x27, 0x01, 0xC2, 0xFF, 0xFE, 0xFF, 0x00, 0x00, 0x0E, - 0x00, 0x90, 0xFF, 0x64, 0x01, 0x12, 0xFD, 0xBB, 0x04, 0xE8, 0xF9, - 0x81, 0x05, 0xCB, 0x42, 0x08, 0x0D, 0x35, 0xF7, 0xAD, 0x05, 0xE2, - 0xFC, 0x52, 0x01, 0xA5, 0xFF, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x09, 0x00, 0xA0, 0xFF, 0x58, 0x01, 0xE6, 0xFC, 0x87, 0x05, 0xB0, - 0xF7, 0x8D, 0x0B, 0xF2, 0x42, 0xD7, 0x06, 0x62, 0xF9, 0xEF, 0x04, - 0x04, 0xFD, 0x63, 0x01, 0x93, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x00, - 0x00, 0xBB, 0xFF, 0x33, 0x01, 0xE9, 0xFC, 0x0F, 0x06, 0xBA, 0xF5, - 0x24, 0x12, 0xC2, 0x41, 0x53, 0x01, 0xB2, 0xFB, 0xFB, 0x03, 0x4F, - 0xFD, 0x5D, 0x01, 0x8B, 0xFF, 0x10, 0x00, 0x01, 0x00, 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D, 0x60, 0x00, 0x2D, 0x00, 0xDB, 0xFF, 0x03, - 0x00, 0x10, 0x00, 0x90, 0xFF, 0x2D, 0x01, 0xFF, 0xFD, 0x46, 0x02, - 0x34, 0xFF, 0x71, 0xFA, 0x6B, 0x3D, 0xE5, 0x1C, 0x90, 0xF3, 0x35, - 0x06, 0x55, 0xFD, 0xC6, 0x00, 0xF9, 0xFF, 0xEC, 0xFF, 0x01, 0x00, - 0x11, 0x00, 0x8B, 0xFF, 0x51, 0x01, 0x86, 0xFD, 0x68, 0x03, 0xF3, - 0xFC, 0xAE, 0xFE, 0x92, 0x40, 0xDA, 0x15, 0xD5, 0xF4, 0x35, 0x06, - 0x00, 0xFD, 0x14, 0x01, 0xCE, 0xFF, 0xFA, 0xFF, 0x00, 0x00, 0x0F, - 0x00, 0x8D, 0xFF, 0x63, 0x01, 0x28, 0xFD, 0x71, 0x04, 0x9E, 0xFA, - 0xC7, 0x03, 0x79, 0x42, 0x0B, 0x0F, 0x97, 0xF6, 0xDA, 0x05, 0xE2, - 0xFC, 0x48, 0x01, 0xAD, 0xFF, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x0B, 0x00, 0x9A, 0xFF, 0x5F, 0x01, 0xEF, 0xFC, 0x4F, 0x05, 0x5A, - 0xF8, 0x9F, 0x09, 0x0A, 0x43, 0xAE, 0x08, 0xB1, 0xF8, 0x30, 0x05, - 0xF5, 0xFC, 0x61, 0x01, 0x97, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x03, - 0x00, 0xB1, 0xFF, 0x41, 0x01, 0xE3, 0xFC, 0xED, 0x05, 0x4C, 0xF6, - 0x11, 0x10, 0x42, 0x42, 0xF1, 0x02, 0xFA, 0xFA, 0x4B, 0x04, 0x34, - 0xFD, 0x61, 0x01, 0x8C, 0xFF, 0x10, 0x00, 0x01, 0x00, 0xF8, 0xFF, - 0xD4, 0xFF, 0x0A, 0x01, 0x0A, 0xFD, 0x3C, 0x06, 0x9A, 0xF4, 0xED,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 0x1F, 0x01, 0x28, 0xFE, 0xEB, 0x01, - 0xDD, 0xFF, 0x52, 0xF9, 0x36, 0x3C, 0x13, 0x1F, 0x4B, 0xF3, 0x20, - 0x06, 0x7B, 0xFD, 0xA9, 0x00, 0x08, 0x00, 0xE7, 0xFF, 0x02, 0x00, - 0x11, 0x00, 0x8C, 0xFF, 0x47, 0x01, 0xA9, 0xFD, 0x10, 0x03, 0xA8, - 0xFD, 0x47, 0xFD, 0xBB, 0x3F, 0x01, 0x18, 0x62, 0xF4, 0x40, 0x06, - 0x15, 0xFD, 0xFF, 0x00, 0xDA, 0xFF, 0xF6, 0xFF, 0x01, 0x00, 0x10, - 0x00, 0x8B, 0xFF, 0x5F, 0x01, 0x41, 0xFD, 0x23, 0x04, 0x56, 0xFB, - 0x1F, 0x02, 0x06, 0x42, 0x19, 0x11, 0x02, 0xF6, 0xFF, 0x05, 0xE5, - 0xFC, 0x3B, 0x01, 0xB6, 0xFF, 0x02, 0x00, 0x00, 0x00, 0x0D, 0x00, - 0x95, 0xFF, 0x62, 0x01, 0xFC, 0xFC, 0x10, 0x05, 0x09, 0xF9, 0xC1, - 0x07, 0x03, 0x43, 0x94, 0x0A, 0x05, 0xF8, 0x6C, 0x05, 0xEA, 0xFC, - 0x5C, 0x01, 0x9D, 0xFF, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, - 0x00, 0xA9, 0xFF, 0x4D, 0x01, 0xE1, 0xFC, 0xC4, 0x05, 0xE6, 0xF6, - 0x08, 0x0E, 0xA5, 0x42, 0xA1, 0x04, 0x43, 0xFA, 0x97, 0x04, 0x1D, - 0xFD, 0x64, 0x01, 0x8F, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xFC, 0xFF, - 0xC8, 0xFF, 0x1E, 0x01, 0xF8, 0xFC, 0x2D, 0x06, 0x13, 0xF5, 0xC8, - 0x14, 0xF2, 0x40, 0x69, 0xFF, 0x97, 0xFC, 0x92, 0x03, 0x75, 0xFD, - 0x55, 0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F, 0x03, 0x00, - 0x10, 0x00, 0x90, 0xFF, 0x30, 0x01, 0xF5, 0xFD, 0x5C, 0x02, 0x09, - 0xFF, 0xBC, 0xFA, 0xB5, 0x3D, 0x5A, 0x1C, 0xA3, 0xF3, 0x38, 0x06, - 0x4D, 0xFD, 0xCD, 0x00, 0xF5, 0xFF, 0xED, 0xFF, 0x01, 0x00, 0x11, - 0x00, 0x8B, 0xFF, 0x53, 0x01, 0x7E, 0xFD, 0x7D, 0x03, 0xC5, 0xFC, - 0x0B, 0xFF, 0xC3, 0x40, 0x51, 0x15, 0xF4, 0xF4, 0x31, 0x06, 0xFC, - 0xFC, 0x19, 0x01, 0xCB, 0xFF, 0xFB, 0xFF, 0x00, 0x00, 0x0F, 0x00, - 0x8E, 0xFF, 0x63, 0x01, 0x22, 0xFD, 0x84, 0x04, 0x71, 0xFA, 0x34, - 0x04, 0x90, 0x42, 0x89, 0x0E, 0xBE, 0xF6, 0xCF, 0x05, 0xE1, 0xFC, - 0x4A, 0x01, 0xAB, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, - 0x00, 0x9B, 0xFF, 0x5D, 0x01, 0xEC, 0xFC, 0x5D, 0x05, 0x2F, 0xF8, - 0x19, 0x0A, 0x07, 0x43, 0x37, 0x08, 0xDD, 0xF8, 0x21, 0x05, 0xF8, - 0xFC, 0x62, 0x01, 0x96, 0xFF, 0x0C, 0x00, 0x00, 0x00, 0x03, 0x00, - 0xB4, 0xFF, 0x3E, 0x01, 0xE4, 0xFC, 0xF6, 0x05, 0x26, 0xF6, 0x95, - 0x10, 0x26, 0x42, 0x87, 0x02, 0x28, 0xFB, 0x37, 0x04, 0x3B, 0xFD, - 0x60, 0x01, 0x8C, 0xFF, 0x10, 0x00, 0x01, 0x00, 0xF7, 0xFF, 0xD7, - 0xFF, 0x04, 0x01, 0x0F, 0xFD, 0x3E, 0x06, 0x7D, 0xF4, 0x76, 0x17, - 0xF4, 0x3F, 0x9F, 0xFD, 0x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0xB3, - 0xFF, 0x98, 0xF9, 0x87, 0x3C, 0x88, 0x1E, 0x5A, 0xF3, 0x26, 0x06, - 0x71, 0xFD, 0xB1, 0x00, 0x04, 0x00, 0xE9, 0xFF, 0x02, 0x00, 0x11, - 0x00, 0x8B, 0xFF, 0x4A, 0x01, 0xA0, 0xFD, 0x26, 0x03, 0x7B, 0xFD, - 0x9F, 0xFD, 0xF4, 0x3F, 0x76, 0x17, 0x7D, 0xF4, 0x3E, 0x06, 0x0F, - 0xFD, 0x04, 0x01, 0xD7, 0xFF, 0xF7, 0xFF, 0x01, 0x00, 0x10, 0x00, - 0x8C, 0xFF, 0x60, 0x01, 0x3B, 0xFD, 0x37, 0x04, 0x28, 0xFB, 0x87, - 0x02, 0x26, 0x42, 0x95, 0x10, 0x26, 0xF6, 0xF6, 0x05, 0xE4, 0xFC, - 0x3E, 0x01, 0xB4, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x96, - 0xFF, 0x62, 0x01, 0xF8, 0xFC, 0x21, 0x05, 0xDD, 0xF8, 0x37, 0x08, - 0x07, 0x43, 0x19, 0x0A, 0x2F, 0xF8, 0x5D, 0x05, 0xEC, 0xFC, 0x5D, - 0x01, 0x9B, 0xFF, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, - 0xAB, 0xFF, 0x4A, 0x01, 0xE1, 0xFC, 0xCF, 0x05, 0xBE, 0xF6, 0x89, - 0x0E, 0x90, 0x42, 0x34, 0x04, 0x71, 0xFA, 0x84, 0x04, 0x22, 0xFD, - 0x63, 0x01, 0x8E, 0xFF, 0x0F, 0x00, 0x00, 0x00, 0xFB, 0xFF, 0xCB, - 0xFF, 0x19, 0x01, 0xFC, 0xFC, 0x31, 0x06, 0xF4, 0xF4, 0x51, 0x15, - 0xC3, 0x40, 0x0B, 0xFF, 0xC5, 0xFC, 0x7D, 0x03, 0x7E, 0xFD, 0x53, - 0x01, 0x8B, 0xFF, 0x11, 0x00, 0x01, 0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, 0xFD, 0x92, 0x00, 0x14, 0x00, 0xE3, 0xFF, 0x02, 0x00, 0x10, - 0x00, 0x8D, 0xFF, 0x3F, 0x01, 0xC4, 0xFD, 0xCD, 0x02, 0x2E, 0xFE, - 0x49, 0xFC, 0x06, 0x3F, 0xA1, 0x19, 0x14, 0xF4, 0x41, 0x06, 0x27, - 0xFD, 0xED, 0x00, 0xE4, 0xFF, 0xF3, 0xFF, 0x01, 0x00, 0x10, 0x00, - 0x8B, 0xFF, 0x5B, 0x01, 0x57, 0xFD, 0xE6, 0x03, 0xE0, 0xFB, 0xEE, - 0x00, 0x9C, 0x41, 0xAB, 0x12, 0x98, 0xF5, 0x16, 0x06, 0xEC, 0xFC, - 0x2F, 0x01, 0xBD, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x92, - 0xFF, 0x64, 0x01, 0x09, 0xFD, 0xDE, 0x04, 0x8E, 0xF9, 0x64, 0x06, - 0xE6, 0x42, 0x0A, 0x0C, 0x87, 0xF7, 0x94, 0x05, 0xE5, 0xFC, 0x56, - 0x01, 0xA2, 0xFF, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, - 0xA3, 0xFF, 0x54, 0x01, 0xE3, 0xFC, 0xA1, 0x05, 0x5E, 0xF7, 0x88, - 0x0C, 0xD9, 0x42, 0xF2, 0x05, 0xBB, 0xF9, 0xCD, 0x04, 0x0D, 0xFD, - 0x64, 0x01, 0x91, 0xFF, 0x0E, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xC0, - 0xFF, 0x2B, 0x01, 0xEE, 0xFC, 0x1C, 0x06, 0x75, 0xF5, 0x32, 0x13, - 0x75, 0x41, 0x8B, 0x00, 0x0E, 0xFC, 0xD2, 0x03, 0x5E, 0xFD, 0x5A, - 0x01, 0x8B, 0xFF, 0x10, 0x00, 0x01, 0x00, 0xF2, 0xFF, 0xE7, 0xFF, - 0xE7, 0x00, 0x2E, 0xFD, 0x41, 0x06, 0xFC, 0xF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F, 0x33, 0x01, 0xEB, 0xFD, 0x73, 0x02, 0xDE, 0xFE, - 0x08, 0xFB, 0xFB, 0x3D, 0xCE, 0x1B, 0xB8, 0xF3, 0x3B, 0x06, 0x45, - 0xFD, 0xD4, 0x00, 0xF2, 0xFF, 0xEF, 0xFF, 0x01, 0x00, 0x11, 0x00, - 0x8A, 0xFF, 0x55, 0x01, 0x75, 0xFD, 0x92, 0x03, 0x97, 0xFC, 0x69, - 0xFF, 0xF2, 0x40, 0xC8, 0x14, 0x13, 0xF5, 0x2D, 0x06, 0xF8, 0xFC, - 0x1E, 0x01, 0xC8, 0xFF, 0xFC, 0xFF, 0x00, 0x00, 0x0F, 0x00, 0x8F, - 0xFF, 0x64, 0x01, 0x1D, 0xFD, 0x97, 0x04, 0x43, 0xFA, 0xA1, 0x04, - 0xA5, 0x42, 0x08, 0x0E, 0xE6, 0xF6, 0xC4, 0x05, 0xE1, 0xFC, 0x4D, - 0x01, 0xA9, 0xFF, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, - 0x9D, 0xFF, 0x5C, 0x01, 0xEA, 0xFC, 0x6C, 0x05, 0x05, 0xF8, 0x94, - 0x0A, 0x03, 0x43, 0xC1, 0x07, 0x09, 0xF9, 0x10, 0x05, 0xFC, 0xFC, - 0x62, 0x01, 0x95, 0xFF, 0x0D, 0x00, 0x00, 0x00, 0x02, 0x00, 0xB6, - 0xFF, 0x3B, 0x01, 0xE5, 0xFC, 0xFF, 0x05, 0x02, 0xF6, 0x19, 0x11, - 0x06, 0x42, 0x1F, 0x02, 0x56, 0xFB, 0x23, 0x04, 0x41, 0xFD, 0x5F, - 0x01, 0x8B, 0xFF, 0x10, 0x00, 0x01, 0x00, 0xF6, 0xFF, 0xDA, 0xFF, - 0xFF, 0x00, 0x15, 0xFD, 0x40, 0x06, 0x62, 0xF4, 0x01, 0x18, 0xBB, - 0x3F, 0x47, 0xFD, 0xA8, 0xFD, 0x10, 0x03, 0xA9, 0xFD, 0x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 0xFC, 0x1D, 0x6B, 0xF3, 0x2C, 0x06, 0x67, - 0xFD, 0xB8, 0x00, 0x00, 0x00, 0xEA, 0xFF, 0x02, 0x00, 0x11, 0x00, - 0x8B, 0xFF, 0x4C, 0x01, 0x97, 0xFD, 0x3C, 0x03, 0x4D, 0xFD, 0xF8, - 0xFD, 0x2A, 0x40, 0xED, 0x16, 0x9A, 0xF4, 0x3C, 0x06, 0x0A, 0xFD, - 0x0A, 0x01, 0xD4, 0xFF, 0xF8, 0xFF, 0x01, 0x00, 0x10, 0x00, 0x8C, - 0xFF, 0x61, 0x01, 0x34, 0xFD, 0x4B, 0x04, 0xFA, 0xFA, 0xF1, 0x02, - 0x42, 0x42, 0x11, 0x10, 0x4C, 0xF6, 0xED, 0x05, 0xE3, 0xFC, 0x41, - 0x01, 0xB1, 0xFF, 0x03, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x97, 0xFF, - 0x61, 0x01, 0xF5, 0xFC, 0x30, 0x05, 0xB1, 0xF8, 0xAE, 0x08, 0x0A, - 0x43, 0x9F, 0x09, 0x5A, 0xF8, 0x4F, 0x05, 0xEF, 0xFC, 0x5F, 0x01, - 0x9A, 0xFF, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0xAD, - 0xFF, 0x48, 0x01, 0xE2, 0xFC, 0xDA, 0x05, 0x97, 0xF6, 0x0B, 0x0F, - 0x79, 0x42, 0xC7, 0x03, 0x9E, 0xFA, 0x71, 0x04, 0x28, 0xFD, 0x63, - 0x01, 0x8D, 0xFF, 0x0F, 0x00 -}; - -static u16 -CoefficientSizes[] = { - /* Playback */ - 0x00C0, 0x5000, 0x0060, 0x2800, 0x0040, 0x0060, 0x1400, 0x0000, - /* Record */ - 0x0020, 0x1260, 0x0020, 0x1260, 0x0000, 0x0040, 0x1260, 0x0000, -}; - -#ifndef JUST_DATA - -static u16 -nm256_getStartOffset (u8 which) -{ - u16 offset = 0; - - while (which-- > 0) - offset += CoefficientSizes[which]; - - return offset; -} - -static void -nm256_loadOneCoefficient (struct nm256_info *card, int devnum, u32 port, - u16 which) -{ - u32 coeffBuf = (which < 8) ? card->coeffBuf : card->allCoeffBuf; - u16 offset = nm256_getStartOffset (which); - u16 size = CoefficientSizes[which]; - - card->coeffsCurrent = 0; - - if (nm256_debug) - printk (KERN_INFO "NM256: Loading coefficient buffer 0x%x-0x%x with coefficient %d, size %d, port 0x%x\n", - coeffBuf, coeffBuf + size - 1, which, size, port); - nm256_writeBuffer8 (card, coefficients + offset, 1, coeffBuf, size); - nm256_writePort32 (card, 2, port + 0, coeffBuf); - /* ??? Record seems to behave differently than playback. */ - if (devnum == 0) - size--; - nm256_writePort32 (card, 2, port + 4, coeffBuf + size); -} - -static void -nm256_loadAllCoefficients (struct nm256_info *card) -{ - nm256_writeBuffer8 (card, coefficients, 1, card->allCoeffBuf, - NM_TOTAL_COEFF_COUNT * 4); - card->coeffsCurrent = 1; -} - -static void -nm256_loadCoefficient (struct nm256_info *card, int which, int number) -{ - static u16 addrs[3] = { 0x1c, 0x21c, 0x408 }; - /* The enable register for the specified engine. */ - u32 poffset = (which == 1 ? 0x200 : 1); - - if (nm256_readPort8 (card, 2, poffset) & 1) { - printk (KERN_ERR "NM256: Engine was enabled while loading coefficients!\n"); - return; - } - - /* The recording engine uses coefficient values 8-15. */ - if (which == 1) - number += 8; - - if (! nm256_cachedCoefficients (card)) - nm256_loadOneCoefficient (card, which, addrs[which], number); - else { - u32 base = card->allCoeffBuf; - u32 offset = nm256_getStartOffset (number); - u32 endOffset = offset + CoefficientSizes[number]; - - if (nm256_debug) - printk (KERN_DEBUG "loading coefficient %d at port 0x%x, offset %d (0x%x-0x%x)\n", - number, addrs[which], offset, base + offset, - base + endOffset - 1); - - if (! card->coeffsCurrent) - nm256_loadAllCoefficients (card); - - nm256_writePort32 (card, 2, addrs[which], base + offset); - nm256_writePort32 (card, 2, addrs[which] + 4, base + endOffset - 1); - } -} - -#endif /* JUST_DATA */ - -#endif - -/* - * Local variables: - * c-basic-offset: 4 - * End: - */ diff --git a/sound/oss/opl3.c b/sound/oss/opl3.c index fc273e550944..7781c13c1476 100644 --- a/sound/oss/opl3.c +++ b/sound/oss/opl3.c @@ -34,7 +34,6 @@ #include "sound_config.h" -#include "opl3.h" #include "opl3_hw.h" #define MAX_VOICE 18 @@ -73,7 +72,6 @@ typedef struct opl_devinfo unsigned char cmask; int is_opl4; - int *osp; } opl_devinfo; static struct opl_devinfo *devc = NULL; @@ -144,7 +142,7 @@ static int opl3_ioctl(int dev, unsigned int cmd, void __user * arg) } } -int opl3_detect(int ioaddr, int *osp) +static int opl3_detect(int ioaddr) { /* * This function returns 1 if the FM chip is present at the given I/O port @@ -182,7 +180,6 @@ int opl3_detect(int ioaddr, int *osp) goto cleanup_devc; } - devc->osp = osp; devc->base = ioaddr; /* Reset timers 1 and 2 */ @@ -1105,7 +1102,7 @@ static struct synth_operations opl3_operations = .setup_voice = opl3_setup_voice }; -int opl3_init(int ioaddr, int *osp, struct module *owner) +static int opl3_init(int ioaddr, struct module *owner) { int i; int me; @@ -1194,9 +1191,6 @@ int opl3_init(int ioaddr, int *osp, struct module *owner) return me; } -EXPORT_SYMBOL(opl3_init); -EXPORT_SYMBOL(opl3_detect); - static int me; static int io = -1; @@ -1209,12 +1203,12 @@ static int __init init_opl3 (void) if (io != -1) /* User loading pure OPL3 module */ { - if (!opl3_detect(io, NULL)) + if (!opl3_detect(io)) { return -ENODEV; } - me = opl3_init(io, NULL, THIS_MODULE); + me = opl3_init(io, THIS_MODULE); } return 0; diff --git a/sound/oss/opl3.h b/sound/oss/opl3.h deleted file mode 100644 index 0bc9a4bcda13..000000000000 --- a/sound/oss/opl3.h +++ /dev/null @@ -1,5 +0,0 @@ - -int opl3_detect (int ioaddr, int *osp); -int opl3_init(int ioaddr, int *osp, struct module *owner); - -void enable_opl3_mode(int left, int right, int both); diff --git a/sound/oss/opl3sa2.c b/sound/oss/opl3sa2.c deleted file mode 100644 index e20051f1be4d..000000000000 --- a/sound/oss/opl3sa2.c +++ /dev/null @@ -1,1020 +0,0 @@ -/* - * sound/oss/opl3sa2.c - * - * A low level driver for Yamaha OPL3-SA2 and SA3 cards. - * NOTE: All traces of the name OPL3-SAx have now (December 2000) been - * removed from the driver code, as an email exchange with Yamaha - * provided the information that the YMF-719 is indeed just a - * re-badged 715. - * - * Copyright 1998-2001 Scott Murray - * - * Originally based on the CS4232 driver (in cs4232.c) by Hannu Savolainen - * and others. Now incorporates code/ideas from pss.c, also by Hannu - * Savolainen. Both of those files are distributed with the following - * license: - * - * "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." - * - * As such, in accordance with the above license, this file, opl3sa2.c, is - * distributed under the GNU GENERAL PUBLIC LICENSE (GPL) Version 2 (June 1991). - * See the "COPYING" file distributed with this software for more information. - * - * Change History - * -------------- - * Scott Murray Original driver (Jun 14, 1998) - * Paul J.Y. Lahaie Changed probing / attach code order - * Scott Murray Added mixer support (Dec 03, 1998) - * Scott Murray Changed detection code to be more forgiving, - * added force option as last resort, - * fixed ioctl return values. (Dec 30, 1998) - * Scott Murray Simpler detection code should work all the time now - * (with thanks to Ben Hutchings for the heuristic), - * removed now unnecessary force option. (Jan 5, 1999) - * Christoph Hellwig Adapted to module_init/module_exit (Mar 4, 2000) - * Scott Murray Reworked SA2 versus SA3 mixer code, updated chipset - * version detection code (again!). (Dec 5, 2000) - * Scott Murray Adjusted master volume mixer scaling. (Dec 6, 2000) - * Scott Murray Based on a patch by Joel Yliluoma (aka Bisqwit), - * integrated wide mixer and adjusted mic, bass, treble - * scaling. (Dec 6, 2000) - * Scott Murray Based on a patch by Peter Englmaier, integrated - * ymode and loopback options. (Dec 6, 2000) - * Scott Murray Inspired by a patch by Peter Englmaier, and based on - * what ALSA does, added initialization code for the - * default DMA and IRQ settings. (Dec 6, 2000) - * Scott Murray Added some more checks to the card detection code, - * based on what ALSA does. (Dec 12, 2000) - * Scott Murray Inspired by similar patches from John Fremlin, - * Jim Radford, Mike Rolig, and Ingmar Steen, added 2.4 - * ISA PnP API support, mainly based on bits from - * sb_card.c and awe_wave.c. (Dec 12, 2000) - * Scott Murray Some small cleanups to the init code output. - * (Jan 7, 2001) - * Zwane Mwaikambo Added PM support. (Dec 4 2001) - * - * Adam Belay Converted driver to new PnP Layer (Oct 12, 2002) - * Zwane Mwaikambo Code, data structure cleanups. (Feb 15 2002) - * Zwane Mwaikambo Free resources during auxiliary device probe - * failures (Apr 29 2002) - * - */ - -#include -#include -#include -#include -#include "sound_config.h" - -#include "ad1848.h" -#include "mpu401.h" - -#define OPL3SA2_MODULE_NAME "opl3sa2" -#define PFX OPL3SA2_MODULE_NAME ": " - -/* Useful control port indexes: */ -#define OPL3SA2_PM 0x01 -#define OPL3SA2_SYS_CTRL 0x02 -#define OPL3SA2_IRQ_CONFIG 0x03 -#define OPL3SA2_DMA_CONFIG 0x06 -#define OPL3SA2_MASTER_LEFT 0x07 -#define OPL3SA2_MASTER_RIGHT 0x08 -#define OPL3SA2_MIC 0x09 -#define OPL3SA2_MISC 0x0A - -#define OPL3SA3_WIDE 0x14 -#define OPL3SA3_BASS 0x15 -#define OPL3SA3_TREBLE 0x16 - -/* Useful constants: */ -#define DEFAULT_VOLUME 50 -#define DEFAULT_MIC 50 -#define DEFAULT_TIMBRE 0 - -/* Power saving modes */ -#define OPL3SA2_PM_MODE0 0x00 -#define OPL3SA2_PM_MODE1 0x04 /* PSV */ -#define OPL3SA2_PM_MODE2 0x05 /* PSV | PDX */ -#define OPL3SA2_PM_MODE3 0x27 /* ADOWN | PSV | PDN | PDX */ - - -/* For checking against what the card returns: */ -#define VERSION_UNKNOWN 0 -#define VERSION_YMF711 1 -#define VERSION_YMF715 2 -#define VERSION_YMF715B 3 -#define VERSION_YMF715E 4 -/* also assuming that anything > 4 but <= 7 is a 715E */ - -/* Chipset type constants for use below */ -#define CHIPSET_UNKNOWN -1 -#define CHIPSET_OPL3SA2 0 -#define CHIPSET_OPL3SA3 1 -static const char *CHIPSET_TABLE[] = {"OPL3-SA2", "OPL3-SA3"}; - -#ifdef CONFIG_PNP -#define OPL3SA2_CARDS_MAX 4 -#else -#define OPL3SA2_CARDS_MAX 1 -#endif - -/* This should be pretty obvious */ -static int opl3sa2_cards_num; - -typedef struct { - /* device resources */ - unsigned short cfg_port; - struct address_info cfg; - struct address_info cfg_mss; - struct address_info cfg_mpu; -#ifdef CONFIG_PNP - /* PnP Stuff */ - struct pnp_dev* pdev; - int activated; /* Whether said devices have been activated */ -#endif - unsigned int card; - int chipset; /* What's my version(s)? */ - char *chipset_name; - - /* mixer data */ - int mixer; - unsigned int volume_l; - unsigned int volume_r; - unsigned int mic; - unsigned int bass_l; - unsigned int bass_r; - unsigned int treble_l; - unsigned int treble_r; - unsigned int wide_l; - unsigned int wide_r; -} opl3sa2_state_t; -static opl3sa2_state_t opl3sa2_state[OPL3SA2_CARDS_MAX]; - - - -/* Our parameters */ -static int __initdata io = -1; -static int __initdata mss_io = -1; -static int __initdata mpu_io = -1; -static int __initdata irq = -1; -static int __initdata dma = -1; -static int __initdata dma2 = -1; -static int __initdata ymode = -1; -static int __initdata loopback = -1; - -#ifdef CONFIG_PNP -/* PnP specific parameters */ -static int __initdata isapnp = 1; -static int __initdata multiple = 1; - -/* Whether said devices have been activated */ -static int opl3sa2_activated[OPL3SA2_CARDS_MAX]; -#else -static int __initdata isapnp; /* = 0 */ -static int __initdata multiple; /* = 0 */ -#endif - -MODULE_DESCRIPTION("Module for OPL3-SA2 and SA3 sound cards (uses AD1848 MSS driver)."); -MODULE_AUTHOR("Scott Murray "); -MODULE_LICENSE("GPL"); - - -module_param(io, int, 0); -MODULE_PARM_DESC(io, "Set I/O base of OPL3-SA2 or SA3 card (usually 0x370. Address must be even and must be from 0x100 to 0xFFE)"); - -module_param(mss_io, int, 0); -MODULE_PARM_DESC(mss_io, "Set MSS (audio) I/O base (0x530, 0xE80, or other. Address must end in 0 or 4 and must be from 0x530 to 0xF48)"); - -module_param(mpu_io, int, 0); -MODULE_PARM_DESC(mpu_io, "Set MIDI I/O base (0x330 or other. Address must be even and must be from 0x300 to 0x334)"); - -module_param(irq, int, 0); -MODULE_PARM_DESC(irq, "Set MSS (audio) IRQ (5, 7, 9, 10, 11, 12)"); - -module_param(dma, int, 0); -MODULE_PARM_DESC(dma, "Set MSS (audio) first DMA channel (0, 1, 3)"); - -module_param(dma2, int, 0); -MODULE_PARM_DESC(dma2, "Set MSS (audio) second DMA channel (0, 1, 3)"); - -module_param(ymode, int, 0); -MODULE_PARM_DESC(ymode, "Set Yamaha 3D enhancement mode (0 = Desktop/Normal, 1 = Notebook PC (1), 2 = Notebook PC (2), 3 = Hi-Fi)"); - -module_param(loopback, int, 0); -MODULE_PARM_DESC(loopback, "Set A/D input source. Useful for echo cancellation (0 = Mic Rch (default), 1 = Mono output loopback)"); - -#ifdef CONFIG_PNP -module_param(isapnp, bool, 0); -MODULE_PARM_DESC(isapnp, "When set to 0, ISA PnP support will be disabled"); - -module_param(multiple, bool, 0); -MODULE_PARM_DESC(multiple, "When set to 0, will not search for multiple cards"); -#endif - - -/* - * Standard read and write functions -*/ - -static inline void opl3sa2_write(unsigned short port, - unsigned char index, - unsigned char data) -{ - outb_p(index, port); - outb(data, port + 1); -} - - -static inline void opl3sa2_read(unsigned short port, - unsigned char index, - unsigned char* data) -{ - outb_p(index, port); - *data = inb(port + 1); -} - - -/* - * All of the mixer functions... - */ - -static void opl3sa2_set_volume(opl3sa2_state_t* devc, int left, int right) -{ - static unsigned char scale[101] = { - 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0f, 0x0e, 0x0e, 0x0e, - 0x0e, 0x0e, 0x0e, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0d, 0x0c, - 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0b, 0x0b, 0x0b, 0x0b, - 0x0b, 0x0b, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x09, 0x09, - 0x09, 0x09, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x08, 0x08, - 0x08, 0x07, 0x07, 0x07, 0x07, 0x07, 0x07, 0x06, 0x06, 0x06, - 0x06, 0x06, 0x06, 0x06, 0x05, 0x05, 0x05, 0x05, 0x05, 0x05, - 0x04, 0x04, 0x04, 0x04, 0x04, 0x04, 0x03, 0x03, 0x03, 0x03, - 0x03, 0x03, 0x03, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x01, - 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00 - }; - unsigned char vol; - - vol = scale[left]; - - /* If level is zero, turn on mute */ - if(!left) - vol |= 0x80; - - opl3sa2_write(devc->cfg_port, OPL3SA2_MASTER_LEFT, vol); - - vol = scale[right]; - - /* If level is zero, turn on mute */ - if(!right) - vol |= 0x80; - - opl3sa2_write(devc->cfg_port, OPL3SA2_MASTER_RIGHT, vol); -} - - -static void opl3sa2_set_mic(opl3sa2_state_t* devc, int level) -{ - unsigned char vol = 0x1F; - - if((level >= 0) && (level <= 100)) - vol = 0x1F - (unsigned char) (32 * level / 101); - - /* If level is zero, turn on mute */ - if(!level) - vol |= 0x80; - - opl3sa2_write(devc->cfg_port, OPL3SA2_MIC, vol); -} - - -static void opl3sa3_set_bass(opl3sa2_state_t* devc, int left, int right) -{ - unsigned char bass; - - bass = left ? ((unsigned char) (8 * left / 101)) : 0; - bass |= (right ? ((unsigned char) (8 * right / 101)) : 0) << 4; - - opl3sa2_write(devc->cfg_port, OPL3SA3_BASS, bass); -} - - -static void opl3sa3_set_treble(opl3sa2_state_t* devc, int left, int right) -{ - unsigned char treble; - - treble = left ? ((unsigned char) (8 * left / 101)) : 0; - treble |= (right ? ((unsigned char) (8 * right / 101)) : 0) << 4; - - opl3sa2_write(devc->cfg_port, OPL3SA3_TREBLE, treble); -} - - - - -static void opl3sa2_mixer_reset(opl3sa2_state_t* devc) -{ - if (devc) { - opl3sa2_set_volume(devc, DEFAULT_VOLUME, DEFAULT_VOLUME); - devc->volume_l = devc->volume_r = DEFAULT_VOLUME; - - opl3sa2_set_mic(devc, DEFAULT_MIC); - devc->mic = DEFAULT_MIC; - - if (devc->chipset == CHIPSET_OPL3SA3) { - opl3sa3_set_bass(devc, DEFAULT_TIMBRE, DEFAULT_TIMBRE); - devc->bass_l = devc->bass_r = DEFAULT_TIMBRE; - opl3sa3_set_treble(devc, DEFAULT_TIMBRE, DEFAULT_TIMBRE); - devc->treble_l = devc->treble_r = DEFAULT_TIMBRE; - } - } -} - -static inline void arg_to_vol_mono(unsigned int vol, int* value) -{ - int left; - - left = vol & 0x00ff; - if (left > 100) - left = 100; - *value = left; -} - - -static inline void arg_to_vol_stereo(unsigned int vol, int* aleft, int* aright) -{ - arg_to_vol_mono(vol, aleft); - arg_to_vol_mono(vol >> 8, aright); -} - - -static inline int ret_vol_mono(int vol) -{ - return ((vol << 8) | vol); -} - - -static inline int ret_vol_stereo(int left, int right) -{ - return ((right << 8) | left); -} - - -static int opl3sa2_mixer_ioctl(int dev, unsigned int cmd, void __user *arg) -{ - int retval, value, cmdf = cmd & 0xff; - int __user *p = (int __user *)arg; - - opl3sa2_state_t* devc = &opl3sa2_state[dev]; - - switch (cmdf) { - case SOUND_MIXER_VOLUME: - case SOUND_MIXER_MIC: - case SOUND_MIXER_DEVMASK: - case SOUND_MIXER_STEREODEVS: - case SOUND_MIXER_RECMASK: - case SOUND_MIXER_RECSRC: - case SOUND_MIXER_CAPS: - break; - - default: - return -EINVAL; - } - - if (((cmd >> 8) & 0xff) != 'M') - return -EINVAL; - - retval = 0; - if (_SIOC_DIR (cmd) & _SIOC_WRITE) { - switch (cmdf) { - case SOUND_MIXER_VOLUME: - retval = get_user(value, (unsigned __user *) arg); - if (retval) - break; - arg_to_vol_stereo(value, &devc->volume_l, &devc->volume_r); - opl3sa2_set_volume(devc, devc->volume_l, devc->volume_r); - value = ret_vol_stereo(devc->volume_l, devc->volume_r); - retval = put_user(value, p); - break; - - case SOUND_MIXER_MIC: - retval = get_user(value, (unsigned __user *) arg); - if (retval) - break; - arg_to_vol_mono(value, &devc->mic); - opl3sa2_set_mic(devc, devc->mic); - value = ret_vol_mono(devc->mic); - retval = put_user(value, p); - break; - - default: - retval = -EINVAL; - } - } - else { - /* - * Return parameters - */ - switch (cmdf) { - case SOUND_MIXER_DEVMASK: - retval = put_user(SOUND_MASK_VOLUME | SOUND_MASK_MIC, p); - break; - - case SOUND_MIXER_STEREODEVS: - retval = put_user(SOUND_MASK_VOLUME, p); - break; - - case SOUND_MIXER_RECMASK: - /* No recording devices */ - retval = put_user(0, p); - break; - - case SOUND_MIXER_CAPS: - retval = put_user(SOUND_CAP_EXCL_INPUT, p); - break; - - case SOUND_MIXER_RECSRC: - /* No recording source */ - retval = put_user(0, p); - break; - - case SOUND_MIXER_VOLUME: - value = ret_vol_stereo(devc->volume_l, devc->volume_r); - retval = put_user(value, p); - break; - - case SOUND_MIXER_MIC: - value = ret_vol_mono(devc->mic); - put_user(value, p); - break; - - default: - retval = -EINVAL; - } - } - return retval; -} -/* opl3sa2_mixer_ioctl end */ - - -static int opl3sa3_mixer_ioctl(int dev, unsigned int cmd, void __user * arg) -{ - int value, retval, cmdf = cmd & 0xff; - - opl3sa2_state_t* devc = &opl3sa2_state[dev]; - - switch (cmdf) { - case SOUND_MIXER_BASS: - value = ret_vol_stereo(devc->bass_l, devc->bass_r); - retval = put_user(value, (int __user *) arg); - break; - - case SOUND_MIXER_TREBLE: - value = ret_vol_stereo(devc->treble_l, devc->treble_r); - retval = put_user(value, (int __user *) arg); - break; - - case SOUND_MIXER_DIGITAL1: - value = ret_vol_stereo(devc->wide_l, devc->wide_r); - retval = put_user(value, (int __user *) arg); - break; - - default: - retval = -EINVAL; - } - return retval; -} -/* opl3sa3_mixer_ioctl end */ - - -static struct mixer_operations opl3sa2_mixer_operations = -{ - .owner = THIS_MODULE, - .id = "OPL3-SA2", - .name = "Yamaha OPL3-SA2", - .ioctl = opl3sa2_mixer_ioctl -}; - -static struct mixer_operations opl3sa3_mixer_operations = -{ - .owner = THIS_MODULE, - .id = "OPL3-SA3", - .name = "Yamaha OPL3-SA3", - .ioctl = opl3sa3_mixer_ioctl -}; - -/* End of mixer-related stuff */ - - -/* - * Component probe, attach, unload functions - */ - -static inline void __exit unload_opl3sa2_mpu(struct address_info *hw_config) -{ - unload_mpu401(hw_config); -} - - -static void __init attach_opl3sa2_mss(struct address_info* hw_config, struct resource *ports) -{ - int initial_mixers; - - initial_mixers = num_mixers; - attach_ms_sound(hw_config, ports, THIS_MODULE); /* Slot 0 */ - if (hw_config->slots[0] != -1) { - /* Did the MSS driver install? */ - if(num_mixers == (initial_mixers + 1)) { - /* The MSS mixer is installed, reroute mixers appropriately */ - AD1848_REROUTE(SOUND_MIXER_LINE1, SOUND_MIXER_CD); - AD1848_REROUTE(SOUND_MIXER_LINE2, SOUND_MIXER_SYNTH); - AD1848_REROUTE(SOUND_MIXER_LINE3, SOUND_MIXER_LINE); - } - else { - printk(KERN_ERR PFX "MSS mixer not installed?\n"); - } - } -} - - -static inline void __exit unload_opl3sa2_mss(struct address_info* hw_config) -{ - unload_ms_sound(hw_config); -} - - -static int __init probe_opl3sa2(struct address_info* hw_config, int card) -{ - unsigned char misc; - unsigned char tmp; - unsigned char version; - - /* - * Try and allocate our I/O port range. - */ - if (!request_region(hw_config->io_base, 2, OPL3SA2_MODULE_NAME)) { - printk(KERN_ERR PFX "Control I/O port %#x not free\n", - hw_config->io_base); - goto out_nodev; - } - - /* - * Check if writing to the read-only version bits of the miscellaneous - * register succeeds or not (it should not). - */ - opl3sa2_read(hw_config->io_base, OPL3SA2_MISC, &misc); - opl3sa2_write(hw_config->io_base, OPL3SA2_MISC, misc ^ 0x07); - opl3sa2_read(hw_config->io_base, OPL3SA2_MISC, &tmp); - if(tmp != misc) { - printk(KERN_ERR PFX "Control I/O port %#x is not a YMF7xx chipset!\n", - hw_config->io_base); - goto out_region; - } - - /* - * Check if the MIC register is accessible. - */ - opl3sa2_read(hw_config->io_base, OPL3SA2_MIC, &tmp); - opl3sa2_write(hw_config->io_base, OPL3SA2_MIC, 0x8a); - opl3sa2_read(hw_config->io_base, OPL3SA2_MIC, &tmp); - if((tmp & 0x9f) != 0x8a) { - printk(KERN_ERR - PFX "Control I/O port %#x is not a YMF7xx chipset!\n", - hw_config->io_base); - goto out_region; - } - opl3sa2_write(hw_config->io_base, OPL3SA2_MIC, tmp); - - /* - * Determine chipset type (SA2 or SA3) - * - * This is done by looking at the chipset version in the lower 3 bits - * of the miscellaneous register. - */ - version = misc & 0x07; - printk(KERN_DEBUG PFX "Chipset version = %#x\n", version); - switch (version) { - case 0: - opl3sa2_state[card].chipset = CHIPSET_UNKNOWN; - printk(KERN_ERR - PFX "Unknown Yamaha audio controller version\n"); - break; - - case VERSION_YMF711: - opl3sa2_state[card].chipset = CHIPSET_OPL3SA2; - printk(KERN_INFO PFX "Found OPL3-SA2 (YMF711)\n"); - break; - - case VERSION_YMF715: - opl3sa2_state[card].chipset = CHIPSET_OPL3SA3; - printk(KERN_INFO - PFX "Found OPL3-SA3 (YMF715 or YMF719)\n"); - break; - - case VERSION_YMF715B: - opl3sa2_state[card].chipset = CHIPSET_OPL3SA3; - printk(KERN_INFO - PFX "Found OPL3-SA3 (YMF715B or YMF719B)\n"); - break; - - case VERSION_YMF715E: - default: - opl3sa2_state[card].chipset = CHIPSET_OPL3SA3; - printk(KERN_INFO - PFX "Found OPL3-SA3 (YMF715E or YMF719E)\n"); - break; - } - - if (opl3sa2_state[card].chipset != CHIPSET_UNKNOWN) { - /* Generate a pretty name */ - opl3sa2_state[card].chipset_name = (char *)CHIPSET_TABLE[opl3sa2_state[card].chipset]; - return 0; - } - -out_region: - release_region(hw_config->io_base, 2); -out_nodev: - return -ENODEV; -} - - -static void __init attach_opl3sa2(struct address_info* hw_config, int card) -{ - /* Initialize IRQ configuration to IRQ-B: -, IRQ-A: WSS+MPU+OPL3 */ - opl3sa2_write(hw_config->io_base, OPL3SA2_IRQ_CONFIG, 0x0d); - - /* Initialize DMA configuration */ - if(hw_config->dma2 == hw_config->dma) { - /* Want DMA configuration DMA-B: -, DMA-A: WSS-P+WSS-R */ - opl3sa2_write(hw_config->io_base, OPL3SA2_DMA_CONFIG, 0x03); - } - else { - /* Want DMA configuration DMA-B: WSS-R, DMA-A: WSS-P */ - opl3sa2_write(hw_config->io_base, OPL3SA2_DMA_CONFIG, 0x21); - } -} - - -static void __init attach_opl3sa2_mixer(struct address_info *hw_config, int card) -{ - struct mixer_operations* mixer_operations; - opl3sa2_state_t* devc = &opl3sa2_state[card]; - - /* Install master mixer */ - if (devc->chipset == CHIPSET_OPL3SA3) { - mixer_operations = &opl3sa3_mixer_operations; - } - else { - mixer_operations = &opl3sa2_mixer_operations; - } - - devc->cfg_port = hw_config->io_base; - devc->mixer = sound_install_mixer(MIXER_DRIVER_VERSION, - mixer_operations->name, - mixer_operations, - sizeof(struct mixer_operations), - devc); - if(devc->mixer < 0) { - printk(KERN_ERR PFX "Could not install %s master mixer\n", - mixer_operations->name); - } - else { - opl3sa2_mixer_reset(devc); - - } -} - - -static void opl3sa2_clear_slots(struct address_info* hw_config) -{ - int i; - - for(i = 0; i < 6; i++) { - hw_config->slots[i] = -1; - } -} - - -static void __init opl3sa2_set_ymode(struct address_info* hw_config, int ymode) -{ - /* - * Set the Yamaha 3D enhancement mode (aka Ymersion) if asked to and - * it's supported. - * - * 0: Desktop (aka normal) 5-12 cm speakers - * 1: Notebook PC mode 1 3 cm speakers - * 2: Notebook PC mode 2 1.5 cm speakers - * 3: Hi-fi 16-38 cm speakers - */ - if(ymode >= 0 && ymode <= 3) { - unsigned char sys_ctrl; - - opl3sa2_read(hw_config->io_base, OPL3SA2_SYS_CTRL, &sys_ctrl); - sys_ctrl = (sys_ctrl & 0xcf) | ((ymode & 3) << 4); - opl3sa2_write(hw_config->io_base, OPL3SA2_SYS_CTRL, sys_ctrl); - } - else { - printk(KERN_ERR PFX "not setting ymode, it must be one of 0,1,2,3\n"); - } -} - - -static void __init opl3sa2_set_loopback(struct address_info* hw_config, int loopback) -{ - if(loopback >= 0 && loopback <= 1) { - unsigned char misc; - - opl3sa2_read(hw_config->io_base, OPL3SA2_MISC, &misc); - misc = (misc & 0xef) | ((loopback & 1) << 4); - opl3sa2_write(hw_config->io_base, OPL3SA2_MISC, misc); - } - else { - printk(KERN_ERR PFX "not setting loopback, it must be either 0 or 1\n"); - } -} - - -static void __exit unload_opl3sa2(struct address_info* hw_config, int card) -{ - /* Release control ports */ - release_region(hw_config->io_base, 2); - - /* Unload mixer */ - if(opl3sa2_state[card].mixer >= 0) - sound_unload_mixerdev(opl3sa2_state[card].mixer); - -} - -#ifdef CONFIG_PNP -static struct pnp_device_id pnp_opl3sa2_list[] = { - {.id = "YMH0021", .driver_data = 0}, - {.id = ""} -}; - -MODULE_DEVICE_TABLE(pnp, pnp_opl3sa2_list); - -static int opl3sa2_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) -{ - int card = opl3sa2_cards_num; - - /* we don't actually want to return an error as the user may have specified - * no multiple card search - */ - - if (opl3sa2_cards_num == OPL3SA2_CARDS_MAX) - return 0; - opl3sa2_activated[card] = 1; - - /* Our own config: */ - opl3sa2_state[card].cfg.io_base = pnp_port_start(dev, 4); - opl3sa2_state[card].cfg.irq = pnp_irq(dev, 0); - opl3sa2_state[card].cfg.dma = pnp_dma(dev, 0); - opl3sa2_state[card].cfg.dma2 = pnp_dma(dev, 1); - - /* The MSS config: */ - opl3sa2_state[card].cfg_mss.io_base = pnp_port_start(dev, 1); - opl3sa2_state[card].cfg_mss.irq = pnp_irq(dev, 0); - opl3sa2_state[card].cfg_mss.dma = pnp_dma(dev, 0); - opl3sa2_state[card].cfg_mss.dma2 = pnp_dma(dev, 1); - opl3sa2_state[card].cfg_mss.card_subtype = 1; /* No IRQ or DMA setup */ - - opl3sa2_state[card].cfg_mpu.io_base = pnp_port_start(dev, 3); - opl3sa2_state[card].cfg_mpu.irq = pnp_irq(dev, 0); - opl3sa2_state[card].cfg_mpu.dma = -1; - opl3sa2_state[card].cfg_mpu.dma2 = -1; - opl3sa2_state[card].cfg_mpu.always_detect = 1; /* It's there, so use shared IRQs */ - - /* Call me paranoid: */ - opl3sa2_clear_slots(&opl3sa2_state[card].cfg); - opl3sa2_clear_slots(&opl3sa2_state[card].cfg_mss); - opl3sa2_clear_slots(&opl3sa2_state[card].cfg_mpu); - - opl3sa2_state[card].pdev = dev; - opl3sa2_cards_num++; - - return 0; -} - -static struct pnp_driver opl3sa2_driver = { - .name = "opl3sa2", - .id_table = pnp_opl3sa2_list, - .probe = opl3sa2_pnp_probe, -}; - -#endif /* CONFIG_PNP */ - -/* End of component functions */ - -/* - * Install OPL3-SA2 based card(s). - * - * Need to have ad1848 and mpu401 loaded ready. - */ -static int __init init_opl3sa2(void) -{ - int card, max; - - /* Sanitize isapnp and multiple settings */ - isapnp = isapnp != 0 ? 1 : 0; - multiple = multiple != 0 ? 1 : 0; - - max = (multiple && isapnp) ? OPL3SA2_CARDS_MAX : 1; - -#ifdef CONFIG_PNP - if (isapnp){ - pnp_register_driver(&opl3sa2_driver); - if(!opl3sa2_cards_num){ - printk(KERN_INFO PFX "No PnP cards found\n"); - isapnp = 0; - } - max = opl3sa2_cards_num; - } -#endif - - for (card = 0; card < max; card++) { - /* If a user wants an I/O then assume they meant it */ - struct resource *ports; - int base; - - if (!isapnp) { - if (io == -1 || irq == -1 || dma == -1 || - dma2 == -1 || mss_io == -1) { - printk(KERN_ERR - PFX "io, mss_io, irq, dma, and dma2 must be set\n"); - return -EINVAL; - } - opl3sa2_cards_num++; - - /* - * Our own config: - * (NOTE: IRQ and DMA aren't used, so they're set to - * give pretty output from conf_printf. :) - */ - opl3sa2_state[card].cfg.io_base = io; - opl3sa2_state[card].cfg.irq = irq; - opl3sa2_state[card].cfg.dma = dma; - opl3sa2_state[card].cfg.dma2 = dma2; - - /* The MSS config: */ - opl3sa2_state[card].cfg_mss.io_base = mss_io; - opl3sa2_state[card].cfg_mss.irq = irq; - opl3sa2_state[card].cfg_mss.dma = dma; - opl3sa2_state[card].cfg_mss.dma2 = dma2; - opl3sa2_state[card].cfg_mss.card_subtype = 1; /* No IRQ or DMA setup */ - - opl3sa2_state[card].cfg_mpu.io_base = mpu_io; - opl3sa2_state[card].cfg_mpu.irq = irq; - opl3sa2_state[card].cfg_mpu.dma = -1; - opl3sa2_state[card].cfg_mpu.always_detect = 1; /* Use shared IRQs */ - - /* Call me paranoid: */ - opl3sa2_clear_slots(&opl3sa2_state[card].cfg); - opl3sa2_clear_slots(&opl3sa2_state[card].cfg_mss); - opl3sa2_clear_slots(&opl3sa2_state[card].cfg_mpu); - } - - /* FIXME: leak */ - if (probe_opl3sa2(&opl3sa2_state[card].cfg, card)) - return -ENODEV; - - base = opl3sa2_state[card].cfg_mss.io_base; - - if (!request_region(base, 4, "WSS config")) - goto failed; - - ports = request_region(base + 4, 4, "ad1848"); - if (!ports) - goto failed2; - - if (!probe_ms_sound(&opl3sa2_state[card].cfg_mss, ports)) { - /* - * If one or more cards are already registered, don't - * return an error but print a warning. Note, this - * should never really happen unless the hardware or - * ISA PnP screwed up. - */ - release_region(base + 4, 4); - failed2: - release_region(base, 4); - failed: - release_region(opl3sa2_state[card].cfg.io_base, 2); - - if (opl3sa2_cards_num) { - printk(KERN_WARNING - PFX "There was a problem probing one " - " of the ISA PNP cards, continuing\n"); - opl3sa2_cards_num--; - continue; - } else - return -ENODEV; - } - - attach_opl3sa2(&opl3sa2_state[card].cfg, card); - conf_printf(opl3sa2_state[card].chipset_name, &opl3sa2_state[card].cfg); - attach_opl3sa2_mixer(&opl3sa2_state[card].cfg, card); - attach_opl3sa2_mss(&opl3sa2_state[card].cfg_mss, ports); - - /* ewww =) */ - opl3sa2_state[card].card = card; - - /* - * Set the Yamaha 3D enhancement mode (aka Ymersion) if asked to and - * it's supported. - */ - if (ymode != -1) { - if (opl3sa2_state[card].chipset == CHIPSET_OPL3SA2) { - printk(KERN_ERR - PFX "ymode not supported on OPL3-SA2\n"); - } - else { - opl3sa2_set_ymode(&opl3sa2_state[card].cfg, ymode); - } - } - - - /* Set A/D input to Mono loopback if asked to. */ - if (loopback != -1) { - opl3sa2_set_loopback(&opl3sa2_state[card].cfg, loopback); - } - - /* Attach MPU if we've been asked to do so, failure isn't fatal */ - if (opl3sa2_state[card].cfg_mpu.io_base != -1) { - int base = opl3sa2_state[card].cfg_mpu.io_base; - struct resource *ports; - ports = request_region(base, 2, "mpu401"); - if (!ports) - goto out; - if (!probe_mpu401(&opl3sa2_state[card].cfg_mpu, ports)) { - release_region(base, 2); - goto out; - } - if (attach_mpu401(&opl3sa2_state[card].cfg_mpu, THIS_MODULE)) { - printk(KERN_ERR PFX "failed to attach MPU401\n"); - opl3sa2_state[card].cfg_mpu.slots[1] = -1; - } - } - } - -out: - if (isapnp) { - printk(KERN_NOTICE PFX "%d PnP card(s) found.\n", opl3sa2_cards_num); - } - - return 0; -} - - -/* - * Uninstall OPL3-SA2 based card(s). - */ -static void __exit cleanup_opl3sa2(void) -{ - int card; - - for(card = 0; card < opl3sa2_cards_num; card++) { - if (opl3sa2_state[card].cfg_mpu.slots[1] != -1) { - unload_opl3sa2_mpu(&opl3sa2_state[card].cfg_mpu); - } - unload_opl3sa2_mss(&opl3sa2_state[card].cfg_mss); - unload_opl3sa2(&opl3sa2_state[card].cfg, card); -#ifdef CONFIG_PNP - pnp_unregister_driver(&opl3sa2_driver); -#endif - } -} - -module_init(init_opl3sa2); -module_exit(cleanup_opl3sa2); - -#ifndef MODULE -static int __init setup_opl3sa2(char *str) -{ - /* io, irq, dma, dma2,... */ -#ifdef CONFIG_PNP - int ints[11]; -#else - int ints[9]; -#endif - str = get_options(str, ARRAY_SIZE(ints), ints); - - io = ints[1]; - irq = ints[2]; - dma = ints[3]; - dma2 = ints[4]; - mss_io = ints[5]; - mpu_io = ints[6]; - ymode = ints[7]; - loopback = ints[8]; -#ifdef CONFIG_PNP - isapnp = ints[9]; - multiple = ints[10]; -#endif - return 1; -} - -__setup("opl3sa2=", setup_opl3sa2); -#endif -- cgit v1.2.3-70-g09d2