2
* Purpose: Common definitions for envy24ht driver files
6
* This file is part of Open Sound System.
8
* Copyright (C) 4Front Technologies 1996-2008.
10
* This this source file is released under GPL v2 license (no other versions).
11
* See the COPYING file included in the main directory of this source
12
* distribution for the license terms and conditions.
16
#include "midi_core.h"
19
* Various subvendor device ID's
21
#define SSID_AUREON_SPACE 0x1145153b
22
#define SSID_AUREON_SKY 0x1147153b
23
#define SSID_AUREON_UNIVERSE 0x1153153b
24
#define SSID_PHASE28 0x1149153b
25
#define SSID_PRODIGY71 0x45534933
26
#define SSID_PRODIGYHD2 0x41543137
27
#define SSID_PRODIGYHD2_ADE 0x24011412
28
#define SSID_JULIA 0x45533031
29
#define SSID_AP192 0x36321412
33
unsigned int dwSubVendorID; /* PCI[2C-2F], in BIG ENDIAN format */
34
unsigned char bSize; /* size of EEPROM image in bytes */
35
unsigned char bVersion; /* version equal 1 for this structure. */
36
unsigned char bCodecConfig; /* PCI[60] */
37
unsigned char bACLinkConfig; /* PCI[61] */
38
unsigned char bI2SID; /* PCI[62] */
39
unsigned char bSpdifConfig; /* PCI[63] */
40
unsigned char bGPIOInitMask0; /* Corresponding bits need to be inited */
41
/* 0 means write bit and 1 means cannot write */
42
unsigned char bGPIOInitState0; /* Initial state of GPIO pins */
43
unsigned char bGPIODirection0; /* GPIO Direction State */
44
unsigned char bGPIOInitMask1;
45
unsigned char bGPIOInitState1;
46
unsigned char bGPIODirection1;
47
unsigned char bGPIOInitMask2;
48
unsigned char bGPIOInitState2;
49
unsigned char bGPIODirection2;
50
unsigned char bAC97RecSrc;
51
unsigned char bDACID[4]; /* I2S IDs for DACs [0 ~ 3] */
52
unsigned char bADCID[4]; /* I2S IDs for ADCs [0 ~ 3] */
53
unsigned char bDACID4; /* I2S ID for DAC#4 */
54
unsigned char Reserved[32];
57
typedef struct envy24ht_auxdrv envy24ht_auxdrv_t;
63
int nr_outs, nr_ins; /* # of analog channels */
65
#define MF_MIDI 0x00000001 /* Has MIDI port */
66
#define MF_192K 0x00000002 /* Supports 192kHz */
67
#define MF_SPDIFIN 0x00000004 /* Has S/PDIF input */
68
#define MF_SPDIFOUT 0x00000008 /* Has S/PDIF output */
69
#define MF_ENVY24PT 0x00000010 /* Envy24PT chip (no EEPROM) */
70
#define MF_NOAC97 0x00000020 /* Ignore AC97 codec */
71
const envy24ht_auxdrv_t *auxdrv;
72
unsigned char *eeprom_data;
76
#define ICENSEMBLE_VENDOR_ID 0x1412
77
#define ICENSEMBLE_ENVY24HT_ID 0x1724
78
#define MAX_ENVY24HT_CARD 8
81
extern int options_data;
96
volatile int is_active;
97
volatile int trigger_bits;
101
#define DF_MULTICH 0x00000001
102
#define DF_SPDIF 0x00000002
103
#define DF_AC3 0x00000004
104
#define DF_DUPLEX 0x00000008
123
oss_mutex_t low_mutex;
124
const envy24ht_auxdrv_t *auxdrv;
128
int mpu1_attached, mpu2_attached;
129
oss_native_word ccs_base, mt_base;
131
card_spec *model_data;
132
unsigned int subvendor;
133
eeprom_data_t eeprom;
134
char channel_names[4][10];
135
unsigned short gpio_shadow_L;
136
unsigned char gpio_shadow_H;
146
int nr_outdevs, nr_indevs;
147
envy24ht_portc play_portc[MAX_ODEV];
148
envy24ht_portc rec_portc[MAX_IDEV];
150
int outportmask, inportmask;
151
int nr_play_channels, nr_rec_channels;
155
int speed, pending_speed, pending_speed_sel, speedbits, configured_rate_sel;
156
int prev_speed; /* Strictly for use by low level modules */
163
int busy_play_channels;
164
int busy_rec_channels;
176
oss_midi_inputbyte_t midi_input_intr;
177
oss_midi_outputintr_t midi_output_intr;
178
volatile unsigned char input_byte;
184
unsigned char dac1val[5], dac2val[11]; /* M Audio Revo 7.1 */
185
unsigned short m_AC97Volume[6]; /* Terratec Aureon */
186
unsigned char m_fAC97Mute[6]; /* Terratec Aureon */
187
int m_DigInSource; /* Aureon */
188
int m_LineInSource; /* Aureon */
189
int m_SPDIFSource; /* Aureon */
190
int m_ADCIndex; /* Aureon */
191
int m_f1724SPDIF; /* Aureon */
192
int m_SPDIFConfig; /* Aureon */
193
int m_Frontjack; /* Aureon */
194
unsigned char m_fDACMute[12]; /* Aureon */
195
unsigned char m_DACVolume[13]; /* Aureon & Juli@ */
196
unsigned short m_ADCVolume[8]; /* Aureon */
197
unsigned char m_ADCMux; /* Aureon */
198
unsigned char m_fSPDIFRecord; /* Aureon */
199
unsigned char m_AuxMux; /* Aureon */
200
unsigned int m_ClockSource; /* Aureon */
201
unsigned int m_Out0Source; /* Aureon */
205
timeout_id_t timeout_id; /* Juli@ */
207
unsigned char syncstart_mask;
211
struct envy24ht_auxdrv
213
void (*card_init) (envy24ht_devc * devc);
214
int (*mixer_init) (envy24ht_devc * devc, int dev, int group);
215
void (*set_rate) (envy24ht_devc * devc);
216
int (*get_locked_status) (envy24ht_devc * devc);
217
int (*spdif_mixer_init) (envy24ht_devc * devc, int dev, int group);
218
int (*private1) (envy24ht_devc * devc, int value);
219
int (*audio_ioctl) (envy24ht_devc * devc, envy24ht_portc * portc, unsigned int cmd,
221
void (*card_uninit) (envy24ht_devc * devc);
226
int speed, speedbits;
229
void envy24ht_write_cci (envy24ht_devc * devc, int pos, int data);
230
int envy24ht_read_cci (envy24ht_devc * devc, int pos);