Annotation of XNU/iokit/Drivers/audio/drvPPCAwacs/PPCAwacs.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
                      3:  *
                      4:  * @APPLE_LICENSE_HEADER_START@
                      5:  * 
                      6:  * The contents of this file constitute Original Code as defined in and
                      7:  * are subject to the Apple Public Source License Version 1.1 (the
                      8:  * "License").  You may not use this file except in compliance with the
                      9:  * License.  Please obtain a copy of the License at
                     10:  * http://www.apple.com/publicsource and read it before using this file.
                     11:  * 
                     12:  * This Original Code and all software distributed under the License are
                     13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
                     14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
                     15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
                     16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
                     17:  * License for the specific language governing rights and limitations
                     18:  * under the License.
                     19:  * 
                     20:  * @APPLE_LICENSE_HEADER_END@
                     21:  */
                     22: /*
                     23:  * Copyright (c) 1998 Apple Computer, Inc.  All rights reserved. 
                     24:  *
                     25:  * Interface definition for the Awacs audio Controller 
                     26:  *
                     27:  * HISTORY
                     28:  *
                     29:  */
                     30: 
                     31: #ifndef _PPCAWACS_H
                     32: #define _PPCAWACS_H
                     33: 
                     34: #include <IOKit/audio/IOAudioBus.h>
                     35: 
                     36: struct awacs_regmap_t;
                     37: struct IODBDMAChannelRegisters;
                     38: struct IODBDMADescriptor;
                     39: 
                     40: // 2 Digital DMA streams
                     41: #define kNumDMAStreams 2
                     42: 
                     43: // Controls for awacs/screamer
                     44: enum {
                     45:     kSpeakerMute = 0,
                     46:     kSpeakerVolLeft = 1,
                     47:     kSpeakerVolRight = 2,
                     48:     kHeadphonesMute = 3,
                     49:     kHeadphonesVolLeft = 4,
                     50:     kHeadphonesVolRight = 5,
                     51:     kMicrophoneMute = 6,
                     52:     kCDMute = 7,
                     53:     kMixerInVolLeft = 8,
                     54:     kMixerInVolRight = 9,
                     55:     kPassThruVolLeft = 10,
                     56:     kPassThruVolRight = 11,
                     57:     kPassThruMute = 12,
                     58:     kLineOutMute = 13,
                     59:     kNumControls
                     60: };
                     61: 
                     62: class PPCAwacs : public IOAudioBus
                     63: {
                     64:     OSDeclareDefaultStructors(PPCAwacs)
                     65: 
                     66: protected:
                     67:     volatile awacs_regmap_t *  fIOBaseAwacs;
                     68:     u_int32_t                  fSoundControlRegister;
                     69:     u_int32_t                  fCodecControlRegister[8];
                     70:     u_int32_t                  fCodecStatus;
                     71:     bool                       fIICAudioDevPresent;
                     72:     bool                       fIsG4WithAwacs;
                     73:     bool                       fIsiMacDVWithAwacs;
                     74:     IOAudioComponentImpl *     fInputComponents[4];
                     75: 
                     76:     // Stuff extracted from the sound device tree nub
                     77:     int                                fDetects;
                     78:     int                                fOutputs;
                     79: 
                     80: public:
                     81:     bool init(OSDictionary * properties = 0);
                     82:     void free();
                     83:     bool start(IOService * provider);
                     84:     void stop(IOService *provider);
                     85: 
                     86:     /*
                     87:      * Set a control to a value
                     88:      * Called by IOAudioControls, on the workloop thread.
                     89:      */
                     90:     virtual IOReturn SetControl(UInt16 id, int val);
                     91: 
                     92: protected:
                     93:     virtual void CreateAudioTopology(IOCommandQueue *queue);
                     94:     
                     95:     // Override these so we can call checkStatus().
                     96:     virtual void DoClockTick(IOTimerEventSource *);
                     97:     virtual void calculateTickInterval(AbsoluteTime *tickInterval);
                     98: 
                     99:     // Poll awacs status, since it doesn't generate interrupts
                    100:     virtual void checkStatus();
                    101: 
                    102: };
                    103: #endif /* !_PPCAWACS_H */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.