Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15967
b: refs/heads/master
c: 19ac31e
h: refs/heads/master
i:
  15965: f919e57
  15963: 5d72047
  15959: 22a4ca6
  15951: d64cb85
  15935: fadc8cf
v: v3
  • Loading branch information
Takashi Iwai authored and Jaroslav Kysela committed Jan 3, 2006
1 parent 35136d7 commit b0e94be
Show file tree
Hide file tree
Showing 9 changed files with 273 additions and 251 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c7e0b5bf9fff1b726495081447c107a2333fb82c
refs/heads/master: 19ac31e82cc7328c01bf26f824f33c7c38cb6075
28 changes: 16 additions & 12 deletions trunk/include/sound/ainstr_fm.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@
* 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
Expand All @@ -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;
Expand All @@ -68,7 +68,7 @@ typedef struct {
unsigned char fix_dur;
unsigned char modes;
unsigned char fix_key;
} fm_instrument_t;
};

/*
*
Expand All @@ -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;
Expand All @@ -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 */
46 changes: 25 additions & 21 deletions trunk/include/sound/ainstr_gf1.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */

Expand Down Expand Up @@ -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
Expand All @@ -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 */

Expand All @@ -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 */
};

/*
*
Expand All @@ -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 */
Expand Down Expand Up @@ -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;
Expand All @@ -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
Expand All @@ -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 */
Loading

0 comments on commit b0e94be

Please sign in to comment.