diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 13:56:51 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 12:17:35 +0100 |
commit | 48c9d417d7269da2a2da5b602fcb5fdbee36305e (patch) | |
tree | b892cec8e6fbf273492f9940f4660c3a9e0453a0 /include/sound | |
parent | 53d2f744afc1fcb4fb68975a443fb66eb6c44da4 (diff) |
[ALSA] Remove xxx_t typedefs: Raw MIDI
Modules: RawMidi Midlevel
Remove xxx_t typedefs from the core raw MIDI codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/rawmidi.h | 123 |
1 files changed, 63 insertions, 60 deletions
diff --git a/include/sound/rawmidi.h b/include/sound/rawmidi.h index 3f9db510dee..9492a32c102 100644 --- a/include/sound/rawmidi.h +++ b/include/sound/rawmidi.h @@ -36,11 +36,6 @@ * Raw MIDI interface */ -typedef enum sndrv_rawmidi_stream snd_rawmidi_stream_t; -typedef struct sndrv_rawmidi_info snd_rawmidi_info_t; -typedef struct sndrv_rawmidi_params snd_rawmidi_params_t; -typedef struct sndrv_rawmidi_status snd_rawmidi_status_t; - #define SNDRV_RAWMIDI_DEVICES 8 #define SNDRV_RAWMIDI_LFLG_OUTPUT (1<<0) @@ -49,23 +44,22 @@ typedef struct sndrv_rawmidi_status snd_rawmidi_status_t; #define SNDRV_RAWMIDI_LFLG_APPEND (1<<2) #define SNDRV_RAWMIDI_LFLG_NOOPENLOCK (1<<3) -typedef struct _snd_rawmidi_runtime snd_rawmidi_runtime_t; -typedef struct _snd_rawmidi_substream snd_rawmidi_substream_t; -typedef struct _snd_rawmidi_str snd_rawmidi_str_t; +struct snd_rawmidi; +struct snd_rawmidi_substream; -typedef struct _snd_rawmidi_ops { - int (*open) (snd_rawmidi_substream_t * substream); - int (*close) (snd_rawmidi_substream_t * substream); - void (*trigger) (snd_rawmidi_substream_t * substream, int up); - void (*drain) (snd_rawmidi_substream_t * substream); -} snd_rawmidi_ops_t; +struct snd_rawmidi_ops { + int (*open) (struct snd_rawmidi_substream * substream); + int (*close) (struct snd_rawmidi_substream * substream); + void (*trigger) (struct snd_rawmidi_substream * substream, int up); + void (*drain) (struct snd_rawmidi_substream * substream); +}; -typedef struct _snd_rawmidi_global_ops { - int (*dev_register) (snd_rawmidi_t * rmidi); - int (*dev_unregister) (snd_rawmidi_t * rmidi); -} snd_rawmidi_global_ops_t; +struct snd_rawmidi_global_ops { + int (*dev_register) (struct snd_rawmidi * rmidi); + int (*dev_unregister) (struct snd_rawmidi * rmidi); +}; -struct _snd_rawmidi_runtime { +struct snd_rawmidi_runtime { unsigned int drain: 1, /* drain stage */ oss: 1; /* OSS compatible mode */ /* midi stream buffer */ @@ -80,15 +74,15 @@ struct _snd_rawmidi_runtime { spinlock_t lock; wait_queue_head_t sleep; /* event handler (new bytes, input only) */ - void (*event)(snd_rawmidi_substream_t *substream); + void (*event)(struct snd_rawmidi_substream *substream); /* defers calls to event [input] or ops->trigger [output] */ struct tasklet_struct tasklet; /* private data */ void *private_data; - void (*private_free)(snd_rawmidi_substream_t *substream); + void (*private_free)(struct snd_rawmidi_substream *substream); }; -struct _snd_rawmidi_substream { +struct snd_rawmidi_substream { struct list_head list; /* list of all substream for given stream */ int stream; /* direction */ int number; /* substream number */ @@ -97,28 +91,28 @@ struct _snd_rawmidi_substream { active_sensing: 1; /* send active sensing when close */ int use_count; /* use counter (for output) */ size_t bytes; - snd_rawmidi_t *rmidi; - snd_rawmidi_str_t *pstr; + struct snd_rawmidi *rmidi; + struct snd_rawmidi_str *pstr; char name[32]; - snd_rawmidi_runtime_t *runtime; + struct snd_rawmidi_runtime *runtime; /* hardware layer */ - snd_rawmidi_ops_t *ops; + struct snd_rawmidi_ops *ops; }; -typedef struct _snd_rawmidi_file { - snd_rawmidi_t *rmidi; - snd_rawmidi_substream_t *input; - snd_rawmidi_substream_t *output; -} snd_rawmidi_file_t; +struct snd_rawmidi_file { + struct snd_rawmidi *rmidi; + struct snd_rawmidi_substream *input; + struct snd_rawmidi_substream *output; +}; -struct _snd_rawmidi_str { +struct snd_rawmidi_str { unsigned int substream_count; unsigned int substream_opened; struct list_head substreams; }; -struct _snd_rawmidi { - snd_card_t *card; +struct snd_rawmidi { + struct snd_card *card; unsigned int device; /* device number */ unsigned int info_flags; /* SNDRV_RAWMIDI_INFO_XXXX */ @@ -129,52 +123,61 @@ struct _snd_rawmidi { int ossreg; #endif - snd_rawmidi_global_ops_t *ops; + struct snd_rawmidi_global_ops *ops; - snd_rawmidi_str_t streams[2]; + struct snd_rawmidi_str streams[2]; void *private_data; - void (*private_free) (snd_rawmidi_t *rmidi); + void (*private_free) (struct snd_rawmidi *rmidi); struct semaphore open_mutex; wait_queue_head_t open_wait; - snd_info_entry_t *dev; - snd_info_entry_t *proc_entry; + struct snd_info_entry *dev; + struct snd_info_entry *proc_entry; #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) - snd_seq_device_t *seq_dev; + struct snd_seq_device *seq_dev; #endif }; /* main rawmidi functions */ -int snd_rawmidi_new(snd_card_t * card, char *id, int device, +int snd_rawmidi_new(struct snd_card *card, char *id, int device, int output_count, int input_count, - snd_rawmidi_t ** rmidi); -void snd_rawmidi_set_ops(snd_rawmidi_t * rmidi, int stream, snd_rawmidi_ops_t * ops); + struct snd_rawmidi **rmidi); +void snd_rawmidi_set_ops(struct snd_rawmidi *rmidi, int stream, + struct snd_rawmidi_ops *ops); /* callbacks */ -void snd_rawmidi_receive_reset(snd_rawmidi_substream_t * substream); -int snd_rawmidi_receive(snd_rawmidi_substream_t * substream, const unsigned char *buffer, int count); -void snd_rawmidi_transmit_reset(snd_rawmidi_substream_t * substream); -int snd_rawmidi_transmit_empty(snd_rawmidi_substream_t * substream); -int snd_rawmidi_transmit_peek(snd_rawmidi_substream_t * substream, unsigned char *buffer, int count); -int snd_rawmidi_transmit_ack(snd_rawmidi_substream_t * substream, int count); -int snd_rawmidi_transmit(snd_rawmidi_substream_t * substream, unsigned char *buffer, int count); +void snd_rawmidi_receive_reset(struct snd_rawmidi_substream *substream); +int snd_rawmidi_receive(struct snd_rawmidi_substream *substream, + const unsigned char *buffer, int count); +void snd_rawmidi_transmit_reset(struct snd_rawmidi_substream *substream); +int snd_rawmidi_transmit_empty(struct snd_rawmidi_substream *substream); +int snd_rawmidi_transmit_peek(struct snd_rawmidi_substream *substream, + unsigned char *buffer, int count); +int snd_rawmidi_transmit_ack(struct snd_rawmidi_substream *substream, int count); +int snd_rawmidi_transmit(struct snd_rawmidi_substream *substream, + unsigned char *buffer, int count); /* main midi functions */ -int snd_rawmidi_info_select(snd_card_t *card, snd_rawmidi_info_t *info); -int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice, int mode, snd_rawmidi_file_t * rfile); -int snd_rawmidi_kernel_release(snd_rawmidi_file_t * rfile); -int snd_rawmidi_output_params(snd_rawmidi_substream_t * substream, snd_rawmidi_params_t * params); -int snd_rawmidi_input_params(snd_rawmidi_substream_t * substream, snd_rawmidi_params_t * params); -int snd_rawmidi_drop_output(snd_rawmidi_substream_t * substream); -int snd_rawmidi_drain_output(snd_rawmidi_substream_t * substream); -int snd_rawmidi_drain_input(snd_rawmidi_substream_t * substream); -long snd_rawmidi_kernel_read(snd_rawmidi_substream_t * substream, unsigned char *buf, long count); -long snd_rawmidi_kernel_write(snd_rawmidi_substream_t * substream, const unsigned char *buf, long count); +int snd_rawmidi_info_select(struct snd_card *card, struct snd_rawmidi_info *info); +int snd_rawmidi_kernel_open(int cardnum, int device, int subdevice, int mode, + struct snd_rawmidi_file *rfile); +int snd_rawmidi_kernel_release(struct snd_rawmidi_file *rfile); +int snd_rawmidi_output_params(struct snd_rawmidi_substream *substream, + struct snd_rawmidi_params *params); +int snd_rawmidi_input_params(struct snd_rawmidi_substream *substream, + struct snd_rawmidi_params *params); +int snd_rawmidi_drop_output(struct snd_rawmidi_substream *substream); +int snd_rawmidi_drain_output(struct snd_rawmidi_substream *substream); +int snd_rawmidi_drain_input(struct snd_rawmidi_substream *substream); +long snd_rawmidi_kernel_read(struct snd_rawmidi_substream *substream, + unsigned char *buf, long count); +long snd_rawmidi_kernel_write(struct snd_rawmidi_substream *substream, + const unsigned char *buf, long count); #endif /* __SOUND_RAWMIDI_H */ |