Browse files

[ALSA] Remove xxx_t typedefs: Sequencer

Modules: ALSA sequencer

Remove xxx_t typedefs from the core sequencer codes.

Signed-off-by: Takashi Iwai <>
  • Loading branch information...
tiwai authored and Jaroslav Kysela committed Nov 17, 2005
1 parent 6ac77bc commit c7e0b5bf9fff1b726495081447c107a2333fb82c

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -21,9 +21,6 @@
-typedef struct snd_seq_device snd_seq_device_t;
-typedef struct snd_seq_dev_ops snd_seq_dev_ops_t;
* registered device information
@@ -36,15 +33,15 @@ typedef struct snd_seq_dev_ops snd_seq_dev_ops_t;
struct snd_seq_device {
/* device info */
- snd_card_t *card; /* sound card */
+ struct snd_card *card; /* sound card */
int device; /* device number */
char id[ID_LEN]; /* driver id */
char name[80]; /* device name */
int argsize; /* size of the argument */
void *driver_data; /* private data for driver */
int status; /* flag - read only */
void *private_data; /* private data for the caller */
- void (*private_free)(snd_seq_device_t *device);
+ void (*private_free)(struct snd_seq_device *device);
struct list_head list; /* link to next device */
@@ -63,19 +60,19 @@ struct snd_seq_device {
* Typically, call snd_device_free(dev->card, dev->driver_data)
struct snd_seq_dev_ops {
- int (*init_device)(snd_seq_device_t *dev);
- int (*free_device)(snd_seq_device_t *dev);
+ int (*init_device)(struct snd_seq_device *dev);
+ int (*free_device)(struct snd_seq_device *dev);
* prototypes
void snd_seq_device_load_drivers(void);
-int snd_seq_device_new(snd_card_t *card, int device, char *id, int argsize, snd_seq_device_t **result);
-int snd_seq_device_register_driver(char *id, snd_seq_dev_ops_t *entry, int argsize);
+int snd_seq_device_new(struct snd_card *card, int device, char *id, int argsize, struct snd_seq_device **result);
+int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry, int argsize);
int snd_seq_device_unregister_driver(char *id);
-#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(snd_seq_device_t))
+#define SNDRV_SEQ_DEVICE_ARGPTR(dev) (void *)((char *)(dev) + sizeof(struct snd_seq_device))
@@ -84,5 +81,4 @@ int snd_seq_device_unregister_driver(char *id);
#define SNDRV_SEQ_DEV_ID_MIDISYNTH "seq-midi"
#define SNDRV_SEQ_DEV_ID_OPL3 "opl3-synth"
#endif /* __SOUND_SEQ_DEVICE_H */
@@ -24,41 +24,39 @@
#include "seq_kernel.h"
/* Instrument cluster */
-typedef struct _snd_seq_kcluster {
+struct snd_seq_kcluster {
snd_seq_instr_cluster_t cluster;
char name[32];
int priority;
- struct _snd_seq_kcluster *next;
-} snd_seq_kcluster_t;
+ struct snd_seq_kcluster *next;
/* return pointer to private data */
-#define KINSTR_DATA(kinstr) (void *)(((char *)kinstr) + sizeof(snd_seq_kinstr_t))
-typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t;
+#define KINSTR_DATA(kinstr) (void *)(((char *)kinstr) + sizeof(struct snd_seq_kinstr))
/* Instrument structure */
-typedef struct _snd_seq_kinstr {
- snd_seq_instr_t instr;
+struct snd_seq_kinstr {
+ struct snd_seq_instr instr;
char name[32];
int type; /* instrument type */
int use; /* use count */
int busy; /* not useable */
int add_len; /* additional length */
- snd_seq_kinstr_ops_t *ops; /* operations */
- struct _snd_seq_kinstr *next;
-} snd_seq_kinstr_t;
+ struct snd_seq_kinstr_ops *ops; /* operations */
+ struct snd_seq_kinstr *next;
/* Instrument flags */
#define SNDRV_SEQ_INSTR_FLG_DIRECT (1<<0) /* accept only direct events */
/* List of all instruments */
-typedef struct {
- snd_seq_kinstr_t *hash[SNDRV_SEQ_INSTR_HASH_SIZE];
+struct snd_seq_kinstr_list {
+ struct snd_seq_kinstr *hash[SNDRV_SEQ_INSTR_HASH_SIZE];
int count; /* count of all instruments */
- snd_seq_kcluster_t *chash[SNDRV_SEQ_INSTR_HASH_SIZE];
+ struct snd_seq_kcluster *chash[SNDRV_SEQ_INSTR_HASH_SIZE];
int ccount; /* count of all clusters */
int owner; /* current owner of the instrument list */
@@ -68,7 +66,7 @@ typedef struct {
spinlock_t ops_lock;
struct semaphore ops_mutex;
unsigned long ops_flags;
-} snd_seq_kinstr_list_t;
@@ -78,33 +76,33 @@ struct snd_seq_kinstr_ops {
long add_len; /* additional length */
char *instr_type;
int (*info)(void *private_data, char *info_data, long len);
- int (*put)(void *private_data, snd_seq_kinstr_t *kinstr,
+ int (*put)(void *private_data, struct snd_seq_kinstr *kinstr,
char __user *instr_data, long len, int atomic, int cmd);
- int (*get)(void *private_data, snd_seq_kinstr_t *kinstr,
+ int (*get)(void *private_data, struct snd_seq_kinstr *kinstr,
char __user *instr_data, long len, int atomic, int cmd);
- int (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size);
- int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic);
- void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what);
+ int (*get_size)(void *private_data, struct snd_seq_kinstr *kinstr, long *size);
+ int (*remove)(void *private_data, struct snd_seq_kinstr *kinstr, int atomic);
+ void (*notify)(void *private_data, struct snd_seq_kinstr *kinstr, int what);
struct snd_seq_kinstr_ops *next;
/* instrument operations */
-snd_seq_kinstr_list_t *snd_seq_instr_list_new(void);
-void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list);
-int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list,
- snd_seq_instr_header_t *ifree,
+struct snd_seq_kinstr_list *snd_seq_instr_list_new(void);
+void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list);
+int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
+ struct snd_seq_instr_header *ifree,
int client,
int atomic);
-snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list,
- snd_seq_instr_t *instr,
- int exact,
- int follow_alias);
-void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list,
- snd_seq_kinstr_t *instr);
-int snd_seq_instr_event(snd_seq_kinstr_ops_t *ops,
- snd_seq_kinstr_list_t *list,
- snd_seq_event_t *ev,
+struct snd_seq_kinstr *snd_seq_instr_find(struct snd_seq_kinstr_list *list,
+ struct snd_seq_instr *instr,
+ int exact,
+ int follow_alias);
+void snd_seq_instr_free_use(struct snd_seq_kinstr_list *list,
+ struct snd_seq_kinstr *instr);
+int snd_seq_instr_event(struct snd_seq_kinstr_ops *ops,
+ struct snd_seq_kinstr_list *list,
+ struct snd_seq_event *ev,
int client,
int atomic,
int hop);
@@ -24,62 +24,8 @@
#include <linux/time.h>
#include "asequencer.h"
-typedef sndrv_seq_tick_time_t snd_seq_tick_time_t;
-typedef sndrv_seq_position_t snd_seq_position_t;
-typedef sndrv_seq_frequency_t snd_seq_frequency_t;
-typedef sndrv_seq_instr_cluster_t snd_seq_instr_cluster_t;
-typedef enum sndrv_seq_client_type snd_seq_client_type_t;
-typedef enum sndrv_seq_stop_mode snd_seq_stop_mode_t;
-typedef struct sndrv_seq_port_info snd_seq_port_info_t;
-typedef struct sndrv_seq_port_subscribe snd_seq_port_subscribe_t;
-typedef struct sndrv_seq_event snd_seq_event_t;
-typedef struct sndrv_seq_addr snd_seq_addr_t;
-typedef struct sndrv_seq_ev_volume snd_seq_ev_volume_t;
-typedef struct sndrv_seq_ev_loop snd_seq_ev_loop_t;
-typedef struct sndrv_seq_remove_events snd_seq_remove_events_t;
-typedef struct sndrv_seq_query_subs snd_seq_query_subs_t;
-typedef struct sndrv_seq_real_time snd_seq_real_time_t;
-typedef struct sndrv_seq_system_info snd_seq_system_info_t;
-typedef struct sndrv_seq_client_info snd_seq_client_info_t;
-typedef struct sndrv_seq_queue_info snd_seq_queue_info_t;
-typedef struct sndrv_seq_queue_status snd_seq_queue_status_t;
-typedef struct sndrv_seq_queue_tempo snd_seq_queue_tempo_t;
-typedef struct sndrv_seq_queue_owner snd_seq_queue_owner_t;
-typedef struct sndrv_seq_queue_timer snd_seq_queue_timer_t;
-typedef struct sndrv_seq_queue_client snd_seq_queue_client_t;
-typedef struct sndrv_seq_client_pool snd_seq_client_pool_t;
-typedef struct sndrv_seq_instr snd_seq_instr_t;
-typedef struct sndrv_seq_instr_data snd_seq_instr_data_t;
-typedef struct sndrv_seq_instr_header snd_seq_instr_header_t;
-typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
-#define snd_seq_event_bounce_ext_data sndrv_seq_event_bounce_ext_data
-#define snd_seq_ev_is_result_type sndrv_seq_ev_is_result_type
-#define snd_seq_ev_is_channel_type sndrv_seq_ev_is_channel_type
-#define snd_seq_ev_is_note_type sndrv_seq_ev_is_note_type
-#define snd_seq_ev_is_control_type sndrv_seq_ev_is_control_type
-#define snd_seq_ev_is_queue_type sndrv_seq_ev_is_queue_type
-#define snd_seq_ev_is_message_type sndrv_seq_ev_is_message_type
-#define snd_seq_ev_is_sample_type sndrv_seq_ev_is_sample_type
-#define snd_seq_ev_is_user_type sndrv_seq_ev_is_user_type
-#define snd_seq_ev_is_fixed_type sndrv_seq_ev_is_fixed_type
-#define snd_seq_ev_is_instr_type sndrv_seq_ev_is_instr_type
-#define snd_seq_ev_is_variable_type sndrv_seq_ev_is_variable_type
-#define snd_seq_ev_is_reserved sndrv_seq_ev_is_reserved
-#define snd_seq_ev_is_direct sndrv_seq_ev_is_direct
-#define snd_seq_ev_is_prior sndrv_seq_ev_is_prior
-#define snd_seq_ev_length_type sndrv_seq_ev_length_type
-#define snd_seq_ev_is_fixed sndrv_seq_ev_is_fixed
-#define snd_seq_ev_is_variable sndrv_seq_ev_is_variable
-#define snd_seq_ev_is_varusr sndrv_seq_ev_is_varusr
-#define snd_seq_ev_timestamp_type sndrv_seq_ev_timestamp_type
-#define snd_seq_ev_is_tick sndrv_seq_ev_is_tick
-#define snd_seq_ev_is_real sndrv_seq_ev_is_real
-#define snd_seq_ev_timemode_type sndrv_seq_ev_timemode_type
-#define snd_seq_ev_is_abstime sndrv_seq_ev_is_abstime
-#define snd_seq_ev_is_reltime sndrv_seq_ev_is_reltime
-#define snd_seq_queue_sync_port sndrv_seq_queue_sync_port
-#define snd_seq_queue_owner sndrv_seq_queue_owner
+typedef struct snd_seq_real_time snd_seq_real_time_t;
+typedef union snd_seq_timestamp snd_seq_timestamp_t;
/* maximum number of events dequeued per schedule interval */
@@ -114,69 +60,56 @@ typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
/* max size of event size */
#define SNDRV_SEQ_MAX_EVENT_LEN 0x3fffffff
-/* typedefs */
-struct _snd_seq_user_client;
-struct _snd_seq_kernel_client;
-struct _snd_seq_client;
-struct _snd_seq_queue;
-typedef struct _snd_seq_user_client user_client_t;
-typedef struct _snd_seq_kernel_client kernel_client_t;
-typedef struct _snd_seq_client client_t;
-typedef struct _snd_seq_queue queue_t;
/* call-backs for kernel client */
-typedef struct {
+struct snd_seq_client_callback {
void *private_data;
unsigned allow_input: 1,
allow_output: 1;
-} snd_seq_client_callback_t;
/* call-backs for kernel port */
-typedef int (snd_seq_kernel_port_open_t)(void *private_data, snd_seq_port_subscribe_t *info);
-typedef int (snd_seq_kernel_port_close_t)(void *private_data, snd_seq_port_subscribe_t *info);
-typedef int (snd_seq_kernel_port_input_t)(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop);
-typedef void (snd_seq_kernel_port_private_free_t)(void *private_data);
-typedef struct {
+struct snd_seq_port_callback {
struct module *owner;
void *private_data;
- snd_seq_kernel_port_open_t *subscribe;
- snd_seq_kernel_port_close_t *unsubscribe;
- snd_seq_kernel_port_open_t *use;
- snd_seq_kernel_port_close_t *unuse;
- snd_seq_kernel_port_input_t *event_input;
- snd_seq_kernel_port_private_free_t *private_free;
+ int (*subscribe)(void *private_data, struct snd_seq_port_subscribe *info);
+ int (*unsubscribe)(void *private_data, struct snd_seq_port_subscribe *info);
+ int (*use)(void *private_data, struct snd_seq_port_subscribe *info);
+ int (*unuse)(void *private_data, struct snd_seq_port_subscribe *info);
+ int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
+ void (*private_free)(void *private_data);
unsigned int callback_all; /* call subscribe callbacks at each connection/disconnection */
-} snd_seq_port_callback_t;
/* interface for kernel client */
-extern int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_seq_client_callback_t *callback);
-extern int snd_seq_delete_kernel_client(int client);
-extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int atomic, int hop);
-extern int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t *ev, int atomic, int hop);
-extern int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
+int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
+ struct snd_seq_client_callback *callback);
+int snd_seq_delete_kernel_client(int client);
+int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
+int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
#define SNDRV_SEQ_EXT_MASK 0xc0000000
#define SNDRV_SEQ_EXT_USRPTR 0x80000000
#define SNDRV_SEQ_EXT_CHAINED 0x40000000
typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count);
-int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned);
-int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data);
+int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
+ int in_kernel, int size_aligned);
+int snd_seq_dump_var_event(const struct snd_seq_event *event,
+ snd_seq_dump_func_t func, void *private_data);
/* interface for OSS emulation */
-int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo);
+int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo);
/* port callback routines */
-void snd_port_init_callback(snd_seq_port_callback_t *p);
-snd_seq_port_callback_t *snd_port_alloc_callback(void);
+void snd_port_init_callback(struct snd_seq_port_callback *p);
+struct snd_seq_port_callback *snd_port_alloc_callback(void);
/* port attach/detach */
-int snd_seq_event_port_attach(int client, snd_seq_port_callback_t *pcbp,
+int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
int cap, int type, int midi_channels, int midi_voices, char *portname);
int snd_seq_event_port_detach(int client, int port);
Oops, something went wrong.

0 comments on commit c7e0b5b

Please sign in to comment.