summaryrefslogtreecommitdiffstats
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 c3bccbfd..ec790a9 100644
--- a/include/sound/ymfpci.h
+++ b/include/sound/ymfpci.h
@@ -184,7 +184,7 @@
*
*/
-typedef struct _snd_ymfpci_playback_bank {
+struct snd_ymfpci_playback_bank {
u32 format;
u32 loop_default;
u32 base; /* 32-bit address */
@@ -215,46 +215,45 @@ typedef struct _snd_ymfpci_playback_bank {
u32 eff3_gain;
u32 lpfD1;
u32 lpfD2;
-} snd_ymfpci_playback_bank_t;
+ };
-typedef struct _snd_ymfpci_capture_bank {
+struct snd_ymfpci_capture_bank {
u32 base; /* 32-bit address */
u32 loop_end; /* 32-bit offset */
u32 start; /* 32-bit offset */
u32 num_of_loops; /* counter */
-} snd_ymfpci_capture_bank_t;
+};
-typedef struct _snd_ymfpci_effect_bank {
+struct snd_ymfpci_effect_bank {
u32 base; /* 32-bit address */
u32 loop_end; /* 32-bit offset */
u32 start; /* 32-bit offset */
u32 temp;
-} snd_ymfpci_effect_bank_t;
+};
-typedef struct _snd_ymfpci_voice ymfpci_voice_t;
-typedef struct _snd_ymfpci_pcm ymfpci_pcm_t;
-typedef struct _snd_ymfpci ymfpci_t;
+struct snd_ymfpci_pcm;
+struct snd_ymfpci;
-typedef enum {
+enum snd_ymfpci_voice_type {
YMFPCI_PCM,
YMFPCI_SYNTH,
YMFPCI_MIDI
-} ymfpci_voice_type_t;
+};
-struct _snd_ymfpci_voice {
- ymfpci_t *chip;
+struct snd_ymfpci_voice {
+ struct snd_ymfpci *chip;
int number;
unsigned int use: 1,
pcm: 1,
synth: 1,
midi: 1;
- snd_ymfpci_playback_bank_t *bank;
+ struct snd_ymfpci_playback_bank *bank;
dma_addr_t bank_addr;
- void (*interrupt)(ymfpci_t *chip, ymfpci_voice_t *voice);
- ymfpci_pcm_t *ypcm;
+ void (*interrupt)(struct snd_ymfpci *chip, struct snd_ymfpci_voice *voice);
+ struct snd_ymfpci_pcm *ypcm;
};
-typedef enum {
+enum snd_ymfpci_pcm_type {
PLAYBACK_VOICE,
CAPTURE_REC,
CAPTURE_AC97,
@@ -263,13 +262,13 @@ typedef enum {
EFFECT_EFF1,
EFFECT_EFF2,
EFFECT_EFF3
-} snd_ymfpci_pcm_type_t;
+};
-struct _snd_ymfpci_pcm {
- ymfpci_t *chip;
- snd_ymfpci_pcm_type_t type;
- snd_pcm_substream_t *substream;
- ymfpci_voice_t *voices[2]; /* playback only */
+struct snd_ymfpci_pcm {
+ struct snd_ymfpci *chip;
+ enum snd_ymfpci_pcm_type type;
+ struct snd_pcm_substream *substream;
+ struct snd_ymfpci_voice *voices[2]; /* playback only */
unsigned int running: 1;
unsigned int output_front: 1;
unsigned int output_rear: 1;
@@ -282,7 +281,7 @@ struct _snd_ymfpci_pcm {
u32 shift;
};
-struct _snd_ymfpci {
+struct snd_ymfpci {
int irq;
unsigned int device_id; /* PCI device ID */
@@ -316,47 +315,47 @@ struct _snd_ymfpci {
struct snd_dma_buffer ac3_tmp_base;
u32 *ctrl_playback;
- snd_ymfpci_playback_bank_t *bank_playback[YDSXG_PLAYBACK_VOICES][2];
- snd_ymfpci_capture_bank_t *bank_capture[YDSXG_CAPTURE_VOICES][2];
- snd_ymfpci_effect_bank_t *bank_effect[YDSXG_EFFECT_VOICES][2];
+ struct snd_ymfpci_playback_bank *bank_playback[YDSXG_PLAYBACK_VOICES][2];
+ struct snd_ymfpci_capture_bank *bank_capture[YDSXG_CAPTURE_VOICES][2];
+ struct snd_ymfpci_effect_bank *bank_effect[YDSXG_EFFECT_VOICES][2];
int start_count;
u32 active_bank;
- ymfpci_voice_t voices[64];
+ struct snd_ymfpci_voice voices[64];
- ac97_bus_t *ac97_bus;
- ac97_t *ac97;
- snd_rawmidi_t *rawmidi;
- snd_timer_t *timer;
+ struct snd_ac97_bus *ac97_bus;
+ struct snd_ac97 *ac97;
+ struct snd_rawmidi *rawmidi;
+ struct snd_timer *timer;
struct pci_dev *pci;
- snd_card_t *card;
- snd_pcm_t *pcm;
- snd_pcm_t *pcm2;
- snd_pcm_t *pcm_spdif;
- snd_pcm_t *pcm_4ch;
- snd_pcm_substream_t *capture_substream[YDSXG_CAPTURE_VOICES];
- snd_pcm_substream_t *effect_substream[YDSXG_EFFECT_VOICES];
- snd_kcontrol_t *ctl_vol_recsrc;
- snd_kcontrol_t *ctl_vol_adcrec;
- snd_kcontrol_t *ctl_vol_spdifrec;
+ struct snd_card *card;
+ struct snd_pcm *pcm;
+ struct snd_pcm *pcm2;
+ struct snd_pcm *pcm_spdif;
+ struct snd_pcm *pcm_4ch;
+ struct snd_pcm_substream *capture_substream[YDSXG_CAPTURE_VOICES];
+ struct snd_pcm_substream *effect_substream[YDSXG_EFFECT_VOICES];
+ struct snd_kcontrol *ctl_vol_recsrc;
+ struct snd_kcontrol *ctl_vol_adcrec;
+ struct snd_kcontrol *ctl_vol_spdifrec;
unsigned short spdif_bits, spdif_pcm_bits;
- snd_kcontrol_t *spdif_pcm_ctl;
+ struct snd_kcontrol *spdif_pcm_ctl;
int mode_dup4ch;
int rear_opened;
int spdif_opened;
struct {
u16 left;
u16 right;
- snd_kcontrol_t *ctl;
+ struct snd_kcontrol *ctl;
} pcm_mixer[32];
spinlock_t reg_lock;
spinlock_t voice_lock;
wait_queue_head_t interrupt_sleep;
atomic_t interrupt_sleep_count;
- snd_info_entry_t *proc_entry;
+ struct snd_info_entry *proc_entry;
#ifdef CONFIG_PM
u32 *saved_regs;
@@ -364,17 +363,17 @@ struct _snd_ymfpci {
#endif
};
-int snd_ymfpci_create(snd_card_t * card,
+int snd_ymfpci_create(struct snd_card *card,
struct pci_dev *pci,
unsigned short old_legacy_ctrl,
- ymfpci_t ** rcodec);
-void snd_ymfpci_free_gameport(ymfpci_t *chip);
-
-int snd_ymfpci_pcm(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_pcm2(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_pcm_spdif(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_pcm_4ch(ymfpci_t *chip, int device, snd_pcm_t **rpcm);
-int snd_ymfpci_mixer(ymfpci_t *chip, int rear_switch);
-int snd_ymfpci_timer(ymfpci_t *chip, int device);
+ struct snd_ymfpci ** rcodec);
+void snd_ymfpci_free_gameport(struct snd_ymfpci *chip);
+
+int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device, struct snd_pcm **rpcm);
+int snd_ymfpci_mixer(struct snd_ymfpci *chip, int rear_switch);
+int snd_ymfpci_timer(struct snd_ymfpci *chip, int device);
#endif /* __SOUND_YMFPCI_H */
OpenPOWER on IntegriCloud