snd_wavefront_mpu_id output_mpu; /* most-recently-used */
snd_wavefront_mpu_id input_mpu; /* most-recently-used */
unsigned int mode[2]; /* MPU401_MODE_XXX */
- snd_rawmidi_substream_t *substream_output[2];
- snd_rawmidi_substream_t *substream_input[2];
+ struct snd_rawmidi_substream *substream_output[2];
+ struct snd_rawmidi_substream *substream_input[2];
struct timer_list timer;
spinlock_t open;
spinlock_t virtual; /* protects isvirtual */
#define MPU_ACK 0xFE
#define UART_MODE_ON 0x3F
-extern snd_rawmidi_ops_t snd_wavefront_midi_output;
-extern snd_rawmidi_ops_t snd_wavefront_midi_input;
+extern struct snd_rawmidi_ops snd_wavefront_midi_output;
+extern struct snd_rawmidi_ops snd_wavefront_midi_input;
extern void snd_wavefront_midi_enable_virtual (snd_wavefront_card_t *);
extern void snd_wavefront_midi_disable_virtual (snd_wavefront_card_t *);
extern int snd_wavefront_cmd (snd_wavefront_t *, int, unsigned char *,
unsigned char *);
-extern int snd_wavefront_synth_ioctl (snd_hwdep_t *,
+extern int snd_wavefront_synth_ioctl (struct snd_hwdep *,
struct file *,
unsigned int cmd,
unsigned long arg);
-extern int snd_wavefront_synth_open (snd_hwdep_t *, struct file *);
-extern int snd_wavefront_synth_release (snd_hwdep_t *, struct file *);
+extern int snd_wavefront_synth_open (struct snd_hwdep *, struct file *);
+extern int snd_wavefront_synth_release (struct snd_hwdep *, struct file *);
/* FX processor - see also yss225.[ch] */
extern int snd_wavefront_fx_start (snd_wavefront_t *);
extern int snd_wavefront_fx_detect (snd_wavefront_t *);
-extern int snd_wavefront_fx_ioctl (snd_hwdep_t *,
+extern int snd_wavefront_fx_ioctl (struct snd_hwdep *,
struct file *,
unsigned int cmd,
unsigned long arg);
-extern int snd_wavefront_fx_open (snd_hwdep_t *, struct file *);
-extern int snd_wavefront_fx_release (snd_hwdep_t *, struct file *);
+extern int snd_wavefront_fx_open (struct snd_hwdep *, struct file *);
+extern int snd_wavefront_fx_release (struct snd_hwdep *, struct file *);
/* prefix in all snd_printk() delivered messages */
module_param_array(use_cs4232_midi, bool, NULL, 0444);
MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)");
-static snd_card_t *snd_wavefront_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
+static struct snd_card *snd_wavefront_legacy[SNDRV_CARDS] = SNDRV_DEFAULT_PTR;
#ifdef CONFIG_PNP
return IRQ_HANDLED;
}
-static snd_hwdep_t * __devinit
-snd_wavefront_new_synth (snd_card_t *card,
+static struct snd_hwdep * __devinit
+snd_wavefront_new_synth (struct snd_card *card,
int hw_dev,
snd_wavefront_card_t *acard)
{
- snd_hwdep_t *wavefront_synth;
+ struct snd_hwdep *wavefront_synth;
if (snd_wavefront_detect (acard) < 0) {
return NULL;
return wavefront_synth;
}
-static snd_hwdep_t * __devinit
-snd_wavefront_new_fx (snd_card_t *card,
+static struct snd_hwdep * __devinit
+snd_wavefront_new_fx (struct snd_card *card,
int hw_dev,
snd_wavefront_card_t *acard,
unsigned long port)
{
- snd_hwdep_t *fx_processor;
+ struct snd_hwdep *fx_processor;
if (snd_wavefront_fx_start (&acard->wavefront)) {
snd_printk ("cannot initialize YSS225 FX processor");
static snd_wavefront_mpu_id internal_id = internal_mpu;
static snd_wavefront_mpu_id external_id = external_mpu;
-static snd_rawmidi_t * __devinit
-snd_wavefront_new_midi (snd_card_t *card,
+static struct snd_rawmidi *__devinit
+snd_wavefront_new_midi (struct snd_card *card,
int midi_dev,
snd_wavefront_card_t *acard,
unsigned long port,
snd_wavefront_mpu_id mpu)
{
- snd_rawmidi_t *rmidi;
+ struct snd_rawmidi *rmidi;
static int first = 1;
if (first) {
}
static void
-snd_wavefront_free(snd_card_t *card)
+snd_wavefront_free(struct snd_card *card)
{
snd_wavefront_card_t *acard = (snd_wavefront_card_t *)card->private_data;
snd_wavefront_probe (int dev, struct pnp_card_link *pcard,
const struct pnp_card_device_id *pid)
{
- snd_card_t *card;
+ struct snd_card *card;
snd_wavefront_card_t *acard;
- cs4231_t *chip;
- snd_hwdep_t *wavefront_synth;
- snd_rawmidi_t *ics2115_internal_rmidi = NULL;
- snd_rawmidi_t *ics2115_external_rmidi = NULL;
- snd_hwdep_t *fx_processor;
+ struct snd_cs4231 *chip;
+ struct snd_hwdep *wavefront_synth;
+ struct snd_rawmidi *ics2115_internal_rmidi = NULL;
+ struct snd_rawmidi *ics2115_external_rmidi = NULL;
+ struct snd_hwdep *fx_processor;
int hw_dev = 0, midi_dev = 0, err;
#ifdef CONFIG_PNP
/* ---------- OPL3 synth --------- */
if (fm_port[dev] > 0 && fm_port[dev] != SNDRV_AUTO_PORT) {
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
if ((err = snd_opl3_create(card,
fm_port[dev],
static void __devexit snd_wavefront_pnp_remove(struct pnp_card_link * pcard)
{
- snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard);
+ struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard);
snd_card_disconnect(card);
snd_card_free_in_thread(card);
}
int
-snd_wavefront_fx_open (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_fx_open (struct snd_hwdep *hw, struct file *file)
{
if (!try_module_get(hw->card->module))
}
int
-snd_wavefront_fx_release (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_fx_release (struct snd_hwdep *hw, struct file *file)
{
module_put(hw->card->module);
}
int
-snd_wavefront_fx_ioctl (snd_hwdep_t *sdev, struct file *file,
+snd_wavefront_fx_ioctl (struct snd_hwdep *sdev, struct file *file,
unsigned int cmd, unsigned long arg)
{
- snd_card_t *card;
+ struct snd_card *card;
snd_wavefront_card_t *acard;
snd_wavefront_t *dev;
wavefront_fx_info r;
}
static snd_wavefront_midi_t *
-get_wavefront_midi (snd_rawmidi_substream_t *substream)
+get_wavefront_midi (struct snd_rawmidi_substream *substream)
{
- snd_card_t *card;
+ struct snd_card *card;
snd_wavefront_card_t *acard;
if (substream == NULL || substream->rmidi == NULL)
}
}
-static int snd_wavefront_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_input_open(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_wavefront_midi_t *midi;
return 0;
}
-static int snd_wavefront_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_output_open(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_wavefront_midi_t *midi;
return 0;
}
-static int snd_wavefront_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_input_close(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_wavefront_midi_t *midi;
return 0;
}
-static int snd_wavefront_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_wavefront_midi_output_close(struct snd_rawmidi_substream *substream)
{
unsigned long flags;
snd_wavefront_midi_t *midi;
return 0;
}
-static void snd_wavefront_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_wavefront_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
{
unsigned long flags;
snd_wavefront_midi_t *midi;
snd_wavefront_midi_output_write(card);
}
-static void snd_wavefront_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_wavefront_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{
unsigned long flags;
snd_wavefront_midi_t *midi;
{
unsigned long flags;
snd_wavefront_midi_t *midi;
- static snd_rawmidi_substream_t *substream = NULL;
+ static struct snd_rawmidi_substream *substream = NULL;
static int mpu = external_mpu;
int max = 128;
unsigned char byte;
return 0;
}
-snd_rawmidi_ops_t snd_wavefront_midi_output =
+struct snd_rawmidi_ops snd_wavefront_midi_output =
{
.open = snd_wavefront_midi_output_open,
.close = snd_wavefront_midi_output_close,
.trigger = snd_wavefront_midi_output_trigger,
};
-snd_rawmidi_ops_t snd_wavefront_midi_input =
+struct snd_rawmidi_ops snd_wavefront_midi_input =
{
.open = snd_wavefront_midi_input_open,
.close = snd_wavefront_midi_input_close,
static int wavefront_delete_sample (snd_wavefront_t *, int sampnum);
static int wavefront_find_free_sample (snd_wavefront_t *);
-typedef struct {
+struct wavefront_command {
int cmd;
char *action;
unsigned int read_cnt;
unsigned int write_cnt;
int need_ack;
-} wavefront_command;
+};
static struct {
int errno;
#define NEEDS_ACK 1
-static wavefront_command wavefront_commands[] = {
+static struct wavefront_command wavefront_commands[] = {
{ WFC_SET_SYNTHVOL, "set synthesizer volume", 0, 1, NEEDS_ACK },
{ WFC_GET_SYNTHVOL, "get synthesizer volume", 1, 0, 0},
{ WFC_SET_NVOICES, "set number of voices", 0, 1, NEEDS_ACK },
return "Unknown WaveFront error";
}
-static wavefront_command *
+static struct wavefront_command *
wavefront_get_command (int cmd)
{
}
}
- return (wavefront_command *) 0;
+ return NULL;
}
static inline int
int ack;
unsigned int i;
int c;
- wavefront_command *wfcmd;
+ struct wavefront_command *wfcmd;
- if ((wfcmd = wavefront_get_command (cmd)) == (wavefront_command *) 0) {
+ if ((wfcmd = wavefront_get_command (cmd)) == NULL) {
snd_printk ("command 0x%x not supported.\n",
cmd);
return 1;
}
int
-snd_wavefront_synth_open (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_synth_open (struct snd_hwdep *hw, struct file *file)
{
if (!try_module_get(hw->card->module))
}
int
-snd_wavefront_synth_release (snd_hwdep_t *hw, struct file *file)
+snd_wavefront_synth_release (struct snd_hwdep *hw, struct file *file)
{
module_put(hw->card->module);
}
int
-snd_wavefront_synth_ioctl (snd_hwdep_t *hw, struct file *file,
+snd_wavefront_synth_ioctl (struct snd_hwdep *hw, struct file *file,
unsigned int cmd, unsigned long arg)
{
- snd_card_t *card;
+ struct snd_card *card;
snd_wavefront_t *dev;
snd_wavefront_card_t *acard;
wavefront_control *wc;
void __user *argp = (void __user *)arg;
int err;
- card = (snd_card_t *) hw->card;
+ card = (struct snd_card *) hw->card;
snd_assert(card != NULL, return -ENODEV);