[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:
parent
bee1a5be8b
commit
208a1b4cb5
|
@ -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);
|
||||
struct snd_ymfpci ** rcodec);
|
||||
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_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);
|
||||
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 */
|
||||
|
|
|
@ -80,7 +80,7 @@ static struct pci_device_id snd_ymfpci_ids[] = {
|
|||
MODULE_DEVICE_TABLE(pci, snd_ymfpci_ids);
|
||||
|
||||
#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)
|
||||
{
|
||||
struct gameport *gp;
|
||||
|
@ -152,7 +152,7 @@ static int __devinit snd_ymfpci_create_gameport(ymfpci_t *chip, int dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void snd_ymfpci_free_gameport(ymfpci_t *chip)
|
||||
void snd_ymfpci_free_gameport(struct snd_ymfpci *chip)
|
||||
{
|
||||
if (chip->gameport) {
|
||||
struct resource *r = gameport_get_port_data(chip->gameport);
|
||||
|
@ -164,19 +164,19 @@ void snd_ymfpci_free_gameport(ymfpci_t *chip)
|
|||
}
|
||||
}
|
||||
#else
|
||||
static inline int snd_ymfpci_create_gameport(ymfpci_t *chip, int dev, int l, int l2) { return -ENOSYS; }
|
||||
void snd_ymfpci_free_gameport(ymfpci_t *chip) { }
|
||||
static inline int snd_ymfpci_create_gameport(struct snd_ymfpci *chip, int dev, int l, int l2) { return -ENOSYS; }
|
||||
void snd_ymfpci_free_gameport(struct snd_ymfpci *chip) { }
|
||||
#endif /* SUPPORT_JOYSTICK */
|
||||
|
||||
static int __devinit snd_card_ymfpci_probe(struct pci_dev *pci,
|
||||
const struct pci_device_id *pci_id)
|
||||
{
|
||||
static int dev;
|
||||
snd_card_t *card;
|
||||
struct snd_card *card;
|
||||
struct resource *fm_res = NULL;
|
||||
struct resource *mpu_res = NULL;
|
||||
ymfpci_t *chip;
|
||||
opl3_t *opl3;
|
||||
struct snd_ymfpci *chip;
|
||||
struct snd_opl3 *opl3;
|
||||
char *str;
|
||||
int err;
|
||||
u16 legacy_ctrl, legacy_ctrl2, old_legacy_ctrl;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue