1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
/**
*******************************************************************************
Confidential & Proprietary
Private & Confidential
Creative Confidential
*******************************************************************************
*/
/**
*******************************************************************************
Copyright (C) Creative Technology, Ltd., 2007. All rights reserved.
*******************************************************************************
**/
#ifndef _HWACCESS_H_
#define _HWACCESS_H_
unsigned int GetAudioSrcChan (unsigned int srcchn);
unsigned int GetAudioSumChan (unsigned int chn);
unsigned int GetParamPitchChan (unsigned int i);
void WriteAMOP (sbxfi_devc_t * devc, unsigned int xdata, unsigned int ydata,
unsigned int chn, unsigned int hidata);
void WriteSRC (sbxfi_devc_t * devc, unsigned int srcca, unsigned int srccf,
unsigned int srcsa, unsigned int srcla, unsigned int srcccr, unsigned int srcctl,
unsigned int chn);
unsigned int HwRead20K1PCI (sbxfi_devc_t * devc, unsigned int dwReg);
unsigned int HwRead20K1 (sbxfi_devc_t * devc, unsigned int dwReg);
void HwWrite20K1 (sbxfi_devc_t * devc, unsigned int dwReg, unsigned int dwData);
void HwWrite20K1PCI (sbxfi_devc_t * devc, unsigned int dwReg, unsigned int dwData);
unsigned int ReadCfgDword (unsigned int dwBusNum, unsigned int dwDevNum, unsigned int dwFuncNum,
unsigned int dwReg);
unsigned short ReadCfgWord (unsigned int dwBusNum, unsigned int dwDevNum, unsigned int dwFuncNum,
unsigned int dwReg);
void WriteConfigDword (unsigned int dwBusNum, unsigned int dwDevNum, unsigned int dwFuncNum,
unsigned int dwReg, unsigned int dwData);
unsigned char DetectAndConfigureHardware (sbxfi_devc_t * devc);
unsigned char IsVistaCompatibleHardware (sbxfi_devc_t * devc);
void SwitchToXFiCore (sbxfi_devc_t * devc);
CTSTATUS InitHardware (sbxfi_devc_t * devc);
CTSTATUS AllocateBuffers (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void FreeBuffers (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupHardwarePageTable (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void InitADC (sbxfi_devc_t * devc, unsigned int src, unsigned char mic20db);
void ResetDAC (sbxfi_devc_t * devc);
void InitDAC (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupPlayMixer (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void UpdatePlayMixer (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupPlayFormat (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupAndStartPlaySRC (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void StopPlaySRC (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupPlayInputMapper (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void StopPlay (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupRecordMixer (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupRecordFormat (sbxfi_devc_t * devc);
void SetupAndStartRecordSRC (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void StopRecordSRC (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupRecordInputMapper (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void SetupInputToOutputMonitoring (sbxfi_devc_t * devc,
sbxfi_portc_t * portc);
void _dumpRegisters (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void _dumpSRCs (sbxfi_devc_t * devc, sbxfi_portc_t * portc);
void _dumpGlobal (sbxfi_devc_t * devc);
#define osDelayms(usecs) oss_udelay(usecs)
#define osInportd(devc, ioaddr) INL(devc->osdev, ioaddr)
#define osOutportd(devc, ioaddr, data) OUTL(devc->osdev, data, ioaddr)
#endif
|