[ALSA] Remove xxx_t typedefs: Instrument layer
authorTakashi Iwai <tiwai@suse.de>
Thu, 17 Nov 2005 13:04:44 +0000 (14:04 +0100)
committerJaroslav Kysela <perex@suse.cz>
Tue, 3 Jan 2006 11:17:54 +0000 (12:17 +0100)
Modules: Instrument layer

Remove xxx_t typedefs from the core instrument layer codes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/ainstr_fm.h
include/sound/ainstr_gf1.h
include/sound/ainstr_iw.h
include/sound/ainstr_simple.h
sound/core/seq/instr/ainstr_fm.c
sound/core/seq/instr/ainstr_gf1.c
sound/core/seq/instr/ainstr_iw.c
sound/core/seq/instr/ainstr_simple.c

index 0ec02953815a8502e976e9cc21a810446a6d87c6..c4afb1f121fea27bb525114b95450f8fd321c49d 100644 (file)
  * FM operator
  */
 
-typedef struct fm_operator {
+struct fm_operator {
        unsigned char am_vib;
        unsigned char ksl_level;
        unsigned char attack_decay;
        unsigned char sustain_release;
        unsigned char wave_select;
-} fm_operator_t;
+};
 
 /*
  *  Instrument
@@ -54,11 +54,11 @@ typedef struct fm_operator {
 #define FM_PATCH_OPL2  0x01            /* OPL2 2 operators FM instrument */
 #define FM_PATCH_OPL3  0x02            /* OPL3 4 operators FM instrument */
 
-typedef struct {
+struct fm_instrument {
        unsigned int share_id[4];       /* share id - zero = no sharing */
        unsigned char type;             /* instrument type */
 
-       fm_operator_t op[4];
+       struct fm_operator op[4];
        unsigned char feedback_connection[2];
 
        unsigned char echo_delay;
@@ -68,7 +68,7 @@ typedef struct {
        unsigned char fix_dur;
        unsigned char modes;
        unsigned char fix_key;
-} fm_instrument_t;
+};
 
 /*
  *
@@ -88,25 +88,25 @@ typedef struct {
  * FM operator
  */
 
-typedef struct fm_xoperator {
+struct fm_xoperator {
        __u8 am_vib;
        __u8 ksl_level;
        __u8 attack_decay;
        __u8 sustain_release;
        __u8 wave_select;
-} fm_xoperator_t;
+};
 
 /*
  *  Instrument
  */
 
-typedef struct fm_xinstrument {
+struct fm_xinstrument {
        __u32 stype;                    /* structure type */
 
        __u32 share_id[4];              /* share id - zero = no sharing */
        __u8 type;                      /* instrument type */
 
-       fm_xoperator_t op[4];           /* fm operators */
+       struct fm_xoperator op[4];              /* fm operators */
        __u8 feedback_connection[2];
 
        __u8 echo_delay;
@@ -116,15 +116,19 @@ typedef struct fm_xinstrument {
        __u8 fix_dur;
        __u8 modes;
        __u8 fix_key;
-} fm_xinstrument_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-int snd_seq_fm_init(snd_seq_kinstr_ops_t * ops,
-                   snd_seq_kinstr_ops_t * next);
+int snd_seq_fm_init(struct snd_seq_kinstr_ops * ops,
+                   struct snd_seq_kinstr_ops * next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct fm_xoperator fm_xoperator_t;
+typedef struct fm_xinstrument fm_xinstrument_t;
+
 #endif /* __SOUND_AINSTR_FM_H */
index ae2ddda63971f7bba5fbec4703e02e86838649f6..47726fe0f46d7c087571e88b3278f194f3e3bdab 100644 (file)
@@ -52,7 +52,7 @@
  *  Wavetable definitions
  */
 
-typedef struct gf1_wave {
+struct gf1_wave {
        unsigned int share_id[4];       /* share id - zero = no sharing */
        unsigned int format;            /* wave format */
 
@@ -88,7 +88,7 @@ typedef struct gf1_wave {
        unsigned short scale_factor;    /* 0-2048 or 0-2 */
   
        struct gf1_wave *next;
-} gf1_wave_t;
+};
 
 /*
  *  Instrument
@@ -103,7 +103,7 @@ typedef struct gf1_wave {
 #define IWFFFF_EFFECT_CHORUS           2
 #define IWFFFF_EFFECT_ECHO             3
 
-typedef struct {
+struct gf1_instrument {
        unsigned short exclusion;
        unsigned short exclusion_group; /* 0 - none, 1-65535 */
 
@@ -112,8 +112,8 @@ typedef struct {
        unsigned char effect2;          /* effect 2 */
        unsigned char effect2_depth;    /* 0-127 */
 
-       gf1_wave_t *wave;               /* first waveform */
-} gf1_instrument_t;
+       struct gf1_wave *wave;          /* first waveform */
+};
 
 /*
  *
@@ -135,7 +135,7 @@ typedef struct {
  *  Wavetable definitions
  */
 
-typedef struct gf1_xwave {
+struct gf1_xwave {
        __u32 stype;                    /* structure type */
 
        __u32 share_id[4];              /* share id - zero = no sharing */
@@ -165,13 +165,13 @@ typedef struct gf1_xwave {
        __u8 vibrato_depth;
        __u16 scale_frequency;
        __u16 scale_factor;             /* 0-2048 or 0-2 */  
-} gf1_xwave_t;
+};
 
 /*
  *  Instrument
  */
 
-typedef struct gf1_xinstrument {
+struct gf1_xinstrument {
        __u32 stype;
        
        __u16 exclusion;
@@ -181,7 +181,7 @@ typedef struct gf1_xinstrument {
        __u8 effect1_depth;             /* 0-127 */
        __u8 effect2;                   /* effect 2 */
        __u8 effect2_depth;             /* 0-127 */
-} gf1_xinstrument_t;
+};
 
 /*
  *  Instrument info
@@ -191,35 +191,39 @@ typedef struct gf1_xinstrument {
 #define GF1_INFO_TREMOLO               (1<<1)
 #define GF1_INFO_VIBRATO               (1<<2)
 
-typedef struct gf1_info {
+struct gf1_info {
        unsigned char flags;            /* supported wave flags */
        unsigned char pad[3];
        unsigned int features;          /* supported features */
        unsigned int max8_len;          /* maximum 8-bit wave length */
        unsigned int max16_len;         /* maximum 16-bit wave length */
-} gf1_info_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-typedef struct {
+struct snd_gf1_ops {
        void *private_data;
-       int (*info)(void *private_data, gf1_info_t *info);
-       int (*put_sample)(void *private_data, gf1_wave_t *wave,
+       int (*info)(void *private_data, struct gf1_info *info);
+       int (*put_sample)(void *private_data, struct gf1_wave *wave,
                          char __user *data, long len, int atomic);
-       int (*get_sample)(void *private_data, gf1_wave_t *wave,
+       int (*get_sample)(void *private_data, struct gf1_wave *wave,
                          char __user *data, long len, int atomic);
-       int (*remove_sample)(void *private_data, gf1_wave_t *wave,
+       int (*remove_sample)(void *private_data, struct gf1_wave *wave,
                             int atomic);
-       void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
-       snd_seq_kinstr_ops_t kops;
-} snd_gf1_ops_t;
+       void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what);
+       struct snd_seq_kinstr_ops kops;
+};
 
-int snd_seq_gf1_init(snd_gf1_ops_t *ops,
+int snd_seq_gf1_init(struct snd_gf1_ops *ops,
                     void *private_data,
-                    snd_seq_kinstr_ops_t *next);
+                    struct snd_seq_kinstr_ops *next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct gf1_xwave gf1_xwave_t;
+typedef struct gf1_xinstrument gf1_xinstrument_t;
+
 #endif /* __SOUND_AINSTR_GF1_H */
index 8adf744926ff52f9fd14be80b948f4c7d0e307c5..251feaf1b388e81eb193a4db09633ae9e12a9679 100644 (file)
@@ -54,7 +54,7 @@
  *  Wavetable definitions
  */
 
-typedef struct iwffff_wave {
+struct iwffff_wave {
        unsigned int share_id[4];       /* share id - zero = no sharing */
        unsigned int format;            /* wave format */
 
@@ -76,7 +76,7 @@ typedef struct iwffff_wave {
        unsigned char pad;
   
        struct iwffff_wave *next;
-} iwffff_wave_t;
+};
 
 /*
  *  Layer
@@ -85,13 +85,13 @@ typedef struct iwffff_wave {
 #define IWFFFF_LFO_SHAPE_TRIANGLE      0
 #define IWFFFF_LFO_SHAPE_POSTRIANGLE   1
 
-typedef struct iwffff_lfo {
+struct iwffff_lfo {
        unsigned short freq;            /* (0-2047) 0.01Hz - 21.5Hz */
        signed short depth;             /* volume +- (0-255) 0.48675dB/step */
        signed short sweep;             /* 0 - 950 deciseconds */
        unsigned char shape;            /* see to IWFFFF_LFO_SHAPE_XXXX */
        unsigned char delay;            /* 0 - 255 deciseconds */
-} iwffff_lfo_t;
+};
 
 #define IWFFFF_ENV_FLAG_RETRIGGER      0x0001  /* flag - retrigger */
 
@@ -102,12 +102,12 @@ typedef struct iwffff_lfo {
 #define IWFFFF_ENV_INDEX_VELOCITY      0x0001  /* index - velocity */
 #define IWFFFF_ENV_INDEX_FREQUENCY     0x0002  /* index - frequency */
 
-typedef struct iwffff_env_point {
+struct iwffff_env_point {
        unsigned short offset;
        unsigned short rate;
-} iwffff_env_point_t;
+};
 
-typedef struct iwffff_env_record {
+struct iwffff_env_record {
        unsigned short nattack;
        unsigned short nrelease;
        unsigned short sustain_offset;
@@ -118,15 +118,15 @@ typedef struct iwffff_env_record {
        struct iwffff_env_record *next;
        /* points are stored here */
        /* count of points = nattack + nrelease */
-} iwffff_env_record_t;
+};
 
-typedef struct iwffff_env {
+struct iwffff_env {
        unsigned char flags;
        unsigned char mode;
        unsigned char index;
        unsigned char pad;
        struct iwffff_env_record *record;
-} iwffff_env_t;
+};
 
 #define IWFFFF_LAYER_FLAG_RETRIGGER    0x0001  /* retrigger */
 
@@ -138,7 +138,7 @@ typedef struct iwffff_env {
 #define IWFFFF_LAYER_EVENT_RETRIG      0x0002  /* layer event - retrigger */
 #define IWFFFF_LAYER_EVENT_LEGATO      0x0003  /* layer event - legato */
 
-typedef struct iwffff_layer {
+struct iwffff_layer {
        unsigned char flags;
        unsigned char velocity_mode;
        unsigned char layer_event;
@@ -147,17 +147,17 @@ typedef struct iwffff_layer {
        unsigned char pan;              /* pan offset from CC1 (0 left - 127 right) */
        unsigned char pan_freq_scale;   /* position based on frequency (0-127) */
        unsigned char attenuation;      /* 0-127 (no corresponding midi controller) */
-       iwffff_lfo_t tremolo;           /* tremolo effect */
-       iwffff_lfo_t vibrato;           /* vibrato effect */
+       struct iwffff_lfo tremolo;              /* tremolo effect */
+       struct iwffff_lfo vibrato;              /* vibrato effect */
        unsigned short freq_scale;      /* 0-2048, 1024 is equal to semitone scaling */
        unsigned char freq_center;      /* center for keyboard frequency scaling */
        unsigned char pad;
-       iwffff_env_t penv;              /* pitch envelope */
-       iwffff_env_t venv;              /* volume envelope */
+       struct iwffff_env penv;         /* pitch envelope */
+       struct iwffff_env venv;         /* volume envelope */
 
-       iwffff_wave_t *wave;
+       struct iwffff_wave *wave;
        struct iwffff_layer *next;
-} iwffff_layer_t;
+};
 
 /*
  *  Instrument
@@ -177,7 +177,7 @@ typedef struct iwffff_layer {
 #define IWFFFF_EFFECT_CHORUS           2
 #define IWFFFF_EFFECT_ECHO             3
 
-typedef struct {
+struct iwffff_instrument {
        unsigned short exclusion;
        unsigned short layer_type;
        unsigned short exclusion_group; /* 0 - none, 1-65535 */
@@ -187,8 +187,8 @@ typedef struct {
        unsigned char effect2;          /* effect 2 */
        unsigned char effect2_depth;    /* 0-127 */
 
-       iwffff_layer_t *layer;          /* first layer */
-} iwffff_instrument_t;
+       struct iwffff_layer *layer;             /* first layer */
+};
 
 /*
  *
@@ -216,7 +216,7 @@ typedef struct {
  *  Wavetable definitions
  */
 
-typedef struct iwffff_xwave {
+struct iwffff_xwave {
        __u32 stype;                    /* structure type */
 
        __u32 share_id[4];              /* share id - zero = no sharing */
@@ -234,26 +234,26 @@ typedef struct iwffff_xwave {
        __u8 low_note;                  /* lower frequency range for this waveform */
        __u8 high_note;                 /* higher frequency range for this waveform */
        __u8 pad;
-} iwffff_xwave_t;
+};
 
 /*
  *  Layer
  */
 
-typedef struct iwffff_xlfo {
+struct iwffff_xlfo {
        __u16 freq;                     /* (0-2047) 0.01Hz - 21.5Hz */
        __s16 depth;                    /* volume +- (0-255) 0.48675dB/step */
        __s16 sweep;                    /* 0 - 950 deciseconds */
        __u8 shape;                     /* see to ULTRA_IW_LFO_SHAPE_XXXX */
        __u8 delay;                     /* 0 - 255 deciseconds */
-} iwffff_xlfo_t;
+};
 
-typedef struct iwffff_xenv_point {
+struct iwffff_xenv_point {
        __u16 offset;
        __u16 rate;
-} iwffff_xenv_point_t;
+};
 
-typedef struct iwffff_xenv_record {
+struct iwffff_xenv_record {
        __u32 stype;
        __u16 nattack;
        __u16 nrelease;
@@ -264,16 +264,16 @@ typedef struct iwffff_xenv_record {
        __u8 pad;
        /* points are stored here.. */
        /* count of points = nattack + nrelease */
-} iwffff_xenv_record_t;
+};
 
-typedef struct iwffff_xenv {
+struct iwffff_xenv {
        __u8 flags;
        __u8 mode;
        __u8 index;
        __u8 pad;
-} iwffff_xenv_t;
+};
 
-typedef struct iwffff_xlayer {
+struct iwffff_xlayer {
        __u32 stype;
        __u8 flags;
        __u8 velocity_mode;
@@ -283,20 +283,20 @@ typedef struct iwffff_xlayer {
        __u8 pan;                       /* pan offset from CC1 (0 left - 127 right) */
        __u8 pan_freq_scale;            /* position based on frequency (0-127) */
        __u8 attenuation;               /* 0-127 (no corresponding midi controller) */
-       iwffff_xlfo_t tremolo;          /* tremolo effect */
-       iwffff_xlfo_t vibrato;          /* vibrato effect */
+       struct iwffff_xlfo tremolo;             /* tremolo effect */
+       struct iwffff_xlfo vibrato;             /* vibrato effect */
        __u16 freq_scale;               /* 0-2048, 1024 is equal to semitone scaling */
        __u8 freq_center;               /* center for keyboard frequency scaling */
        __u8 pad;
-       iwffff_xenv_t penv;             /* pitch envelope */
-       iwffff_xenv_t venv;             /* volume envelope */
-} iwffff_xlayer_t;
+       struct iwffff_xenv penv;                /* pitch envelope */
+       struct iwffff_xenv venv;                /* volume envelope */
+};
 
 /*
  *  Instrument
  */
 
-typedef struct iwffff_xinstrument {
+struct iwffff_xinstrument {
        __u32 stype;
        
        __u16 exclusion;
@@ -307,7 +307,7 @@ typedef struct iwffff_xinstrument {
        __u8 effect1_depth;             /* 0-127 */
        __u8 effect2;                   /* effect 2 */
        __u8 effect2_depth;             /* 0-127 */
-} iwffff_xinstrument_t;
+};
 
 /*
  *  ROM support
@@ -316,7 +316,7 @@ typedef struct iwffff_xinstrument {
 
 #define IWFFFF_ROM_HDR_SIZE    512
 
-typedef struct {
+struct iwffff_rom_header {
        __u8 iwave[8];
        __u8 revision;
        __u8 series_number;
@@ -328,7 +328,7 @@ typedef struct {
        __u8 copyright[128];
        __u8 vendor_name[64];
        __u8 description[128];
-} iwffff_rom_header_t;
+};
 
 /*
  *  Instrument info
@@ -339,35 +339,46 @@ typedef struct {
 #define IWFFFF_INFO_LFO_TREMOLO                (1<<2)
 #define IWFFFF_INFO_LFO_TREMOLO_SHAPE  (1<<3)
 
-typedef struct iwffff_info {
+struct iwffff_info {
        unsigned int format;            /* supported format bits */
        unsigned int effects;           /* supported effects (1 << IWFFFF_EFFECT*) */
        unsigned int lfos;              /* LFO effects */
        unsigned int max8_len;          /* maximum 8-bit wave length */
        unsigned int max16_len;         /* maximum 16-bit wave length */
-} iwffff_info_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-typedef struct {
+struct snd_iwffff_ops {
        void *private_data;
-       int (*info)(void *private_data, iwffff_info_t *info);
-       int (*put_sample)(void *private_data, iwffff_wave_t *wave,
+       int (*info)(void *private_data, struct iwffff_info *info);
+       int (*put_sample)(void *private_data, struct iwffff_wave *wave,
                          char __user *data, long len, int atomic);
-       int (*get_sample)(void *private_data, iwffff_wave_t *wave,
+       int (*get_sample)(void *private_data, struct iwffff_wave *wave,
                          char __user *data, long len, int atomic);
-       int (*remove_sample)(void *private_data, iwffff_wave_t *wave,
+       int (*remove_sample)(void *private_data, struct iwffff_wave *wave,
                             int atomic);
-       void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
-       snd_seq_kinstr_ops_t kops;
-} snd_iwffff_ops_t;
+       void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what);
+       struct snd_seq_kinstr_ops kops;
+};
 
-int snd_seq_iwffff_init(snd_iwffff_ops_t *ops,
+int snd_seq_iwffff_init(struct snd_iwffff_ops *ops,
                        void *private_data,
-                        snd_seq_kinstr_ops_t *next);
+                        struct snd_seq_kinstr_ops *next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct iwffff_xwave iwffff_xwave_t;
+typedef struct iwffff_xlfo iwffff_xlfo_t;
+typedef struct iwffff_xenv_point iwffff_xenv_point_t;
+typedef struct iwffff_xenv_record iwffff_xenv_record_t;
+typedef struct iwffff_xenv iwffff_xenv_t;
+typedef struct iwffff_xlayer iwffff_xlayer_t;
+typedef struct iwffff_xinstrument iwffff_xinstrument_t;
+typedef struct iwffff_rom_header iwffff_rom_header_t;
+typedef struct iwffff_info iwffff_info_t;
+
 #endif /* __SOUND_AINSTR_IW_H */
index 40824b4ab23dd527eec628d79f66f03929582d90..5eead12e58ae55ca43b274d06a3838fcb02bb890 100644 (file)
  *  instrument info
  */
 
-typedef struct simple_instrument_info {
+struct simple_instrument_info {
        unsigned int format;            /* supported format bits */
        unsigned int effects;           /* supported effects (1 << SIMPLE_EFFECT_*) */
        unsigned int max8_len;          /* maximum 8-bit wave length */
        unsigned int max16_len;         /* maximum 16-bit wave length */
-} simple_instrument_info_t;
+};
 
 /*
  *  Instrument
  */
 
-typedef struct {
+struct simple_instrument {
        unsigned int share_id[4];       /* share id - zero = no sharing */
        unsigned int format;            /* wave format */
 
@@ -92,7 +92,7 @@ typedef struct {
        unsigned char effect1_depth;    /* 0-127 */
        unsigned char effect2;          /* effect 2 */
        unsigned char effect2_depth;    /* 0-127 */
-} simple_instrument_t;
+};
 
 /*
  *
@@ -112,7 +112,7 @@ typedef struct {
  *  Instrument
  */
 
-typedef struct simple_xinstrument {
+struct simple_xinstrument {
        __u32 stype;
 
        __u32 share_id[4];              /* share id - zero = no sharing */
@@ -128,29 +128,32 @@ typedef struct simple_xinstrument {
        __u8 effect1_depth;             /* 0-127 */
        __u8 effect2;                   /* effect 2 */
        __u8 effect2_depth;             /* 0-127 */
-} simple_xinstrument_t;
+};
 
 #ifdef __KERNEL__
 
 #include "seq_instr.h"
 
-typedef struct {
+struct snd_simple_ops {
        void *private_data;
-       int (*info)(void *private_data, simple_instrument_info_t *info);
-       int (*put_sample)(void *private_data, simple_instrument_t *instr,
+       int (*info)(void *private_data, struct simple_instrument_info *info);
+       int (*put_sample)(void *private_data, struct simple_instrument *instr,
                          char __user *data, long len, int atomic);
-       int (*get_sample)(void *private_data, simple_instrument_t *instr,
+       int (*get_sample)(void *private_data, struct simple_instrument *instr,
                          char __user *data, long len, int atomic);
-       int (*remove_sample)(void *private_data, simple_instrument_t *instr,
+       int (*remove_sample)(void *private_data, struct simple_instrument *instr,
                             int atomic);
-       void (*notify)(void *private_data, snd_seq_kinstr_t *instr, int what);
-       snd_seq_kinstr_ops_t kops;
-} snd_simple_ops_t;
+       void (*notify)(void *private_data, struct snd_seq_kinstr *instr, int what);
+       struct snd_seq_kinstr_ops kops;
+};
 
-int snd_seq_simple_init(snd_simple_ops_t *ops,
+int snd_seq_simple_init(struct snd_simple_ops *ops,
                        void *private_data,
-                       snd_seq_kinstr_ops_t *next);
+                       struct snd_seq_kinstr_ops *next);
 
 #endif
 
+/* typedefs for compatibility to user-space */
+typedef struct simple_xinstrument simple_xinstrument_t;
+
 #endif /* __SOUND_AINSTR_SIMPLE_H */
index 5c671e69884f9f190574e8757c47f3b341e73abf..b09babf272cd0e88ae62650af6ab48ba013b77d9 100644 (file)
@@ -30,11 +30,11 @@ MODULE_AUTHOR("Uros Bizjak <uros@kss-loka.si>");
 MODULE_DESCRIPTION("Advanced Linux Sound Architecture FM Instrument support.");
 MODULE_LICENSE("GPL");
 
-static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_fm_put(void *private_data, struct snd_seq_kinstr *instr,
                          char __user *instr_data, long len, int atomic, int cmd)
 {
-       fm_instrument_t *ip;
-       fm_xinstrument_t ix;
+       struct fm_instrument *ip;
+       struct fm_xinstrument ix;
        int idx;
 
        if (cmd != SNDRV_SEQ_INSTR_PUT_CMD_CREATE)
@@ -46,7 +46,7 @@ static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
                return -EFAULT;
        if (ix.stype != FM_STRU_INSTR)
                return -EINVAL;
-       ip = (fm_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct fm_instrument *)KINSTR_DATA(instr);
        ip->share_id[0] = le32_to_cpu(ix.share_id[0]);
        ip->share_id[1] = le32_to_cpu(ix.share_id[1]);
        ip->share_id[2] = le32_to_cpu(ix.share_id[2]);
@@ -72,12 +72,12 @@ static int snd_seq_fm_put(void *private_data, snd_seq_kinstr_t *instr,
        return 0;
 }
 
-static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_fm_get(void *private_data, struct snd_seq_kinstr *instr,
                          char __user *instr_data, long len, int atomic,
                          int cmd)
 {
-       fm_instrument_t *ip;
-       fm_xinstrument_t ix;
+       struct fm_instrument *ip;
+       struct fm_xinstrument ix;
        int idx;
        
        if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL)
@@ -85,7 +85,7 @@ static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
        if (len < (long)sizeof(ix))
                return -ENOMEM;
        memset(&ix, 0, sizeof(ix));
-       ip = (fm_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct fm_instrument *)KINSTR_DATA(instr);
        ix.stype = FM_STRU_INSTR;
        ix.share_id[0] = cpu_to_le32(ip->share_id[0]);
        ix.share_id[1] = cpu_to_le32(ip->share_id[1]);
@@ -114,19 +114,19 @@ static int snd_seq_fm_get(void *private_data, snd_seq_kinstr_t *instr,
        return 0;
 }
 
-static int snd_seq_fm_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_fm_get_size(void *private_data, struct snd_seq_kinstr *instr,
                               long *size)
 {
-       *size = sizeof(fm_xinstrument_t);
+       *size = sizeof(struct fm_xinstrument);
        return 0;
 }
 
-int snd_seq_fm_init(snd_seq_kinstr_ops_t *ops,
-                   snd_seq_kinstr_ops_t *next)
+int snd_seq_fm_init(struct snd_seq_kinstr_ops *ops,
+                   struct snd_seq_kinstr_ops *next)
 {
        memset(ops, 0, sizeof(*ops));
        // ops->private_data = private_data;
-       ops->add_len = sizeof(fm_instrument_t);
+       ops->add_len = sizeof(struct fm_instrument);
        ops->instr_type = SNDRV_SEQ_INSTR_ID_OPL2_3;
        ops->put = snd_seq_fm_put;
        ops->get = snd_seq_fm_get;
index 0e4df8826eedf6128a3f0591ad72559205e83261..3c31038a74bae4dce539aecf5718b7284b2d5584 100644 (file)
@@ -42,14 +42,14 @@ static unsigned int snd_seq_gf1_size(unsigned int size, unsigned int format)
        return format;
 }
 
-static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
-                                            gf1_instrument_t *ip,
+static int snd_seq_gf1_copy_wave_from_stream(struct snd_gf1_ops *ops,
+                                            struct gf1_instrument *ip,
                                             char __user **data,
                                             long *len,
                                             int atomic)
 {
-       gf1_wave_t *wp, *prev;
-       gf1_xwave_t xp;
+       struct gf1_wave *wp, *prev;
+       struct gf1_xwave xp;
        int err;
        gfp_t gfp_mask;
        unsigned int real_size;
@@ -116,8 +116,8 @@ static int snd_seq_gf1_copy_wave_from_stream(snd_gf1_ops_t *ops,
        return 0;
 }
 
-static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops,
-                                 gf1_wave_t *wave,
+static void snd_seq_gf1_wave_free(struct snd_gf1_ops *ops,
+                                 struct gf1_wave *wave,
                                  int atomic)
 {
        if (ops->remove_sample)
@@ -125,11 +125,11 @@ static void snd_seq_gf1_wave_free(snd_gf1_ops_t *ops,
        kfree(wave);
 }
 
-static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops,
-                                  gf1_instrument_t *ip,
+static void snd_seq_gf1_instr_free(struct snd_gf1_ops *ops,
+                                  struct gf1_instrument *ip,
                                   int atomic)
 {
-       gf1_wave_t *wave;
+       struct gf1_wave *wave;
        
        while ((wave = ip->wave) != NULL) {
                ip->wave = wave->next;
@@ -137,13 +137,13 @@ static void snd_seq_gf1_instr_free(snd_gf1_ops_t *ops,
        }
 }
 
-static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_gf1_put(void *private_data, struct snd_seq_kinstr *instr,
                           char __user *instr_data, long len, int atomic,
                           int cmd)
 {
-       snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
-       gf1_instrument_t *ip;
-       gf1_xinstrument_t ix;
+       struct snd_gf1_ops *ops = private_data;
+       struct gf1_instrument *ip;
+       struct gf1_xinstrument ix;
        int err;
        gfp_t gfp_mask;
 
@@ -159,7 +159,7 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
                return -EINVAL;
        instr_data += sizeof(ix);
        len -= sizeof(ix);
-       ip = (gf1_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct gf1_instrument *)KINSTR_DATA(instr);
        ip->exclusion = le16_to_cpu(ix.exclusion);
        ip->exclusion_group = le16_to_cpu(ix.exclusion_group);
        ip->effect1 = ix.effect1;
@@ -189,14 +189,14 @@ static int snd_seq_gf1_put(void *private_data, snd_seq_kinstr_t *instr,
        return 0;
 }
 
-static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
-                                          gf1_instrument_t *ip,
+static int snd_seq_gf1_copy_wave_to_stream(struct snd_gf1_ops *ops,
+                                          struct gf1_instrument *ip,
                                           char __user **data,
                                           long *len,
                                           int atomic)
 {
-       gf1_wave_t *wp;
-       gf1_xwave_t xp;
+       struct gf1_wave *wp;
+       struct gf1_xwave xp;
        int err;
        unsigned int real_size;
        
@@ -251,20 +251,20 @@ static int snd_seq_gf1_copy_wave_to_stream(snd_gf1_ops_t *ops,
        return 0;
 }
 
-static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_gf1_get(void *private_data, struct snd_seq_kinstr *instr,
                           char __user *instr_data, long len, int atomic,
                           int cmd)
 {
-       snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
-       gf1_instrument_t *ip;
-       gf1_xinstrument_t ix;
+       struct snd_gf1_ops *ops = private_data;
+       struct gf1_instrument *ip;
+       struct gf1_xinstrument ix;
        
        if (cmd != SNDRV_SEQ_INSTR_GET_CMD_FULL)
                return -EINVAL;
        if (len < (long)sizeof(ix))
                return -ENOMEM;
        memset(&ix, 0, sizeof(ix));
-       ip = (gf1_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct gf1_instrument *)KINSTR_DATA(instr);
        ix.stype = GF1_STRU_INSTR;
        ix.exclusion = cpu_to_le16(ip->exclusion);
        ix.exclusion_group = cpu_to_le16(ip->exclusion_group);
@@ -283,18 +283,18 @@ static int snd_seq_gf1_get(void *private_data, snd_seq_kinstr_t *instr,
                                               atomic);
 }
 
-static int snd_seq_gf1_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_gf1_get_size(void *private_data, struct snd_seq_kinstr *instr,
                                long *size)
 {
        long result;
-       gf1_instrument_t *ip;
-       gf1_wave_t *wp;
+       struct gf1_instrument *ip;
+       struct gf1_wave *wp;
 
        *size = 0;
-       ip = (gf1_instrument_t *)KINSTR_DATA(instr);
-       result = sizeof(gf1_xinstrument_t);
+       ip = (struct gf1_instrument *)KINSTR_DATA(instr);
+       result = sizeof(struct gf1_xinstrument);
        for (wp = ip->wave; wp; wp = wp->next) {
-               result += sizeof(gf1_xwave_t);
+               result += sizeof(struct gf1_xwave);
                result += wp->size;
        }
        *size = result;
@@ -302,35 +302,35 @@ static int snd_seq_gf1_get_size(void *private_data, snd_seq_kinstr_t *instr,
 }
 
 static int snd_seq_gf1_remove(void *private_data,
-                             snd_seq_kinstr_t *instr,
+                             struct snd_seq_kinstr *instr,
                               int atomic)
 {
-       snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
-       gf1_instrument_t *ip;
+       struct snd_gf1_ops *ops = private_data;
+       struct gf1_instrument *ip;
 
-       ip = (gf1_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct gf1_instrument *)KINSTR_DATA(instr);
        snd_seq_gf1_instr_free(ops, ip, atomic);
        return 0;
 }
 
 static void snd_seq_gf1_notify(void *private_data,
-                              snd_seq_kinstr_t *instr,
+                              struct snd_seq_kinstr *instr,
                               int what)
 {
-       snd_gf1_ops_t *ops = (snd_gf1_ops_t *)private_data;
+       struct snd_gf1_ops *ops = private_data;
 
        if (ops->notify)
                ops->notify(ops->private_data, instr, what);
 }
 
-int snd_seq_gf1_init(snd_gf1_ops_t *ops,
+int snd_seq_gf1_init(struct snd_gf1_ops *ops,
                     void *private_data,
-                    snd_seq_kinstr_ops_t *next)
+                    struct snd_seq_kinstr_ops *next)
 {
        memset(ops, 0, sizeof(*ops));
        ops->private_data = private_data;
        ops->kops.private_data = ops;
-       ops->kops.add_len = sizeof(gf1_instrument_t);
+       ops->kops.add_len = sizeof(struct gf1_instrument);
        ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_GUS_PATCH;
        ops->kops.put = snd_seq_gf1_put;
        ops->kops.get = snd_seq_gf1_get;
index 7c19fbbc5d0ffeaa34b28c2d918196b4be738bcb..7f8df19ba5638f70dc65b7e980f49a738e1a96e7 100644 (file)
@@ -42,8 +42,8 @@ static unsigned int snd_seq_iwffff_size(unsigned int size, unsigned int format)
        return result;
 }
 
-static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp,
-                                               iwffff_xlfo_t *fx)
+static void snd_seq_iwffff_copy_lfo_from_stream(struct iwffff_lfo *fp,
+                                               struct iwffff_xlfo *fx)
 {
        fp->freq = le16_to_cpu(fx->freq);
        fp->depth = le16_to_cpu(fx->depth);
@@ -53,18 +53,18 @@ static void snd_seq_iwffff_copy_lfo_from_stream(iwffff_lfo_t *fp,
 }
 
 static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
-                                              iwffff_layer_t *lp,
-                                              iwffff_env_t *ep,
-                                              iwffff_xenv_t *ex,
+                                              struct iwffff_layer *lp,
+                                              struct iwffff_env *ep,
+                                              struct iwffff_xenv *ex,
                                               char __user **data,
                                               long *len,
                                               gfp_t gfp_mask)
 {
        __u32 stype;
-       iwffff_env_record_t *rp, *rp_last;
-       iwffff_xenv_record_t rx;
-       iwffff_env_point_t *pp;
-       iwffff_xenv_point_t px;
+       struct iwffff_env_record *rp, *rp_last;
+       struct iwffff_xenv_record rx;
+       struct iwffff_env_point *pp;
+       struct iwffff_xenv_point px;
        int points_size, idx;
 
        ep->flags = ex->flags;
@@ -101,7 +101,7 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
                rp->sustain_rate = le16_to_cpu(rx.sustain_rate);
                rp->release_rate = le16_to_cpu(rx.release_rate);
                rp->hirange = rx.hirange;
-               pp = (iwffff_env_point_t *)(rp + 1);
+               pp = (struct iwffff_env_point *)(rp + 1);
                for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) {
                        if (copy_from_user(&px, *data, sizeof(px)))
                                return -EFAULT;
@@ -120,14 +120,14 @@ static int snd_seq_iwffff_copy_env_from_stream(__u32 req_stype,
        return 0;
 }
 
-static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
-                                               iwffff_layer_t *lp,
+static int snd_seq_iwffff_copy_wave_from_stream(struct snd_iwffff_ops *ops,
+                                               struct iwffff_layer *lp,
                                                char __user **data,
                                                long *len,
                                                int atomic)
 {
-       iwffff_wave_t *wp, *prev;
-       iwffff_xwave_t xp;
+       struct iwffff_wave *wp, *prev;
+       struct iwffff_xwave xp;
        int err;
        gfp_t gfp_mask;
        unsigned int real_size;
@@ -186,11 +186,11 @@ static int snd_seq_iwffff_copy_wave_from_stream(snd_iwffff_ops_t *ops,
        return 0;
 }
 
-static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops,
-                                   iwffff_env_t *env,
+static void snd_seq_iwffff_env_free(struct snd_iwffff_ops *ops,
+                                   struct iwffff_env *env,
                                    int atomic)
 {
-       iwffff_env_record_t *rec;
+       struct iwffff_env_record *rec;
        
        while ((rec = env->record) != NULL) {
                env->record = rec->next;
@@ -198,8 +198,8 @@ static void snd_seq_iwffff_env_free(snd_iwffff_ops_t *ops,
        }
 }
                                    
-static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops,
-                                    iwffff_wave_t *wave,
+static void snd_seq_iwffff_wave_free(struct snd_iwffff_ops *ops,
+                                    struct iwffff_wave *wave,
                                     int atomic)
 {
        if (ops->remove_sample)
@@ -207,12 +207,12 @@ static void snd_seq_iwffff_wave_free(snd_iwffff_ops_t *ops,
        kfree(wave);
 }
 
-static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops,
-                                      iwffff_instrument_t *ip,
+static void snd_seq_iwffff_instr_free(struct snd_iwffff_ops *ops,
+                                      struct iwffff_instrument *ip,
                                       int atomic)
 {
-       iwffff_layer_t *layer;
-       iwffff_wave_t *wave;
+       struct iwffff_layer *layer;
+       struct iwffff_wave *wave;
        
        while ((layer = ip->layer) != NULL) {
                ip->layer = layer->next;
@@ -226,15 +226,15 @@ static void snd_seq_iwffff_instr_free(snd_iwffff_ops_t *ops,
        }
 }
 
-static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_iwffff_put(void *private_data, struct snd_seq_kinstr *instr,
                              char __user *instr_data, long len, int atomic,
                              int cmd)
 {
-       snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
-       iwffff_instrument_t *ip;
-       iwffff_xinstrument_t ix;
-       iwffff_layer_t *lp, *prev_lp;
-       iwffff_xlayer_t lx;
+       struct snd_iwffff_ops *ops = private_data;
+       struct iwffff_instrument *ip;
+       struct iwffff_xinstrument ix;
+       struct iwffff_layer *lp, *prev_lp;
+       struct iwffff_xlayer lx;
        int err;
        gfp_t gfp_mask;
 
@@ -250,7 +250,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
                return -EINVAL;
        instr_data += sizeof(ix);
        len -= sizeof(ix);
-       ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
        ip->exclusion = le16_to_cpu(ix.exclusion);
        ip->layer_type = le16_to_cpu(ix.layer_type);
        ip->exclusion_group = le16_to_cpu(ix.exclusion_group);
@@ -261,7 +261,7 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
        /* copy layers */
        prev_lp = NULL;
        while (len > 0) {
-               if (len < (long)sizeof(iwffff_xlayer_t)) {
+               if (len < (long)sizeof(struct iwffff_xlayer)) {
                        snd_seq_iwffff_instr_free(ops, ip, atomic);
                        return -EINVAL;
                }
@@ -335,8 +335,8 @@ static int snd_seq_iwffff_put(void *private_data, snd_seq_kinstr_t *instr,
        return 0;
 }
 
-static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx,
-                                             iwffff_lfo_t *fp)
+static void snd_seq_iwffff_copy_lfo_to_stream(struct iwffff_xlfo *fx,
+                                             struct iwffff_lfo *fp)
 {
        fx->freq = cpu_to_le16(fp->freq);
        fx->depth = cpu_to_le16(fp->depth);
@@ -346,16 +346,16 @@ static void snd_seq_iwffff_copy_lfo_to_stream(iwffff_xlfo_t *fx,
 }
 
 static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
-                                            iwffff_layer_t *lp,
-                                            iwffff_xenv_t *ex,
-                                            iwffff_env_t *ep,
+                                            struct iwffff_layer *lp,
+                                            struct iwffff_xenv *ex,
+                                            struct iwffff_env *ep,
                                             char __user **data,
                                             long *len)
 {
-       iwffff_env_record_t *rp;
-       iwffff_xenv_record_t rx;
-       iwffff_env_point_t *pp;
-       iwffff_xenv_point_t px;
+       struct iwffff_env_record *rp;
+       struct iwffff_xenv_record rx;
+       struct iwffff_env_point *pp;
+       struct iwffff_xenv_point px;
        int points_size, idx;
 
        ex->flags = ep->flags;
@@ -379,7 +379,7 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
                points_size = (rp->nattack + rp->nrelease) * 2 * sizeof(__u16);
                if (*len < points_size)
                        return -ENOMEM;
-               pp = (iwffff_env_point_t *)(rp + 1);
+               pp = (struct iwffff_env_point *)(rp + 1);
                for (idx = 0; idx < rp->nattack + rp->nrelease; idx++) {
                        px.offset = cpu_to_le16(pp->offset);
                        px.rate = cpu_to_le16(pp->rate);
@@ -392,14 +392,14 @@ static int snd_seq_iwffff_copy_env_to_stream(__u32 req_stype,
        return 0;
 }
 
-static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops,
-                                             iwffff_layer_t *lp,
+static int snd_seq_iwffff_copy_wave_to_stream(struct snd_iwffff_ops *ops,
+                                             struct iwffff_layer *lp,
                                              char __user **data,
                                              long *len,
                                              int atomic)
 {
-       iwffff_wave_t *wp;
-       iwffff_xwave_t xp;
+       struct iwffff_wave *wp;
+       struct iwffff_xwave xp;
        int err;
        unsigned int real_size;
        
@@ -447,14 +447,14 @@ static int snd_seq_iwffff_copy_wave_to_stream(snd_iwffff_ops_t *ops,
        return 0;
 }
 
-static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_iwffff_get(void *private_data, struct snd_seq_kinstr *instr,
                              char __user *instr_data, long len, int atomic, int cmd)
 {
-       snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
-       iwffff_instrument_t *ip;
-       iwffff_xinstrument_t ix;
-       iwffff_layer_t *lp;
-       iwffff_xlayer_t lx;
+       struct snd_iwffff_ops *ops = private_data;
+       struct iwffff_instrument *ip;
+       struct iwffff_xinstrument ix;
+       struct iwffff_layer *lp;
+       struct iwffff_xlayer lx;
        char __user *layer_instr_data;
        int err;
        
@@ -463,7 +463,7 @@ static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
        if (len < (long)sizeof(ix))
                return -ENOMEM;
        memset(&ix, 0, sizeof(ix));
-       ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
        ix.stype = IWFFFF_STRU_INSTR;
        ix.exclusion = cpu_to_le16(ip->exclusion);
        ix.layer_type = cpu_to_le16(ip->layer_type);
@@ -520,43 +520,43 @@ static int snd_seq_iwffff_get(void *private_data, snd_seq_kinstr_t *instr,
        return 0;
 }
 
-static long snd_seq_iwffff_env_size_in_stream(iwffff_env_t *ep)
+static long snd_seq_iwffff_env_size_in_stream(struct iwffff_env *ep)
 {
        long result = 0;
-       iwffff_env_record_t *rp;
+       struct iwffff_env_record *rp;
 
        for (rp = ep->record; rp; rp = rp->next) {
-               result += sizeof(iwffff_xenv_record_t);
+               result += sizeof(struct iwffff_xenv_record);
                result += (rp->nattack + rp->nrelease) * 2 * sizeof(__u16);
        }
        return 0;
 }
 
-static long snd_seq_iwffff_wave_size_in_stream(iwffff_layer_t *lp)
+static long snd_seq_iwffff_wave_size_in_stream(struct iwffff_layer *lp)
 {
        long result = 0;
-       iwffff_wave_t *wp;
+       struct iwffff_wave *wp;
        
        for (wp = lp->wave; wp; wp = wp->next) {
-               result += sizeof(iwffff_xwave_t);
+               result += sizeof(struct iwffff_xwave);
                if (!(wp->format & IWFFFF_WAVE_ROM))
                        result += wp->size;
        }
        return result;
 }
 
-static int snd_seq_iwffff_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_iwffff_get_size(void *private_data, struct snd_seq_kinstr *instr,
                                   long *size)
 {
        long result;
-       iwffff_instrument_t *ip;
-       iwffff_layer_t *lp;
+       struct iwffff_instrument *ip;
+       struct iwffff_layer *lp;
 
        *size = 0;
-       ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
-       result = sizeof(iwffff_xinstrument_t);
+       ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
+       result = sizeof(struct iwffff_xinstrument);
        for (lp = ip->layer; lp; lp = lp->next) {
-               result += sizeof(iwffff_xlayer_t);
+               result += sizeof(struct iwffff_xlayer);
                result += snd_seq_iwffff_env_size_in_stream(&lp->penv);
                result += snd_seq_iwffff_env_size_in_stream(&lp->venv);
                result += snd_seq_iwffff_wave_size_in_stream(lp);
@@ -566,35 +566,35 @@ static int snd_seq_iwffff_get_size(void *private_data, snd_seq_kinstr_t *instr,
 }
 
 static int snd_seq_iwffff_remove(void *private_data,
-                                snd_seq_kinstr_t *instr,
+                                struct snd_seq_kinstr *instr,
                                  int atomic)
 {
-       snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
-       iwffff_instrument_t *ip;
+       struct snd_iwffff_ops *ops = private_data;
+       struct iwffff_instrument *ip;
 
-       ip = (iwffff_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct iwffff_instrument *)KINSTR_DATA(instr);
        snd_seq_iwffff_instr_free(ops, ip, atomic);
        return 0;
 }
 
 static void snd_seq_iwffff_notify(void *private_data,
-                                 snd_seq_kinstr_t *instr,
+                                 struct snd_seq_kinstr *instr,
                                   int what)
 {
-       snd_iwffff_ops_t *ops = (snd_iwffff_ops_t *)private_data;
+       struct snd_iwffff_ops *ops = private_data;
 
        if (ops->notify)
                ops->notify(ops->private_data, instr, what);
 }
 
-int snd_seq_iwffff_init(snd_iwffff_ops_t *ops,
+int snd_seq_iwffff_init(struct snd_iwffff_ops *ops,
                        void *private_data,
-                       snd_seq_kinstr_ops_t *next)
+                       struct snd_seq_kinstr_ops *next)
 {
        memset(ops, 0, sizeof(*ops));
        ops->private_data = private_data;
        ops->kops.private_data = ops;
-       ops->kops.add_len = sizeof(iwffff_instrument_t);
+       ops->kops.add_len = sizeof(struct iwffff_instrument);
        ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_INTERWAVE;
        ops->kops.put = snd_seq_iwffff_put;
        ops->kops.get = snd_seq_iwffff_get;
index 17ab94e760737242187450416dab8b6225ca5a32..6d6ffece7cbe88b5f5b135f182c04f4cd3c9f2dc 100644 (file)
@@ -42,21 +42,21 @@ static unsigned int snd_seq_simple_size(unsigned int size, unsigned int format)
        return result;
 }
 
-static void snd_seq_simple_instr_free(snd_simple_ops_t *ops,
-                                     simple_instrument_t *ip,
+static void snd_seq_simple_instr_free(struct snd_simple_ops *ops,
+                                     struct simple_instrument *ip,
                                      int atomic)
 {
        if (ops->remove_sample)
                ops->remove_sample(ops->private_data, ip, atomic);
 }
 
-static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_simple_put(void *private_data, struct snd_seq_kinstr *instr,
                              char __user *instr_data, long len,
                              int atomic, int cmd)
 {
-       snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
-       simple_instrument_t *ip;
-       simple_xinstrument_t ix;
+       struct snd_simple_ops *ops = private_data;
+       struct simple_instrument *ip;
+       struct simple_xinstrument ix;
        int err;
        gfp_t gfp_mask;
        unsigned int real_size;
@@ -73,7 +73,7 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
                return -EINVAL;
        instr_data += sizeof(ix);
        len -= sizeof(ix);
-       ip = (simple_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct simple_instrument *)KINSTR_DATA(instr);
        ip->share_id[0] = le32_to_cpu(ix.share_id[0]);
        ip->share_id[1] = le32_to_cpu(ix.share_id[1]);
        ip->share_id[2] = le32_to_cpu(ix.share_id[2]);
@@ -100,13 +100,13 @@ static int snd_seq_simple_put(void *private_data, snd_seq_kinstr_t *instr,
        return 0;
 }
 
-static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_simple_get(void *private_data, struct snd_seq_kinstr *instr,
                              char __user *instr_data, long len,
                              int atomic, int cmd)
 {
-       snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
-       simple_instrument_t *ip;
-       simple_xinstrument_t ix;
+       struct snd_simple_ops *ops = private_data;
+       struct simple_instrument *ip;
+       struct simple_xinstrument ix;
        int err;
        unsigned int real_size;
        
@@ -115,7 +115,7 @@ static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
        if (len < (long)sizeof(ix))
                return -ENOMEM;
        memset(&ix, 0, sizeof(ix));
-       ip = (simple_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct simple_instrument *)KINSTR_DATA(instr);
        ix.stype = SIMPLE_STRU_INSTR;
        ix.share_id[0] = cpu_to_le32(ip->share_id[0]);
        ix.share_id[1] = cpu_to_le32(ip->share_id[1]);
@@ -147,46 +147,46 @@ static int snd_seq_simple_get(void *private_data, snd_seq_kinstr_t *instr,
        return 0;
 }
 
-static int snd_seq_simple_get_size(void *private_data, snd_seq_kinstr_t *instr,
+static int snd_seq_simple_get_size(void *private_data, struct snd_seq_kinstr *instr,
                                   long *size)
 {
-       simple_instrument_t *ip;
+       struct simple_instrument *ip;
 
-       ip = (simple_instrument_t *)KINSTR_DATA(instr);
-       *size = sizeof(simple_xinstrument_t) + snd_seq_simple_size(ip->size, ip->format);
+       ip = (struct simple_instrument *)KINSTR_DATA(instr);
+       *size = sizeof(struct simple_xinstrument) + snd_seq_simple_size(ip->size, ip->format);
        return 0;
 }
 
 static int snd_seq_simple_remove(void *private_data,
-                                snd_seq_kinstr_t *instr,
+                                struct snd_seq_kinstr *instr,
                                  int atomic)
 {
-       snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
-       simple_instrument_t *ip;
+       struct snd_simple_ops *ops = private_data;
+       struct simple_instrument *ip;
 
-       ip = (simple_instrument_t *)KINSTR_DATA(instr);
+       ip = (struct simple_instrument *)KINSTR_DATA(instr);
        snd_seq_simple_instr_free(ops, ip, atomic);
        return 0;
 }
 
 static void snd_seq_simple_notify(void *private_data,
-                                 snd_seq_kinstr_t *instr,
+                                 struct snd_seq_kinstr *instr,
                                   int what)
 {
-       snd_simple_ops_t *ops = (snd_simple_ops_t *)private_data;
+       struct snd_simple_ops *ops = private_data;
 
        if (ops->notify)
                ops->notify(ops->private_data, instr, what);
 }
 
-int snd_seq_simple_init(snd_simple_ops_t *ops,
+int snd_seq_simple_init(struct snd_simple_ops *ops,
                        void *private_data,
-                       snd_seq_kinstr_ops_t *next)
+                       struct snd_seq_kinstr_ops *next)
 {
        memset(ops, 0, sizeof(*ops));
        ops->private_data = private_data;
        ops->kops.private_data = ops;
-       ops->kops.add_len = sizeof(simple_instrument_t);
+       ops->kops.add_len = sizeof(struct simple_instrument);
        ops->kops.instr_type = SNDRV_SEQ_INSTR_ID_SIMPLE;
        ops->kops.put = snd_seq_simple_put;
        ops->kops.get = snd_seq_simple_get;