aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-11-17 08:04:44 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-03 06:17:54 -0500
commit19ac31e82cc7328c01bf26f824f33c7c38cb6075 (patch)
treeb0ae7c7c335f1199567443342c038251a203b235 /sound
parentc7e0b5bf9fff1b726495081447c107a2333fb82c (diff)
[ALSA] Remove xxx_t typedefs: Instrument layer
Modules: Instrument layer Remove xxx_t typedefs from the core instrument layer codes. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/seq/instr/ainstr_fm.c26
-rw-r--r--sound/core/seq/instr/ainstr_gf1.c76
-rw-r--r--sound/core/seq/instr/ainstr_iw.c146
-rw-r--r--sound/core/seq/instr/ainstr_simple.c50
4 files changed, 149 insertions, 149 deletions
diff --git a/sound/core/seq/instr/ainstr_fm.c b/sound/core/seq/instr/ainstr_fm.c
index 5c671e69884f..b09babf272cd 100644
--- a/sound/core/seq/instr/ainstr_fm.c
+++ b/sound/core/seq/instr/ainstr_fm.c
@@ -30,11 +30,11 @@ MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>");
30MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support."); 30MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support.");
31MODULE_LICENSE("GPL"); 31MODULE_LICENSE("GPL");
32 32
33static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr, 33static int snd_seq_fm_put(void *private_data, struct snd_seq_kinstr *instr,
34 char __user *instr_data, long len, int atomic, int cmd) 34 char __user *instr_data, long len, int atomic, int cmd)
35{ 35{
36 fm_instrument_t *ip; 36 struct fm_instrument *ip;
37 fm_xinstrument_t ix; 37 struct fm_xinstrument ix;
38 int idx; 38 int idx;
39 39
40 if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) 40 if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
@@ -46,7 +46,7 @@ static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
46 return -EFAULT; 46 return -EFAULT;
47 if (ix.stype != FM_STRU_INSTR) 47 if (ix.stype != FM_STRU_INSTR)
48 return -EINVAL; 48 return -EINVAL;
49 ip = (fm_instrument_t *)KINSTR_DATA(instr); 49 ip = (struct fm_instrument *)KINSTR_DATA(instr);
50 ip->share_id[0] = le32_to_cpu(ix.share_id[0]); 50 ip->share_id[0] = le32_to_cpu(ix.share_id[0]);
51 ip->share_id[1] = le32_to_cpu(ix.share_id[1]); 51 ip->share_id[1] = le32_to_cpu(ix.share_id[1]);
52 ip->share_id[2] = le32_to_cpu(ix.share_id[2]); 52 ip->share_id[2] = le32_to_cpu(ix.share_id[2]);
@@ -72,12 +72,12 @@ static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
72 return 0; 72 return 0;
73} 73}
74 74
75static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr, 75static int snd_seq_fm_get(void *private_data, struct snd_seq_kinstr *instr,
76 char __user *instr_data, long len, int atomic, 76 char __user *instr_data, long len, int atomic,
77 int cmd) 77 int cmd)
78{ 78{
79 fm_instrument_t *ip; 79 struct fm_instrument *ip;
80 fm_xinstrument_t ix; 80 struct fm_xinstrument ix;
81 int idx; 81 int idx;
82 82
83 if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL) 83 if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL)
@@ -85,7 +85,7 @@ static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
85 if (len < (long)sizeof(ix)) 85 if (len < (long)sizeof(ix))
86 return -ENOMEM; 86 return -ENOMEM;
87 memset(&ix, 0, sizeof(ix)); 87 memset(&ix, 0, sizeof(ix));
88 ip = (fm_instrument_t *)KINSTR_DATA(instr); 88 ip = (struct fm_instrument *)KINSTR_DATA(instr);
89 ix.stype = FM_STRU_INSTR; 89 ix.stype = FM_STRU_INSTR;
90 ix.share_id[0] = cpu_to_le32(ip->share_id[0]); 90 ix.share_id[0] = cpu_to_le32(ip->share_id[0]);
91 ix.share_id[1] = cpu_to_le32(ip->share_id[1]); 91 ix.share_id[1] = cpu_to_le32(ip->share_id[1]);
@@ -114,19 +114,19 @@ static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
114 return 0; 114 return 0;
115} 115}
116 116
117static int snd_seq_fm_get_size(void *private_data, snd_seq_kinstr_t *instr, 117static int snd_seq_fm_get_size(void *private_data, struct snd_seq_kinstr *instr,
118 long *size) 118 long *size)
119{ 119{
120 *size = sizeof(fm_xinstrument_t); 120 *size = sizeof(struct fm_xinstrument);
121 return 0; 121 return 0;
122} 122}
123 123
124int snd_seq_fm_init(snd_seq_kinstr_ops_t *ops, 124int snd_seq_fm_init(struct snd_seq_kinstr_ops *ops,
125 snd_seq_kinstr_ops_t *next) 125 struct snd_seq_kinstr_ops *next)
126{ 126{
127 memset(ops, 0, sizeof(*ops)); 127 memset(ops, 0, sizeof(*ops));
128 // ops->private_data = private_data; 128 // ops->private_data = private_data;
129 ops->add_len = sizeof(fm_instrument_t); 129 ops->add_len = sizeof(struct fm_instrument);
130 ops->instr_type = SNDRV_SEQ_INSTR_ID_OPL2_3; 130 ops->instr_type = SNDRV_SEQ_INSTR_ID_OPL2_3;
131 ops->put = snd_seq_fm_put; 131 ops->put = snd_seq_fm_put;
132 ops->get = snd_seq_fm_get; 132 ops->get = snd_seq_fm_get;
diff --git a/sound/core/seq/instr/ainstr_gf1.c b/sound/core/seq/instr/ainstr_gf1.c
index 0e4df8826eed..3c31038a74ba 100644
--- a/sound/core/seq/instr/ainstr_gf1.c
+++ b/sound/core/seq/instr/ainstr_gf1.c
@@ -42,14 +42,14 @@ static unsigned int snd_seq_gf1_size(unsigned int size, unsigned int format)
42 return format; 42 return format;
43} 43}
44 44
45static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops, 45static int snd_seq_gf1_copy_wave_from_stream(struct snd_gf1_ops *ops,
46 gf1_instrument_t *ip, 46 struct gf1_instrument *ip,
47 char __user **data, 47 char __user **data,
48 long *len, 48 long *len,
49 int atomic) 49 int atomic)
50{ 50{
51 gf1_wave_t *wp, *prev; 51 struct gf1_wave *wp, *prev;
52 gf1_xwave_t xp; 52 struct gf1_xwave xp;
53 int err; 53 int err;
54 gfp_t gfp_mask; 54 gfp_t gfp_mask;
55 unsigned int real_size; 55 unsigned int real_size;
@@ -116,8 +116,8 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
116 return 0; 116 return 0;
117} 117}
118 118
119static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops, 119static void snd_seq_gf1_wave_free(struct snd_gf1_ops *ops,
120 gf1_wave_t *wave, 120 struct gf1_wave *wave,
121 int atomic) 121 int atomic)
122{ 122{
123 if (ops->remove_sample) 123 if (ops->remove_sample)
@@ -125,11 +125,11 @@ static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops,
125 kfree(wave); 125 kfree(wave);
126} 126}
127 127
128static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops, 128static void snd_seq_gf1_instr_free(struct snd_gf1_ops *ops,
129 gf1_instrument_t *ip, 129 struct gf1_instrument *ip,
130 int atomic) 130 int atomic)
131{ 131{
132 gf1_wave_t *wave; 132 struct gf1_wave *wave;
133 133
134 while ((wave = ip->wave) != NULL) { 134 while ((wave = ip->wave) != NULL) {
135 ip->wave = wave->next; 135 ip->wave = wave->next;
@@ -137,13 +137,13 @@ static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops,
137 } 137 }
138} 138}
139 139
140static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr, 140static int snd_seq_gf1_put(void *private_data, struct snd_seq_kinstr *instr,
141 char __user *instr_data, long len, int atomic, 141 char __user *instr_data, long len, int atomic,
142 int cmd) 142 int cmd)
143{ 143{
144 snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; 144 struct snd_gf1_ops *ops = private_data;
145 gf1_instrument_t *ip; 145 struct gf1_instrument *ip;
146 gf1_xinstrument_t ix; 146 struct gf1_xinstrument ix;
147 int err; 147 int err;
148 gfp_t gfp_mask; 148 gfp_t gfp_mask;
149 149
@@ -159,7 +159,7 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
159 return -EINVAL; 159 return -EINVAL;
160 instr_data += sizeof(ix); 160 instr_data += sizeof(ix);
161 len -= sizeof(ix); 161 len -= sizeof(ix);
162 ip = (gf1_instrument_t *)KINSTR_DATA(instr); 162 ip = (struct gf1_instrument *)KINSTR_DATA(instr);
163 ip->exclusion = le16_to_cpu(ix.exclusion); 163 ip->exclusion = le16_to_cpu(ix.exclusion);
164 ip->exclusion_group = le16_to_cpu(ix.exclusion_group); 164 ip->exclusion_group = le16_to_cpu(ix.exclusion_group);
165 ip->effect1 = ix.effect1; 165 ip->effect1 = ix.effect1;
@@ -189,14 +189,14 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
189 return 0; 189 return 0;
190} 190}
191 191
192static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops, 192static int snd_seq_gf1_copy_wave_to_stream(struct snd_gf1_ops *ops,
193 gf1_instrument_t *ip, 193 struct gf1_instrument *ip,
194 char __user **data, 194 char __user **data,
195 long *len, 195 long *len,
196 int atomic) 196 int atomic)
197{ 197{
198 gf1_wave_t *wp; 198 struct gf1_wave *wp;
199 gf1_xwave_t xp; 199 struct gf1_xwave xp;
200 int err; 200 int err;
201 unsigned int real_size; 201 unsigned int real_size;
202 202
@@ -251,20 +251,20 @@ static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
251 return 0; 251 return 0;
252} 252}
253 253
254static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr, 254static int snd_seq_gf1_get(void *private_data, struct snd_seq_kinstr *instr,
255 char __user *instr_data, long len, int atomic, 255 char __user *instr_data, long len, int atomic,
256 int cmd) 256 int cmd)
257{ 257{
258 snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; 258 struct snd_gf1_ops *ops = private_data;
259 gf1_instrument_t *ip; 259 struct gf1_instrument *ip;
260 gf1_xinstrument_t ix; 260 struct gf1_xinstrument ix;
261 261
262 if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL) 262 if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL)
263 return -EINVAL; 263 return -EINVAL;
264 if (len < (long)sizeof(ix)) 264 if (len < (long)sizeof(ix))
265 return -ENOMEM; 265 return -ENOMEM;
266 memset(&ix, 0, sizeof(ix)); 266 memset(&ix, 0, sizeof(ix));
267 ip = (gf1_instrument_t *)KINSTR_DATA(instr); 267 ip = (struct gf1_instrument *)KINSTR_DATA(instr);
268 ix.stype = GF1_STRU_INSTR; 268 ix.stype = GF1_STRU_INSTR;
269 ix.exclusion = cpu_to_le16(ip->exclusion); 269 ix.exclusion = cpu_to_le16(ip->exclusion);
270 ix.exclusion_group = cpu_to_le16(ip->exclusion_group); 270 ix.exclusion_group = cpu_to_le16(ip->exclusion_group);
@@ -283,18 +283,18 @@ static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr,
283 atomic); 283 atomic);
284} 284}
285 285
286static int snd_seq_gf1_get_size(void *private_data, snd_seq_kinstr_t *instr, 286static int snd_seq_gf1_get_size(void *private_data, struct snd_seq_kinstr *instr,
287 long *size) 287 long *size)
288{ 288{
289 long result; 289 long result;
290 gf1_instrument_t *ip; 290 struct gf1_instrument *ip;
291 gf1_wave_t *wp; 291 struct gf1_wave *wp;
292 292
293 *size = 0; 293 *size = 0;
294 ip = (gf1_instrument_t *)KINSTR_DATA(instr); 294 ip = (struct gf1_instrument *)KINSTR_DATA(instr);
295 result = sizeof(gf1_xinstrument_t); 295 result = sizeof(struct gf1_xinstrument);
296 for (wp = ip->wave; wp; wp = wp->next) { 296 for (wp = ip->wave; wp; wp = wp->next) {
297 result += sizeof(gf1_xwave_t); 297 result += sizeof(struct gf1_xwave);
298 result += wp->size; 298 result += wp->size;
299 } 299 }
300 *size = result; 300 *size = result;
@@ -302,35 +302,35 @@ static int snd_seq_gf1_get_size(void *private_data, snd_seq_kinstr_t *instr,
302} 302}
303 303
304static int snd_seq_gf1_remove(void *private_data, 304static int snd_seq_gf1_remove(void *private_data,
305 snd_seq_kinstr_t *instr, 305 struct snd_seq_kinstr *instr,
306 int atomic) 306 int atomic)
307{ 307{
308 snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; 308 struct snd_gf1_ops *ops = private_data;
309 gf1_instrument_t *ip; 309 struct gf1_instrument *ip;
310 310
311 ip = (gf1_instrument_t *)KINSTR_DATA(instr); 311 ip = (struct gf1_instrument *)KINSTR_DATA(instr);
312 snd_seq_gf1_instr_free(ops, ip, atomic); 312 snd_seq_gf1_instr_free(ops, ip, atomic);
313 return 0; 313 return 0;
314} 314}
315 315
316static void snd_seq_gf1_notify(void *private_data, 316static void snd_seq_gf1_notify(void *private_data,
317 snd_seq_kinstr_t *instr, 317 struct snd_seq_kinstr *instr,
318 int what) 318 int what)
319{ 319{
320 snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; 320 struct snd_gf1_ops *ops = private_data;
321 321
322 if (ops->notify) 322 if (ops->notify)
323 ops->notify(ops->private_data, instr, what); 323 ops->notify(ops->private_data, instr, what);
324} 324}
325 325
326int snd_seq_gf1_init(snd_gf1_ops_t *ops, 326int snd_seq_gf1_init(struct snd_gf1_ops *ops,
327 void *private_data, 327 void *private_data,
328 snd_seq_kinstr_ops_t *next) 328 struct snd_seq_kinstr_ops *next)
329{ 329{
330 memset(ops, 0, sizeof(*ops)); 330 memset(ops, 0, sizeof(*ops));
331 ops->private_data = private_data; 331 ops->private_data = private_data;
332 ops->kops.private_data = ops; 332 ops->kops.private_data = ops;
333 ops->kops.add_len = sizeof(gf1_instrument_t); 333 ops->kops.add_len = sizeof(struct gf1_instrument);
334 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_GUS_PATCH; 334 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_GUS_PATCH;
335 ops->kops.put = snd_seq_gf1_put; 335 ops->kops.put = snd_seq_gf1_put;
336 ops->kops.get = snd_seq_gf1_get; 336 ops->kops.get = snd_seq_gf1_get;
diff --git a/sound/core/seq/instr/ainstr_iw.c b/sound/core/seq/instr/ainstr_iw.c
index 7c19fbbc5d0f..7f8df19ba563 100644
--- a/sound/core/seq/instr/ainstr_iw.c
+++ b/sound/core/seq/instr/ainstr_iw.c
@@ -42,8 +42,8 @@ static unsigned int snd_seq_iwffff_size(unsigned int size, unsigned int format)
42 return result; 42 return result;
43} 43}
44 44
45static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp, 45static void snd_seq_iwffff_copy_lfo_from_stream(struct iwffff_lfo *fp,
46 iwffff_xlfo_t *fx) 46 struct iwffff_xlfo *fx)
47{ 47{
48 fp->freq = le16_to_cpu(fx->freq); 48 fp->freq = le16_to_cpu(fx->freq);
49 fp->depth = le16_to_cpu(fx->depth); 49 fp->depth = le16_to_cpu(fx->depth);
@@ -53,18 +53,18 @@ static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp,
53} 53}
54 54
55static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype, 55static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
56 iwffff_layer_t *lp, 56 struct iwffff_layer *lp,
57 iwffff_env_t *ep, 57 struct iwffff_env *ep,
58 iwffff_xenv_t *ex, 58 struct iwffff_xenv *ex,
59 char __user **data, 59 char __user **data,
60 long *len, 60 long *len,
61 gfp_t gfp_mask) 61 gfp_t gfp_mask)
62{ 62{
63 __u32 stype; 63 __u32 stype;
64 iwffff_env_record_t *rp, *rp_last; 64 struct iwffff_env_record *rp, *rp_last;
65 iwffff_xenv_record_t rx; 65 struct iwffff_xenv_record rx;
66 iwffff_env_point_t *pp; 66 struct iwffff_env_point *pp;
67 iwffff_xenv_point_t px; 67 struct iwffff_xenv_point px;
68 int points_size, idx; 68 int points_size, idx;
69 69
70 ep->flags = ex->flags; 70 ep->flags = ex->flags;
@@ -101,7 +101,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
101 rp->sustain_rate = le16_to_cpu(rx.sustain_rate); 101 rp->sustain_rate = le16_to_cpu(rx.sustain_rate);
102 rp->release_rate = le16_to_cpu(rx.release_rate); 102 rp->release_rate = le16_to_cpu(rx.release_rate);
103 rp->hirange = rx.hirange; 103 rp->hirange = rx.hirange;
104 pp = (iwffff_env_point_t *)(rp + 1); 104 pp = (struct iwffff_env_point *)(rp + 1);
105 for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) { 105 for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) {
106 if (copy_from_user(&px, *data, sizeof(px))) 106 if (copy_from_user(&px, *data, sizeof(px)))
107 return -EFAULT; 107 return -EFAULT;
@@ -120,14 +120,14 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
120 return 0; 120 return 0;
121} 121}
122 122
123static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops, 123static int snd_seq_iwffff_copy_wave_from_stream(struct snd_iwffff_ops *ops,
124 iwffff_layer_t *lp, 124 struct iwffff_layer *lp,
125 char __user **data, 125 char __user **data,
126 long *len, 126 long *len,
127 int atomic) 127 int atomic)
128{ 128{
129 iwffff_wave_t *wp, *prev; 129 struct iwffff_wave *wp, *prev;
130 iwffff_xwave_t xp; 130 struct iwffff_xwave xp;
131 int err; 131 int err;
132 gfp_t gfp_mask; 132 gfp_t gfp_mask;
133 unsigned int real_size; 133 unsigned int real_size;
@@ -186,11 +186,11 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
186 return 0; 186 return 0;
187} 187}
188 188
189static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops, 189static void snd_seq_iwffff_env_free(struct snd_iwffff_ops *ops,
190 iwffff_env_t *env, 190 struct iwffff_env *env,
191 int atomic) 191 int atomic)
192{ 192{
193 iwffff_env_record_t *rec; 193 struct iwffff_env_record *rec;
194 194
195 while ((rec = env->record) != NULL) { 195 while ((rec = env->record) != NULL) {
196 env->record = rec->next; 196 env->record = rec->next;
@@ -198,8 +198,8 @@ static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops,
198 } 198 }
199} 199}
200 200
201static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops, 201static void snd_seq_iwffff_wave_free(struct snd_iwffff_ops *ops,
202 iwffff_wave_t *wave, 202 struct iwffff_wave *wave,
203 int atomic) 203 int atomic)
204{ 204{
205 if (ops->remove_sample) 205 if (ops->remove_sample)
@@ -207,12 +207,12 @@ static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops,
207 kfree(wave); 207 kfree(wave);
208} 208}
209 209
210static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops, 210static void snd_seq_iwffff_instr_free(struct snd_iwffff_ops *ops,
211 iwffff_instrument_t *ip, 211 struct iwffff_instrument *ip,
212 int atomic) 212 int atomic)
213{ 213{
214 iwffff_layer_t *layer; 214 struct iwffff_layer *layer;
215 iwffff_wave_t *wave; 215 struct iwffff_wave *wave;
216 216
217 while ((layer = ip->layer) != NULL) { 217 while ((layer = ip->layer) != NULL) {
218 ip->layer = layer->next; 218 ip->layer = layer->next;
@@ -226,15 +226,15 @@ static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops,
226 } 226 }
227} 227}
228 228
229static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr, 229static int snd_seq_iwffff_put(void *private_data, struct snd_seq_kinstr *instr,
230 char __user *instr_data, long len, int atomic, 230 char __user *instr_data, long len, int atomic,
231 int cmd) 231 int cmd)
232{ 232{
233 snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data; 233 struct snd_iwffff_ops *ops = private_data;
234 iwffff_instrument_t *ip; 234 struct iwffff_instrument *ip;
235 iwffff_xinstrument_t ix; 235 struct iwffff_xinstrument ix;
236 iwffff_layer_t *lp, *prev_lp; 236 struct iwffff_layer *lp, *prev_lp;
237 iwffff_xlayer_t lx; 237 struct iwffff_xlayer lx;
238 int err; 238 int err;
239 gfp_t gfp_mask; 239 gfp_t gfp_mask;
240 240
@@ -250,7 +250,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
250 return -EINVAL; 250 return -EINVAL;
251 instr_data += sizeof(ix); 251 instr_data += sizeof(ix);
252 len -= sizeof(ix); 252 len -= sizeof(ix);
253 ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 253 ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
254 ip->exclusion = le16_to_cpu(ix.exclusion); 254 ip->exclusion = le16_to_cpu(ix.exclusion);
255 ip->layer_type = le16_to_cpu(ix.layer_type); 255 ip->layer_type = le16_to_cpu(ix.layer_type);
256 ip->exclusion_group = le16_to_cpu(ix.exclusion_group); 256 ip->exclusion_group = le16_to_cpu(ix.exclusion_group);
@@ -261,7 +261,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
261 /* copy layers */ 261 /* copy layers */
262 prev_lp = NULL; 262 prev_lp = NULL;
263 while (len > 0) { 263 while (len > 0) {
264 if (len < (long)sizeof(iwffff_xlayer_t)) { 264 if (len < (long)sizeof(struct iwffff_xlayer)) {
265 snd_seq_iwffff_instr_free(ops, ip, atomic); 265 snd_seq_iwffff_instr_free(ops, ip, atomic);
266 return -EINVAL; 266 return -EINVAL;
267 } 267 }
@@ -335,8 +335,8 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
335 return 0; 335 return 0;
336} 336}
337 337
338static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx, 338static void snd_seq_iwffff_copy_lfo_to_stream(struct iwffff_xlfo *fx,
339 iwffff_lfo_t *fp) 339 struct iwffff_lfo *fp)
340{ 340{
341 fx->freq = cpu_to_le16(fp->freq); 341 fx->freq = cpu_to_le16(fp->freq);
342 fx->depth = cpu_to_le16(fp->depth); 342 fx->depth = cpu_to_le16(fp->depth);
@@ -346,16 +346,16 @@ static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx,
346} 346}
347 347
348static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype, 348static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
349 iwffff_layer_t *lp, 349 struct iwffff_layer *lp,
350 iwffff_xenv_t *ex, 350 struct iwffff_xenv *ex,
351 iwffff_env_t *ep, 351 struct iwffff_env *ep,
352 char __user **data, 352 char __user **data,
353 long *len) 353 long *len)
354{ 354{
355 iwffff_env_record_t *rp; 355 struct iwffff_env_record *rp;
356 iwffff_xenv_record_t rx; 356 struct iwffff_xenv_record rx;
357 iwffff_env_point_t *pp; 357 struct iwffff_env_point *pp;
358 iwffff_xenv_point_t px; 358 struct iwffff_xenv_point px;
359 int points_size, idx; 359 int points_size, idx;
360 360
361 ex->flags = ep->flags; 361 ex->flags = ep->flags;
@@ -379,7 +379,7 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
379 points_size = (rp->nattack + rp->nrelease) * 2 * sizeof(__u16); 379 points_size = (rp->nattack + rp->nrelease) * 2 * sizeof(__u16);
380 if (*len < points_size) 380 if (*len < points_size)
381 return -ENOMEM; 381 return -ENOMEM;
382 pp = (iwffff_env_point_t *)(rp + 1); 382 pp = (struct iwffff_env_point *)(rp + 1);
383 for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) { 383 for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) {
384 px.offset = cpu_to_le16(pp->offset); 384 px.offset = cpu_to_le16(pp->offset);
385 px.rate = cpu_to_le16(pp->rate); 385 px.rate = cpu_to_le16(pp->rate);
@@ -392,14 +392,14 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
392 return 0; 392 return 0;
393} 393}
394 394
395static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops, 395static int snd_seq_iwffff_copy_wave_to_stream(struct snd_iwffff_ops *ops,
396 iwffff_layer_t *lp, 396 struct iwffff_layer *lp,
397 char __user **data, 397 char __user **data,
398 long *len, 398 long *len,
399 int atomic) 399 int atomic)
400{ 400{
401 iwffff_wave_t *wp; 401 struct iwffff_wave *wp;
402 iwffff_xwave_t xp; 402 struct iwffff_xwave xp;
403 int err; 403 int err;
404 unsigned int real_size; 404 unsigned int real_size;
405 405
@@ -447,14 +447,14 @@ static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops,
447 return 0; 447 return 0;
448} 448}
449 449
450static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr, 450static int snd_seq_iwffff_get(void *private_data, struct snd_seq_kinstr *instr,
451 char __user *instr_data, long len, int atomic, int cmd) 451 char __user *instr_data, long len, int atomic, int cmd)
452{ 452{
453 snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data; 453 struct snd_iwffff_ops *ops = private_data;
454 iwffff_instrument_t *ip; 454 struct iwffff_instrument *ip;
455 iwffff_xinstrument_t ix; 455 struct iwffff_xinstrument ix;
456 iwffff_layer_t *lp; 456 struct iwffff_layer *lp;
457 iwffff_xlayer_t lx; 457 struct iwffff_xlayer lx;
458 char __user *layer_instr_data; 458 char __user *layer_instr_data;
459 int err; 459 int err;
460 460
@@ -463,7 +463,7 @@ static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
463 if (len < (long)sizeof(ix)) 463 if (len < (long)sizeof(ix))
464 return -ENOMEM; 464 return -ENOMEM;
465 memset(&ix, 0, sizeof(ix)); 465 memset(&ix, 0, sizeof(ix));
466 ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 466 ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
467 ix.stype = IWFFFF_STRU_INSTR; 467 ix.stype = IWFFFF_STRU_INSTR;
468 ix.exclusion = cpu_to_le16(ip->exclusion); 468 ix.exclusion = cpu_to_le16(ip->exclusion);
469 ix.layer_type = cpu_to_le16(ip->layer_type); 469 ix.layer_type = cpu_to_le16(ip->layer_type);
@@ -520,43 +520,43 @@ static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
520 return 0; 520 return 0;
521} 521}
522 522
523static long snd_seq_iwffff_env_size_in_stream(iwffff_env_t *ep) 523static long snd_seq_iwffff_env_size_in_stream(struct iwffff_env *ep)
524{ 524{
525 long result = 0; 525 long result = 0;
526 iwffff_env_record_t *rp; 526 struct iwffff_env_record *rp;
527 527
528 for (rp = ep->record; rp; rp = rp->next) { 528 for (rp = ep->record; rp; rp = rp->next) {
529 result += sizeof(iwffff_xenv_record_t); 529 result += sizeof(struct iwffff_xenv_record);
530 result += (rp->nattack + rp->nrelease) * 2 * sizeof(__u16); 530 result += (rp->nattack + rp->nrelease) * 2 * sizeof(__u16);
531 } 531 }
532 return 0; 532 return 0;
533} 533}
534 534
535static long snd_seq_iwffff_wave_size_in_stream(iwffff_layer_t *lp) 535static long snd_seq_iwffff_wave_size_in_stream(struct iwffff_layer *lp)
536{ 536{
537 long result = 0; 537 long result = 0;
538 iwffff_wave_t *wp; 538 struct iwffff_wave *wp;
539 539
540 for (wp = lp->wave; wp; wp = wp->next) { 540 for (wp = lp->wave; wp; wp = wp->next) {
541 result += sizeof(iwffff_xwave_t); 541 result += sizeof(struct iwffff_xwave);
542 if (!(wp->format & IWFFFF_WAVE_ROM)) 542 if (!(wp->format & IWFFFF_WAVE_ROM))
543 result += wp->size; 543 result += wp->size;
544 } 544 }
545 return result; 545 return result;
546} 546}
547 547
548static int snd_seq_iwffff_get_size(void *private_data, snd_seq_kinstr_t *instr, 548static int snd_seq_iwffff_get_size(void *private_data, struct snd_seq_kinstr *instr,
549 long *size) 549 long *size)
550{ 550{
551 long result; 551 long result;
552 iwffff_instrument_t *ip; 552 struct iwffff_instrument *ip;
553 iwffff_layer_t *lp; 553 struct iwffff_layer *lp;
554 554
555 *size = 0; 555 *size = 0;
556 ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 556 ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
557 result = sizeof(iwffff_xinstrument_t); 557 result = sizeof(struct iwffff_xinstrument);
558 for (lp = ip->layer; lp; lp = lp->next) { 558 for (lp = ip->layer; lp; lp = lp->next) {
559 result += sizeof(iwffff_xlayer_t); 559 result += sizeof(struct iwffff_xlayer);
560 result += snd_seq_iwffff_env_size_in_stream(&lp->penv); 560 result += snd_seq_iwffff_env_size_in_stream(&lp->penv);
561 result += snd_seq_iwffff_env_size_in_stream(&lp->venv); 561 result += snd_seq_iwffff_env_size_in_stream(&lp->venv);
562 result += snd_seq_iwffff_wave_size_in_stream(lp); 562 result += snd_seq_iwffff_wave_size_in_stream(lp);
@@ -566,35 +566,35 @@ static int snd_seq_iwffff_get_size(void *private_data, snd_seq_kinstr_t *instr,
566} 566}
567 567
568static int snd_seq_iwffff_remove(void *private_data, 568static int snd_seq_iwffff_remove(void *private_data,
569 snd_seq_kinstr_t *instr, 569 struct snd_seq_kinstr *instr,
570 int atomic) 570 int atomic)
571{ 571{
572 snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data; 572 struct snd_iwffff_ops *ops = private_data;
573 iwffff_instrument_t *ip; 573 struct iwffff_instrument *ip;
574 574
575 ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 575 ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
576 snd_seq_iwffff_instr_free(ops, ip, atomic); 576 snd_seq_iwffff_instr_free(ops, ip, atomic);
577 return 0; 577 return 0;
578} 578}
579 579
580static void snd_seq_iwffff_notify(void *private_data, 580static void snd_seq_iwffff_notify(void *private_data,
581 snd_seq_kinstr_t *instr, 581 struct snd_seq_kinstr *instr,
582 int what) 582 int what)
583{ 583{
584 snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data; 584 struct snd_iwffff_ops *ops = private_data;
585 585
586 if (ops->notify) 586 if (ops->notify)
587 ops->notify(ops->private_data, instr, what); 587 ops->notify(ops->private_data, instr, what);
588} 588}
589 589
590int snd_seq_iwffff_init(snd_iwffff_ops_t *ops, 590int snd_seq_iwffff_init(struct snd_iwffff_ops *ops,
591 void *private_data, 591 void *private_data,
592 snd_seq_kinstr_ops_t *next) 592 struct snd_seq_kinstr_ops *next)
593{ 593{
594 memset(ops, 0, sizeof(*ops)); 594 memset(ops, 0, sizeof(*ops));
595 ops->private_data = private_data; 595 ops->private_data = private_data;
596 ops->kops.private_data = ops; 596 ops->kops.private_data = ops;
597 ops->kops.add_len = sizeof(iwffff_instrument_t); 597 ops->kops.add_len = sizeof(struct iwffff_instrument);
598 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_INTERWAVE; 598 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_INTERWAVE;
599 ops->kops.put = snd_seq_iwffff_put; 599 ops->kops.put = snd_seq_iwffff_put;
600 ops->kops.get = snd_seq_iwffff_get; 600 ops->kops.get = snd_seq_iwffff_get;
diff --git a/sound/core/seq/instr/ainstr_simple.c b/sound/core/seq/instr/ainstr_simple.c
index 17ab94e76073..6d6ffece7cbe 100644
--- a/sound/core/seq/instr/ainstr_simple.c
+++ b/sound/core/seq/instr/ainstr_simple.c
@@ -42,21 +42,21 @@ static unsigned int snd_seq_simple_size(unsigned int size, unsigned int format)
42 return result; 42 return result;
43} 43}
44 44
45static void snd_seq_simple_instr_free(snd_simple_ops_t *ops, 45static void snd_seq_simple_instr_free(struct snd_simple_ops *ops,
46 simple_instrument_t *ip, 46 struct simple_instrument *ip,
47 int atomic) 47 int atomic)
48{ 48{
49 if (ops->remove_sample) 49 if (ops->remove_sample)
50 ops->remove_sample(ops->private_data, ip, atomic); 50 ops->remove_sample(ops->private_data, ip, atomic);
51} 51}
52 52
53static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr, 53static int snd_seq_simple_put(void *private_data, struct snd_seq_kinstr *instr,
54 char __user *instr_data, long len, 54 char __user *instr_data, long len,
55 int atomic, int cmd) 55 int atomic, int cmd)
56{ 56{
57 snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; 57 struct snd_simple_ops *ops = private_data;
58 simple_instrument_t *ip; 58 struct simple_instrument *ip;
59 simple_xinstrument_t ix; 59 struct simple_xinstrument ix;
60 int err; 60 int err;
61 gfp_t gfp_mask; 61 gfp_t gfp_mask;
62 unsigned int real_size; 62 unsigned int real_size;
@@ -73,7 +73,7 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
73 return -EINVAL; 73 return -EINVAL;
74 instr_data += sizeof(ix); 74 instr_data += sizeof(ix);
75 len -= sizeof(ix); 75 len -= sizeof(ix);
76 ip = (simple_instrument_t *)KINSTR_DATA(instr); 76 ip = (struct simple_instrument *)KINSTR_DATA(instr);
77 ip->share_id[0] = le32_to_cpu(ix.share_id[0]); 77 ip->share_id[0] = le32_to_cpu(ix.share_id[0]);
78 ip->share_id[1] = le32_to_cpu(ix.share_id[1]); 78 ip->share_id[1] = le32_to_cpu(ix.share_id[1]);
79 ip->share_id[2] = le32_to_cpu(ix.share_id[2]); 79 ip->share_id[2] = le32_to_cpu(ix.share_id[2]);
@@ -100,13 +100,13 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
100 return 0; 100 return 0;
101} 101}
102 102
103static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr, 103static int snd_seq_simple_get(void *private_data, struct snd_seq_kinstr *instr,
104 char __user *instr_data, long len, 104 char __user *instr_data, long len,
105 int atomic, int cmd) 105 int atomic, int cmd)
106{ 106{
107 snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; 107 struct snd_simple_ops *ops = private_data;
108 simple_instrument_t *ip; 108 struct simple_instrument *ip;
109 simple_xinstrument_t ix; 109 struct simple_xinstrument ix;
110 int err; 110 int err;
111 unsigned int real_size; 111 unsigned int real_size;
112 112
@@ -115,7 +115,7 @@ static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
115 if (len < (long)sizeof(ix)) 115 if (len < (long)sizeof(ix))
116 return -ENOMEM; 116 return -ENOMEM;
117 memset(&ix, 0, sizeof(ix)); 117 memset(&ix, 0, sizeof(ix));
118 ip = (simple_instrument_t *)KINSTR_DATA(instr); 118 ip = (struct simple_instrument *)KINSTR_DATA(instr);
119 ix.stype = SIMPLE_STRU_INSTR; 119 ix.stype = SIMPLE_STRU_INSTR;
120 ix.share_id[0] = cpu_to_le32(ip->share_id[0]); 120 ix.share_id[0] = cpu_to_le32(ip->share_id[0]);
121 ix.share_id[1] = cpu_to_le32(ip->share_id[1]); 121 ix.share_id[1] = cpu_to_le32(ip->share_id[1]);
@@ -147,46 +147,46 @@ static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
147 return 0; 147 return 0;
148} 148}
149 149
150static int snd_seq_simple_get_size(void *private_data, snd_seq_kinstr_t *instr, 150static int snd_seq_simple_get_size(void *private_data, struct snd_seq_kinstr *instr,
151 long *size) 151 long *size)
152{ 152{
153 simple_instrument_t *ip; 153 struct simple_instrument *ip;
154 154
155 ip = (simple_instrument_t *)KINSTR_DATA(instr); 155 ip = (struct simple_instrument *)KINSTR_DATA(instr);
156 *size = sizeof(simple_xinstrument_t) + snd_seq_simple_size(ip->size, ip->format); 156 *size = sizeof(struct simple_xinstrument) + snd_seq_simple_size(ip->size, ip->format);
157 return 0; 157 return 0;
158} 158}
159 159
160static int snd_seq_simple_remove(void *private_data, 160static int snd_seq_simple_remove(void *private_data,
161 snd_seq_kinstr_t *instr, 161 struct snd_seq_kinstr *instr,
162 int atomic) 162 int atomic)
163{ 163{
164 snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; 164 struct snd_simple_ops *ops = private_data;
165 simple_instrument_t *ip; 165 struct simple_instrument *ip;
166 166
167 ip = (simple_instrument_t *)KINSTR_DATA(instr); 167 ip = (struct simple_instrument *)KINSTR_DATA(instr);
168 snd_seq_simple_instr_free(ops, ip, atomic); 168 snd_seq_simple_instr_free(ops, ip, atomic);
169 return 0; 169 return 0;
170} 170}
171 171
172static void snd_seq_simple_notify(void *private_data, 172static void snd_seq_simple_notify(void *private_data,
173 snd_seq_kinstr_t *instr, 173 struct snd_seq_kinstr *instr,
174 int what) 174 int what)
175{ 175{
176 snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; 176 struct snd_simple_ops *ops = private_data;
177 177
178 if (ops->notify) 178 if (ops->notify)
179 ops->notify(ops->private_data, instr, what); 179 ops->notify(ops->private_data, instr, what);
180} 180}
181 181
182int snd_seq_simple_init(snd_simple_ops_t *ops, 182int snd_seq_simple_init(struct snd_simple_ops *ops,
183 void *private_data, 183 void *private_data,
184 snd_seq_kinstr_ops_t *next) 184 struct snd_seq_kinstr_ops *next)
185{ 185{
186 memset(ops, 0, sizeof(*ops)); 186 memset(ops, 0, sizeof(*ops));
187 ops->private_data = private_data; 187 ops->private_data = private_data;
188 ops->kops.private_data = ops; 188 ops->kops.private_data = ops;
189 ops->kops.add_len = sizeof(simple_instrument_t); 189 ops->kops.add_len = sizeof(struct simple_instrument);
190 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_SIMPLE; 190 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_SIMPLE;
191 ops->kops.put = snd_seq_simple_put; 191 ops->kops.put = snd_seq_simple_put;
192 ops->kops.get = snd_seq_simple_get; 192 ops->kops.get = snd_seq_simple_get;