aboutsummaryrefslogtreecommitdiffstats
path: root/include/sound/ymfpci.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/sound/ymfpci.h')
-rw-r--r--include/sound/ymfpci.h109
1 files changed, 54 insertions, 55 deletions
diff --git a/include/sound/ymfpci.h b/include/sound/ymfpci.h
index c3bccbfd8d4c..ec790a9c496f 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -184,7 +184,7 @@
184 * 184 *
185 */ 185 */
186 186
187typedef struct _snd_ymfpci_playback_bank { 187struct snd_ymfpci_playback_bank {
188 u32 format; 188 u32 format;
189 u32 loop_default; 189 u32 loop_default;
190 u32 base; /* 32-bit address */ 190 u32 base; /* 32-bit address */
@@ -215,46 +215,45 @@ typedef struct _snd_ymfpci_playback_bank {
215 u32 eff3_gain; 215 u32 eff3_gain;
216 u32 lpfD1; 216 u32 lpfD1;
217 u32 lpfD2; 217 u32 lpfD2;
218} snd_ymfpci_playback_bank_t; 218 };
219 219
220typedef struct _snd_ymfpci_capture_bank { 220struct snd_ymfpci_capture_bank {
221 u32 base; /* 32-bit address */ 221 u32 base; /* 32-bit address */
222 u32 loop_end; /* 32-bit offset */ 222 u32 loop_end; /* 32-bit offset */
223 u32 start; /* 32-bit offset */ 223 u32 start; /* 32-bit offset */
224 u32 num_of_loops; /* counter */ 224 u32 num_of_loops; /* counter */
225} snd_ymfpci_capture_bank_t; 225};
226 226
227typedef struct _snd_ymfpci_effect_bank { 227struct snd_ymfpci_effect_bank {
228 u32 base; /* 32-bit address */ 228 u32 base; /* 32-bit address */
229 u32 loop_end; /* 32-bit offset */ 229 u32 loop_end; /* 32-bit offset */
230 u32 start; /* 32-bit offset */ 230 u32 start; /* 32-bit offset */
231 u32 temp; 231 u32 temp;
232} snd_ymfpci_effect_bank_t; 232};
233 233
234typedef struct _snd_ymfpci_voice ymfpci_voice_t; 234struct snd_ymfpci_pcm;
235typedef struct _snd_ymfpci_pcm ymfpci_pcm_t; 235struct snd_ymfpci;
236typedef struct _snd_ymfpci ymfpci_t;
237 236
238typedef enum { 237enum snd_ymfpci_voice_type {
239 YMFPCI_PCM, 238 YMFPCI_PCM,
240 YMFPCI_SYNTH, 239 YMFPCI_SYNTH,
241 YMFPCI_MIDI 240 YMFPCI_MIDI
242} ymfpci_voice_type_t; 241};
243 242
244struct _snd_ymfpci_voice { 243struct snd_ymfpci_voice {
245 ymfpci_t *chip; 244 struct snd_ymfpci *chip;
246 int number; 245 int number;
247 unsigned int use: 1, 246 unsigned int use: 1,
248 pcm: 1, 247 pcm: 1,
249 synth: 1, 248 synth: 1,
250 midi: 1; 249 midi: 1;
251 snd_ymfpci_playback_bank_t *bank; 250 struct snd_ymfpci_playback_bank *bank;
252 dma_addr_t bank_addr; 251 dma_addr_t bank_addr;
253 void (*interrupt)(ymfpci_t *chip, ymfpci_voice_t *voice); 252 void (*interrupt)(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice);
254 ymfpci_pcm_t *ypcm; 253 struct snd_ymfpci_pcm *ypcm;
255}; 254};
256 255
257typedef enum { 256enum snd_ymfpci_pcm_type {
258 PLAYBACK_VOICE, 257 PLAYBACK_VOICE,
259 CAPTURE_REC, 258 CAPTURE_REC,
260 CAPTURE_AC97, 259 CAPTURE_AC97,
@@ -263,13 +262,13 @@ typedef enum {
263 EFFECT_EFF1, 262 EFFECT_EFF1,
264 EFFECT_EFF2, 263 EFFECT_EFF2,
265 EFFECT_EFF3 264 EFFECT_EFF3
266} snd_ymfpci_pcm_type_t; 265};
267 266
268struct _snd_ymfpci_pcm { 267struct snd_ymfpci_pcm {
269 ymfpci_t *chip; 268 struct snd_ymfpci *chip;
270 snd_ymfpci_pcm_type_t type; 269 enum snd_ymfpci_pcm_type type;
271 snd_pcm_substream_t *substream; 270 struct snd_pcm_substream *substream;
272 ymfpci_voice_t *voices[2]; /* playback only */ 271 struct snd_ymfpci_voice *voices[2]; /* playback only */
273 unsigned int running: 1; 272 unsigned int running: 1;
274 unsigned int output_front: 1; 273 unsigned int output_front: 1;
275 unsigned int output_rear: 1; 274 unsigned int output_rear: 1;
@@ -282,7 +281,7 @@ struct _snd_ymfpci_pcm {
282 u32 shift; 281 u32 shift;
283}; 282};
284 283
285struct _snd_ymfpci { 284struct snd_ymfpci {
286 int irq; 285 int irq;
287 286
288 unsigned int device_id; /* PCI device ID */ 287 unsigned int device_id; /* PCI device ID */
@@ -316,47 +315,47 @@ struct _snd_ymfpci {
316 struct snd_dma_buffer ac3_tmp_base; 315 struct snd_dma_buffer ac3_tmp_base;
317 316
318 u32 *ctrl_playback; 317 u32 *ctrl_playback;
319 snd_ymfpci_playback_bank_t *bank_playback[YDSXG_PLAYBACK_VOICES][2]; 318 struct snd_ymfpci_playback_bank *bank_playback[YDSXG_PLAYBACK_VOICES][2];
320 snd_ymfpci_capture_bank_t *bank_capture[YDSXG_CAPTURE_VOICES][2]; 319 struct snd_ymfpci_capture_bank *bank_capture[YDSXG_CAPTURE_VOICES][2];
321 snd_ymfpci_effect_bank_t *bank_effect[YDSXG_EFFECT_VOICES][2]; 320 struct snd_ymfpci_effect_bank *bank_effect[YDSXG_EFFECT_VOICES][2];
322 321
323 int start_count; 322 int start_count;
324 323
325 u32 active_bank; 324 u32 active_bank;
326 ymfpci_voice_t voices[64]; 325 struct snd_ymfpci_voice voices[64];
327 326
328 ac97_bus_t *ac97_bus; 327 struct snd_ac97_bus *ac97_bus;
329 ac97_t *ac97; 328 struct snd_ac97 *ac97;
330 snd_rawmidi_t *rawmidi; 329 struct snd_rawmidi *rawmidi;
331 snd_timer_t *timer; 330 struct snd_timer *timer;
332 331
333 struct pci_dev *pci; 332 struct pci_dev *pci;
334 snd_card_t *card; 333 struct snd_card *card;
335 snd_pcm_t *pcm; 334 struct snd_pcm *pcm;
336 snd_pcm_t *pcm2; 335 struct snd_pcm *pcm2;
337 snd_pcm_t *pcm_spdif; 336 struct snd_pcm *pcm_spdif;
338 snd_pcm_t *pcm_4ch; 337 struct snd_pcm *pcm_4ch;
339 snd_pcm_substream_t *capture_substream[YDSXG_CAPTURE_VOICES]; 338 struct snd_pcm_substream *capture_substream[YDSXG_CAPTURE_VOICES];
340 snd_pcm_substream_t *effect_substream[YDSXG_EFFECT_VOICES]; 339 struct snd_pcm_substream *effect_substream[YDSXG_EFFECT_VOICES];
341 snd_kcontrol_t *ctl_vol_recsrc; 340 struct snd_kcontrol *ctl_vol_recsrc;
342 snd_kcontrol_t *ctl_vol_adcrec; 341 struct snd_kcontrol *ctl_vol_adcrec;
343 snd_kcontrol_t *ctl_vol_spdifrec; 342 struct snd_kcontrol *ctl_vol_spdifrec;
344 unsigned short spdif_bits, spdif_pcm_bits; 343 unsigned short spdif_bits, spdif_pcm_bits;
345 snd_kcontrol_t *spdif_pcm_ctl; 344 struct snd_kcontrol *spdif_pcm_ctl;
346 int mode_dup4ch; 345 int mode_dup4ch;
347 int rear_opened; 346 int rear_opened;
348 int spdif_opened; 347 int spdif_opened;
349 struct { 348 struct {
350 u16 left; 349 u16 left;
351 u16 right; 350 u16 right;
352 snd_kcontrol_t *ctl; 351 struct snd_kcontrol *ctl;
353 } pcm_mixer[32]; 352 } pcm_mixer[32];
354 353
355 spinlock_t reg_lock; 354 spinlock_t reg_lock;
356 spinlock_t voice_lock; 355 spinlock_t voice_lock;
357 wait_queue_head_t interrupt_sleep; 356 wait_queue_head_t interrupt_sleep;
358 atomic_t interrupt_sleep_count; 357 atomic_t interrupt_sleep_count;
359 snd_info_entry_t *proc_entry; 358 struct snd_info_entry *proc_entry;
360 359
361#ifdef CONFIG_PM 360#ifdef CONFIG_PM
362 u32 *saved_regs; 361 u32 *saved_regs;
@@ -364,17 +363,17 @@ struct _snd_ymfpci {
364#endif 363#endif
365}; 364};
366 365
367int snd_ymfpci_create(snd_card_t * card, 366int snd_ymfpci_create(struct snd_card *card,
368 struct pci_dev *pci, 367 struct pci_dev *pci,
369 unsigned short old_legacy_ctrl, 368 unsigned short old_legacy_ctrl,
370 ymfpci_t ** rcodec); 369 struct snd_ymfpci ** rcodec);
371void snd_ymfpci_free_gameport(ymfpci_t *chip); 370void snd_ymfpci_free_gameport(struct snd_ymfpci *chip);
372 371
373int snd_ymfpci_pcm(ymfpci_t *chip, int device, snd_pcm_t **rpcm); 372int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
374int snd_ymfpci_pcm2(ymfpci_t *chip, int device, snd_pcm_t **rpcm); 373int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
375int snd_ymfpci_pcm_spdif(ymfpci_t *chip, int device, snd_pcm_t **rpcm); 374int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
376int snd_ymfpci_pcm_4ch(ymfpci_t *chip, int device, snd_pcm_t **rpcm); 375int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
377int snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch); 376int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch);
378int snd_ymfpci_timer(ymfpci_t *chip, int device); 377int snd_ymfpci_timer(struct snd_ymfpci *chip, int device);
379 378
380#endif /* __SOUND_YMFPCI_H */ 379#endif /* __SOUND_YMFPCI_H */