aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2006-05-02 10:08:41 -0400
committerJaroslav Kysela <perex@suse.cz>2006-06-22 15:33:18 -0400
commit450047a78f3c35a905576e121abfbee2ccd45993 (patch)
tree7788c29141fc1dac2c0cb5f2b4799b7c9231c361
parentc97f3dd85490e51ba48782dd0c063cdade352c0d (diff)
[ALSA] 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. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
-rw-r--r--include/sound/asequencer.h4
-rw-r--r--sound/core/seq/seq_dummy.c4
-rw-r--r--sound/core/seq/seq_midi.c4
-rw-r--r--sound/core/seq/seq_virmidi.c4
-rw-r--r--sound/drivers/opl3/opl3_oss.c4
-rw-r--r--sound/drivers/opl3/opl3_seq.c4
-rw-r--r--sound/drivers/opl4/opl4_seq.c4
-rw-r--r--sound/isa/gus/gus_synth.c4
-rw-r--r--sound/pci/trident/trident_synth.c4
-rw-r--r--sound/synth/emux/emux_seq.c4
10 files changed, 31 insertions, 9 deletions
diff --git a/include/sound/asequencer.h b/include/sound/asequencer.h
index 6691e4aa4ea7..3f2f4042a20d 100644
--- a/include/sound/asequencer.h
+++ b/include/sound/asequencer.h
@@ -605,6 +605,10 @@ struct snd_seq_remove_events {
605#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */ 605#define SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE (1<<11) /* Sampling device (support sample download) */
606#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */ 606#define SNDRV_SEQ_PORT_TYPE_SAMPLE (1<<12) /* Sampling device (sample can be downloaded at any time) */
607/*...*/ 607/*...*/
608#define SNDRV_SEQ_PORT_TYPE_HARDWARE (1<<16) /* driver for a hardware device */
609#define SNDRV_SEQ_PORT_TYPE_SOFTWARE (1<<17) /* implemented in software */
610#define SNDRV_SEQ_PORT_TYPE_SYNTHESIZER (1<<18) /* generates sound */
611#define SNDRV_SEQ_PORT_TYPE_PORT (1<<19) /* connects to other device(s) */
608#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */ 612#define SNDRV_SEQ_PORT_TYPE_APPLICATION (1<<20) /* application (sequencer/editor) */
609 613
610/* misc. conditioning flags */ 614/* misc. conditioning flags */
diff --git a/sound/core/seq/seq_dummy.c b/sound/core/seq/seq_dummy.c
index 2a283a59ea4d..9eb1c744f77b 100644
--- a/sound/core/seq/seq_dummy.c
+++ b/sound/core/seq/seq_dummy.c
@@ -171,7 +171,9 @@ create_port(int idx, int type)
171 pinfo.capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; 171 pinfo.capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE;
172 if (duplex) 172 if (duplex)
173 pinfo.capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; 173 pinfo.capability |= SNDRV_SEQ_PORT_CAP_DUPLEX;
174 pinfo.type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; 174 pinfo.type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC
175 | SNDRV_SEQ_PORT_TYPE_SOFTWARE
176 | SNDRV_SEQ_PORT_TYPE_PORT;
175 memset(&pcb, 0, sizeof(pcb)); 177 memset(&pcb, 0, sizeof(pcb));
176 pcb.owner = THIS_MODULE; 178 pcb.owner = THIS_MODULE;
177 pcb.unuse = dummy_unuse; 179 pcb.unuse = dummy_unuse;
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index 3b316da25eff..f873742c6532 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -376,7 +376,9 @@ snd_seq_midisynth_register_port(struct snd_seq_device *dev)
376 if ((port->capability & (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ)) == (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ) && 376 if ((port->capability & (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ)) == (SNDRV_SEQ_PORT_CAP_WRITE|SNDRV_SEQ_PORT_CAP_READ) &&
377 info->flags & SNDRV_RAWMIDI_INFO_DUPLEX) 377 info->flags & SNDRV_RAWMIDI_INFO_DUPLEX)
378 port->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; 378 port->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX;
379 port->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; 379 port->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC
380 | SNDRV_SEQ_PORT_TYPE_HARDWARE
381 | SNDRV_SEQ_PORT_TYPE_PORT;
380 port->midi_channels = 16; 382 port->midi_channels = 16;
381 memset(&pcallbacks, 0, sizeof(pcallbacks)); 383 memset(&pcallbacks, 0, sizeof(pcallbacks));
382 pcallbacks.owner = THIS_MODULE; 384 pcallbacks.owner = THIS_MODULE;
diff --git a/sound/core/seq/seq_virmidi.c b/sound/core/seq/seq_virmidi.c
index f4edec603b8f..0cfa06c6b81f 100644
--- a/sound/core/seq/seq_virmidi.c
+++ b/sound/core/seq/seq_virmidi.c
@@ -390,7 +390,9 @@ static int snd_virmidi_dev_attach_seq(struct snd_virmidi_dev *rdev)
390 pinfo->capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE; 390 pinfo->capability |= SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SYNC_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE;
391 pinfo->capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ; 391 pinfo->capability |= SNDRV_SEQ_PORT_CAP_READ | SNDRV_SEQ_PORT_CAP_SYNC_READ | SNDRV_SEQ_PORT_CAP_SUBS_READ;
392 pinfo->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX; 392 pinfo->capability |= SNDRV_SEQ_PORT_CAP_DUPLEX;
393 pinfo->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC; 393 pinfo->type = SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC
394 | SNDRV_SEQ_PORT_TYPE_SOFTWARE
395 | SNDRV_SEQ_PORT_TYPE_PORT;
394 pinfo->midi_channels = 16; 396 pinfo->midi_channels = 16;
395 memset(&pcallbacks, 0, sizeof(pcallbacks)); 397 memset(&pcallbacks, 0, sizeof(pcallbacks));
396 pcallbacks.owner = THIS_MODULE; 398 pcallbacks.owner = THIS_MODULE;
diff --git a/sound/drivers/opl3/opl3_oss.c b/sound/drivers/opl3/opl3_oss.c
index d48f8dee2d98..5fd3a4c95626 100644
--- a/sound/drivers/opl3/opl3_oss.c
+++ b/sound/drivers/opl3/opl3_oss.c
@@ -99,7 +99,9 @@ static int snd_opl3_oss_create_port(struct snd_opl3 * opl3)
99 opl3->oss_chset->port = snd_seq_event_port_attach(opl3->seq_client, &callbacks, 99 opl3->oss_chset->port = snd_seq_event_port_attach(opl3->seq_client, &callbacks,
100 SNDRV_SEQ_PORT_CAP_WRITE, 100 SNDRV_SEQ_PORT_CAP_WRITE,
101 SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | 101 SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |
102 SNDRV_SEQ_PORT_TYPE_MIDI_GM, 102 SNDRV_SEQ_PORT_TYPE_MIDI_GM |
103 SNDRV_SEQ_PORT_TYPE_HARDWARE |
104 SNDRV_SEQ_PORT_TYPE_SYNTHESIZER,
103 voices, voices, 105 voices, voices,
104 name); 106 name);
105 if (opl3->oss_chset->port < 0) { 107 if (opl3->oss_chset->port < 0) {
diff --git a/sound/drivers/opl3/opl3_seq.c b/sound/drivers/opl3/opl3_seq.c
index 2aece1b18660..96762c9d4855 100644
--- a/sound/drivers/opl3/opl3_seq.c
+++ b/sound/drivers/opl3/opl3_seq.c
@@ -203,7 +203,9 @@ static int snd_opl3_synth_create_port(struct snd_opl3 * opl3)
203 SNDRV_SEQ_PORT_CAP_SUBS_WRITE, 203 SNDRV_SEQ_PORT_CAP_SUBS_WRITE,
204 SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | 204 SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |
205 SNDRV_SEQ_PORT_TYPE_MIDI_GM | 205 SNDRV_SEQ_PORT_TYPE_MIDI_GM |
206 SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE, 206 SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE |
207 SNDRV_SEQ_PORT_TYPE_HARDWARE |
208 SNDRV_SEQ_PORT_TYPE_SYNTHESIZER,
207 16, voices, 209 16, voices,
208 name); 210 name);
209 if (opl3->chset->port < 0) { 211 if (opl3->chset->port < 0) {
diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c
index dc0dcdc6c313..43d8a2bdd280 100644
--- a/sound/drivers/opl4/opl4_seq.c
+++ b/sound/drivers/opl4/opl4_seq.c
@@ -164,7 +164,9 @@ static int snd_opl4_seq_new_device(struct snd_seq_device *dev)
164 SNDRV_SEQ_PORT_CAP_WRITE | 164 SNDRV_SEQ_PORT_CAP_WRITE |
165 SNDRV_SEQ_PORT_CAP_SUBS_WRITE, 165 SNDRV_SEQ_PORT_CAP_SUBS_WRITE,
166 SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC | 166 SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |
167 SNDRV_SEQ_PORT_TYPE_MIDI_GM, 167 SNDRV_SEQ_PORT_TYPE_MIDI_GM |
168 SNDRV_SEQ_PORT_TYPE_HARDWARE |
169 SNDRV_SEQ_PORT_TYPE_SYNTHESIZER,
168 16, 24, 170 16, 24,
169 "OPL4 Wavetable Port"); 171 "OPL4 Wavetable Port");
170 if (opl4->chset->port < 0) { 172 if (opl4->chset->port < 0) {
diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c
index 2767cc187ae3..3e4d4d6edd8b 100644
--- a/sound/isa/gus/gus_synth.c
+++ b/sound/isa/gus/gus_synth.c
@@ -194,7 +194,9 @@ static int snd_gus_synth_create_port(struct snd_gus_card * gus, int idx)
194 &callbacks, 194 &callbacks,
195 SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE, 195 SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE,
196 SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE | 196 SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE |
197 SNDRV_SEQ_PORT_TYPE_SYNTH, 197 SNDRV_SEQ_PORT_TYPE_SYNTH |
198 SNDRV_SEQ_PORT_TYPE_HARDWARE |
199 SNDRV_SEQ_PORT_TYPE_SYNTHESIZER,
198 16, 0, 200 16, 0,
199 name); 201 name);
200 if (p->chset->port < 0) { 202 if (p->chset->port < 0) {
diff --git a/sound/pci/trident/trident_synth.c b/sound/pci/trident/trident_synth.c
index cc7af8bc55a0..9b7dee84743b 100644
--- a/sound/pci/trident/trident_synth.c
+++ b/sound/pci/trident/trident_synth.c
@@ -914,7 +914,9 @@ static int snd_trident_synth_create_port(struct snd_trident * trident, int idx)
914 &callbacks, 914 &callbacks,
915 SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE, 915 SNDRV_SEQ_PORT_CAP_WRITE | SNDRV_SEQ_PORT_CAP_SUBS_WRITE,
916 SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE | 916 SNDRV_SEQ_PORT_TYPE_DIRECT_SAMPLE |
917 SNDRV_SEQ_PORT_TYPE_SYNTH, 917 SNDRV_SEQ_PORT_TYPE_SYNTH |
918 SNDRV_SEQ_PORT_TYPE_HARDWARE |
919 SNDRV_SEQ_PORT_TYPE_SYNTHESIZER,
918 16, 0, 920 16, 0,
919 name); 921 name);
920 if (p->chset->port < 0) { 922 if (p->chset->port < 0) {
diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c
index 58838f7c95f0..d176cc01742d 100644
--- a/sound/synth/emux/emux_seq.c
+++ b/sound/synth/emux/emux_seq.c
@@ -54,7 +54,9 @@ static struct snd_midi_op emux_ops = {
54#define DEFAULT_MIDI_TYPE (SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |\ 54#define DEFAULT_MIDI_TYPE (SNDRV_SEQ_PORT_TYPE_MIDI_GENERIC |\
55 SNDRV_SEQ_PORT_TYPE_MIDI_GM |\ 55 SNDRV_SEQ_PORT_TYPE_MIDI_GM |\
56 SNDRV_SEQ_PORT_TYPE_MIDI_GS |\ 56 SNDRV_SEQ_PORT_TYPE_MIDI_GS |\
57 SNDRV_SEQ_PORT_TYPE_MIDI_XG) 57 SNDRV_SEQ_PORT_TYPE_MIDI_XG |\
58 SNDRV_SEQ_PORT_TYPE_HARDWARE |\
59 SNDRV_SEQ_PORT_TYPE_SYNTHESIZER)
58 60
59/* 61/*
60 * Initialise the EMUX Synth by creating a client and registering 62 * Initialise the EMUX Synth by creating a client and registering