From: Clemens Ladisch Date: Tue, 2 May 2006 14:08:36 +0000 (+0200) Subject: add more sequencer port type information bits X-Git-Tag: v1.0.12rc1~15 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=c3ac7bdf876c4ab438ba16f88627f17dbb122114;p=alsa-lib.git add more sequencer port type information bits Add four new information flags SNDRV_SEQ_PORT_TYPE_HARDWARE, _SOFTWARE, _SYNTHESIZER, _PORT for sequencer ports. This makes it easier for apps like Rosegarden to make policy decisions based on the port type. --- diff --git a/include/seq.h b/include/seq.h index bb7356f8..8c9b969e 100644 --- a/include/seq.h +++ b/include/seq.h @@ -232,9 +232,14 @@ typedef struct _snd_seq_port_info snd_seq_port_info_t; #define SND_SEQ_PORT_TYPE_MIDI_GS (1<<3) /**< GS compatible device */ #define SND_SEQ_PORT_TYPE_MIDI_XG (1<<4) /**< XG compatible device */ #define SND_SEQ_PORT_TYPE_MIDI_MT32 (1<<5) /**< MT-32 compatible device */ +#define SND_SEQ_PORT_TYPE_MIDI_GM2 (1<<6) /**< General MIDI 2 compatible device */ #define SND_SEQ_PORT_TYPE_SYNTH (1<<10) /**< Synth device */ #define SND_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /**< Sampling device (support sample download) */ #define SND_SEQ_PORT_TYPE_SAMPLE (1<<12) /**< Sampling device (sample can be downloaded at any time) */ +#define SND_SEQ_PORT_TYPE_HARDWARE (1<<16) /**< driver for a hardware device */ +#define SND_SEQ_PORT_TYPE_SOFTWARE (1<<17) /**< implemented in software */ +#define SND_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /**< generates sound */ +#define SND_SEQ_PORT_TYPE_PORT (1<<19) /**< connects to other device(s) */ #define SND_SEQ_PORT_TYPE_APPLICATION (1<<20) /**< application (sequencer/editor) */ diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h index eac0a77a..f2a125a2 100644 --- a/include/sound/asequencer.h +++ b/include/sound/asequencer.h @@ -605,6 +605,10 @@ struct sndrv_seq_remove_events { #define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */ #define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */ /*...*/ +#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16) /* driver for a hardware device */ +#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17) /* implemented in software */ +#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /* generates sound */ +#define SNDRV_SEQ_PORT_TYPE_PORT (1<<19) /* connects to other device(s) */ #define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */ /* misc. conditioning flags */ diff --git a/src/seq/seq.c b/src/seq/seq.c index 751f7fd7..ca7ca9b7 100644 --- a/src/seq/seq.c +++ b/src/seq/seq.c @@ -2169,18 +2169,23 @@ void snd_seq_port_info_set_timestamp_queue(snd_seq_port_info_t *info, int queue) * - #SND_SEQ_PORT_CAP_DUPLEX Read/write duplex access is supported * - #SND_SEQ_PORT_CAP_SUBS_READ Read subscription is allowed * - #SND_SEQ_PORT_CAP_SUBS_WRITE Write subscription is allowed - * - #SND_SEQ_PORT_CAP_SUBS_NO_EXPORT Subscription management from 3rd client is disallowed + * - #SND_SEQ_PORT_CAP_NO_EXPORT Subscription management from 3rd client is disallowed * * Each port has also the type bitmasks defined as follows: * - #SND_SEQ_PORT_TYPE_SPECIFIC Hardware specific port * - #SND_SEQ_PORT_TYPE_MIDI_GENERIC Generic MIDI device * - #SND_SEQ_PORT_TYPE_MIDI_GM General MIDI compatible device + * - #SND_SEQ_PORT_TYPE_MIDI_GM2 General MIDI 2 compatible device * - #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 Synth device * - #SND_SEQ_PORT_TYPE_DIRECT_SAMPLE Sampling device (supporting download) * - #SND_SEQ_PORT_TYPE_SAMPLE Sampling device (sample can be downloaded at any time) + * - #SND_SEQ_PORT_TYPE_HARDWARE Implemented in hardware + * - #SND_SEQ_PORT_TYPE_SOFTWARE Implemented in software + * - #SND_SEQ_PORT_TYPE_SYNTHESIZER Generates sound + * - #SND_SEQ_PORT_TYPE_PORT Connects to other device(s) * - #SND_SEQ_PORT_TYPE_APPLICATION Application (sequencer/editor) * * A port may contain specific midi channels, midi voices and synth voices.