[automerger skipped] Empty merge of sc-v2-dev-plus-aosp-without-vendor@8084891 am: 61bf563f1d -s ours am: 897df6b503 -s ours
am skip reason: Merged-In I0e91024c49ccc9804d35b0392b8680d9a5b25648 with SHA-1 f84a88a2e4 is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/external/tinyalsa/+/16843636
Change-Id: Iaeb7e8870ff349c0fc8117ebe39585b36737d4f3
diff --git a/tinyhostless.c b/tinyhostless.c
index 2f5e5f9..50c26fc 100644
--- a/tinyhostless.c
+++ b/tinyhostless.c
@@ -73,7 +73,7 @@
if (argc < 2) {
fprintf(stderr, "Usage: %s [-D card] [-P playback device]"
" [-C capture device] [-p period_size] [-n n_periods]"
- " [-c num_channels] [-r sample_rate] [-l]"
+ " [-c num_channels] [-b number_bits] [-r sample_rate] [-l]"
" [-T playback/capture time]\n\n"
"Used to enable 'hostless' mode for audio devices with a DSP back-end.\n"
"Alternatively, specify '-l' for loopback mode: this program will read\n"
@@ -110,6 +110,11 @@
if (*argv)
num_channels = atoi(*argv);
}
+ if (strcmp(*argv, "-b") == 0) {
+ argv++;
+ if (*argv)
+ number_bits = atoi(*argv);
+ }
if (strcmp(*argv, "-r") == 0) {
argv++;
if (*argv)
@@ -204,7 +209,7 @@
can_play = check_param(params, PCM_PARAM_RATE, config->rate, "Sample rate", "Hz");
can_play &= check_param(params, PCM_PARAM_CHANNELS, config->channels, "Sample", " channels");
- can_play &= check_param(params, PCM_PARAM_SAMPLE_BITS, bits, "Bitrate", " bits");
+ can_play &= check_param(params, PCM_PARAM_SAMPLE_BITS, bits, "Bitwidth", " bits");
can_play &= check_param(params, PCM_PARAM_PERIOD_SIZE, config->period_size, "Period size", " frames");
can_play &= check_param(params, PCM_PARAM_PERIODS, config->period_count, "Period count", " periods");
diff --git a/tinyplay.c b/tinyplay.c
index 0354df6..8928d92 100644
--- a/tinyplay.c
+++ b/tinyplay.c
@@ -201,7 +201,7 @@
can_play = check_param(params, PCM_PARAM_RATE, rate, "Sample rate", "Hz");
can_play &= check_param(params, PCM_PARAM_CHANNELS, channels, "Sample", " channels");
- can_play &= check_param(params, PCM_PARAM_SAMPLE_BITS, bits, "Bitrate", " bits");
+ can_play &= check_param(params, PCM_PARAM_SAMPLE_BITS, bits, "Bitwidth", " bits");
can_play &= check_param(params, PCM_PARAM_PERIOD_SIZE, period_size, "Period size", " frames");
can_play &= check_param(params, PCM_PARAM_PERIODS, period_count, "Period count", " periods");