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 /include/sound | |
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/sound')
-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 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 */ |