3
* This file is part of Open Sound System.
5
* Copyright (C) 4Front Technologies 1996-2008.
7
* This this source file is released under GPL v2 license (no other versions).
8
* See the COPYING file included in the main directory of this source
9
* distribution for the license terms and conditions.
13
#define PCI_SUBDEVICE_ID_CREATIVE_SB0760 0x0024
14
#define PCI_SUBDEVICE_ID_CREATIVE_SB08801 0x0041
15
#define PCI_SUBDEVICE_ID_CREATIVE_SB08802 0x0042
16
#define PCI_SUBDEVICE_ID_CREATIVE_SB08803 0x0043
18
#define MAX_OUTPUTDEVS 1
19
#define MAX_INPUTDEVS 1
20
#define SUPPORTED_FORMAT (AFMT_S16_LE)
22
#define MIXER_VOLSTEPS 144 /* Centibel steps */
24
//#define MAX_PLAY_CHANNELS 6 /* Does not work */
25
#define MAX_PLAY_CHANNELS 2
28
typedef unsigned char CTBYTE, *PCTBYTE;
29
typedef unsigned short unsigned short, *Punsigned short;
30
typedef signed short CTSHORT, *PCTSHORT;
31
typedef unsigned int unsigned int, *unsigned int *;
32
typedef signed long CTLONG, *PCTLONG;
33
typedef void CTVOID, *PCTVOID;
34
typedef unsigned int CTBOOL, *PCTBOOL;
35
typedef unsigned int CTUINT, *PCTUINT;
46
typedef unsigned int CTSTATUS;
47
typedef oss_native_word IOADDR;
51
CTSTATUS_SUCCESS = 0x0000,
53
CTSTATUS_INVALIDPARAM,
54
CTSTATUS_NOTSUPPORTED,
60
CTSTATUS_INVALIDVALUE,
61
CTSTATUS_BADFORMAT_BITS,
62
CTSTATUS_BADFORMAT_RATE,
63
CTSTATUS_BADFORMAT_CHANNELS,
65
CTSTATUS_STILLPLAYING,
67
CTSTATUS_INVALID_FORMAT,
68
CTSTATUS_OUT_OF_RESOURCE,
70
CTSTATUS_NOCHIPRESOURCE,
77
#define ADC_SRC_MICIN 0x0
78
#define ADC_SRC_LINEIN 0x1
79
#define ADC_SRC_VIDEO 0x2
80
#define ADC_SRC_AUX 0x3
81
#define ADC_SRC_NONE 0x4
92
int pgtable_index; // Pointer to the first page table entry
100
// Audio Ring resources
101
unsigned int SrcChan;
103
unsigned int dwDAChan[MAX_PLAY_CHANNELS];
106
int vol_left, vol_right;
113
oss_mutex_t low_mutex;
119
#define HW_ORIG 0x0001
120
#define HW_073x 0x0002
121
#define HW_055x 0x0004
122
#define HW_UAA 0x0008
125
#define HW_0760 0x0010
126
#define HW_08801 0x0020
127
#define HW_08802 0x0040
128
#define HW_08803 0x0080
131
unsigned int interrupt_count;
134
unsigned short wVendorID;
135
unsigned short wDeviceID;
136
unsigned short wSubsystemVendorID;
137
unsigned short wSubsystemID;
138
unsigned short wChipRevision;
140
// Hardware Resources
141
unsigned int dwMemBase;
142
unsigned short wIOPortBase;
145
oss_native_word dwPTBPhysAddx;
146
unsigned int *pdwPageTable;
147
unsigned int dwPageTableSize;
148
oss_dma_handle_t pgtable_dma_handle;
149
int next_pg; /* Next free index in the page table */
151
sbxfi_portc_t play_portc[MAX_OUTPUTDEVS];
154
sbxfi_portc_t rec_portc[MAX_INPUTDEVS];
163
int next_src; // Next free SRC channel
165
sbxfi_portc_t *src_to_portc[256];