Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Takashi Iwai and committed by
Jaroslav Kysela
19ac31e8 c7e0b5bf

+272 -250
+16 -12
include/sound/ainstr_fm.h
··· 39 39 * FM operator 40 40 */ 41 41 42 - typedef struct fm_operator { 42 + struct fm_operator { 43 43 unsigned char am_vib; 44 44 unsigned char ksl_level; 45 45 unsigned char attack_decay; 46 46 unsigned char sustain_release; 47 47 unsigned char wave_select; 48 - } fm_operator_t; 48 + }; 49 49 50 50 /* 51 51 * Instrument ··· 54 54 #define FM_PATCH_OPL2 0x01 /* OPL2 2 operators FM instrument */ 55 55 #define FM_PATCH_OPL3 0x02 /* OPL3 4 operators FM instrument */ 56 56 57 - typedef struct { 57 + struct fm_instrument { 58 58 unsigned int share_id[4]; /* share id - zero = no sharing */ 59 59 unsigned char type; /* instrument type */ 60 60 61 - fm_operator_t op[4]; 61 + struct fm_operator op[4]; 62 62 unsigned char feedback_connection[2]; 63 63 64 64 unsigned char echo_delay; ··· 68 68 unsigned char fix_dur; 69 69 unsigned char modes; 70 70 unsigned char fix_key; 71 - } fm_instrument_t; 71 + }; 72 72 73 73 /* 74 74 * ··· 88 88 * FM operator 89 89 */ 90 90 91 - typedef struct fm_xoperator { 91 + struct fm_xoperator { 92 92 __u8 am_vib; 93 93 __u8 ksl_level; 94 94 __u8 attack_decay; 95 95 __u8 sustain_release; 96 96 __u8 wave_select; 97 - } fm_xoperator_t; 97 + }; 98 98 99 99 /* 100 100 * Instrument 101 101 */ 102 102 103 - typedef struct fm_xinstrument { 103 + struct fm_xinstrument { 104 104 __u32 stype; /* structure type */ 105 105 106 106 __u32 share_id[4]; /* share id - zero = no sharing */ 107 107 __u8 type; /* instrument type */ 108 108 109 - fm_xoperator_t op[4]; /* fm operators */ 109 + struct fm_xoperator op[4]; /* fm operators */ 110 110 __u8 feedback_connection[2]; 111 111 112 112 __u8 echo_delay; ··· 116 116 __u8 fix_dur; 117 117 __u8 modes; 118 118 __u8 fix_key; 119 - } fm_xinstrument_t; 119 + }; 120 120 121 121 #ifdef __KERNEL__ 122 122 123 123 #include "seq_instr.h" 124 124 125 - int snd_seq_fm_init(snd_seq_kinstr_ops_t * ops, 126 - snd_seq_kinstr_ops_t * next); 125 + int snd_seq_fm_init(struct snd_seq_kinstr_ops * ops, 126 + struct snd_seq_kinstr_ops * next); 127 127 128 128 #endif 129 + 130 + /* typedefs for compatibility to user-space */ 131 + typedef struct fm_xoperator fm_xoperator_t; 132 + typedef struct fm_xinstrument fm_xinstrument_t; 129 133 130 134 #endif /* __SOUND_AINSTR_FM_H */
+25 -21
include/sound/ainstr_gf1.h
··· 52 52 * Wavetable definitions 53 53 */ 54 54 55 - typedef struct gf1_wave { 55 + struct gf1_wave { 56 56 unsigned int share_id[4]; /* share id - zero = no sharing */ 57 57 unsigned int format; /* wave format */ 58 58 ··· 88 88 unsigned short scale_factor; /* 0-2048 or 0-2 */ 89 89 90 90 struct gf1_wave *next; 91 - } gf1_wave_t; 91 + }; 92 92 93 93 /* 94 94 * Instrument ··· 103 103 #define IWFFFF_EFFECT_CHORUS 2 104 104 #define IWFFFF_EFFECT_ECHO 3 105 105 106 - typedef struct { 106 + struct gf1_instrument { 107 107 unsigned short exclusion; 108 108 unsigned short exclusion_group; /* 0 - none, 1-65535 */ 109 109 ··· 112 112 unsigned char effect2; /* effect 2 */ 113 113 unsigned char effect2_depth; /* 0-127 */ 114 114 115 - gf1_wave_t *wave; /* first waveform */ 116 - } gf1_instrument_t; 115 + struct gf1_wave *wave; /* first waveform */ 116 + }; 117 117 118 118 /* 119 119 * ··· 135 135 * Wavetable definitions 136 136 */ 137 137 138 - typedef struct gf1_xwave { 138 + struct gf1_xwave { 139 139 __u32 stype; /* structure type */ 140 140 141 141 __u32 share_id[4]; /* share id - zero = no sharing */ ··· 165 165 __u8 vibrato_depth; 166 166 __u16 scale_frequency; 167 167 __u16 scale_factor; /* 0-2048 or 0-2 */ 168 - } gf1_xwave_t; 168 + }; 169 169 170 170 /* 171 171 * Instrument 172 172 */ 173 173 174 - typedef struct gf1_xinstrument { 174 + struct gf1_xinstrument { 175 175 __u32 stype; 176 176 177 177 __u16 exclusion; ··· 181 181 __u8 effect1_depth; /* 0-127 */ 182 182 __u8 effect2; /* effect 2 */ 183 183 __u8 effect2_depth; /* 0-127 */ 184 - } gf1_xinstrument_t; 184 + }; 185 185 186 186 /* 187 187 * Instrument info ··· 191 191 #define GF1_INFO_TREMOLO (1<<1) 192 192 #define GF1_INFO_VIBRATO (1<<2) 193 193 194 - typedef struct gf1_info { 194 + struct gf1_info { 195 195 unsigned char flags; /* supported wave flags */ 196 196 unsigned char pad[3]; 197 197 unsigned int features; /* supported features */ 198 198 unsigned int max8_len; /* maximum 8-bit wave length */ 199 199 unsigned int max16_len; /* maximum 16-bit wave length */ 200 - } gf1_info_t; 200 + }; 201 201 202 202 #ifdef __KERNEL__ 203 203 204 204 #include "seq_instr.h" 205 205 206 - typedef struct { 206 + struct snd_gf1_ops { 207 207 void *private_data; 208 - int (*info)(void *private_data, gf1_info_t *info); 209 - int (*put_sample)(void *private_data, gf1_wave_t *wave, 208 + int (*info)(void *private_data, struct gf1_info *info); 209 + int (*put_sample)(void *private_data, struct gf1_wave *wave, 210 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 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 214 int atomic); 215 - void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); 216 - snd_seq_kinstr_ops_t kops; 217 - } snd_gf1_ops_t; 215 + void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); 216 + struct snd_seq_kinstr_ops kops; 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 220 void *private_data, 221 - snd_seq_kinstr_ops_t *next); 221 + struct snd_seq_kinstr_ops *next); 222 222 223 223 #endif 224 + 225 + /* typedefs for compatibility to user-space */ 226 + typedef struct gf1_xwave gf1_xwave_t; 227 + typedef struct gf1_xinstrument gf1_xinstrument_t; 224 228 225 229 #endif /* __SOUND_AINSTR_GF1_H */
+63 -52
include/sound/ainstr_iw.h
··· 54 54 * Wavetable definitions 55 55 */ 56 56 57 - typedef struct iwffff_wave { 57 + struct iwffff_wave { 58 58 unsigned int share_id[4]; /* share id - zero = no sharing */ 59 59 unsigned int format; /* wave format */ 60 60 ··· 76 76 unsigned char pad; 77 77 78 78 struct iwffff_wave *next; 79 - } iwffff_wave_t; 79 + }; 80 80 81 81 /* 82 82 * Layer ··· 85 85 #define IWFFFF_LFO_SHAPE_TRIANGLE 0 86 86 #define IWFFFF_LFO_SHAPE_POSTRIANGLE 1 87 87 88 - typedef struct iwffff_lfo { 88 + struct iwffff_lfo { 89 89 unsigned short freq; /* (0-2047) 0.01Hz - 21.5Hz */ 90 90 signed short depth; /* volume +- (0-255) 0.48675dB/step */ 91 91 signed short sweep; /* 0 - 950 deciseconds */ 92 92 unsigned char shape; /* see to IWFFFF_LFO_SHAPE_XXXX */ 93 93 unsigned char delay; /* 0 - 255 deciseconds */ 94 - } iwffff_lfo_t; 94 + }; 95 95 96 96 #define IWFFFF_ENV_FLAG_RETRIGGER 0x0001 /* flag - retrigger */ 97 97 ··· 102 102 #define IWFFFF_ENV_INDEX_VELOCITY 0x0001 /* index - velocity */ 103 103 #define IWFFFF_ENV_INDEX_FREQUENCY 0x0002 /* index - frequency */ 104 104 105 - typedef struct iwffff_env_point { 105 + struct iwffff_env_point { 106 106 unsigned short offset; 107 107 unsigned short rate; 108 - } iwffff_env_point_t; 108 + }; 109 109 110 - typedef struct iwffff_env_record { 110 + struct iwffff_env_record { 111 111 unsigned short nattack; 112 112 unsigned short nrelease; 113 113 unsigned short sustain_offset; ··· 118 118 struct iwffff_env_record *next; 119 119 /* points are stored here */ 120 120 /* count of points = nattack + nrelease */ 121 - } iwffff_env_record_t; 121 + }; 122 122 123 - typedef struct iwffff_env { 123 + struct iwffff_env { 124 124 unsigned char flags; 125 125 unsigned char mode; 126 126 unsigned char index; 127 127 unsigned char pad; 128 128 struct iwffff_env_record *record; 129 - } iwffff_env_t; 129 + }; 130 130 131 131 #define IWFFFF_LAYER_FLAG_RETRIGGER 0x0001 /* retrigger */ 132 132 ··· 138 138 #define IWFFFF_LAYER_EVENT_RETRIG 0x0002 /* layer event - retrigger */ 139 139 #define IWFFFF_LAYER_EVENT_LEGATO 0x0003 /* layer event - legato */ 140 140 141 - typedef struct iwffff_layer { 141 + struct iwffff_layer { 142 142 unsigned char flags; 143 143 unsigned char velocity_mode; 144 144 unsigned char layer_event; ··· 147 147 unsigned char pan; /* pan offset from CC1 (0 left - 127 right) */ 148 148 unsigned char pan_freq_scale; /* position based on frequency (0-127) */ 149 149 unsigned char attenuation; /* 0-127 (no corresponding midi controller) */ 150 - iwffff_lfo_t tremolo; /* tremolo effect */ 151 - iwffff_lfo_t vibrato; /* vibrato effect */ 150 + struct iwffff_lfo tremolo; /* tremolo effect */ 151 + struct iwffff_lfo vibrato; /* vibrato effect */ 152 152 unsigned short freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ 153 153 unsigned char freq_center; /* center for keyboard frequency scaling */ 154 154 unsigned char pad; 155 - iwffff_env_t penv; /* pitch envelope */ 156 - iwffff_env_t venv; /* volume envelope */ 155 + struct iwffff_env penv; /* pitch envelope */ 156 + struct iwffff_env venv; /* volume envelope */ 157 157 158 - iwffff_wave_t *wave; 158 + struct iwffff_wave *wave; 159 159 struct iwffff_layer *next; 160 - } iwffff_layer_t; 160 + }; 161 161 162 162 /* 163 163 * Instrument ··· 177 177 #define IWFFFF_EFFECT_CHORUS 2 178 178 #define IWFFFF_EFFECT_ECHO 3 179 179 180 - typedef struct { 180 + struct iwffff_instrument { 181 181 unsigned short exclusion; 182 182 unsigned short layer_type; 183 183 unsigned short exclusion_group; /* 0 - none, 1-65535 */ ··· 187 187 unsigned char effect2; /* effect 2 */ 188 188 unsigned char effect2_depth; /* 0-127 */ 189 189 190 - iwffff_layer_t *layer; /* first layer */ 191 - } iwffff_instrument_t; 190 + struct iwffff_layer *layer; /* first layer */ 191 + }; 192 192 193 193 /* 194 194 * ··· 216 216 * Wavetable definitions 217 217 */ 218 218 219 - typedef struct iwffff_xwave { 219 + struct iwffff_xwave { 220 220 __u32 stype; /* structure type */ 221 221 222 222 __u32 share_id[4]; /* share id - zero = no sharing */ ··· 234 234 __u8 low_note; /* lower frequency range for this waveform */ 235 235 __u8 high_note; /* higher frequency range for this waveform */ 236 236 __u8 pad; 237 - } iwffff_xwave_t; 237 + }; 238 238 239 239 /* 240 240 * Layer 241 241 */ 242 242 243 - typedef struct iwffff_xlfo { 243 + struct iwffff_xlfo { 244 244 __u16 freq; /* (0-2047) 0.01Hz - 21.5Hz */ 245 245 __s16 depth; /* volume +- (0-255) 0.48675dB/step */ 246 246 __s16 sweep; /* 0 - 950 deciseconds */ 247 247 __u8 shape; /* see to ULTRA_IW_LFO_SHAPE_XXXX */ 248 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 252 __u16 offset; 253 253 __u16 rate; 254 - } iwffff_xenv_point_t; 254 + }; 255 255 256 - typedef struct iwffff_xenv_record { 256 + struct iwffff_xenv_record { 257 257 __u32 stype; 258 258 __u16 nattack; 259 259 __u16 nrelease; ··· 264 264 __u8 pad; 265 265 /* points are stored here.. */ 266 266 /* count of points = nattack + nrelease */ 267 - } iwffff_xenv_record_t; 267 + }; 268 268 269 - typedef struct iwffff_xenv { 269 + struct iwffff_xenv { 270 270 __u8 flags; 271 271 __u8 mode; 272 272 __u8 index; 273 273 __u8 pad; 274 - } iwffff_xenv_t; 274 + }; 275 275 276 - typedef struct iwffff_xlayer { 276 + struct iwffff_xlayer { 277 277 __u32 stype; 278 278 __u8 flags; 279 279 __u8 velocity_mode; ··· 283 283 __u8 pan; /* pan offset from CC1 (0 left - 127 right) */ 284 284 __u8 pan_freq_scale; /* position based on frequency (0-127) */ 285 285 __u8 attenuation; /* 0-127 (no corresponding midi controller) */ 286 - iwffff_xlfo_t tremolo; /* tremolo effect */ 287 - iwffff_xlfo_t vibrato; /* vibrato effect */ 286 + struct iwffff_xlfo tremolo; /* tremolo effect */ 287 + struct iwffff_xlfo vibrato; /* vibrato effect */ 288 288 __u16 freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ 289 289 __u8 freq_center; /* center for keyboard frequency scaling */ 290 290 __u8 pad; 291 - iwffff_xenv_t penv; /* pitch envelope */ 292 - iwffff_xenv_t venv; /* volume envelope */ 293 - } iwffff_xlayer_t; 291 + struct iwffff_xenv penv; /* pitch envelope */ 292 + struct iwffff_xenv venv; /* volume envelope */ 293 + }; 294 294 295 295 /* 296 296 * Instrument 297 297 */ 298 298 299 - typedef struct iwffff_xinstrument { 299 + struct iwffff_xinstrument { 300 300 __u32 stype; 301 301 302 302 __u16 exclusion; ··· 307 307 __u8 effect1_depth; /* 0-127 */ 308 308 __u8 effect2; /* effect 2 */ 309 309 __u8 effect2_depth; /* 0-127 */ 310 - } iwffff_xinstrument_t; 310 + }; 311 311 312 312 /* 313 313 * ROM support ··· 316 316 317 317 #define IWFFFF_ROM_HDR_SIZE 512 318 318 319 - typedef struct { 319 + struct iwffff_rom_header { 320 320 __u8 iwave[8]; 321 321 __u8 revision; 322 322 __u8 series_number; ··· 328 328 __u8 copyright[128]; 329 329 __u8 vendor_name[64]; 330 330 __u8 description[128]; 331 - } iwffff_rom_header_t; 331 + }; 332 332 333 333 /* 334 334 * Instrument info ··· 339 339 #define IWFFFF_INFO_LFO_TREMOLO (1<<2) 340 340 #define IWFFFF_INFO_LFO_TREMOLO_SHAPE (1<<3) 341 341 342 - typedef struct iwffff_info { 342 + struct iwffff_info { 343 343 unsigned int format; /* supported format bits */ 344 344 unsigned int effects; /* supported effects (1 << IWFFFF_EFFECT*) */ 345 345 unsigned int lfos; /* LFO effects */ 346 346 unsigned int max8_len; /* maximum 8-bit wave length */ 347 347 unsigned int max16_len; /* maximum 16-bit wave length */ 348 - } iwffff_info_t; 348 + }; 349 349 350 350 #ifdef __KERNEL__ 351 351 352 352 #include "seq_instr.h" 353 353 354 - typedef struct { 354 + struct snd_iwffff_ops { 355 355 void *private_data; 356 - int (*info)(void *private_data, iwffff_info_t *info); 357 - int (*put_sample)(void *private_data, iwffff_wave_t *wave, 356 + int (*info)(void *private_data, struct iwffff_info *info); 357 + int (*put_sample)(void *private_data, struct iwffff_wave *wave, 358 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 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 362 int atomic); 363 - void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); 364 - snd_seq_kinstr_ops_t kops; 365 - } snd_iwffff_ops_t; 363 + void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); 364 + struct snd_seq_kinstr_ops kops; 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 368 void *private_data, 369 - snd_seq_kinstr_ops_t *next); 369 + struct snd_seq_kinstr_ops *next); 370 370 371 371 #endif 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; 372 383 373 384 #endif /* __SOUND_AINSTR_IW_H */
+19 -16
include/sound/ainstr_simple.h
··· 61 61 * instrument info 62 62 */ 63 63 64 - typedef struct simple_instrument_info { 64 + struct simple_instrument_info { 65 65 unsigned int format; /* supported format bits */ 66 66 unsigned int effects; /* supported effects (1 << SIMPLE_EFFECT_*) */ 67 67 unsigned int max8_len; /* maximum 8-bit wave length */ 68 68 unsigned int max16_len; /* maximum 16-bit wave length */ 69 - } simple_instrument_info_t; 69 + }; 70 70 71 71 /* 72 72 * Instrument 73 73 */ 74 74 75 - typedef struct { 75 + struct simple_instrument { 76 76 unsigned int share_id[4]; /* share id - zero = no sharing */ 77 77 unsigned int format; /* wave format */ 78 78 ··· 92 92 unsigned char effect1_depth; /* 0-127 */ 93 93 unsigned char effect2; /* effect 2 */ 94 94 unsigned char effect2_depth; /* 0-127 */ 95 - } simple_instrument_t; 95 + }; 96 96 97 97 /* 98 98 * ··· 112 112 * Instrument 113 113 */ 114 114 115 - typedef struct simple_xinstrument { 115 + struct simple_xinstrument { 116 116 __u32 stype; 117 117 118 118 __u32 share_id[4]; /* share id - zero = no sharing */ ··· 128 128 __u8 effect1_depth; /* 0-127 */ 129 129 __u8 effect2; /* effect 2 */ 130 130 __u8 effect2_depth; /* 0-127 */ 131 - } simple_xinstrument_t; 131 + }; 132 132 133 133 #ifdef __KERNEL__ 134 134 135 135 #include "seq_instr.h" 136 136 137 - typedef struct { 137 + struct snd_simple_ops { 138 138 void *private_data; 139 - int (*info)(void *private_data, simple_instrument_info_t *info); 140 - int (*put_sample)(void *private_data, simple_instrument_t *instr, 139 + int (*info)(void *private_data, struct simple_instrument_info *info); 140 + int (*put_sample)(void *private_data, struct simple_instrument *instr, 141 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 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 145 int atomic); 146 - void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); 147 - snd_seq_kinstr_ops_t kops; 148 - } snd_simple_ops_t; 146 + void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); 147 + struct snd_seq_kinstr_ops kops; 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 151 void *private_data, 152 - snd_seq_kinstr_ops_t *next); 152 + struct snd_seq_kinstr_ops *next); 153 153 154 154 #endif 155 + 156 + /* typedefs for compatibility to user-space */ 157 + typedef struct simple_xinstrument simple_xinstrument_t; 155 158 156 159 #endif /* __SOUND_AINSTR_SIMPLE_H */
+13 -13
sound/core/seq/instr/ainstr_fm.c
··· 30 30 MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support."); 31 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 34 char __user *instr_data, long len, int atomic, int cmd) 35 35 { 36 - fm_instrument_t *ip; 37 - fm_xinstrument_t ix; 36 + struct fm_instrument *ip; 37 + struct fm_xinstrument ix; 38 38 int idx; 39 39 40 40 if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE) ··· 46 46 return -EFAULT; 47 47 if (ix.stype != FM_STRU_INSTR) 48 48 return -EINVAL; 49 - ip = (fm_instrument_t *)KINSTR_DATA(instr); 49 + ip = (struct fm_instrument *)KINSTR_DATA(instr); 50 50 ip->share_id[0] = le32_to_cpu(ix.share_id[0]); 51 51 ip->share_id[1] = le32_to_cpu(ix.share_id[1]); 52 52 ip->share_id[2] = le32_to_cpu(ix.share_id[2]); ··· 72 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 76 char __user *instr_data, long len, int atomic, 77 77 int cmd) 78 78 { 79 - fm_instrument_t *ip; 80 - fm_xinstrument_t ix; 79 + struct fm_instrument *ip; 80 + struct fm_xinstrument ix; 81 81 int idx; 82 82 83 83 if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL) ··· 85 85 if (len < (long)sizeof(ix)) 86 86 return -ENOMEM; 87 87 memset(&ix, 0, sizeof(ix)); 88 - ip = (fm_instrument_t *)KINSTR_DATA(instr); 88 + ip = (struct fm_instrument *)KINSTR_DATA(instr); 89 89 ix.stype = FM_STRU_INSTR; 90 90 ix.share_id[0] = cpu_to_le32(ip->share_id[0]); 91 91 ix.share_id[1] = cpu_to_le32(ip->share_id[1]); ··· 114 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 118 long *size) 119 119 { 120 - *size = sizeof(fm_xinstrument_t); 120 + *size = sizeof(struct fm_xinstrument); 121 121 return 0; 122 122 } 123 123 124 - int snd_seq_fm_init(snd_seq_kinstr_ops_t *ops, 125 - snd_seq_kinstr_ops_t *next) 124 + int snd_seq_fm_init(struct snd_seq_kinstr_ops *ops, 125 + struct snd_seq_kinstr_ops *next) 126 126 { 127 127 memset(ops, 0, sizeof(*ops)); 128 128 // ops->private_data = private_data; 129 - ops->add_len = sizeof(fm_instrument_t); 129 + ops->add_len = sizeof(struct fm_instrument); 130 130 ops->instr_type = SNDRV_SEQ_INSTR_ID_OPL2_3; 131 131 ops->put = snd_seq_fm_put; 132 132 ops->get = snd_seq_fm_get;
+38 -38
sound/core/seq/instr/ainstr_gf1.c
··· 42 42 return format; 43 43 } 44 44 45 - static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops, 46 - gf1_instrument_t *ip, 45 + static int snd_seq_gf1_copy_wave_from_stream(struct snd_gf1_ops *ops, 46 + struct gf1_instrument *ip, 47 47 char __user **data, 48 48 long *len, 49 49 int atomic) 50 50 { 51 - gf1_wave_t *wp, *prev; 52 - gf1_xwave_t xp; 51 + struct gf1_wave *wp, *prev; 52 + struct gf1_xwave xp; 53 53 int err; 54 54 gfp_t gfp_mask; 55 55 unsigned int real_size; ··· 116 116 return 0; 117 117 } 118 118 119 - static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops, 120 - gf1_wave_t *wave, 119 + static void snd_seq_gf1_wave_free(struct snd_gf1_ops *ops, 120 + struct gf1_wave *wave, 121 121 int atomic) 122 122 { 123 123 if (ops->remove_sample) ··· 125 125 kfree(wave); 126 126 } 127 127 128 - static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops, 129 - gf1_instrument_t *ip, 128 + static void snd_seq_gf1_instr_free(struct snd_gf1_ops *ops, 129 + struct gf1_instrument *ip, 130 130 int atomic) 131 131 { 132 - gf1_wave_t *wave; 132 + struct gf1_wave *wave; 133 133 134 134 while ((wave = ip->wave) != NULL) { 135 135 ip->wave = wave->next; ··· 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 141 char __user *instr_data, long len, int atomic, 142 142 int cmd) 143 143 { 144 - snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; 145 - gf1_instrument_t *ip; 146 - gf1_xinstrument_t ix; 144 + struct snd_gf1_ops *ops = private_data; 145 + struct gf1_instrument *ip; 146 + struct gf1_xinstrument ix; 147 147 int err; 148 148 gfp_t gfp_mask; 149 149 ··· 159 159 return -EINVAL; 160 160 instr_data += sizeof(ix); 161 161 len -= sizeof(ix); 162 - ip = (gf1_instrument_t *)KINSTR_DATA(instr); 162 + ip = (struct gf1_instrument *)KINSTR_DATA(instr); 163 163 ip->exclusion = le16_to_cpu(ix.exclusion); 164 164 ip->exclusion_group = le16_to_cpu(ix.exclusion_group); 165 165 ip->effect1 = ix.effect1; ··· 189 189 return 0; 190 190 } 191 191 192 - static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops, 193 - gf1_instrument_t *ip, 192 + static int snd_seq_gf1_copy_wave_to_stream(struct snd_gf1_ops *ops, 193 + struct gf1_instrument *ip, 194 194 char __user **data, 195 195 long *len, 196 196 int atomic) 197 197 { 198 - gf1_wave_t *wp; 199 - gf1_xwave_t xp; 198 + struct gf1_wave *wp; 199 + struct gf1_xwave xp; 200 200 int err; 201 201 unsigned int real_size; 202 202 ··· 251 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 255 char __user *instr_data, long len, int atomic, 256 256 int cmd) 257 257 { 258 - snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; 259 - gf1_instrument_t *ip; 260 - gf1_xinstrument_t ix; 258 + struct snd_gf1_ops *ops = private_data; 259 + struct gf1_instrument *ip; 260 + struct gf1_xinstrument ix; 261 261 262 262 if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL) 263 263 return -EINVAL; 264 264 if (len < (long)sizeof(ix)) 265 265 return -ENOMEM; 266 266 memset(&ix, 0, sizeof(ix)); 267 - ip = (gf1_instrument_t *)KINSTR_DATA(instr); 267 + ip = (struct gf1_instrument *)KINSTR_DATA(instr); 268 268 ix.stype = GF1_STRU_INSTR; 269 269 ix.exclusion = cpu_to_le16(ip->exclusion); 270 270 ix.exclusion_group = cpu_to_le16(ip->exclusion_group); ··· 283 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 287 long *size) 288 288 { 289 289 long result; 290 - gf1_instrument_t *ip; 291 - gf1_wave_t *wp; 290 + struct gf1_instrument *ip; 291 + struct gf1_wave *wp; 292 292 293 293 *size = 0; 294 - ip = (gf1_instrument_t *)KINSTR_DATA(instr); 295 - result = sizeof(gf1_xinstrument_t); 294 + ip = (struct gf1_instrument *)KINSTR_DATA(instr); 295 + result = sizeof(struct gf1_xinstrument); 296 296 for (wp = ip->wave; wp; wp = wp->next) { 297 - result += sizeof(gf1_xwave_t); 297 + result += sizeof(struct gf1_xwave); 298 298 result += wp->size; 299 299 } 300 300 *size = result; ··· 302 302 } 303 303 304 304 static int snd_seq_gf1_remove(void *private_data, 305 - snd_seq_kinstr_t *instr, 305 + struct snd_seq_kinstr *instr, 306 306 int atomic) 307 307 { 308 - snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data; 309 - gf1_instrument_t *ip; 308 + struct snd_gf1_ops *ops = private_data; 309 + struct gf1_instrument *ip; 310 310 311 - ip = (gf1_instrument_t *)KINSTR_DATA(instr); 311 + ip = (struct gf1_instrument *)KINSTR_DATA(instr); 312 312 snd_seq_gf1_instr_free(ops, ip, atomic); 313 313 return 0; 314 314 } 315 315 316 316 static void snd_seq_gf1_notify(void *private_data, 317 - snd_seq_kinstr_t *instr, 317 + struct snd_seq_kinstr *instr, 318 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 322 if (ops->notify) 323 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 327 void *private_data, 328 - snd_seq_kinstr_ops_t *next) 328 + struct snd_seq_kinstr_ops *next) 329 329 { 330 330 memset(ops, 0, sizeof(*ops)); 331 331 ops->private_data = private_data; 332 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 334 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_GUS_PATCH; 335 335 ops->kops.put = snd_seq_gf1_put; 336 336 ops->kops.get = snd_seq_gf1_get;
+73 -73
sound/core/seq/instr/ainstr_iw.c
··· 42 42 return result; 43 43 } 44 44 45 - static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp, 46 - iwffff_xlfo_t *fx) 45 + static void snd_seq_iwffff_copy_lfo_from_stream(struct iwffff_lfo *fp, 46 + struct iwffff_xlfo *fx) 47 47 { 48 48 fp->freq = le16_to_cpu(fx->freq); 49 49 fp->depth = le16_to_cpu(fx->depth); ··· 53 53 } 54 54 55 55 static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype, 56 - iwffff_layer_t *lp, 57 - iwffff_env_t *ep, 58 - iwffff_xenv_t *ex, 56 + struct iwffff_layer *lp, 57 + struct iwffff_env *ep, 58 + struct iwffff_xenv *ex, 59 59 char __user **data, 60 60 long *len, 61 61 gfp_t gfp_mask) 62 62 { 63 63 __u32 stype; 64 - iwffff_env_record_t *rp, *rp_last; 65 - iwffff_xenv_record_t rx; 66 - iwffff_env_point_t *pp; 67 - iwffff_xenv_point_t px; 64 + struct iwffff_env_record *rp, *rp_last; 65 + struct iwffff_xenv_record rx; 66 + struct iwffff_env_point *pp; 67 + struct iwffff_xenv_point px; 68 68 int points_size, idx; 69 69 70 70 ep->flags = ex->flags; ··· 101 101 rp->sustain_rate = le16_to_cpu(rx.sustain_rate); 102 102 rp->release_rate = le16_to_cpu(rx.release_rate); 103 103 rp->hirange = rx.hirange; 104 - pp = (iwffff_env_point_t *)(rp + 1); 104 + pp = (struct iwffff_env_point *)(rp + 1); 105 105 for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) { 106 106 if (copy_from_user(&px, *data, sizeof(px))) 107 107 return -EFAULT; ··· 120 120 return 0; 121 121 } 122 122 123 - static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops, 124 - iwffff_layer_t *lp, 123 + static int snd_seq_iwffff_copy_wave_from_stream(struct snd_iwffff_ops *ops, 124 + struct iwffff_layer *lp, 125 125 char __user **data, 126 126 long *len, 127 127 int atomic) 128 128 { 129 - iwffff_wave_t *wp, *prev; 130 - iwffff_xwave_t xp; 129 + struct iwffff_wave *wp, *prev; 130 + struct iwffff_xwave xp; 131 131 int err; 132 132 gfp_t gfp_mask; 133 133 unsigned int real_size; ··· 186 186 return 0; 187 187 } 188 188 189 - static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops, 190 - iwffff_env_t *env, 189 + static void snd_seq_iwffff_env_free(struct snd_iwffff_ops *ops, 190 + struct iwffff_env *env, 191 191 int atomic) 192 192 { 193 - iwffff_env_record_t *rec; 193 + struct iwffff_env_record *rec; 194 194 195 195 while ((rec = env->record) != NULL) { 196 196 env->record = rec->next; ··· 198 198 } 199 199 } 200 200 201 - static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops, 202 - iwffff_wave_t *wave, 201 + static void snd_seq_iwffff_wave_free(struct snd_iwffff_ops *ops, 202 + struct iwffff_wave *wave, 203 203 int atomic) 204 204 { 205 205 if (ops->remove_sample) ··· 207 207 kfree(wave); 208 208 } 209 209 210 - static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops, 211 - iwffff_instrument_t *ip, 210 + static void snd_seq_iwffff_instr_free(struct snd_iwffff_ops *ops, 211 + struct iwffff_instrument *ip, 212 212 int atomic) 213 213 { 214 - iwffff_layer_t *layer; 215 - iwffff_wave_t *wave; 214 + struct iwffff_layer *layer; 215 + struct iwffff_wave *wave; 216 216 217 217 while ((layer = ip->layer) != NULL) { 218 218 ip->layer = layer->next; ··· 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 230 char __user *instr_data, long len, int atomic, 231 231 int cmd) 232 232 { 233 - snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data; 234 - iwffff_instrument_t *ip; 235 - iwffff_xinstrument_t ix; 236 - iwffff_layer_t *lp, *prev_lp; 237 - iwffff_xlayer_t lx; 233 + struct snd_iwffff_ops *ops = private_data; 234 + struct iwffff_instrument *ip; 235 + struct iwffff_xinstrument ix; 236 + struct iwffff_layer *lp, *prev_lp; 237 + struct iwffff_xlayer lx; 238 238 int err; 239 239 gfp_t gfp_mask; 240 240 ··· 250 250 return -EINVAL; 251 251 instr_data += sizeof(ix); 252 252 len -= sizeof(ix); 253 - ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 253 + ip = (struct iwffff_instrument *)KINSTR_DATA(instr); 254 254 ip->exclusion = le16_to_cpu(ix.exclusion); 255 255 ip->layer_type = le16_to_cpu(ix.layer_type); 256 256 ip->exclusion_group = le16_to_cpu(ix.exclusion_group); ··· 261 261 /* copy layers */ 262 262 prev_lp = NULL; 263 263 while (len > 0) { 264 - if (len < (long)sizeof(iwffff_xlayer_t)) { 264 + if (len < (long)sizeof(struct iwffff_xlayer)) { 265 265 snd_seq_iwffff_instr_free(ops, ip, atomic); 266 266 return -EINVAL; 267 267 } ··· 335 335 return 0; 336 336 } 337 337 338 - static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx, 339 - iwffff_lfo_t *fp) 338 + static void snd_seq_iwffff_copy_lfo_to_stream(struct iwffff_xlfo *fx, 339 + struct iwffff_lfo *fp) 340 340 { 341 341 fx->freq = cpu_to_le16(fp->freq); 342 342 fx->depth = cpu_to_le16(fp->depth); ··· 346 346 } 347 347 348 348 static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype, 349 - iwffff_layer_t *lp, 350 - iwffff_xenv_t *ex, 351 - iwffff_env_t *ep, 349 + struct iwffff_layer *lp, 350 + struct iwffff_xenv *ex, 351 + struct iwffff_env *ep, 352 352 char __user **data, 353 353 long *len) 354 354 { 355 - iwffff_env_record_t *rp; 356 - iwffff_xenv_record_t rx; 357 - iwffff_env_point_t *pp; 358 - iwffff_xenv_point_t px; 355 + struct iwffff_env_record *rp; 356 + struct iwffff_xenv_record rx; 357 + struct iwffff_env_point *pp; 358 + struct iwffff_xenv_point px; 359 359 int points_size, idx; 360 360 361 361 ex->flags = ep->flags; ··· 379 379 points_size = (rp->nattack + rp->nrelease) * 2 * sizeof(__u16); 380 380 if (*len < points_size) 381 381 return -ENOMEM; 382 - pp = (iwffff_env_point_t *)(rp + 1); 382 + pp = (struct iwffff_env_point *)(rp + 1); 383 383 for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) { 384 384 px.offset = cpu_to_le16(pp->offset); 385 385 px.rate = cpu_to_le16(pp->rate); ··· 392 392 return 0; 393 393 } 394 394 395 - static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops, 396 - iwffff_layer_t *lp, 395 + static int snd_seq_iwffff_copy_wave_to_stream(struct snd_iwffff_ops *ops, 396 + struct iwffff_layer *lp, 397 397 char __user **data, 398 398 long *len, 399 399 int atomic) 400 400 { 401 - iwffff_wave_t *wp; 402 - iwffff_xwave_t xp; 401 + struct iwffff_wave *wp; 402 + struct iwffff_xwave xp; 403 403 int err; 404 404 unsigned int real_size; 405 405 ··· 447 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 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; 454 - iwffff_instrument_t *ip; 455 - iwffff_xinstrument_t ix; 456 - iwffff_layer_t *lp; 457 - iwffff_xlayer_t lx; 453 + struct snd_iwffff_ops *ops = private_data; 454 + struct iwffff_instrument *ip; 455 + struct iwffff_xinstrument ix; 456 + struct iwffff_layer *lp; 457 + struct iwffff_xlayer lx; 458 458 char __user *layer_instr_data; 459 459 int err; 460 460 ··· 463 463 if (len < (long)sizeof(ix)) 464 464 return -ENOMEM; 465 465 memset(&ix, 0, sizeof(ix)); 466 - ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 466 + ip = (struct iwffff_instrument *)KINSTR_DATA(instr); 467 467 ix.stype = IWFFFF_STRU_INSTR; 468 468 ix.exclusion = cpu_to_le16(ip->exclusion); 469 469 ix.layer_type = cpu_to_le16(ip->layer_type); ··· 520 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 525 long result = 0; 526 - iwffff_env_record_t *rp; 526 + struct iwffff_env_record *rp; 527 527 528 528 for (rp = ep->record; rp; rp = rp->next) { 529 - result += sizeof(iwffff_xenv_record_t); 529 + result += sizeof(struct iwffff_xenv_record); 530 530 result += (rp->nattack + rp->nrelease) * 2 * sizeof(__u16); 531 531 } 532 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 537 long result = 0; 538 - iwffff_wave_t *wp; 538 + struct iwffff_wave *wp; 539 539 540 540 for (wp = lp->wave; wp; wp = wp->next) { 541 - result += sizeof(iwffff_xwave_t); 541 + result += sizeof(struct iwffff_xwave); 542 542 if (!(wp->format & IWFFFF_WAVE_ROM)) 543 543 result += wp->size; 544 544 } 545 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 549 long *size) 550 550 { 551 551 long result; 552 - iwffff_instrument_t *ip; 553 - iwffff_layer_t *lp; 552 + struct iwffff_instrument *ip; 553 + struct iwffff_layer *lp; 554 554 555 555 *size = 0; 556 - ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 557 - result = sizeof(iwffff_xinstrument_t); 556 + ip = (struct iwffff_instrument *)KINSTR_DATA(instr); 557 + result = sizeof(struct iwffff_xinstrument); 558 558 for (lp = ip->layer; lp; lp = lp->next) { 559 - result += sizeof(iwffff_xlayer_t); 559 + result += sizeof(struct iwffff_xlayer); 560 560 result += snd_seq_iwffff_env_size_in_stream(&lp->penv); 561 561 result += snd_seq_iwffff_env_size_in_stream(&lp->venv); 562 562 result += snd_seq_iwffff_wave_size_in_stream(lp); ··· 566 566 } 567 567 568 568 static int snd_seq_iwffff_remove(void *private_data, 569 - snd_seq_kinstr_t *instr, 569 + struct snd_seq_kinstr *instr, 570 570 int atomic) 571 571 { 572 - snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data; 573 - iwffff_instrument_t *ip; 572 + struct snd_iwffff_ops *ops = private_data; 573 + struct iwffff_instrument *ip; 574 574 575 - ip = (iwffff_instrument_t *)KINSTR_DATA(instr); 575 + ip = (struct iwffff_instrument *)KINSTR_DATA(instr); 576 576 snd_seq_iwffff_instr_free(ops, ip, atomic); 577 577 return 0; 578 578 } 579 579 580 580 static void snd_seq_iwffff_notify(void *private_data, 581 - snd_seq_kinstr_t *instr, 581 + struct snd_seq_kinstr *instr, 582 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 586 if (ops->notify) 587 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 591 void *private_data, 592 - snd_seq_kinstr_ops_t *next) 592 + struct snd_seq_kinstr_ops *next) 593 593 { 594 594 memset(ops, 0, sizeof(*ops)); 595 595 ops->private_data = private_data; 596 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 598 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_INTERWAVE; 599 599 ops->kops.put = snd_seq_iwffff_put; 600 600 ops->kops.get = snd_seq_iwffff_get;
+25 -25
sound/core/seq/instr/ainstr_simple.c
··· 42 42 return result; 43 43 } 44 44 45 - static void snd_seq_simple_instr_free(snd_simple_ops_t *ops, 46 - simple_instrument_t *ip, 45 + static void snd_seq_simple_instr_free(struct snd_simple_ops *ops, 46 + struct simple_instrument *ip, 47 47 int atomic) 48 48 { 49 49 if (ops->remove_sample) 50 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 54 char __user *instr_data, long len, 55 55 int atomic, int cmd) 56 56 { 57 - snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; 58 - simple_instrument_t *ip; 59 - simple_xinstrument_t ix; 57 + struct snd_simple_ops *ops = private_data; 58 + struct simple_instrument *ip; 59 + struct simple_xinstrument ix; 60 60 int err; 61 61 gfp_t gfp_mask; 62 62 unsigned int real_size; ··· 73 73 return -EINVAL; 74 74 instr_data += sizeof(ix); 75 75 len -= sizeof(ix); 76 - ip = (simple_instrument_t *)KINSTR_DATA(instr); 76 + ip = (struct simple_instrument *)KINSTR_DATA(instr); 77 77 ip->share_id[0] = le32_to_cpu(ix.share_id[0]); 78 78 ip->share_id[1] = le32_to_cpu(ix.share_id[1]); 79 79 ip->share_id[2] = le32_to_cpu(ix.share_id[2]); ··· 100 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 104 char __user *instr_data, long len, 105 105 int atomic, int cmd) 106 106 { 107 - snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; 108 - simple_instrument_t *ip; 109 - simple_xinstrument_t ix; 107 + struct snd_simple_ops *ops = private_data; 108 + struct simple_instrument *ip; 109 + struct simple_xinstrument ix; 110 110 int err; 111 111 unsigned int real_size; 112 112 ··· 115 115 if (len < (long)sizeof(ix)) 116 116 return -ENOMEM; 117 117 memset(&ix, 0, sizeof(ix)); 118 - ip = (simple_instrument_t *)KINSTR_DATA(instr); 118 + ip = (struct simple_instrument *)KINSTR_DATA(instr); 119 119 ix.stype = SIMPLE_STRU_INSTR; 120 120 ix.share_id[0] = cpu_to_le32(ip->share_id[0]); 121 121 ix.share_id[1] = cpu_to_le32(ip->share_id[1]); ··· 147 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 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); 156 - *size = sizeof(simple_xinstrument_t) + snd_seq_simple_size(ip->size, ip->format); 155 + ip = (struct simple_instrument *)KINSTR_DATA(instr); 156 + *size = sizeof(struct simple_xinstrument) + snd_seq_simple_size(ip->size, ip->format); 157 157 return 0; 158 158 } 159 159 160 160 static int snd_seq_simple_remove(void *private_data, 161 - snd_seq_kinstr_t *instr, 161 + struct snd_seq_kinstr *instr, 162 162 int atomic) 163 163 { 164 - snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data; 165 - simple_instrument_t *ip; 164 + struct snd_simple_ops *ops = private_data; 165 + struct simple_instrument *ip; 166 166 167 - ip = (simple_instrument_t *)KINSTR_DATA(instr); 167 + ip = (struct simple_instrument *)KINSTR_DATA(instr); 168 168 snd_seq_simple_instr_free(ops, ip, atomic); 169 169 return 0; 170 170 } 171 171 172 172 static void snd_seq_simple_notify(void *private_data, 173 - snd_seq_kinstr_t *instr, 173 + struct snd_seq_kinstr *instr, 174 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 178 if (ops->notify) 179 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 183 void *private_data, 184 - snd_seq_kinstr_ops_t *next) 184 + struct snd_seq_kinstr_ops *next) 185 185 { 186 186 memset(ops, 0, sizeof(*ops)); 187 187 ops->private_data = private_data; 188 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 190 ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_SIMPLE; 191 191 ops->kops.put = snd_seq_simple_put; 192 192 ops->kops.get = snd_seq_simple_get;