+ if (!OPT_GIVEN(MIXER_API))
+ i = DEFAULT_MIXER;
+ else
+ FOR_EACH_MIXER(i)
+ if (!strcmp(mixer_name[i], OPT_STRING_VAL(MIXER_API)))
+ break;
+ if (i < NUM_SUPPORTED_MIXERS) {
+ PARA_NOTICE_LOG("using %s mixer API\n", mixer_name[i]);
+ return supported_mixer + i;
+ }
+ printf("available mixer APIs: ");
+ FOR_EACH_MIXER(i) {
+ int d = (i == DEFAULT_MIXER);
+ printf("%s%s%s ", d? "[" : "", mixer_name[i], d? "]" : "");
+ }
+ printf("\n");
+ exit(EXIT_FAILURE);
+}
+
+static void handle_help_flags(void)
+{
+ char *help;
+
+ if (OPT_GIVEN(DETAILED_HELP))
+ help = lls_long_help(CMD_PTR);
+ else if (OPT_GIVEN(HELP))
+ help = lls_short_help(CMD_PTR);
+ else
+ return;
+ printf("%s\n", help);
+ free(help);
+ exit(EXIT_SUCCESS);
+}
+
+/**
+ * The main function of para_fade.
+ *
+ * The executable is linked with the alsa or the oss mixer API, or both. It has
+ * a custom log function which prefixes log messages with the current date.
+ *
+ * \param argc Argument counter.
+ * \param argv Argument vector.
+ *
+ * \return EXIT_SUCCESS or EXIT_FAILURE.
+ */