aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/seq_kernel.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:04:02 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:17:52 -0500
commitc7e0b5bf9fff1b726495081447c107a2333fb82c (patch)
treef4d9ec9a6446f8e2afde4c94e10a39f2b86a0bc9 /include/sound/seq_kernel.h
parent6ac77bc180fbd985988015020c2e2347e802959d (diff)
[ALSA] Remove xxx_t typedefs: Sequencer
Modules: ALSA sequencer Remove xxx_t typedefs from the core sequencer codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/seq_kernel.h')
-rw-r--r--include/sound/seq_kernel.h119
1 files changed, 26 insertions, 93 deletions
diff --git a/include/sound/seq_kernel.h b/include/sound/seq_kernel.h
index 4beca1952c76..1b60890b44cd 100644
--- a/include/sound/seq_kernel.h
+++ b/include/sound/seq_kernel.h
@@ -24,62 +24,8 @@
24#include <linux/time.h> 24#include <linux/time.h>
25#include "asequencer.h" 25#include "asequencer.h"
26 26
27typedef sndrv_seq_tick_time_t snd_seq_tick_time_t; 27typedef struct snd_seq_real_time snd_seq_real_time_t;
28typedef sndrv_seq_position_t snd_seq_position_t; 28typedef union snd_seq_timestamp snd_seq_timestamp_t;
29typedef sndrv_seq_frequency_t snd_seq_frequency_t;
30typedef sndrv_seq_instr_cluster_t snd_seq_instr_cluster_t;
31typedef enum sndrv_seq_client_type snd_seq_client_type_t;
32typedef enum sndrv_seq_stop_mode snd_seq_stop_mode_t;
33typedef struct sndrv_seq_port_info snd_seq_port_info_t;
34typedef struct sndrv_seq_port_subscribe snd_seq_port_subscribe_t;
35typedef struct sndrv_seq_event snd_seq_event_t;
36typedef struct sndrv_seq_addr snd_seq_addr_t;
37typedef struct sndrv_seq_ev_volume snd_seq_ev_volume_t;
38typedef struct sndrv_seq_ev_loop snd_seq_ev_loop_t;
39typedef struct sndrv_seq_remove_events snd_seq_remove_events_t;
40typedef struct sndrv_seq_query_subs snd_seq_query_subs_t;
41typedef struct sndrv_seq_real_time snd_seq_real_time_t;
42typedef struct sndrv_seq_system_info snd_seq_system_info_t;
43typedef struct sndrv_seq_client_info snd_seq_client_info_t;
44typedef struct sndrv_seq_queue_info snd_seq_queue_info_t;
45typedef struct sndrv_seq_queue_status snd_seq_queue_status_t;
46typedef struct sndrv_seq_queue_tempo snd_seq_queue_tempo_t;
47typedef struct sndrv_seq_queue_owner snd_seq_queue_owner_t;
48typedef struct sndrv_seq_queue_timer snd_seq_queue_timer_t;
49typedef struct sndrv_seq_queue_client snd_seq_queue_client_t;
50typedef struct sndrv_seq_client_pool snd_seq_client_pool_t;
51typedef struct sndrv_seq_instr snd_seq_instr_t;
52typedef struct sndrv_seq_instr_data snd_seq_instr_data_t;
53typedef struct sndrv_seq_instr_header snd_seq_instr_header_t;
54typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
55
56#define snd_seq_event_bounce_ext_data sndrv_seq_event_bounce_ext_data
57#define snd_seq_ev_is_result_type sndrv_seq_ev_is_result_type
58#define snd_seq_ev_is_channel_type sndrv_seq_ev_is_channel_type
59#define snd_seq_ev_is_note_type sndrv_seq_ev_is_note_type
60#define snd_seq_ev_is_control_type sndrv_seq_ev_is_control_type
61#define snd_seq_ev_is_queue_type sndrv_seq_ev_is_queue_type
62#define snd_seq_ev_is_message_type sndrv_seq_ev_is_message_type
63#define snd_seq_ev_is_sample_type sndrv_seq_ev_is_sample_type
64#define snd_seq_ev_is_user_type sndrv_seq_ev_is_user_type
65#define snd_seq_ev_is_fixed_type sndrv_seq_ev_is_fixed_type
66#define snd_seq_ev_is_instr_type sndrv_seq_ev_is_instr_type
67#define snd_seq_ev_is_variable_type sndrv_seq_ev_is_variable_type
68#define snd_seq_ev_is_reserved sndrv_seq_ev_is_reserved
69#define snd_seq_ev_is_direct sndrv_seq_ev_is_direct
70#define snd_seq_ev_is_prior sndrv_seq_ev_is_prior
71#define snd_seq_ev_length_type sndrv_seq_ev_length_type
72#define snd_seq_ev_is_fixed sndrv_seq_ev_is_fixed
73#define snd_seq_ev_is_variable sndrv_seq_ev_is_variable
74#define snd_seq_ev_is_varusr sndrv_seq_ev_is_varusr
75#define snd_seq_ev_timestamp_type sndrv_seq_ev_timestamp_type
76#define snd_seq_ev_is_tick sndrv_seq_ev_is_tick
77#define snd_seq_ev_is_real sndrv_seq_ev_is_real
78#define snd_seq_ev_timemode_type sndrv_seq_ev_timemode_type
79#define snd_seq_ev_is_abstime sndrv_seq_ev_is_abstime
80#define snd_seq_ev_is_reltime sndrv_seq_ev_is_reltime
81#define snd_seq_queue_sync_port sndrv_seq_queue_sync_port
82#define snd_seq_queue_owner sndrv_seq_queue_owner
83 29
84/* maximum number of events dequeued per schedule interval */ 30/* maximum number of events dequeued per schedule interval */
85#define SNDRV_SEQ_MAX_DEQUEUE 50 31#define SNDRV_SEQ_MAX_DEQUEUE 50
@@ -114,69 +60,56 @@ typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
114/* max size of event size */ 60/* max size of event size */
115#define SNDRV_SEQ_MAX_EVENT_LEN 0x3fffffff 61#define SNDRV_SEQ_MAX_EVENT_LEN 0x3fffffff
116 62
117/* typedefs */
118struct _snd_seq_user_client;
119struct _snd_seq_kernel_client;
120struct _snd_seq_client;
121struct _snd_seq_queue;
122
123typedef struct _snd_seq_user_client user_client_t;
124typedef struct _snd_seq_kernel_client kernel_client_t;
125typedef struct _snd_seq_client client_t;
126typedef struct _snd_seq_queue queue_t;
127
128/* call-backs for kernel client */ 63/* call-backs for kernel client */
129 64
130typedef struct { 65struct snd_seq_client_callback {
131 void *private_data; 66 void *private_data;
132 unsigned allow_input: 1, 67 unsigned allow_input: 1,
133 allow_output: 1; 68 allow_output: 1;
134 /*...*/ 69 /*...*/
135} snd_seq_client_callback_t; 70};
136 71
137/* call-backs for kernel port */ 72/* call-backs for kernel port */
138typedef int (snd_seq_kernel_port_open_t)(void *private_data, snd_seq_port_subscribe_t *info); 73struct snd_seq_port_callback {
139typedef int (snd_seq_kernel_port_close_t)(void *private_data, snd_seq_port_subscribe_t *info);
140typedef int (snd_seq_kernel_port_input_t)(snd_seq_event_t *ev, int direct, void *private_data, int atomic, int hop);
141typedef void (snd_seq_kernel_port_private_free_t)(void *private_data);
142
143typedef struct {
144 struct module *owner; 74 struct module *owner;
145 void *private_data; 75 void *private_data;
146 snd_seq_kernel_port_open_t *subscribe; 76 int (*subscribe)(void *private_data, struct snd_seq_port_subscribe *info);
147 snd_seq_kernel_port_close_t *unsubscribe; 77 int (*unsubscribe)(void *private_data, struct snd_seq_port_subscribe *info);
148 snd_seq_kernel_port_open_t *use; 78 int (*use)(void *private_data, struct snd_seq_port_subscribe *info);
149 snd_seq_kernel_port_close_t *unuse; 79 int (*unuse)(void *private_data, struct snd_seq_port_subscribe *info);
150 snd_seq_kernel_port_input_t *event_input; 80 int (*event_input)(struct snd_seq_event *ev, int direct, void *private_data, int atomic, int hop);
151 snd_seq_kernel_port_private_free_t *private_free; 81 void (*private_free)(void *private_data);
152 unsigned int callback_all; /* call subscribe callbacks at each connection/disconnection */ 82 unsigned int callback_all; /* call subscribe callbacks at each connection/disconnection */
153 /*...*/ 83 /*...*/
154} snd_seq_port_callback_t; 84};
155 85
156/* interface for kernel client */ 86/* interface for kernel client */
157extern int snd_seq_create_kernel_client(snd_card_t *card, int client_index, snd_seq_client_callback_t *callback); 87int snd_seq_create_kernel_client(struct snd_card *card, int client_index,
158extern int snd_seq_delete_kernel_client(int client); 88 struct snd_seq_client_callback *callback);
159extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int atomic, int hop); 89int snd_seq_delete_kernel_client(int client);
160extern int snd_seq_kernel_client_dispatch(int client, snd_seq_event_t *ev, int atomic, int hop); 90int snd_seq_kernel_client_enqueue(int client, struct snd_seq_event *ev, int atomic, int hop);
161extern int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg); 91int snd_seq_kernel_client_dispatch(int client, struct snd_seq_event *ev, int atomic, int hop);
92int snd_seq_kernel_client_ctl(int client, unsigned int cmd, void *arg);
162 93
163#define SNDRV_SEQ_EXT_MASK 0xc0000000 94#define SNDRV_SEQ_EXT_MASK 0xc0000000
164#define SNDRV_SEQ_EXT_USRPTR 0x80000000 95#define SNDRV_SEQ_EXT_USRPTR 0x80000000
165#define SNDRV_SEQ_EXT_CHAINED 0x40000000 96#define SNDRV_SEQ_EXT_CHAINED 0x40000000
166 97
167typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count); 98typedef int (*snd_seq_dump_func_t)(void *ptr, void *buf, int count);
168int snd_seq_expand_var_event(const snd_seq_event_t *event, int count, char *buf, int in_kernel, int size_aligned); 99int snd_seq_expand_var_event(const struct snd_seq_event *event, int count, char *buf,
169int snd_seq_dump_var_event(const snd_seq_event_t *event, snd_seq_dump_func_t func, void *private_data); 100 int in_kernel, int size_aligned);
101int snd_seq_dump_var_event(const struct snd_seq_event *event,
102 snd_seq_dump_func_t func, void *private_data);
170 103
171/* interface for OSS emulation */ 104/* interface for OSS emulation */
172int snd_seq_set_queue_tempo(int client, snd_seq_queue_tempo_t *tempo); 105int snd_seq_set_queue_tempo(int client, struct snd_seq_queue_tempo *tempo);
173 106
174/* port callback routines */ 107/* port callback routines */
175void snd_port_init_callback(snd_seq_port_callback_t *p); 108void snd_port_init_callback(struct snd_seq_port_callback *p);
176snd_seq_port_callback_t *snd_port_alloc_callback(void); 109struct snd_seq_port_callback *snd_port_alloc_callback(void);
177 110
178/* port attach/detach */ 111/* port attach/detach */
179int snd_seq_event_port_attach(int client, snd_seq_port_callback_t *pcbp, 112int snd_seq_event_port_attach(int client, struct snd_seq_port_callback *pcbp,
180 int cap, int type, int midi_channels, int midi_voices, char *portname); 113 int cap, int type, int midi_channels, int midi_voices, char *portname);
181int snd_seq_event_port_detach(int client, int port); 114int snd_seq_event_port_detach(int client, int port);
182 115