diff options
Diffstat (limited to 'include/sound/ainstr_gf1.h')
-rw-r--r-- | include/sound/ainstr_gf1.h | 46 |
1 files changed, 25 insertions, 21 deletions
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 */ |