diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 08:04:44 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:17:54 -0500 |
commit | 19ac31e82cc7328c01bf26f824f33c7c38cb6075 (patch) | |
tree | b0ae7c7c335f1199567443342c038251a203b235 | |
parent | c7e0b5bf9fff1b726495081447c107a2333fb82c (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>
-rw-r--r-- | include/sound/ainstr_fm.h | 28 | ||||
-rw-r--r-- | include/sound/ainstr_gf1.h | 46 | ||||
-rw-r--r-- | include/sound/ainstr_iw.h | 115 | ||||
-rw-r--r-- | include/sound/ainstr_simple.h | 35 | ||||
-rw-r--r-- | sound/core/seq/instr/ainstr_fm.c | 26 | ||||
-rw-r--r-- | sound/core/seq/instr/ainstr_gf1.c | 76 | ||||
-rw-r--r-- | sound/core/seq/instr/ainstr_iw.c | 146 | ||||
-rw-r--r-- | sound/core/seq/instr/ainstr_simple.c | 50 |
8 files changed, 272 insertions, 250 deletions
diff --git a/include/sound/ainstr_fm.h b/include/sound/ainstr_fm.h index 0ec02953815a..c4afb1f121fe 100644 --- a/include/sound/ainstr_fm.h +++ b/include/sound/ainstr_fm.h | |||
@@ -39,13 +39,13 @@ | |||
39 | * FM operator | 39 | * FM operator |
40 | */ | 40 | */ |
41 | 41 | ||
42 | typedef struct fm_operator { | 42 | struct fm_operator { |
43 | unsigned char am_vib; | 43 | unsigned char am_vib; |
44 | unsigned char ksl_level; | 44 | unsigned char ksl_level; |
45 | unsigned char attack_decay; | 45 | unsigned char attack_decay; |
46 | unsigned char sustain_release; | 46 | unsigned char sustain_release; |
47 | unsigned char wave_select; | 47 | unsigned char wave_select; |
48 | } fm_operator_t; | 48 | }; |
49 | 49 | ||
50 | /* | 50 | /* |
51 | * Instrument | 51 | * Instrument |
@@ -54,11 +54,11 @@ typedef struct fm_operator { | |||
54 | #define FM_PATCH_OPL2 0x01 /* OPL2 2 operators FM instrument */ | 54 | #define FM_PATCH_OPL2 0x01 /* OPL2 2 operators FM instrument */ |
55 | #define FM_PATCH_OPL3 0x02 /* OPL3 4 operators FM instrument */ | 55 | #define FM_PATCH_OPL3 0x02 /* OPL3 4 operators FM instrument */ |
56 | 56 | ||
57 | typedef struct { | 57 | struct fm_instrument { |
58 | unsigned int share_id[4]; /* share id - zero = no sharing */ | 58 | unsigned int share_id[4]; /* share id - zero = no sharing */ |
59 | unsigned char type; /* instrument type */ | 59 | unsigned char type; /* instrument type */ |
60 | 60 | ||
61 | fm_operator_t op[4]; | 61 | struct fm_operator op[4]; |
62 | unsigned char feedback_connection[2]; | 62 | unsigned char feedback_connection[2]; |
63 | 63 | ||
64 | unsigned char echo_delay; | 64 | unsigned char echo_delay; |
@@ -68,7 +68,7 @@ typedef struct { | |||
68 | unsigned char fix_dur; | 68 | unsigned char fix_dur; |
69 | unsigned char modes; | 69 | unsigned char modes; |
70 | unsigned char fix_key; | 70 | unsigned char fix_key; |
71 | } fm_instrument_t; | 71 | }; |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * | 74 | * |
@@ -88,25 +88,25 @@ typedef struct { | |||
88 | * FM operator | 88 | * FM operator |
89 | */ | 89 | */ |
90 | 90 | ||
91 | typedef struct fm_xoperator { | 91 | struct fm_xoperator { |
92 | __u8 am_vib; | 92 | __u8 am_vib; |
93 | __u8 ksl_level; | 93 | __u8 ksl_level; |
94 | __u8 attack_decay; | 94 | __u8 attack_decay; |
95 | __u8 sustain_release; | 95 | __u8 sustain_release; |
96 | __u8 wave_select; | 96 | __u8 wave_select; |
97 | } fm_xoperator_t; | 97 | }; |
98 | 98 | ||
99 | /* | 99 | /* |
100 | * Instrument | 100 | * Instrument |
101 | */ | 101 | */ |
102 | 102 | ||
103 | typedef struct fm_xinstrument { | 103 | struct fm_xinstrument { |
104 | __u32 stype; /* structure type */ | 104 | __u32 stype; /* structure type */ |
105 | 105 | ||
106 | __u32 share_id[4]; /* share id - zero = no sharing */ | 106 | __u32 share_id[4]; /* share id - zero = no sharing */ |
107 | __u8 type; /* instrument type */ | 107 | __u8 type; /* instrument type */ |
108 | 108 | ||
109 | fm_xoperator_t op[4]; /* fm operators */ | 109 | struct fm_xoperator op[4]; /* fm operators */ |
110 | __u8 feedback_connection[2]; | 110 | __u8 feedback_connection[2]; |
111 | 111 | ||
112 | __u8 echo_delay; | 112 | __u8 echo_delay; |
@@ -116,15 +116,19 @@ typedef struct fm_xinstrument { | |||
116 | __u8 fix_dur; | 116 | __u8 fix_dur; |
117 | __u8 modes; | 117 | __u8 modes; |
118 | __u8 fix_key; | 118 | __u8 fix_key; |
119 | } fm_xinstrument_t; | 119 | }; |
120 | 120 | ||
121 | #ifdef __KERNEL__ | 121 | #ifdef __KERNEL__ |
122 | 122 | ||
123 | #include "seq_instr.h" | 123 | #include "seq_instr.h" |
124 | 124 | ||
125 | int snd_seq_fm_init(snd_seq_kinstr_ops_t * ops, | 125 | int snd_seq_fm_init(struct snd_seq_kinstr_ops * ops, |
126 | snd_seq_kinstr_ops_t * next); | 126 | struct snd_seq_kinstr_ops * next); |
127 | 127 | ||
128 | #endif | 128 | #endif |
129 | 129 | ||
130 | /* typedefs for compatibility to user-space */ | ||
131 | typedef struct fm_xoperator fm_xoperator_t; | ||
132 | typedef struct fm_xinstrument fm_xinstrument_t; | ||
133 | |||
130 | #endif /* __SOUND_AINSTR_FM_H */ | 134 | #endif /* __SOUND_AINSTR_FM_H */ |
diff --git a/include/sound/ainstr_gf1.h b/include/sound/ainstr_gf1.h index ae2ddda63971..47726fe0f46d 100644 --- a/include/sound/ainstr_gf1.h +++ b/include/sound/ainstr_gf1.h | |||
@@ -52,7 +52,7 @@ | |||
52 | * Wavetable definitions | 52 | * Wavetable definitions |
53 | */ | 53 | */ |
54 | 54 | ||
55 | typedef struct gf1_wave { | 55 | struct gf1_wave { |
56 | unsigned int share_id[4]; /* share id - zero = no sharing */ | 56 | unsigned int share_id[4]; /* share id - zero = no sharing */ |
57 | unsigned int format; /* wave format */ | 57 | unsigned int format; /* wave format */ |
58 | 58 | ||
@@ -88,7 +88,7 @@ typedef struct gf1_wave { | |||
88 | unsigned short scale_factor; /* 0-2048 or 0-2 */ | 88 | unsigned short scale_factor; /* 0-2048 or 0-2 */ |
89 | 89 | ||
90 | struct gf1_wave *next; | 90 | struct gf1_wave *next; |
91 | } gf1_wave_t; | 91 | }; |
92 | 92 | ||
93 | /* | 93 | /* |
94 | * Instrument | 94 | * Instrument |
@@ -103,7 +103,7 @@ typedef struct gf1_wave { | |||
103 | #define IWFFFF_EFFECT_CHORUS 2 | 103 | #define IWFFFF_EFFECT_CHORUS 2 |
104 | #define IWFFFF_EFFECT_ECHO 3 | 104 | #define IWFFFF_EFFECT_ECHO 3 |
105 | 105 | ||
106 | typedef struct { | 106 | struct gf1_instrument { |
107 | unsigned short exclusion; | 107 | unsigned short exclusion; |
108 | unsigned short exclusion_group; /* 0 - none, 1-65535 */ | 108 | unsigned short exclusion_group; /* 0 - none, 1-65535 */ |
109 | 109 | ||
@@ -112,8 +112,8 @@ typedef struct { | |||
112 | unsigned char effect2; /* effect 2 */ | 112 | unsigned char effect2; /* effect 2 */ |
113 | unsigned char effect2_depth; /* 0-127 */ | 113 | unsigned char effect2_depth; /* 0-127 */ |
114 | 114 | ||
115 | gf1_wave_t *wave; /* first waveform */ | 115 | struct gf1_wave *wave; /* first waveform */ |
116 | } gf1_instrument_t; | 116 | }; |
117 | 117 | ||
118 | /* | 118 | /* |
119 | * | 119 | * |
@@ -135,7 +135,7 @@ typedef struct { | |||
135 | * Wavetable definitions | 135 | * Wavetable definitions |
136 | */ | 136 | */ |
137 | 137 | ||
138 | typedef struct gf1_xwave { | 138 | struct gf1_xwave { |
139 | __u32 stype; /* structure type */ | 139 | __u32 stype; /* structure type */ |
140 | 140 | ||
141 | __u32 share_id[4]; /* share id - zero = no sharing */ | 141 | __u32 share_id[4]; /* share id - zero = no sharing */ |
@@ -165,13 +165,13 @@ typedef struct gf1_xwave { | |||
165 | __u8 vibrato_depth; | 165 | __u8 vibrato_depth; |
166 | __u16 scale_frequency; | 166 | __u16 scale_frequency; |
167 | __u16 scale_factor; /* 0-2048 or 0-2 */ | 167 | __u16 scale_factor; /* 0-2048 or 0-2 */ |
168 | } gf1_xwave_t; | 168 | }; |
169 | 169 | ||
170 | /* | 170 | /* |
171 | * Instrument | 171 | * Instrument |
172 | */ | 172 | */ |
173 | 173 | ||
174 | typedef struct gf1_xinstrument { | 174 | struct gf1_xinstrument { |
175 | __u32 stype; | 175 | __u32 stype; |
176 | 176 | ||
177 | __u16 exclusion; | 177 | __u16 exclusion; |
@@ -181,7 +181,7 @@ typedef struct gf1_xinstrument { | |||
181 | __u8 effect1_depth; /* 0-127 */ | 181 | __u8 effect1_depth; /* 0-127 */ |
182 | __u8 effect2; /* effect 2 */ | 182 | __u8 effect2; /* effect 2 */ |
183 | __u8 effect2_depth; /* 0-127 */ | 183 | __u8 effect2_depth; /* 0-127 */ |
184 | } gf1_xinstrument_t; | 184 | }; |
185 | 185 | ||
186 | /* | 186 | /* |
187 | * Instrument info | 187 | * Instrument info |
@@ -191,35 +191,39 @@ typedef struct gf1_xinstrument { | |||
191 | #define GF1_INFO_TREMOLO (1<<1) | 191 | #define GF1_INFO_TREMOLO (1<<1) |
192 | #define GF1_INFO_VIBRATO (1<<2) | 192 | #define GF1_INFO_VIBRATO (1<<2) |
193 | 193 | ||
194 | typedef struct gf1_info { | 194 | struct gf1_info { |
195 | unsigned char flags; /* supported wave flags */ | 195 | unsigned char flags; /* supported wave flags */ |
196 | unsigned char pad[3]; | 196 | unsigned char pad[3]; |
197 | unsigned int features; /* supported features */ | 197 | unsigned int features; /* supported features */ |
198 | unsigned int max8_len; /* maximum 8-bit wave length */ | 198 | unsigned int max8_len; /* maximum 8-bit wave length */ |
199 | unsigned int max16_len; /* maximum 16-bit wave length */ | 199 | unsigned int max16_len; /* maximum 16-bit wave length */ |
200 | } gf1_info_t; | 200 | }; |
201 | 201 | ||
202 | #ifdef __KERNEL__ | 202 | #ifdef __KERNEL__ |
203 | 203 | ||
204 | #include "seq_instr.h" | 204 | #include "seq_instr.h" |
205 | 205 | ||
206 | typedef struct { | 206 | struct snd_gf1_ops { |
207 | void *private_data; | 207 | void *private_data; |
208 | int (*info)(void *private_data, gf1_info_t *info); | 208 | int (*info)(void *private_data, struct gf1_info *info); |
209 | int (*put_sample)(void *private_data, gf1_wave_t *wave, | 209 | int (*put_sample)(void *private_data, struct gf1_wave *wave, |
210 | char __user *data, long len, int atomic); | 210 | char __user *data, long len, int atomic); |
211 | int (*get_sample)(void *private_data, gf1_wave_t *wave, | 211 | int (*get_sample)(void *private_data, struct gf1_wave *wave, |
212 | char __user *data, long len, int atomic); | 212 | char __user *data, long len, int atomic); |
213 | int (*remove_sample)(void *private_data, gf1_wave_t *wave, | 213 | int (*remove_sample)(void *private_data, struct gf1_wave *wave, |
214 | int atomic); | 214 | int atomic); |
215 | void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); | 215 | void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); |
216 | snd_seq_kinstr_ops_t kops; | 216 | struct snd_seq_kinstr_ops kops; |
217 | } snd_gf1_ops_t; | 217 | }; |
218 | 218 | ||
219 | int snd_seq_gf1_init(snd_gf1_ops_t *ops, | 219 | int snd_seq_gf1_init(struct snd_gf1_ops *ops, |
220 | void *private_data, | 220 | void *private_data, |
221 | snd_seq_kinstr_ops_t *next); | 221 | struct snd_seq_kinstr_ops *next); |
222 | 222 | ||
223 | #endif | 223 | #endif |
224 | 224 | ||
225 | /* typedefs for compatibility to user-space */ | ||
226 | typedef struct gf1_xwave gf1_xwave_t; | ||
227 | typedef struct gf1_xinstrument gf1_xinstrument_t; | ||
228 | |||
225 | #endif /* __SOUND_AINSTR_GF1_H */ | 229 | #endif /* __SOUND_AINSTR_GF1_H */ |
diff --git a/include/sound/ainstr_iw.h b/include/sound/ainstr_iw.h index 8adf744926ff..251feaf1b388 100644 --- a/include/sound/ainstr_iw.h +++ b/include/sound/ainstr_iw.h | |||
@@ -54,7 +54,7 @@ | |||
54 | * Wavetable definitions | 54 | * Wavetable definitions |
55 | */ | 55 | */ |
56 | 56 | ||
57 | typedef struct iwffff_wave { | 57 | struct iwffff_wave { |
58 | unsigned int share_id[4]; /* share id - zero = no sharing */ | 58 | unsigned int share_id[4]; /* share id - zero = no sharing */ |
59 | unsigned int format; /* wave format */ | 59 | unsigned int format; /* wave format */ |
60 | 60 | ||
@@ -76,7 +76,7 @@ typedef struct iwffff_wave { | |||
76 | unsigned char pad; | 76 | unsigned char pad; |
77 | 77 | ||
78 | struct iwffff_wave *next; | 78 | struct iwffff_wave *next; |
79 | } iwffff_wave_t; | 79 | }; |
80 | 80 | ||
81 | /* | 81 | /* |
82 | * Layer | 82 | * Layer |
@@ -85,13 +85,13 @@ typedef struct iwffff_wave { | |||
85 | #define IWFFFF_LFO_SHAPE_TRIANGLE 0 | 85 | #define IWFFFF_LFO_SHAPE_TRIANGLE 0 |
86 | #define IWFFFF_LFO_SHAPE_POSTRIANGLE 1 | 86 | #define IWFFFF_LFO_SHAPE_POSTRIANGLE 1 |
87 | 87 | ||
88 | typedef struct iwffff_lfo { | 88 | struct iwffff_lfo { |
89 | unsigned short freq; /* (0-2047) 0.01Hz - 21.5Hz */ | 89 | unsigned short freq; /* (0-2047) 0.01Hz - 21.5Hz */ |
90 | signed short depth; /* volume +- (0-255) 0.48675dB/step */ | 90 | signed short depth; /* volume +- (0-255) 0.48675dB/step */ |
91 | signed short sweep; /* 0 - 950 deciseconds */ | 91 | signed short sweep; /* 0 - 950 deciseconds */ |
92 | unsigned char shape; /* see to IWFFFF_LFO_SHAPE_XXXX */ | 92 | unsigned char shape; /* see to IWFFFF_LFO_SHAPE_XXXX */ |
93 | unsigned char delay; /* 0 - 255 deciseconds */ | 93 | unsigned char delay; /* 0 - 255 deciseconds */ |
94 | } iwffff_lfo_t; | 94 | }; |
95 | 95 | ||
96 | #define IWFFFF_ENV_FLAG_RETRIGGER 0x0001 /* flag - retrigger */ | 96 | #define IWFFFF_ENV_FLAG_RETRIGGER 0x0001 /* flag - retrigger */ |
97 | 97 | ||
@@ -102,12 +102,12 @@ typedef struct iwffff_lfo { | |||
102 | #define IWFFFF_ENV_INDEX_VELOCITY 0x0001 /* index - velocity */ | 102 | #define IWFFFF_ENV_INDEX_VELOCITY 0x0001 /* index - velocity */ |
103 | #define IWFFFF_ENV_INDEX_FREQUENCY 0x0002 /* index - frequency */ | 103 | #define IWFFFF_ENV_INDEX_FREQUENCY 0x0002 /* index - frequency */ |
104 | 104 | ||
105 | typedef struct iwffff_env_point { | 105 | struct iwffff_env_point { |
106 | unsigned short offset; | 106 | unsigned short offset; |
107 | unsigned short rate; | 107 | unsigned short rate; |
108 | } iwffff_env_point_t; | 108 | }; |
109 | 109 | ||
110 | typedef struct iwffff_env_record { | 110 | struct iwffff_env_record { |
111 | unsigned short nattack; | 111 | unsigned short nattack; |
112 | unsigned short nrelease; | 112 | unsigned short nrelease; |
113 | unsigned short sustain_offset; | 113 | unsigned short sustain_offset; |
@@ -118,15 +118,15 @@ typedef struct iwffff_env_record { | |||
118 | struct iwffff_env_record *next; | 118 | struct iwffff_env_record *next; |
119 | /* points are stored here */ | 119 | /* points are stored here */ |
120 | /* count of points = nattack + nrelease */ | 120 | /* count of points = nattack + nrelease */ |
121 | } iwffff_env_record_t; | 121 | }; |
122 | 122 | ||
123 | typedef struct iwffff_env { | 123 | struct iwffff_env { |
124 | unsigned char flags; | 124 | unsigned char flags; |
125 | unsigned char mode; | 125 | unsigned char mode; |
126 | unsigned char index; | 126 | unsigned char index; |
127 | unsigned char pad; | 127 | unsigned char pad; |
128 | struct iwffff_env_record *record; | 128 | struct iwffff_env_record *record; |
129 | } iwffff_env_t; | 129 | }; |
130 | 130 | ||
131 | #define IWFFFF_LAYER_FLAG_RETRIGGER 0x0001 /* retrigger */ | 131 | #define IWFFFF_LAYER_FLAG_RETRIGGER 0x0001 /* retrigger */ |
132 | 132 | ||
@@ -138,7 +138,7 @@ typedef struct iwffff_env { | |||
138 | #define IWFFFF_LAYER_EVENT_RETRIG 0x0002 /* layer event - retrigger */ | 138 | #define IWFFFF_LAYER_EVENT_RETRIG 0x0002 /* layer event - retrigger */ |
139 | #define IWFFFF_LAYER_EVENT_LEGATO 0x0003 /* layer event - legato */ | 139 | #define IWFFFF_LAYER_EVENT_LEGATO 0x0003 /* layer event - legato */ |
140 | 140 | ||
141 | typedef struct iwffff_layer { | 141 | struct iwffff_layer { |
142 | unsigned char flags; | 142 | unsigned char flags; |
143 | unsigned char velocity_mode; | 143 | unsigned char velocity_mode; |
144 | unsigned char layer_event; | 144 | unsigned char layer_event; |
@@ -147,17 +147,17 @@ typedef struct iwffff_layer { | |||
147 | unsigned char pan; /* pan offset from CC1 (0 left - 127 right) */ | 147 | unsigned char pan; /* pan offset from CC1 (0 left - 127 right) */ |
148 | unsigned char pan_freq_scale; /* position based on frequency (0-127) */ | 148 | unsigned char pan_freq_scale; /* position based on frequency (0-127) */ |
149 | unsigned char attenuation; /* 0-127 (no corresponding midi controller) */ | 149 | unsigned char attenuation; /* 0-127 (no corresponding midi controller) */ |
150 | iwffff_lfo_t tremolo; /* tremolo effect */ | 150 | struct iwffff_lfo tremolo; /* tremolo effect */ |
151 | iwffff_lfo_t vibrato; /* vibrato effect */ | 151 | struct iwffff_lfo vibrato; /* vibrato effect */ |
152 | unsigned short freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ | 152 | unsigned short freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ |
153 | unsigned char freq_center; /* center for keyboard frequency scaling */ | 153 | unsigned char freq_center; /* center for keyboard frequency scaling */ |
154 | unsigned char pad; | 154 | unsigned char pad; |
155 | iwffff_env_t penv; /* pitch envelope */ | 155 | struct iwffff_env penv; /* pitch envelope */ |
156 | iwffff_env_t venv; /* volume envelope */ | 156 | struct iwffff_env venv; /* volume envelope */ |
157 | 157 | ||
158 | iwffff_wave_t *wave; | 158 | struct iwffff_wave *wave; |
159 | struct iwffff_layer *next; | 159 | struct iwffff_layer *next; |
160 | } iwffff_layer_t; | 160 | }; |
161 | 161 | ||
162 | /* | 162 | /* |
163 | * Instrument | 163 | * Instrument |
@@ -177,7 +177,7 @@ typedef struct iwffff_layer { | |||
177 | #define IWFFFF_EFFECT_CHORUS 2 | 177 | #define IWFFFF_EFFECT_CHORUS 2 |
178 | #define IWFFFF_EFFECT_ECHO 3 | 178 | #define IWFFFF_EFFECT_ECHO 3 |
179 | 179 | ||
180 | typedef struct { | 180 | struct iwffff_instrument { |
181 | unsigned short exclusion; | 181 | unsigned short exclusion; |
182 | unsigned short layer_type; | 182 | unsigned short layer_type; |
183 | unsigned short exclusion_group; /* 0 - none, 1-65535 */ | 183 | unsigned short exclusion_group; /* 0 - none, 1-65535 */ |
@@ -187,8 +187,8 @@ typedef struct { | |||
187 | unsigned char effect2; /* effect 2 */ | 187 | unsigned char effect2; /* effect 2 */ |
188 | unsigned char effect2_depth; /* 0-127 */ | 188 | unsigned char effect2_depth; /* 0-127 */ |
189 | 189 | ||
190 | iwffff_layer_t *layer; /* first layer */ | 190 | struct iwffff_layer *layer; /* first layer */ |
191 | } iwffff_instrument_t; | 191 | }; |
192 | 192 | ||
193 | /* | 193 | /* |
194 | * | 194 | * |
@@ -216,7 +216,7 @@ typedef struct { | |||
216 | * Wavetable definitions | 216 | * Wavetable definitions |
217 | */ | 217 | */ |
218 | 218 | ||
219 | typedef struct iwffff_xwave { | 219 | struct iwffff_xwave { |
220 | __u32 stype; /* structure type */ | 220 | __u32 stype; /* structure type */ |
221 | 221 | ||
222 | __u32 share_id[4]; /* share id - zero = no sharing */ | 222 | __u32 share_id[4]; /* share id - zero = no sharing */ |
@@ -234,26 +234,26 @@ typedef struct iwffff_xwave { | |||
234 | __u8 low_note; /* lower frequency range for this waveform */ | 234 | __u8 low_note; /* lower frequency range for this waveform */ |
235 | __u8 high_note; /* higher frequency range for this waveform */ | 235 | __u8 high_note; /* higher frequency range for this waveform */ |
236 | __u8 pad; | 236 | __u8 pad; |
237 | } iwffff_xwave_t; | 237 | }; |
238 | 238 | ||
239 | /* | 239 | /* |
240 | * Layer | 240 | * Layer |
241 | */ | 241 | */ |
242 | 242 | ||
243 | typedef struct iwffff_xlfo { | 243 | struct iwffff_xlfo { |
244 | __u16 freq; /* (0-2047) 0.01Hz - 21.5Hz */ | 244 | __u16 freq; /* (0-2047) 0.01Hz - 21.5Hz */ |
245 | __s16 depth; /* volume +- (0-255) 0.48675dB/step */ | 245 | __s16 depth; /* volume +- (0-255) 0.48675dB/step */ |
246 | __s16 sweep; /* 0 - 950 deciseconds */ | 246 | __s16 sweep; /* 0 - 950 deciseconds */ |
247 | __u8 shape; /* see to ULTRA_IW_LFO_SHAPE_XXXX */ | 247 | __u8 shape; /* see to ULTRA_IW_LFO_SHAPE_XXXX */ |
248 | __u8 delay; /* 0 - 255 deciseconds */ | 248 | __u8 delay; /* 0 - 255 deciseconds */ |
249 | } iwffff_xlfo_t; | 249 | }; |
250 | 250 | ||
251 | typedef struct iwffff_xenv_point { | 251 | struct iwffff_xenv_point { |
252 | __u16 offset; | 252 | __u16 offset; |
253 | __u16 rate; | 253 | __u16 rate; |
254 | } iwffff_xenv_point_t; | 254 | }; |
255 | 255 | ||
256 | typedef struct iwffff_xenv_record { | 256 | struct iwffff_xenv_record { |
257 | __u32 stype; | 257 | __u32 stype; |
258 | __u16 nattack; | 258 | __u16 nattack; |
259 | __u16 nrelease; | 259 | __u16 nrelease; |
@@ -264,16 +264,16 @@ typedef struct iwffff_xenv_record { | |||
264 | __u8 pad; | 264 | __u8 pad; |
265 | /* points are stored here.. */ | 265 | /* points are stored here.. */ |
266 | /* count of points = nattack + nrelease */ | 266 | /* count of points = nattack + nrelease */ |
267 | } iwffff_xenv_record_t; | 267 | }; |
268 | 268 | ||
269 | typedef struct iwffff_xenv { | 269 | struct iwffff_xenv { |
270 | __u8 flags; | 270 | __u8 flags; |
271 | __u8 mode; | 271 | __u8 mode; |
272 | __u8 index; | 272 | __u8 index; |
273 | __u8 pad; | 273 | __u8 pad; |
274 | } iwffff_xenv_t; | 274 | }; |
275 | 275 | ||
276 | typedef struct iwffff_xlayer { | 276 | struct iwffff_xlayer { |
277 | __u32 stype; | 277 | __u32 stype; |
278 | __u8 flags; | 278 | __u8 flags; |
279 | __u8 velocity_mode; | 279 | __u8 velocity_mode; |
@@ -283,20 +283,20 @@ typedef struct iwffff_xlayer { | |||
283 | __u8 pan; /* pan offset from CC1 (0 left - 127 right) */ | 283 | __u8 pan; /* pan offset from CC1 (0 left - 127 right) */ |
284 | __u8 pan_freq_scale; /* position based on frequency (0-127) */ | 284 | __u8 pan_freq_scale; /* position based on frequency (0-127) */ |
285 | __u8 attenuation; /* 0-127 (no corresponding midi controller) */ | 285 | __u8 attenuation; /* 0-127 (no corresponding midi controller) */ |
286 | iwffff_xlfo_t tremolo; /* tremolo effect */ | 286 | struct iwffff_xlfo tremolo; /* tremolo effect */ |
287 | iwffff_xlfo_t vibrato; /* vibrato effect */ | 287 | struct iwffff_xlfo vibrato; /* vibrato effect */ |
288 | __u16 freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ | 288 | __u16 freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ |
289 | __u8 freq_center; /* center for keyboard frequency scaling */ | 289 | __u8 freq_center; /* center for keyboard frequency scaling */ |
290 | __u8 pad; | 290 | __u8 pad; |
291 | iwffff_xenv_t penv; /* pitch envelope */ | 291 | struct iwffff_xenv penv; /* pitch envelope */ |
292 | iwffff_xenv_t venv; /* volume envelope */ | 292 | struct iwffff_xenv venv; /* volume envelope */ |
293 | } iwffff_xlayer_t; | 293 | }; |
294 | 294 | ||
295 | /* | 295 | /* |
296 | * Instrument | 296 | * Instrument |
297 | */ | 297 | */ |
298 | 298 | ||
299 | typedef struct iwffff_xinstrument { | 299 | struct iwffff_xinstrument { |
300 | __u32 stype; | 300 | __u32 stype; |
301 | 301 | ||
302 | __u16 exclusion; | 302 | __u16 exclusion; |
@@ -307,7 +307,7 @@ typedef struct iwffff_xinstrument { | |||
307 | __u8 effect1_depth; /* 0-127 */ | 307 | __u8 effect1_depth; /* 0-127 */ |
308 | __u8 effect2; /* effect 2 */ | 308 | __u8 effect2; /* effect 2 */ |
309 | __u8 effect2_depth; /* 0-127 */ | 309 | __u8 effect2_depth; /* 0-127 */ |
310 | } iwffff_xinstrument_t; | 310 | }; |
311 | 311 | ||
312 | /* | 312 | /* |
313 | * ROM support | 313 | * ROM support |
@@ -316,7 +316,7 @@ typedef struct iwffff_xinstrument { | |||
316 | 316 | ||
317 | #define IWFFFF_ROM_HDR_SIZE 512 | 317 | #define IWFFFF_ROM_HDR_SIZE 512 |
318 | 318 | ||
319 | typedef struct { | 319 | struct iwffff_rom_header { |
320 | __u8 iwave[8]; | 320 | __u8 iwave[8]; |
321 | __u8 revision; | 321 | __u8 revision; |
322 | __u8 series_number; | 322 | __u8 series_number; |
@@ -328,7 +328,7 @@ typedef struct { | |||
328 | __u8 copyright[128]; | 328 | __u8 copyright[128]; |
329 | __u8 vendor_name[64]; | 329 | __u8 vendor_name[64]; |
330 | __u8 description[128]; | 330 | __u8 description[128]; |
331 | } iwffff_rom_header_t; | 331 | }; |
332 | 332 | ||
333 | /* | 333 | /* |
334 | * Instrument info | 334 | * Instrument info |
@@ -339,35 +339,46 @@ typedef struct { | |||
339 | #define IWFFFF_INFO_LFO_TREMOLO (1<<2) | 339 | #define IWFFFF_INFO_LFO_TREMOLO (1<<2) |
340 | #define IWFFFF_INFO_LFO_TREMOLO_SHAPE (1<<3) | 340 | #define IWFFFF_INFO_LFO_TREMOLO_SHAPE (1<<3) |
341 | 341 | ||
342 | typedef struct iwffff_info { | 342 | struct iwffff_info { |
343 | unsigned int format; /* supported format bits */ | 343 | unsigned int format; /* supported format bits */ |
344 | unsigned int effects; /* supported effects (1 << IWFFFF_EFFECT*) */ | 344 | unsigned int effects; /* supported effects (1 << IWFFFF_EFFECT*) */ |
345 | unsigned int lfos; /* LFO effects */ | 345 | unsigned int lfos; /* LFO effects */ |
346 | unsigned int max8_len; /* maximum 8-bit wave length */ | 346 | unsigned int max8_len; /* maximum 8-bit wave length */ |
347 | unsigned int max16_len; /* maximum 16-bit wave length */ | 347 | unsigned int max16_len; /* maximum 16-bit wave length */ |
348 | } iwffff_info_t; | 348 | }; |
349 | 349 | ||
350 | #ifdef __KERNEL__ | 350 | #ifdef __KERNEL__ |
351 | 351 | ||
352 | #include "seq_instr.h" | 352 | #include "seq_instr.h" |
353 | 353 | ||
354 | typedef struct { | 354 | struct snd_iwffff_ops { |
355 | void *private_data; | 355 | void *private_data; |
356 | int (*info)(void *private_data, iwffff_info_t *info); | 356 | int (*info)(void *private_data, struct iwffff_info *info); |
357 | int (*put_sample)(void *private_data, iwffff_wave_t *wave, | 357 | int (*put_sample)(void *private_data, struct iwffff_wave *wave, |
358 | char __user *data, long len, int atomic); | 358 | char __user *data, long len, int atomic); |
359 | int (*get_sample)(void *private_data, iwffff_wave_t *wave, | 359 | int (*get_sample)(void *private_data, struct iwffff_wave *wave, |
360 | char __user *data, long len, int atomic); | 360 | char __user *data, long len, int atomic); |
361 | int (*remove_sample)(void *private_data, iwffff_wave_t *wave, | 361 | int (*remove_sample)(void *private_data, struct iwffff_wave *wave, |
362 | int atomic); | 362 | int atomic); |
363 | void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); | 363 | void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); |
364 | snd_seq_kinstr_ops_t kops; | 364 | struct snd_seq_kinstr_ops kops; |
365 | } snd_iwffff_ops_t; | 365 | }; |
366 | 366 | ||
367 | int snd_seq_iwffff_init(snd_iwffff_ops_t *ops, | 367 | int snd_seq_iwffff_init(struct snd_iwffff_ops *ops, |
368 | void *private_data, | 368 | void *private_data, |
369 | snd_seq_kinstr_ops_t *next); | 369 | struct snd_seq_kinstr_ops *next); |
370 | 370 | ||
371 | #endif | 371 | #endif |
372 | 372 | ||
373 | /* typedefs for compatibility to user-space */ | ||
374 | typedef struct iwffff_xwave iwffff_xwave_t; | ||
375 | typedef struct iwffff_xlfo iwffff_xlfo_t; | ||
376 | typedef struct iwffff_xenv_point iwffff_xenv_point_t; | ||
377 | typedef struct iwffff_xenv_record iwffff_xenv_record_t; | ||
378 | typedef struct iwffff_xenv iwffff_xenv_t; | ||
379 | typedef struct iwffff_xlayer iwffff_xlayer_t; | ||
380 | typedef struct iwffff_xinstrument iwffff_xinstrument_t; | ||
381 | typedef struct iwffff_rom_header iwffff_rom_header_t; | ||
382 | typedef struct iwffff_info iwffff_info_t; | ||
383 | |||
373 | #endif /* __SOUND_AINSTR_IW_H */ | 384 | #endif /* __SOUND_AINSTR_IW_H */ |
diff --git a/include/sound/ainstr_simple.h b/include/sound/ainstr_simple.h index 40824b4ab23d..5eead12e58ae 100644 --- a/include/sound/ainstr_simple.h +++ b/include/sound/ainstr_simple.h | |||
@@ -61,18 +61,18 @@ | |||
61 | * instrument info | 61 | * instrument info |
62 | */ | 62 | */ |
63 | 63 | ||
64 | typedef struct simple_instrument_info { | 64 | struct simple_instrument_info { |
65 | unsigned int format; /* supported format bits */ | 65 | unsigned int format; /* supported format bits */ |
66 | unsigned int effects; /* supported effects (1 << SIMPLE_EFFECT_*) */ | 66 | unsigned int effects; /* supported effects (1 << SIMPLE_EFFECT_*) */ |
67 | unsigned int max8_len; /* maximum 8-bit wave length */ | 67 | unsigned int max8_len; /* maximum 8-bit wave length */ |
68 | unsigned int max16_len; /* maximum 16-bit wave length */ | 68 | unsigned int max16_len; /* maximum 16-bit wave length */ |
69 | } simple_instrument_info_t; | 69 | }; |
70 | 70 | ||
71 | /* | 71 | /* |
72 | * Instrument | 72 | * Instrument |
73 | */ | 73 | */ |
74 | 74 | ||
75 | typedef struct { | 75 | struct simple_instrument { |
76 | unsigned int share_id[4]; /* share id - zero = no sharing */ | 76 | unsigned int share_id[4]; /* share id - zero = no sharing */ |
77 | unsigned int format; /* wave format */ | 77 | unsigned int format; /* wave format */ |
78 | 78 | ||
@@ -92,7 +92,7 @@ typedef struct { | |||
92 | unsigned char effect1_depth; /* 0-127 */ | 92 | unsigned char effect1_depth; /* 0-127 */ |
93 | unsigned char effect2; /* effect 2 */ | 93 | unsigned char effect2; /* effect 2 */ |
94 | unsigned char effect2_depth; /* 0-127 */ | 94 | unsigned char effect2_depth; /* 0-127 */ |
95 | } simple_instrument_t; | 95 | }; |
96 | 96 | ||
97 | /* | 97 | /* |
98 | * | 98 | * |
@@ -112,7 +112,7 @@ typedef struct { | |||
112 | * Instrument | 112 | * Instrument |
113 | */ | 113 | */ |
114 | 114 | ||
115 | typedef struct simple_xinstrument { | 115 | struct simple_xinstrument { |
116 | __u32 stype; | 116 | __u32 stype; |
117 | 117 | ||
118 | __u32 share_id[4]; /* share id - zero = no sharing */ | 118 | __u32 share_id[4]; /* share id - zero = no sharing */ |
@@ -128,29 +128,32 @@ typedef struct simple_xinstrument { | |||
128 | __u8 effect1_depth; /* 0-127 */ | 128 | __u8 effect1_depth; /* 0-127 */ |
129 | __u8 effect2; /* effect 2 */ | 129 | __u8 effect2; /* effect 2 */ |
130 | __u8 effect2_depth; /* 0-127 */ | 130 | __u8 effect2_depth; /* 0-127 */ |
131 | } simple_xinstrument_t; | 131 | }; |
132 | 132 | ||
133 | #ifdef __KERNEL__ | 133 | #ifdef __KERNEL__ |
134 | 134 | ||
135 | #include "seq_instr.h" | 135 | #include "seq_instr.h" |
136 | 136 | ||
137 | typedef struct { | 137 | struct snd_simple_ops { |
138 | void *private_data; | 138 | void *private_data; |
139 | int (*info)(void *private_data, simple_instrument_info_t *info); | 139 | int (*info)(void *private_data, struct simple_instrument_info *info); |
140 | int (*put_sample)(void *private_data, simple_instrument_t *instr, | 140 | int (*put_sample)(void *private_data, struct simple_instrument *instr, |
141 | char __user *data, long len, int atomic); | 141 | char __user *data, long len, int atomic); |
142 | int (*get_sample)(void *private_data, simple_instrument_t *instr, | 142 | int (*get_sample)(void *private_data, struct simple_instrument *instr, |
143 | char __user *data, long len, int atomic); | 143 | char __user *data, long len, int atomic); |
144 | int (*remove_sample)(void *private_data, simple_instrument_t *instr, | 144 | int (*remove_sample)(void *private_data, struct simple_instrument *instr, |
145 | int atomic); | 145 | int atomic); |
146 | void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); | 146 | void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); |
147 | snd_seq_kinstr_ops_t kops; | 147 | struct snd_seq_kinstr_ops kops; |
148 | } snd_simple_ops_t; | 148 | }; |
149 | 149 | ||
150 | int snd_seq_simple_init(snd_simple_ops_t *ops, | 150 | int snd_seq_simple_init(struct snd_simple_ops *ops, |
151 | void *private_data, | 151 | void *private_data, |
152 | snd_seq_kinstr_ops_t *next); | 152 | struct snd_seq_kinstr_ops *next); |
153 | 153 | ||
154 | #endif | 154 | #endif |
155 | 155 | ||
156 | /* typedefs for compatibility to user-space */ | ||
157 | typedef struct simple_xinstrument simple_xinstrument_t; | ||
158 | |||
156 | #endif /* __SOUND_AINSTR_SIMPLE_H */ | 159 | #endif /* __SOUND_AINSTR_SIMPLE_H */ |
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>"); | |||
30 | MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support."); | 30 | MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support."); |
31 | MODULE_LICENSE("GPL"); | 31 | MODULE_LICENSE("GPL"); |
32 | 32 | ||
33 | static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr, | 33 | static 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 | ||
75 | static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr, | 75 | static 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 | ||
117 | static int snd_seq_fm_get_size(void *private_data, snd_seq_kinstr_t *instr, | 117 | static 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 | ||
124 | int snd_seq_fm_init(snd_seq_kinstr_ops_t *ops, | 124 | int 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 | ||
45 | static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops, | 45 | static 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 | ||
119 | static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops, | 119 | static 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 | ||
128 | static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops, | 128 | static 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 | ||
140 | static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr, | 140 | static 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 | ||
192 | static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops, | 192 | static 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 | ||
254 | static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr, | 254 | static 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 | ||
286 | static int snd_seq_gf1_get_size(void *private_data, snd_seq_kinstr_t *instr, | 286 | static 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 | ||
304 | static int snd_seq_gf1_remove(void *private_data, | 304 | static 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 | ||
316 | static void snd_seq_gf1_notify(void *private_data, | 316 | static 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 | ||
326 | int snd_seq_gf1_init(snd_gf1_ops_t *ops, | 326 | int 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 | ||
45 | static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp, | 45 | static 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 | ||
55 | static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype, | 55 | static 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 | ||
123 | static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops, | 123 | static 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 | ||
189 | static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops, | 189 | static 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 | ||
201 | static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops, | 201 | static 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 | ||
210 | static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops, | 210 | static 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 | ||
229 | static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr, | 229 | static 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 | ||
338 | static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx, | 338 | static 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 | ||
348 | static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype, | 348 | static 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 | ||
395 | static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops, | 395 | static 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 | ||
450 | static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr, | 450 | static 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 | ||
523 | static long snd_seq_iwffff_env_size_in_stream(iwffff_env_t *ep) | 523 | static 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 | ||
535 | static long snd_seq_iwffff_wave_size_in_stream(iwffff_layer_t *lp) | 535 | static 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 | ||
548 | static int snd_seq_iwffff_get_size(void *private_data, snd_seq_kinstr_t *instr, | 548 | static 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 | ||
568 | static int snd_seq_iwffff_remove(void *private_data, | 568 | static 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 | ||
580 | static void snd_seq_iwffff_notify(void *private_data, | 580 | static 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 | ||
590 | int snd_seq_iwffff_init(snd_iwffff_ops_t *ops, | 590 | int 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 | ||
45 | static void snd_seq_simple_instr_free(snd_simple_ops_t *ops, | 45 | static 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 | ||
53 | static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr, | 53 | static 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 | ||
103 | static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr, | 103 | static 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 | ||
150 | static int snd_seq_simple_get_size(void *private_data, snd_seq_kinstr_t *instr, | 150 | static 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 | ||
160 | static int snd_seq_simple_remove(void *private_data, | 160 | static 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 | ||
172 | static void snd_seq_simple_notify(void *private_data, | 172 | static 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 | ||
182 | int snd_seq_simple_init(snd_simple_ops_t *ops, | 182 | int 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; |