2 The contents of this file are subject to the AROS Public License Version 1.1 (the "License");
3 you may not use this file except in compliance with the License. You may obtain a copy of the License at
4 http://www.aros.org/license.html
5 Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
6 ANY KIND, either express or implied. See the License for the specific language governing rights and
7 limitations under the License.
9 The Original Code is written by Davy Wentzler.
12 #ifndef AHI_Drivers_misc_h
13 #define AHI_Drivers_misc_h
17 #include <devices/ahi.h>
18 #include <DriverData.h>
21 void WritePartialMask(struct PCIDevice
*dev
, struct CardData
* card
, unsigned long reg
, unsigned long shift
, unsigned long mask
, unsigned long val
);
22 void ClearMask(struct PCIDevice
*dev
, struct CardData
* card
, unsigned long reg
, unsigned long mask
);
23 void WriteMask(struct PCIDevice
*dev
, struct CardData
* card
, unsigned long reg
, unsigned long mask
);
24 void cmimix_wr(struct PCIDevice
*dev
, struct CardData
* card
, unsigned char port
, unsigned char val
);
25 unsigned char cmimix_rd(struct PCIDevice
*dev
, struct CardData
* card
, unsigned char port
);
29 AllocDriverData( struct PCIDevice
* dev
,
30 struct DriverBase
* AHIsubBase
);
33 FreeDriverData( struct CardData
* card
,
34 struct DriverBase
* AHIsubBase
);
37 SaveMixerState( struct CardData
* card
);
40 RestoreMixerState( struct CardData
* card
);
43 UpdateMonitorMixer( struct CardData
* card
);
46 Linear2MixerGain( Fixed linear
,
50 Linear2RecordGain( Fixed linear
,
54 SamplerateToLinearPitch( ULONG samplingrate
);
56 void *pci_alloc_consistent(size_t size
, APTR
*NonAlignedAddress
);
58 void pci_free_consistent(void* addr
);
60 #endif /* AHI_Drivers_misc_h */