grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / devs / AHI / Drivers / Envy24 / misc.h
blob62259d4405599a25ee73608d8f7a8134339a6d1d
1 /*
2 Copyright � 2004-2014, Davy Wentzler. All rights reserved.
3 $Id$
4 */
6 #ifndef AHI_Drivers_misc_h
7 #define AHI_Drivers_misc_h
9 #include <config.h>
11 #include <devices/ahi.h>
12 #include <DriverData.h>
13 #include <stddef.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);
31 struct CardData*
32 AllocDriverData( struct PCIDevice* dev,
33 struct DriverBase* AHIsubBase );
35 void
36 FreeDriverData( struct CardData* card,
37 struct DriverBase* AHIsubBase );
39 Fixed
40 Linear2MixerGain( Fixed linear,
41 UWORD* bits );
43 Fixed
44 Linear2RecordGain( Fixed linear,
45 UWORD* bits );
47 ULONG
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 */