]>
git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blob - sound/oss/sb.h
1 #define DSP_RESET (devc->base + 0x6)
2 #define DSP_READ (devc->base + 0xA)
3 #define DSP_WRITE (devc->base + 0xC)
4 #define DSP_COMMAND (devc->base + 0xC)
5 #define DSP_STATUS (devc->base + 0xC)
6 #define DSP_DATA_AVAIL (devc->base + 0xE)
7 #define DSP_DATA_AVL16 (devc->base + 0xF)
8 #define MIXER_ADDR (devc->base + 0x4)
9 #define MIXER_DATA (devc->base + 0x5)
10 #define OPL3_LEFT (devc->base + 0x0)
11 #define OPL3_RIGHT (devc->base + 0x2)
12 #define OPL3_BOTH (devc->base + 0x8)
15 #define DSP_CMD_SPKON 0xD1
16 #define DSP_CMD_SPKOFF 0xD3
17 #define DSP_CMD_DMAON 0xD0
18 #define DSP_CMD_DMAOFF 0xD4
21 #define IMODE_OUTPUT PCM_ENABLE_OUTPUT
22 #define IMODE_INPUT PCM_ENABLE_INPUT
34 #define MDL_SB1 1 /* SB1.0 or 1.5 */
35 #define MDL_SB2 2 /* SB2.0 */
36 #define MDL_SB201 3 /* SB2.01 */
37 #define MDL_SBPRO 4 /* SB Pro */
38 #define MDL_SB16 5 /* SB16/32/AWE */
39 #define MDL_SBPNP 6 /* SB16/32/AWE PnP */
40 #define MDL_JAZZ 10 /* Media Vision Jazz16 */
41 #define MDL_SMW 11 /* Logitech SoundMan Wave (Jazz16) */
42 #define MDL_ESS 12 /* ESS ES688 and ES1688 */
43 #define MDL_AZTECH 13 /* Aztech Sound Galaxy family */
44 #define MDL_ES1868MIDI 14 /* MIDI port of ESS1868 */
45 #define MDL_AEDSP 15 /* Audio Excel DSP 16 */
46 #define MDL_ESSPCI 16 /* ESS PCI card */
47 #define MDL_YMPCI 17 /* Yamaha PCI sb in emulation */
49 #define SUBMDL_ALS007 42 /* ALS-007 differs from SB16 only in mixer */
50 /* register assignment */
51 #define SUBMDL_ALS100 43 /* ALS-100 allows sampling rates of up */
57 #define SB_NO_MIDI 0x00000001
58 #define SB_NO_MIXER 0x00000002
59 #define SB_NO_AUDIO 0x00000004
60 #define SB_NO_RECORDING 0x00000008 /* No audio recording */
61 #define SB_MIDI_ONLY (SB_NO_AUDIO|SB_NO_MIXER)
62 #define SB_PCI_IRQ 0x00000010 /* PCI shared IRQ */
65 unsigned int regno
: 8;
66 unsigned int bitoffs
:4;
70 typedef struct mixer_def mixer_tab
[32][2];
71 typedef struct mixer_def mixer_ent
;
73 struct sb_module_options
75 int esstype
; /* ESS chip type */
76 int acer
; /* Do acer notebook init? */
77 int sm_games
; /* Logitech soundman games? */
80 typedef struct sb_devc
{
83 /* Hardware parameters */
89 # define SBCAP_STEREO 0x00000001
90 # define SBCAP_16BITS 0x00000002
92 /* Hardware resources */
97 int pcibase
; /* For ESS Maestro etc */
101 /* new audio fields for full duplex support */
104 int speed
, bits
, channels
;
106 volatile int intr_active
, irq_mode
;
107 /* duplicate audio fields for full duplex support */
108 volatile int intr_active_16
, irq_mode_16
;
113 size_t iomap_sz
; /* number or records in the iomap table */
114 int mixer_caps
, recmask
, outmask
, supported_devices
;
115 int supported_rec_devices
, supported_out_devices
;
120 unsigned long trg_buf
;
125 /* duplicate audio fields for full duplex support */
126 unsigned long trg_buf_16
;
132 unsigned char tconst
;
138 void (*midi_input_intr
) (int dev
, unsigned char data
);
139 void *midi_irq_cookie
; /* IRQ cookie for the midi */
143 struct sb_module_options sbmo
; /* Module options */
151 #define SB_PCI_ESSMAESTRO 1 /* ESS Maestro Legacy */
152 #define SB_PCI_YAMAHA 2 /* Yamaha Legacy */
158 int sb_dsp_command (sb_devc
*devc
, unsigned char val
);
159 int sb_dsp_get_byte(sb_devc
* devc
);
160 int sb_dsp_reset (sb_devc
*devc
);
161 void sb_setmixer (sb_devc
*devc
, unsigned int port
, unsigned int value
);
162 unsigned int sb_getmixer (sb_devc
*devc
, unsigned int port
);
163 int sb_dsp_detect (struct address_info
*hw_config
, int pci
, int pciio
, struct sb_module_options
*sbmo
);
164 int sb_dsp_init (struct address_info
*hw_config
, struct module
*owner
);
165 void sb_dsp_unload(struct address_info
*hw_config
, int sbmpu
);
166 int sb_mixer_init(sb_devc
*devc
, struct module
*owner
);
167 void sb_mixer_unload(sb_devc
*devc
);
168 void sb_mixer_set_stereo (sb_devc
*devc
, int mode
);
169 void smw_mixer_init(sb_devc
*devc
);
170 void sb_dsp_midi_init (sb_devc
*devc
, struct module
*owner
);
171 void sb_audio_init (sb_devc
*devc
, char *name
, struct module
*owner
);
172 void sb_midi_interrupt (sb_devc
*devc
);
173 void sb_chgmixer (sb_devc
* devc
, unsigned int reg
, unsigned int mask
, unsigned int val
);
174 int sb_common_mixer_set(sb_devc
* devc
, int dev
, int left
, int right
);
176 int sb_audio_open(int dev
, int mode
);
177 void sb_audio_close(int dev
);
179 /* From sb_common.c */
180 void sb_dsp_disable_midi(int port
);
181 int probe_sbmpu (struct address_info
*hw_config
, struct module
*owner
);
182 void unload_sbmpu (struct address_info
*hw_config
);
184 void unload_sb16(struct address_info
*hw_info
);
185 void unload_sb16midi(struct address_info
*hw_info
);