Check for SYS/GL during library init. Reason is that
[AROS.git] / workbench / devs / AHI / Drivers / Envy24HT / misc.h
blob4bb1ff13bf43ebba989f72cdf239c1e71223e339
1 /*
2 Copyright © 2005-2013, Davy Wentzler. All rights reserved.
3 $Id$
4 */
6 #ifndef AHI_Drivers_Envy24HT_misc_h
7 #define AHI_Drivers_Envy24HT_misc_h
9 #include <config.h>
11 #include <devices/ahi.h>
12 #include <DriverData.h>
13 #include <stddef.h>
15 unsigned long GetGPIOData(struct CardData *card, unsigned long base);
16 void SetGPIOData(struct CardData *card, unsigned long base, unsigned long data);
17 void SetGPIOMask(struct CardData *card, unsigned long base, unsigned long data);
19 void ClearMask8(struct CardData *card, unsigned long base, unsigned char reg, unsigned char mask);
20 void WriteMask8(struct CardData *card, unsigned long base, unsigned char reg, unsigned char mask);
23 void WritePartialMask(struct CardData *card, unsigned long base, unsigned char reg, unsigned long shift, unsigned long mask, unsigned long val);
24 void MicroDelay(unsigned int val);
26 void revo_i2s_mclk_changed(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);
29 void wm_put(struct CardData *card, unsigned long base, unsigned short reg, unsigned short val);
30 void update_spdif_bits(struct CardData *card, unsigned short val);
31 void update_spdif_rate(struct CardData *card, unsigned short rate);
33 void WriteI2C(struct PCIDevice *dev, struct CardData *card, unsigned chip_address, unsigned char reg, unsigned char data);
35 void SaveGPIO(struct PCIDevice *dev, struct CardData* card);
36 void RestoreGPIO(struct PCIDevice *dev, struct CardData* card);
37 void SetGPIODir(struct PCIDevice *dev, struct CardData* card, unsigned long data);
40 struct CardData*
41 AllocDriverData( struct PCIDevice* dev,
42 struct DriverBase* AHIsubBase );
44 void
45 FreeDriverData( struct CardData* card,
46 struct DriverBase* AHIsubBase );
48 void
49 SaveMixerState( struct CardData* card );
51 void
52 RestoreMixerState( struct CardData* card );
54 void
55 UpdateMonitorMixer( struct CardData* card );
57 Fixed
58 Linear2MixerGain( Fixed linear,
59 UWORD* bits );
61 Fixed
62 Linear2AKMGain( Fixed linear,
63 UWORD* bits );
65 Fixed
66 Linear2RecordGain( Fixed linear,
67 UWORD* bits );
69 ULONG
70 SamplerateToLinearPitch( ULONG samplingrate );
72 void *pci_alloc_consistent(size_t size, APTR *NonAlignedAddress, unsigned int boundary);
74 void pci_free_consistent(void* addr);
76 #endif /* AHI_Drivers_Envy24HT_misc_h */