git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
sound
/
drivers
/
opl3
/
opl3_midi.c
diff --git
a/sound/drivers/opl3/opl3_midi.c
b/sound/drivers/opl3/opl3_midi.c
index
93d6740
..
1b6f227
100644
(file)
--- 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,
};
void snd_opl3_calc_volume(unsigned char *volbyte, int vel,
- s
nd_midi_channel_t
*chan)
+ s
truct snd_midi_channel
*chan)
{
int oldvol, newvol, n;
int volume;
{
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,
};
static void snd_opl3_calc_pitch(unsigned char *fnum, unsigned char *blocknum,
- int note, s
nd_midi_channel_t
*chan)
+ int note, s
truct snd_midi_channel
*chan)
{
int block = ((note / 12) & 0x07) - 1;
int idx = (note % 12) + 2;
{
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
#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";
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.
*/
/*
* Get a FM voice (channel) to play a note on.
*/
-static int opl3_get_voice(
opl3_t
*opl3, int instr_4op,
- s
nd_midi_channel_t
*chan) {
+static int opl3_get_voice(
struct snd_opl3
*opl3, int instr_4op,
+ s
truct snd_midi_channel
*chan) {
int chan_4op_1; /* first voice for 4op instrument */
int chan_4op_2; /* second voice for 4op instrument */
int chan_4op_1; /* first voice for 4op instrument */
int chan_4op_2; /* second voice for 4op instrument */
- s
nd_opl3_voice_t
*vp, *vp2;
+ s
truct snd_opl3_voice
*vp, *vp2;
unsigned int voice_time;
int i;
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)
{
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;
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++) {
for (i = 0; i < opl3->max_voices; i++) {
- s
nd_opl3_voice_t
*vp = &opl3->voices[i];
+ s
truct 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);
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;
}
} else {
opl3->sys_timer_status = 0;
}
- spin_unlock
(&opl3->sys_timer_lock
);
+ spin_unlock
_irqrestore(&opl3->sys_timer_lock, flags
);
}
/*
* Start system timer
*/
}
/*
* 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);
{
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.
*/
/*
* Start a note.
*/
-void snd_opl3_note_on(void *p, int note, int vel, s
nd_midi_channel_t
*chan)
+void snd_opl3_note_on(void *p, int note, int vel, s
truct snd_midi_channel
*chan)
{
{
-
opl3_t
*opl3;
- s
nd_seq_instr_t
wanted;
- s
nd_seq_kinstr_t
*kinstr;
+
struct snd_opl3
*opl3;
+ s
truct snd_seq_instr
wanted;
+ s
truct snd_seq_kinstr
*kinstr;
int instr_4op;
int voice;
int instr_4op;
int voice;
- s
nd_opl3_voice_t
*vp, *vp2;
+ s
truct snd_opl3_voice
*vp, *vp2;
unsigned short connect_mask;
unsigned char connection;
unsigned char vol_op[4];
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;
unsigned char fnum, blocknum;
int i;
-
fm_instrument_
t *fm;
+
struct fm_instrumen
t *fm;
unsigned long flags;
opl3 = p;
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);
}
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;
{
unsigned short reg_side;
unsigned char voice_offset;
unsigned short opl3_reg;
- s
nd_opl3_voice_t
*vp, *vp2;
+ s
truct snd_opl3_voice
*vp, *vp2;
snd_assert(voice < MAX_OPL3_VOICES, return);
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.
*/
/*
* Release a note in response to a midi note off.
*/
-void snd_opl3_note_off(void *p, int note, int vel, s
nd_midi_channel_t
*chan)
+void snd_opl3_note_off(void *p, int note, int vel, s
truct snd_midi_channel
*chan)
{
{
-
opl3_t
*opl3;
+
struct snd_opl3
*opl3;
int voice;
int voice;
- s
nd_opl3_voice_t
*vp;
+ s
truct snd_opl3_voice
*vp;
unsigned long flags;
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
*/
/*
* key pressure change
*/
-void snd_opl3_key_press(void *p, int note, int vel, s
nd_midi_channel_t
*chan)
+void snd_opl3_key_press(void *p, int note, int vel, s
truct snd_midi_channel
*chan)
{
{
-
opl3_t
*opl3;
+
struct snd_opl3
*opl3;
opl3 = p;
#ifdef DEBUG_MIDI
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
*/
/*
* terminate note
*/
-void snd_opl3_terminate_note(void *p, int note, s
nd_midi_channel_t
*chan)
+void snd_opl3_terminate_note(void *p, int note, s
truct snd_midi_channel
*chan)
{
{
-
opl3_t
*opl3;
+
struct snd_opl3
*opl3;
opl3 = p;
#ifdef DEBUG_MIDI
opl3 = p;
#ifdef DEBUG_MIDI
@@
-733,7
+734,7
@@
void snd_opl3_terminate_note(void *p, int note, snd_midi_channel_t *chan)
#endif
}
#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;
{
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;
unsigned char fnum, blocknum;
- s
nd_opl3_voice_t
*vp;
+ s
truct snd_opl3_voice
*vp;
snd_assert(voice < MAX_OPL3_VOICES, return);
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
*/
/*
* 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;
{
int voice;
- s
nd_opl3_voice_t
*vp;
+ s
truct snd_opl3_voice
*vp;
unsigned long flags;
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
*/
* 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, s
nd_midi_channel_t
*chan)
+void snd_opl3_control(void *p, int type, s
truct snd_midi_channel
*chan)
{
{
-
opl3_t
*opl3;
+
struct snd_opl3
*opl3;
opl3 = p;
#ifdef DEBUG_MIDI
opl3 = p;
#ifdef DEBUG_MIDI
@@
-846,10
+847,10
@@
void snd_opl3_control(void *p, int type, snd_midi_channel_t *chan)
/*
* NRPN events
*/
/*
* NRPN events
*/
-void snd_opl3_nrpn(void *p, s
nd_midi_channel_t
*chan,
- s
nd_midi_channel_set_
t *chset)
+void snd_opl3_nrpn(void *p, s
truct snd_midi_channel
*chan,
+ s
truct snd_midi_channel_se
t *chset)
{
{
-
opl3_t
*opl3;
+
struct snd_opl3
*opl3;
opl3 = p;
#ifdef DEBUG_MIDI
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,
* receive sysex
*/
void snd_opl3_sysex(void *p, unsigned char *buf, int len,
- int parsed, s
nd_midi_channel_set_
t *chset)
+ int parsed, s
truct snd_midi_channel_se
t *chset)
{
{
-
opl3_t
*opl3;
+
struct snd_opl3
*opl3;
opl3 = p;
#ifdef DEBUG_MIDI
opl3 = p;
#ifdef DEBUG_MIDI