aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/emu10k1/emumpu401.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/emumpu401.c')
-rw-r--r--sound/pci/emu10k1/emumpu401.c72
1 files changed, 37 insertions, 35 deletions
diff --git a/sound/pci/emu10k1/emumpu401.c b/sound/pci/emu10k1/emumpu401.c
index eb57458a966..d96eb455103 100644
--- a/sound/pci/emu10k1/emumpu401.c
+++ b/sound/pci/emu10k1/emumpu401.c
@@ -28,7 +28,8 @@
#define EMU10K1_MIDI_MODE_INPUT (1<<0)
#define EMU10K1_MIDI_MODE_OUTPUT (1<<1)
-static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int idx)
+static inline unsigned char mpu401_read(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_midi *mpu, int idx)
{
if (emu->audigy)
return (unsigned char)snd_emu10k1_ptr_read(emu, mpu->port + idx, 0);
@@ -36,7 +37,8 @@ static inline unsigned char mpu401_read(emu10k1_t *emu, emu10k1_midi_t *mpu, int
return inb(emu->port + mpu->port + idx);
}
-static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, int idx)
+static inline void mpu401_write(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_midi *mpu, int data, int idx)
{
if (emu->audigy)
snd_emu10k1_ptr_write(emu, mpu->port + idx, 0, data);
@@ -56,7 +58,7 @@ static inline void mpu401_write(emu10k1_t *emu, emu10k1_midi_t *mpu, int data, i
#define MPU401_ENTER_UART 0x3f
#define MPU401_ACK 0xfe
-static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu)
+static void mpu401_clear_rx(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *mpu)
{
int timeout = 100000;
for (; timeout > 0 && mpu401_input_avail(emu, mpu); timeout--)
@@ -71,7 +73,7 @@ static void mpu401_clear_rx(emu10k1_t *emu, emu10k1_midi_t *mpu)
*/
-static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsigned int status)
+static void do_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, unsigned int status)
{
unsigned char byte;
@@ -104,17 +106,17 @@ static void do_emu10k1_midi_interrupt(emu10k1_t *emu, emu10k1_midi_t *midi, unsi
spin_unlock(&midi->output_lock);
}
-static void snd_emu10k1_midi_interrupt(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_midi_interrupt(struct snd_emu10k1 *emu, unsigned int status)
{
do_emu10k1_midi_interrupt(emu, &emu->midi, status);
}
-static void snd_emu10k1_midi_interrupt2(emu10k1_t *emu, unsigned int status)
+static void snd_emu10k1_midi_interrupt2(struct snd_emu10k1 *emu, unsigned int status)
{
do_emu10k1_midi_interrupt(emu, &emu->midi2, status);
}
-static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned char cmd, int ack)
+static void snd_emu10k1_midi_cmd(struct snd_emu10k1 * emu, struct snd_emu10k1_midi *midi, unsigned char cmd, int ack)
{
unsigned long flags;
int timeout, ok;
@@ -146,10 +148,10 @@ static void snd_emu10k1_midi_cmd(emu10k1_t * emu, emu10k1_midi_t *midi, unsigned
mpu401_read_data(emu, midi));
}
-static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_input_open(struct snd_rawmidi_substream *substream)
{
- emu10k1_t *emu;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -167,10 +169,10 @@ static int snd_emu10k1_midi_input_open(snd_rawmidi_substream_t * substream)
return 0;
}
-static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_output_open(struct snd_rawmidi_substream *substream)
{
- emu10k1_t *emu;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -188,10 +190,10 @@ static int snd_emu10k1_midi_output_open(snd_rawmidi_substream_t * substream)
return 0;
}
-static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_input_close(struct snd_rawmidi_substream *substream)
{
- emu10k1_t *emu;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -209,10 +211,10 @@ static int snd_emu10k1_midi_input_close(snd_rawmidi_substream_t * substream)
return 0;
}
-static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream)
+static int snd_emu10k1_midi_output_close(struct snd_rawmidi_substream *substream)
{
- emu10k1_t *emu;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -230,10 +232,10 @@ static int snd_emu10k1_midi_output_close(snd_rawmidi_substream_t * substream)
return 0;
}
-static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_emu10k1_midi_input_trigger(struct snd_rawmidi_substream *substream, int up)
{
- emu10k1_t *emu;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
emu = midi->emu;
snd_assert(emu, return);
@@ -243,10 +245,10 @@ static void snd_emu10k1_midi_input_trigger(snd_rawmidi_substream_t * substream,
snd_emu10k1_intr_disable(emu, midi->rx_enable);
}
-static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream, int up)
+static void snd_emu10k1_midi_output_trigger(struct snd_rawmidi_substream *substream, int up)
{
- emu10k1_t *emu;
- emu10k1_midi_t *midi = (emu10k1_midi_t *)substream->rmidi->private_data;
+ struct snd_emu10k1 *emu;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)substream->rmidi->private_data;
unsigned long flags;
emu = midi->emu;
@@ -283,30 +285,30 @@ static void snd_emu10k1_midi_output_trigger(snd_rawmidi_substream_t * substream,
*/
-static snd_rawmidi_ops_t snd_emu10k1_midi_output =
+static struct snd_rawmidi_ops snd_emu10k1_midi_output =
{
.open = snd_emu10k1_midi_output_open,
.close = snd_emu10k1_midi_output_close,
.trigger = snd_emu10k1_midi_output_trigger,
};
-static snd_rawmidi_ops_t snd_emu10k1_midi_input =
+static struct snd_rawmidi_ops snd_emu10k1_midi_input =
{
.open = snd_emu10k1_midi_input_open,
.close = snd_emu10k1_midi_input_close,
.trigger = snd_emu10k1_midi_input_trigger,
};
-static void snd_emu10k1_midi_free(snd_rawmidi_t *rmidi)
+static void snd_emu10k1_midi_free(struct snd_rawmidi *rmidi)
{
- emu10k1_midi_t *midi = (emu10k1_midi_t *)rmidi->private_data;
+ struct snd_emu10k1_midi *midi = (struct snd_emu10k1_midi *)rmidi->private_data;
midi->interrupt = NULL;
midi->rmidi = NULL;
}
-static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int device, char *name)
+static int __devinit emu10k1_midi_init(struct snd_emu10k1 *emu, struct snd_emu10k1_midi *midi, int device, char *name)
{
- snd_rawmidi_t *rmidi;
+ struct snd_rawmidi *rmidi;
int err;
if ((err = snd_rawmidi_new(emu->card, name, device, 1, 1, &rmidi)) < 0)
@@ -327,9 +329,9 @@ static int __devinit emu10k1_midi_init(emu10k1_t *emu, emu10k1_midi_t *midi, int
return 0;
}
-int __devinit snd_emu10k1_midi(emu10k1_t *emu)
+int __devinit snd_emu10k1_midi(struct snd_emu10k1 *emu)
{
- emu10k1_midi_t *midi = &emu->midi;
+ struct snd_emu10k1_midi *midi = &emu->midi;
int err;
if ((err = emu10k1_midi_init(emu, midi, 0, "EMU10K1 MPU-401 (UART)")) < 0)
@@ -344,9 +346,9 @@ int __devinit snd_emu10k1_midi(emu10k1_t *emu)
return 0;
}
-int __devinit snd_emu10k1_audigy_midi(emu10k1_t *emu)
+int __devinit snd_emu10k1_audigy_midi(struct snd_emu10k1 *emu)
{
- emu10k1_midi_t *midi;
+ struct snd_emu10k1_midi *midi;
int err;
midi = &emu->midi;