From 62e110e8bf15a5de5c8bc179a836c1d2da969d6b Mon Sep 17 00:00:00 2001 From: NicJA Date: Tue, 23 Aug 2011 21:59:32 +0000 Subject: [PATCH] removed .. paths need fixed git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@40841 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- .../devs/AHI/Drivers/SB128/SB128/DriverData.h | 224 ---- workbench/devs/AHI/Drivers/SB128/SB128/LICENSE.txt | 466 -------- workbench/devs/AHI/Drivers/SB128/SB128/MODEFILE.s | 70 -- workbench/devs/AHI/Drivers/SB128/SB128/Makefile | 38 - workbench/devs/AHI/Drivers/SB128/SB128/Makefile.in | 47 - workbench/devs/AHI/Drivers/SB128/SB128/README.txt | 127 -- workbench/devs/AHI/Drivers/SB128/SB128/accel.c | 111 -- .../devs/AHI/Drivers/SB128/SB128/driver-init.c | 291 ----- workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.c | 252 ---- workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.h | 131 -- workbench/devs/AHI/Drivers/SB128/SB128/interrupt.c | 198 ---- workbench/devs/AHI/Drivers/SB128/SB128/interrupt.h | 34 - workbench/devs/AHI/Drivers/SB128/SB128/misc.c | 1250 -------------------- workbench/devs/AHI/Drivers/SB128/SB128/misc.h | 64 - workbench/devs/AHI/Drivers/SB128/SB128/regs.h | 260 ---- workbench/devs/AHI/Drivers/SB128/SB128/sb128.c | 743 ------------ .../devs/AHI/Drivers/SB128/SB128/version.date | 1 - workbench/devs/AHI/Drivers/SB128/SB128/version.h | 3 - workbench/devs/AHI/Drivers/SB128/SB128/version.rev | 1 - workbench/devs/AHI/Drivers/SB128/SB128/version.ver | 1 - 20 files changed, 4312 deletions(-) delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/DriverData.h delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/LICENSE.txt delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/MODEFILE.s delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/Makefile delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/Makefile.in delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/README.txt delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/accel.c delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/driver-init.c delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.c delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.h delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/interrupt.c delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/interrupt.h delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/misc.c delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/misc.h delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/regs.h delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/sb128.c delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/version.date delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/version.h delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/version.rev delete mode 100755 workbench/devs/AHI/Drivers/SB128/SB128/version.ver diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/DriverData.h b/workbench/devs/AHI/Drivers/SB128/SB128/DriverData.h deleted file mode 100755 index cbb497e514..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/DriverData.h +++ /dev/null @@ -1,224 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#ifndef AHI_Drivers_Card_DriverData_h -#define AHI_Drivers_Card_DriverData_h - -#include -#include -#include - -#define DRIVER "sb128.audio" -#define DRIVER_NEED_GLOBAL_EXECBASE -#include "DriverBase.h" - -struct CardData; - -struct CardBase -{ - /** Skeleton's variables *************************************************/ - - struct DriverBase driverbase; - - - /** A sempahore used for locking */ - struct SignalSemaphore semaphore; - - /** The number of cards found */ - int cards_found; - - /** A CardData structure for each card found */ - struct CardData** driverdatas; -}; - -#define RECORD_BUFFER_SAMPLES 1024 - - -struct CardData -{ - /*** PCI/Card initialization progress *********************************/ - - struct PCIDevice *pci_dev; - unsigned long iobase; - unsigned long length; - unsigned short model; - unsigned char chiprev; - unsigned int irq; - - /** TRUE if bus mastering is activated */ - BOOL pci_master_enabled; - - /** TRUE if the Card chip has been initialized */ - BOOL card_initialized; - - /** TRUE if the card is an ES1370 */ - BOOL es1370; - - /** A semaphore used for hardware access serialisation *******************/ - struct SignalSemaphore sb128_semaphore; - - - /*** The driverbase ******************************************************/ - - /** This field is also used as a lock and access to it is - * semaphore protected. */ - struct DriverBase* ahisubbase; - - - /*** The AudioCtrl currently using this DriverData structure *************/ - - struct AHIAudioCtrlDrv* audioctrl; - - - /*** Playback/recording interrupts ***************************************/ - - /** TRUE when playback is enabled */ - BOOL is_playing; - - /** TRUE when recording is enabled */ - BOOL is_recording; - - /** The main (hardware) interrupt */ - struct Interrupt interrupt; - - /** TRUE if the hardware interrupt has been added to the PCI subsystem */ - BOOL interrupt_added; - - /** The playback software interrupt */ - struct Interrupt playback_interrupt; - - /** TRUE if the hardware interrupt may Cause() playback_interrupt */ - BOOL playback_interrupt_enabled; - - /** The recording software interrupt */ - struct Interrupt record_interrupt; - - /** TRUE if the hardware interrupt may Cause() playback_interrupt */ - BOOL record_interrupt_enabled; - - - - /*** CAMD support functions **********************************************/ - - /** CAMD transmitter function wrapped as a Hook */ - struct Hook* camd_transmitfunc; - - /** CAMD receiver function wrapped as a Hook */ - struct Hook* camd_receivefunc; - - /** True if CMAD V40 mode */ - ULONG camd_v40; - - - - /*** Playback interrupt variables ****************************************/ - - APTR playback_buffer; - APTR playback_buffer_nonaligned; - APTR playback_buffer_phys; - - /** The mixing buffer (a cyclic buffer filled by AHI) */ - APTR mix_buffer; - - /** The length of each playback buffer in sample frames */ - ULONG current_frames; - - /** The length of each playback buffer in sample bytes */ - ULONG current_bytesize; - - /** Where (inside the cyclic buffer) we're currently writing */ - APTR current_buffer; - - int flip; - - - - /*** Recording interrupt variables ***************************************/ - - /** The recording buffer (simple double buffering is used */ - APTR record_buffer; - APTR record_buffer_nonaligned; - APTR record_buffer_phys; - - /** Were (inside the recording buffer) the current data is */ - APTR current_record_buffer; - - /** The length of each record buffer in sample bytes */ - ULONG current_record_bytesize; - - int recflip; - - - - /** Analog mixer variables ***********************************************/ - - /** The currently selected input */ - UWORD input; - - /** The currently selected output */ - UWORD output; - - /** The current (recording) monitor volume */ - Fixed monitor_volume; - - /** The current (recording) input gain */ - Fixed input_gain; - - /** The current (playback) output volume */ - Fixed output_volume; - - /** The hardware register value corresponding to monitor_volume */ - UWORD monitor_volume_bits; - - /** The hardware register value corresponding to input_gain */ - UWORD input_gain_bits; - - /** The hardware register value corresponding to output_volume */ - UWORD output_volume_bits; - - /** Saved state for AC97 mike */ - UWORD ac97_mic; - - /** Saved state for AC97 cd */ - UWORD ac97_cd; - - /** Saved state for AC97 video */ - UWORD ac97_video; - - /** Saved state for AC97 aux */ - UWORD ac97_aux; - - /** Saved state for AC97 line in */ - UWORD ac97_linein; - - /** Saved state for AC97 phone */ - UWORD ac97_phone; - - /** Saved state of AK4531 Output Register 1 */ - char ak4531_output_1; - - /** Saved state of AK4531 Output Register 1 */ - char ak4531_output_2; - - /** The current Playback Frequency */ - int currentPlayFreq; - - /** The current Record Frequency */ - int currentRecFreq; -}; - -#endif /* AHI_Drivers_Card_DriverData_h */ diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/LICENSE.txt b/workbench/devs/AHI/Drivers/SB128/SB128/LICENSE.txt deleted file mode 100755 index dd9f513906..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/LICENSE.txt +++ /dev/null @@ -1,466 +0,0 @@ -*AROS PUBLIC LICENSE (APL)* -*Version 1.1* -(based on the MPL ) - ------------------------------------------------------------------------- - -*1. Definitions.* - - *1.0.1. "Commercial Use" *means distribution or otherwise making the - Covered Code available to a third party. - - *1.1. ''Contributor''* means each entity that creates or contributes - to the creation of Modifications. - - *1.2. ''Contributor Version''* means the combination of the Original - Code, prior Modifications used by a Contributor, and the - Modifications made by that particular Contributor. - - *1.3. ''Covered Code''* means the Original Code or Modifications or - the combination of the Original Code and Modifications, in each case - including portions thereof*.* - - *1.4. ''Electronic Distribution Mechanism''* means a mechanism - generally accepted in the software development community for the - electronic transfer of data. - - *1.5. ''Executable''* means Covered Code in any form other than - Source Code. - - *1.6. ''Initial Developer''* means the individual or entity - identified as the Initial Developer in the Source Code notice - required by *Exhibit A*. - - *1.7. ''Larger Work''* means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - *1.8. ''License''* means this document. - - *1.8.1. "Licensable"* means having the right to grant, to the - maximum extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - *1.9. ''Modifications''* means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - - *A.* Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - *B.* Any new file that contains any part of the Original Code or - previous Modifications. - - - *1.10. ''Original Code''* means Source Code of computer software - code which is described in the Source Code notice required by - *Exhibit A* as Original Code, and which, at the time of its release - under this License is not already Covered Code governed by this - License. - - *1.10.1. "Patent Claims"* means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - *1.11. ''Source Code''* means the preferred form of the Covered Code - for making modifications to it, including all modules it contains, - plus any associated interface definition files, scripts used to - control compilation and installation of an Executable, or source - code differential comparisons against either the Original Code or - another well known, available Covered Code of the Contributor's - choice. The Source Code can be in a compressed or archival form, - provided the appropriate decompression or de-archiving software is - widely available for no charge. - - *1.11.1 ''Source Tree''* means the whole Source Code or parts of the - Source Code which are contained in a single directory or in a - hierarchy of directories. - - *1.12. ``You'' (or "Your") * means an individual or a legal entity - exercising rights under, and complying with all of the terms of, - this License or a future version of this License issued under - Section 6.1. For legal entities, ``You'' includes any entity which - controls, is controlled by, or is under common control with You. For - purposes of this definition, ``control'' means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -*2. Source Code License.* - - *2.1. The Initial Developer Grant.* - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - *(a)* **under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - *(b)* under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - *(c) *the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - *(d) *Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - - *2.2. Contributor Grant.* - Subject to third party intellectual property claims, each - Contributor hereby grants You a world-wide, royalty-free, - non-exclusive license - - *(a)* **under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - *(b)* under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or incombination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - *(c) *the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - *(d) * Notwithstanding Section 2.2(b) above, no patent license - is granted: 1) for any code that Contributor has deleted from - the Contributor Version; 2) separate from the Contributor - Version; 3) for infringements caused by: i) third party - modifications of Contributor Version or ii) the combination of - Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or - 4) under Patent Claims infringed by Covered Code in the absence - of Modifications made by that Contributor. - - -*3. Distribution Obligations.* - - *3.1. Application of License.* - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section *2.2*. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section *6.1*, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may - include an additional document offering the additional rights - described in Section *3.5*. - - *3.2. Availability of Source Code.* - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve - (12) months after the date it initially became available, or at - least six (6) months after a subsequent version of that particular - Modification has been made available to such recipients. You are - responsible for ensuring that the Source Code version remains - available even if the Electronic Distribution Mechanism is - maintained by a third party. - - *3.3. Description of Modifications.* - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code - and the date of any change. You must include a prominent statement - that the Modification is derived, directly or indirectly, from - Original Code provided by the Initial Developer and including the - name of the Initial Developer in (a) the Source Code, and (b) in any - notice in an Executable version or related documentation in which - You describe the origin or ownership of the Covered Code. - - *3.4. Intellectual Property Matters* - - *(a) Third Party Claims*. - If Contributor has knowledge that a license under a third - party's intellectual property rights is required to exercise the - rights granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled ``LEGAL'' which describes the claim and the - party making the claim in sufficient detail that a recipient - will know whom to contact. If Contributor obtains such knowledge - after the Modification is made available as described in Section - 3.2, Contributor shall promptly modify the LEGAL file in all - copies Contributor makes available thereafter and shall take - other steps (such as notifying appropriate mailing lists or - newsgroups) reasonably calculated to inform those who received - the Covered Code that new knowledge has been obtained. - - *(b) Contributor APIs*. - If Contributor's Modifications include an application - programming interface and Contributor has knowledge of patent - licenses which are reasonably necessary to implement that API, - Contributor must also include this information in the LEGAL file. - - - *(c) Representations.* - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed - by this License. - - - *3.5. Required Notices.* - You must duplicate the notice in *Exhibit A* in each file of the - Source Code. If it is not possible to put such notice in a - particular Source Code file due to its structure, then You must - include such notice in a location (such as a relevant directory) - where a user would be likely to look for such a notice. If You - created one or more Modification(s) You may add your name as a - Contributor to the notice described in *Exhibit A*. You must also - duplicate this License in any documentation for the Source Code - where You describe recipients' rights or ownership rights relating - to Covered Code. You may choose to offer, and to charge a fee for, - warranty, support, indemnity or liability obligations to one or more - recipients of Covered Code. However, You may do so only on Your own - behalf, and not on behalf of the Initial Developer or any - Contributor. You must make it absolutely clear than any such - warranty, support, indemnity or liability obligation is offered by - You alone, and You hereby agree to indemnify the Initial Developer - and every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of warranty, support, - indemnity or liability terms You offer. - - *3.6. Distribution of Executable Versions.* - You may distribute Covered Code in Executable form only if the - requirements of Section *3.1-3.5* have been met for that Covered - Code, and if You include a notice stating that the Source Code - version of the Covered Code is available under the terms of this - License, including a description of how and where You have fulfilled - the obligations of Section *3.2*. The notice must be conspicuously - included in any notice in an Executable version, related - documentation or collateral in which You describe recipients' rights - relating to the Covered Code. You may distribute the Executable - version of Covered Code or ownership rights under a license of Your - choice, which may contain terms different from this License, - provided that You are in compliance with the terms of this License - and that the license for the Executable version does not attempt to - limit or alter the recipient's rights in the Source Code version - from the rights set forth in this License. If You distribute the - Executable version under a different license You must make it - absolutely clear that any terms which differ from this License are - offered by You alone, not by the Initial Developer or any - Contributor. You hereby agree to indemnify the Initial Developer and - every Contributor for any liability incurred by the Initial - Developer or such Contributor as a result of any such terms You offer. - - *3.7. Larger Works.* - You may create a Larger Work by combining Covered Code with other - code not governed by the terms of this License and distribute the - Larger Work as a single product. In such a case, You must make sure - the requirements of this License are fulfilled for the Covered Code. - -*4. Inability to Comply Due to Statute or Regulation.* - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply - with the terms of this License to the maximum extent possible; and - (b) describe the limitations and the code they affect. Such - description must be included in the LEGAL file described in Section - *3.4* and must be included with all distributions of the Source - Code. Except to the extent prohibited by statute or regulation, such - description must be sufficiently detailed for a recipient of - ordinary skill to be able to understand it. - -*5. Application of this License.* - - *5.1. Attached license*. - This License applies to code to which the Initial Developer has - attached the notice in *Exhibit A* and to related Covered Code. - - *5.2. Detached license*. - This License applies to code which is part of a Source Tree - containing this license in a file named LICENSE or license.html at - the top of its hierarchy and which is not explicitly covered by a - different license. - -*6. Versions of the License.* - - *6.1. New Versions*. - The AROS development team may publish revised and/or new versions of - the License from time to time. Each version will be given a - distinguishing version number. - - *6.2. Effect of New Versions*. - Once Covered Code has been published under a particular version of - the License, You may always continue to use it under the terms of - that version. You may also choose to use such Covered Code under the - terms of any subsequent version of the License. No one other than - the AROS development team has the right to modify the terms - applicable to Covered Code created under this License. - -*7. DISCLAIMER OF WARRANTY.* - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN ``AS IS'' BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, - INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS - FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR - NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF - THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE - DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY - OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY SERVICING, - REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN - ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS - AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -*8. TERMINATION.* - - *8.1. *This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to - cure such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - *8.2. *If You initiate litigation by asserting a patent - infringement claim (excluding declatory judgment actions) against - Initial Developer or a Contributor (the Initial Developer or - Contributor against whom You file such action is referred to as - "Participant") alleging that: - - *(a) *such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation - claim is not withdrawn, the rights granted by Participant to You - under Sections 2.1 and/or 2.2 automatically terminate at the - expiration of the 60 day notice period specified above. - - *(b)* any software, hardware, or device, other than such - Participant's Contributor Version, directly or indirectly infringes - any patent, then any rights granted to You by such Participant under - Sections 2.1(b) and 2.2(b) are revoked effective as of the date You - first made, used, sold, distributed, or had made, Modifications made - by that Participant. - - *8.3. *If You assert a patent infringement claim against - Participant alleging that such Participant's Contributor Version - directly or indirectly infringes any patent where such claim is - resolved (such as by license or settlement) prior to the initiation - of patent infringement litigation, then the reasonable value of the - licenses granted by such Participant under Sections 2.1 or 2.2 shall - be taken into account in determining the amount or value of any - payment or license. - - *8.4.* In the event of termination under Sections 8.1 or 8.2 - above, all end user license agreements (excluding distributors and - resellers) which have been validly granted by You or any distributor - hereunder prior to termination shall survive termination. - -*9. LIMITATION OF LIABILITY.* - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE - INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF - COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO - ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL - DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR - LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR - ANY AND ALL OTHER COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY - SHALL HAVE BEEN INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS - LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR - PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT - APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT - ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL - DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -*10. U.S. GOVERNMENT END USERS.* - - The Covered Code is a ''commercial item,'' as that term is defined - in 48 C.F.R. 2.101 (Oct. 1995), consisting of ''commercial computer - software'' and ''commercial computer software documentation,'' as - such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent - with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 - (June 1995), all U.S. Government End Users acquire Covered Code with - only those rights set forth herein. - -*11. MISCELLANEOUS.* - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. - -*12. RESPONSIBILITY FOR CLAIMS.* - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -*13. MULTIPLE-LICENSED CODE.* - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - alternative licenses specified by the Initial Developer in the file - described in Exhibit A. - - -*EXHIBIT A - AROS Public License.* - - ``The contents of this file are subject to the AROS Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.aros.org/license.html - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF - ANY KIND, either express or implied. See the License for the - specific language governing rights and - limitations under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is - ________________________. Portions created by - ______________________ are Copyright (C) ______ - _______________________. All Rights - Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the [___] License), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the APL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not - delete the provisions above, a recipient may use your version of - this file under either the APL or the [___] License." - diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/MODEFILE.s b/workbench/devs/AHI/Drivers/SB128/SB128/MODEFILE.s deleted file mode 100755 index 3a25416137..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/MODEFILE.s +++ /dev/null @@ -1,70 +0,0 @@ - - .MACRO LONG num -.ifdef LITTLE_ENDIAN - .byte ((\num)>>24)&255 - .byte ((\num)>>16)&255 - .byte ((\num)>> 8)&255 - .byte ((\num)>> 0)&255 -.else - .long \num -.endif - .ENDM - - .MACRO LONG2 num1,num2 -.ifdef LITTLE_ENDIAN - .byte ((\num1)>>24)&255 - .byte ((\num1)>>16)&255 - .byte ((\num1)>> 8)&255 - .byte ((\num1)>> 0)&255 - - .byte ((\num2)>>24)&255 - .byte ((\num2)>>16)&255 - .byte ((\num2)>> 8)&255 - .byte ((\num2)>> 0)&255 -.else - .long \num1, \num2 -.endif - .ENDM - - .MACRO FORM_START name -CHUNKCNT .ASSIGNA 0 - .ascii "FORM" - LONG FORMEND-FORMSTART -FORMSTART: - .ascii "\name" - .ENDM - - .MACRO FORM_END name -FORMEND: - .balign 2,0 - .ENDM - - .MACRO CHUNK_START name - .ascii "\name" - LONG CHUNKEND\&CHUNKCNT-CHUNKSTART\&CHUNKCNT -CHUNKSTART\&CHUNKCNT: - .ENDM - - .MACRO CHUNK_END -CHUNKEND\&CHUNKCNT: -CHUNKCNT .ASSIGNA \&CHUNKCNT+1 - .balign 2,0 - .ENDM - -AHI_TagBase .EQU 2147483648 -AHI_TagBaseR .EQU AHI_TagBase+32768 - -AHIDB_AudioID .EQU AHI_TagBase+100 -AHIDB_Volume .EQU AHI_TagBase+103 -AHIDB_Panning .EQU AHI_TagBase+104 -AHIDB_Stereo .EQU AHI_TagBase+105 -AHIDB_HiFi .EQU AHI_TagBase+106 -AHIDB_MultTable .EQU AHI_TagBase+108 -AHIDB_Name .EQU AHI_TagBaseR+109 - -AHIDB_UserBase .EQU AHI_TagBase+500 - -TAG_DONE .EQU 0 - -TRUE .EQU 1 -FALSE .EQU 0 diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/Makefile b/workbench/devs/AHI/Drivers/SB128/SB128/Makefile deleted file mode 100755 index 7990d8be85..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/Makefile +++ /dev/null @@ -1,38 +0,0 @@ -# $Id: Makefile.in,v 1.16 2003/07/23 15:39:29 martin Exp $ -# -# Makefile.in for SB128 sound card driver -# - - - -srcdir = /usr/src/os4/ahi - -DRIVER = sb128.audio -MODEFILE = SB128 - -OBJECTS = driver-init.o sb128.o accel.o misc.o interrupt.o - -include ../Common/Makefile.card - - -# CAMD driver - -host_cpu = powerpc -CAMDDIR = CAMD - -camd-clean: - $(RM) camdstubs.c camdstubs.h CAMD/emu10kx CAMD/emu10kx.o CAMD.stamp - -camd-bindist: all - $(INSTALL) --directory $(CAMDDIR) - $(INSTALL_PROGRAM) CAMD/emu10kx $(CAMDDIR) - $(STRIP) $(CAMDDIR)/emu10kx - -CAMD/emu10kx: CAMD/emu10kx.o camdstubs.o - $(CC) $(LDFLAGS) $^ -o $@ - -CAMD.stamp: - test -e CAMD || mkdir CAMD - touch $@ - -CAMD/emu10kx.o: CAMD.stamp CAMD/emu10kx.c camdstubs.h card-camd.h version.h diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/Makefile.in b/workbench/devs/AHI/Drivers/SB128/SB128/Makefile.in deleted file mode 100755 index 285234292f..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/Makefile.in +++ /dev/null @@ -1,47 +0,0 @@ -# $Id: Makefile.in,v 1.16 2003/07/23 15:39:29 martin Exp $ -# -# Makefile.in for EMU10kx sound card driver -# - -VPATH = @srcdir@ - -srcdir = @srcdir@ - -DRIVER = emu10kx.audio -MODEFILE = EMU10KX - -OBJECTS = emu10kx-init.o emu10kx.o emu10kx-accel.o \ - emu10kx-misc.o emu10kx-interrupt.o emu10kx-camd.o \ - main.o hwaccess.o emuadxmg.o efxmgr.o voicemgr.o \ - linuxsupport.o - -include ../Common/Makefile.common - - -# CAMD driver - -host_cpu = @host_cpu@ -CAMDDIR = ${DISTDIR}/User/Devs/MIDI - -ifeq ($(host_cpu),m68k) -all: CAMD/emu10kx -clean: camd-clean -bindist: camd-bindist -endif - -camd-clean: - $(RM) camdstubs.c camdstubs.h CAMD/emu10kx CAMD/emu10kx.o CAMD.stamp - -camd-bindist: all - $(INSTALL) --directory $(CAMDDIR) - $(INSTALL_PROGRAM) CAMD/emu10kx $(CAMDDIR) - $(STRIP) $(CAMDDIR)/emu10kx - -CAMD/emu10kx: CAMD/emu10kx.o camdstubs.o - $(CC) $(LDFLAGS) $^ -o $@ - -CAMD.stamp: - test -e CAMD || mkdir CAMD - touch $@ - -CAMD/emu10kx.o: CAMD.stamp CAMD/emu10kx.c camdstubs.h emu10kx-camd.h version.h diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/README.txt b/workbench/devs/AHI/Drivers/SB128/SB128/README.txt deleted file mode 100755 index 71c0f0a254..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/README.txt +++ /dev/null @@ -1,127 +0,0 @@ - -SB128 AHI driver ----------------- - - -This is the open source release of the SB128 AHI driver written by Ross Vumbaca. - -The source to this driver is released under the terms of the Aros Public License (APL). - -Thank you to Paolo Besser for sponsoring the release of this driver source. - -For licensing information, please read the "LICENSE.txt" file. - - -Background: ------------ - - -"SB128" is a generic name sometimes used by Creative Labs for their low cost -PCI Sound Cards. - - -Sometimes they are known by different names, such as: - -Sound Blaster AudioPCI97 -Sound Blaster PCI -Sound Blaster Vibra -Sound Blaster 128 -Sound Blaster 64(V) - -These cards are all based around the same "Ensoniq" audio chip -(Creative bought them out a number of years ago). - -Creative likes to change the names of their cards. - - -The original cards were based on the "Ensoniq ES1370" chip. - -The next generations of chips (name changing over time) were: - -Ensoniq ES1371 -Ensoniq ES1373 -Creative CT5880 -Ectiva EV1938 - -They are all basically the same thing, and are all supported by this driver. - -Creative likes to change the names of their chips (do we see a trend here?) - - -The driver supports playback and recording from 8000Hz to 48000Hz at 16 Bit, Stereo. - - -Thank you to Davy Wentlzer for extensive help and guidance during the development of this driver, -and also for sending me an ES1370 card - http://www.audio-evolution.com - -Additionally, thank you to all the AmigaOS4 Beta Testers that provided feedback. - - -Instructions for use: ---------------------- - -1) You must install AHI on your system - -2) Place "sb128.audio" into Devs:AHI/ - -3) Place "SB128" into Devs:AudioModes/ - -4) Make sure to set up Unit 0 using AHI Prefs - Use a frequency of 44100Hz, and Channels = 32. - - -Note Regarding ES1370: ----------------------- - -When you are recording with the ES1370, the Monitor Volume level you hear, -is the level which will be used for recording. That is, if you adjust the Monitor -Volume, you are actually adjusting the Input Gain. It is not possible to adjust -the Input Gain separately (as it is with the other SB128 AC97 based cards). - -The exception to this rule, is the Microphone and Speaker-Phone/TAD input -(if present). - - -Useless Trivia --------------- - -Useless Trivia #1274 - Ensoniq was founded by an ex-Commodore employee. - He was the inventor of the SID chip. - - -History -------- - -5.10 - Initial Release - -5.15 - Implemented proper MicroDelays, for better performance in particular areas. - Adjusted AC97 read code for the buggy revision 8, ES1373 chip. - -5.16 - Got rid of MicroDelays, changed timing approach. - -5.17 - Experimental DMA fix added - -5.18 - Adjustments made to experimental DMA fix - -5.19 - DMA fix finalised - -5.20 - Reset handler added. - Support for ES1370 added! - -5.21 - Code clean up - -5.22 - Fixed issue with simultaneous playback and - record - -5.23 - Now supports the New Memory System (TM) - -5.24 - Open source release, thank you to Paolo Besser - - -Contacting the author ---------------------- - -Please send bug reports to rossv@potduck.com - -Ross Vumbaca, 18/8/11 - diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/accel.c b/workbench/devs/AHI/Drivers/SB128/SB128/accel.c deleted file mode 100755 index 58c7d34466..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/accel.c +++ /dev/null @@ -1,111 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#include - -#include -#include - -#include "library_card.h" - -/****************************************************************************** -** AHIsub_SetVol ************************************************************** -******************************************************************************/ - -ULONG -_AHIsub_SetVol( UWORD channel, - Fixed volume, - sposition pan, - struct AHIAudioCtrlDrv* AudioCtrl, - ULONG flags, - struct DriverBase* AHIsubBase ) -{ - return AHIS_UNKNOWN; -} - - -/****************************************************************************** -** AHIsub_SetFreq ************************************************************* -******************************************************************************/ - -ULONG -_AHIsub_SetFreq( UWORD channel, - ULONG freq, - struct AHIAudioCtrlDrv* AudioCtrl, - ULONG flags, - struct DriverBase* AHIsubBase ) -{ - return AHIS_UNKNOWN; -} - - -/****************************************************************************** -** AHIsub_SetSound ************************************************************ -******************************************************************************/ - -ULONG -_AHIsub_SetSound( UWORD channel, - UWORD sound, - ULONG offset, - LONG length, - struct AHIAudioCtrlDrv* AudioCtrl, - ULONG flags, - struct DriverBase* AHIsubBase ) -{ - return AHIS_UNKNOWN; -} - - -/****************************************************************************** -** AHIsub_SetEffect *********************************************************** -******************************************************************************/ - -ULONG -_AHIsub_SetEffect( APTR effect, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - return AHIS_UNKNOWN; -} - - -/****************************************************************************** -** AHIsub_LoadSound *********************************************************** -******************************************************************************/ - -ULONG -_AHIsub_LoadSound( UWORD sound, - ULONG type, - APTR info, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - return AHIS_UNKNOWN; -} - - -/****************************************************************************** -** AHIsub_UnloadSound ********************************************************* -******************************************************************************/ - -ULONG -_AHIsub_UnloadSound( UWORD sound, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - return AHIS_UNKNOWN; -} diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/driver-init.c b/workbench/devs/AHI/Drivers/SB128/SB128/driver-init.c deleted file mode 100755 index 2dc2cf9970..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/driver-init.c +++ /dev/null @@ -1,291 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#include - -#include - -#undef __USE_INLINE__ -#include - -#include -#include - -#include - -#include "library_card.h" -#include "version.h" -#include "misc.h" -#include "regs.h" -#include "DriverData.h" - - -struct Library* SysBase; -struct Library* DOSBase; -struct DriverBase* AHIsubBase; - -struct Library* ExpansionBase = NULL; -struct ExpansionIFace* IExpansion = NULL; -struct UtilityIFace* IUtility = NULL; -struct AHIsubIFace* IAHIsub = NULL; -struct MMUIFace* IMMU = NULL; -struct PCIIFace* IPCI = NULL; - -#define CARD_STRING "SB128" - - -/****************************************************************************** -** Custom driver init ********************************************************* -******************************************************************************/ - -BOOL -DriverInit( struct DriverBase* ahisubbase ) -{ - struct CardBase* CardBase = (struct CardBase*) ahisubbase; - struct PCIDevice *dev; - int card_no; - - UWORD cards[] = - { - 0x1274, 0x5000, - 0x1274, 0x1371, - 0x1274, 0x5880, - 0x1102, 0x8938, - PCI_ANY_ID, PCI_ANY_ID - }; - - CardBase->cards_found = 0; - CardBase->driverdatas = 0; - AHIsubBase = ahisubbase; - - DOSBase = IExec->OpenLibrary( DOSNAME, 37 ); - - if( DOSBase == NULL ) - { - Req( "Unable to open 'dos.library' version 37.\n" ); - return FALSE; - } - - if ((IDOS = (struct DOSIFace *) IExec->GetInterface((struct Library *) DOSBase, "main", 1, NULL)) == NULL) - { - Req("Couldn't open IDOS interface!\n"); - return FALSE; - } - - ExpansionBase = IExec->OpenLibrary( "expansion.library", 50 ); - if( ExpansionBase == NULL ) - { - Req( "Unable to open 'expansion.library' version 50.\n" ); - return FALSE; - } - if ((IExpansion = (struct ExpansionIFace *) IExec->GetInterface((struct Library *) ExpansionBase, "main", 1, NULL)) == NULL) - { - Req("Couldn't open IExpansion interface!\n"); - return FALSE; - } - - if ((IPCI = (struct PCIIFace *) IExec->GetInterface((struct Library *) ExpansionBase, "pci", 1, NULL)) == NULL) - { - Req("Couldn't open IPCI interface!\n"); - return FALSE; - } - - if ((IAHIsub = (struct AHIsubIFace *) IExec->GetInterface((struct Library *) AHIsubBase, "main", 1, NULL)) == NULL) - { - Req("Couldn't open IAHIsub interface!\n"); - return FALSE; - } - - if ((IUtility = (struct UtilityIFace *) IExec->GetInterface((struct Library *) UtilityBase, "main", 1, NULL)) == NULL) - { - Req("Couldn't open IUtility interface!\n"); - return FALSE; - } - - if ((IMMU = (struct MMUIFace *) IExec->GetInterface((struct Library *) SysBase, "mmu", 1, NULL)) == NULL) - { - Req("Couldn't open IMMU interface!\n"); - return FALSE; - } - - /* Timer Device */ - -/* replymp = (struct MsgPort *) IExec->CreatePort(NULL, 0); - if (!replymp) - { - IExec->DebugPrintF("SB128: Couldn't create ReplyPort!\n"); - return FALSE; - }*/ - - /*TimerIO = (struct timerequest *)IExec->CreateIORequest(replymp, sizeof(struct timerequest)); - - if (TimerIO == NULL) - { - IExec->DebugPrintF("Out of memory.\n"); - return FALSE; - } - - if (IExec->OpenDevice("timer.device", UNIT_MICROHZ, (struct IORequest *)TimerIO, 0) != 0) - { - IExec->DebugPrintF("Unable to open 'timer.device'.\n"); - return FALSE; - } - else - TimerBase = (struct Device *)TimerIO->tr_node.io_Device;*/ - - IExec->InitSemaphore( &CardBase->semaphore ); - - - /*** Count cards ***********************************************************/ - - dev = NULL; - - if ( (dev = IPCI->FindDeviceTags( FDT_CandidateList, cards, - TAG_DONE ) ) != NULL ) - { - ++CardBase->cards_found; - IExec->DebugPrintF("%s found! :-)\n", CARD_STRING); - } - - /* Fail if no hardware is present (prevents the audio modes from being added to - the database if the driver cannot be used). */ - - if( CardBase->cards_found == 0 ) - { - IExec->DebugPrintF("No %s found! :-(\n", CARD_STRING); - Req( "No card present.\n" ); - return FALSE; - } - - /*** CAMD ******************************************************************/ -#if 0 - IExec->InitSemaphore( &CardBase->camd.Semaphore ); - CardBase->camd.Semaphore.ss_Link.ln_Pri = 0; - - CardBase->camd.Semaphore.ss_Link.ln_Name = Card_CAMD_SEMAPHORE; - IExec->AddSemaphore( &CardBase->camd.Semaphore ); - - CardBase->camd.Cards = CardBase->cards_found; - CardBase->camd.Version = VERSION; - CardBase->camd.Revision = REVISION; - - - CardBase->camd.OpenPortFunc.h_Entry = OpenCAMDPort; - CardBase->camd.OpenPortFunc.h_SubEntry = NULL; - CardBase->camd.OpenPortFunc.h_Data = NULL; - - CardBase->camd.ClosePortFunc.h_Entry = (HOOKFUNC) CloseCAMDPort; - CardBase->camd.ClosePortFunc.h_SubEntry = NULL; - CardBase->camd.ClosePortFunc.h_Data = NULL; - - CardBase->camd.ActivateXmitFunc.h_Entry = (HOOKFUNC) ActivateCAMDXmit; - CardBase->camd.ActivateXmitFunc.h_SubEntry = NULL; - CardBase->camd.ActivateXmitFunc.h_Data = NULL; -#endif - - - /*** Allocate and init all cards *******************************************/ - - CardBase->driverdatas = IExec->AllocVec( sizeof( *CardBase->driverdatas ) * - CardBase->cards_found, - MEMF_PUBLIC ); - - if( CardBase->driverdatas == NULL ) - { - Req( "Out of memory." ); - return FALSE; - } - - card_no = 0; - - if( ( dev = IPCI->FindDeviceTags( FDT_CandidateList, cards, - TAG_DONE ) ) != NULL ) - { - CardBase->driverdatas[ card_no ] = AllocDriverData( dev, AHIsubBase ); - ++card_no; - } - - return TRUE; -} - - -/****************************************************************************** -** Custom driver clean-up ***************************************************** -******************************************************************************/ - -VOID -DriverCleanup( struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - int i; -#if 0 - if( CardBase->camd.Semaphore.ss_Link.ln_Name != NULL ) - { - IExec->ObtainSemaphore( &CardBase->camd.Semaphore ); - IExec->RemSemaphore( &CardBase->camd.Semaphore ); - IExec->ReleaseSemaphore( &CardBase->camd.Semaphore ); - } -#endif - - for( i = 0; i < CardBase->cards_found; ++i ) - { - if (CardBase->driverdatas) - { - CardBase->driverdatas[ i ]->pci_dev->OutLong(CardBase->driverdatas[ i ]->iobase + SB128_SCON, 0); - FreeDriverData( CardBase->driverdatas[ i ], AHIsubBase ); - } - } - - if (CardBase->driverdatas) - IExec->FreeVec( CardBase->driverdatas ); - - /*if (TimerIO) - { - IExec->CloseDevice((struct IORequest *)TimerIO); - IExec->DeleteIORequest((struct IORequest *)TimerIO); - }*/ - - /*if (replymp) - IExec->DeletePort(replymp);*/ - - if (IMMU) - IExec->DropInterface( (struct Interface *) IMMU); - - if (IUtility) - IExec->DropInterface( (struct Interface *) IUtility); - - if (IExpansion) - IExec->DropInterface( (struct Interface *) IExpansion); - - if (IPCI) - IExec->DropInterface( (struct Interface *) IPCI); - - if (IAHIsub) - IExec->DropInterface( (struct Interface *) IAHIsub); - - if (IDOS) - IExec->DropInterface( (struct Interface *) IDOS); - - if (ExpansionBase) - IExec->CloseLibrary( (struct Library*) ExpansionBase ); - - if (UtilityBase) - IExec->CloseLibrary( (struct Library*) UtilityBase ); - - if (DOSBase) - IExec->CloseLibrary( (struct Library*) DOSBase ); -} diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.c b/workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.c deleted file mode 100755 index 25400f3e3c..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.c +++ /dev/null @@ -1,252 +0,0 @@ -/* Automatically generated gatestubs! Do not edit! */ - -#include -#include -#include -#include -#include -#include - -#ifdef __amigaos4__ -#include -#endif - - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define __NOLIBBASE__ -#include -#undef __NOLIBBASE__ -#include - -struct Library* -_LibInit(struct Library* ___library, BPTR ___seglist, struct ExecBase* ___SysBase); - -struct Library* -gwLibInit( struct Library* ___library, - BPTR ___seglist, - struct ExecIFace* _iface) -{ - struct ExecBase* ___SysBase = (struct ExecBase*) _iface->Data.LibBase; - return _LibInit(___library, ___seglist, ___SysBase); -} - -struct Library* -_LibOpen(struct Library * _base); - -struct Library* -gwLibOpen(struct LibraryManagerInterface* _iface) -{ - return _LibOpen((struct Library *) _iface->Data.LibBase); -} - -BPTR -_LibClose(struct Library * _base); - -BPTR -gwLibClose(struct LibraryManagerInterface* _iface) -{ - return _LibClose((struct Library *) _iface->Data.LibBase); -} - -BPTR -_LibExpunge(struct Library * _base); - -BPTR -gwLibExpunge(struct LibraryManagerInterface* _iface) -{ - return _LibExpunge((struct Library *) _iface->Data.LibBase); -} - -ULONG -_LibNull(struct Library * _base); - -ULONG -gwLibNull(struct LibraryManagerInterface* _iface) -{ - return _LibNull((struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_AllocAudio(struct TagItem * ___tagList, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -ULONG -gwAHIsub_AllocAudio(struct AHIsubIFace* _iface, - struct TagItem * ___tagList, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_AllocAudio(___tagList, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -void -_AHIsub_FreeAudio(struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -void -gwAHIsub_FreeAudio(struct AHIsubIFace* _iface, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_FreeAudio(___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -void -_AHIsub_Disable(struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -void -gwAHIsub_Disable(struct AHIsubIFace* _iface, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_Disable(___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -void -_AHIsub_Enable(struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -void -gwAHIsub_Enable(struct AHIsubIFace* _iface, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_Enable(___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_Start(ULONG ___Flags, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -ULONG -gwAHIsub_Start(struct AHIsubIFace* _iface, - ULONG ___Flags, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_Start(___Flags, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_Update(ULONG ___Flags, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -ULONG -gwAHIsub_Update(struct AHIsubIFace* _iface, - ULONG ___Flags, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_Update(___Flags, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_Stop(ULONG ___Flags, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -ULONG -gwAHIsub_Stop(struct AHIsubIFace* _iface, - ULONG ___Flags, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_Stop(___Flags, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_SetVol(UWORD ___Channel, Fixed ___Volume, sposition ___Pan, struct AHIAudioCtrlDrv * ___AudioCtrl, ULONG ___Flags, struct Library * _base); - -ULONG -gwAHIsub_SetVol(struct AHIsubIFace* _iface, - UWORD ___Channel, - Fixed ___Volume, - sposition ___Pan, - struct AHIAudioCtrlDrv * ___AudioCtrl, - ULONG ___Flags) -{ - return _AHIsub_SetVol(___Channel, ___Volume, ___Pan, ___AudioCtrl, ___Flags, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_SetFreq(UWORD ___Channel, ULONG ___Freq, struct AHIAudioCtrlDrv * ___AudioCtrl, ULONG ___Flags, struct Library * _base); - -ULONG -gwAHIsub_SetFreq(struct AHIsubIFace* _iface, - UWORD ___Channel, - ULONG ___Freq, - struct AHIAudioCtrlDrv * ___AudioCtrl, - ULONG ___Flags) -{ - return _AHIsub_SetFreq(___Channel, ___Freq, ___AudioCtrl, ___Flags, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_SetSound(UWORD ___Channel, UWORD ___Sound, ULONG ___Offset, LONG ___Length, struct AHIAudioCtrlDrv * ___AudioCtrl, ULONG ___Flags, struct Library * _base); - -ULONG -gwAHIsub_SetSound(struct AHIsubIFace* _iface, - UWORD ___Channel, - UWORD ___Sound, - ULONG ___Offset, - LONG ___Length, - struct AHIAudioCtrlDrv * ___AudioCtrl, - ULONG ___Flags) -{ - return _AHIsub_SetSound(___Channel, ___Sound, ___Offset, ___Length, ___AudioCtrl, ___Flags, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_SetEffect(APTR ___Effect, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -ULONG -gwAHIsub_SetEffect(struct AHIsubIFace* _iface, - APTR ___Effect, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_SetEffect(___Effect, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_LoadSound(UWORD ___Sound, ULONG ___Type, APTR ___Info, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -ULONG -gwAHIsub_LoadSound(struct AHIsubIFace* _iface, - UWORD ___Sound, - ULONG ___Type, - APTR ___Info, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_LoadSound(___Sound, ___Type, ___Info, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -ULONG -_AHIsub_UnloadSound(UWORD ___Sound, struct AHIAudioCtrlDrv * ___Audioctrl, struct Library * _base); - -ULONG -gwAHIsub_UnloadSound(struct AHIsubIFace* _iface, - UWORD ___Sound, - struct AHIAudioCtrlDrv * ___Audioctrl) -{ - return _AHIsub_UnloadSound(___Sound, ___Audioctrl, (struct Library *) _iface->Data.LibBase); -} - -LONG -_AHIsub_GetAttr(ULONG ___Attribute, LONG ___Argument, LONG ___DefValue, struct TagItem * ___tagList, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -LONG -gwAHIsub_GetAttr(struct AHIsubIFace* _iface, - ULONG ___Attribute, - LONG ___Argument, - LONG ___DefValue, - struct TagItem * ___tagList, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_GetAttr(___Attribute, ___Argument, ___DefValue, ___tagList, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - -LONG -_AHIsub_HardwareControl(ULONG ___Attribute, LONG ___Argument, struct AHIAudioCtrlDrv * ___AudioCtrl, struct Library * _base); - -LONG -gwAHIsub_HardwareControl(struct AHIsubIFace* _iface, - ULONG ___Attribute, - LONG ___Argument, - struct AHIAudioCtrlDrv * ___AudioCtrl) -{ - return _AHIsub_HardwareControl(___Attribute, ___Argument, ___AudioCtrl, (struct Library *) _iface->Data.LibBase); -} - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.h b/workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.h deleted file mode 100755 index 8c1b04ebc8..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/gatestubs.h +++ /dev/null @@ -1,131 +0,0 @@ -/* Automatically generated header! Do not edit! */ - -#ifndef _GATEPROTO_AHIsub_H -#define _GATEPROTO_AHIsub_H - -#include -#include -#include -#include -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif /* __cplusplus */ - -#define __NOLIBBASE__ -#include -#undef __NOLIBBASE__ -#include - -struct Library* -gwLibInit( struct Library* ___library, - BPTR ___seglist, - struct ExecIFace* _iface); - -struct Library* -gwLibOpen(struct LibraryManagerInterface* _iface); - -BPTR -gwLibClose(struct LibraryManagerInterface* _iface); - -BPTR -gwLibExpunge(struct LibraryManagerInterface* _iface); - -ULONG -gwLibNull(struct LibraryManagerInterface* _iface); - -ULONG -gwAHIsub_AllocAudio(struct AHIsubIFace* _iface, - struct TagItem * ___tagList, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -void -gwAHIsub_FreeAudio(struct AHIsubIFace* _iface, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -void -gwAHIsub_Disable(struct AHIsubIFace* _iface, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -void -gwAHIsub_Enable(struct AHIsubIFace* _iface, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -ULONG -gwAHIsub_Start(struct AHIsubIFace* _iface, - ULONG ___Flags, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -ULONG -gwAHIsub_Update(struct AHIsubIFace* _iface, - ULONG ___Flags, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -ULONG -gwAHIsub_Stop(struct AHIsubIFace* _iface, - ULONG ___Flags, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -ULONG -gwAHIsub_SetVol(struct AHIsubIFace* _iface, - UWORD ___Channel, - Fixed ___Volume, - sposition ___Pan, - struct AHIAudioCtrlDrv * ___AudioCtrl, - ULONG ___Flags); - -ULONG -gwAHIsub_SetFreq(struct AHIsubIFace* _iface, - UWORD ___Channel, - ULONG ___Freq, - struct AHIAudioCtrlDrv * ___AudioCtrl, - ULONG ___Flags); - -ULONG -gwAHIsub_SetSound(struct AHIsubIFace* _iface, - UWORD ___Channel, - UWORD ___Sound, - ULONG ___Offset, - LONG ___Length, - struct AHIAudioCtrlDrv * ___AudioCtrl, - ULONG ___Flags); - -ULONG -gwAHIsub_SetEffect(struct AHIsubIFace* _iface, - APTR ___Effect, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -ULONG -gwAHIsub_LoadSound(struct AHIsubIFace* _iface, - UWORD ___Sound, - ULONG ___Type, - APTR ___Info, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -ULONG -gwAHIsub_UnloadSound(struct AHIsubIFace* _iface, - UWORD ___Sound, - struct AHIAudioCtrlDrv * ___Audioctrl); - -LONG -gwAHIsub_GetAttr(struct AHIsubIFace* _iface, - ULONG ___Attribute, - LONG ___Argument, - LONG ___DefValue, - struct TagItem * ___tagList, - struct AHIAudioCtrlDrv * ___AudioCtrl); - -LONG -gwAHIsub_HardwareControl(struct AHIsubIFace* _iface, - ULONG ___Attribute, - LONG ___Argument, - struct AHIAudioCtrlDrv * ___AudioCtrl); - - -#ifdef __cplusplus -} -#endif /* __cplusplus */ - -#endif /* _GATEPROTO_AHIsub_H */ diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/interrupt.c b/workbench/devs/AHI/Drivers/SB128/SB128/interrupt.c deleted file mode 100755 index 25de32d1ff..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/interrupt.c +++ /dev/null @@ -1,198 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#include - -#undef __USE_INLINE__ -#include -#include -#include -#include -#include "library.h" -#include "regs.h" -#include "interrupt.h" - -#define min(a,b) ((a)<(b)?(a):(b)) - -unsigned long z = 0; -/****************************************************************************** -** Hardware interrupt handler ************************************************* -******************************************************************************/ - - -LONG -CardInterrupt( struct ExceptionContext *pContext, struct ExecBase *SysBase, struct CardData* card ) -{ - struct AHIAudioCtrlDrv* AudioCtrl = card->audioctrl; - struct DriverBase* AHIsubBase = (struct DriverBase*) card->ahisubbase; - struct PCIDevice *dev = (struct PCIDevice * ) card->pci_dev; - - ULONG intreq; - LONG handled = 0; - while (((intreq = (dev->InLong(card->iobase + SB128_STATUS))) & SB128_INT_PENDING) != 0) - { - if( intreq & SB128_INT_DAC2 && AudioCtrl != NULL ) - { - /* Clear interrupt pending bit(s) and re-enable playback interrupts */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) & ~SB128_DAC2_INTEN)); - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) | SB128_DAC2_INTEN)); - - if (card->flip == 0) /* just played buf 1 */ - { - card->flip = 1; - card->current_buffer = card->playback_buffer; - } - else /* just played buf 2 */ - { - card->flip = 0; - card->current_buffer = (APTR) ((unsigned long) card->playback_buffer + card->current_bytesize); - } - - card->playback_interrupt_enabled = FALSE; - IExec->Cause( &card->playback_interrupt ); - } - - if( intreq & SB128_INT_ADC && AudioCtrl != NULL ) - { - /* Clear interrupt pending bit(s) and re-enable record interrupts */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) & ~SB128_ADC_INTEN)); - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) | SB128_ADC_INTEN)); - - if( card->record_interrupt_enabled ) - { - /* Invoke softint to convert and feed AHI with the new sample data */ - - if (card->recflip == 0) /* just filled buf 1 */ - { - card->recflip = 1; - card->current_record_buffer = card->record_buffer; - } - else /* just filled buf 2 */ - { - card->recflip = 0; - card->current_record_buffer = (APTR) ((unsigned long) card->record_buffer + card->current_record_bytesize); - } - card->record_interrupt_enabled = FALSE; - IExec->Cause( &card->record_interrupt ); - } - } - exit: - handled = 1; - - } - - return handled; -} - - -/****************************************************************************** -** Playback interrupt handler ************************************************* -******************************************************************************/ - -void -PlaybackInterrupt( struct ExceptionContext *pContext, struct ExecBase *SysBase, struct CardData* card ) -{ - struct AHIAudioCtrlDrv* AudioCtrl = card->audioctrl; - struct DriverBase* AHIsubBase = (struct DriverBase*) card->ahisubbase; - struct PCIDevice *dev = (struct PCIDevice * ) card->pci_dev; - - if( card->mix_buffer != NULL && card->current_buffer != NULL ) - { - BOOL skip_mix; - - WORD* src; - WORD* dst; - size_t skip; - size_t samples; - int i; - - skip_mix = IUtility->CallHookPkt( AudioCtrl->ahiac_PreTimerFunc, (Object*) AudioCtrl, 0 ); - IUtility->CallHookPkt( AudioCtrl->ahiac_PlayerFunc, (Object*) AudioCtrl, NULL ); - - if( ! skip_mix ) - { - IUtility->CallHookPkt( AudioCtrl->ahiac_MixerFunc, (Object*) AudioCtrl, card->mix_buffer ); - } - - /* Now translate and transfer to the DMA buffer */ - - skip = ( AudioCtrl->ahiac_Flags & AHIACF_HIFI ) ? 2 : 1; - samples = card->current_bytesize >> 1; - - src = card->mix_buffer; - dst = card->current_buffer; - - i = samples; - - while( i > 0 ) - { - *dst = ( ( *src & 0xff ) << 8 ) | ( ( *src & 0xff00 ) >> 8 ); - - src += skip; - dst += 1; - - --i; - } - - //Flush cache so that data is completely written to the DMA buffer - Articia hack - IExec->CacheClearE(card->current_buffer, card->current_bytesize, CACRF_ClearD); - - IUtility->CallHookPkt( AudioCtrl->ahiac_PostTimerFunc, (Object*) AudioCtrl, 0 ); - } - card->playback_interrupt_enabled = TRUE; -} - - -/****************************************************************************** -** Record interrupt handler *************************************************** -******************************************************************************/ - -void -RecordInterrupt( struct ExceptionContext *pContext, struct ExecBase *SysBase, struct CardData* card ) -{ - struct AHIAudioCtrlDrv* AudioCtrl = card->audioctrl; - struct DriverBase* AHIsubBase = (struct DriverBase*) card->ahisubbase; - struct PCIDevice *dev = (struct PCIDevice * ) card->pci_dev; - - struct AHIRecordMessage rm = - { - AHIST_S16S, - card->current_record_buffer, - RECORD_BUFFER_SAMPLES - }; - - int i = 0, shorts = card->current_record_bytesize / 2; - WORD* ptr = card->current_record_buffer; - - //Invalidate cache so that data read from DMA buffer is correct - Articia hack - IExec->CacheClearE(card->current_record_buffer, card->current_record_bytesize, CACRF_InvalidateD); - - while( i < shorts ) - { - *ptr = ( ( *ptr & 0xff ) << 8 ) | ( ( *ptr & 0xff00 ) >> 8 ); - - ++i; - ++ptr; - } - - IUtility->CallHookPkt( AudioCtrl->ahiac_SamplerFunc, (Object*) AudioCtrl, &rm ); - - //Invalidate cache so that data read from DMA buffer is correct - Articia hack - IExec->CacheClearE(card->current_record_buffer, card->current_record_bytesize, CACRF_InvalidateD); - - card->record_interrupt_enabled = TRUE; -} diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/interrupt.h b/workbench/devs/AHI/Drivers/SB128/SB128/interrupt.h deleted file mode 100755 index 32cba944f6..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/interrupt.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#ifndef AHI_Drivers_interrupt_h -#define AHI_Drivers_interrupt_h - -#include - -#include "DriverData.h" - -LONG -CardInterrupt( struct ExceptionContext *pContext, struct ExecBase *SysBase, struct CardData* dd ); - -void -PlaybackInterrupt( struct ExceptionContext *pContext, struct ExecBase *SysBase, struct CardData* dd ); - -void -RecordInterrupt( struct ExceptionContext *pContext, struct ExecBase *SysBase, struct CardData* dd ); - -#endif /* AHI_Drivers_interrupt_h */ diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/misc.c b/workbench/devs/AHI/Drivers/SB128/SB128/misc.c deleted file mode 100755 index 195c427ae6..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/misc.c +++ /dev/null @@ -1,1250 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#include - -#undef __USE_INLINE__ -#include - -#include - -#include - -#include "library_card.h" -#include "regs.h" -#include "interrupt.h" -#include "misc.h" -#include "DriverData.h" - -/* Global in Card.c */ -extern const UWORD InputBits[]; -extern struct DOSIFace *IDOS; - -//extern struct timerequest *TimerIO; -extern struct MsgPort* replymp; - -/* Public functions in main.c */ -int card_init(struct CardData *card); -void card_cleanup(struct CardData *card); - -void AddResetHandler(struct CardData *card); - -void MicroDelay(unsigned int val) -{ - struct Device* TimerBase = NULL; - struct TimeRequest* TimerIO = NULL; - struct MsgPort * replymp; - - replymp = (struct MsgPort *) IExec->CreatePort(NULL, 0); - if (!replymp) - { - IExec->DebugPrintF("SB128: Couldn't create reply port\n"); - return; - } - - TimerIO = (struct TimeRequest *)IExec->CreateIORequest(replymp, sizeof(struct TimeRequest)); - - if (TimerIO == NULL) - { - IExec->DebugPrintF("SB128: Out of memory.\n"); - return; - } - - if (IExec->OpenDevice("timer.device", UNIT_MICROHZ, (struct IORequest *)TimerIO, 0) != 0) - { - IExec->DebugPrintF("SB128: Unable to open 'timer.device'.\n"); - return; - } - else - { - TimerBase = (struct Device *)TimerIO->Request.io_Device; - } - - if (TimerIO) - { - TimerIO->Request.io_Command = TR_ADDREQUEST; - TimerIO->Time.Seconds = 0; - TimerIO->Time.Microseconds = val; - IExec->DoIO((struct IORequest *)TimerIO); - IExec->DeleteIORequest((struct IORequest *)TimerIO); - TimerIO = NULL; - IExec->CloseDevice((struct IORequest *)TimerIO); - IExec->DeletePort(replymp); - } -} - -unsigned long src_ready(struct CardData *card) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - unsigned int i; - unsigned long r; - - /* Wait for the busy bit to become invalid, and then return the contents - of the SRC register. */ - for (i = 0; i < 0x1000; i++) - { - if (!((r = dev->InLong(card->iobase + SB128_SRC)) & SRC_BUSY)) - return r; - //MicroDelay(1); - } - - IExec->DebugPrintF("SB128: SRC Ready timeout.\n"); - return 0; -} - -void src_write(struct CardData *card, unsigned short addr, unsigned short data) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - unsigned long r; - -// IExec->ObtainSemaphore(&card->sb128_semaphore); - - /* Get copy of SRC register when it's not busy, add address and data, write back. */ - r = src_ready(card) & (SRC_DISABLE | SRC_DIS_DAC2 | SRC_DIS_ADC); - r = r | (addr << SRC_ADDR_SHIFT); - r = r | data; - dev->OutLong(card->iobase + SB128_SRC, r | SRC_WE); - //MicroDelay(1); - -// IExec->ReleaseSemaphore(&card->sb128_semaphore); -} - -unsigned short src_read(struct CardData *card, unsigned short addr) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - - //There may be ES137x bugs that require accomodating in this section. - - unsigned long r; - -// IExec->ObtainSemaphore(&card->sb128_semaphore); - - /* Get copy of SRC register when it's not busy, add address, write back, - wait for ready, then read back value. */ - r = src_ready(card) & (SRC_DISABLE | SRC_DIS_DAC2 | SRC_DIS_ADC); - r = r | (addr << SRC_ADDR_SHIFT); - dev->OutLong(card->iobase + SB128_SRC, r); - - /* Give the chip a chance to set the busy bit. */ - //MicroDelay(1); - -// IExec->ReleaseSemaphore(&card->sb128_semaphore); - - return (src_ready(card) & 0xFFFF); -} - -/* Translate AC97 commands to AK4531 commands, and write to the AK4531 codec */ -void ak4531_ac97_write(struct CardData *card, unsigned short reg, unsigned short val) -{ - char ak4531_L1 = 0; - char ak4531_R1 = 0; - char ak4531_L2 = 0; - char ak4531_R2 = 0; - - char input_right = 0; - char input_left = 0; - - short left_vol = 0; - short right_vol = 0; - - float steps = 0; - - if (reg == AC97_RECORD_SELECT) - { - /* Change input select settings */ - input_right = val; - input_left = val >> 8; - - /* Translate as appropriate */ - switch (input_left) { - - case 0: - /* Mic */ - ak4531_L2 = 0x80; - break; - - case 1: - /* CD */ - ak4531_L1 = 0x04; - break; - - case 2: - /* Video */ - break; - - case 3: - /* Aux */ - ak4531_L2 = 0x10; - break; - - case 4: - /* Line in */ - ak4531_L1 = 0x10; - break; - - case 5: - /* Stereo Mix (all) */ - ak4531_L1 = 0x14; - ak4531_L2 = 0xF4; - break; - - case 6: - /* Mono Mix */ - break; - - case 7: - /* Phone */ - ak4531_L2 = 0x60; - break; - - default: - /* Shouldn't happen */ - IExec->DebugPrintF("SB128: Unsupported Record Input command\n"); - } - - switch (input_right) { - - case 0: - /* Mic */ - ak4531_R2 = 0x80; - break; - - case 1: - /* CD */ - ak4531_R1 = 0x02; - break; - - case 2: - /* Video */ - break; - - case 3: - /* Aux */ - ak4531_R2 = 0x08; - break; - - case 4: - /* Line in */ - ak4531_R1 = 0x08; - break; - - case 5: - /* Stereo Mix (all) */ - ak4531_R1 = 0x0A; - ak4531_R2 = 0xEC; - break; - - case 6: - /* Mono Mix */ - break; - - case 7: - /* Phone */ - ak4531_R2 = 0x60; - break; - - default: - /* Shouldn't happen */ - IExec->DebugPrintF("SB128: Unsupported Record Input command\n"); - } - - /* Write input values to AK4531 */ - - codec_write(card, AK4531_INPUT_MUX_L_1, ak4531_L1); - codec_write(card, AK4531_INPUT_MUX_R_1, ak4531_R1); - codec_write(card, AK4531_INPUT_MUX_L_2, ak4531_L2); - codec_write(card, AK4531_INPUT_MUX_R_2, ak4531_R2); - return; - } - - if (reg == AC97_PHONE_VOL || AC97_MIC_VOL || AC97_LINEIN_VOL || AC97_CD_VOL || AC97_AUX_VOL || AC97_PCMOUT_VOL) - { - /* Adjust PCM (from card) Input gain */ - if (val & AC97_MUTE) - { - /* Using a muted volume */ - right_vol = (AK4531_MUTE | 0x6); - left_vol = (AK4531_MUTE | 0x6); - } - else - { - /* Strip bits */ - right_vol = (val & 0x1F); - left_vol = (val >> 8); - - /* Convert right volume */ - if (right_vol < 0x8) - { - steps = 0x8 - right_vol; - steps = steps * 1.5; - steps = steps / 2; - right_vol = (int) (steps + 0.5); - right_vol = 0x6 - right_vol; - } - else if (right_vol > 0x8) - { - steps = right_vol - 0x8; - steps = steps * 1.5; - steps = steps / 2; - right_vol = (int) (steps + 0.5); - right_vol = 0x6 + right_vol; - } - else if (right_vol == 0x8) - { - /* No attentuation, no mute */ - right_vol = 0x6; - } - - /* Convert left volume */ - if (left_vol < 0x8) - { - steps = 0x8 - left_vol; - steps = steps * 1.5; - steps = steps / 2; - left_vol = (int) (steps + 0.5); - left_vol = 0x6 - left_vol; - } - else if (left_vol > 0x8) - { - steps = left_vol - 0x8; - steps = steps * 1.5; - steps = steps / 2; - left_vol = (int) (steps + 0.5); - left_vol = 0x6 + left_vol; - } - else if (left_vol == 0x8) - { - /* No attentuation, no mute */ - left_vol = 0x6; - } - - } - - /* Write adjusted volume to appropriate place */ - /* Un-mute, and disable output, if an input muted */ - switch (reg) { - - case AC97_PHONE_VOL: - codec_write(card, AK4531_PHONE_VOL_L, right_vol); - codec_write(card, AK4531_PHONE_VOL_R, right_vol); - break; - - case AC97_MIC_VOL: - codec_write(card, AK4531_MIC_VOL, right_vol); - break; - - case AC97_LINEIN_VOL: - if ((left_vol & AK4531_MUTE) && (right_vol & AK4531_MUTE)) - { - left_vol = 0x6; - right_vol = 0x6; - /* Disable on OUTPUT mux */ - card->ak4531_output_1 = (card->ak4531_output_1 & ~(AK4531_OUTPUT_LINE)); - codec_write(card, AK4531_OUTPUT_MUX_1, card->ak4531_output_1); - } - else - { - codec_write(card, AK4531_LINEIN_VOL_L, left_vol); - codec_write(card, AK4531_LINEIN_VOL_R, right_vol); - /* Re-enable on OUTPUT mux */ - card->ak4531_output_1 = (card->ak4531_output_1 | AK4531_OUTPUT_LINE); - codec_write(card, AK4531_OUTPUT_MUX_1, card->ak4531_output_1); - } - break; - - case AC97_CD_VOL: - if ((left_vol & AK4531_MUTE) && (right_vol & AK4531_MUTE)) - { - left_vol = 0x6; - right_vol = 0x6; - /* Disable on OUTPUT mux */ - card->ak4531_output_1 = (card->ak4531_output_1 & ~(AK4531_OUTPUT_CD)); - codec_write(card, AK4531_OUTPUT_MUX_1, card->ak4531_output_1); - } - else - { - codec_write(card, AK4531_CD_VOL_L, left_vol); - codec_write(card, AK4531_CD_VOL_R, right_vol); - /* Re-enable on OUTPUT mux */ - card->ak4531_output_1 = (card->ak4531_output_1 | AK4531_OUTPUT_CD); - codec_write(card, AK4531_OUTPUT_MUX_1, card->ak4531_output_1); - } - break; - - case AC97_AUX_VOL: - if ((left_vol & AK4531_MUTE) && (right_vol & AK4531_MUTE)) - { - left_vol = 0x6; - right_vol = 0x6; - /* Disable on OUTPUT mux */ - card->ak4531_output_2 = (card->ak4531_output_2 & ~(AK4531_OUTPUT_AUX)); - codec_write(card, AK4531_OUTPUT_MUX_2, card->ak4531_output_2); - } - else - { - codec_write(card, AK4531_AUX_VOL_L, left_vol); - codec_write(card, AK4531_AUX_VOL_R, right_vol); - /* Re-enable on OUTPUT mux */ - card->ak4531_output_2 = (card->ak4531_output_2 | AK4531_OUTPUT_AUX); - codec_write(card, AK4531_OUTPUT_MUX_2, card->ak4531_output_2); - } - break; - - case AC97_PCMOUT_VOL: - codec_write(card, AK4531_PCMOUT_VOL_L, left_vol); - codec_write(card, AK4531_PCMOUT_VOL_R, right_vol); - break; - - default: - IExec->DebugPrintF("SB128: Invalid value for Volume Set\n"); - } - - return; - - } - -} - -void codec_write(struct CardData *card, unsigned short reg, unsigned short val) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - unsigned long i, r; - - /* Take hold of the hardware semaphore */ - //IExec->ObtainSemaphore(&card->sb128_semaphore); - - if(card->es1370) - { - for (i = 0; i < 10; i++) - { - if (!(dev->InLong(card->iobase + SB128_STATUS) & CODEC_CSTAT )) - goto es1370_ok1; - IDOS->Delay(1); - } - IExec->DebugPrintF("SB128: Couldn't write to ak4531!\n"); - return; - - es1370_ok1: - dev->OutWord(card->iobase + ES1370_SB128_CODEC, ((unsigned char)reg << ES1370_CODEC_ADD_SHIFT) | (unsigned char)val); - MicroDelay(100); - } - else - { - - /* Check for WIP. */ - for (i = 0; i < 0x1000; i++) - { - if (!(dev->InLong(card->iobase + SB128_CODEC) & CODEC_WIP )) - goto ok1; - } - IExec->DebugPrintF("SB128: Couldn't write to ac97! (1)\n"); - //IExec->ReleaseSemaphore(&card->sb128_semaphore); - return; - - ok1: - /* Get copy of SRC register when it's not busy. */ - r = src_ready(card); - /* Enable "SRC State Data", an undocumented feature! */ - dev->OutLong(card->iobase + SB128_SRC, (r & (SRC_DISABLE | SRC_DIS_DAC2 | - SRC_DIS_ADC)) | 0x00010000); - - /* Wait for "state 0", to avoid "transition states". */ - for (i = 0; i < 0x1000; i++) - { - if ((dev->InLong(card->iobase + SB128_SRC) & 0x00870000) == 0x00) - break; - //MicroDelay(1); - } - - /* Now wait for an undocumented bit to be set (and the SRC to be NOT busy) */ - for (i = 0; i < 0x1000; i++) - { - if ((dev->InLong(card->iobase + SB128_SRC) & 0x00870000) == 0x00010000) - break; - //MicroDelay(1); - } - - /* Write out the value to the codec now. */ - dev->OutLong(card->iobase + SB128_CODEC, (((reg << CODEC_ADD_SHIFT) & CODEC_ADD_MASK) | val)); - - /* Delay to make sure the chip had time to set the WIP after - the codec write. */ - //MicroDelay(1); - - /* Restore SRC register. */ - src_ready(card); - dev->OutLong(card->iobase + SB128_SRC, r); - - /* Check for WIP before returning. */ - for (i = 0; i < 0x1000; i++) - { - if (!(dev->InLong(card->iobase + SB128_CODEC) & CODEC_WIP)) - { - //IExec->ReleaseSemaphore(&card->sb128_semaphore); - return; - } - } - - IExec->DebugPrintF("SB128: Couldn't write to ac97! (2)\n"); - } - - //IExec->ReleaseSemaphore(&card->sb128_semaphore); - return; -} - -unsigned short codec_read(struct CardData *card, unsigned short reg) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - unsigned long i, r; - unsigned short val; - - if(card->es1370) - return 0; - -//IExec->ObtainSemaphore(&card->sb128_semaphore); - - /* Check for WIP. */ - for (i = 0; i < 0x1000; i++) { - if (!((dev->InLong(card->iobase + SB128_CODEC)) & CODEC_WIP )) - goto ok1; - } - IExec->DebugPrintF("SB128: Couldn't read from ac97! (1)\n"); -// IExec->ReleaseSemaphore(&card->sb128_semaphore); - return 0; - - ok1: - - /* Get copy of SRC register when it's not busy. */ - r = src_ready(card); - - /* Enable "SRC State Data", an undocumented feature! */ - dev->OutLong(card->iobase + SB128_SRC, (r & (SRC_DISABLE | SRC_DIS_DAC1 | SRC_DIS_DAC2 | - SRC_DIS_ADC)) | 0x00010000); - - /* Wait for "state 0", to avoid "transition states". - Seen in open code. */ - for (i = 0; i < 0x1000; i++) - { - if ((dev->InLong(card->iobase + SB128_SRC) & 0x00870000) == 0x00) - break; - //MicroDelay(1); - } - - /* Now wait for an undocumented bit to be set (and the SRC to be NOT busy) */ - for (i = 0; i < 0x1000; i++) - { - if ((dev->InLong(card->iobase + SB128_SRC) & 0x00870000) == 0x00010000) - break; - //MicroDelay(1); - } - - /* Write the read request to the chip now */ - dev->OutLong(card->iobase + SB128_CODEC, (((reg << CODEC_ADD_SHIFT) & CODEC_ADD_MASK) | CODEC_READ)); - - /* Give the chip time to respond to our read request. */ - //MicroDelay(1); - - /* Restore SRC register. */ - src_ready(card); - dev->OutLong(card->iobase + SB128_SRC, r); - - /* Check for WIP. */ - for (i = 0; i < 0x1000; i++) { - if (!((dev->InLong(card->iobase + SB128_CODEC)) & CODEC_WIP)) - goto ok2; - } - IExec->DebugPrintF("SB128: Couldn't read from ac97 (2)!\n"); -// IExec->ReleaseSemaphore(&card->sb128_semaphore); - return 0; - - ok2: - - /* Wait for RDY. */ - //MicroDelay(1); - for (i = 0; i < 0x1000; i++) { - if (!((dev->InLong(card->iobase + SB128_CODEC)) & CODEC_RDY)) - goto ok3; - } - IExec->DebugPrintF("SB128: Couldn't read from ac97 (3)!\n"); -// IExec->ReleaseSemaphore(&card->sb128_semaphore); - return 0; - - ok3: - //MicroDelay(5); - IDOS->Delay(1); //A delay here is crucial, remove this if you use MicroDelay() - val = dev->InLong(card->iobase + SB128_CODEC); - -// IExec->ReleaseSemaphore(&card->sb128_semaphore); - - return val; -} - -void rate_set_adc(struct CardData *card, unsigned long rate) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - - unsigned long n, truncm, freq; - - //IExec->ObtainSemaphore(&card->sb128_semaphore); - - if (rate > 48000) - rate = 48000; - if (rate < 4000) - rate = 4000; - - if (card->es1370) - { - dev->OutLong(card->iobase + SB128_CONTROL, ((dev->InLong(card->iobase + SB128_CONTROL) & ~DAC2_DIV_MASK) | (DAC2_SRTODIV(rate) << DAC2_DIV_SHIFT))); - } - else - { - - /* This is completely undocumented */ - n = rate / 3000; - if ((1 << n) & ((1 << 15) | (1 << 13) | (1 << 11) | (1 << 9))) - n--; - truncm = (21 * n - 1) | 1; - freq = ((48000UL << 15) / rate) * n; - - if (rate >= 24000) - { - if (truncm > 239) - truncm = 239; - src_write(card, SRC_ADC + SRC_TRUNC, (((239 - truncm) >> 1) << 9) | (n << 4)); - } - else - { - if (truncm > 119) - truncm = 119; - src_write(card, SRC_ADC + SRC_TRUNC, 0x8000 | (((119 - truncm) >> 1) << 9) | (n << 4)); - } - src_write(card, SRC_ADC + SRC_INT, - (src_read(card, SRC_ADC + SRC_INT) & 0x00FF) | ((freq >> 5) & 0xFC00)); - src_write(card, SRC_ADC + SRC_VF, freq & 0x7FFF); - src_write(card, SRC_VOL_ADC, n << 8); - src_write(card, SRC_VOL_ADC + 1, n << 8); - - } - - //IExec->ReleaseSemaphore(&card->sb128_semaphore); - -} - -void rate_set_dac2(struct CardData *card, unsigned long rate) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - - unsigned long freq, r; - - //IExec->ObtainSemaphore(&card->sb128_semaphore); - - if (rate > 48000) - rate = 48000; - if (rate < 4000) - rate = 4000; - - if(card->es1370) - { - dev->OutLong(card->iobase + SB128_CONTROL, ((dev->InLong(card->iobase + SB128_CONTROL) & ~DAC2_DIV_MASK) | (DAC2_SRTODIV(rate) << DAC2_DIV_SHIFT))); - } - else - { - - freq = ((rate << 15 ) + 1500) / 3000; - - /* Get copy of SRC register when it's not busy, clear, preserve the disable bits, write back. */ - r = src_ready(card) & (SRC_DISABLE | SRC_DIS_DAC1 | SRC_DIS_DAC2 | SRC_DIS_ADC); - dev->OutLong(card->iobase + SB128_SRC, r); - - /* This is completely undocumented */ - src_write(card, SRC_DAC2 + SRC_INT, - (src_read(card, SRC_DAC2 + SRC_INT) & 0x00FF) | ((freq >> 5) & 0xFC00)); - src_write(card, SRC_DAC2 + SRC_VF, freq & 0x7FFF); - r = (src_ready(card) & (SRC_DISABLE | SRC_DIS_DAC1 | SRC_DIS_ADC)); - dev->OutLong(card->iobase + SB128_SRC, r); - - } - - //IExec->ReleaseSemaphore(&card->sb128_semaphore); - -} - -/****************************************************************************** -** DriverData allocation ****************************************************** -******************************************************************************/ - -/* This code used to be in _AHIsub_AllocAudio(), but since we're now - handling CAMD support too, it needs to be done at driver loading - time. */ - -struct CardData* -AllocDriverData( struct PCIDevice * dev, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - struct CardData* card; - UWORD command_word; - int i; - BOOL res = FALSE; - - // FIXME: This should be non-cachable, DMA-able memory - card = IExec->AllocVec( sizeof( *card ), MEMF_PUBLIC | MEMF_CLEAR ); - - if( card == NULL ) - { - Req( "Unable to allocate driver structure." ); - return NULL; - } - - card->ahisubbase = AHIsubBase; - - card->interrupt.is_Node.ln_Type = NT_EXTINTERRUPT; - card->interrupt.is_Node.ln_Pri = 0; - card->interrupt.is_Node.ln_Name = (STRPTR) LibName; - card->interrupt.is_Code = (void(*)(void)) CardInterrupt; - card->interrupt.is_Data = (APTR) card; - - card->playback_interrupt.is_Node.ln_Type = NT_INTERRUPT; - card->playback_interrupt.is_Node.ln_Pri = 0; - card->playback_interrupt.is_Node.ln_Name = (STRPTR) LibName; - card->playback_interrupt.is_Code = PlaybackInterrupt; - card->playback_interrupt.is_Data = (APTR) card; - - card->record_interrupt.is_Node.ln_Type = NT_INTERRUPT; - card->record_interrupt.is_Node.ln_Pri = 0; - card->record_interrupt.is_Node.ln_Name = (STRPTR) LibName; - card->record_interrupt.is_Code = RecordInterrupt; - card->record_interrupt.is_Data = (APTR) card; - - card->pci_dev = dev; - - command_word = dev->ReadConfigWord( PCI_COMMAND ); - command_word |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER; - dev->WriteConfigWord( PCI_COMMAND, command_word ); - - card->pci_master_enabled = TRUE; - - card->iobase = dev->GetResourceRange(0)->BaseAddress; - card->length = ~( dev->GetResourceRange(0)->Size & PCI_BASE_ADDRESS_IO_MASK ); - card->irq = dev->MapInterrupt(); - card->chiprev = dev->ReadConfigByte( PCI_REVISION_ID); - card->model = dev->ReadConfigWord( PCI_SUBSYSTEM_ID); - - IExec->DebugPrintF("SB128: Device = %x, Vendor = %x, Revision = %x\n", dev->ReadConfigWord(PCI_DEVICE_ID), - dev->ReadConfigWord(PCI_VENDOR_ID), dev->ReadConfigByte(PCI_REVISION_ID)); - - - /* Initialise hardware access Semaphore */ - IExec->InitSemaphore(&card->sb128_semaphore); - - - /* Initialize chip */ - if( card_init( card ) < 0 ) - { - IExec->DebugPrintF("SB128: Unable to initialize Card subsystem."); - return NULL; - } - - - res = IExec->AddIntServer(dev->MapInterrupt(), &card->interrupt ); - card->interrupt_added = TRUE; - - - card->card_initialized = TRUE; - card->input = 0; - card->output = 0; - card->monitor_volume = Linear2MixerGain( 0, &card->monitor_volume_bits ); - card->input_gain = Linear2RecordGain( 0x10000, &card->input_gain_bits ); - card->output_volume = Linear2MixerGain( 0x10000, &card->output_volume_bits ); - SaveMixerState(card); - - AddResetHandler(card); - - return card; -} - - -/****************************************************************************** -** DriverData deallocation **************************************************** -******************************************************************************/ - -/* And this code used to be in _AHIsub_FreeAudio(). */ - -void -FreeDriverData( struct CardData* card, - struct DriverBase* AHIsubBase ) -{ - if( card != NULL ) - { - if( card->pci_dev != NULL ) - { - if( card->card_initialized ) - { - card_cleanup( card ); - } - - if( card->pci_master_enabled ) - { - UWORD cmd; - - cmd = ((struct PCIDevice * ) card->pci_dev)->ReadConfigWord( PCI_COMMAND ); - cmd &= ~( PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER ); - ((struct PCIDevice * ) card->pci_dev)->WriteConfigWord( PCI_COMMAND, cmd ); - } - } - - if( card->interrupt_added ) - { - IExec->RemIntServer(((struct PCIDevice * ) card->pci_dev)->MapInterrupt(), &card->interrupt ); - } - - IExec->FreeVec( card ); - } -} - - -int card_init(struct CardData *card) -{ - struct PCIDevice *dev = (struct PCIDevice *) card->pci_dev; - unsigned short cod; - unsigned int i; - - /* Check if the card is an original ES1370 - different code needed */ - if (dev->ReadConfigWord(2) == 0x5000) - card->es1370 = TRUE; - else - card->es1370 = FALSE; - - /* Different init sequence for the ES1370 */ - if (card->es1370) - { - /* Enable CODEC access, set DAC sample rate to 44100 */ - dev->OutLong(card->iobase + SB128_CONTROL, CTRL_CDC_EN | (DAC2_SRTODIV(44100) << DAC2_DIV_SHIFT)); - dev->OutLong(card->iobase + SB128_SCON, 0x00); - IExec->DebugPrintF("SB128: Did RATE init\n"); - - /* CODEC initialisation */ - codec_write(card, AK4531_RESET, 0x03); /* Enable CODEC */ - codec_write(card, AK4531_CLOCK_SEL, 0x00); /* CODEC ADC and DAC use PLL */ - codec_write(card, AK4531_RECORD_SELECT, 0x00); /* CODEC ADC set to use mixer for input */ - codec_write(card, AK4531_RECORD_GAIN_MIC, 0x00); /* Mic gain set to 0 dB */ - - /* Volume initialisation */ - codec_write(card, AK4531_MASTER_VOL_L, 0x00); /* No attentuation */ - codec_write(card, AK4531_MASTER_VOL_R, 0x00); - codec_write(card, AK4531_MASTER_VOL_MONO, 0x00); - - /* Analogue mixer input gain registers */ - codec_write(card, AK4531_PHONE_VOL_L, AK4531_MUTE | 0x06); - codec_write(card, AK4531_PHONE_VOL_R, AK4531_MUTE | 0x06); - codec_write(card, AK4531_MIC_VOL, AK4531_MUTE | 0x06); - codec_write(card, AK4531_LINEIN_VOL_L, AK4531_MUTE | 0x06); - codec_write(card, AK4531_LINEIN_VOL_R, AK4531_MUTE | 0x06); - codec_write(card, AK4531_CD_VOL_L, 0x06); - codec_write(card, AK4531_CD_VOL_R, 0x06); - codec_write(card, AK4531_AUX_VOL_L, 0x06); - codec_write(card, AK4531_AUX_VOL_R, 0x06); - codec_write(card, AK4531_PCMOUT_VOL_L, 0x06); - codec_write(card, AK4531_PCMOUT_VOL_R, 0x06); - - /* Mixer registers */ - - /* Always on */ - codec_write(card, AK4531_OUTPUT_MUX_1, 0x1F); - codec_write(card, AK4531_OUTPUT_MUX_2, 0x3F); - - /* Store value of OUTPUT MUX registers */ - card->ak4531_output_1 = 0x1F; - card->ak4531_output_2 = 0x3F; - - /* Analogous to "Record Select", only TMIC and Phone enabled here */ - codec_write(card, AK4531_INPUT_MUX_L_1, 0x00); - codec_write(card, AK4531_INPUT_MUX_R_1, 0x00); - codec_write(card, AK4531_INPUT_MUX_L_2, 0x80); - codec_write(card, AK4531_INPUT_MUX_R_2, 0x80); - - IExec->DebugPrintF("SB128: Did VOLUME init\n"); - } - else - { - /* Basic clear of everything */ - dev->OutLong(card->iobase + SB128_CONTROL, 0x00); - dev->OutLong(card->iobase + SB128_SCON, 0x00); - dev->OutLong(card->iobase + SB128_LEGACY, 0x00); - - /* Magical CT5880 AC97 enable bit plus 20ms delay - (Gotta love the undocumented stuff) */ - dev->OutLong(card->iobase + SB128_STATUS, 0x20000000); - IDOS->Delay(1); - - /* Assert the AC97 reset, and wait 20ms */ - dev->OutLong(card->iobase + SB128_CONTROL, CODEC_RESET); - IDOS->Delay(1); - /* De-assert delay, and wait 20ms */ - dev->OutLong(card->iobase + SB128_CONTROL, 0x00); - IDOS->Delay(1); - - IExec->DebugPrintF("SB128: Did AC97 reset.\n"); - - /* Disable the Sample Rate Converter (SRC) */ - src_ready(card); - dev->OutLong(card->iobase + SB128_SRC, SRC_DISABLE); - /* Clear the SRC RAM */ - for (i = 0; i < 0x80; i++) - src_write(card, i, 0); - - IExec->DebugPrintF("SB128: Did SRC wipe.\n"); - - /* Perform basic configuration of the SRC, not well documented! */ - src_write(card, SRC_DAC1 + SRC_TRUNC, 0x100); - src_write(card, SRC_DAC1 + SRC_INT, 0x4000); - src_write(card, SRC_DAC2 + SRC_TRUNC, 0x100); - src_write(card, SRC_DAC2 + SRC_INT, 0x4000); - src_write(card, SRC_VOL_ADC, 0x1000); - src_write(card, SRC_VOL_ADC + 1, 0x1000); - src_write(card, SRC_VOL_DAC1, 0x1000); - src_write(card, SRC_VOL_DAC1 + 1, 0x1000); - src_write(card, SRC_VOL_DAC2, 0x1000); - src_write(card, SRC_VOL_DAC2 + 1, 0x1000); - - IExec->DebugPrintF("SB128: Did SRC init.\n"); - - rate_set_adc(card, 44100); - rate_set_dac2(card, 44100); - - /* Re-enable the SRC */ - src_ready(card); - dev->OutLong(card->iobase + SB128_SRC, 0); - - card->currentPlayFreq = 9; - card->currentRecFreq = 9; - - IExec->DebugPrintF("SB128: Did RATE init.\n"); - - /* Initialise registers of AC97 to default */ - codec_write(card, AC97_RESET, 0x00); - - /* Initialise volumes of AC97 */ - codec_write(card, AC97_MASTER_VOL_STEREO, 0x0000 ); /* no attenuation */ - codec_write(card, AC97_AUXOUT_VOL, 0x0000 ); /* volume of the rear output */ - codec_write(card, AC97_MASTER_VOL_MONO, 0x0000 ); - codec_write(card, AC97_MASTER_TONE, 0x0f0f ); /* bass/treble control (if present) */ - - codec_write(card, AC97_RECORD_SELECT, 0); - codec_write(card, AC97_RECORD_GAIN, 0x0000 ); /* 0 dB gain */ - - /* Analogue mixer input gain registers */ - codec_write(card, AC97_PHONE_VOL, AC97_MUTE | 0x0008 ); - codec_write(card, AC97_MIC_VOL, AC97_MUTE | 0x0008 ); - codec_write(card, AC97_LINEIN_VOL, AC97_MUTE | 0x0808 ); - codec_write(card, AC97_CD_VOL, 0x0808 ); - codec_write(card, AC97_VIDEO_VOL, AC97_MUTE | 0x0808 ); - codec_write(card, AC97_AUX_VOL, 0x0808 ); - codec_write(card, AC97_PCMOUT_VOL, 0x0808 ); - - IExec->DebugPrintF("SB128: Did VOLUME init.\n"); - - cod = codec_read(card, AC97_RESET); - IExec->DebugPrintF("SB128: AC97 capabilities = %x\n", cod); - - cod = codec_read(card, AC97_VENDOR_ID0); - IExec->DebugPrintF("SB128: AC97_VENDOR_ID0 = %x\n", cod); - - cod = codec_read(card, AC97_VENDOR_ID1); - IExec->DebugPrintF("SB128: AC97_VENDOR_ID1 = %x\n", cod); - } - - return 0; -} - - -void card_cleanup(struct CardData *card) -{ -} - - - -/****************************************************************************** -** Misc. ********************************************************************** -******************************************************************************/ - -void -SaveMixerState( struct CardData* card ) -{ - card->ac97_mic = codec_read( card, AC97_MIC_VOL ); - card->ac97_cd = codec_read( card, AC97_CD_VOL ); - card->ac97_aux = codec_read( card, AC97_AUX_VOL ); - card->ac97_linein = codec_read( card, AC97_LINEIN_VOL ); - card->ac97_phone = codec_read( card, AC97_PHONE_VOL ); -} - - -void -RestoreMixerState( struct CardData* card ) -{ - if(card->es1370) - { - /* Not possible to save the state, so restore all volumes to mid levels */ - ak4531_ac97_write(card, AC97_MIC_VOL, 0x0808); - ak4531_ac97_write(card, AC97_CD_VOL, 0x0808); - ak4531_ac97_write(card, AC97_AUX_VOL, 0x0808); - ak4531_ac97_write(card, AC97_LINEIN_VOL, 0x0808); - ak4531_ac97_write(card, AC97_PHONE_VOL, 0x0808); - } - else - { - codec_write(card, AC97_MIC_VOL, card->ac97_mic ); - codec_write(card, AC97_CD_VOL, card->ac97_cd ); - codec_write(card, AC97_AUX_VOL, card->ac97_aux ); - codec_write(card, AC97_LINEIN_VOL, card->ac97_linein ); - codec_write(card, AC97_PHONE_VOL, card->ac97_phone ); - } -} - -void -UpdateMonitorMixer( struct CardData* card ) -{ - int i = InputBits[ card->input ]; - UWORD m = card->monitor_volume_bits & 0x801f; - UWORD s = card->monitor_volume_bits; - UWORD mm = AC97_MUTE | 0x0008; - UWORD sm = AC97_MUTE | 0x0808; - - if( i == AC97_RECMUX_STEREO_MIX ) - { - /* Use the original mixer settings */ - RestoreMixerState( card ); - } - else - { - if(card->es1370) - { - ak4531_ac97_write(card, AC97_MIC_VOL, - i == AC97_RECMUX_MIC ? m : mm ); - - ak4531_ac97_write(card, AC97_CD_VOL, - i == AC97_RECMUX_CD ? s : sm ); - - ak4531_ac97_write(card, AC97_AUX_VOL, - i == AC97_RECMUX_AUX ? s : sm ); - - ak4531_ac97_write(card, AC97_LINEIN_VOL, - i == AC97_RECMUX_LINE ? s : sm ); - - ak4531_ac97_write(card, AC97_PHONE_VOL, - i == AC97_RECMUX_PHONE ? m : mm ); - } - else - { - codec_write(card, AC97_MIC_VOL, - i == AC97_RECMUX_MIC ? m : mm ); - - codec_write(card, AC97_CD_VOL, - i == AC97_RECMUX_CD ? s : sm ); - - codec_write(card, AC97_AUX_VOL, - i == AC97_RECMUX_AUX ? s : sm ); - - codec_write(card, AC97_LINEIN_VOL, - i == AC97_RECMUX_LINE ? s : sm ); - - codec_write(card, AC97_PHONE_VOL, - i == AC97_RECMUX_PHONE ? m : mm ); - } - } -} - - -Fixed -Linear2MixerGain( Fixed linear, - UWORD* bits ) -{ - static const Fixed gain[ 33 ] = - { - 260904, /* +12.0 dB */ - 219523, /* +10.5 dB */ - 184706, /* +9.0 dB */ - 155410, /* +7.5 dB */ - 130762, /* +6.0 dB */ - 110022, /* +4.5 dB */ - 92572, /* +3.0 dB */ - 77890, /* +1.5 dB */ - 65536, /* ±0.0 dB */ - 55142, /* -1.5 dB */ - 46396, /* -3.0 dB */ - 39037, /* -4.5 dB */ - 32846, /* -6.0 dB */ - 27636, /* -7.5 dB */ - 23253, /* -9.0 dB */ - 19565, /* -10.5 dB */ - 16462, /* -12.0 dB */ - 13851, /* -13.5 dB */ - 11654, /* -15.0 dB */ - 9806, /* -16.5 dB */ - 8250, /* -18.0 dB */ - 6942, /* -19.5 dB */ - 5841, /* -21.0 dB */ - 4915, /* -22.5 dB */ - 4135, /* -24.0 dB */ - 3479, /* -25.5 dB */ - 2927, /* -27.0 dB */ - 2463, /* -28.5 dB */ - 2072, /* -30.0 dB */ - 1744, /* -31.5 dB */ - 1467, /* -33.0 dB */ - 1234, /* -34.5 dB */ - 0 /* -oo dB */ - }; - - int v = 0; - while( linear < gain[ v ] ) - { - ++v; - } - - if( v == 32 ) - { - *bits = 0x8000; /* Mute */ - } - else - { - *bits = ( v << 8 ) | v; - } - return gain[ v ]; -} - -Fixed -Linear2RecordGain( Fixed linear, - UWORD* bits ) -{ - static const Fixed gain[ 17 ] = - { - 873937, /* +22.5 dB */ - 735326, /* +21.0 dB */ - 618700, /* +19.5 dB */ - 520571, /* +18.0 dB */ - 438006, /* +16.5 dB */ - 368536, /* +15.0 dB */ - 310084, /* +13.5 dB */ - 260904, /* +12.0 dB */ - 219523, /* +10.5 dB */ - 184706, /* +9.0 dB */ - 155410, /* +7.5 dB */ - 130762, /* +6.0 dB */ - 110022, /* +4.5 dB */ - 92572, /* +3.0 dB */ - 77890, /* +1.5 dB */ - 65536, /* ±0.0 dB */ - 0 /* -oo dB */ - }; - - int v = 0; - - while( linear < gain[ v ] ) - { - ++v; - } - - if( v == 16 ) - { - *bits = 0x8000; /* Mute */ - } - else - { - *bits = ( ( 15 - v ) << 8 ) | ( 15 - v ); - } - - return gain[ v ]; -} - - -ULONG -SamplerateToLinearPitch( ULONG samplingrate ) -{ - samplingrate = (samplingrate << 8) / 375; - return (samplingrate >> 1) + (samplingrate & 1); -} - - -void *pci_alloc_consistent(size_t size, APTR * NonAlignedAddress) -{ - void* address; - unsigned long a; - - if (IExec->OpenResource("newmemory.resource")) - { - address = IExec->AllocVecTags(size, AVT_Type, MEMF_SHARED, AVT_Contiguous, TRUE, AVT_Lock, TRUE, - AVT_PhysicalAlignment, CACHELINE_SIZE, AVT_Clear, 0, TAG_DONE); - - *NonAlignedAddress = address; - } - else - { - address = IExec->AllocVec(size + CACHELINE_SIZE, MEMF_PUBLIC | MEMF_CLEAR); - - *NonAlignedAddress = address; - - if( address != NULL ) - { - a = (unsigned long) address; - a = (a + CACHELINE_SIZE - 1) & ~(CACHELINE_SIZE - 1); - address = (void *) a; - } - - } - - return address; -} - - -void pci_free_consistent(void* addr) -{ - IExec->FreeVec(addr); -} - -static ULONG ResetHandler(struct ExceptionContext *ctx, struct ExecBase *pExecBase, struct CardData *card) -{ - struct PCIDevice *dev = card->pci_dev; - - //Stop SB128 interrupts and playback/recording - unsigned long ctrl; - - ctrl = dev->InLong(card->iobase + SB128_CONTROL); - ctrl &= ( ~(CTRL_DAC2_EN) & ~(CTRL_ADC_EN) ); - - /* Stop */ - dev->OutLong(card->iobase + SB128_CONTROL, ctrl); - - /* Clear and mask interrupts */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON)) & SB128_IRQ_MASK); - - return 0UL; -} - -void AddResetHandler(struct CardData *card) -{ - static struct Interrupt interrupt; - - interrupt.is_Code = (void (*)())ResetHandler; - interrupt.is_Data = (APTR) card; - interrupt.is_Node.ln_Pri = 0; - interrupt.is_Node.ln_Type = NT_EXTINTERRUPT; - interrupt.is_Node.ln_Name = "SB128 Reset Handler"; - - IExec->AddResetCallback( &interrupt ); -} - diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/misc.h b/workbench/devs/AHI/Drivers/SB128/SB128/misc.h deleted file mode 100755 index b072dc886c..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/misc.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#ifndef AHI_Drivers_misc_h -#define AHI_Drivers_h - -#include - -#include -#include -#include - -void codec_write(struct CardData *card, unsigned short reg, unsigned short val); -unsigned short codec_read(struct CardData *card, unsigned short reg); - -void ak4531_ac97_write(struct CardData *card, unsigned short reg, unsigned short val); - -struct CardData* -AllocDriverData( struct PCIDevice* dev, - struct DriverBase* AHIsubBase ); - -void -FreeDriverData( struct CardData* card, - struct DriverBase* AHIsubBase ); - -void -SaveMixerState( struct CardData* card ); - -void -RestoreMixerState( struct CardData* card ); - -void -UpdateMonitorMixer( struct CardData* card ); - -Fixed -Linear2MixerGain( Fixed linear, - UWORD* bits ); - -Fixed -Linear2RecordGain( Fixed linear, - UWORD* bits ); - -ULONG -SamplerateToLinearPitch( ULONG samplingrate ); - -void *pci_alloc_consistent(size_t size, APTR * NonAlignedaddress); - -void pci_free_consistent(void* addr); - -#endif /* AHI_Drivers_misc_h */ diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/regs.h b/workbench/devs/AHI/Drivers/SB128/SB128/regs.h deleted file mode 100755 index a7f9bc8530..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/regs.h +++ /dev/null @@ -1,260 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#ifndef _REGS_H -#define _REGS_H - -#define CACHELINE_SIZE 32 - -/* Basic registers */ - -#define SB128_CONTROL 0x00 -#define SB128_STATUS 0x04 - -#define SB128_MIDI_DATA 0x08 -#define SB128_MIDI_STATUS 0x09 -#define SB128_MIDI_TEST 0x0A - -#define SB128_MEMPAGE 0x0C - -#define SB128_SRC 0x10 - -#define SB128_CODEC 0x14 - -#define SB128_LEGACY 0x18 - -#define SB128_SCON 0x20 - -#define SB128_DAC1_SCOUNT 0x24 -#define SB128_DAC2_SCOUNT 0x28 -#define SB128_ADC_SCOUNT 0x2C - -#define SB128_PAGE_DAC 0x0C -#define SB128_PAGE_ADC 0x0D - -#define SB128_DAC1_FRAME 0x30 -#define SB128_DAC1_COUNT 0x34 -#define SB128_DAC2_FRAME 0x38 -#define SB128_DAC2_COUNT 0x3C -#define SB128_ADC_FRAME 0x30 -#define SB128_ADC_COUNT 0x34 - - /* ES1370 specific, not present on other chips */ - - #define ES1370_SB128_CODEC 0x10 - - - -/* DAC/ADC and misc Control */ - -#define CTRL_DAC1_EN 0x00000040 /* Enable DAC1 */ -#define CTRL_DAC2_EN 0x00000020 /* Enable DAC2 */ -#define CTRL_ADC_EN 0x00000010 /* Enable ADC */ - - /* ES1370 specific, not present on other chips */ - - #define CTRL_CDC_EN 0x00000002 /* Enable Codec Control */ - - /* Magical formula for DAC2 frequency */ - #define DAC2_SRTODIV(x) (((1411200 + (x) / 2) / (x) - 2) & 0x1fff) - - #define DAC2_DIV_SHIFT 16 - - #define DAC2_DIV_MASK 0x1fff0000 - - -/* Codec Control */ - -#define CODEC_RESET 0x00004000 - -#define CODEC_WIP 0x40000000 -#define CODEC_RDY 0x80000000 - -#define CODEC_ADD_SHIFT 16 -#define CODEC_ADD_MASK 0x007F0000 -#define CODEC_READ 0x00800000 - - /* ES1370 specific, not present on other chips */ - - #define CODEC_CSTAT 0x00000200 - - #define ES1370_CODEC_ADD_SHIFT 8 - -/* Sample Rate Converter */ - -#define SRC_DISABLE 0x00400000 -#define SRC_BUSY 0x00800000 -#define SRC_DIS_DAC1 0x00200000 -#define SRC_DIS_DAC2 0x00100000 -#define SRC_DIS_ADC 0x00080000 - -#define SRC_DAC1 0x70 -#define SRC_DAC2 0x74 -#define SRC_ADC 0x78 - -#define SRC_VOL_ADC 0x6C -#define SRC_VOL_DAC1 0x7C -#define SRC_VOL_DAC2 0x7E - - -/* Offsets for some "Magic" SRC bits */ - -#define SRC_TRUNC 0x00 -#define SRC_INT 0x01 -#define SRC_VF 0x03 - -#define SRC_ADDR_SHIFT 25 -#define SRC_WE 0x01000000 - - -/* Interrupts */ - -#define SB128_IRQ_MASK 0xFFFFF8FF /* To disable all playback/record interrupts */ -#define SB128_INT_PENDING 0x80000000 /* Interrupt pending */ -#define SB128_INT_DAC1 0x00000004 /* DAC1 Interrupt pending */ -#define SB128_INT_DAC2 0x00000002 /* DAC2 Interrupt pending */ -#define SB128_INT_ADC 0x00000001 /* ADC Interrupt pending */ -#define SB128_DAC1_INTEN 0x00000100 /* Enable DAC1 Interrupts */ -#define SB128_DAC2_INTEN 0x00000200 /* Enable DAC2 Interrupts */ -#define SB128_ADC_INTEN 0x00000400 /* Enable ADC Interrupts */ - - -/* Data Format */ - -#define SB128_STEREO 0x1 -#define SB128_16BIT 0x2 - - - -/* ES1370 specific - AK4531 registers */ - - /* Output volumes */ - -#define AK4531_MASTER_VOL_L 0x00 /* -62 dB to 0 dB attentuation */ -#define AK4531_MASTER_VOL_R 0x01 /* -62 dB to 0 dB attentuation */ - -#define AK4531_MASTER_VOL_MONO 0x0F /* -28 dB to 0 dB attentuation */ - - /* Input gain */ - -#define AK4531_PCMOUT_VOL_L 0x02 /* Adjustable gain from -50 dB to +12 dB for all below */ -#define AK4531_PCMOUT_VOL_R 0x03 -#define AK4531_CD_VOL_L 0x06 -#define AK4531_CD_VOL_R 0x07 -#define AK4531_LINEIN_VOL_L 0x08 -#define AK4531_LINEIN_VOL_R 0x09 -#define AK4531_AUX_VOL_L 0x0A -#define AK4531_AUX_VOL_R 0x0B -#define AK4531_PHONE_VOL_L 0x0C -#define AK4531_PHONE_VOL_R 0x0D -#define AK4531_MIC_VOL 0x0E - - /* Mixer registers */ - -#define AK4531_OUTPUT_MUX_1 0x10 -#define AK4531_OUTPUT_MUX_2 0x11 - -#define AK4531_INPUT_MUX_L_1 0x12 -#define AK4531_INPUT_MUX_R_1 0x13 - -#define AK4531_INPUT_MUX_L_2 0x14 -#define AK4531_INPUT_MUX_R_2 0x15 - - /* Output MUX bits */ - -#define AK4531_OUTPUT_CD 0x06 -#define AK4531_OUTPUT_LINE 0x18 -#define AK4531_OUTPUT_AUX 0x30 - - /* Other stuff */ - -#define AK4531_MUTE 0x80 - -#define AK4531_RECORD_SELECT 0x18 /* Input from mixer or external pins */ - -#define AK4531_RECORD_GAIN_MIC 0x19 /* Either 0 dB or 30 dB gain */ - -#define AK4531_RESET 0x16 -#define AK4531_CLOCK_SEL 0x17 - - - -/* AC97 Registers */ - -#define AC97_RESET 0x0000 - - -/* Play master volume registers */ - -#define AC97_MASTER_VOL_STEREO 0x0002 /* -94.5 to 0.0 dB attenuation */ -#define AC97_AUXOUT_VOL 0x0004 /* "" + can be impl. as line level out, headphone out or 4ch out. Most likely 4ch out vol. */ -#define AC97_MASTER_VOL_MONO 0x0006 /* "" */ - -#define AC97_MASTER_TONE 0x0008 /* bass / treble */ -#define AC97_PCBEEP_VOL 0x000a - - -/* Analog mixer input gain registers - 5-bit gain: -32.5 dB attenuation to +12.0 dB gain - 0x0008 is 0dB gain, 0x8008 is 0dB gain with mute on */ - -#define AC97_PHONE_VOL 0x000c /* mono: only bits 0-4 */ -#define AC97_MIC_VOL 0x000e /* mono + bit 6 is 20dB boost switch */ -#define AC97_LINEIN_VOL 0x0010 /* stereo */ -#define AC97_CD_VOL 0x0012 -#define AC97_VIDEO_VOL 0x0014 -#define AC97_AUX_VOL 0x0016 -#define AC97_PCMOUT_VOL 0x0018 - -#define AC97_RECORD_SELECT 0x001a - - -/* 0dB to 22.5 dB gain on the stereo input */ - -#define AC97_RECORD_GAIN 0x001c -#define AC97_RECORD_GAIN_MIC 0x001e - -#define AC97_GENERAL_PURPOSE 0x0020 -#define AC97_3D_CONTROL 0x0022 - - -/* Mostly a read-only register (except D5 and D4 which control optional DAC slot assignment) - controls variable SRC, double-rate output, multi-channel output and S/PDIF output */ - -#define AC97_EXTENDED_ID 0x0028 -#define AC97_EXTENDED_CTRL 0x002a - -#define AC97_SPDIF_CTRL 0x003a - -#define AC97_SURROUND_MASTER 0x0038 - -#define AC97_VENDOR_ID0 0x007C -#define AC97_VENDOR_ID1 0x007E - -#define AC97_MUTE 0x8000 - -#define AC97_RECMUX_MIC 0x0000 -#define AC97_RECMUX_CD 0x0101 -#define AC97_RECMUX_VIDEO 0x0202 -#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 - - -#endif /* _REGS_H */ diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/sb128.c b/workbench/devs/AHI/Drivers/SB128/SB128/sb128.c deleted file mode 100755 index 03e3ba49e3..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/sb128.c +++ /dev/null @@ -1,743 +0,0 @@ -/* - -The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at -http://www.aros.org/license.html - -Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF -ANY KIND, either express or implied. See the License for the specific language governing rights and -limitations under the License. - -The Original Code is (C) Copyright 2004-2011 Ross Vumbaca. - -The Initial Developer of the Original Code is Ross Vumbaca. - -All Rights Reserved. - -*/ - -#include - -#undef __USE_INLINE__ -#include -extern struct UtilityIFace* IUtility; -extern struct AHIsubIFace* IAHIsub; -extern struct MMUIFace* IMMU; - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include "library_card.h" -#include "regs.h" -#include "misc.h" -#include "DriverData.h" - -extern void rate_set_dac2(struct CardData *card, unsigned long rate); -extern void rate_set_adc(struct CardData *card, unsigned long rate); - -/****************************************************************************** -** Globals ******************************************************************** -******************************************************************************/ - -#define FREQUENCIES 11 - -static const ULONG Frequencies[ FREQUENCIES ] = -{ - 5500, - 8000, /* µ- and A-Law */ - 9600, - 11025, /* CD/4 */ - 16000, /* DAT/3 */ - 19200, - 22050, /* CD/2 */ - 32000, /* DAT/1.5 */ - 38400, - 44100, /* CD */ - 48000 /* DAT */ -}; - -#define INPUTS 6 - -static const STRPTR Inputs[ INPUTS ] = -{ - "Line in", - "Mic", - "CD", - "Aux", - "Mixer", - "Phone" -}; - -/* Not static since it's used in misc.c too */ -const UWORD InputBits[ INPUTS ] = -{ - AC97_RECMUX_LINE, - AC97_RECMUX_MIC, - AC97_RECMUX_CD, - AC97_RECMUX_AUX, - AC97_RECMUX_STEREO_MIX, - AC97_RECMUX_PHONE -}; - - -#define OUTPUTS 1 - -static const STRPTR Outputs[ OUTPUTS ] = -{ - "Front", -}; - - -/****************************************************************************** -** AHIsub_AllocAudio ********************************************************** -******************************************************************************/ - -ULONG -_AHIsub_AllocAudio( struct TagItem* taglist, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - - int card_num; - ULONG ret; - int i, freq = 9; - - card_num = ( IUtility->GetTagData( AHIDB_AudioID, 0, taglist) & 0x0000f000 ) >> 12; - - if( card_num >= CardBase->cards_found || - CardBase->driverdatas[ card_num ] == NULL ) - { - IExec->DebugPrintF("no data for card = %ld\n", card_num); - Req( "No CardData for card %ld.", card_num ); - return AHISF_ERROR; - } - else - { - struct CardData* card; - BOOL in_use; - struct PCIDevice *dev; - - card = CardBase->driverdatas[ card_num ]; - AudioCtrl->ahiac_DriverData = card; - - IExec->ObtainSemaphore( &CardBase->semaphore ); - in_use = ( card->audioctrl != NULL ); - if( !in_use ) - { - card->audioctrl = AudioCtrl; - } - IExec->ReleaseSemaphore( &CardBase->semaphore ); - - if( in_use ) - { - return AHISF_ERROR; - } - - dev = card->pci_dev; - card->playback_interrupt_enabled = FALSE; - card->record_interrupt_enabled = FALSE; - /* Clears playback/record interrupts */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON)) & SB128_IRQ_MASK); - - for( i = 1; i < FREQUENCIES; i++ ) - { - if( (ULONG) Frequencies[ i ] > AudioCtrl->ahiac_MixFreq ) - { - if ( ( AudioCtrl->ahiac_MixFreq - (LONG) Frequencies[ i - 1 ] ) < ( (LONG) Frequencies[ i ] - AudioCtrl->ahiac_MixFreq ) ) - { - freq = i-1; - break; - } - else - { - freq = i; - break; - } - } - } - - } - - ret = AHISF_KNOWHIFI | AHISF_KNOWSTEREO | AHISF_MIXING | AHISF_TIMING; - - - for( i = 0; i < FREQUENCIES; ++i ) - { - if( AudioCtrl->ahiac_MixFreq == Frequencies[ i ] ) - { - ret |= AHISF_CANRECORD; - break; - } - } - - return ret; -} - - - -/****************************************************************************** -** AHIsub_FreeAudio *********************************************************** -******************************************************************************/ - -void -_AHIsub_FreeAudio( struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - struct CardData* card = (struct CardData*) AudioCtrl->ahiac_DriverData; - - if( card != NULL ) - { - IExec->ObtainSemaphore( &CardBase->semaphore ); - if( card->audioctrl == AudioCtrl ) - { - /* Release it if we own it. */ - card->audioctrl = NULL; - } - IExec->ReleaseSemaphore( &CardBase->semaphore ); - - AudioCtrl->ahiac_DriverData = NULL; - } -} - - -/****************************************************************************** -** AHIsub_Disable ************************************************************* -******************************************************************************/ - -void -_AHIsub_Disable( struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - - /* V6 drivers do not have to preserve all registers */ - - IExec->Disable(); -} - - -/****************************************************************************** -** AHIsub_Enable ************************************************************** -******************************************************************************/ - -void -_AHIsub_Enable( struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - - /* V6 drivers do not have to preserve all registers */ - - IExec->Enable(); -} - - -/****************************************************************************** -** AHIsub_Start *************************************************************** -******************************************************************************/ - -ULONG -_AHIsub_Start( ULONG flags, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - struct CardData* card = (struct CardData*) AudioCtrl->ahiac_DriverData; - struct PCIDevice *dev = card->pci_dev; - unsigned long PlayCtrlFlags = 0, RecCtrlFlags = 0; - ULONG dma_buffer_size = 0; - int i, freqbit = 9; - unsigned long scon = 0; - APTR stack; - - for( i = 0; i < FREQUENCIES; ++i ) - { - if( AudioCtrl->ahiac_MixFreq == Frequencies[ i ] ) - { - freqbit = i; - break; - } - } - - if( flags & AHISF_PLAY ) - { - - ULONG dma_sample_frame_size; - int i; - short *a; - unsigned short cod, ChannelsFlag; - - ChannelsFlag = 0; - - /* Update cached/syncronized variables */ - - IAHIsub->AHIsub_Update( AHISF_PLAY, AudioCtrl ); - - /* Allocate a new mixing buffer. Note: The buffer must be cleared, since - it might not be filled by the mixer software interrupt because of - pretimer/posttimer! */ - - card->mix_buffer = IExec->AllocVec( AudioCtrl->ahiac_BuffSize, - MEMF_PUBLIC | MEMF_CLEAR ); - - if( card->mix_buffer == NULL ) - { - Req( "Unable to allocate %ld bytes for mixing buffer.", - AudioCtrl->ahiac_BuffSize ); - return AHIE_NOMEM; - } - - /* Allocate a buffer large enough for 16-bit double-buffered - playback (mono or stereo) */ - - if( AudioCtrl->ahiac_Flags & AHIACF_STEREO ) - { - dma_sample_frame_size = 4; - dma_buffer_size = AudioCtrl->ahiac_MaxBuffSamples * dma_sample_frame_size; - ChannelsFlag = SB128_STEREO; - } - else - { - dma_sample_frame_size = 2; - dma_buffer_size = AudioCtrl->ahiac_MaxBuffSamples * dma_sample_frame_size; - } - - card->playback_buffer = pci_alloc_consistent(dma_buffer_size * 2, &card->playback_buffer_nonaligned); - - if (!card->playback_buffer) - { - Req( "Unable to allocate playback buffer." ); - return AHIE_NOMEM; - } - - /* Enable Playback interrupt */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) | SB128_DAC2_INTEN)); - - card->current_bytesize = dma_buffer_size; - card->current_frames = AudioCtrl->ahiac_MaxBuffSamples; - card->current_buffer = card->playback_buffer + card->current_bytesize; - card->playback_interrupt_enabled = TRUE; - - card->flip = 0; - - /* Select the DAC2 Memory Page */ - dev->OutLong(card->iobase + SB128_MEMPAGE, SB128_PAGE_DAC); - - /* Buffer address and length (in longwords) is set */ - stack = IExec->SuperState(); - card->playback_buffer_phys = IMMU->GetPhysicalAddress(card->playback_buffer); - IExec->UserState(stack); - - dev->OutLong(card->iobase + SB128_DAC2_FRAME, (unsigned long)(card->playback_buffer_phys)); - dev->OutLong(card->iobase + SB128_DAC2_COUNT, (((dma_buffer_size * 2) >> 2) - 1) & 0xFFFF); - - /* Playback format is always 16 Bit, Stereo, but checks exist in case of a Mono mode (not possible). */ - PlayCtrlFlags = (SB128_16BIT | ChannelsFlag) << 2; - - /* Set frequency */ - if (card->currentPlayFreq != freqbit) - { - rate_set_dac2(card, Frequencies[freqbit]); - card->currentPlayFreq = freqbit; - } - card->is_playing = TRUE; - } - - if( flags & AHISF_RECORD ) - { - UWORD mask; - - card->current_record_bytesize = RECORD_BUFFER_SAMPLES * 4; - - /* Allocate a new recording buffer (page aligned!) */ - card->record_buffer = pci_alloc_consistent(card->current_record_bytesize * 2, &card->record_buffer_nonaligned); - - if( card->record_buffer == NULL ) - { - Req( "Unable to allocate %ld bytes for the recording buffer.", card->current_record_bytesize); - return AHIE_NOMEM; - } - - SaveMixerState( card ); - UpdateMonitorMixer( card ); - - /* Enable record interrupt */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) | SB128_ADC_INTEN)); - - card->record_interrupt_enabled = TRUE; - - card->recflip = 0; - - /* Select the ADC Memory Page */ - dev->OutLong(card->iobase + SB128_MEMPAGE, SB128_PAGE_ADC); - - /* Buffer address and length (in longwords) is set */ - stack = IExec->SuperState(); - card->record_buffer_phys = IMMU->GetPhysicalAddress(card->record_buffer); - IExec->UserState(stack); - - dev->OutLong(card->iobase + SB128_ADC_FRAME, (unsigned long) card->record_buffer_phys); - dev->OutLong(card->iobase + SB128_ADC_COUNT, (((card->current_record_bytesize * 2) >> 2) - 1) & 0xFFFF); - - card->is_recording = TRUE; - card->current_record_buffer = card->record_buffer + card->current_record_bytesize; - - /* Record format is always 16 Bit, Stereo */ - RecCtrlFlags = (SB128_16BIT | SB128_STEREO) << 4; - - /* Set frequency */ - if (card->currentRecFreq != freqbit) - { - rate_set_adc(card, Frequencies[freqbit]); - card->currentRecFreq = freqbit; - } - } - - if( flags & AHISF_PLAY ) - { - /* Set Sample Count per Interrupt */ - if (PlayCtrlFlags & 0x04) - dev->OutLong(card->iobase + SB128_DAC2_SCOUNT, ((dma_buffer_size >> 2) - 1) & 0xFFFF); - else - dev->OutLong(card->iobase + SB128_DAC2_SCOUNT, ((dma_buffer_size >> 1) - 1) & 0xFFFF); - /* Set format, ENDINC set to 2 */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) | PlayCtrlFlags | 2 << 19)); - /* Start playback! */ - dev->OutLong(card->iobase + SB128_CONTROL, (dev->InLong(card->iobase + SB128_CONTROL) | CTRL_DAC2_EN)); - } - - if( flags & AHISF_RECORD ) - { - /* Set Sample Count per Interrupt */ - dev->OutLong(card->iobase + SB128_ADC_SCOUNT, ((card->current_record_bytesize >> 2) - 1) & 0xFFFF); - /* Set format */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON) | RecCtrlFlags)); - /* Start recording! */ - dev->OutLong(card->iobase + SB128_CONTROL, (dev->InLong(card->iobase + SB128_CONTROL) | CTRL_ADC_EN)); - } - - return AHIE_OK; -} - - -/****************************************************************************** -** AHIsub_Update ************************************************************** -******************************************************************************/ - -void -_AHIsub_Update( ULONG flags, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - struct CardData* card = (struct CardData*) AudioCtrl->ahiac_DriverData; - - card->current_frames = AudioCtrl->ahiac_BuffSamples; - - if( AudioCtrl->ahiac_Flags & AHIACF_STEREO ) - { - card->current_bytesize = card->current_frames * 4; - } - else - { - card->current_bytesize = card->current_frames * 2; - } -} - - -/****************************************************************************** -** AHIsub_Stop **************************************************************** -******************************************************************************/ - -void -_AHIsub_Stop( ULONG flags, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - struct CardData* card = (struct CardData*) AudioCtrl->ahiac_DriverData; - struct PCIDevice *dev = card->pci_dev; - - - if( flags & AHISF_PLAY ) - { - unsigned long play_ctl; - card->is_playing= FALSE; - - play_ctl = dev->InLong(card->iobase + SB128_CONTROL); - play_ctl &= ~(CTRL_DAC2_EN); - /* Stop */ - dev->OutLong(card->iobase + SB128_CONTROL, play_ctl); - - /* Clear and mask interrupts */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON)) & SB128_IRQ_MASK); - - if (card->current_bytesize > 0) - pci_free_consistent(card->playback_buffer_nonaligned); - - card->current_bytesize = 0; - card->current_frames = 0; - card->current_buffer = NULL; - - if ( card->mix_buffer) - IExec->FreeVec( card->mix_buffer ); - card->mix_buffer = NULL; - card->playback_interrupt_enabled = FALSE; - card->current_bytesize = 0; - } - - if( flags & AHISF_RECORD ) - { - unsigned long rec_ctl, val; - - rec_ctl = dev->InLong(card->iobase + SB128_CONTROL); - rec_ctl &= ~(CTRL_ADC_EN); - /* Stop */ - dev->OutLong(card->iobase + SB128_CONTROL, rec_ctl); - - /* Clear and mask interrupts */ - dev->OutLong(card->iobase + SB128_SCON, (dev->InLong(card->iobase + SB128_SCON)) & SB128_IRQ_MASK); - - if( card->is_recording ) - { - /* Do not restore mixer unless they have been saved */ - RestoreMixerState( card ); - } - - if( card->record_buffer != NULL ) - { - pci_free_consistent( card->record_buffer_nonaligned); - } - - card->record_buffer = NULL; - card->current_record_bytesize = 0; - - card->is_recording = FALSE; - card->record_interrupt_enabled = FALSE; - } - - -} - - -/****************************************************************************** -** AHIsub_GetAttr ************************************************************* -******************************************************************************/ - -LONG -_AHIsub_GetAttr( ULONG attribute, - LONG argument, - LONG def, - struct TagItem* taglist, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - int i; - - - switch( attribute ) - { - case AHIDB_Bits: - return 16; - - case AHIDB_Frequencies: - return FREQUENCIES; - - case AHIDB_Frequency: /* Index->Frequency */ - return (LONG) Frequencies[ argument ]; - - case AHIDB_Index: /* Frequency->Index */ - if( argument <= (LONG) Frequencies[ 0 ] ) - { - return 0; - } - - if( argument >= (LONG) Frequencies[ FREQUENCIES - 1 ] ) - { - return FREQUENCIES-1; - } - - for( i = 1; i < FREQUENCIES; i++ ) - { - if( (LONG) Frequencies[ i ] > argument ) - { - if( ( argument - (LONG) Frequencies[ i - 1 ] ) < ( (LONG) Frequencies[ i ] - argument ) ) - { - return i-1; - } - else - { - return i; - } - } - } - - return 0; /* Will not happen */ - - case AHIDB_Author: - return (LONG) "Ross Vumbaca"; - - case AHIDB_Copyright: - return (LONG) "(C) Ross Vumbaca"; - - case AHIDB_Version: - return (LONG) LibIDString; - - case AHIDB_Annotation: - return (LONG) - "OS4 PPC native driver"; - - case AHIDB_Record: - return TRUE; - - case AHIDB_FullDuplex: - return TRUE; - - case AHIDB_Realtime: - return TRUE; - - case AHIDB_MaxRecordSamples: - return RECORD_BUFFER_SAMPLES; - - /* formula's: - #include - - unsigned long res = (unsigned long) (0x10000 * pow (10.0, dB / 20.0)); - double dB = 20.0 * log10(0xVALUE / 65536.0); - - printf("dB = %f, res = %lx\n", dB, res);*/ - - case AHIDB_MinMonitorVolume: - return 0x004d2; - - case AHIDB_MaxMonitorVolume: - return 0x3fb27; - - case AHIDB_MinInputGain: - return 0x10000; /* 0.0 dB gain */ - - case AHIDB_MaxInputGain: - return 0xD55D0; /* 22.5 dB gain */ - - case AHIDB_MinOutputVolume: - return 0x004d2; /* -34.5 dB / mute */ - - case AHIDB_MaxOutputVolume: - return 0x3fb27; /* 12 dB */ - - case AHIDB_Inputs: - return INPUTS; - - case AHIDB_Input: - return (LONG) Inputs[ argument ]; - - case AHIDB_Outputs: - return OUTPUTS; - - case AHIDB_Output: - return (LONG) Outputs[ argument ]; - - default: - return def; - } -} - - -/****************************************************************************** -** AHIsub_HardwareControl ***************************************************** -******************************************************************************/ - -ULONG -_AHIsub_HardwareControl( ULONG attribute, - LONG argument, - struct AHIAudioCtrlDrv* AudioCtrl, - struct DriverBase* AHIsubBase ) -{ - struct CardBase* CardBase = (struct CardBase*) AHIsubBase; - struct CardData* card = (struct CardData*) AudioCtrl->ahiac_DriverData; - - switch( attribute ) - { - case AHIC_MonitorVolume: - card->monitor_volume = Linear2MixerGain( (Fixed) argument, &card->monitor_volume_bits ); - if( card->is_recording ) - { - UpdateMonitorMixer( card ); - } - return TRUE; - - case AHIC_MonitorVolume_Query: - return card->monitor_volume; - - case AHIC_InputGain: - card->input_gain = Linear2RecordGain( (Fixed) argument, &card->input_gain_bits ); - if(card->es1370) - { - /* Not supported on ES1370 */ - } - else - codec_write(card, AC97_RECORD_GAIN, card->input_gain_bits ); - return TRUE; - - case AHIC_InputGain_Query: - return card->input_gain; - - case AHIC_OutputVolume: - card->output_volume = Linear2MixerGain( (Fixed) argument, &card->output_volume_bits ); - if(card->es1370) - { - ak4531_ac97_write(card, AC97_PCMOUT_VOL, card->output_volume_bits ); - } - else - codec_write(card, AC97_PCMOUT_VOL, card->output_volume_bits ); - return TRUE; - - case AHIC_OutputVolume_Query: - return card->output_volume; - - case AHIC_Input: - card->input = argument; - if(card->es1370) - { - ak4531_ac97_write(card, AC97_RECORD_SELECT, InputBits[ card->input ] ); - } - else - codec_write(card, AC97_RECORD_SELECT, InputBits[ card->input ] ); - - if( card->is_recording ) - { - UpdateMonitorMixer( card ); - } - return TRUE; - - case AHIC_Input_Query: - return card->input; - - case AHIC_Output: - card->output = argument; - - if( card->output == 0 ) - { - } - else - { - } - return TRUE; - - case AHIC_Output_Query: - return card->output; - - default: - return FALSE; - } -} diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/version.date b/workbench/devs/AHI/Drivers/SB128/SB128/version.date deleted file mode 100755 index 8abfd61d6f..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/version.date +++ /dev/null @@ -1 +0,0 @@ -18.08.11 diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/version.h b/workbench/devs/AHI/Drivers/SB128/SB128/version.h deleted file mode 100755 index c41ce604d4..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/version.h +++ /dev/null @@ -1,3 +0,0 @@ -#define VERSION 5 -#define REVISION 24 -#define VERS "5.24 (18.08.11)" diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/version.rev b/workbench/devs/AHI/Drivers/SB128/SB128/version.rev deleted file mode 100755 index a45fd52cc5..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/version.rev +++ /dev/null @@ -1 +0,0 @@ -24 diff --git a/workbench/devs/AHI/Drivers/SB128/SB128/version.ver b/workbench/devs/AHI/Drivers/SB128/SB128/version.ver deleted file mode 100755 index 7ed6ff82de..0000000000 --- a/workbench/devs/AHI/Drivers/SB128/SB128/version.ver +++ /dev/null @@ -1 +0,0 @@ -5 -- 2.11.4.GIT