aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:13:14 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:18:04 -0500
commit5b1646a8eceff0a4ff06f309abb6e7f43f99a498 (patch)
treeecbb7c1d5ffdf2f3f732a18aae3ed6b2a3752e9e /include/sound
parente1fad17bb4084dc7c435360185417aed55656ec8 (diff)
[ALSA] Remove xxx_t typedefs: OPL3
Modules: OPL3,Raw OPL FM Remove xxx_t typedefs from the OPL3 driver Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r--include/sound/asound_fm.h24
-rw-r--r--include/sound/opl3.h57
2 files changed, 41 insertions, 40 deletions
diff --git a/include/sound/asound_fm.h b/include/sound/asound_fm.h
index b0da677f8f75..956fdc23c595 100644
--- a/include/sound/asound_fm.h
+++ b/include/sound/asound_fm.h
@@ -29,16 +29,16 @@
29#define SNDRV_DM_FM_MODE_OPL2 0x00 29#define SNDRV_DM_FM_MODE_OPL2 0x00
30#define SNDRV_DM_FM_MODE_OPL3 0x01 30#define SNDRV_DM_FM_MODE_OPL3 0x01
31 31
32typedef struct snd_dm_fm_info { 32struct snd_dm_fm_info {
33 unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ 33 unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */
34 unsigned char rhythm; /* percussion mode flag */ 34 unsigned char rhythm; /* percussion mode flag */
35} snd_dm_fm_info_t; 35};
36 36
37/* 37/*
38 * Data structure composing an FM "note" or sound event. 38 * Data structure composing an FM "note" or sound event.
39 */ 39 */
40 40
41typedef struct snd_dm_fm_voice { 41struct snd_dm_fm_voice {
42 unsigned char op; /* operator cell (0 or 1) */ 42 unsigned char op; /* operator cell (0 or 1) */
43 unsigned char voice; /* FM voice (0 to 17) */ 43 unsigned char voice; /* FM voice (0 to 17) */
44 44
@@ -60,25 +60,25 @@ typedef struct snd_dm_fm_voice {
60 unsigned char left; /* stereo left */ 60 unsigned char left; /* stereo left */
61 unsigned char right; /* stereo right */ 61 unsigned char right; /* stereo right */
62 unsigned char waveform; /* 3 bits: waveform shape */ 62 unsigned char waveform; /* 3 bits: waveform shape */
63} snd_dm_fm_voice_t; 63};
64 64
65/* 65/*
66 * This describes an FM note by its voice, octave, frequency number (10bit) 66 * This describes an FM note by its voice, octave, frequency number (10bit)
67 * and key on/off. 67 * and key on/off.
68 */ 68 */
69 69
70typedef struct snd_dm_fm_note { 70struct snd_dm_fm_note {
71 unsigned char voice; /* 0-17 voice channel */ 71 unsigned char voice; /* 0-17 voice channel */
72 unsigned char octave; /* 3 bits: what octave to play */ 72 unsigned char octave; /* 3 bits: what octave to play */
73 unsigned int fnum; /* 10 bits: frequency number */ 73 unsigned int fnum; /* 10 bits: frequency number */
74 unsigned char key_on; /* set for active, clear for silent */ 74 unsigned char key_on; /* set for active, clear for silent */
75} snd_dm_fm_note_t; 75};
76 76
77/* 77/*
78 * FM parameters that apply globally to all voices, and thus are not "notes" 78 * FM parameters that apply globally to all voices, and thus are not "notes"
79 */ 79 */
80 80
81typedef struct snd_dm_fm_params { 81struct snd_dm_fm_params {
82 unsigned char am_depth; /* amplitude modulation depth (1=hi) */ 82 unsigned char am_depth; /* amplitude modulation depth (1=hi) */
83 unsigned char vib_depth; /* vibrato depth (1=hi) */ 83 unsigned char vib_depth; /* vibrato depth (1=hi) */
84 unsigned char kbd_split; /* keyboard split */ 84 unsigned char kbd_split; /* keyboard split */
@@ -90,17 +90,17 @@ typedef struct snd_dm_fm_params {
90 unsigned char tomtom; 90 unsigned char tomtom;
91 unsigned char cymbal; 91 unsigned char cymbal;
92 unsigned char hihat; 92 unsigned char hihat;
93} snd_dm_fm_params_t; 93};
94 94
95/* 95/*
96 * FM mode ioctl settings 96 * FM mode ioctl settings
97 */ 97 */
98 98
99#define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, snd_dm_fm_info_t) 99#define SNDRV_DM_FM_IOCTL_INFO _IOR('H', 0x20, struct snd_dm_fm_info)
100#define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21) 100#define SNDRV_DM_FM_IOCTL_RESET _IO ('H', 0x21)
101#define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, snd_dm_fm_note_t) 101#define SNDRV_DM_FM_IOCTL_PLAY_NOTE _IOW('H', 0x22, struct snd_dm_fm_note)
102#define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, snd_dm_fm_voice_t) 102#define SNDRV_DM_FM_IOCTL_SET_VOICE _IOW('H', 0x23, struct snd_dm_fm_voice)
103#define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, snd_dm_fm_params_t) 103#define SNDRV_DM_FM_IOCTL_SET_PARAMS _IOW('H', 0x24, struct snd_dm_fm_params)
104#define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int) 104#define SNDRV_DM_FM_IOCTL_SET_MODE _IOW('H', 0x25, int)
105/* for OPL3 only */ 105/* for OPL3 only */
106#define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int) 106#define SNDRV_DM_FM_IOCTL_SET_CONNECTION _IOW('H', 0x26, int)
diff --git a/include/sound/opl3.h b/include/sound/opl3.h
index 19f657d4fc06..83392641cb47 100644
--- a/include/sound/opl3.h
+++ b/include/sound/opl3.h
@@ -237,12 +237,12 @@
237#define MAX_OPL2_VOICES 9 237#define MAX_OPL2_VOICES 9
238#define MAX_OPL3_VOICES 18 238#define MAX_OPL3_VOICES 18
239 239
240typedef struct snd_opl3 opl3_t; 240struct snd_opl3;
241 241
242/* 242/*
243 * A structure to keep track of each hardware voice 243 * A structure to keep track of each hardware voice
244 */ 244 */
245typedef struct snd_opl3_voice { 245struct snd_opl3_voice {
246 int state; /* status */ 246 int state; /* status */
247#define SNDRV_OPL3_ST_OFF 0 /* Not playing */ 247#define SNDRV_OPL3_ST_OFF 0 /* Not playing */
248#define SNDRV_OPL3_ST_ON_2OP 1 /* 2op voice is allocated */ 248#define SNDRV_OPL3_ST_ON_2OP 1 /* 2op voice is allocated */
@@ -257,8 +257,8 @@ typedef struct snd_opl3_voice {
257 257
258 unsigned char keyon_reg; /* KON register shadow */ 258 unsigned char keyon_reg; /* KON register shadow */
259 259
260 snd_midi_channel_t *chan; /* Midi channel for this note */ 260 struct snd_midi_channel *chan; /* Midi channel for this note */
261} snd_opl3_voice_t; 261};
262 262
263struct snd_opl3 { 263struct snd_opl3 {
264 unsigned long l_port; 264 unsigned long l_port;
@@ -267,18 +267,18 @@ struct snd_opl3 {
267 struct resource *res_r_port; 267 struct resource *res_r_port;
268 unsigned short hardware; 268 unsigned short hardware;
269 /* hardware access */ 269 /* hardware access */
270 void (*command) (opl3_t * opl3, unsigned short cmd, unsigned char val); 270 void (*command) (struct snd_opl3 * opl3, unsigned short cmd, unsigned char val);
271 unsigned short timer_enable; 271 unsigned short timer_enable;
272 int seq_dev_num; /* sequencer device number */ 272 int seq_dev_num; /* sequencer device number */
273 snd_timer_t *timer1; 273 struct snd_timer *timer1;
274 snd_timer_t *timer2; 274 struct snd_timer *timer2;
275 spinlock_t timer_lock; 275 spinlock_t timer_lock;
276 276
277 void *private_data; 277 void *private_data;
278 void (*private_free)(opl3_t *); 278 void (*private_free)(struct snd_opl3 *);
279 279
280 spinlock_t reg_lock; 280 spinlock_t reg_lock;
281 snd_card_t *card; /* The card that this belongs to */ 281 struct snd_card *card; /* The card that this belongs to */
282 int used; /* usage flag - exclusive */ 282 int used; /* usage flag - exclusive */
283 unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ 283 unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */
284 unsigned char rhythm; /* percussion mode flag */ 284 unsigned char rhythm; /* percussion mode flag */
@@ -289,18 +289,18 @@ struct snd_opl3 {
289 int synth_mode; /* synth mode */ 289 int synth_mode; /* synth mode */
290 int seq_client; 290 int seq_client;
291 291
292 snd_seq_device_t *seq_dev; /* sequencer device */ 292 struct snd_seq_device *seq_dev; /* sequencer device */
293 snd_midi_channel_set_t * chset; 293 struct snd_midi_channel_set * chset;
294 294
295#ifdef CONFIG_SND_SEQUENCER_OSS 295#ifdef CONFIG_SND_SEQUENCER_OSS
296 snd_seq_device_t *oss_seq_dev; /* OSS sequencer device */ 296 struct snd_seq_device *oss_seq_dev; /* OSS sequencer device */
297 snd_midi_channel_set_t * oss_chset; 297 struct snd_midi_channel_set * oss_chset;
298#endif 298#endif
299 299
300 snd_seq_kinstr_ops_t fm_ops; 300 struct snd_seq_kinstr_ops fm_ops;
301 snd_seq_kinstr_list_t *ilist; 301 struct snd_seq_kinstr_list *ilist;
302 302
303 snd_opl3_voice_t voices[MAX_OPL3_VOICES]; /* Voices (OPL3 'channel') */ 303 struct snd_opl3_voice voices[MAX_OPL3_VOICES]; /* Voices (OPL3 'channel') */
304 int use_time; /* allocation counter */ 304 int use_time; /* allocation counter */
305 305
306 unsigned short connection_reg; /* connection reg shadow */ 306 unsigned short connection_reg; /* connection reg shadow */
@@ -316,24 +316,25 @@ struct snd_opl3 {
316}; 316};
317 317
318/* opl3.c */ 318/* opl3.c */
319void snd_opl3_interrupt(snd_hwdep_t * hw); 319void snd_opl3_interrupt(struct snd_hwdep * hw);
320int snd_opl3_new(snd_card_t *card, unsigned short hardware, opl3_t **ropl3); 320int snd_opl3_new(struct snd_card *card, unsigned short hardware,
321int snd_opl3_init(opl3_t *opl3); 321 struct snd_opl3 **ropl3);
322int snd_opl3_create(snd_card_t * card, 322int snd_opl3_init(struct snd_opl3 *opl3);
323int snd_opl3_create(struct snd_card *card,
323 unsigned long l_port, unsigned long r_port, 324 unsigned long l_port, unsigned long r_port,
324 unsigned short hardware, 325 unsigned short hardware,
325 int integrated, 326 int integrated,
326 opl3_t ** opl3); 327 struct snd_opl3 ** opl3);
327int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev); 328int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev);
328int snd_opl3_hwdep_new(opl3_t * opl3, int device, int seq_device, 329int snd_opl3_hwdep_new(struct snd_opl3 * opl3, int device, int seq_device,
329 snd_hwdep_t ** rhwdep); 330 struct snd_hwdep ** rhwdep);
330 331
331/* opl3_synth */ 332/* opl3_synth */
332int snd_opl3_open(snd_hwdep_t * hw, struct file *file); 333int snd_opl3_open(struct snd_hwdep * hw, struct file *file);
333int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file, 334int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
334 unsigned int cmd, unsigned long arg); 335 unsigned int cmd, unsigned long arg);
335int snd_opl3_release(snd_hwdep_t * hw, struct file *file); 336int snd_opl3_release(struct snd_hwdep * hw, struct file *file);
336 337
337void snd_opl3_reset(opl3_t * opl3); 338void snd_opl3_reset(struct snd_opl3 * opl3);
338 339
339#endif /* __SOUND_OPL3_H */ 340#endif /* __SOUND_OPL3_H */