diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 14:04:44 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 12:17:54 +0100 |
commit | 19ac31e82cc7328c01bf26f824f33c7c38cb6075 (patch) | |
tree | b0ae7c7c335f1199567443342c038251a203b235 /include | |
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>
Diffstat (limited to 'include')
-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 |
4 files changed, 123 insertions, 101 deletions
diff --git a/include/sound/ainstr_fm.h b/include/sound/ainstr_fm.h index 0ec02953815..c4afb1f121f 100644 --- a/include/sound/ainstr_fm.h +++ b/include/sound/ainstr_fm.h @@ -39,13 +39,13 @@ * FM operator */ -typedef struct fm_operator { +struct fm_operator { unsigned char am_vib; unsigned char ksl_level; unsigned char attack_decay; unsigned char sustain_release; unsigned char wave_select; -} fm_operator_t; +}; /* * Instrument @@ -54,11 +54,11 @@ typedef struct fm_operator { #define FM_PATCH_OPL2 0x01 /* OPL2 2 operators FM instrument */ #define FM_PATCH_OPL3 0x02 /* OPL3 4 operators FM instrument */ -typedef struct { +struct fm_instrument { unsigned int share_id[4]; /* share id - zero = no sharing */ unsigned char type; /* instrument type */ - fm_operator_t op[4]; + struct fm_operator op[4]; unsigned char feedback_connection[2]; unsigned char echo_delay; @@ -68,7 +68,7 @@ typedef struct { unsigned char fix_dur; unsigned char modes; unsigned char fix_key; -} fm_instrument_t; +}; /* * @@ -88,25 +88,25 @@ typedef struct { * FM operator */ -typedef struct fm_xoperator { +struct fm_xoperator { __u8 am_vib; __u8 ksl_level; __u8 attack_decay; __u8 sustain_release; __u8 wave_select; -} fm_xoperator_t; +}; /* * Instrument */ -typedef struct fm_xinstrument { +struct fm_xinstrument { __u32 stype; /* structure type */ __u32 share_id[4]; /* share id - zero = no sharing */ __u8 type; /* instrument type */ - fm_xoperator_t op[4]; /* fm operators */ + struct fm_xoperator op[4]; /* fm operators */ __u8 feedback_connection[2]; __u8 echo_delay; @@ -116,15 +116,19 @@ typedef struct fm_xinstrument { __u8 fix_dur; __u8 modes; __u8 fix_key; -} fm_xinstrument_t; +}; #ifdef __KERNEL__ #include "seq_instr.h" -int snd_seq_fm_init(snd_seq_kinstr_ops_t * ops, - snd_seq_kinstr_ops_t * next); +int snd_seq_fm_init(struct snd_seq_kinstr_ops * ops, + struct snd_seq_kinstr_ops * next); #endif +/* typedefs for compatibility to user-space */ +typedef struct fm_xoperator fm_xoperator_t; +typedef struct fm_xinstrument fm_xinstrument_t; + #endif /* __SOUND_AINSTR_FM_H */ diff --git a/include/sound/ainstr_gf1.h b/include/sound/ainstr_gf1.h index ae2ddda6397..47726fe0f46 100644 --- a/include/sound/ainstr_gf1.h +++ b/include/sound/ainstr_gf1.h @@ -52,7 +52,7 @@ * Wavetable definitions */ -typedef struct gf1_wave { +struct gf1_wave { unsigned int share_id[4]; /* share id - zero = no sharing */ unsigned int format; /* wave format */ @@ -88,7 +88,7 @@ typedef struct gf1_wave { unsigned short scale_factor; /* 0-2048 or 0-2 */ struct gf1_wave *next; -} gf1_wave_t; +}; /* * Instrument @@ -103,7 +103,7 @@ typedef struct gf1_wave { #define IWFFFF_EFFECT_CHORUS 2 #define IWFFFF_EFFECT_ECHO 3 -typedef struct { +struct gf1_instrument { unsigned short exclusion; unsigned short exclusion_group; /* 0 - none, 1-65535 */ @@ -112,8 +112,8 @@ typedef struct { unsigned char effect2; /* effect 2 */ unsigned char effect2_depth; /* 0-127 */ - gf1_wave_t *wave; /* first waveform */ -} gf1_instrument_t; + struct gf1_wave *wave; /* first waveform */ +}; /* * @@ -135,7 +135,7 @@ typedef struct { * Wavetable definitions */ -typedef struct gf1_xwave { +struct gf1_xwave { __u32 stype; /* structure type */ __u32 share_id[4]; /* share id - zero = no sharing */ @@ -165,13 +165,13 @@ typedef struct gf1_xwave { __u8 vibrato_depth; __u16 scale_frequency; __u16 scale_factor; /* 0-2048 or 0-2 */ -} gf1_xwave_t; +}; /* * Instrument */ -typedef struct gf1_xinstrument { +struct gf1_xinstrument { __u32 stype; __u16 exclusion; @@ -181,7 +181,7 @@ typedef struct gf1_xinstrument { __u8 effect1_depth; /* 0-127 */ __u8 effect2; /* effect 2 */ __u8 effect2_depth; /* 0-127 */ -} gf1_xinstrument_t; +}; /* * Instrument info @@ -191,35 +191,39 @@ typedef struct gf1_xinstrument { #define GF1_INFO_TREMOLO (1<<1) #define GF1_INFO_VIBRATO (1<<2) -typedef struct gf1_info { +struct gf1_info { unsigned char flags; /* supported wave flags */ unsigned char pad[3]; unsigned int features; /* supported features */ unsigned int max8_len; /* maximum 8-bit wave length */ unsigned int max16_len; /* maximum 16-bit wave length */ -} gf1_info_t; +}; #ifdef __KERNEL__ #include "seq_instr.h" -typedef struct { +struct snd_gf1_ops { void *private_data; - int (*info)(void *private_data, gf1_info_t *info); - int (*put_sample)(void *private_data, gf1_wave_t *wave, + int (*info)(void *private_data, struct gf1_info *info); + int (*put_sample)(void *private_data, struct gf1_wave *wave, char __user *data, long len, int atomic); - int (*get_sample)(void *private_data, gf1_wave_t *wave, + int (*get_sample)(void *private_data, struct gf1_wave *wave, char __user *data, long len, int atomic); - int (*remove_sample)(void *private_data, gf1_wave_t *wave, + int (*remove_sample)(void *private_data, struct gf1_wave *wave, int atomic); - void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); - snd_seq_kinstr_ops_t kops; -} snd_gf1_ops_t; + void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); + struct snd_seq_kinstr_ops kops; +}; -int snd_seq_gf1_init(snd_gf1_ops_t *ops, +int snd_seq_gf1_init(struct snd_gf1_ops *ops, void *private_data, - snd_seq_kinstr_ops_t *next); + struct snd_seq_kinstr_ops *next); #endif +/* typedefs for compatibility to user-space */ +typedef struct gf1_xwave gf1_xwave_t; +typedef struct gf1_xinstrument gf1_xinstrument_t; + #endif /* __SOUND_AINSTR_GF1_H */ diff --git a/include/sound/ainstr_iw.h b/include/sound/ainstr_iw.h index 8adf744926f..251feaf1b38 100644 --- a/include/sound/ainstr_iw.h +++ b/include/sound/ainstr_iw.h @@ -54,7 +54,7 @@ * Wavetable definitions */ -typedef struct iwffff_wave { +struct iwffff_wave { unsigned int share_id[4]; /* share id - zero = no sharing */ unsigned int format; /* wave format */ @@ -76,7 +76,7 @@ typedef struct iwffff_wave { unsigned char pad; struct iwffff_wave *next; -} iwffff_wave_t; +}; /* * Layer @@ -85,13 +85,13 @@ typedef struct iwffff_wave { #define IWFFFF_LFO_SHAPE_TRIANGLE 0 #define IWFFFF_LFO_SHAPE_POSTRIANGLE 1 -typedef struct iwffff_lfo { +struct iwffff_lfo { unsigned short freq; /* (0-2047) 0.01Hz - 21.5Hz */ signed short depth; /* volume +- (0-255) 0.48675dB/step */ signed short sweep; /* 0 - 950 deciseconds */ unsigned char shape; /* see to IWFFFF_LFO_SHAPE_XXXX */ unsigned char delay; /* 0 - 255 deciseconds */ -} iwffff_lfo_t; +}; #define IWFFFF_ENV_FLAG_RETRIGGER 0x0001 /* flag - retrigger */ @@ -102,12 +102,12 @@ typedef struct iwffff_lfo { #define IWFFFF_ENV_INDEX_VELOCITY 0x0001 /* index - velocity */ #define IWFFFF_ENV_INDEX_FREQUENCY 0x0002 /* index - frequency */ -typedef struct iwffff_env_point { +struct iwffff_env_point { unsigned short offset; unsigned short rate; -} iwffff_env_point_t; +}; -typedef struct iwffff_env_record { +struct iwffff_env_record { unsigned short nattack; unsigned short nrelease; unsigned short sustain_offset; @@ -118,15 +118,15 @@ typedef struct iwffff_env_record { struct iwffff_env_record *next; /* points are stored here */ /* count of points = nattack + nrelease */ -} iwffff_env_record_t; +}; -typedef struct iwffff_env { +struct iwffff_env { unsigned char flags; unsigned char mode; unsigned char index; unsigned char pad; struct iwffff_env_record *record; -} iwffff_env_t; +}; #define IWFFFF_LAYER_FLAG_RETRIGGER 0x0001 /* retrigger */ @@ -138,7 +138,7 @@ typedef struct iwffff_env { #define IWFFFF_LAYER_EVENT_RETRIG 0x0002 /* layer event - retrigger */ #define IWFFFF_LAYER_EVENT_LEGATO 0x0003 /* layer event - legato */ -typedef struct iwffff_layer { +struct iwffff_layer { unsigned char flags; unsigned char velocity_mode; unsigned char layer_event; @@ -147,17 +147,17 @@ typedef struct iwffff_layer { unsigned char pan; /* pan offset from CC1 (0 left - 127 right) */ unsigned char pan_freq_scale; /* position based on frequency (0-127) */ unsigned char attenuation; /* 0-127 (no corresponding midi controller) */ - iwffff_lfo_t tremolo; /* tremolo effect */ - iwffff_lfo_t vibrato; /* vibrato effect */ + struct iwffff_lfo tremolo; /* tremolo effect */ + struct iwffff_lfo vibrato; /* vibrato effect */ unsigned short freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ unsigned char freq_center; /* center for keyboard frequency scaling */ unsigned char pad; - iwffff_env_t penv; /* pitch envelope */ - iwffff_env_t venv; /* volume envelope */ + struct iwffff_env penv; /* pitch envelope */ + struct iwffff_env venv; /* volume envelope */ - iwffff_wave_t *wave; + struct iwffff_wave *wave; struct iwffff_layer *next; -} iwffff_layer_t; +}; /* * Instrument @@ -177,7 +177,7 @@ typedef struct iwffff_layer { #define IWFFFF_EFFECT_CHORUS 2 #define IWFFFF_EFFECT_ECHO 3 -typedef struct { +struct iwffff_instrument { unsigned short exclusion; unsigned short layer_type; unsigned short exclusion_group; /* 0 - none, 1-65535 */ @@ -187,8 +187,8 @@ typedef struct { unsigned char effect2; /* effect 2 */ unsigned char effect2_depth; /* 0-127 */ - iwffff_layer_t *layer; /* first layer */ -} iwffff_instrument_t; + struct iwffff_layer *layer; /* first layer */ +}; /* * @@ -216,7 +216,7 @@ typedef struct { * Wavetable definitions */ -typedef struct iwffff_xwave { +struct iwffff_xwave { __u32 stype; /* structure type */ __u32 share_id[4]; /* share id - zero = no sharing */ @@ -234,26 +234,26 @@ typedef struct iwffff_xwave { __u8 low_note; /* lower frequency range for this waveform */ __u8 high_note; /* higher frequency range for this waveform */ __u8 pad; -} iwffff_xwave_t; +}; /* * Layer */ -typedef struct iwffff_xlfo { +struct iwffff_xlfo { __u16 freq; /* (0-2047) 0.01Hz - 21.5Hz */ __s16 depth; /* volume +- (0-255) 0.48675dB/step */ __s16 sweep; /* 0 - 950 deciseconds */ __u8 shape; /* see to ULTRA_IW_LFO_SHAPE_XXXX */ __u8 delay; /* 0 - 255 deciseconds */ -} iwffff_xlfo_t; +}; -typedef struct iwffff_xenv_point { +struct iwffff_xenv_point { __u16 offset; __u16 rate; -} iwffff_xenv_point_t; +}; -typedef struct iwffff_xenv_record { +struct iwffff_xenv_record { __u32 stype; __u16 nattack; __u16 nrelease; @@ -264,16 +264,16 @@ typedef struct iwffff_xenv_record { __u8 pad; /* points are stored here.. */ /* count of points = nattack + nrelease */ -} iwffff_xenv_record_t; +}; -typedef struct iwffff_xenv { +struct iwffff_xenv { __u8 flags; __u8 mode; __u8 index; __u8 pad; -} iwffff_xenv_t; +}; -typedef struct iwffff_xlayer { +struct iwffff_xlayer { __u32 stype; __u8 flags; __u8 velocity_mode; @@ -283,20 +283,20 @@ typedef struct iwffff_xlayer { __u8 pan; /* pan offset from CC1 (0 left - 127 right) */ __u8 pan_freq_scale; /* position based on frequency (0-127) */ __u8 attenuation; /* 0-127 (no corresponding midi controller) */ - iwffff_xlfo_t tremolo; /* tremolo effect */ - iwffff_xlfo_t vibrato; /* vibrato effect */ + struct iwffff_xlfo tremolo; /* tremolo effect */ + struct iwffff_xlfo vibrato; /* vibrato effect */ __u16 freq_scale; /* 0-2048, 1024 is equal to semitone scaling */ __u8 freq_center; /* center for keyboard frequency scaling */ __u8 pad; - iwffff_xenv_t penv; /* pitch envelope */ - iwffff_xenv_t venv; /* volume envelope */ -} iwffff_xlayer_t; + struct iwffff_xenv penv; /* pitch envelope */ + struct iwffff_xenv venv; /* volume envelope */ +}; /* * Instrument */ -typedef struct iwffff_xinstrument { +struct iwffff_xinstrument { __u32 stype; __u16 exclusion; @@ -307,7 +307,7 @@ typedef struct iwffff_xinstrument { __u8 effect1_depth; /* 0-127 */ __u8 effect2; /* effect 2 */ __u8 effect2_depth; /* 0-127 */ -} iwffff_xinstrument_t; +}; /* * ROM support @@ -316,7 +316,7 @@ typedef struct iwffff_xinstrument { #define IWFFFF_ROM_HDR_SIZE 512 -typedef struct { +struct iwffff_rom_header { __u8 iwave[8]; __u8 revision; __u8 series_number; @@ -328,7 +328,7 @@ typedef struct { __u8 copyright[128]; __u8 vendor_name[64]; __u8 description[128]; -} iwffff_rom_header_t; +}; /* * Instrument info @@ -339,35 +339,46 @@ typedef struct { #define IWFFFF_INFO_LFO_TREMOLO (1<<2) #define IWFFFF_INFO_LFO_TREMOLO_SHAPE (1<<3) -typedef struct iwffff_info { +struct iwffff_info { unsigned int format; /* supported format bits */ unsigned int effects; /* supported effects (1 << IWFFFF_EFFECT*) */ unsigned int lfos; /* LFO effects */ unsigned int max8_len; /* maximum 8-bit wave length */ unsigned int max16_len; /* maximum 16-bit wave length */ -} iwffff_info_t; +}; #ifdef __KERNEL__ #include "seq_instr.h" -typedef struct { +struct snd_iwffff_ops { void *private_data; - int (*info)(void *private_data, iwffff_info_t *info); - int (*put_sample)(void *private_data, iwffff_wave_t *wave, + int (*info)(void *private_data, struct iwffff_info *info); + int (*put_sample)(void *private_data, struct iwffff_wave *wave, char __user *data, long len, int atomic); - int (*get_sample)(void *private_data, iwffff_wave_t *wave, + int (*get_sample)(void *private_data, struct iwffff_wave *wave, char __user *data, long len, int atomic); - int (*remove_sample)(void *private_data, iwffff_wave_t *wave, + int (*remove_sample)(void *private_data, struct iwffff_wave *wave, int atomic); - void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); - snd_seq_kinstr_ops_t kops; -} snd_iwffff_ops_t; + void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); + struct snd_seq_kinstr_ops kops; +}; -int snd_seq_iwffff_init(snd_iwffff_ops_t *ops, +int snd_seq_iwffff_init(struct snd_iwffff_ops *ops, void *private_data, - snd_seq_kinstr_ops_t *next); + struct snd_seq_kinstr_ops *next); #endif +/* typedefs for compatibility to user-space */ +typedef struct iwffff_xwave iwffff_xwave_t; +typedef struct iwffff_xlfo iwffff_xlfo_t; +typedef struct iwffff_xenv_point iwffff_xenv_point_t; +typedef struct iwffff_xenv_record iwffff_xenv_record_t; +typedef struct iwffff_xenv iwffff_xenv_t; +typedef struct iwffff_xlayer iwffff_xlayer_t; +typedef struct iwffff_xinstrument iwffff_xinstrument_t; +typedef struct iwffff_rom_header iwffff_rom_header_t; +typedef struct iwffff_info iwffff_info_t; + #endif /* __SOUND_AINSTR_IW_H */ diff --git a/include/sound/ainstr_simple.h b/include/sound/ainstr_simple.h index 40824b4ab23..5eead12e58a 100644 --- a/include/sound/ainstr_simple.h +++ b/include/sound/ainstr_simple.h @@ -61,18 +61,18 @@ * instrument info */ -typedef struct simple_instrument_info { +struct simple_instrument_info { unsigned int format; /* supported format bits */ unsigned int effects; /* supported effects (1 << SIMPLE_EFFECT_*) */ unsigned int max8_len; /* maximum 8-bit wave length */ unsigned int max16_len; /* maximum 16-bit wave length */ -} simple_instrument_info_t; +}; /* * Instrument */ -typedef struct { +struct simple_instrument { unsigned int share_id[4]; /* share id - zero = no sharing */ unsigned int format; /* wave format */ @@ -92,7 +92,7 @@ typedef struct { unsigned char effect1_depth; /* 0-127 */ unsigned char effect2; /* effect 2 */ unsigned char effect2_depth; /* 0-127 */ -} simple_instrument_t; +}; /* * @@ -112,7 +112,7 @@ typedef struct { * Instrument */ -typedef struct simple_xinstrument { +struct simple_xinstrument { __u32 stype; __u32 share_id[4]; /* share id - zero = no sharing */ @@ -128,29 +128,32 @@ typedef struct simple_xinstrument { __u8 effect1_depth; /* 0-127 */ __u8 effect2; /* effect 2 */ __u8 effect2_depth; /* 0-127 */ -} simple_xinstrument_t; +}; #ifdef __KERNEL__ #include "seq_instr.h" -typedef struct { +struct snd_simple_ops { void *private_data; - int (*info)(void *private_data, simple_instrument_info_t *info); - int (*put_sample)(void *private_data, simple_instrument_t *instr, + int (*info)(void *private_data, struct simple_instrument_info *info); + int (*put_sample)(void *private_data, struct simple_instrument *instr, char __user *data, long len, int atomic); - int (*get_sample)(void *private_data, simple_instrument_t *instr, + int (*get_sample)(void *private_data, struct simple_instrument *instr, char __user *data, long len, int atomic); - int (*remove_sample)(void *private_data, simple_instrument_t *instr, + int (*remove_sample)(void *private_data, struct simple_instrument *instr, int atomic); - void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what); - snd_seq_kinstr_ops_t kops; -} snd_simple_ops_t; + void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what); + struct snd_seq_kinstr_ops kops; +}; -int snd_seq_simple_init(snd_simple_ops_t *ops, +int snd_seq_simple_init(struct snd_simple_ops *ops, void *private_data, - snd_seq_kinstr_ops_t *next); + struct snd_seq_kinstr_ops *next); #endif +/* typedefs for compatibility to user-space */ +typedef struct simple_xinstrument simple_xinstrument_t; + #endif /* __SOUND_AINSTR_SIMPLE_H */ |