Go to the documentation of this file.
58 #ifdef CONFIG_SND_SEQUENCER_OSS
69 #define OPL3_REG_TEST 0x01
70 #define OPL3_ENABLE_WAVE_SELECT 0x20
72 #define OPL3_REG_TIMER1 0x02
73 #define OPL3_REG_TIMER2 0x03
74 #define OPL3_REG_TIMER_CONTROL 0x04
75 #define OPL3_IRQ_RESET 0x80
76 #define OPL3_TIMER1_MASK 0x40
77 #define OPL3_TIMER2_MASK 0x20
78 #define OPL3_TIMER1_START 0x01
79 #define OPL3_TIMER2_START 0x02
81 #define OPL3_REG_CONNECTION_SELECT 0x04
82 #define OPL3_LEFT_4OP_0 0x01
83 #define OPL3_LEFT_4OP_1 0x02
84 #define OPL3_LEFT_4OP_2 0x04
85 #define OPL3_RIGHT_4OP_0 0x08
86 #define OPL3_RIGHT_4OP_1 0x10
87 #define OPL3_RIGHT_4OP_2 0x20
89 #define OPL3_REG_MODE 0x05
90 #define OPL3_OPL3_ENABLE 0x01
91 #define OPL3_OPL4_ENABLE 0x02
93 #define OPL3_REG_KBD_SPLIT 0x08
94 #define OPL3_COMPOSITE_SINE_WAVE_MODE 0x80
95 #define OPL3_KEYBOARD_SPLIT 0x40
97 #define OPL3_REG_PERCUSSION 0xbd
98 #define OPL3_TREMOLO_DEPTH 0x80
99 #define OPL3_VIBRATO_DEPTH 0x40
100 #define OPL3_PERCUSSION_ENABLE 0x20
101 #define OPL3_BASSDRUM_ON 0x10
102 #define OPL3_SNAREDRUM_ON 0x08
103 #define OPL3_TOMTOM_ON 0x04
104 #define OPL3_CYMBAL_ON 0x02
105 #define OPL3_HIHAT_ON 0x01
113 #define OPL3_REG_AM_VIB 0x20
114 #define OPL3_TREMOLO_ON 0x80
115 #define OPL3_VIBRATO_ON 0x40
116 #define OPL3_SUSTAIN_ON 0x20
117 #define OPL3_KSR 0x10
118 #define OPL3_MULTIPLE_MASK 0x0f
123 #define OPL3_REG_KSL_LEVEL 0x40
124 #define OPL3_KSL_MASK 0xc0
125 #define OPL3_TOTAL_LEVEL_MASK 0x3f
130 #define OPL3_REG_ATTACK_DECAY 0x60
131 #define OPL3_ATTACK_MASK 0xf0
132 #define OPL3_DECAY_MASK 0x0f
137 #define OPL3_REG_SUSTAIN_RELEASE 0x80
138 #define OPL3_SUSTAIN_MASK 0xf0
139 #define OPL3_RELEASE_MASK 0x0f
144 #define OPL3_REG_WAVE_SELECT 0xe0
145 #define OPL3_WAVE_SELECT_MASK 0x07
153 #define OPL3_REG_FNUM_LOW 0xa0
158 #define OPL3_REG_KEYON_BLOCK 0xb0
159 #define OPL3_KEYON_BIT 0x20
160 #define OPL3_BLOCKNUM_MASK 0x1c
161 #define OPL3_FNUM_HIGH_MASK 0x03
175 #define OPL3_REG_FEEDBACK_CONNECTION 0xc0
176 #define OPL3_FEEDBACK_MASK 0x0e
177 #define OPL3_CONNECTION_BIT 0x01
212 #define OPL3_STEREO_BITS 0x30
213 #define OPL3_VOICE_TO_LEFT 0x10
214 #define OPL3_VOICE_TO_RIGHT 0x20
220 #define OPL3_LEFT 0x0000
221 #define OPL3_RIGHT 0x0100
223 #define OPL3_HW_AUTO 0x0000
224 #define OPL3_HW_OPL2 0x0200
225 #define OPL3_HW_OPL3 0x0300
226 #define OPL3_HW_OPL3_SV 0x0301
227 #define OPL3_HW_OPL3_CS 0x0302
228 #define OPL3_HW_OPL3_FM801 0x0303
229 #define OPL3_HW_OPL3_CS4281 0x0304
230 #define OPL3_HW_OPL4 0x0400
231 #define OPL3_HW_OPL4_ML 0x0401
232 #define OPL3_HW_MASK 0xff00
234 #define MAX_OPL2_VOICES 9
235 #define MAX_OPL3_VOICES 18
266 #define FM_PATCH_OPL2 0x01
267 #define FM_PATCH_OPL3 0x02
285 #define SNDRV_OPL3_ST_OFF 0
286 #define SNDRV_OPL3_ST_ON_2OP 1
287 #define SNDRV_OPL3_ST_ON_4OP 2
288 #define SNDRV_OPL3_ST_NOT_AVAIL -1
324 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
325 #define SNDRV_OPL3_MODE_SYNTH 0
326 #define SNDRV_OPL3_MODE_SEQ 1
333 #ifdef CONFIG_SND_SEQUENCER_OSS
338 #define OPL3_PATCH_HASH_SIZE 32
344 unsigned short connection_reg;
345 unsigned char drum_reg;
350 int sys_timer_status;
361 unsigned long l_port,
unsigned long r_port,
372 unsigned int cmd,
unsigned long arg);
377 #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
380 int snd_opl3_load_patch(
struct snd_opl3 *opl3,
381 int prog,
int bank,
int type,
383 const unsigned char *
ext,
384 const unsigned char *
data);
387 void snd_opl3_clear_patches(
struct snd_opl3 *opl3);
389 #define snd_opl3_write NULL
390 static inline void snd_opl3_clear_patches(
struct snd_opl3 *opl3) {}