[alsa-devel] [PATCH V3 3/4] BAT: Adjust parameters and strings

han.lu at intel.com han.lu at intel.com
Fri Oct 16 10:12:05 CEST 2015


From: "Lu, Han" <han.lu at intel.com>

Use rational parameters and clearer comments.

Signed-off-by: Lu, Han <han.lu at intel.com>

diff --git a/bat/bat.c b/bat/bat.c
index 2320984..02b1abd 100644
--- a/bat/bat.c
+++ b/bat/bat.c
@@ -268,16 +268,16 @@ static void test_capture(struct bat *bat)
 	}
 }
 
-static void usage(struct bat *bat, char *argv[])
+static void usage(struct bat *bat, const char *command)
 {
 	fprintf(bat->log,
 _("Usage:%s [Option]...\n"
 "\n"
 "-h, --help             help\n"
-"-D                     sound card\n"
+"-D                     pcm for both playback and capture\n"
 "-P                     playback pcm\n"
 "-C                     capture pcm\n"
-"-f                     sample size\n"
+"-f                     sample format\n"
 "-c                     number of channels\n"
 "-r                     sampling rate\n"
 "-n                     frames to capture\n"
@@ -289,7 +289,7 @@ _("Usage:%s [Option]...\n"
 "    --file=#           input file\n"
 "    --saveplay=#       save playback content to target file, for debug\n"
 "    --local            internal loop, bypass hardware\n"
-), argv[0]);
+), command);
 	fprintf(bat->log, _("Recognized sample formats are: %s %s %s %s\n"),
 			snd_pcm_format_name(SND_PCM_FORMAT_U8),
 			snd_pcm_format_name(SND_PCM_FORMAT_S16_LE),
@@ -402,7 +402,7 @@ static void parse_arguments(struct bat *bat, int argc, char *argv[])
 			break;
 		case 'h':
 		default:
-			usage(bat, argv);
+			usage(bat, argv[0]);
 			exit(EXIT_SUCCESS);
 		}
 	}
-- 
1.9.1



More information about the Alsa-devel mailing list