diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-10-30 07:17:17 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2008-01-31 11:29:13 -0500 |
commit | e5723b41abe559bafc52591dcf8ee19cc131d3a1 (patch) | |
tree | a1d035132ae1354c43eb9fccf60c9668e0abb266 /include/sound/asequencer.h | |
parent | 05c1afe75fcebf456017ec186811cf1599f4360e (diff) |
[ALSA] Remove sequencer instrument layer
Remove sequencer instrument layer from the tree.
This mechanism hasn't been used much with the actual devices. The only
reasonable user was OPL3 loader, and now it was rewritten to use hwdep
instead. So, let's remove the rest of rotten codes.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'include/sound/asequencer.h')
-rw-r--r-- | include/sound/asequencer.h | 242 |
1 files changed, 2 insertions, 240 deletions
diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h index 64daccbe8b29..1505e6d5ef82 100644 --- a/include/sound/asequencer.h +++ b/include/sound/asequencer.h | |||
@@ -110,18 +110,7 @@ | |||
110 | #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */ | 110 | #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED 66 /* ports connected */ |
111 | #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */ | 111 | #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67 /* ports disconnected */ |
112 | 112 | ||
113 | /** synthesizer events | 113 | /* 70-89: synthesizer events - obsoleted */ |
114 | * event data type = snd_seq_eve_sample_control | ||
115 | */ | ||
116 | #define SNDRV_SEQ_EVENT_SAMPLE 70 /* sample select */ | ||
117 | #define SNDRV_SEQ_EVENT_SAMPLE_CLUSTER 71 /* sample cluster select */ | ||
118 | #define SNDRV_SEQ_EVENT_SAMPLE_START 72 /* voice start */ | ||
119 | #define SNDRV_SEQ_EVENT_SAMPLE_STOP 73 /* voice stop */ | ||
120 | #define SNDRV_SEQ_EVENT_SAMPLE_FREQ 74 /* playback frequency */ | ||
121 | #define SNDRV_SEQ_EVENT_SAMPLE_VOLUME 75 /* volume and balance */ | ||
122 | #define SNDRV_SEQ_EVENT_SAMPLE_LOOP 76 /* sample loop */ | ||
123 | #define SNDRV_SEQ_EVENT_SAMPLE_POSITION 77 /* sample position */ | ||
124 | #define SNDRV_SEQ_EVENT_SAMPLE_PRIVATE1 78 /* private (hardware dependent) event */ | ||
125 | 114 | ||
126 | /** user-defined events with fixed length | 115 | /** user-defined events with fixed length |
127 | * event data type = any | 116 | * event data type = any |
@@ -137,28 +126,7 @@ | |||
137 | #define SNDRV_SEQ_EVENT_USR8 98 | 126 | #define SNDRV_SEQ_EVENT_USR8 98 |
138 | #define SNDRV_SEQ_EVENT_USR9 99 | 127 | #define SNDRV_SEQ_EVENT_USR9 99 |
139 | 128 | ||
140 | /** instrument layer | 129 | /* 100-118: instrument layer - obsoleted */ |
141 | * variable length data can be passed directly to the driver | ||
142 | */ | ||
143 | #define SNDRV_SEQ_EVENT_INSTR_BEGIN 100 /* begin of instrument management */ | ||
144 | #define SNDRV_SEQ_EVENT_INSTR_END 101 /* end of instrument management */ | ||
145 | #define SNDRV_SEQ_EVENT_INSTR_INFO 102 /* instrument interface info */ | ||
146 | #define SNDRV_SEQ_EVENT_INSTR_INFO_RESULT 103 /* result */ | ||
147 | #define SNDRV_SEQ_EVENT_INSTR_FINFO 104 /* get format info */ | ||
148 | #define SNDRV_SEQ_EVENT_INSTR_FINFO_RESULT 105 /* get format info */ | ||
149 | #define SNDRV_SEQ_EVENT_INSTR_RESET 106 /* reset instrument memory */ | ||
150 | #define SNDRV_SEQ_EVENT_INSTR_STATUS 107 /* instrument interface status */ | ||
151 | #define SNDRV_SEQ_EVENT_INSTR_STATUS_RESULT 108 /* result */ | ||
152 | #define SNDRV_SEQ_EVENT_INSTR_PUT 109 /* put instrument to port */ | ||
153 | #define SNDRV_SEQ_EVENT_INSTR_GET 110 /* get instrument from port */ | ||
154 | #define SNDRV_SEQ_EVENT_INSTR_GET_RESULT 111 /* result */ | ||
155 | #define SNDRV_SEQ_EVENT_INSTR_FREE 112 /* free instrument(s) */ | ||
156 | #define SNDRV_SEQ_EVENT_INSTR_LIST 113 /* instrument list */ | ||
157 | #define SNDRV_SEQ_EVENT_INSTR_LIST_RESULT 114 /* result */ | ||
158 | #define SNDRV_SEQ_EVENT_INSTR_CLUSTER 115 /* cluster parameters */ | ||
159 | #define SNDRV_SEQ_EVENT_INSTR_CLUSTER_GET 116 /* get cluster parameters */ | ||
160 | #define SNDRV_SEQ_EVENT_INSTR_CLUSTER_RESULT 117 /* result */ | ||
161 | #define SNDRV_SEQ_EVENT_INSTR_CHANGE 118 /* instrument change */ | ||
162 | /* 119-129: reserved */ | 130 | /* 119-129: reserved */ |
163 | 131 | ||
164 | /* 130-139: variable length events | 132 | /* 130-139: variable length events |
@@ -258,78 +226,6 @@ struct snd_seq_ev_ext { | |||
258 | void *ptr; /* pointer to data (note: maybe 64-bit) */ | 226 | void *ptr; /* pointer to data (note: maybe 64-bit) */ |
259 | } __attribute__((packed)); | 227 | } __attribute__((packed)); |
260 | 228 | ||
261 | /* Instrument cluster type */ | ||
262 | typedef unsigned int snd_seq_instr_cluster_t; | ||
263 | |||
264 | /* Instrument type */ | ||
265 | struct snd_seq_instr { | ||
266 | snd_seq_instr_cluster_t cluster; | ||
267 | unsigned int std; /* the upper byte means a private instrument (owner - client #) */ | ||
268 | unsigned short bank; | ||
269 | unsigned short prg; | ||
270 | }; | ||
271 | |||
272 | /* sample number */ | ||
273 | struct snd_seq_ev_sample { | ||
274 | unsigned int std; | ||
275 | unsigned short bank; | ||
276 | unsigned short prg; | ||
277 | }; | ||
278 | |||
279 | /* sample cluster */ | ||
280 | struct snd_seq_ev_cluster { | ||
281 | snd_seq_instr_cluster_t cluster; | ||
282 | }; | ||
283 | |||
284 | /* sample position */ | ||
285 | typedef unsigned int snd_seq_position_t; /* playback position (in samples) * 16 */ | ||
286 | |||
287 | /* sample stop mode */ | ||
288 | enum { | ||
289 | SAMPLE_STOP_IMMEDIATELY = 0, /* terminate playing immediately */ | ||
290 | SAMPLE_STOP_VENVELOPE = 1, /* finish volume envelope */ | ||
291 | SAMPLE_STOP_LOOP = 2 /* terminate loop and finish wave */ | ||
292 | }; | ||
293 | |||
294 | /* sample frequency */ | ||
295 | typedef int snd_seq_frequency_t; /* playback frequency in HZ * 16 */ | ||
296 | |||
297 | /* sample volume control; if any value is set to -1 == do not change */ | ||
298 | struct snd_seq_ev_volume { | ||
299 | signed short volume; /* range: 0-16383 */ | ||
300 | signed short lr; /* left-right balance; range: 0-16383 */ | ||
301 | signed short fr; /* front-rear balance; range: 0-16383 */ | ||
302 | signed short du; /* down-up balance; range: 0-16383 */ | ||
303 | }; | ||
304 | |||
305 | /* simple loop redefinition */ | ||
306 | struct snd_seq_ev_loop { | ||
307 | unsigned int start; /* loop start (in samples) * 16 */ | ||
308 | unsigned int end; /* loop end (in samples) * 16 */ | ||
309 | }; | ||
310 | |||
311 | struct snd_seq_ev_sample_control { | ||
312 | unsigned char channel; | ||
313 | unsigned char unused1, unused2, unused3; /* pad */ | ||
314 | union { | ||
315 | struct snd_seq_ev_sample sample; | ||
316 | struct snd_seq_ev_cluster cluster; | ||
317 | snd_seq_position_t position; | ||
318 | int stop_mode; | ||
319 | snd_seq_frequency_t frequency; | ||
320 | struct snd_seq_ev_volume volume; | ||
321 | struct snd_seq_ev_loop loop; | ||
322 | unsigned char raw8[8]; | ||
323 | } param; | ||
324 | }; | ||
325 | |||
326 | |||
327 | |||
328 | /* INSTR_BEGIN event */ | ||
329 | struct snd_seq_ev_instr_begin { | ||
330 | int timeout; /* zero = forever, otherwise timeout in ms */ | ||
331 | }; | ||
332 | |||
333 | struct snd_seq_result { | 229 | struct snd_seq_result { |
334 | int event; /* processed event type */ | 230 | int event; /* processed event type */ |
335 | int result; | 231 | int result; |
@@ -399,8 +295,6 @@ struct snd_seq_event { | |||
399 | struct snd_seq_addr addr; | 295 | struct snd_seq_addr addr; |
400 | struct snd_seq_connect connect; | 296 | struct snd_seq_connect connect; |
401 | struct snd_seq_result result; | 297 | struct snd_seq_result result; |
402 | struct snd_seq_ev_instr_begin instr_begin; | ||
403 | struct snd_seq_ev_sample_control sample; | ||
404 | struct snd_seq_ev_quote quote; | 298 | struct snd_seq_ev_quote quote; |
405 | } data; | 299 | } data; |
406 | }; | 300 | }; |
@@ -441,8 +335,6 @@ struct snd_seq_event_bounce { | |||
441 | #define snd_seq_ev_is_user_type(ev) ((ev)->type >= 90 && (ev)->type < 99) | 335 | #define snd_seq_ev_is_user_type(ev) ((ev)->type >= 90 && (ev)->type < 99) |
442 | /* fixed length events: 0-99 */ | 336 | /* fixed length events: 0-99 */ |
443 | #define snd_seq_ev_is_fixed_type(ev) ((ev)->type < 100) | 337 | #define snd_seq_ev_is_fixed_type(ev) ((ev)->type < 100) |
444 | /* instrument layer events: 100-129 */ | ||
445 | #define snd_seq_ev_is_instr_type(ev) ((ev)->type >= 100 && (ev)->type < 130) | ||
446 | /* variable length events: 130-139 */ | 338 | /* variable length events: 130-139 */ |
447 | #define snd_seq_ev_is_variable_type(ev) ((ev)->type >= 130 && (ev)->type < 140) | 339 | #define snd_seq_ev_is_variable_type(ev) ((ev)->type >= 130 && (ev)->type < 140) |
448 | /* reserved for kernel */ | 340 | /* reserved for kernel */ |
@@ -738,136 +630,6 @@ struct snd_seq_query_subs { | |||
738 | 630 | ||
739 | 631 | ||
740 | /* | 632 | /* |
741 | * Instrument abstraction layer | ||
742 | * - based on events | ||
743 | */ | ||
744 | |||
745 | /* instrument types */ | ||
746 | #define SNDRV_SEQ_INSTR_ATYPE_DATA 0 /* instrument data */ | ||
747 | #define SNDRV_SEQ_INSTR_ATYPE_ALIAS 1 /* instrument alias */ | ||
748 | |||
749 | /* instrument ASCII identifiers */ | ||
750 | #define SNDRV_SEQ_INSTR_ID_DLS1 "DLS1" | ||
751 | #define SNDRV_SEQ_INSTR_ID_DLS2 "DLS2" | ||
752 | #define SNDRV_SEQ_INSTR_ID_SIMPLE "Simple Wave" | ||
753 | #define SNDRV_SEQ_INSTR_ID_SOUNDFONT "SoundFont" | ||
754 | #define SNDRV_SEQ_INSTR_ID_GUS_PATCH "GUS Patch" | ||
755 | #define SNDRV_SEQ_INSTR_ID_INTERWAVE "InterWave FFFF" | ||
756 | #define SNDRV_SEQ_INSTR_ID_OPL2_3 "OPL2/3 FM" | ||
757 | #define SNDRV_SEQ_INSTR_ID_OPL4 "OPL4" | ||
758 | |||
759 | /* instrument types */ | ||
760 | #define SNDRV_SEQ_INSTR_TYPE0_DLS1 (1<<0) /* MIDI DLS v1 */ | ||
761 | #define SNDRV_SEQ_INSTR_TYPE0_DLS2 (1<<1) /* MIDI DLS v2 */ | ||
762 | #define SNDRV_SEQ_INSTR_TYPE1_SIMPLE (1<<0) /* Simple Wave */ | ||
763 | #define SNDRV_SEQ_INSTR_TYPE1_SOUNDFONT (1<<1) /* EMU SoundFont */ | ||
764 | #define SNDRV_SEQ_INSTR_TYPE1_GUS_PATCH (1<<2) /* Gravis UltraSound Patch */ | ||
765 | #define SNDRV_SEQ_INSTR_TYPE1_INTERWAVE (1<<3) /* InterWave FFFF */ | ||
766 | #define SNDRV_SEQ_INSTR_TYPE2_OPL2_3 (1<<0) /* Yamaha OPL2/3 FM */ | ||
767 | #define SNDRV_SEQ_INSTR_TYPE2_OPL4 (1<<1) /* Yamaha OPL4 */ | ||
768 | |||
769 | /* put commands */ | ||
770 | #define SNDRV_SEQ_INSTR_PUT_CMD_CREATE 0 | ||
771 | #define SNDRV_SEQ_INSTR_PUT_CMD_REPLACE 1 | ||
772 | #define SNDRV_SEQ_INSTR_PUT_CMD_MODIFY 2 | ||
773 | #define SNDRV_SEQ_INSTR_PUT_CMD_ADD 3 | ||
774 | #define SNDRV_SEQ_INSTR_PUT_CMD_REMOVE 4 | ||
775 | |||
776 | /* get commands */ | ||
777 | #define SNDRV_SEQ_INSTR_GET_CMD_FULL 0 | ||
778 | #define SNDRV_SEQ_INSTR_GET_CMD_PARTIAL 1 | ||
779 | |||
780 | /* query flags */ | ||
781 | #define SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS (1<<0) | ||
782 | |||
783 | /* free commands */ | ||
784 | #define SNDRV_SEQ_INSTR_FREE_CMD_ALL 0 | ||
785 | #define SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE 1 | ||
786 | #define SNDRV_SEQ_INSTR_FREE_CMD_CLUSTER 2 | ||
787 | #define SNDRV_SEQ_INSTR_FREE_CMD_SINGLE 3 | ||
788 | |||
789 | /* size of ROM/RAM */ | ||
790 | typedef unsigned int snd_seq_instr_size_t; | ||
791 | |||
792 | /* INSTR_INFO */ | ||
793 | |||
794 | struct snd_seq_instr_info { | ||
795 | int result; /* operation result */ | ||
796 | unsigned int formats[8]; /* bitmap of supported formats */ | ||
797 | int ram_count; /* count of RAM banks */ | ||
798 | snd_seq_instr_size_t ram_sizes[16]; /* size of RAM banks */ | ||
799 | int rom_count; /* count of ROM banks */ | ||
800 | snd_seq_instr_size_t rom_sizes[8]; /* size of ROM banks */ | ||
801 | char reserved[128]; | ||
802 | }; | ||
803 | |||
804 | /* INSTR_STATUS */ | ||
805 | |||
806 | struct snd_seq_instr_status { | ||
807 | int result; /* operation result */ | ||
808 | snd_seq_instr_size_t free_ram[16]; /* free RAM in banks */ | ||
809 | int instrument_count; /* count of downloaded instruments */ | ||
810 | char reserved[128]; | ||
811 | }; | ||
812 | |||
813 | /* INSTR_FORMAT_INFO */ | ||
814 | |||
815 | struct snd_seq_instr_format_info { | ||
816 | char format[16]; /* format identifier - SNDRV_SEQ_INSTR_ID_* */ | ||
817 | unsigned int len; /* max data length (without this structure) */ | ||
818 | }; | ||
819 | |||
820 | struct snd_seq_instr_format_info_result { | ||
821 | int result; /* operation result */ | ||
822 | char format[16]; /* format identifier */ | ||
823 | unsigned int len; /* filled data length (without this structure) */ | ||
824 | }; | ||
825 | |||
826 | /* instrument data */ | ||
827 | struct snd_seq_instr_data { | ||
828 | char name[32]; /* instrument name */ | ||
829 | char reserved[16]; /* for the future use */ | ||
830 | int type; /* instrument type */ | ||
831 | union { | ||
832 | char format[16]; /* format identifier */ | ||
833 | struct snd_seq_instr alias; | ||
834 | } data; | ||
835 | }; | ||
836 | |||
837 | /* INSTR_PUT/GET, data are stored in one block (extended), header + data */ | ||
838 | |||
839 | struct snd_seq_instr_header { | ||
840 | union { | ||
841 | struct snd_seq_instr instr; | ||
842 | snd_seq_instr_cluster_t cluster; | ||
843 | } id; /* instrument identifier */ | ||
844 | unsigned int cmd; /* get/put/free command */ | ||
845 | unsigned int flags; /* query flags (only for get) */ | ||
846 | unsigned int len; /* real instrument data length (without header) */ | ||
847 | int result; /* operation result */ | ||
848 | char reserved[16]; /* for the future */ | ||
849 | struct snd_seq_instr_data data; /* instrument data (for put/get result) */ | ||
850 | }; | ||
851 | |||
852 | /* INSTR_CLUSTER_SET */ | ||
853 | |||
854 | struct snd_seq_instr_cluster_set { | ||
855 | snd_seq_instr_cluster_t cluster; /* cluster identifier */ | ||
856 | char name[32]; /* cluster name */ | ||
857 | int priority; /* cluster priority */ | ||
858 | char reserved[64]; /* for the future use */ | ||
859 | }; | ||
860 | |||
861 | /* INSTR_CLUSTER_GET */ | ||
862 | |||
863 | struct snd_seq_instr_cluster_get { | ||
864 | snd_seq_instr_cluster_t cluster; /* cluster identifier */ | ||
865 | char name[32]; /* cluster name */ | ||
866 | int priority; /* cluster priority */ | ||
867 | char reserved[64]; /* for the future use */ | ||
868 | }; | ||
869 | |||
870 | /* | ||
871 | * IOCTL commands | 633 | * IOCTL commands |
872 | */ | 634 | */ |
873 | 635 | ||