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 --- axfer/xfer-libasound.c | 13 ++++++++++++- axfer/xfer-options.c | 14 ++++++++++++-- 2 files changed, 24 insertions(+), 3 deletions(-)
diff --git a/axfer/xfer-libasound.c b/axfer/xfer-libasound.c index f6d0515..bacd835 100644 --- a/axfer/xfer-libasound.c +++ b/axfer/xfer-libasound.c @@ -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) diff --git a/axfer/xfer-options.c b/axfer/xfer-options.c index d899134..5a68646 100644 --- a/axfer/xfer-options.c +++ b/axfer/xfer-options.c @@ -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",