2 Copyright © 2005-2013, Davy Wentzler. All rights reserved.
6 #ifndef AHI_Drivers_Envy24HT_misc_h
7 #define AHI_Drivers_Envy24HT_misc_h
11 #include <devices/ahi.h>
12 #include <DriverData.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
);
41 AllocDriverData( struct PCIDevice
* dev
,
42 struct DriverBase
* AHIsubBase
);
45 FreeDriverData( struct CardData
* card
,
46 struct DriverBase
* AHIsubBase
);
49 SaveMixerState( struct CardData
* card
);
52 RestoreMixerState( struct CardData
* card
);
55 UpdateMonitorMixer( struct CardData
* card
);
58 Linear2MixerGain( Fixed linear
,
62 Linear2AKMGain( Fixed linear
,
66 Linear2RecordGain( Fixed linear
,
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 */