diff --git a/seq/aconnect/README.aconnect b/seq/aconnect/README.aconnect index a2839ab..1f6237a 100644 --- a/seq/aconnect/README.aconnect +++ b/seq/aconnect/README.aconnect @@ -19,26 +19,22 @@ To see which port is available as input port, run the following command: % aconnect -i - client 0: 'System' [group=system] [type=kernel] - 0 'Timer ' [group=system] - 1 'Announce ' [group=system] - client 64: '0: MIDI Synth' [group=] [type=kernel] - 0 'card 0: synth-midi: 0' [group=device] + client 0: 'System' [type=kernel] + 0 'Timer ' + 1 'Announce ' + client 64: '0: MIDI Synth' [type=kernel] + 0 'card 0: synth-midi: 0' Similary, to see the output ports, use -o flag. % aconnect -o - client 64: '0: MIDI Synth' [group=] [type=kernel] - 0 'card 0: synth-midi: 0' [group=device] - client 65: 'AWE Wave Table Synth : 0' [group=device] [type=kernel] - 0 'Emu8000 port 0 ' [group=device] - 1 'Emu8000 port 1 ' [group=device] - 2 'Emu8000 port 2 ' [group=device] - 3 'Emu8000 port 3 ' [group=device] - -Some ports may have permission for its own group. -In such a case, change the group of aconnect to the appropriate one by -using -g option. + client 64: '0: MIDI Synth' [type=kernel] + 0 'card 0: synth-midi: 0' + client 65: 'AWE Wave Table Synth : 0' [type=kernel] + 0 'Emu8000 port 0 ' + 1 'Emu8000 port 1 ' + 2 'Emu8000 port 2 ' + 3 'Emu8000 port 3 ' The option -l together with -i or -o shows subscribers for each port. diff --git a/seq/aconnect/aconnect.1 b/seq/aconnect/aconnect.1 index ed34ea7..83d2119 100644 --- a/seq/aconnect/aconnect.1 +++ b/seq/aconnect/aconnect.1 @@ -55,15 +55,15 @@ option. .IP "" 4 % aconnect -i .br -client 0: 'System' [group=system] [type=kernel] +client 0: 'System' [type=kernel] .in +4 -0 'Timer ' [group=system] +0 'Timer ' .br -1 'Announce ' [group=system] +1 'Announce ' .in -4 -client 64: 'External MIDI-0' [group=] [type=kernel] +client 64: 'External MIDI-0' [type=kernel] .in +4 -0 'MIDI 0-0 ' [group=device] +0 'MIDI 0-0 ' .in -4 .PP Similary, to see the output ports, use @@ -100,16 +100,6 @@ option, but time-stamps are converted to the current value of the given .I tick queue. -.TP -.B \-g, --group name -Specify the group name that -.B aconnect -uses. -Some ports may have special permissions, so that only the same group -may subscribe to them. In such a case, -.B aconnect -can fake the group name -with this option. .SS LIST PORTS .TP diff --git a/seq/aconnect/aconnect.c b/seq/aconnect/aconnect.c index bb0ad02..b4889a8 100644 --- a/seq/aconnect/aconnect.c +++ b/seq/aconnect/aconnect.c @@ -255,7 +255,6 @@ static struct option long_option[] = { {"disconnect", 0, NULL, 'd'}, {"input", 0, NULL, 'i'}, {"output", 0, NULL, 'o'}, - {"group", 1, NULL, 'g'}, {"real", 1, NULL, 'r'}, {"tick", 1, NULL, 't'}, {"exclusive", 0, NULL, 'e'}, @@ -276,7 +275,7 @@ int main(int argc, char **argv) snd_seq_port_subscribe_t *subs; snd_seq_addr_t sender, dest; - while ((c = getopt_long(argc, argv, "diog:r:t:elx", long_option, NULL)) != -1) { + while ((c = getopt_long(argc, argv, "dior:t:elx", long_option, NULL)) != -1) { switch (c) { case 'd': command = UNSUBSCRIBE; @@ -351,15 +350,17 @@ int main(int argc, char **argv) if (snd_seq_set_client_name(seq, "ALSA Connector") < 0) { snd_seq_close(seq); fprintf(stderr, "can't set client info\n"); - return 0; + return 1; } /* set subscription */ if (snd_seq_parse_address(seq, &sender, argv[optind]) < 0) { + snd_seq_close(seq); fprintf(stderr, "invalid sender address %s\n", argv[optind]); return 1; } if (snd_seq_parse_address(seq, &dest, argv[optind + 1]) < 0) { + snd_seq_close(seq); fprintf(stderr, "invalid destination address %s\n", argv[optind + 1]); return 1; }