diff options
| author | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 11:39:33 -0500 |
|---|---|---|
| committer | Anton Altaparmakov <aia21@cantab.net> | 2006-01-19 11:39:33 -0500 |
| commit | 944d79559d154c12becde0dab327016cf438f46c (patch) | |
| tree | 50c101806f4d3b6585222dda060559eb4f3e005a /include/sound/seq_instr.h | |
| parent | d087e4bdd24ebe3ae3d0b265b6573ec901af4b4b (diff) | |
| parent | 0f36b018b2e314d45af86449f1a97facb1fbe300 (diff) | |
Merge branch 'master' of /usr/src/ntfs-2.6/
Diffstat (limited to 'include/sound/seq_instr.h')
| -rw-r--r-- | include/sound/seq_instr.h | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/include/sound/seq_instr.h b/include/sound/seq_instr.h index 1a654df4aa97..db764f09efb7 100644 --- a/include/sound/seq_instr.h +++ b/include/sound/seq_instr.h | |||
| @@ -24,29 +24,27 @@ | |||
| 24 | #include "seq_kernel.h" | 24 | #include "seq_kernel.h" |
| 25 | 25 | ||
| 26 | /* Instrument cluster */ | 26 | /* Instrument cluster */ |
| 27 | typedef struct _snd_seq_kcluster { | 27 | struct snd_seq_kcluster { |
| 28 | snd_seq_instr_cluster_t cluster; | 28 | snd_seq_instr_cluster_t cluster; |
| 29 | char name[32]; | 29 | char name[32]; |
| 30 | int priority; | 30 | int priority; |
| 31 | struct _snd_seq_kcluster *next; | 31 | struct snd_seq_kcluster *next; |
| 32 | } snd_seq_kcluster_t; | 32 | }; |
| 33 | 33 | ||
| 34 | /* return pointer to private data */ | 34 | /* return pointer to private data */ |
| 35 | #define KINSTR_DATA(kinstr) (void *)(((char *)kinstr) + sizeof(snd_seq_kinstr_t)) | 35 | #define KINSTR_DATA(kinstr) (void *)(((char *)kinstr) + sizeof(struct snd_seq_kinstr)) |
| 36 | |||
| 37 | typedef struct snd_seq_kinstr_ops snd_seq_kinstr_ops_t; | ||
| 38 | 36 | ||
| 39 | /* Instrument structure */ | 37 | /* Instrument structure */ |
| 40 | typedef struct _snd_seq_kinstr { | 38 | struct snd_seq_kinstr { |
| 41 | snd_seq_instr_t instr; | 39 | struct snd_seq_instr instr; |
| 42 | char name[32]; | 40 | char name[32]; |
| 43 | int type; /* instrument type */ | 41 | int type; /* instrument type */ |
| 44 | int use; /* use count */ | 42 | int use; /* use count */ |
| 45 | int busy; /* not useable */ | 43 | int busy; /* not useable */ |
| 46 | int add_len; /* additional length */ | 44 | int add_len; /* additional length */ |
| 47 | snd_seq_kinstr_ops_t *ops; /* operations */ | 45 | struct snd_seq_kinstr_ops *ops; /* operations */ |
| 48 | struct _snd_seq_kinstr *next; | 46 | struct snd_seq_kinstr *next; |
| 49 | } snd_seq_kinstr_t; | 47 | }; |
| 50 | 48 | ||
| 51 | #define SNDRV_SEQ_INSTR_HASH_SIZE 32 | 49 | #define SNDRV_SEQ_INSTR_HASH_SIZE 32 |
| 52 | 50 | ||
| @@ -54,11 +52,11 @@ typedef struct _snd_seq_kinstr { | |||
| 54 | #define SNDRV_SEQ_INSTR_FLG_DIRECT (1<<0) /* accept only direct events */ | 52 | #define SNDRV_SEQ_INSTR_FLG_DIRECT (1<<0) /* accept only direct events */ |
| 55 | 53 | ||
| 56 | /* List of all instruments */ | 54 | /* List of all instruments */ |
| 57 | typedef struct { | 55 | struct snd_seq_kinstr_list { |
| 58 | snd_seq_kinstr_t *hash[SNDRV_SEQ_INSTR_HASH_SIZE]; | 56 | struct snd_seq_kinstr *hash[SNDRV_SEQ_INSTR_HASH_SIZE]; |
| 59 | int count; /* count of all instruments */ | 57 | int count; /* count of all instruments */ |
| 60 | 58 | ||
| 61 | snd_seq_kcluster_t *chash[SNDRV_SEQ_INSTR_HASH_SIZE]; | 59 | struct snd_seq_kcluster *chash[SNDRV_SEQ_INSTR_HASH_SIZE]; |
| 62 | int ccount; /* count of all clusters */ | 60 | int ccount; /* count of all clusters */ |
| 63 | 61 | ||
| 64 | int owner; /* current owner of the instrument list */ | 62 | int owner; /* current owner of the instrument list */ |
| @@ -68,7 +66,7 @@ typedef struct { | |||
| 68 | spinlock_t ops_lock; | 66 | spinlock_t ops_lock; |
| 69 | struct semaphore ops_mutex; | 67 | struct semaphore ops_mutex; |
| 70 | unsigned long ops_flags; | 68 | unsigned long ops_flags; |
| 71 | } snd_seq_kinstr_list_t; | 69 | }; |
| 72 | 70 | ||
| 73 | #define SNDRV_SEQ_INSTR_NOTIFY_REMOVE 0 | 71 | #define SNDRV_SEQ_INSTR_NOTIFY_REMOVE 0 |
| 74 | #define SNDRV_SEQ_INSTR_NOTIFY_CHANGE 1 | 72 | #define SNDRV_SEQ_INSTR_NOTIFY_CHANGE 1 |
| @@ -78,33 +76,33 @@ struct snd_seq_kinstr_ops { | |||
| 78 | long add_len; /* additional length */ | 76 | long add_len; /* additional length */ |
| 79 | char *instr_type; | 77 | char *instr_type; |
| 80 | int (*info)(void *private_data, char *info_data, long len); | 78 | int (*info)(void *private_data, char *info_data, long len); |
| 81 | int (*put)(void *private_data, snd_seq_kinstr_t *kinstr, | 79 | int (*put)(void *private_data, struct snd_seq_kinstr *kinstr, |
| 82 | char __user *instr_data, long len, int atomic, int cmd); | 80 | char __user *instr_data, long len, int atomic, int cmd); |
| 83 | int (*get)(void *private_data, snd_seq_kinstr_t *kinstr, | 81 | int (*get)(void *private_data, struct snd_seq_kinstr *kinstr, |
| 84 | char __user *instr_data, long len, int atomic, int cmd); | 82 | char __user *instr_data, long len, int atomic, int cmd); |
| 85 | int (*get_size)(void *private_data, snd_seq_kinstr_t *kinstr, long *size); | 83 | int (*get_size)(void *private_data, struct snd_seq_kinstr *kinstr, long *size); |
| 86 | int (*remove)(void *private_data, snd_seq_kinstr_t *kinstr, int atomic); | 84 | int (*remove)(void *private_data, struct snd_seq_kinstr *kinstr, int atomic); |
| 87 | void (*notify)(void *private_data, snd_seq_kinstr_t *kinstr, int what); | 85 | void (*notify)(void *private_data, struct snd_seq_kinstr *kinstr, int what); |
| 88 | struct snd_seq_kinstr_ops *next; | 86 | struct snd_seq_kinstr_ops *next; |
| 89 | }; | 87 | }; |
| 90 | 88 | ||
| 91 | 89 | ||
| 92 | /* instrument operations */ | 90 | /* instrument operations */ |
| 93 | snd_seq_kinstr_list_t *snd_seq_instr_list_new(void); | 91 | struct snd_seq_kinstr_list *snd_seq_instr_list_new(void); |
| 94 | void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list); | 92 | void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list); |
| 95 | int snd_seq_instr_list_free_cond(snd_seq_kinstr_list_t *list, | 93 | int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list, |
| 96 | snd_seq_instr_header_t *ifree, | 94 | struct snd_seq_instr_header *ifree, |
| 97 | int client, | 95 | int client, |
| 98 | int atomic); | 96 | int atomic); |
| 99 | snd_seq_kinstr_t *snd_seq_instr_find(snd_seq_kinstr_list_t *list, | 97 | struct snd_seq_kinstr *snd_seq_instr_find(struct snd_seq_kinstr_list *list, |
| 100 | snd_seq_instr_t *instr, | 98 | struct snd_seq_instr *instr, |
| 101 | int exact, | 99 | int exact, |
| 102 | int follow_alias); | 100 | int follow_alias); |
| 103 | void snd_seq_instr_free_use(snd_seq_kinstr_list_t *list, | 101 | void snd_seq_instr_free_use(struct snd_seq_kinstr_list *list, |
| 104 | snd_seq_kinstr_t *instr); | 102 | struct snd_seq_kinstr *instr); |
| 105 | int snd_seq_instr_event(snd_seq_kinstr_ops_t *ops, | 103 | int snd_seq_instr_event(struct snd_seq_kinstr_ops *ops, |
| 106 | snd_seq_kinstr_list_t *list, | 104 | struct snd_seq_kinstr_list *list, |
| 107 | snd_seq_event_t *ev, | 105 | struct snd_seq_event *ev, |
| 108 | int client, | 106 | int client, |
| 109 | int atomic, | 107 | int atomic, |
| 110 | int hop); | 108 | int hop); |
