2 Copyright � 2004-2014, Davy Wentzler. All rights reserved.
6 #ifndef AHI_Drivers_misc_h
7 #define AHI_Drivers_misc_h
11 #include <devices/ahi.h>
12 #include <DriverData.h>
15 void ClearMask8(struct CardData
*card
, unsigned char reg
, unsigned char mask
);
16 void WriteMask8(struct CardData
*card
, unsigned char reg
, unsigned char mask
);
18 void MicroDelay(unsigned int val
);
20 unsigned char ReadCCI(struct CardData
*card
, unsigned char address
);
21 void WriteCCI(struct CardData
*card
, unsigned char address
, unsigned char data
);
22 unsigned char GetGPIOData(struct CardData
*card
);
23 void SetGPIOData(struct CardData
*card
, unsigned char data
);
24 void SaveGPIOStatus(struct CardData
*card
);
25 void RestoreGPIOStatus(struct CardData
*card
);
27 void codec_write(struct CardData
*card
, unsigned short reg
, unsigned short val
);
28 unsigned short codec_read(struct CardData
*card
, unsigned short reg
);
32 AllocDriverData( struct PCIDevice
* dev
,
33 struct DriverBase
* AHIsubBase
);
36 FreeDriverData( struct CardData
* card
,
37 struct DriverBase
* AHIsubBase
);
40 Linear2MixerGain( Fixed linear
,
44 Linear2RecordGain( Fixed linear
,
48 SamplerateToLinearPitch( ULONG samplingrate
);
50 void *pci_alloc_consistent(size_t size
, APTR
*NonAlignedAddress
,
51 struct DriverBase
* AHIsubBase
);
52 void pci_free_consistent(void* addr
, struct DriverBase
* AHIsubBase
);
54 #endif /* AHI_Drivers_misc_h */