[ALSA] Remove xxx_t typedefs: PCI YMFPCI

Modules: YMFPCI driver

Remove xxx_t typedefs from the PCI YMFPCI driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai 2005-11-17 14:53:41 +01:00 committed by Jaroslav Kysela
parent bee1a5be8b
commit 208a1b4cb5
3 changed files with 297 additions and 294 deletions

View File

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

View File

@ -80,7 +80,7 @@ static struct pci_device_id snd_ymfpci_ids[] = {
MODULE_DEVICE_TABLE(pci, snd_ymfpci_ids); MODULE_DEVICE_TABLE(pci, snd_ymfpci_ids);
#ifdef SUPPORT_JOYSTICK #ifdef SUPPORT_JOYSTICK
static int __devinit snd_ymfpci_create_gameport(ymfpci_t *chip, int dev, static int __devinit snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev,
int legacy_ctrl, int legacy_ctrl2) int legacy_ctrl, int legacy_ctrl2)
{ {
struct gameport *gp; struct gameport *gp;
@ -152,7 +152,7 @@ static int __devinit snd_ymfpci_create_gameport(ymfpci_t *chip, int dev,
return 0; return 0;
} }
void snd_ymfpci_free_gameport(ymfpci_t *chip) void snd_ymfpci_free_gameport(struct snd_ymfpci *chip)
{ {
if (chip->gameport) { if (chip->gameport) {
struct resource *r = gameport_get_port_data(chip->gameport); struct resource *r = gameport_get_port_data(chip->gameport);
@ -164,19 +164,19 @@ void snd_ymfpci_free_gameport(ymfpci_t *chip)
} }
} }
#else #else
static inline int snd_ymfpci_create_gameport(ymfpci_t *chip, int dev, int l, int l2) { return -ENOSYS; } static inline int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, int l, int l2) { return -ENOSYS; }
void snd_ymfpci_free_gameport(ymfpci_t *chip) { } void snd_ymfpci_free_gameport(struct snd_ymfpci *chip) { }
#endif /* SUPPORT_JOYSTICK */ #endif /* SUPPORT_JOYSTICK */
static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci, static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
const struct pci_device_id *pci_id) const struct pci_device_id *pci_id)
{ {
static int dev; static int dev;
snd_card_t *card; struct snd_card *card;
struct resource *fm_res = NULL; struct resource *fm_res = NULL;
struct resource *mpu_res = NULL; struct resource *mpu_res = NULL;
ymfpci_t *chip; struct snd_ymfpci *chip;
opl3_t *opl3; struct snd_opl3 *opl3;
char *str; char *str;
int err; int err;
u16 legacy_ctrl, legacy_ctrl2, old_legacy_ctrl; u16 legacy_ctrl, legacy_ctrl2, old_legacy_ctrl;

File diff suppressed because it is too large Load Diff