aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/seq_instr.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_instr.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_instr.h')
-rw-r--r--include/sound/seq_instr.h64
1 files changed, 31 insertions, 33 deletions
diff --git a/include/sound/seq_instr.h b/include/sound/seq_instr.h
index 1a654df4aa97..db764f09efb7 100644
--- a/include/sound/seq_instr.h
+++ b/include/sound/seq_instr.h
@@ -24,29 +24,27 @@
24#include "seq_kernel.h" 24#include "seq_kernel.h"
25 25
26/* Instrument cluster */ 26/* Instrument cluster */
27typedef struct _snd_seq_kcluster { 27struct snd_seq_kcluster {
28 snd_seq_instr_cluster_t cluster; 28 snd_seq_instr_cluster_t cluster;
29 char name[32]; 29 char name[32];
30 int priority; 30 int priority;
31 struct _snd_seq_kcluster *next; 31 struct snd_seq_kcluster *next;
32} snd_seq_kcluster_t; 32};
33 33
34/* return pointer to private data */ 34/* return pointer to private data */
35#define KINSTR_DATA(kinstr) (void *)(((char *)kinstr) + sizeof(snd_seq_kinstr_t)) 35#define KINSTR_DATA(kinstr) (void *)(((char *)kinstr) + sizeof(struct snd_seq_kinstr))
36
37typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t;
38 36
39/* Instrument structure */ 37/* Instrument structure */
40typedef struct _snd_seq_kinstr { 38struct snd_seq_kinstr {
41 snd_seq_instr_t instr; 39 struct snd_seq_instr instr;
42 char name[32]; 40 char name[32];
43 int type; /* instrument type */ 41 int type; /* instrument type */
44 int use; /* use count */ 42 int use; /* use count */
45 int busy; /* not useable */ 43 int busy; /* not useable */
46 int add_len; /* additional length */ 44 int add_len; /* additional length */
47 snd_seq_kinstr_ops_t *ops; /* operations */ 45 struct snd_seq_kinstr_ops *ops; /* operations */
48 struct _snd_seq_kinstr *next; 46 struct snd_seq_kinstr *next;
49} snd_seq_kinstr_t; 47};
50 48
51#define SNDRV_SEQ_INSTR_HASH_SIZE 32 49#define SNDRV_SEQ_INSTR_HASH_SIZE 32
52 50
@@ -54,11 +52,11 @@ typedef struct _snd_seq_kinstr {
54#define SNDRV_SEQ_INSTR_FLG_DIRECT (1<<0) /* accept only direct events */ 52#define SNDRV_SEQ_INSTR_FLG_DIRECT (1<<0) /* accept only direct events */
55 53
56/* List of all instruments */ 54/* List of all instruments */
57typedef struct { 55struct snd_seq_kinstr_list {
58 snd_seq_kinstr_t *hash[SNDRV_SEQ_INSTR_HASH_SIZE]; 56 struct snd_seq_kinstr *hash[SNDRV_SEQ_INSTR_HASH_SIZE];
59 int count; /* count of all instruments */ 57 int count; /* count of all instruments */
60 58
61 snd_seq_kcluster_t *chash[SNDRV_SEQ_INSTR_HASH_SIZE]; 59 struct snd_seq_kcluster *chash[SNDRV_SEQ_INSTR_HASH_SIZE];
62 int ccount; /* count of all clusters */ 60 int ccount; /* count of all clusters */
63 61
64 int owner; /* current owner of the instrument list */ 62 int owner; /* current owner of the instrument list */
@@ -68,7 +66,7 @@ typedef struct {
68 spinlock_t ops_lock; 66 spinlock_t ops_lock;
69 struct semaphore ops_mutex; 67 struct semaphore ops_mutex;
70 unsigned long ops_flags; 68 unsigned long ops_flags;
71} snd_seq_kinstr_list_t; 69};
72 70
73#define SNDRV_SEQ_INSTR_NOTIFY_REMOVE 0 71#define SNDRV_SEQ_INSTR_NOTIFY_REMOVE 0
74#define SNDRV_SEQ_INSTR_NOTIFY_CHANGE 1 72#define SNDRV_SEQ_INSTR_NOTIFY_CHANGE 1
@@ -78,33 +76,33 @@ struct snd_seq_kinstr_ops {
78 long add_len; /* additional length */ 76 long add_len; /* additional length */
79 char *instr_type; 77 char *instr_type;
80 int (*info)(void *private_data, char *info_data, long len); 78 int (*info)(void *private_data, char *info_data, long len);
81 int (*put)(void *private_data, snd_seq_kinstr_t *kinstr, 79 int (*put)(void *private_data, struct snd_seq_kinstr *kinstr,
82 char __user *instr_data, long len, int atomic, int cmd); 80 char __user *instr_data, long len, int atomic, int cmd);
83 int (*get)(void *private_data, snd_seq_kinstr_t *kinstr, 81 int (*get)(void *private_data, struct snd_seq_kinstr *kinstr,
84 char __user *instr_data, long len, int atomic, int cmd); 82 char __user *instr_data, long len, int atomic, int cmd);
85 int (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size); 83 int (*get_size)(void *private_data, struct snd_seq_kinstr *kinstr, long *size);
86 int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic); 84 int (*remove)(void *private_data, struct snd_seq_kinstr *kinstr, int atomic);
87 void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what); 85 void (*notify)(void *private_data, struct snd_seq_kinstr *kinstr, int what);
88 struct snd_seq_kinstr_ops *next; 86 struct snd_seq_kinstr_ops *next;
89}; 87};
90 88
91 89
92/* instrument operations */ 90/* instrument operations */
93snd_seq_kinstr_list_t *snd_seq_instr_list_new(void); 91struct snd_seq_kinstr_list *snd_seq_instr_list_new(void);
94void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list); 92void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list);
95int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list, 93int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
96 snd_seq_instr_header_t *ifree, 94 struct snd_seq_instr_header *ifree,
97 int client, 95 int client,
98 int atomic); 96 int atomic);
99snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list, 97struct snd_seq_kinstr *snd_seq_instr_find(struct snd_seq_kinstr_list *list,
100 snd_seq_instr_t *instr, 98 struct snd_seq_instr *instr,
101 int exact, 99 int exact,
102 int follow_alias); 100 int follow_alias);
103void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list, 101void snd_seq_instr_free_use(struct snd_seq_kinstr_list *list,
104 snd_seq_kinstr_t *instr); 102 struct snd_seq_kinstr *instr);
105int snd_seq_instr_event(snd_seq_kinstr_ops_t *ops, 103int snd_seq_instr_event(struct snd_seq_kinstr_ops *ops,
106 snd_seq_kinstr_list_t *list, 104 struct snd_seq_kinstr_list *list,
107 snd_seq_event_t *ev, 105 struct snd_seq_event *ev,
108 int client, 106 int client,
109 int atomic, 107 int atomic,
110 int hop); 108 int hop);