]> git.alsa-project.org Git - alsa-utils.git/commitdiff
axfer: obsolete some unimplemented options
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Tue, 13 Nov 2018 06:41:46 +0000 (15:41 +0900)
committerTakashi Iwai <tiwai@suse.de>
Tue, 13 Nov 2018 11:04:53 +0000 (12:04 +0100)
Althogh many options are actually supported by aplay, some of them are
not enough good in practical points. For example, '--test-position'
option is meaningless for some use cases. Furthermore, due to practical
reasons, some options are not implemented well; e.g. vumeter.

This commit marks such options as 'obsoleted'.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
axfer/xfer-libasound.c
axfer/xfer-options.c

index f6d0515067f71f2728472fe6d274b35b401c305e..bacd83542b11831b304d76861bef9aea925432b2 100644 (file)
@@ -26,9 +26,12 @@ enum no_short_opts {
        OPT_DISABLE_SOFTVOL,
        OPT_FATAL_ERRORS,
        OPT_TEST_NOWAIT,
+       // Obsoleted.
+       OPT_TEST_POSITION,
+       OPT_TEST_COEF,
 };
 
-#define S_OPTS "D:NMF:B:A:R:T:"
+#define S_OPTS "D:NMF:B:A:R:T:m:"
 static const struct option l_opts[] = {
        {"device",              1, 0, 'D'},
        {"nonblock",            0, 0, 'N'},
@@ -50,6 +53,10 @@ static const struct option l_opts[] = {
        // For debugging.
        {"fatal-errors",        0, 0, OPT_FATAL_ERRORS},
        {"test-nowait",         0, 0, OPT_TEST_NOWAIT},
+       // Obsoleted.
+       {"chmap",               1, 0, 'm'},
+       {"test-position",       0, 0, OPT_TEST_POSITION},
+       {"test-coef",           1, 0, OPT_TEST_COEF},
 };
 
 static int xfer_libasound_init(struct xfer_context *xfer,
@@ -107,6 +114,10 @@ static int xfer_libasound_parse_opt(struct xfer_context *xfer, int key,
                state->no_auto_format = true;
        else if (key == OPT_DISABLE_SOFTVOL)
                state->no_softvol = true;
+       else if (key == 'm' ||
+                key == OPT_TEST_POSITION ||
+                key == OPT_TEST_COEF)
+               err = -EINVAL;
        else if (key == OPT_FATAL_ERRORS)
                state->finish_at_xrun = true;
        else if (key == OPT_TEST_NOWAIT)
index d899134c6b92d6261582896f4463628cda40ae80..5a68646365eb8f023a585fd0841ac846a5822216 100644 (file)
@@ -21,6 +21,8 @@ enum no_short_opts {
        OPT_BUFFER_SIZE,
        // Obsoleted.
        OPT_MAX_FILE_TIME,
+       OPT_USE_STRFTIME,
+       OPT_PROCESS_ID_FILE,
 };
 
 static int allocate_paths(struct xfer_context *xfer, char *const *paths,
@@ -232,7 +234,7 @@ int xfer_options_parse_args(struct xfer_context *xfer,
                            const struct xfer_data *data, int argc,
                            char *const *argv)
 {
-       static const char *short_opts = "CPhvqd:s:f:c:r:t:I";
+       static const char *short_opts = "CPhvqd:s:f:c:r:t:IV:i";
        static const struct option long_opts[] = {
                // For generic purposes.
                {"capture",             0, 0, 'C'},
@@ -255,6 +257,10 @@ int xfer_options_parse_args(struct xfer_context *xfer,
                {"dump-hw-params",      0, 0, OPT_DUMP_HW_PARAMS},
                // Obsoleted.
                {"max-file-time",       1, 0, OPT_MAX_FILE_TIME},
+               {"use-strftime",        0, 0, OPT_USE_STRFTIME},
+               {"process-id-file",     1, 0, OPT_PROCESS_ID_FILE},
+               {"vumeter",             1, 0, 'V'},
+               {"interactive",         0, 0, 'i'},
        };
        char *s_opts;
        struct option *l_opts;
@@ -321,7 +327,11 @@ int xfer_options_parse_args(struct xfer_context *xfer,
                        xfer->dump_hw_params = true;
                else if (key == '?')
                        return -EINVAL;
-               else if (key == OPT_MAX_FILE_TIME) {
+               else if (key == OPT_MAX_FILE_TIME ||
+                        key == OPT_USE_STRFTIME ||
+                        key == OPT_PROCESS_ID_FILE ||
+                        key == 'V' ||
+                        key == 'i') {
                        fprintf(stderr,
                                "An option '--%s' is obsoleted and has no "
                                "effect.\n",