PlatformInterfaceI2C.h [plain text]
#ifndef __PLATFORMINTERFACE_I2C__
#define __PLATFORMINTERFACE_I2C__
#include <IOKit/IOService.h>
#include <IOKit/IODeviceTreeSupport.h>
#include <IOKit/IORegistryEntry.h>
#include "AudioHardwareUtilities.h"
#include "AudioHardwareConstants.h"
#include "PlatformInterfaceSupportCommon.h"
#include "AppleOnboardAudioUserClient.h"
class AppleOnboardAudio;
class PlatformInterfaceI2C : public OSObject {
OSDeclareDefaultStructors ( PlatformInterfaceI2C );
public:
virtual bool init ( IOService* device, AppleOnboardAudio* provider, UInt32 inDBDMADeviceIndex );
virtual void free ();
virtual void setWorkLoop ( IOWorkLoop* inWorkLoop ) { mWorkLoop = inWorkLoop; }
virtual IOReturn performPowerStateChange ( IOService * device, UInt32 currentPowerState, UInt32 pendingPowerState ) { return kIOReturnSuccess; }
virtual IOReturn readCodecRegister ( UInt32 codecRef, UInt8 subAddress, UInt8 *data, UInt32 dataLength ) { return kIOReturnError; }
virtual IOReturn WriteCodecRegister ( UInt32 codecRef, UInt8 subAddress, UInt8 *data, UInt32 dataLength ) { return kIOReturnError; }
virtual IOReturn setMAP ( UInt32 codecRef, UInt8 subAddress ) { return kIOReturnError; }
virtual UInt32 getSavedMAP ( UInt32 codecRef );
virtual void saveMAP ( UInt32 codecRef, UInt32 map );
protected:
AppleOnboardAudio * mProvider;
IOWorkLoop * mWorkLoop;
UInt32 mMAPArray[kCodec_NumberOfTypes];
};
#endif