From e2ba50dbe43ac6d79908f94fb78cbd1a9f2518ab Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 7 Jan 2026 11:51:18 +0100 Subject: [PATCH 1/4] alsaloop: parse_config(): handle short form -B / -E options The usage info documents both short and long form arguments for these: "-B,--buffer buffer size in frames\n" "-E,--period period size in frames\n" But the short form was missing from the optstring so it wasn't accepted: alsaloop -B 123 -E 42 alsaloop: invalid option -- 'B' alsaloop: invalid option -- 'E' Fix that. Signed-off-by: Peter Korsgaard --- alsaloop/alsaloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c index 51fb64626..e0911b0bf 100644 --- a/alsaloop/alsaloop.c +++ b/alsaloop/alsaloop.c @@ -425,7 +425,7 @@ static int parse_config(int argc, char *argv[], snd_output_t *output, while (1) { int c; if ((c = getopt_long(argc, argv, - "hdg:P:C:X:Y:x:l:t:F:f:c:r:s:benvA:S:a:m:T:O:w:UW:z", + "hdg:P:C:X:Y:x:l:t:F:f:c:r:B:E:s:benvA:S:a:m:T:O:w:UW:z", long_option, NULL)) < 0) break; switch (c) { From 0d63d156f82dab49bd1a0e2618c51b0510453997 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 7 Jan 2026 11:55:00 +0100 Subject: [PATCH 2/4] alsaloop: parse_config(): drop unused 'F' option It is not documented in the usage info, no corresponding long option and is not handled in the parsing, so drop it from the optstring. Signed-off-by: Peter Korsgaard --- alsaloop/alsaloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c index e0911b0bf..9e457215a 100644 --- a/alsaloop/alsaloop.c +++ b/alsaloop/alsaloop.c @@ -425,7 +425,7 @@ static int parse_config(int argc, char *argv[], snd_output_t *output, while (1) { int c; if ((c = getopt_long(argc, argv, - "hdg:P:C:X:Y:x:l:t:F:f:c:r:B:E:s:benvA:S:a:m:T:O:w:UW:z", + "hdg:P:C:X:Y:x:l:t:f:c:r:B:E:s:benvA:S:a:m:T:O:w:UW:z", long_option, NULL)) < 0) break; switch (c) { From 06614179056286467827fa572000b0bbfa425707 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 7 Jan 2026 11:57:05 +0100 Subject: [PATCH 3/4] alsaloop: parse_config(): handle long form --wake option The usage info documents a long form --wake option: "-W,--wake process wake timeout in ms\n" But it wasn't handled: alsaloop --wake 42 alsaloop: unrecognized option '--wake' Fix that. Signed-off-by: Peter Korsgaard --- alsaloop/alsaloop.c | 1 + 1 file changed, 1 insertion(+) diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c index 9e457215a..917801153 100644 --- a/alsaloop/alsaloop.c +++ b/alsaloop/alsaloop.c @@ -386,6 +386,7 @@ static int parse_config(int argc, char *argv[], snd_output_t *output, {"ossmixer", 1, NULL, 'O'}, {"workaround", 1, NULL, 'w'}, {"xrun", 0, NULL, 'U'}, + {"wake", 1, NULL, 'W'}, {"syslog", 0, NULL, 'z'}, {NULL, 0, NULL, 0}, }; From d2e198e4d4fc214a4ff38539c219a235b2e40fe7 Mon Sep 17 00:00:00 2001 From: Peter Korsgaard Date: Wed, 7 Jan 2026 12:00:21 +0100 Subject: [PATCH 4/4] alsaloop: parse_config(): align optstring order with the long options The 'd' and 'm' options were not in the same order as the long options. Fix that. No functional change, but makes it easier to ensure they are kept in sync. Signed-off-by: Peter Korsgaard --- alsaloop/alsaloop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/alsaloop/alsaloop.c b/alsaloop/alsaloop.c index 917801153..b9748db51 100644 --- a/alsaloop/alsaloop.c +++ b/alsaloop/alsaloop.c @@ -426,7 +426,7 @@ static int parse_config(int argc, char *argv[], snd_output_t *output, while (1) { int c; if ((c = getopt_long(argc, argv, - "hdg:P:C:X:Y:x:l:t:f:c:r:B:E:s:benvA:S:a:m:T:O:w:UW:z", + "hg:dP:C:X:Y:x:l:t:f:c:r:B:E:s:benvA:S:a:T:m:O:w:UW:z", long_option, NULL)) < 0) break; switch (c) {