summaryrefslogtreecommitdiffstats
path: root/sound/drivers/opl3
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2006-01-19 16:39:33 +0000
committerAnton Altaparmakov <aia21@cantab.net>2006-01-19 16:39:33 +0000
commit944d79559d154c12becde0dab327016cf438f46c (patch)
tree50c101806f4d3b6585222dda060559eb4f3e005a /sound/drivers/opl3
parentd087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (diff)
parent0f36b018b2e314d45af86449f1a97facb1fbe300 (diff)
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'sound/drivers/opl3')
-rw-r--r--sound/drivers/opl3/opl3_drums.c45
-rw-r--r--sound/drivers/opl3/opl3_lib.c90
-rw-r--r--sound/drivers/opl3/opl3_midi.c75
-rw-r--r--sound/drivers/opl3/opl3_oss.c68
-rw-r--r--sound/drivers/opl3/opl3_seq.c65
-rw-r--r--sound/drivers/opl3/opl3_synth.c50
-rw-r--r--sound/drivers/opl3/opl3_voice.h24
7 files changed, 207 insertions, 210 deletions
diff --git a/sound/drivers/opl3/opl3_drums.c b/sound/drivers/opl3/opl3_drums.c
index f26332680c1..73694380734 100644
--- a/sound/drivers/opl3/opl3_drums.c
+++ b/sound/drivers/opl3/opl3_drums.c
@@ -45,7 +45,7 @@ static char snd_opl3_drum_table[47] =
OPL3_CYMBAL_ON, OPL3_CYMBAL_ON /* 80 - 81 */
};
-typedef struct snd_opl3_drum_voice {
+struct snd_opl3_drum_voice {
int voice;
int op;
unsigned char am_vib;
@@ -54,33 +54,34 @@ typedef struct snd_opl3_drum_voice {
unsigned char sustain_release;
unsigned char feedback_connection;
unsigned char wave_select;
-} snd_opl3_drum_voice_t;
+};
-typedef struct snd_opl3_drum_note {
+struct snd_opl3_drum_note {
int voice;
unsigned char fnum;
unsigned char octave_f;
unsigned char feedback_connection;
-} snd_opl3_drum_note_t;
+};
-static snd_opl3_drum_voice_t bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00};
-static snd_opl3_drum_voice_t bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00};
-static snd_opl3_drum_note_t bass_note = {6, 0x90, 0x09};
+static struct snd_opl3_drum_voice bass_op0 = {6, 0, 0x00, 0x32, 0xf8, 0x66, 0x30, 0x00};
+static struct snd_opl3_drum_voice bass_op1 = {6, 1, 0x00, 0x03, 0xf6, 0x57, 0x30, 0x00};
+static struct snd_opl3_drum_note bass_note = {6, 0x90, 0x09};
-static snd_opl3_drum_voice_t hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00};
+static struct snd_opl3_drum_voice hihat = {7, 0, 0x00, 0x03, 0xf0, 0x06, 0x20, 0x00};
-static snd_opl3_drum_voice_t snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02};
-static snd_opl3_drum_note_t snare_note = {7, 0xf4, 0x0d};
+static struct snd_opl3_drum_voice snare = {7, 1, 0x00, 0x03, 0xf0, 0x07, 0x20, 0x02};
+static struct snd_opl3_drum_note snare_note = {7, 0xf4, 0x0d};
-static snd_opl3_drum_voice_t tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00};
-static snd_opl3_drum_note_t tomtom_note = {8, 0xf4, 0x09};
+static struct snd_opl3_drum_voice tomtom = {8, 0, 0x02, 0x03, 0xf0, 0x06, 0x10, 0x00};
+static struct snd_opl3_drum_note tomtom_note = {8, 0xf4, 0x09};
-static snd_opl3_drum_voice_t cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00};
+static struct snd_opl3_drum_voice cymbal = {8, 1, 0x04, 0x03, 0xf0, 0x06, 0x10, 0x00};
/*
* set drum voice characteristics
*/
-static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
+static void snd_opl3_drum_voice_set(struct snd_opl3 *opl3,
+ struct snd_opl3_drum_voice *data)
{
unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
unsigned char voice_offset = data->voice;
@@ -114,7 +115,8 @@ static void snd_opl3_drum_voice_set(opl3_t *opl3, snd_opl3_drum_voice_t *data)
/*
* Set drum voice pitch
*/
-static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
+static void snd_opl3_drum_note_set(struct snd_opl3 *opl3,
+ struct snd_opl3_drum_note *data)
{
unsigned char voice_offset = data->voice;
unsigned short opl3_reg;
@@ -131,8 +133,9 @@ static void snd_opl3_drum_note_set(opl3_t *opl3, snd_opl3_drum_note_t *data)
/*
* Set drum voice volume and position
*/
-static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data,
- int vel, snd_midi_channel_t *chan)
+static void snd_opl3_drum_vol_set(struct snd_opl3 *opl3,
+ struct snd_opl3_drum_voice *data,
+ int vel, struct snd_midi_channel *chan)
{
unsigned char op_offset = snd_opl3_regmap[data->voice][data->op];
unsigned char voice_offset = data->voice;
@@ -159,7 +162,7 @@ static void snd_opl3_drum_vol_set(opl3_t *opl3, snd_opl3_drum_voice_t *data,
/*
* Loads drum voices at init time
*/
-void snd_opl3_load_drums(opl3_t *opl3)
+void snd_opl3_load_drums(struct snd_opl3 *opl3)
{
snd_opl3_drum_voice_set(opl3, &bass_op0);
snd_opl3_drum_voice_set(opl3, &bass_op1);
@@ -179,11 +182,11 @@ void snd_opl3_load_drums(opl3_t *opl3)
/*
* Switch drum voice on or off
*/
-void snd_opl3_drum_switch(opl3_t *opl3, int note, int vel, int on_off,
- snd_midi_channel_t *chan)
+void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int vel, int on_off,
+ struct snd_midi_channel *chan)
{
unsigned char drum_mask;
- snd_opl3_drum_voice_t *drum_voice;
+ struct snd_opl3_drum_voice *drum_voice;
if (!(opl3->drum_reg & OPL3_PERCUSSION_ENABLE))
return;
diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index 06246503083..1e0c76b9acf 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -37,7 +37,7 @@ MODULE_LICENSE("GPL");
extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
-static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
+static void snd_opl2_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
{
unsigned long flags;
unsigned long port;
@@ -60,7 +60,7 @@ static void snd_opl2_command(opl3_t * opl3, unsigned short cmd, unsigned char va
spin_unlock_irqrestore(&opl3->reg_lock, flags);
}
-static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char val)
+static void snd_opl3_command(struct snd_opl3 * opl3, unsigned short cmd, unsigned char val)
{
unsigned long flags;
unsigned long port;
@@ -85,7 +85,7 @@ static void snd_opl3_command(opl3_t * opl3, unsigned short cmd, unsigned char va
spin_unlock_irqrestore(&opl3->reg_lock, flags);
}
-static int snd_opl3_detect(opl3_t * opl3)
+static int snd_opl3_detect(struct snd_opl3 * opl3)
{
/*
* This function returns 1 if the FM chip is present at the given I/O port
@@ -153,12 +153,12 @@ static int snd_opl3_detect(opl3_t * opl3)
* Timer 1 - 80us
*/
-static int snd_opl3_timer1_start(snd_timer_t * timer)
+static int snd_opl3_timer1_start(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
unsigned int ticks;
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = snd_timer_chip(timer);
spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -171,11 +171,11 @@ static int snd_opl3_timer1_start(snd_timer_t * timer)
return 0;
}
-static int snd_opl3_timer1_stop(snd_timer_t * timer)
+static int snd_opl3_timer1_stop(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = snd_timer_chip(timer);
spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -190,12 +190,12 @@ static int snd_opl3_timer1_stop(snd_timer_t * timer)
* Timer 2 - 320us
*/
-static int snd_opl3_timer2_start(snd_timer_t * timer)
+static int snd_opl3_timer2_start(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
unsigned int ticks;
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = snd_timer_chip(timer);
spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -208,11 +208,11 @@ static int snd_opl3_timer2_start(snd_timer_t * timer)
return 0;
}
-static int snd_opl3_timer2_stop(snd_timer_t * timer)
+static int snd_opl3_timer2_stop(struct snd_timer * timer)
{
unsigned long flags;
unsigned char tmp;
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = snd_timer_chip(timer);
spin_lock_irqsave(&opl3->timer_lock, flags);
@@ -227,7 +227,7 @@ static int snd_opl3_timer2_stop(snd_timer_t * timer)
*/
-static struct _snd_timer_hardware snd_opl3_timer1 =
+static struct snd_timer_hardware snd_opl3_timer1 =
{
.flags = SNDRV_TIMER_HW_STOP,
.resolution = 80000,
@@ -236,7 +236,7 @@ static struct _snd_timer_hardware snd_opl3_timer1 =
.stop = snd_opl3_timer1_stop,
};
-static struct _snd_timer_hardware snd_opl3_timer2 =
+static struct snd_timer_hardware snd_opl3_timer2 =
{
.flags = SNDRV_TIMER_HW_STOP,
.resolution = 320000,
@@ -245,10 +245,10 @@ static struct _snd_timer_hardware snd_opl3_timer2 =
.stop = snd_opl3_timer2_stop,
};
-static int snd_opl3_timer1_init(opl3_t * opl3, int timer_no)
+static int snd_opl3_timer1_init(struct snd_opl3 * opl3, int timer_no)
{
- snd_timer_t *timer = NULL;
- snd_timer_id_t tid;
+ struct snd_timer *timer = NULL;
+ struct snd_timer_id tid;
int err;
tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -265,10 +265,10 @@ static int snd_opl3_timer1_init(opl3_t * opl3, int timer_no)
return err;
}
-static int snd_opl3_timer2_init(opl3_t * opl3, int timer_no)
+static int snd_opl3_timer2_init(struct snd_opl3 * opl3, int timer_no)
{
- snd_timer_t *timer = NULL;
- snd_timer_id_t tid;
+ struct snd_timer *timer = NULL;
+ struct snd_timer_id tid;
int err;
tid.dev_class = SNDRV_TIMER_CLASS_CARD;
@@ -289,11 +289,11 @@ static int snd_opl3_timer2_init(opl3_t * opl3, int timer_no)
*/
-void snd_opl3_interrupt(snd_hwdep_t * hw)
+void snd_opl3_interrupt(struct snd_hwdep * hw)
{
unsigned char status;
- opl3_t *opl3;
- snd_timer_t *timer;
+ struct snd_opl3 *opl3;
+ struct snd_timer *timer;
if (hw == NULL)
return;
@@ -320,7 +320,7 @@ void snd_opl3_interrupt(snd_hwdep_t * hw)
*/
-static int snd_opl3_free(opl3_t *opl3)
+static int snd_opl3_free(struct snd_opl3 *opl3)
{
snd_assert(opl3 != NULL, return -ENXIO);
if (opl3->private_free)
@@ -331,26 +331,28 @@ static int snd_opl3_free(opl3_t *opl3)
return 0;
}
-static int snd_opl3_dev_free(snd_device_t *device)
+static int snd_opl3_dev_free(struct snd_device *device)
{
- opl3_t *opl3 = device->device_data;
+ struct snd_opl3 *opl3 = device->device_data;
return snd_opl3_free(opl3);
}
-int snd_opl3_new(snd_card_t *card,
+int snd_opl3_new(struct snd_card *card,
unsigned short hardware,
- opl3_t **ropl3)
+ struct snd_opl3 **ropl3)
{
- static snd_device_ops_t ops = {
+ static struct snd_device_ops ops = {
.dev_free = snd_opl3_dev_free,
};
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
int err;
*ropl3 = NULL;
opl3 = kzalloc(sizeof(*opl3), GFP_KERNEL);
- if (opl3 == NULL)
+ if (opl3 == NULL) {
+ snd_printk(KERN_ERR "opl3: cannot allocate\n");
return -ENOMEM;
+ }
opl3->card = card;
opl3->hardware = hardware;
@@ -367,7 +369,7 @@ int snd_opl3_new(snd_card_t *card,
return 0;
}
-int snd_opl3_init(opl3_t *opl3)
+int snd_opl3_init(struct snd_opl3 *opl3)
{
if (! opl3->command) {
printk(KERN_ERR "snd_opl3_init: command not defined!\n");
@@ -391,14 +393,14 @@ int snd_opl3_init(opl3_t *opl3)
return 0;
}
-int snd_opl3_create(snd_card_t * card,
+int snd_opl3_create(struct snd_card *card,
unsigned long l_port,
unsigned long r_port,
unsigned short hardware,
int integrated,
- opl3_t ** ropl3)
+ struct snd_opl3 ** ropl3)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
int err;
*ropl3 = NULL;
@@ -407,13 +409,13 @@ int snd_opl3_create(snd_card_t * card,
if (! integrated) {
if ((opl3->res_l_port = request_region(l_port, 2, "OPL2/3 (left)")) == NULL) {
snd_printk(KERN_ERR "opl3: can't grab left port 0x%lx\n", l_port);
- snd_opl3_free(opl3);
+ snd_device_free(card, opl3);
return -EBUSY;
}
if (r_port != 0 &&
(opl3->res_r_port = request_region(r_port, 2, "OPL2/3 (right)")) == NULL) {
snd_printk(KERN_ERR "opl3: can't grab right port 0x%lx\n", r_port);
- snd_opl3_free(opl3);
+ snd_device_free(card, opl3);
return -EBUSY;
}
}
@@ -432,7 +434,7 @@ int snd_opl3_create(snd_card_t * card,
if ((err = snd_opl3_detect(opl3)) < 0) {
snd_printd("OPL2/3 chip not detected at 0x%lx/0x%lx\n",
opl3->l_port, opl3->r_port);
- snd_opl3_free(opl3);
+ snd_device_free(card, opl3);
return err;
}
/* detect routine returns correct hardware type */
@@ -449,7 +451,7 @@ int snd_opl3_create(snd_card_t * card,
return 0;
}
-int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev)
+int snd_opl3_timer_new(struct snd_opl3 * opl3, int timer1_dev, int timer2_dev)
{
int err;
@@ -466,12 +468,12 @@ int snd_opl3_timer_new(opl3_t * opl3, int timer1_dev, int timer2_dev)
return 0;
}
-int snd_opl3_hwdep_new(opl3_t * opl3,
+int snd_opl3_hwdep_new(struct snd_opl3 * opl3,
int device, int seq_device,
- snd_hwdep_t ** rhwdep)
+ struct snd_hwdep ** rhwdep)
{
- snd_hwdep_t *hw;
- snd_card_t *card = opl3->card;
+ struct snd_hwdep *hw;
+ struct snd_card *card = opl3->card;
int err;
if (rhwdep)
@@ -514,9 +516,9 @@ int snd_opl3_hwdep_new(opl3_t * opl3,
opl3->seq_dev_num = seq_device;
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
if (snd_seq_device_new(card, seq_device, SNDRV_SEQ_DEV_ID_OPL3,
- sizeof(opl3_t*), &opl3->seq_dev) >= 0) {
+ sizeof(struct snd_opl3 *), &opl3->seq_dev) >= 0) {
strcpy(opl3->seq_dev->name, hw->name);
- *(opl3_t**)SNDRV_SEQ_DEVICE_ARGPTR(opl3->seq_dev) = opl3;
+ *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(opl3->seq_dev) = opl3;
}
#endif
if (rhwdep)
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c
index 93d674070b7..1b6f227af37 100644
--- a/sound/drivers/opl3/opl3_midi.c
+++ b/sound/drivers/opl3/opl3_midi.c
@@ -60,7 +60,7 @@ static char opl3_volume_table[128] =
};
void snd_opl3_calc_volume(unsigned char *volbyte, int vel,
- snd_midi_channel_t *chan)
+ struct snd_midi_channel *chan)
{
int oldvol, newvol, n;
int volume;
@@ -93,7 +93,7 @@ static short opl3_note_table[16] =
};
static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum,
- int note, snd_midi_channel_t *chan)
+ int note, struct snd_midi_channel *chan)
{
int block = ((note / 12) & 0x07) - 1;
int idx = (note % 12) + 2;
@@ -121,7 +121,7 @@ static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum,
#ifdef DEBUG_ALLOC
-static void debug_alloc(opl3_t *opl3, char *s, int voice) {
+static void debug_alloc(struct snd_opl3 *opl3, char *s, int voice) {
int i;
char *str = "x.24";
@@ -135,12 +135,12 @@ static void debug_alloc(opl3_t *opl3, char *s, int voice) {
/*
* Get a FM voice (channel) to play a note on.
*/
-static int opl3_get_voice(opl3_t *opl3, int instr_4op,
- snd_midi_channel_t *chan) {
+static int opl3_get_voice(struct snd_opl3 *opl3, int instr_4op,
+ struct snd_midi_channel *chan) {
int chan_4op_1; /* first voice for 4op instrument */
int chan_4op_2; /* second voice for 4op instrument */
- snd_opl3_voice_t *vp, *vp2;
+ struct snd_opl3_voice *vp, *vp2;
unsigned int voice_time;
int i;
@@ -237,13 +237,14 @@ static int opl3_get_voice(opl3_t *opl3, int instr_4op,
void snd_opl3_timer_func(unsigned long data)
{
- opl3_t *opl3 = (opl3_t *)data;
+ struct snd_opl3 *opl3 = (struct snd_opl3 *)data;
+ unsigned long flags;
int again = 0;
int i;
- spin_lock(&opl3->sys_timer_lock);
+ spin_lock_irqsave(&opl3->sys_timer_lock, flags);
for (i = 0; i < opl3->max_voices; i++) {
- snd_opl3_voice_t *vp = &opl3->voices[i];
+ struct snd_opl3_voice *vp = &opl3->voices[i];
if (vp->state > 0 && vp->note_off_check) {
if (vp->note_off == jiffies)
snd_opl3_note_off(opl3, vp->note, 0, vp->chan);
@@ -257,13 +258,13 @@ void snd_opl3_timer_func(unsigned long data)
} else {
opl3->sys_timer_status = 0;
}
- spin_unlock(&opl3->sys_timer_lock);
+ spin_unlock_irqrestore(&opl3->sys_timer_lock, flags);
}
/*
* Start system timer
*/
-static void snd_opl3_start_timer(opl3_t *opl3)
+static void snd_opl3_start_timer(struct snd_opl3 *opl3)
{
unsigned long flags;
spin_lock_irqsave(&opl3->sys_timer_lock, flags);
@@ -285,15 +286,15 @@ static int snd_opl3_oss_map[MAX_OPL3_VOICES] = {
/*
* Start a note.
*/
-void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan)
{
- opl3_t *opl3;
- snd_seq_instr_t wanted;
- snd_seq_kinstr_t *kinstr;
+ struct snd_opl3 *opl3;
+ struct snd_seq_instr wanted;
+ struct snd_seq_kinstr *kinstr;
int instr_4op;
int voice;
- snd_opl3_voice_t *vp, *vp2;
+ struct snd_opl3_voice *vp, *vp2;
unsigned short connect_mask;
unsigned char connection;
unsigned char vol_op[4];
@@ -310,7 +311,7 @@ void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
unsigned char fnum, blocknum;
int i;
- fm_instrument_t *fm;
+ struct fm_instrument *fm;
unsigned long flags;
opl3 = p;
@@ -615,13 +616,13 @@ void snd_opl3_note_on(void *p, int note, int vel, snd_midi_channel_t *chan)
spin_unlock_irqrestore(&opl3->voice_lock, flags);
}
-static void snd_opl3_kill_voice(opl3_t *opl3, int voice)
+static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
{
unsigned short reg_side;
unsigned char voice_offset;
unsigned short opl3_reg;
- snd_opl3_voice_t *vp, *vp2;
+ struct snd_opl3_voice *vp, *vp2;
snd_assert(voice < MAX_OPL3_VOICES, return);
@@ -663,12 +664,12 @@ static void snd_opl3_kill_voice(opl3_t *opl3, int voice)
/*
* Release a note in response to a midi note off.
*/
-void snd_opl3_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
int voice;
- snd_opl3_voice_t *vp;
+ struct snd_opl3_voice *vp;
unsigned long flags;
@@ -708,9 +709,9 @@ void snd_opl3_note_off(void *p, int note, int vel, snd_midi_channel_t *chan)
/*
* key pressure change
*/
-void snd_opl3_key_press(void *p, int note, int vel, snd_midi_channel_t *chan)
+void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = p;
#ifdef DEBUG_MIDI
@@ -722,9 +723,9 @@ void snd_opl3_key_press(void *p, int note, int vel, snd_midi_channel_t *chan)
/*
* terminate note
*/
-void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan)
+void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = p;
#ifdef DEBUG_MIDI
@@ -733,7 +734,7 @@ void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan)
#endif
}
-static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
+static void snd_opl3_update_pitch(struct snd_opl3 *opl3, int voice)
{
unsigned short reg_side;
unsigned char voice_offset;
@@ -741,7 +742,7 @@ static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
unsigned char fnum, blocknum;
- snd_opl3_voice_t *vp;
+ struct snd_opl3_voice *vp;
snd_assert(voice < MAX_OPL3_VOICES, return);
@@ -780,10 +781,10 @@ static void snd_opl3_update_pitch(opl3_t *opl3, int voice)
/*
* Update voice pitch controller
*/
-static void snd_opl3_pitch_ctrl(opl3_t *opl3, snd_midi_channel_t *chan)
+static void snd_opl3_pitch_ctrl(struct snd_opl3 *opl3, struct snd_midi_channel *chan)
{
int voice;
- snd_opl3_voice_t *vp;
+ struct snd_opl3_voice *vp;
unsigned long flags;
@@ -810,9 +811,9 @@ static void snd_opl3_pitch_ctrl(opl3_t *opl3, snd_midi_channel_t *chan)
* Deal with a controler type event. This includes all types of
* control events, not just the midi controllers
*/
-void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan)
+void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = p;
#ifdef DEBUG_MIDI
@@ -846,10 +847,10 @@ void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan)
/*
* NRPN events
*/
-void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan,
- snd_midi_channel_set_t *chset)
+void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan,
+ struct snd_midi_channel_set *chset)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = p;
#ifdef DEBUG_MIDI
@@ -862,9 +863,9 @@ void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan,
* receive sysex
*/
void snd_opl3_sysex(void *p, unsigned char *buf, int len,
- int parsed, snd_midi_channel_set_t *chset)
+ int parsed, struct snd_midi_channel_set *chset)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
opl3 = p;
#ifdef DEBUG_MIDI
diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c
index 21a2b409d6d..31f1f2e25aa 100644
--- a/sound/drivers/opl3/opl3_oss.c
+++ b/sound/drivers/opl3/opl3_oss.c
@@ -21,11 +21,11 @@
#include "opl3_voice.h"
#include <linux/slab.h>
-static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure);
-static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg);
-static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd, unsigned long ioarg);
-static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format, const char __user *buf, int offs, int count);
-static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg);
+static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure);
+static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg);
+static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd, unsigned long ioarg);
+static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format, const char __user *buf, int offs, int count);
+static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg);
/* */
@@ -43,9 +43,9 @@ static inline void snd_leave_user(mm_segment_t fs)
/* operators */
-extern snd_midi_op_t opl3_ops;
+extern struct snd_midi_op opl3_ops;
-static snd_seq_oss_callback_t oss_callback = {
+static struct snd_seq_oss_callback oss_callback = {
.owner = THIS_MODULE,
.open = snd_opl3_open_seq_oss,
.close = snd_opl3_close_seq_oss,
@@ -54,10 +54,10 @@ static snd_seq_oss_callback_t oss_callback = {
.reset = snd_opl3_reset_seq_oss,
};
-static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct,
+static int snd_opl3_oss_event_input(struct snd_seq_event *ev, int direct,
void *private_data, int atomic, int hop)
{
- opl3_t *opl3 = private_data;
+ struct snd_opl3 *opl3 = private_data;
if (ev->type != SNDRV_SEQ_EVENT_OSS)
snd_midi_process_event(&opl3_ops, ev, opl3->oss_chset);
@@ -68,14 +68,14 @@ static int snd_opl3_oss_event_input(snd_seq_event_t *ev, int direct,
static void snd_opl3_oss_free_port(void *private_data)
{
- opl3_t *opl3 = private_data;
+ struct snd_opl3 *opl3 = private_data;
snd_midi_channel_free_set(opl3->oss_chset);
}
-static int snd_opl3_oss_create_port(opl3_t * opl3)
+static int snd_opl3_oss_create_port(struct snd_opl3 * opl3)
{
- snd_seq_port_callback_t callbacks;
+ struct snd_seq_port_callback callbacks;
char name[32];
int voices, opl_ver;
@@ -113,13 +113,13 @@ static int snd_opl3_oss_create_port(opl3_t * opl3)
/* ------------------------------ */
/* register OSS synth */
-void snd_opl3_init_seq_oss(opl3_t *opl3, char *name)
+void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name)
{
- snd_seq_oss_reg_t *arg;
- snd_seq_device_t *dev;
+ struct snd_seq_oss_reg *arg;
+ struct snd_seq_device *dev;
if (snd_seq_device_new(opl3->card, 0, SNDRV_SEQ_DEV_ID_OSS,
- sizeof(snd_seq_oss_reg_t), &dev) < 0)
+ sizeof(struct snd_seq_oss_reg), &dev) < 0)
return;
opl3->oss_seq_dev = dev;
@@ -143,7 +143,7 @@ void snd_opl3_init_seq_oss(opl3_t *opl3, char *name)
}
/* unregister */
-void snd_opl3_free_seq_oss(opl3_t *opl3)
+void snd_opl3_free_seq_oss(struct snd_opl3 *opl3)
{
if (opl3->oss_seq_dev) {
snd_device_free(opl3->card, opl3->oss_seq_dev);
@@ -154,9 +154,9 @@ void snd_opl3_free_seq_oss(opl3_t *opl3)
/* ------------------------------ */
/* open OSS sequencer */
-static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
+static int snd_opl3_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure)
{
- opl3_t *opl3 = closure;
+ struct snd_opl3 *opl3 = closure;
int err;
snd_assert(arg != NULL, return -ENXIO);
@@ -177,9 +177,9 @@ static int snd_opl3_open_seq_oss(snd_seq_oss_arg_t *arg, void *closure)
}
/* close OSS sequencer */
-static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg)
+static int snd_opl3_close_seq_oss(struct snd_seq_oss_arg *arg)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
snd_assert(arg != NULL, return -ENXIO);
opl3 = arg->private_data;
@@ -206,10 +206,10 @@ static int snd_opl3_close_seq_oss(snd_seq_oss_arg_t *arg)
/* from sound_config.h */
#define SBFM_MAXINSTR 256
-static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
+static int snd_opl3_load_patch_seq_oss(struct snd_seq_oss_arg *arg, int format,
const char __user *buf, int offs, int count)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
int err = -EINVAL;
snd_assert(arg != NULL, return -ENXIO);
@@ -219,11 +219,11 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
struct sbi_instrument sbi;
size_t size;
- snd_seq_instr_header_t *put;
- snd_seq_instr_data_t *data;
- fm_xinstrument_t *xinstr;
+ struct snd_seq_instr_header *put;
+ struct snd_seq_instr_data *data;
+ struct fm_xinstrument *xinstr;
- snd_seq_event_t ev;
+ struct snd_seq_event ev;
int i;
mm_segment_t fs;
@@ -240,7 +240,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
return -EINVAL;
}
- size = sizeof(*put) + sizeof(fm_xinstrument_t);
+ size = sizeof(*put) + sizeof(struct fm_xinstrument);
put = kzalloc(size, GFP_KERNEL);
if (put == NULL)
return -ENOMEM;
@@ -249,7 +249,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
data->type = SNDRV_SEQ_INSTR_ATYPE_DATA;
strcpy(data->data.format, SNDRV_SEQ_INSTR_ID_OPL2_3);
/* build data section */
- xinstr = (fm_xinstrument_t *)(data + 1);
+ xinstr = (struct fm_xinstrument *)(data + 1);
xinstr->stype = FM_STRU_INSTR;
for (i = 0; i < 2; i++) {
@@ -296,7 +296,7 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
err = snd_seq_instr_event(&opl3->fm_ops, opl3->ilist, &ev,
opl3->seq_client, 0, 0);
if (err == -EBUSY) {
- snd_seq_instr_header_t remove;
+ struct snd_seq_instr_header remove;
memset (&remove, 0, sizeof(remove));
remove.cmd = SNDRV_SEQ_INSTR_FREE_CMD_SINGLE;
@@ -319,10 +319,10 @@ static int snd_opl3_load_patch_seq_oss(snd_seq_oss_arg_t *arg, int format,
}
/* ioctl */
-static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd,
+static int snd_opl3_ioctl_seq_oss(struct snd_seq_oss_arg *arg, unsigned int cmd,
unsigned long ioarg)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
snd_assert(arg != NULL, return -ENXIO);
opl3 = arg->private_data;
@@ -345,9 +345,9 @@ static int snd_opl3_ioctl_seq_oss(snd_seq_oss_arg_t *arg, unsigned int cmd,
}
/* reset device */
-static int snd_opl3_reset_seq_oss(snd_seq_oss_arg_t *arg)
+static int snd_opl3_reset_seq_oss(struct snd_seq_oss_arg *arg)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
snd_assert(arg != NULL, return -ENXIO);
opl3 = arg->private_data;
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
index 136964b844d..c4ead790008 100644
--- a/sound/drivers/opl3/opl3_seq.c
+++ b/sound/drivers/opl3/opl3_seq.c
@@ -35,7 +35,7 @@ int use_internal_drums = 0;
module_param(use_internal_drums, bool, 0444);
MODULE_PARM_DESC(use_internal_drums, "Enable internal OPL2/3 drums.");
-int snd_opl3_synth_use_inc(opl3_t * opl3)
+int snd_opl3_synth_use_inc(struct snd_opl3 * opl3)
{
if (!try_module_get(opl3->card->module))
return -EFAULT;
@@ -43,12 +43,12 @@ int snd_opl3_synth_use_inc(opl3_t * opl3)
}
-void snd_opl3_synth_use_dec(opl3_t * opl3)
+void snd_opl3_synth_use_dec(struct snd_opl3 * opl3)
{
module_put(opl3->card->module);
}
-int snd_opl3_synth_setup(opl3_t * opl3)
+int snd_opl3_synth_setup(struct snd_opl3 * opl3)
{
int idx;
@@ -78,7 +78,7 @@ int snd_opl3_synth_setup(opl3_t * opl3)
return 0;
}
-void snd_opl3_synth_cleanup(opl3_t * opl3)
+void snd_opl3_synth_cleanup(struct snd_opl3 * opl3)
{
unsigned long flags;
@@ -96,9 +96,9 @@ void snd_opl3_synth_cleanup(opl3_t * opl3)
up(&opl3->access_mutex);
}
-static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_opl3_synth_use(void *private_data, struct snd_seq_port_subscribe * info)
{
- opl3_t *opl3 = private_data;
+ struct snd_opl3 *opl3 = private_data;
int err;
if ((err = snd_opl3_synth_setup(opl3)) < 0)
@@ -123,9 +123,9 @@ static int snd_opl3_synth_use(void *private_data, snd_seq_port_subscribe_t * inf
return 0;
}
-static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * info)
+static int snd_opl3_synth_unuse(void *private_data, struct snd_seq_port_subscribe * info)
{
- opl3_t *opl3 = private_data;
+ struct snd_opl3 *opl3 = private_data;
snd_opl3_synth_cleanup(opl3);
@@ -137,7 +137,7 @@ static int snd_opl3_synth_unuse(void *private_data, snd_seq_port_subscribe_t * i
/*
* MIDI emulation operators
*/
-snd_midi_op_t opl3_ops = {
+struct snd_midi_op opl3_ops = {
.note_on = snd_opl3_note_on,
.note_off = snd_opl3_note_off,
.key_press = snd_opl3_key_press,
@@ -147,10 +147,10 @@ snd_midi_op_t opl3_ops = {
.sysex = snd_opl3_sysex,
};
-static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct,
+static int snd_opl3_synth_event_input(struct snd_seq_event * ev, int direct,
void *private_data, int atomic, int hop)
{
- opl3_t *opl3 = private_data;
+ struct snd_opl3 *opl3 = private_data;
if (ev->type >= SNDRV_SEQ_EVENT_INSTR_BEGIN &&
ev->type <= SNDRV_SEQ_EVENT_INSTR_CHANGE) {
@@ -168,14 +168,14 @@ static int snd_opl3_synth_event_input(snd_seq_event_t * ev, int direct,
static void snd_opl3_synth_free_port(void *private_data)
{
- opl3_t *opl3 = private_data;
+ struct snd_opl3 *opl3 = private_data;
snd_midi_channel_free_set(opl3->chset);
}
-static int snd_opl3_synth_create_port(opl3_t * opl3)
+static int snd_opl3_synth_create_port(struct snd_opl3 * opl3)
{
- snd_seq_port_callback_t callbacks;
+ struct snd_seq_port_callback callbacks;
char name[32];
int voices, opl_ver;
@@ -215,15 +215,14 @@ static int snd_opl3_synth_create_port(opl3_t * opl3)
/* ------------------------------ */
-static int snd_opl3_seq_new_device(snd_seq_device_t *dev)
+static int snd_opl3_seq_new_device(struct snd_seq_device *dev)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
int client;
- snd_seq_client_callback_t callbacks;
- snd_seq_client_info_t cinfo;
+ char name[32];
int opl_ver;
- opl3 = *(opl3_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+ opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (opl3 == NULL)
return -EINVAL;
@@ -232,22 +231,14 @@ static int snd_opl3_seq_new_device(snd_seq_device_t *dev)
opl3->seq_client = -1;
/* allocate new client */
- memset(&callbacks, 0, sizeof(callbacks));
- callbacks.private_data = opl3;
- callbacks.allow_output = callbacks.allow_input = 1;
+ opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
+ sprintf(name, "OPL%i FM synth", opl_ver);
client = opl3->seq_client =
- snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num, &callbacks);
+ snd_seq_create_kernel_client(opl3->card, opl3->seq_dev_num,
+ name);
if (client < 0)
return client;
- /* change name of client */
- memset(&cinfo, 0, sizeof(cinfo));
- cinfo.client = client;
- cinfo.type = KERNEL_CLIENT;
- opl_ver = (opl3->hardware & OPL3_HW_MASK) >> 8;
- sprintf(cinfo.name, "OPL%i FM synth", opl_ver);
- snd_seq_kernel_client_ctl(client, SNDRV_SEQ_IOCTL_SET_CLIENT_INFO, &cinfo);
-
snd_opl3_synth_create_port(opl3);
/* initialize instrument list */
@@ -268,16 +259,16 @@ static int snd_opl3_seq_new_device(snd_seq_device_t *dev)
opl3->sys_timer_status = 0;
#ifdef CONFIG_SND_SEQUENCER_OSS
- snd_opl3_init_seq_oss(opl3, cinfo.name);
+ snd_opl3_init_seq_oss(opl3, name);
#endif
return 0;
}
-static int snd_opl3_seq_delete_device(snd_seq_device_t *dev)
+static int snd_opl3_seq_delete_device(struct snd_seq_device *dev)
{
- opl3_t *opl3;
+ struct snd_opl3 *opl3;
- opl3 = *(opl3_t **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
+ opl3 = *(struct snd_opl3 **)SNDRV_SEQ_DEVICE_ARGPTR(dev);
if (opl3 == NULL)
return -EINVAL;
@@ -295,14 +286,14 @@ static int snd_opl3_seq_delete_device(snd_seq_device_t *dev)
static int __init alsa_opl3_seq_init(void)
{
- static snd_seq_dev_ops_t ops =
+ static struct snd_seq_dev_ops ops =
{
snd_opl3_seq_new_device,
snd_opl3_seq_delete_device
};
return snd_seq_device_register_driver(SNDRV_SEQ_DEV_ID_OPL3, &ops,
- sizeof(opl3_t*));
+ sizeof(struct snd_opl3 *));
}
static void __exit alsa_opl3_seq_exit(void)
diff --git a/sound/drivers/opl3/opl3_synth.c b/sound/drivers/opl3/opl3_synth.c
index 04f9f955e5b..3534a0e3342 100644
--- a/sound/drivers/opl3/opl3_synth.c
+++ b/sound/drivers/opl3/opl3_synth.c
@@ -61,20 +61,20 @@ char snd_opl3_regmap[MAX_OPL2_VOICES][4] =
/*
* prototypes
*/
-static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note);
-static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice);
-static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params);
-static int snd_opl3_set_mode(opl3_t * opl3, int mode);
-static int snd_opl3_set_connection(opl3_t * opl3, int connection);
+static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note);
+static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice);
+static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params);
+static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode);
+static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection);
/* ------------------------------ */
/*
* open the device exclusively
*/
-int snd_opl3_open(snd_hwdep_t * hw, struct file *file)
+int snd_opl3_open(struct snd_hwdep * hw, struct file *file)
{
- opl3_t *opl3 = hw->private_data;
+ struct snd_opl3 *opl3 = hw->private_data;
down(&opl3->access_mutex);
if (opl3->used) {
@@ -90,10 +90,10 @@ int snd_opl3_open(snd_hwdep_t * hw, struct file *file)
/*
* ioctl for hwdep device:
*/
-int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
+int snd_opl3_ioctl(struct snd_hwdep * hw, struct file *file,
unsigned int cmd, unsigned long arg)
{
- opl3_t *opl3 = hw->private_data;
+ struct snd_opl3 *opl3 = hw->private_data;
void __user *argp = (void __user *)arg;
snd_assert(opl3 != NULL, return -EINVAL);
@@ -102,11 +102,11 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
/* get information */
case SNDRV_DM_FM_IOCTL_INFO:
{
- snd_dm_fm_info_t info;
+ struct snd_dm_fm_info info;
info.fm_mode = opl3->fm_mode;
info.rhythm = opl3->rhythm;
- if (copy_to_user(argp, &info, sizeof(snd_dm_fm_info_t)))
+ if (copy_to_user(argp, &info, sizeof(struct snd_dm_fm_info)))
return -EFAULT;
return 0;
}
@@ -123,8 +123,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
case SNDRV_DM_FM_OSS_IOCTL_PLAY_NOTE:
#endif
{
- snd_dm_fm_note_t note;
- if (copy_from_user(&note, argp, sizeof(snd_dm_fm_note_t)))
+ struct snd_dm_fm_note note;
+ if (copy_from_user(&note, argp, sizeof(struct snd_dm_fm_note)))
return -EFAULT;
return snd_opl3_play_note(opl3, &note);
}
@@ -134,8 +134,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
case SNDRV_DM_FM_OSS_IOCTL_SET_VOICE:
#endif
{
- snd_dm_fm_voice_t voice;
- if (copy_from_user(&voice, argp, sizeof(snd_dm_fm_voice_t)))
+ struct snd_dm_fm_voice voice;
+ if (copy_from_user(&voice, argp, sizeof(struct snd_dm_fm_voice)))
return -EFAULT;
return snd_opl3_set_voice(opl3, &voice);
}
@@ -145,8 +145,8 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
case SNDRV_DM_FM_OSS_IOCTL_SET_PARAMS:
#endif
{
- snd_dm_fm_params_t params;
- if (copy_from_user(&params, argp, sizeof(snd_dm_fm_params_t)))
+ struct snd_dm_fm_params params;
+ if (copy_from_user(&params, argp, sizeof(struct snd_dm_fm_params)))
return -EFAULT;
return snd_opl3_set_params(opl3, &params);
}
@@ -174,9 +174,9 @@ int snd_opl3_ioctl(snd_hwdep_t * hw, struct file *file,
/*
* close the device
*/
-int snd_opl3_release(snd_hwdep_t * hw, struct file *file)
+int snd_opl3_release(struct snd_hwdep * hw, struct file *file)
{
- opl3_t *opl3 = hw->private_data;
+ struct snd_opl3 *opl3 = hw->private_data;
snd_opl3_reset(opl3);
down(&opl3->access_mutex);
@@ -188,7 +188,7 @@ int snd_opl3_release(snd_hwdep_t * hw, struct file *file)
/* ------------------------------ */
-void snd_opl3_reset(opl3_t * opl3)
+void snd_opl3_reset(struct snd_opl3 * opl3)
{
unsigned short opl3_reg;
@@ -229,7 +229,7 @@ void snd_opl3_reset(opl3_t * opl3)
}
-static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note)
+static int snd_opl3_play_note(struct snd_opl3 * opl3, struct snd_dm_fm_note * note)
{
unsigned short reg_side;
unsigned char voice_offset;
@@ -276,7 +276,7 @@ static int snd_opl3_play_note(opl3_t * opl3, snd_dm_fm_note_t * note)
}
-static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice)
+static int snd_opl3_set_voice(struct snd_opl3 * opl3, struct snd_dm_fm_voice * voice)
{
unsigned short reg_side;
unsigned char op_offset;
@@ -378,7 +378,7 @@ static int snd_opl3_set_voice(opl3_t * opl3, snd_dm_fm_voice_t * voice)
return 0;
}
-static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params)
+static int snd_opl3_set_params(struct snd_opl3 * opl3, struct snd_dm_fm_params * params)
{
unsigned char reg_val;
@@ -418,7 +418,7 @@ static int snd_opl3_set_params(opl3_t * opl3, snd_dm_fm_params_t * params)
return 0;
}
-static int snd_opl3_set_mode(opl3_t * opl3, int mode)
+static int snd_opl3_set_mode(struct snd_opl3 * opl3, int mode)
{
if ((mode == SNDRV_DM_FM_MODE_OPL3) && (opl3->hardware < OPL3_HW_OPL3))
return -EINVAL;
@@ -430,7 +430,7 @@ static int snd_opl3_set_mode(opl3_t * opl3, int mode)
return 0;
}
-static int snd_opl3_set_connection(opl3_t * opl3, int connection)
+static int snd_opl3_set_connection(struct snd_opl3 * opl3, int connection)
{
unsigned char reg_val;
diff --git a/sound/drivers/opl3/opl3_voice.h b/sound/drivers/opl3/opl3_voice.h
index 63346a5c349..a371c075ac8 100644
--- a/sound/drivers/opl3/opl3_voice.h
+++ b/sound/drivers/opl3/opl3_voice.h
@@ -22,31 +22,31 @@
#include <sound/opl3.h>
/* Prototypes for opl3_seq.c */
-int snd_opl3_synth_use_inc(opl3_t * opl3);
-void snd_opl3_synth_use_dec(opl3_t * opl3);
-int snd_opl3_synth_setup(opl3_t * opl3);
-void snd_opl3_synth_cleanup(opl3_t * opl3);
+int snd_opl3_synth_use_inc(struct snd_opl3 * opl3);
+void snd_opl3_synth_use_dec(struct snd_opl3 * opl3);
+int snd_opl3_synth_setup(struct snd_opl3 * opl3);
+void snd_opl3_synth_cleanup(struct snd_opl3 * opl3);
/* Prototypes for opl3_midi.c */
void snd_opl3_note_on(void *p, int note, int vel, struct snd_midi_channel *chan);
void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan);
void snd_opl3_key_press(void *p, int note, int vel, struct snd_midi_channel *chan);
-void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan);
+void snd_opl3_terminate_note(void *p, int note, struct snd_midi_channel *chan);
void snd_opl3_control(void *p, int type, struct snd_midi_channel *chan);
-void snd_opl3_nrpn(void *p, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
+void snd_opl3_nrpn(void *p, struct snd_midi_channel *chan, struct snd_midi_channel_set *chset);
+void snd_opl3_sysex(void *p, unsigned char *buf, int len, int parsed, struct snd_midi_channel_set *chset);
-void snd_opl3_calc_volume(unsigned char *reg, int vel, snd_midi_channel_t *chan);
+void snd_opl3_calc_volume(unsigned char *reg, int vel, struct snd_midi_channel *chan);
void snd_opl3_timer_func(unsigned long data);
/* Prototypes for opl3_drums.c */
-void snd_opl3_load_drums(opl3_t *opl3);
-void snd_opl3_drum_switch(opl3_t *opl3, int note, int on_off, int vel, snd_midi_channel_t *chan);
+void snd_opl3_load_drums(struct snd_opl3 *opl3);
+void snd_opl3_drum_switch(struct snd_opl3 *opl3, int note, int on_off, int vel, struct snd_midi_channel *chan);
/* Prototypes for opl3_oss.c */
#ifdef CONFIG_SND_SEQUENCER_OSS
-void snd_opl3_init_seq_oss(opl3_t *opl3, char *name);
-void snd_opl3_free_seq_oss(opl3_t *opl3);
+void snd_opl3_init_seq_oss(struct snd_opl3 *opl3, char *name);
+void snd_opl3_free_seq_oss(struct snd_opl3 *opl3);
#endif
#endif