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] / include / sound / seq_midi_emul.h
index eee0caf..d6c4615 100644 (file)
@@ -29,7 +29,7 @@
  * channel.  All drivers for hardware that does not understand midi
  * directly will probably need to use this structure.
  */
-typedef struct snd_midi_channel {
+struct snd_midi_channel {
        void *private;          /* A back pointer to driver data */
        int  number;            /* The channel number */
        int  client;            /* The client associated with this channel */
@@ -53,41 +53,43 @@ typedef struct snd_midi_channel {
        short gm_rpn_fine_tuning;       /* Master fine tuning */
        short gm_rpn_coarse_tuning;     /* Master coarse tuning */
 
-} snd_midi_channel_t;
+};
 
 /*
  * A structure that represets a set of channels bound to a port.  There
  * would usually be 16 channels per port.  But fewer could be used for
  * particular cases.
  * The channel set consists of information describing the client and
- * port for this midi synth and an array of snd_midi_channel_t structures.
- * A driver that had no need for snd_midi_channel_t could still use the
+ * port for this midi synth and an array of snd_midi_channel structures.
+ * A driver that had no need for snd_midi_channel could still use the
  * channel set type if it wished with the channel array null.
  */
-typedef struct snd_midi_channel_set {
+struct snd_midi_channel_set {
        void *private_data;             /* Driver data */
        int  client;                    /* Client for this port */
        int  port;                      /* The port number */
 
        int  max_channels;              /* Size of the channels array */
-       snd_midi_channel_t *channels;
+       struct snd_midi_channel *channels;
 
        unsigned char midi_mode;        /* MIDI operating mode */
        unsigned char gs_master_volume; /* SYSEX master volume: 0-127 */
        unsigned char gs_chorus_mode;
        unsigned char gs_reverb_mode;
 
-} snd_midi_channel_set_t;
+};
 
-typedef struct snd_seq_midi_op {
-       void (*note_on)(void *private_data, int note, int vel, snd_midi_channel_t *chan);
-       void (*note_off)(void *private_data,int note, int vel, snd_midi_channel_t *chan); /* release note */
-       void (*key_press)(void *private_data, int note, int vel, snd_midi_channel_t *chan);
-       void (*note_terminate)(void *private_data, int note, snd_midi_channel_t *chan); /* terminate note immediately */
-       void (*control)(void *private_data, int type, snd_midi_channel_t *chan);
-       void (*nrpn)(void *private_data, snd_midi_channel_t *chan, snd_midi_channel_set_t *chset);
-       void (*sysex)(void *private_data, unsigned char *buf, int len, int parsed, snd_midi_channel_set_t *chset);
-} snd_midi_op_t;
+struct snd_midi_op {
+       void (*note_on)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
+       void (*note_off)(void *private_data,int note, int vel, struct snd_midi_channel *chan); /* release note */
+       void (*key_press)(void *private_data, int note, int vel, struct snd_midi_channel *chan);
+       void (*note_terminate)(void *private_data, int note, struct snd_midi_channel *chan); /* terminate note immediately */
+       void (*control)(void *private_data, int type, struct snd_midi_channel *chan);
+       void (*nrpn)(void *private_data, struct snd_midi_channel *chan,
+                    struct snd_midi_channel_set *chset);
+       void (*sysex)(void *private_data, unsigned char *buf, int len, int parsed,
+                     struct snd_midi_channel_set *chset);
+};
 
 /*
  * These defines are used so that pitchbend, aftertouch etc, can be
@@ -136,7 +138,7 @@ typedef struct snd_seq_midi_op {
 #define gm_sustain             control[MIDI_CTL_SUSTAIN]
 #define gm_hold                        gm_sustain
 #define gm_portamento          control[MIDI_CTL_PORTAMENTO]
-#define gm_sustenuto           control[MIDI_CTL_SUSTENUTO]
+#define gm_sostenuto           control[MIDI_CTL_SOSTENUTO]
 
 /*
  * These macros give the complete value of the controls that consist
@@ -166,7 +168,7 @@ typedef struct snd_seq_midi_op {
 #define SNDRV_MIDI_NOTE_OFF            0x00
 #define SNDRV_MIDI_NOTE_ON             0x01
 #define SNDRV_MIDI_NOTE_RELEASED               0x02
-#define SNDRV_MIDI_NOTE_SUSTENUTO              0x04
+#define SNDRV_MIDI_NOTE_SOSTENUTO              0x04
  
 #define SNDRV_MIDI_PARAM_TYPE_REGISTERED               0
 #define SNDRV_MIDI_PARAM_TYPE_NONREGISTERED    1
@@ -186,12 +188,10 @@ enum {
 };
 
 /* Prototypes for midi_process.c */
-void snd_midi_process_event(snd_midi_op_t *ops, snd_seq_event_t *ev,
-                           snd_midi_channel_set_t *chanset);
-void snd_midi_channel_set_clear(snd_midi_channel_set_t *chset);
-void snd_midi_channel_init(snd_midi_channel_t *p, int n);
-snd_midi_channel_t *snd_midi_channel_init_set(int n);
-snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n);
-void snd_midi_channel_free_set(snd_midi_channel_set_t *chset);
+void snd_midi_process_event(struct snd_midi_op *ops, struct snd_seq_event *ev,
+                           struct snd_midi_channel_set *chanset);
+void snd_midi_channel_set_clear(struct snd_midi_channel_set *chset);
+struct snd_midi_channel_set *snd_midi_channel_alloc_set(int n);
+void snd_midi_channel_free_set(struct snd_midi_channel_set *chset);
 
 #endif /* __SOUND_SEQ_MIDI_EMUL_H */