Port the SB128 code to AROS.
[AROS.git] / workbench / devs / AHI / Drivers / SB128 / misc.h
blob7074928c4571f7eef8f3a28c54e0f87cfa4add8a
1 /*
3 The contents of this file are subject to the AROS Public License Version 1.1 (the "License"); 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
6 Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF
7 ANY KIND, either express or implied. See the License for the specific language governing rights and
8 limitations under the License.
10 The Original Code is (C) Copyright 2004-2011 Ross Vumbaca.
12 The Initial Developer of the Original Code is Ross Vumbaca.
14 All Rights Reserved.
18 #ifndef AHI_Drivers_misc_h
19 #define AHI_Drivers_h
21 //#include <config.h>
23 #include <devices/ahi.h>
24 #include <DriverData.h>
25 #include <stddef.h>
27 void codec_write(struct SB128_DATA *card, unsigned short reg, unsigned short val);
28 unsigned short codec_read(struct SB128_DATA *card, unsigned short reg);
30 void ak4531_ac97_write(struct SB128_DATA *card, unsigned short reg, unsigned short val);
32 struct SB128_DATA*
33 AllocDriverData( struct PCIDevice* dev,
34 struct DriverBase* AHIsubBase );
36 void
37 FreeDriverData( struct SB128_DATA* card,
38 struct DriverBase* AHIsubBase );
40 void
41 SaveMixerState( struct SB128_DATA* card );
43 void
44 RestoreMixerState( struct SB128_DATA* card );
46 void
47 UpdateMonitorMixer( struct SB128_DATA* card );
49 Fixed
50 Linear2MixerGain( Fixed linear,
51 UWORD* bits );
53 Fixed
54 Linear2RecordGain( Fixed linear,
55 UWORD* bits );
57 ULONG
58 SamplerateToLinearPitch( ULONG samplingrate );
60 void *pci_alloc_consistent(size_t size, APTR *NonAlignedAddress, unsigned int boundary);
62 void pci_free_consistent(void* addr);
64 #endif /* AHI_Drivers_misc_h */