]> git.alsa-project.org Git - alsa-lib.git/commitdiff
Remove sequencer instrument layer
authorTakashi Iwai <tiwai@suse.de>
Tue, 30 Oct 2007 11:31:55 +0000 (12:31 +0100)
committerTakashi Iwai <tiwai@suse.de>
Tue, 30 Oct 2007 11:31:55 +0000 (12:31 +0100)
Remove obsoleted sequencer instrument layer from alsa-lib.
The old symbols are compiled in as default as dummy functions
(unless --disable-old-symbols is given to configure) so that
the old binaries can still work more or less.

18 files changed:
configure.in
doc/doxygen.cfg
include/Makefile.am
include/conv.h [deleted file]
include/instr.h [deleted file]
include/local.h
include/seq_event.h
include/sound/Makefile.am
include/sound/ainstr_fm.h [deleted file]
include/sound/ainstr_gf1.h [deleted file]
include/sound/ainstr_iw.h [deleted file]
include/sound/ainstr_simple.h [deleted file]
include/sound/asequencer.h
src/Makefile.am
src/seq/Makefile.am
src/seq/seq.c
src/seq/seq_event.c
src/seq/seq_old.c [new file with mode: 0644]

index 8ae68c1645e8732d3a7b8ae75d8a7338d6ac2d05..706080502299c88b3895f85e4f83769fac8bdf27 100644 (file)
@@ -344,12 +344,14 @@ AC_ARG_ENABLE(hwdep,
 AC_ARG_ENABLE(seq,
   AS_HELP_STRING([--disable-seq], [disable the sequencer component]),
   [build_seq="$enableval"], [build_seq="yes"])
-AC_ARG_ENABLE(instr,
-  AS_HELP_STRING([--disable-instr], [disable the instrument component]),
-  [build_instr="$enableval"], [build_instr="yes"])
 AC_ARG_ENABLE(alisp,
   AS_HELP_STRING([--disable-alisp], [disable the alisp component]),
   [build_alisp="$enableval"], [build_alisp="yes"])
+AC_ARG_ENABLE(old-symbols,
+  AS_HELP_STRING([--disable-old-symbols], [disable old obsoleted symbols]),
+  [keep_old_symbols="$enableval"], [keep_old_symbols="yes"])
+AM_CONDITIONAL(KEEP_OLD_SYMBOLS, test x$keep_old_symbols = xyes)
+
 AC_ARG_ENABLE(python,
   AS_HELP_STRING([--disable-python], [disable the python components]),
   [build_python="$enableval"], [build_python="yes"])
@@ -377,16 +379,11 @@ fi
 AC_SUBST(PYTHON_LIBS)
 AC_SUBST(PYTHON_INCLUDES)
 
-if test "$build_seq" != "yes"; then
-  build_instr="no"
-fi
-
 AM_CONDITIONAL(BUILD_MIXER, test x$build_mixer = xyes)
 AM_CONDITIONAL(BUILD_PCM, test x$build_pcm = xyes)
 AM_CONDITIONAL(BUILD_RAWMIDI, test x$build_rawmidi = xyes)
 AM_CONDITIONAL(BUILD_HWDEP, test x$build_hwdep = xyes)
 AM_CONDITIONAL(BUILD_SEQ, test x$build_seq = xyes)
-AM_CONDITIONAL(BUILD_INSTR, test x$build_instr = xyes)
 AM_CONDITIONAL(BUILD_ALISP, test x$build_alisp = xyes)
 AM_CONDITIONAL(BUILD_PYTHON, test x$build_python = xyes)
 
@@ -405,9 +402,6 @@ fi
 if test "$build_seq" = "yes"; then
   AC_DEFINE([BUILD_SEQ], "1", [Build sequencer component])
 fi
-if test "$build_instr" = "yes"; then
-  AC_DEFINE([BUILD_INSTR], "1", [Build instrument component])
-fi
 
 dnl PCM Plugins
 
@@ -570,7 +564,7 @@ AC_OUTPUT(Makefile doc/Makefile doc/pictures/Makefile include/Makefile
           src/control/Makefile src/mixer/Makefile \
          src/pcm/Makefile src/pcm/scopes/Makefile \
          src/rawmidi/Makefile src/timer/Makefile \
-          src/hwdep/Makefile src/seq/Makefile src/instr/Makefile \
+          src/hwdep/Makefile src/seq/Makefile \
           src/compat/Makefile src/alisp/Makefile src/conf/Makefile \
          src/conf/cards/Makefile \
          src/conf/pcm/Makefile \
index dc55cbeabc7d350106ce246898d26a08974a5f95..94c03d1db8ec25a055c9cfe54cdd3c6398d461f0 100644 (file)
@@ -28,8 +28,6 @@ INPUT            = index.doxygen \
                   ../include/pcm_ioplug.h \
                   ../include/control_external.h \
                   ../include/mixer.h \
-                  ../include/conv.h \
-                  ../include/instr.h \
                   ../src/error.c \
                   ../src/dlmisc.c \
                   ../src/async.c \
index 5ce51d24e0a60422e93f310f4ee5cae319c801fb..a29150345fdca5ad964a5d90eb869a5df74d3ea3 100644 (file)
@@ -46,10 +46,6 @@ if BUILD_SEQ
 alsainclude_HEADERS += seq_event.h seq.h seqmid.h seq_midi_event.h
 endif
 
-if BUILD_INSTR
-alsainclude_HEADERS += conv.h instr.h
-endif
-
 if BUILD_ALISP
 alsainclude_HEADERS += alisp.h
 endif
diff --git a/include/conv.h b/include/conv.h
deleted file mode 100644 (file)
index 27d624c..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * \file include/conv.h
- * \brief Application interface library for the ALSA driver
- * \author Jaroslav Kysela <perex@perex.cz>
- * \author Abramo Bagnara <abramo@alsa-project.org>
- * \author Takashi Iwai <tiwai@suse.de>
- * \date 1998-2001
- *
- * Application interface library for the ALSA driver
- */
-/*
- *   This library is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU Lesser General Public License as
- *   published by the Free Software Foundation; either version 2.1 of
- *   the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
- *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with this library; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- */
-
-#ifndef __ALSA_CONV_H
-#define __ALSA_CONV_H
-
-/**
- *  \defgroup BConv Binary Value Conversion
- *  Helper macros to convert binary values to/from a specific byte order.
- *  \{
- */
-
-/** Converts a 16-bit value from host to little endian byte order. */
-#define snd_host_to_LE_16(val) __cpu_to_le16(val)
-/** Converts a 16-bit value from little endian to host byte order. */
-#define snd_LE_to_host_16(val) __le16_to_cpu(val)
-/** Converts a 32-bit value from host to little endian byte order. */
-#define snd_host_to_LE_32(val) __cpu_to_le32(val)
-/** Converts a 32-bit value from little endian to host byte order. */
-#define snd_LE_to_host_32(val) __le32_to_cpu(val)
-/** Converts a 16-bit value from host to big endian byte order. */
-#define snd_host_to_BE_16(val) __cpu_to_be16(val)
-/** Converts a 16-bit value from big endian to host byte order. */
-#define snd_BE_to_host_16(val) __be16_to_cpu(val)
-/** Converts a 32-bit value from host to big endian byte order. */
-#define snd_host_to_BE_32(val) __cpu_to_be32(val)
-/** Converts a 32-bit value from big endian to host byte order. */
-#define snd_BE_to_host_32(val) __be32_to_cpu(val)
-
-/** \} */
-
-#endif /* __ALSA_CONV_H */
-
diff --git a/include/instr.h b/include/instr.h
deleted file mode 100644 (file)
index b4232d3..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/**
- * \file include/instr.h
- * \brief Application interface library for the ALSA driver
- * \author Jaroslav Kysela <perex@perex.cz>
- * \author Abramo Bagnara <abramo@alsa-project.org>
- * \author Takashi Iwai <tiwai@suse.de>
- * \date 1998-2001
- *
- * Application interface library for the ALSA driver
- */
-/*
- *   This library is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU Lesser General Public License as
- *   published by the Free Software Foundation; either version 2.1 of
- *   the License, or (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU Lesser General Public License for more details.
- *
- *   You should have received a copy of the GNU Lesser General Public
- *   License along with this library; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- */
-
-#ifndef __ALSA_INSTR_H
-#define __ALSA_INSTR_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- *  \defgroup Instrument Instrument Interface
- *  The Instrument Interface.
- *  \{
- */
-
-/* instrument get/put */
-
-/** container for sequencer instrument header */
-typedef struct _snd_instr_header snd_instr_header_t;
-
-size_t snd_instr_header_sizeof(void);
-/** allocate instrument header on stack */
-#define snd_instr_header_alloca(ptr) __snd_alloca(ptr, snd_instr_header)
-int snd_instr_header_malloc(snd_instr_header_t **ptr, size_t len);
-void snd_instr_header_free(snd_instr_header_t *ptr);
-void snd_instr_header_copy(snd_instr_header_t *dst, const snd_instr_header_t *src);
-
-const snd_seq_instr_t *snd_instr_header_get_id(const snd_instr_header_t *info);
-snd_seq_instr_cluster_t snd_instr_header_get_cluster(const snd_instr_header_t *info);
-unsigned int snd_instr_header_get_cmd(const snd_instr_header_t *info);
-size_t snd_instr_header_get_len(const snd_instr_header_t *info);
-const char *snd_instr_header_get_name(const snd_instr_header_t *info);
-int snd_instr_header_get_type(const snd_instr_header_t *info);
-const char *snd_instr_header_get_format(const snd_instr_header_t *info);
-const snd_seq_instr_t *snd_instr_header_get_alias(const snd_instr_header_t *info);
-void *snd_instr_header_get_data(const snd_instr_header_t *info);
-int snd_instr_header_get_follow_alias(const snd_instr_header_t *info);
-
-void snd_instr_header_set_id(snd_instr_header_t *info, const snd_seq_instr_t *id);
-void snd_instr_header_set_cluster(snd_instr_header_t *info, snd_seq_instr_cluster_t cluster);
-void snd_instr_header_set_cmd(snd_instr_header_t *info, unsigned int cmd);
-void snd_instr_header_set_len(snd_instr_header_t *info, size_t len);
-void snd_instr_header_set_name(snd_instr_header_t *info, const char *name);
-void snd_instr_header_set_type(snd_instr_header_t *info, int type);
-void snd_instr_header_set_format(snd_instr_header_t *info, const char *format);
-void snd_instr_header_set_alias(snd_instr_header_t *info, const snd_seq_instr_t *instr);
-void snd_instr_header_set_follow_alias(snd_instr_header_t *info, int val);
-
-/**
- *  Instrument abstraction layer
- *     - based on events
- */
-
-/** instrument types */
-#define SND_SEQ_INSTR_ATYPE_DATA       0       /**< instrument data */
-#define SND_SEQ_INSTR_ATYPE_ALIAS      1       /**< instrument alias */
-
-/** instrument ASCII identifiers */
-#define SND_SEQ_INSTR_ID_DLS1          "DLS1"          /**< DLS1 */
-#define SND_SEQ_INSTR_ID_DLS2          "DLS2"          /**< DLS2 */
-#define SND_SEQ_INSTR_ID_SIMPLE                "Simple Wave"   /**< Simple Wave */
-#define SND_SEQ_INSTR_ID_SOUNDFONT     "SoundFont"     /**< SoundFont */
-#define SND_SEQ_INSTR_ID_GUS_PATCH     "GUS Patch"     /**< Gravis Patch */
-#define SND_SEQ_INSTR_ID_INTERWAVE     "Interwave FFFF" /**< InterWave FFFF */
-#define SND_SEQ_INSTR_ID_OPL2_3                "OPL2/3 FM"     /**< OPL2/3 FM */
-#define SND_SEQ_INSTR_ID_OPL4          "OPL4"          /**< OPL4 */
-
-/** instrument types */
-#define SND_SEQ_INSTR_TYPE0_DLS1       (1<<0)          /**< MIDI DLS v1 */
-#define SND_SEQ_INSTR_TYPE0_DLS2       (1<<1)          /**< MIDI DLS v2 */
-#define SND_SEQ_INSTR_TYPE1_SIMPLE     (1<<0)          /**< Simple Wave */
-#define SND_SEQ_INSTR_TYPE1_SOUNDFONT  (1<<1)          /**< EMU SoundFont */
-#define SND_SEQ_INSTR_TYPE1_GUS_PATCH  (1<<2)          /**< Gravis UltraSound Patch */
-#define SND_SEQ_INSTR_TYPE1_INTERWAVE  (1<<3)          /**< InterWave FFFF */
-#define SND_SEQ_INSTR_TYPE2_OPL2_3     (1<<0)          /**< Yamaha OPL2/3 FM */
-#define SND_SEQ_INSTR_TYPE2_OPL4       (1<<1)          /**< Yamaha OPL4 */
-
-/** put commands */
-#define SND_SEQ_INSTR_PUT_CMD_CREATE   0       /**< create a new layer */
-#define SND_SEQ_INSTR_PUT_CMD_REPLACE  1       /**< replace the old layer with new one */
-#define SND_SEQ_INSTR_PUT_CMD_MODIFY   2       /**< modify the existing layer */
-#define SND_SEQ_INSTR_PUT_CMD_ADD      3       /**< add one to the existing layer */
-#define SND_SEQ_INSTR_PUT_CMD_REMOVE   4       /**< remove the layer */
-
-/** get commands */
-#define SND_SEQ_INSTR_GET_CMD_FULL     0       /**< get the full data stream */
-#define SND_SEQ_INSTR_GET_CMD_PARTIAL  1       /**< get the partial data stream */
-
-/* query flags */
-#define SND_SEQ_INSTR_QUERY_FOLLOW_ALIAS (1<<0)        /**< follow alias to get the instrument data */
-
-/** free commands */
-#define SND_SEQ_INSTR_FREE_CMD_ALL     0       /**< remove all matching instruments */
-#define SND_SEQ_INSTR_FREE_CMD_PRIVATE 1       /**< remove only private instruments */
-#define SND_SEQ_INSTR_FREE_CMD_CLUSTER 2       /**< remove only cluster instruments */
-#define SND_SEQ_INSTR_FREE_CMD_SINGLE  3       /**< remove single instrument */
-
-
-/**
- * FM instrument support
- */
-
-/** FM instrument data structure */
-typedef void snd_instr_fm_t;
-
-int snd_instr_fm_convert_to_stream(snd_instr_fm_t *fm, const char *name, snd_instr_header_t **put, size_t *size);
-int snd_instr_fm_convert_from_stream(snd_instr_header_t *data, size_t size, snd_instr_fm_t **fm);
-int snd_instr_fm_free(snd_instr_fm_t *fm);
-
-
-/**
- * Simple Wave support
- */
-
-/** simple instrument data structure */
-typedef void snd_instr_simple_t;
-
-int snd_instr_simple_convert_to_stream(snd_instr_simple_t *simple, const char *name, snd_instr_header_t **put, size_t *size);
-int snd_instr_simple_convert_from_stream(snd_instr_header_t *data, size_t size, snd_instr_simple_t **simple);
-int snd_instr_simple_free(snd_instr_simple_t *simple);
-
-
-/**
- * InterWave FFFF support
- */
-
-/** IW FFFF instrument data structure */
-typedef void snd_instr_iwffff_t;
-/** IW FFFF handler */
-typedef struct _snd_iwffff_handle snd_iwffff_handle_t;
-
-int snd_instr_iwffff_open(snd_iwffff_handle_t **handle, const char *name_fff, const char *name_dta);
-int snd_instr_iwffff_open_rom(snd_iwffff_handle_t **handle, int card, int bank, int file);
-int snd_instr_iwffff_open_rom_file(snd_iwffff_handle_t **handle, const char *name, int bank, int file);
-int snd_instr_iwffff_close(snd_iwffff_handle_t *handle);
-int snd_instr_iwffff_load(snd_iwffff_handle_t *handle, int bank, int prg, snd_instr_iwffff_t **iwffff);
-int snd_instr_iwffff_convert_to_stream(snd_instr_iwffff_t *iwffff, const char *name, snd_instr_header_t **data, size_t *size);
-int snd_instr_iwffff_convert_from_stream(snd_instr_header_t *data, size_t size, snd_instr_iwffff_t **iwffff);
-int snd_instr_iwffff_free(snd_instr_iwffff_t *iwffff);
-
-/** \} */
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* __ALSA_INSTR_H */
-
index 9f98f929fe0acfb8053904ea1489d75cfd9fea1a..da914ac66659120a156d987b6900125d7b8df4b7 100644 (file)
 #define _snd_seq_query_subscribe sndrv_seq_query_subs
 #define _snd_seq_client_pool sndrv_seq_client_pool
 #define _snd_seq_remove_events sndrv_seq_remove_events
-#define _snd_instr_header sndrv_seq_instr_header
 
 #define sndrv_seq_addr snd_seq_addr
 #define sndrv_seq_tick_time_t  snd_seq_tick_time_t
 #define sndrv_seq_real_time    snd_seq_real_time
 #define sndrv_seq_timestamp    snd_seq_timestamp
-#define sndrv_seq_instr                snd_seq_instr
 #define sndrv_seq_event                snd_seq_event
-#define sndrv_seq_instr_cluster_t      snd_seq_instr_cluster_t
 
 #if 0
 typedef struct sndrv_seq_addr snd_seq_addr_t;
 #define snd_seq_tick_time_t sndrv_seq_tick_time_t
 typedef struct sndrv_seq_real_time snd_seq_real_time_t;
 typedef union sndrv_seq_timestamp snd_seq_timestamp_t;
-typedef struct sndrv_seq_instr snd_seq_instr_t;
 typedef struct sndrv_seq_event snd_seq_event_t;
-#define snd_seq_instr_cluster_t sndrv_seq_instr_cluster_t
 #endif
 
 #define _snd_timer_id sndrv_timer_id
@@ -128,8 +123,6 @@ typedef struct sndrv_seq_event snd_seq_event_t;
 #include <sound/asequencer.h>
 #include "seqmid.h"
 #include "seq_midi_event.h"
-#include "conv.h"
-#include "instr.h"
 #include "list.h"
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
index 5bee415f7f9dc5b8fb28f9fa20b56f14edfbd98a..583f1d069a6a5bab2e5a6ba50be6b05fa8ed29e6 100644 (file)
@@ -133,25 +133,6 @@ enum snd_seq_event_type {
        /** Ports disconnected; event data type = #snd_seq_connect_t */
        SND_SEQ_EVENT_PORT_UNSUBSCRIBED,
 
-       /** Sample select; event data type = #snd_seq_ev_sample_control_t */
-       SND_SEQ_EVENT_SAMPLE = 70,
-       /** Sample cluster select; event data type = #snd_seq_ev_sample_control_t */
-       SND_SEQ_EVENT_SAMPLE_CLUSTER,
-       /** voice start */
-       SND_SEQ_EVENT_SAMPLE_START,
-       /** voice stop */
-       SND_SEQ_EVENT_SAMPLE_STOP,
-       /** playback frequency */
-       SND_SEQ_EVENT_SAMPLE_FREQ,
-       /** volume and balance */
-       SND_SEQ_EVENT_SAMPLE_VOLUME,
-       /** sample loop */
-       SND_SEQ_EVENT_SAMPLE_LOOP,
-       /** sample position */
-       SND_SEQ_EVENT_SAMPLE_POSITION,
-       /** private (hardware dependent) event */
-       SND_SEQ_EVENT_SAMPLE_PRIVATE1,
-
        /** user-defined event; event data type = any (fixed size) */
        SND_SEQ_EVENT_USR0 = 90,
        /** user-defined event; event data type = any (fixed size) */
@@ -173,45 +154,6 @@ enum snd_seq_event_type {
        /** user-defined event; event data type = any (fixed size) */
        SND_SEQ_EVENT_USR9,
 
-       /** begin of instrument management */
-       SND_SEQ_EVENT_INSTR_BEGIN = 100,
-       /** end of instrument management */
-       SND_SEQ_EVENT_INSTR_END,
-       /** query instrument interface info */
-       SND_SEQ_EVENT_INSTR_INFO,
-       /** result of instrument interface info */
-       SND_SEQ_EVENT_INSTR_INFO_RESULT,
-       /** query instrument format info */
-       SND_SEQ_EVENT_INSTR_FINFO,
-       /** result of instrument format info */
-       SND_SEQ_EVENT_INSTR_FINFO_RESULT,
-       /** reset instrument instrument memory */
-       SND_SEQ_EVENT_INSTR_RESET,
-       /** get instrument interface status */
-       SND_SEQ_EVENT_INSTR_STATUS,
-       /** result of instrument interface status */
-       SND_SEQ_EVENT_INSTR_STATUS_RESULT,
-       /** put an instrument to port */
-       SND_SEQ_EVENT_INSTR_PUT,
-       /** get an instrument from port */
-       SND_SEQ_EVENT_INSTR_GET,
-       /** result of instrument query */
-       SND_SEQ_EVENT_INSTR_GET_RESULT,
-       /** free instrument(s) */
-       SND_SEQ_EVENT_INSTR_FREE,
-       /** get instrument list */
-       SND_SEQ_EVENT_INSTR_LIST,
-       /** result of instrument list */
-       SND_SEQ_EVENT_INSTR_LIST_RESULT,
-       /** set cluster parameters */
-       SND_SEQ_EVENT_INSTR_CLUSTER,
-       /** get cluster parameters */
-       SND_SEQ_EVENT_INSTR_CLUSTER_GET,
-       /** result of cluster parameters */
-       SND_SEQ_EVENT_INSTR_CLUSTER_RESULT,
-       /** instrument change */
-       SND_SEQ_EVENT_INSTR_CHANGE,
-
        /** system exclusive data (variable length);  event data type = #snd_seq_ev_ext_t */
        SND_SEQ_EVENT_SYSEX = 130,
        /** error event;  event data type = #snd_seq_ev_ext_t */
@@ -317,79 +259,6 @@ typedef struct snd_seq_ev_ext {
        void *ptr;                      /**< pointer to data (note: can be 64-bit) */
 } __attribute__((packed)) snd_seq_ev_ext_t;
 
-/** Instrument cluster type */
-typedef unsigned int snd_seq_instr_cluster_t;
-
-/** Instrument type */
-typedef struct snd_seq_instr {
-       snd_seq_instr_cluster_t cluster;        /**< cluster id */
-       unsigned int std;       /**< instrument standard id; the upper byte means a private instrument (owner - client id) */
-       unsigned short bank;    /**< instrument bank id */
-       unsigned short prg;     /**< instrument program id */
-} snd_seq_instr_t;
-
-/** sample number */
-typedef struct snd_seq_ev_sample {
-       unsigned int std;       /**< sample standard id */
-       unsigned short bank;    /**< sample bank id */
-       unsigned short prg;     /**< sample program id */
-} snd_seq_ev_sample_t;
-
-/** sample cluster */
-typedef struct snd_seq_ev_cluster {
-       snd_seq_instr_cluster_t cluster;        /**< cluster id */
-} snd_seq_ev_cluster_t;
-
-/** sample position */
-typedef unsigned int snd_seq_position_t; /**< playback position (in samples) * 16 */
-
-/** sample stop mode */
-typedef enum snd_seq_stop_mode {
-       SND_SEQ_SAMPLE_STOP_IMMEDIATELY = 0,    /**< terminate playing immediately */
-       SND_SEQ_SAMPLE_STOP_VENVELOPE = 1,      /**< finish volume envelope */
-       SND_SEQ_SAMPLE_STOP_LOOP = 2            /**< terminate loop and finish wave */
-} snd_seq_stop_mode_t;
-
-/** sample frequency */
-typedef int snd_seq_frequency_t; /**< playback frequency in HZ * 16 */
-
-/** sample volume control; if any value is set to -1 == do not change */
-typedef struct snd_seq_ev_volume {
-       signed short volume;    /**< range: 0-16383 */
-       signed short lr;        /**< left-right balance; range: 0-16383 */
-       signed short fr;        /**< front-rear balance; range: 0-16383 */
-       signed short du;        /**< down-up balance; range: 0-16383 */
-} snd_seq_ev_volume_t;
-
-/** simple loop redefinition */
-typedef struct snd_seq_ev_loop {
-       unsigned int start;     /**< loop start (in samples) * 16 */
-       unsigned int end;       /**< loop end (in samples) * 16 */
-} snd_seq_ev_loop_t;
-
-/** Sample control events */
-typedef struct snd_seq_ev_sample_control {
-       unsigned char channel;          /**< channel */
-       unsigned char unused[3];        /**< reserved */
-       union {
-               snd_seq_ev_sample_t sample;     /**< sample number */
-               snd_seq_ev_cluster_t cluster;   /**< cluster number */
-               snd_seq_position_t position;    /**< position */
-               snd_seq_stop_mode_t stop_mode;  /**< stop mode */
-               snd_seq_frequency_t frequency;  /**< frequency */
-               snd_seq_ev_volume_t volume;     /**< volume */
-               snd_seq_ev_loop_t loop;         /**< loop control */
-               unsigned char raw8[8];          /**< raw 8-bit */
-       } param;                /**< control parameters */
-} snd_seq_ev_sample_control_t;
-
-
-
-/** INSTR_BEGIN event */
-typedef struct snd_seq_ev_instr_begin {
-       int timeout;            /**< zero = forever, otherwise timeout in ms */
-} snd_seq_ev_instr_begin_t;
-
 /** Result events */
 typedef struct snd_seq_result {
        int event;              /**< processed event type */
@@ -440,8 +309,6 @@ typedef struct snd_seq_event {
                snd_seq_addr_t addr;            /**< address */
                snd_seq_connect_t connect;      /**< connect information */
                snd_seq_result_t result;        /**< operation result code */
-               snd_seq_ev_instr_begin_t instr_begin; /**< instrument */
-               snd_seq_ev_sample_control_t sample; /**< sample control */
        } data;                         /**< event data... */
 } snd_seq_event_t;
 
index 7958357fe9a91351c0e33360e8be52ef1ef32c7a..67d44472b94973332d80741e4415ad057bd38914 100644 (file)
@@ -1,7 +1,6 @@
 alsasoundincludedir = ${includedir}/alsa/sound
 
-alsasoundinclude_HEADERS = ainstr_fm.h ainstr_gf1.h ainstr_simple.h ainstr_iw.h \
-                          asound_fm.h hdsp.h sb16_csp.h sscape_ioctl.h emu10k1.h \
+alsasoundinclude_HEADERS = asound_fm.h hdsp.h sb16_csp.h sscape_ioctl.h emu10k1.h \
                           type_compat.h
 
 noinst_HEADERS = asound.h asoundef.h asequencer.h
diff --git a/include/sound/ainstr_fm.h b/include/sound/ainstr_fm.h
deleted file mode 100644 (file)
index 43a10a0..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- *  Advanced Linux Sound Architecture
- *
- *  FM (OPL2/3) Instrument Format
- *  Copyright (c) 2000 Uros Bizjak <uros@kss-loka.si>
- *
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- */
-
-#ifndef __SOUND_AINSTR_FM_H
-#define __SOUND_AINSTR_FM_H
-
-#include "type_compat.h"
-
-/*
- *  share types (share ID 1)
- */
-
-#define FM_SHARE_FILE          0
-
-/*
- * FM operator
- */
-
-typedef 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
- */
-
-#define FM_PATCH_OPL2  0x01            /* OPL2 2 operators FM instrument */
-#define FM_PATCH_OPL3  0x02            /* OPL3 4 operators FM instrument */
-
-typedef struct {
-       unsigned int share_id[4];       /* share id - zero = no sharing */
-       unsigned char type;             /* instrument type */
-
-       fm_operator_t op[4];
-       unsigned char feedback_connection[2];
-
-       unsigned char echo_delay;
-       unsigned char echo_atten;
-       unsigned char chorus_spread;
-       unsigned char trnsps;
-       unsigned char fix_dur;
-       unsigned char modes;
-       unsigned char fix_key;
-} fm_instrument_t;
-
-/*
- *
- *    Kernel <-> user space
- *    Hardware (CPU) independent section
- *
- *    * = zero or more
- *    + = one or more
- *
- *    fm_xinstrument   FM_STRU_INSTR
- *
- */
-
-#define FM_STRU_INSTR  __cpu_to_be32(('I'<<24)|('N'<<16)|('S'<<8)|'T')
-
-/*
- * FM operator
- */
-
-typedef 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 {
-       __u32 stype;                    /* structure type */
-
-       __u32 share_id[4];              /* share id - zero = no sharing */
-       __u8 type;                      /* instrument type */
-
-       fm_xoperator_t op[4];           /* fm operators */
-       __u8 feedback_connection[2];
-
-       __u8 echo_delay;
-       __u8 echo_atten;
-       __u8 chorus_spread;
-       __u8 trnsps;
-       __u8 fix_dur;
-       __u8 modes;
-       __u8 fix_key;
-} fm_xinstrument_t;
-
-#ifdef __KERNEL__
-
-#include "seq_instr.h"
-
-extern char *snd_seq_fm_id;
-
-int snd_seq_fm_init(snd_seq_kinstr_ops_t * ops,
-                   snd_seq_kinstr_ops_t * next);
-
-#endif
-
-#endif /* __SOUND_AINSTR_FM_H */
diff --git a/include/sound/ainstr_gf1.h b/include/sound/ainstr_gf1.h
deleted file mode 100644 (file)
index 824893f..0000000
+++ /dev/null
@@ -1,224 +0,0 @@
-/*
- *  Advanced Linux Sound Architecture
- *
- *  GF1 (GUS) Patch Instrument Format
- *  Copyright (c) 1994-99 by Jaroslav Kysela <perex@perex.cz>
- *
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- */
-
-#ifndef __SOUND_AINSTR_GF1_H
-#define __SOUND_AINSTR_GF1_H
-
-#include "type_compat.h"
-
-/*
- *  share types (share ID 1)
- */
-
-#define GF1_SHARE_FILE                 0
-
-/*
- *  wave formats
- */
-
-#define GF1_WAVE_16BIT                 0x0001  /* 16-bit wave */
-#define GF1_WAVE_UNSIGNED              0x0002  /* unsigned wave */
-#define GF1_WAVE_INVERT                        0x0002  /* same as unsigned wave */
-#define GF1_WAVE_BACKWARD              0x0004  /* backward mode (maybe used for reverb or ping-ping loop) */
-#define GF1_WAVE_LOOP                  0x0008  /* loop mode */
-#define GF1_WAVE_BIDIR                 0x0010  /* bidirectional mode */
-#define GF1_WAVE_STEREO                        0x0100  /* stereo mode */
-#define GF1_WAVE_ULAW                  0x0200  /* uLaw compression mode */
-
-/*
- *  Wavetable definitions
- */
-
-typedef struct gf1_wave {
-       unsigned int share_id[4];       /* share id - zero = no sharing */
-       unsigned int format;            /* wave format */
-
-       struct {
-               unsigned int number;    /* some other ID for this instrument */
-               unsigned int memory;    /* begin of waveform in onboard memory */
-               unsigned char *ptr;     /* pointer to waveform in system memory */
-       } address;
-
-       unsigned int size;              /* size of waveform in samples */
-       unsigned int start;             /* start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned int loop_start;        /* bits loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned int loop_end;          /* loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned short loop_repeat;     /* loop repeat - 0 = forever */
-
-       unsigned char flags;            /* GF1 patch flags */
-       unsigned char pad;
-       unsigned int sample_rate;       /* sample rate in Hz */
-       unsigned int low_frequency;     /* low frequency range */
-       unsigned int high_frequency;    /* high frequency range */
-       unsigned int root_frequency;    /* root frequency range */
-       signed short tune;
-       unsigned char balance;
-       unsigned char envelope_rate[6];
-       unsigned char envelope_offset[6];
-       unsigned char tremolo_sweep;
-       unsigned char tremolo_rate;
-       unsigned char tremolo_depth;
-       unsigned char vibrato_sweep;
-       unsigned char vibrato_rate;
-       unsigned char vibrato_depth;
-       unsigned short scale_frequency;
-       unsigned short scale_factor;    /* 0-2048 or 0-2 */
-  
-       struct gf1_wave *next;
-} gf1_wave_t;
-
-/*
- *  Instrument
- */
-
-#define IWFFFF_EXCLUDE_NONE            0x0000  /* exclusion mode - none */
-#define IWFFFF_EXCLUDE_SINGLE          0x0001  /* exclude single - single note from the instrument group */
-#define IWFFFF_EXCLUDE_MULTIPLE                0x0002  /* exclude multiple - stop only same note from this instrument */
-
-#define IWFFFF_EFFECT_NONE             0
-#define IWFFFF_EFFECT_REVERB           1
-#define IWFFFF_EFFECT_CHORUS           2
-#define IWFFFF_EFFECT_ECHO             3
-
-typedef struct {
-       unsigned short exclusion;
-       unsigned short exclusion_group; /* 0 - none, 1-65535 */
-
-       unsigned char effect1;          /* effect 1 */
-       unsigned char effect1_depth;    /* 0-127 */
-       unsigned char effect2;          /* effect 2 */
-       unsigned char effect2_depth;    /* 0-127 */
-
-       gf1_wave_t *wave;               /* first waveform */
-} gf1_instrument_t;
-
-/*
- *
- *    Kernel <-> user space
- *    Hardware (CPU) independent section
- *
- *    * = zero or more
- *    + = one or more
- *
- *    gf1_xinstrument          IWFFFF_STRU_INSTR
- *      +gf1_xwave             IWFFFF_STRU_WAVE
- *
- */
-
-#define GF1_STRU_WAVE          __cpu_to_be32(('W'<<24)|('A'<<16)|('V'<<8)|'E')
-#define GF1_STRU_INSTR         __cpu_to_be32(('I'<<24)|('N'<<16)|('S'<<8)|'T')
-
-/*
- *  Wavetable definitions
- */
-
-typedef struct gf1_xwave {
-       __u32 stype;                    /* structure type */
-
-       __u32 share_id[4];              /* share id - zero = no sharing */
-       __u32 format;                   /* wave format */
-
-       __u32 size;                     /* size of waveform in samples */
-       __u32 start;                    /* start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u32 loop_start;               /* bits loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u32 loop_end;                 /* loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u16 loop_repeat;              /* loop repeat - 0 = forever */
-
-       __u8 flags;                     /* GF1 patch flags */
-       __u8 pad;
-       __u32 sample_rate;              /* sample rate in Hz */
-       __u32 low_frequency;            /* low frequency range */
-       __u32 high_frequency;           /* high frequency range */
-       __u32 root_frequency;           /* root frequency range */
-       __s16 tune;
-       __u8 balance;
-       __u8 envelope_rate[6];
-       __u8 envelope_offset[6];
-       __u8 tremolo_sweep;
-       __u8 tremolo_rate;
-       __u8 tremolo_depth;
-       __u8 vibrato_sweep;
-       __u8 vibrato_rate;
-       __u8 vibrato_depth;
-       __u16 scale_frequency;
-       __u16 scale_factor;             /* 0-2048 or 0-2 */  
-} gf1_xwave_t;
-
-/*
- *  Instrument
- */
-
-typedef struct gf1_xinstrument {
-       __u32 stype;
-       
-       __u16 exclusion;
-       __u16 exclusion_group;          /* 0 - none, 1-65535 */
-
-       __u8 effect1;                   /* effect 1 */
-       __u8 effect1_depth;             /* 0-127 */
-       __u8 effect2;                   /* effect 2 */
-       __u8 effect2_depth;             /* 0-127 */
-} gf1_xinstrument_t;
-
-/*
- *  Instrument info
- */
-
-#define GF1_INFO_ENVELOPE              (1<<0)
-#define GF1_INFO_TREMOLO               (1<<1)
-#define GF1_INFO_VIBRATO               (1<<2)
-
-typedef 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"
-
-extern char *snd_seq_gf1_id;
-
-typedef struct {
-       void *private_data;
-       int (*info)(void *private_data, gf1_info_t *info);
-       int (*put_sample)(void *private_data, gf1_wave_t *wave,
-                         char *data, long len, int atomic);
-       int (*get_sample)(void *private_data, gf1_wave_t *wave,
-                         char *data, long len, int atomic);
-       int (*remove_sample)(void *private_data, gf1_wave_t *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;
-
-int snd_seq_gf1_init(snd_gf1_ops_t *ops,
-                    void *private_data,
-                    snd_seq_kinstr_ops_t *next);
-
-#endif
-
-#endif /* __SOUND_AINSTR_GF1_H */
diff --git a/include/sound/ainstr_iw.h b/include/sound/ainstr_iw.h
deleted file mode 100644 (file)
index 9bb9e62..0000000
+++ /dev/null
@@ -1,372 +0,0 @@
-/*
- *  Advanced Linux Sound Architecture
- *
- *  InterWave FFFF Instrument Format
- *  Copyright (c) 1994-99 by Jaroslav Kysela <perex@perex.cz>
- *
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- */
-
-#ifndef __SOUND_AINSTR_IW_H
-#define __SOUND_AINSTR_IW_H
-
-#include "type_compat.h"
-
-/*
- *  share types (share ID 1)
- */
-
-#define IWFFFF_SHARE_FILE              0
-
-/*
- *  wave formats
- */
-
-#define IWFFFF_WAVE_16BIT              0x0001  /* 16-bit wave */
-#define IWFFFF_WAVE_UNSIGNED           0x0002  /* unsigned wave */
-#define IWFFFF_WAVE_INVERT             0x0002  /* same as unsigned wave */
-#define IWFFFF_WAVE_BACKWARD           0x0004  /* backward mode (maybe used for reverb or ping-ping loop) */
-#define IWFFFF_WAVE_LOOP               0x0008  /* loop mode */
-#define IWFFFF_WAVE_BIDIR              0x0010  /* bidirectional mode */
-#define IWFFFF_WAVE_ULAW               0x0020  /* uLaw compressed wave */
-#define IWFFFF_WAVE_RAM                        0x0040  /* wave is _preloaded_ in RAM (it is used for ROM simulation) */
-#define IWFFFF_WAVE_ROM                        0x0080  /* wave is in ROM */
-#define IWFFFF_WAVE_STEREO             0x0100  /* wave is stereo */
-
-/*
- *  Wavetable definitions
- */
-
-typedef struct iwffff_wave {
-       unsigned int share_id[4];       /* share id - zero = no sharing */
-       unsigned int format;            /* wave format */
-
-       struct {
-               unsigned int number;    /* some other ID for this wave */
-               unsigned int memory;    /* begin of waveform in onboard memory */
-               unsigned char *ptr;     /* pointer to waveform in system memory */
-       } address;
-
-       unsigned int size;              /* size of waveform in samples */
-       unsigned int start;             /* start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned int loop_start;        /* bits loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned int loop_end;          /* loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned short loop_repeat;     /* loop repeat - 0 = forever */
-       unsigned int sample_ratio;      /* sample ratio (44100 * 1024 / rate) */
-       unsigned char attenuation;      /* 0 - 127 (no corresponding midi controller) */
-       unsigned char low_note;         /* lower frequency range for this waveform */
-       unsigned char high_note;        /* higher frequency range for this waveform */
-       unsigned char pad;
-  
-       struct iwffff_wave *next;
-} iwffff_wave_t;
-
-/*
- *  Layer
- */
-
-#define IWFFFF_LFO_SHAPE_TRIANGLE      0
-#define IWFFFF_LFO_SHAPE_POSTRIANGLE   1
-
-typedef 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 */
-
-#define IWFFFF_ENV_MODE_ONE_SHOT       0x0001  /* mode - one shot */
-#define IWFFFF_ENV_MODE_SUSTAIN                0x0002  /* mode - sustain */
-#define IWFFFF_ENV_MODE_NO_SUSTAIN     0x0003  /* mode - no sustain */
-
-#define IWFFFF_ENV_INDEX_VELOCITY      0x0001  /* index - velocity */
-#define IWFFFF_ENV_INDEX_FREQUENCY     0x0002  /* index - frequency */
-
-typedef struct iwffff_env_point {
-       unsigned short offset;
-       unsigned short rate;
-} iwffff_env_point_t;
-
-typedef struct iwffff_env_record {
-       unsigned short nattack;
-       unsigned short nrelease;
-       unsigned short sustain_offset;
-       unsigned short sustain_rate;
-       unsigned short release_rate;
-       unsigned char hirange;
-       unsigned char pad;
-       struct iwffff_env_record *next;
-       /* points are stored here */
-       /* count of points = nattack + nrelease */
-} iwffff_env_record_t;
-
-typedef 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 */
-
-#define IWFFFF_LAYER_VELOCITY_TIME     0x0000  /* velocity mode = time */
-#define IWFFFF_LAYER_VELOCITY_RATE     0x0001  /* velocity mode = rate */
-
-#define IWFFFF_LAYER_EVENT_KUP         0x0000  /* layer event - key up */
-#define IWFFFF_LAYER_EVENT_KDOWN       0x0001  /* layer event - key down */
-#define IWFFFF_LAYER_EVENT_RETRIG      0x0002  /* layer event - retrigger */
-#define IWFFFF_LAYER_EVENT_LEGATO      0x0003  /* layer event - legato */
-
-typedef struct iwffff_layer {
-       unsigned char flags;
-       unsigned char velocity_mode;
-       unsigned char layer_event;
-       unsigned char low_range;        /* range for layer based */
-       unsigned char high_range;       /* on either velocity or frequency */
-       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 */
-       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 */
-
-       iwffff_wave_t *wave;
-       struct iwffff_layer *next;
-} iwffff_layer_t;
-
-/*
- *  Instrument
- */
-
-#define IWFFFF_EXCLUDE_NONE            0x0000  /* exclusion mode - none */
-#define IWFFFF_EXCLUDE_SINGLE          0x0001  /* exclude single - single note from the instrument group */
-#define IWFFFF_EXCLUDE_MULTIPLE                0x0002  /* exclude multiple - stop only same note from this instrument */
-
-#define IWFFFF_LAYER_NONE              0x0000  /* not layered */
-#define IWFFFF_LAYER_ON                        0x0001  /* layered */
-#define IWFFFF_LAYER_VELOCITY          0x0002  /* layered by velocity */
-#define IWFFFF_LAYER_FREQUENCY         0x0003  /* layered by frequency */
-
-#define IWFFFF_EFFECT_NONE             0
-#define IWFFFF_EFFECT_REVERB           1
-#define IWFFFF_EFFECT_CHORUS           2
-#define IWFFFF_EFFECT_ECHO             3
-
-typedef struct {
-       unsigned short exclusion;
-       unsigned short layer_type;
-       unsigned short exclusion_group; /* 0 - none, 1-65535 */
-
-       unsigned char effect1;          /* effect 1 */
-       unsigned char effect1_depth;    /* 0-127 */
-       unsigned char effect2;          /* effect 2 */
-       unsigned char effect2_depth;    /* 0-127 */
-
-       iwffff_layer_t *layer;          /* first layer */
-} iwffff_instrument_t;
-
-/*
- *
- *    Kernel <-> user space
- *    Hardware (CPU) independent section
- *
- *    * = zero or more
- *    + = one or more
- *
- *    iwffff_xinstrument               IWFFFF_STRU_INSTR
- *      +iwffff_xlayer                 IWFFFF_STRU_LAYER
- *        *iwffff_xenv_record          IWFFFF_STRU_ENV_RECT (tremolo)
- *        *iwffff_xenv_record          IWFFFF_STRU_EVN_RECT (vibrato)
- *          +iwffff_xwave              IWFFFF_STRU_WAVE
- *
- */
-
-#define IWFFFF_STRU_WAVE       __cpu_to_be32(('W'<<24)|('A'<<16)|('V'<<8)|'E')
-#define IWFFFF_STRU_ENV_RECP   __cpu_to_be32(('E'<<24)|('N'<<16)|('R'<<8)|'P')
-#define IWFFFF_STRU_ENV_RECV   __cpu_to_be32(('E'<<24)|('N'<<16)|('R'<<8)|'V')
-#define IWFFFF_STRU_LAYER      __cpu_to_be32(('L'<<24)|('A'<<16)|('Y'<<8)|'R')
-#define IWFFFF_STRU_INSTR      __cpu_to_be32(('I'<<24)|('N'<<16)|('S'<<8)|'T')
-
-/*
- *  Wavetable definitions
- */
-
-typedef struct iwffff_xwave {
-       __u32 stype;                    /* structure type */
-
-       __u32 share_id[4];              /* share id - zero = no sharing */
-
-       __u32 format;                   /* wave format */
-       __u32 offset;                   /* offset to ROM (address) */
-
-       __u32 size;                     /* size of waveform in samples */
-       __u32 start;                    /* start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u32 loop_start;               /* bits loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u32 loop_end;                 /* loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u16 loop_repeat;              /* loop repeat - 0 = forever */
-       __u32 sample_ratio;             /* sample ratio (44100 * 1024 / rate) */
-       __u8 attenuation;               /* 0 - 127 (no corresponding midi controller) */
-       __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 {
-       __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 {
-       __u16 offset;
-       __u16 rate;
-} iwffff_xenv_point_t;
-
-typedef struct iwffff_xenv_record {
-       __u32 stype;
-       __u16 nattack;
-       __u16 nrelease;
-       __u16 sustain_offset;
-       __u16 sustain_rate;
-       __u16 release_rate;
-       __u8 hirange;
-       __u8 pad;
-       /* points are stored here.. */
-       /* count of points = nattack + nrelease */
-} iwffff_xenv_record_t;
-
-typedef struct iwffff_xenv {
-       __u8 flags;
-       __u8 mode;
-       __u8 index;
-       __u8 pad;
-} iwffff_xenv_t;
-
-typedef struct iwffff_xlayer {
-       __u32 stype;
-       __u8 flags;
-       __u8 velocity_mode;
-       __u8 layer_event;
-       __u8 low_range;                 /* range for layer based */
-       __u8 high_range;                /* on either velocity or frequency */
-       __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 */
-       __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;
-
-/*
- *  Instrument
- */
-
-typedef struct iwffff_xinstrument {
-       __u32 stype;
-       
-       __u16 exclusion;
-       __u16 layer_type;
-       __u16 exclusion_group;          /* 0 - none, 1-65535 */
-
-       __u8 effect1;                   /* effect 1 */
-       __u8 effect1_depth;             /* 0-127 */
-       __u8 effect2;                   /* effect 2 */
-       __u8 effect2_depth;             /* 0-127 */
-} iwffff_xinstrument_t;
-
-/*
- *  ROM support
- *    InterWave ROMs are Little-Endian (x86)
- */
-
-#define IWFFFF_ROM_HDR_SIZE    512
-
-typedef struct {
-       __u8 iwave[8];
-       __u8 revision;
-       __u8 series_number;
-       __u8 series_name[16];
-       __u8 date[10];
-       __u16 vendor_revision_major;
-       __u16 vendor_revision_minor;
-       __u32 rom_size;
-       __u8 copyright[128];
-       __u8 vendor_name[64];
-       __u8 description[128];
-} iwffff_rom_header_t;
-
-/*
- *  Instrument info
- */
-
-#define IWFFFF_INFO_LFO_VIBRATO                (1<<0)
-#define IWFFFF_INFO_LFO_VIBRATO_SHAPE  (1<<1)
-#define IWFFFF_INFO_LFO_TREMOLO                (1<<2)
-#define IWFFFF_INFO_LFO_TREMOLO_SHAPE  (1<<3)
-
-typedef 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"
-
-extern char *snd_seq_iwffff_id;
-
-typedef struct {
-       void *private_data;
-       int (*info)(void *private_data, iwffff_info_t *info);
-       int (*put_sample)(void *private_data, iwffff_wave_t *wave,
-                         char *data, long len, int atomic);
-       int (*get_sample)(void *private_data, iwffff_wave_t *wave,
-                         char *data, long len, int atomic);
-       int (*remove_sample)(void *private_data, iwffff_wave_t *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;
-
-int snd_seq_iwffff_init(snd_iwffff_ops_t *ops,
-                       void *private_data,
-                        snd_seq_kinstr_ops_t *next);
-
-#endif
-
-#endif /* __SOUND_AINSTR_IW_H */
diff --git a/include/sound/ainstr_simple.h b/include/sound/ainstr_simple.h
deleted file mode 100644 (file)
index 4ab6ce2..0000000
+++ /dev/null
@@ -1,155 +0,0 @@
-/*
- *  Advanced Linux Sound Architecture
- *
- *  Simple (MOD player) Instrument Format
- *  Copyright (c) 1994-99 by Jaroslav Kysela <perex@perex.cz>
- *
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
- */
-
-#ifndef __SOUND_AINSTR_SIMPLE_H
-#define __SOUND_AINSTR_SIMPLE_H
-
-#include "type_compat.h"
-
-/*
- *  share types (share ID 1)
- */
-
-#define SIMPLE_SHARE_FILE              0
-
-/*
- *  wave formats
- */
-
-#define SIMPLE_WAVE_16BIT              0x0001  /* 16-bit wave */
-#define SIMPLE_WAVE_UNSIGNED           0x0002  /* unsigned wave */
-#define SIMPLE_WAVE_INVERT             0x0002  /* same as unsigned wave */
-#define SIMPLE_WAVE_BACKWARD           0x0004  /* backward mode (maybe used for reverb or ping-ping loop) */
-#define SIMPLE_WAVE_LOOP               0x0008  /* loop mode */
-#define SIMPLE_WAVE_BIDIR              0x0010  /* bidirectional mode */
-#define SIMPLE_WAVE_STEREO             0x0100  /* stereo wave */
-#define SIMPLE_WAVE_ULAW               0x0200  /* uLaw compression mode */
-
-/*
- *  instrument effects
- */
-
-#define SIMPLE_EFFECT_NONE             0
-#define SIMPLE_EFFECT_REVERB           1
-#define SIMPLE_EFFECT_CHORUS           2
-#define SIMPLE_EFFECT_ECHO             3
-
-/*
- *  instrument info
- */
-
-typedef 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 {
-       unsigned int share_id[4];       /* share id - zero = no sharing */
-       unsigned int format;            /* wave format */
-
-       struct {
-               unsigned int number;    /* some other ID for this instrument */
-               unsigned int memory;    /* begin of waveform in onboard memory */
-               unsigned char *ptr;     /* pointer to waveform in system memory */
-       } address;
-
-       unsigned int size;              /* size of waveform in samples */
-       unsigned int start;             /* start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned int loop_start;        /* loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned int loop_end;          /* loop end offset in samples * 16 (lowest 4 bits - fraction) */
-       unsigned short loop_repeat;     /* loop repeat - 0 = forever */
-
-       unsigned char effect1;          /* effect 1 */
-       unsigned char effect1_depth;    /* 0-127 */
-       unsigned char effect2;          /* effect 2 */
-       unsigned char effect2_depth;    /* 0-127 */
-} simple_instrument_t;
-
-/*
- *
- *    Kernel <-> user space
- *    Hardware (CPU) independent section
- *
- *    * = zero or more
- *    + = one or more
- *
- *    simple_xinstrument       SIMPLE_STRU_INSTR
- *
- */
-
-#define SIMPLE_STRU_INSTR      __cpu_to_be32(('I'<<24)|('N'<<16)|('S'<<8)|'T')
-
-/*
- *  Instrument
- */
-
-typedef struct simple_xinstrument {
-       __u32 stype;
-
-       __u32 share_id[4];              /* share id - zero = no sharing */
-       __u32 format;                   /* wave format */
-
-       __u32 size;                     /* size of waveform in samples */
-       __u32 start;                    /* start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u32 loop_start;               /* bits loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u32 loop_end;                 /* loop start offset in samples * 16 (lowest 4 bits - fraction) */
-       __u16 loop_repeat;              /* loop repeat - 0 = forever */
-       
-       __u8 effect1;                   /* effect 1 */
-       __u8 effect1_depth;             /* 0-127 */
-       __u8 effect2;                   /* effect 2 */
-       __u8 effect2_depth;             /* 0-127 */
-} simple_xinstrument_t;
-
-#ifdef __KERNEL__
-
-#include "seq_instr.h"
-
-extern char *snd_seq_simple_id;
-
-typedef struct {
-       void *private_data;
-       int (*info)(void *private_data, simple_instrument_info_t *info);
-       int (*put_sample)(void *private_data, simple_instrument_t *instr,
-                         char *data, long len, int atomic);
-       int (*get_sample)(void *private_data, simple_instrument_t *instr,
-                         char *data, long len, int atomic);
-       int (*remove_sample)(void *private_data, simple_instrument_t *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;
-
-int snd_seq_simple_init(snd_simple_ops_t *ops,
-                       void *private_data,
-                       snd_seq_kinstr_ops_t *next);
-
-#endif
-
-#endif /* __SOUND_AINSTR_SIMPLE_H */
index c456eb8463ff5bbd5d688de853052a48960c7ca6..6d14fb1de12fe5f9add8bf29e8975a3adf6f3b3b 100644 (file)
@@ -22,7 +22,7 @@
 #ifndef __SOUND_ASEQUENCER_H
 #define __SOUND_ASEQUENCER_H
 
-#ifndef __KERNEL__
+#ifdef __KERNEL__
 #include <linux/ioctl.h>
 #endif
 
 #define SNDRV_SEQ_EVENT_PORT_SUBSCRIBED        66      /* ports connected */
 #define SNDRV_SEQ_EVENT_PORT_UNSUBSCRIBED 67   /* ports disconnected */
 
-/** synthesizer events
- * event data type = sndrv_seq_eve_sample_control_t
- */
-#define SNDRV_SEQ_EVENT_SAMPLE         70      /* sample select */
-#define SNDRV_SEQ_EVENT_SAMPLE_CLUSTER 71      /* sample cluster select */
-#define SNDRV_SEQ_EVENT_SAMPLE_START   72      /* voice start */
-#define SNDRV_SEQ_EVENT_SAMPLE_STOP    73      /* voice stop */
-#define SNDRV_SEQ_EVENT_SAMPLE_FREQ    74      /* playback frequency */
-#define SNDRV_SEQ_EVENT_SAMPLE_VOLUME  75      /* volume and balance */
-#define SNDRV_SEQ_EVENT_SAMPLE_LOOP    76      /* sample loop */
-#define SNDRV_SEQ_EVENT_SAMPLE_POSITION        77      /* sample position */
-#define SNDRV_SEQ_EVENT_SAMPLE_PRIVATE1        78      /* private (hardware dependent) event */
+/* 70-89:  synthesizer events - obsoleted */
 
 /** user-defined events with fixed length
  * event data type = any
 #define SNDRV_SEQ_EVENT_USR8           98
 #define SNDRV_SEQ_EVENT_USR9           99
 
-/** instrument layer
- * variable length data can be passed directly to the driver
- */
-#define SNDRV_SEQ_EVENT_INSTR_BEGIN    100     /* begin of instrument management */
-#define SNDRV_SEQ_EVENT_INSTR_END      101     /* end of instrument management */
-#define SNDRV_SEQ_EVENT_INSTR_INFO     102     /* instrument interface info */
-#define SNDRV_SEQ_EVENT_INSTR_INFO_RESULT 103  /* result */
-#define SNDRV_SEQ_EVENT_INSTR_FINFO    104     /* get format info */
-#define SNDRV_SEQ_EVENT_INSTR_FINFO_RESULT 105 /* get format info */
-#define SNDRV_SEQ_EVENT_INSTR_RESET    106     /* reset instrument memory */
-#define SNDRV_SEQ_EVENT_INSTR_STATUS   107     /* instrument interface status */
-#define SNDRV_SEQ_EVENT_INSTR_STATUS_RESULT 108        /* result */
-#define SNDRV_SEQ_EVENT_INSTR_PUT      109     /* put instrument to port */
-#define SNDRV_SEQ_EVENT_INSTR_GET      110     /* get instrument from port */
-#define SNDRV_SEQ_EVENT_INSTR_GET_RESULT 111   /* result */
-#define SNDRV_SEQ_EVENT_INSTR_FREE     112     /* free instrument(s) */
-#define SNDRV_SEQ_EVENT_INSTR_LIST     113     /* instrument list */
-#define SNDRV_SEQ_EVENT_INSTR_LIST_RESULT 114  /* result */
-#define SNDRV_SEQ_EVENT_INSTR_CLUSTER  115     /* cluster parameters */
-#define SNDRV_SEQ_EVENT_INSTR_CLUSTER_GET 116  /* get cluster parameters */
-#define SNDRV_SEQ_EVENT_INSTR_CLUSTER_RESULT 117 /* result */
-#define SNDRV_SEQ_EVENT_INSTR_CHANGE   118     /* instrument change */
+/* 100-118: instrument layer - obsoleted */
 /* 119-129: reserved */
 
 /* 130-139: variable length events
@@ -260,78 +228,6 @@ struct sndrv_seq_ev_ext {
        void *ptr;              /* pointer to data (note: maybe 64-bit) */
 } __attribute__((packed));
 
-/* Instrument cluster type */
-typedef unsigned int sndrv_seq_instr_cluster_t;
-
-/* Instrument type */
-struct sndrv_seq_instr {
-       sndrv_seq_instr_cluster_t cluster;
-       unsigned int std;               /* the upper byte means a private instrument (owner - client #) */
-       unsigned short bank;
-       unsigned short prg;
-};
-
-       /* sample number */
-struct sndrv_seq_ev_sample {
-       unsigned int std;
-       unsigned short bank;
-       unsigned short prg;
-};
-
-       /* sample cluster */
-struct sndrv_seq_ev_cluster {
-       sndrv_seq_instr_cluster_t cluster;
-};
-
-       /* sample position */
-typedef unsigned int sndrv_seq_position_t; /* playback position (in samples) * 16 */
-
-       /* sample stop mode */
-enum sndrv_seq_stop_mode {
-       SAMPLE_STOP_IMMEDIATELY = 0,    /* terminate playing immediately */
-       SAMPLE_STOP_VENVELOPE = 1,      /* finish volume envelope */
-       SAMPLE_STOP_LOOP = 2            /* terminate loop and finish wave */
-};
-
-       /* sample frequency */
-typedef int sndrv_seq_frequency_t; /* playback frequency in HZ * 16 */
-
-       /* sample volume control; if any value is set to -1 == do not change */
-struct sndrv_seq_ev_volume {
-       signed short volume;    /* range: 0-16383 */
-       signed short lr;        /* left-right balance; range: 0-16383 */
-       signed short fr;        /* front-rear balance; range: 0-16383 */
-       signed short du;        /* down-up balance; range: 0-16383 */
-};
-
-       /* simple loop redefinition */
-struct sndrv_seq_ev_loop {
-       unsigned int start;     /* loop start (in samples) * 16 */
-       unsigned int end;       /* loop end (in samples) * 16 */
-};
-
-struct sndrv_seq_ev_sample_control {
-       unsigned char channel;
-       unsigned char unused1, unused2, unused3;        /* pad */
-       union {
-               struct sndrv_seq_ev_sample sample;
-               struct sndrv_seq_ev_cluster cluster;
-               sndrv_seq_position_t position;
-               int stop_mode;
-               sndrv_seq_frequency_t frequency;
-               struct sndrv_seq_ev_volume volume;
-               struct sndrv_seq_ev_loop loop;
-               unsigned char raw8[8];
-       } param;
-};
-
-
-
-/* INSTR_BEGIN event */
-struct sndrv_seq_ev_instr_begin {
-       int timeout;            /* zero = forever, otherwise timeout in ms */
-};
-
 struct sndrv_seq_result {
        int event;              /* processed event type */
        int result;
@@ -401,8 +297,6 @@ struct sndrv_seq_event {
                struct sndrv_seq_addr addr;
                struct sndrv_seq_connect connect;
                struct sndrv_seq_result result;
-               struct sndrv_seq_ev_instr_begin instr_begin;
-               struct sndrv_seq_ev_sample_control sample;
                struct sndrv_seq_ev_quote quote;
        } data;
 };
@@ -440,8 +334,6 @@ struct sndrv_seq_event_bounce {
 #define sndrv_seq_ev_is_user_type(ev)  ((ev)->type >= 90 && (ev)->type < 99)
 /* fixed length events: 0-99 */
 #define sndrv_seq_ev_is_fixed_type(ev) ((ev)->type < 100)
-/* instrument layer events: 100-129 */
-#define sndrv_seq_ev_is_instr_type(ev) ((ev)->type >= 100 && (ev)->type < 130)
 /* variable length events: 130-139 */
 #define sndrv_seq_ev_is_variable_type(ev)      ((ev)->type >= 130 && (ev)->type < 140)
 /* reserved for kernel */
@@ -737,136 +629,6 @@ struct sndrv_seq_query_subs {
 };
 
 
-/*
- *  Instrument abstraction layer
- *     - based on events
- */
-
-/* instrument types */
-#define SNDRV_SEQ_INSTR_ATYPE_DATA     0       /* instrument data */
-#define SNDRV_SEQ_INSTR_ATYPE_ALIAS    1       /* instrument alias */
-
-/* instrument ASCII identifiers */
-#define SNDRV_SEQ_INSTR_ID_DLS1                "DLS1"
-#define SNDRV_SEQ_INSTR_ID_DLS2                "DLS2"
-#define SNDRV_SEQ_INSTR_ID_SIMPLE      "Simple Wave"
-#define SNDRV_SEQ_INSTR_ID_SOUNDFONT   "SoundFont"
-#define SNDRV_SEQ_INSTR_ID_GUS_PATCH   "GUS Patch"
-#define SNDRV_SEQ_INSTR_ID_INTERWAVE   "InterWave FFFF"
-#define SNDRV_SEQ_INSTR_ID_OPL2_3      "OPL2/3 FM"
-#define SNDRV_SEQ_INSTR_ID_OPL4                "OPL4"
-
-/* instrument types */
-#define SNDRV_SEQ_INSTR_TYPE0_DLS1     (1<<0)  /* MIDI DLS v1 */
-#define SNDRV_SEQ_INSTR_TYPE0_DLS2     (1<<1)  /* MIDI DLS v2 */
-#define SNDRV_SEQ_INSTR_TYPE1_SIMPLE   (1<<0)  /* Simple Wave */
-#define SNDRV_SEQ_INSTR_TYPE1_SOUNDFONT        (1<<1)  /* EMU SoundFont */
-#define SNDRV_SEQ_INSTR_TYPE1_GUS_PATCH        (1<<2)  /* Gravis UltraSound Patch */
-#define SNDRV_SEQ_INSTR_TYPE1_INTERWAVE        (1<<3)  /* InterWave FFFF */
-#define SNDRV_SEQ_INSTR_TYPE2_OPL2_3   (1<<0)  /* Yamaha OPL2/3 FM */
-#define SNDRV_SEQ_INSTR_TYPE2_OPL4     (1<<1)  /* Yamaha OPL4 */
-
-/* put commands */
-#define SNDRV_SEQ_INSTR_PUT_CMD_CREATE 0
-#define SNDRV_SEQ_INSTR_PUT_CMD_REPLACE        1
-#define SNDRV_SEQ_INSTR_PUT_CMD_MODIFY 2
-#define SNDRV_SEQ_INSTR_PUT_CMD_ADD    3
-#define SNDRV_SEQ_INSTR_PUT_CMD_REMOVE 4
-
-/* get commands */
-#define SNDRV_SEQ_INSTR_GET_CMD_FULL   0
-#define SNDRV_SEQ_INSTR_GET_CMD_PARTIAL        1
-
-/* query flags */
-#define SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS (1<<0)
-
-/* free commands */
-#define SNDRV_SEQ_INSTR_FREE_CMD_ALL           0
-#define SNDRV_SEQ_INSTR_FREE_CMD_PRIVATE       1
-#define SNDRV_SEQ_INSTR_FREE_CMD_CLUSTER       2
-#define SNDRV_SEQ_INSTR_FREE_CMD_SINGLE                3
-
-/* size of ROM/RAM */
-typedef unsigned int sndrv_seq_instr_size_t;
-
-/* INSTR_INFO */
-
-struct sndrv_seq_instr_info {
-       int result;                     /* operation result */
-       unsigned int formats[8];        /* bitmap of supported formats */
-       int ram_count;                  /* count of RAM banks */
-       sndrv_seq_instr_size_t ram_sizes[16]; /* size of RAM banks */
-       int rom_count;                  /* count of ROM banks */
-       sndrv_seq_instr_size_t rom_sizes[8]; /* size of ROM banks */
-       char reserved[128];
-};
-
-/* INSTR_STATUS */
-
-struct sndrv_seq_instr_status {
-       int result;                     /* operation result */
-       sndrv_seq_instr_size_t free_ram[16]; /* free RAM in banks */
-       int instrument_count;           /* count of downloaded instruments */
-       char reserved[128];
-};
-
-/* INSTR_FORMAT_INFO */
-
-struct sndrv_seq_instr_format_info {
-       char format[16];                /* format identifier - SNDRV_SEQ_INSTR_ID_* */  
-       unsigned int len;               /* max data length (without this structure) */
-};
-
-struct sndrv_seq_instr_format_info_result {
-       int result;                     /* operation result */
-       char format[16];                /* format identifier */
-       unsigned int len;               /* filled data length (without this structure) */
-};
-
-/* instrument data */
-struct sndrv_seq_instr_data {
-       char name[32];                  /* instrument name */
-       char reserved[16];              /* for the future use */
-       int type;                       /* instrument type */
-       union {
-               char format[16];        /* format identifier */
-               struct sndrv_seq_instr alias;
-       } data;
-};
-
-/* INSTR_PUT/GET, data are stored in one block (extended), header + data */
-
-struct sndrv_seq_instr_header {
-       union {
-               struct sndrv_seq_instr instr;
-               sndrv_seq_instr_cluster_t cluster;
-       } id;                           /* instrument identifier */
-       unsigned int cmd;               /* get/put/free command */
-       unsigned int flags;             /* query flags (only for get) */
-       unsigned int len;               /* real instrument data length (without header) */
-       int result;                     /* operation result */
-       char reserved[16];              /* for the future */
-       struct sndrv_seq_instr_data data; /* instrument data (for put/get result) */
-};
-
-/* INSTR_CLUSTER_SET */
-
-struct sndrv_seq_instr_cluster_set {
-       sndrv_seq_instr_cluster_t cluster; /* cluster identifier */
-       char name[32];                  /* cluster name */
-       int priority;                   /* cluster priority */
-       char reserved[64];              /* for the future use */
-};
-
-/* INSTR_CLUSTER_GET */
-
-struct sndrv_seq_instr_cluster_get {
-       sndrv_seq_instr_cluster_t cluster; /* cluster identifier */
-       char name[32];                  /* cluster name */
-       int priority;                   /* cluster priority */
-       char reserved[64];              /* for the future use */
-};
-
 /*
  *  IOCTL commands
  */
index 3be7049c4b9406025d72fb7e8727606decf203c7..7d48b123d5a2bb522d4fec23b88dd6ea91f51a28 100644 (file)
@@ -38,10 +38,6 @@ if BUILD_SEQ
 SUBDIRS += seq
 libasound_la_LIBADD += seq/libseq.la
 endif
-if BUILD_INSTR
-SUBDIRS += instr
-libasound_la_LIBADD += instr/libinstr.la
-endif
 if BUILD_ALISP
 SUBDIRS += alisp
 libasound_la_LIBADD += alisp/libalisp.la
index f5b71ead332b4733009daf63a5872534db93ea34..1ea92f02d80f5face38545949bba1e6619bd428d 100644 (file)
@@ -2,6 +2,9 @@ EXTRA_LTLIBRARIES=libseq.la
 
 libseq_la_SOURCES = seq_hw.c seq.c seq_event.c seqmid.c seq_midi_event.c \
                    seq_symbols.c
+if KEEP_OLD_SYMBOLS
+libseq_la_SOURCES += seq_old.c
+endif
 noinst_HEADERS = seq_local.h
 
 all: libseq.la
index c2563361d052389310d03ceb91541f3807e787ab..136ead5c19e7afc9ed423f900bf3fcf8b4e49380 100644 (file)
@@ -2178,9 +2178,6 @@ void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t *info, int queue)
  * - #SND_SEQ_PORT_TYPE_MIDI_GS GS compatible device
  * - #SND_SEQ_PORT_TYPE_MIDI_XG XG compatible device
  * - #SND_SEQ_PORT_TYPE_MIDI_MT32 MT-32 compatible device
- * - #SND_SEQ_PORT_TYPE_SYNTH Understands SND_SEQ_EVENT_SAMPLE_xxx messages
- * - #SND_SEQ_PORT_TYPE_DIRECT_SAMPLE Supports SND_SEQ_EVENT_INSTR_xxx messages sent directly
- * - #SND_SEQ_PORT_TYPE_SAMPLE Supports SND_SEQ_EVENT_INSTR_xxx messages
  * - #SND_SEQ_PORT_TYPE_HARDWARE Implemented in hardware
  * - #SND_SEQ_PORT_TYPE_SOFTWARE Implemented in software
  * - #SND_SEQ_PORT_TYPE_SYNTHESIZER Generates sound
@@ -4684,265 +4681,3 @@ int snd_seq_get_bit(int nr, void *array)
 {
        return ((((unsigned int *)array)[nr >> 5]) & (1UL << (nr & 31))) ? 1 : 0;
 }
-
-
-/**
- * instrument layer
- */
-
-/**
- * \brief get size of #snd_instr_header_t
- * \return size in bytes
- */
-size_t snd_instr_header_sizeof(void)
-{
-       return sizeof(snd_instr_header_t);
-}
-
-/**
- * \brief allocate an empty #snd_instr_header_t using standard malloc
- * \param ptr returned pointer
- * \param len additional data length
- * \return 0 on success otherwise negative error code
- */
-int snd_instr_header_malloc(snd_instr_header_t **ptr, size_t len)
-{
-       assert(ptr);
-       *ptr = calloc(1, sizeof(snd_instr_header_t) + len);
-       if (!*ptr)
-               return -ENOMEM;
-       (*ptr)->len = len;
-       return 0;
-}
-
-/**
- * \brief frees a previously allocated #snd_instr_header_t
- * \param obj poitner to object to free
- */
-void snd_instr_header_free(snd_instr_header_t *obj)
-{
-       free(obj);
-}
-
-/**
- * \brief copy one #snd_instr_header_t to another
- * \param dst pointer to destination
- * \param src pointer to source
- */
-void snd_instr_header_copy(snd_instr_header_t *dst, const snd_instr_header_t *src)
-{
-       assert(dst && src);
-       *dst = *src;
-}
-
-/**
- * \brief Get the instrument id of an instr_header container
- * \param info instr_header container
- * \return instrument id pointer
- */
-const snd_seq_instr_t *snd_instr_header_get_id(const snd_instr_header_t *info)
-{
-       assert(info);
-       return &info->id.instr;
-}
-
-/**
- * \brief Get the cluster id of an instr_header container
- * \param info instr_header container
- * \return cluster id
- */
-snd_seq_instr_cluster_t snd_instr_header_get_cluster(const snd_instr_header_t *info)
-{
-       assert(info);
-       return info->id.cluster;
-}
-
-/**
- * \brief Get the command of an instr_header container
- * \param info instr_header container
- * \return command type
- */
-unsigned int snd_instr_header_get_cmd(const snd_instr_header_t *info)
-{
-       assert(info);
-       return info->cmd;
-}
-
-/**
- * \brief Get the length of extra data of an instr_header container
- * \param info instr_header container
- * \return the length in bytes
- */
-size_t snd_instr_header_get_len(const snd_instr_header_t *info)
-{
-       assert(info);
-       return info->len;
-}
-
-/**
- * \brief Get the data name of an instr_header container
- * \param info instr_header container
- * \return the name string
- */
-const char *snd_instr_header_get_name(const snd_instr_header_t *info)
-{
-       assert(info);
-       return info->data.name;
-}
-
-/**
- * \brief Get the data type of an instr_header container
- * \param info instr_header container
- * \return the data type
- */
-int snd_instr_header_get_type(const snd_instr_header_t *info)
-{
-       assert(info);
-       return info->data.type;
-}
-
-/**
- * \brief Get the data format of an instr_header container
- * \param info instr_header container
- * \return the data format string
- */
-const char *snd_instr_header_get_format(const snd_instr_header_t *info)
-{
-       assert(info);
-       return info->data.data.format;
-}
-
-/**
- * \brief Get the data alias of an instr_header container
- * \param info instr_header container
- * \return the data alias id
- */
-const snd_seq_instr_t *snd_instr_header_get_alias(const snd_instr_header_t *info)
-{
-       assert(info);
-       return &info->data.data.alias;
-}
-
-/**
- * \brief Get the extra data pointer of an instr_header container
- * \param info instr_header container
- * \return the extra data pointer
- */
-void *snd_instr_header_get_data(const snd_instr_header_t *info)
-{
-       assert(info);
-       return (void*)((char*)info + sizeof(*info));
-}
-
-/**
- * \brief Get the flag to follow alias of an instr_header container
- * \param info instr_header container
- * \return 1 if follow alias
- */
-int snd_instr_header_get_follow_alias(const snd_instr_header_t *info)
-{
-       assert(info);
-       return (info->flags & SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS) ? 1 : 0;
-}
-
-/**
- * \brief Set the instrument id of an instr_header container
- * \param info instr_header container
- * \param id instrument id pointer
- */
-void snd_instr_header_set_id(snd_instr_header_t *info, const snd_seq_instr_t *id)
-{
-       assert(info && id);
-       info->id.instr = *id;
-}
-
-/**
- * \brief Set the cluster id of an instr_header container
- * \param info instr_header container
- * \param cluster cluster id
- */
-void snd_instr_header_set_cluster(snd_instr_header_t *info, snd_seq_instr_cluster_t cluster)
-{
-       assert(info);
-       info->id.cluster = cluster;
-}
-
-/**
- * \brief Set the command of an instr_header container
- * \param info instr_header container
- * \param cmd command type
- */
-void snd_instr_header_set_cmd(snd_instr_header_t *info, unsigned int cmd)
-{
-       assert(info);
-       info->cmd = cmd;
-}
-
-/**
- * \brief Set the length of extra data of an instr_header container
- * \param info instr_header container
- * \param len size of extra data in bytes
- */
-void snd_instr_header_set_len(snd_instr_header_t *info, size_t len)
-{
-       assert(info);
-       info->len = len;
-}
-
-/**
- * \brief Set the data name of an instr_header container
- * \param info instr_header container
- * \param name the name string
- */
-void snd_instr_header_set_name(snd_instr_header_t *info, const char *name)
-{
-       assert(info && name);
-       strncpy(info->data.name, name, sizeof(info->data.name));
-}
-
-/**
- * \brief Set the data type of an instr_header container
- * \param info instr_header container
- * \param type the data type
- */
-void snd_instr_header_set_type(snd_instr_header_t *info, int type)
-{
-       assert(info);
-       info->data.type = type;
-}
-
-/**
- * \brief Set the data format of an instr_header container
- * \param info instr_header container
- * \param format the data format string
- */
-void snd_instr_header_set_format(snd_instr_header_t *info, const char *format)
-{
-       assert(info && format);
-       strncpy(info->data.data.format, format, sizeof(info->data.data.format));
-}
-
-/**
- * \brief Set the data alias id of an instr_header container
- * \param info instr_header container
- * \param instr alias instrument id
- */
-void snd_instr_header_set_alias(snd_instr_header_t *info, const snd_seq_instr_t *instr)
-{
-       assert(info && instr);
-       info->data.data.alias = *instr;
-}
-
-/**
- * \brief Set the flag to follow alias of an instr_header container
- * \param info instr_header container
- * \param val 1 if follow alias
- */
-void snd_instr_header_set_follow_alias(snd_instr_header_t *info, int val)
-{
-       assert(info);
-       if (val)
-               info->flags |= SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS;
-       else
-               info->flags &= ~SNDRV_SEQ_INSTR_QUERY_FOLLOW_ALIAS;
-}
index fd801488b3a2948f5b8bcd95d75611904d4eaec7..0571b2123a28b012dc5146c3ae520574082994d2 100644 (file)
@@ -37,12 +37,8 @@ const unsigned int snd_seq_event_types[256] = {
        = FIXED_EV(SND_SEQ_EVFLG_MESSAGE),
        [SND_SEQ_EVENT_PORT_SUBSCRIBED ... SND_SEQ_EVENT_PORT_UNSUBSCRIBED]
        = FIXED_EV(SND_SEQ_EVFLG_CONNECTION),
-       [SND_SEQ_EVENT_SAMPLE ... SND_SEQ_EVENT_SAMPLE_PRIVATE1]
-       = FIXED_EV(SND_SEQ_EVFLG_SAMPLE),
        [SND_SEQ_EVENT_USR0 ... SND_SEQ_EVENT_USR9]
        = FIXED_EV(SND_SEQ_EVFLG_RAW) | FIXED_EV(SND_SEQ_EVFLG_USERS),
-       [SND_SEQ_EVENT_INSTR_BEGIN ... SND_SEQ_EVENT_INSTR_CHANGE]
-       = _SND_SEQ_TYPE(SND_SEQ_EVFLG_INSTR) | _SND_SEQ_TYPE(SND_SEQ_EVFLG_VARUSR),
        [SND_SEQ_EVENT_SYSEX ... SND_SEQ_EVENT_BOUNCE]
        = _SND_SEQ_TYPE(SND_SEQ_EVFLG_VARIABLE),
        [SND_SEQ_EVENT_USR_VAR0 ... SND_SEQ_EVENT_USR_VAR4]
diff --git a/src/seq/seq_old.c b/src/seq/seq_old.c
new file mode 100644 (file)
index 0000000..60d5f4b
--- /dev/null
@@ -0,0 +1,222 @@
+/*
+ * place-holders to keep libasound linkable to old binaries
+ */
+
+#ifndef DOXYGEN
+
+#include "local.h"
+
+size_t snd_instr_header_sizeof(void)
+{
+       return 0;
+}
+
+int snd_instr_header_malloc(void **ptr ATTRIBUTE_UNUSED,
+                           size_t len ATTRIBUTE_UNUSED)
+{
+       return -ENOMEM;
+}
+
+void snd_instr_header_free(void *obj ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_copy(void *dst ATTRIBUTE_UNUSED,
+                          const void *src ATTRIBUTE_UNUSED)
+{
+}
+
+const void *snd_instr_header_get_id(const void *info ATTRIBUTE_UNUSED)
+{
+       return NULL;
+}
+
+int snd_instr_header_get_cluster(const void *info ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+unsigned int snd_instr_header_get_cmd(const void *info ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+size_t snd_instr_header_get_len(const void *info ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+const char *snd_instr_header_get_name(const void *info ATTRIBUTE_UNUSED)
+{
+       return NULL;
+}
+
+int snd_instr_header_get_type(const void *info ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+const char *snd_instr_header_get_format(const void *info ATTRIBUTE_UNUSED)
+{
+       return NULL;
+}
+
+const void *snd_instr_header_get_alias(const void *info ATTRIBUTE_UNUSED)
+{
+       return NULL;
+}
+
+void *snd_instr_header_get_data(const void *info ATTRIBUTE_UNUSED)
+{
+       return NULL;
+}
+
+int snd_instr_header_get_follow_alias(const void *info ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+void snd_instr_header_set_id(void *info ATTRIBUTE_UNUSED,
+                            const void *id ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_cluster(void *info ATTRIBUTE_UNUSED,
+                                 int cluster ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_cmd(void *info ATTRIBUTE_UNUSED,
+                             unsigned int cmd ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_len(void *info ATTRIBUTE_UNUSED,
+                             size_t len ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_name(void *info ATTRIBUTE_UNUSED,
+                              const char *name ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_type(void *info ATTRIBUTE_UNUSED,
+                              int type ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_format(void *info ATTRIBUTE_UNUSED,
+                                const char *format ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_alias(void *info ATTRIBUTE_UNUSED,
+                               const void *instr ATTRIBUTE_UNUSED)
+{
+}
+
+void snd_instr_header_set_follow_alias(void *info ATTRIBUTE_UNUSED,
+                                      int val ATTRIBUTE_UNUSED)
+{
+}
+
+int snd_instr_fm_free(void *fm ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+int snd_instr_fm_convert_to_stream(void *fm ATTRIBUTE_UNUSED,
+                                  const char *name ATTRIBUTE_UNUSED,
+                                  void **__data ATTRIBUTE_UNUSED,
+                                  size_t *__size ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+int snd_instr_fm_convert_from_stream(void *__data ATTRIBUTE_UNUSED,
+                                    size_t size ATTRIBUTE_UNUSED,
+                                    void **simple ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+
+int snd_instr_iwffff_open(void **handle ATTRIBUTE_UNUSED,
+                         const char *name_fff ATTRIBUTE_UNUSED,
+                         const char *name_dat ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+int snd_instr_iwffff_open_rom(void **handle ATTRIBUTE_UNUSED,
+                             int card ATTRIBUTE_UNUSED,
+                             int bank ATTRIBUTE_UNUSED,
+                             int file ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+int snd_instr_iwffff_open_rom_file(void **handle ATTRIBUTE_UNUSED,
+                                  const char *name ATTRIBUTE_UNUSED,
+                                  int bank ATTRIBUTE_UNUSED,
+                                  int file ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+int snd_instr_iwffff_close(void *handle ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+int snd_instr_iwffff_free(void *__instr ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+int snd_instr_iwffff_load(void *iwf ATTRIBUTE_UNUSED,
+                         int bank ATTRIBUTE_UNUSED,
+                         int prg ATTRIBUTE_UNUSED,
+                         void **__iwffff ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+int snd_instr_iwffff_convert_to_stream(void *iwffff ATTRIBUTE_UNUSED,
+                                      const char *name ATTRIBUTE_UNUSED,
+                                      void **__data ATTRIBUTE_UNUSED,
+                                      size_t *__size ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+int snd_instr_iwffff_convert_from_stream(void *data ATTRIBUTE_UNUSED,
+                                        size_t size ATTRIBUTE_UNUSED,
+                                        void **iwffff ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+
+int snd_instr_simple_free(void *simple ATTRIBUTE_UNUSED)
+{
+       return 0;
+}
+
+int snd_instr_simple_convert_to_stream(void *simple ATTRIBUTE_UNUSED,
+                                      const char *name ATTRIBUTE_UNUSED,
+                                      void **__data ATTRIBUTE_UNUSED,
+                                      size_t *__size ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+int snd_instr_simple_convert_from_stream(void *__data ATTRIBUTE_UNUSED,
+                                        size_t size ATTRIBUTE_UNUSED,
+                                        void **simple ATTRIBUTE_UNUSED)
+{
+       return -ENXIO;
+}
+
+#endif /* !DOXYGEN */