aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:13:48 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-05-11 05:13:48 +0000
commit495e58c550677f93acd327310769714694cd8f52 (patch)
treecced5800b1f3abef71378dc421a2951b08bc777e
parent43bde0116bb22fa68f3a14a18eef9dc332045f4f (diff)
parent4d37e1a4e6c8aaadea3ac2e1d85156851e4e7a48 (diff)
downloadtinyalsa-android13-mainline-networking-release.tar.gz
Change-Id: I709c9b1c4d82faa88e070a5e969b5d65cdc1d957
-rw-r--r--Android.bp5
-rw-r--r--OWNERS5
-rw-r--r--mixer.c3
-rw-r--r--tinyhostless.c9
-rw-r--r--tinyplay.c2
5 files changed, 18 insertions, 6 deletions
diff --git a/Android.bp b/Android.bp
index bbcb86d..045924c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -40,9 +40,10 @@ cc_library {
darwin: {
enabled: false,
},
+ bionic: {
+ system_shared_libs: ["libc", "libdl"],
+ },
},
-
- system_shared_libs: ["libc","libdl"],
}
cc_binary {
diff --git a/OWNERS b/OWNERS
index e1e3676..ccb311a 100644
--- a/OWNERS
+++ b/OWNERS
@@ -1,2 +1,5 @@
dvdli@google.com
-gkasten@google.com
+elaurent@google.com
+mnaganov@google.com
+carterhsu@google.com
+
diff --git a/mixer.c b/mixer.c
index 7b8540a..fd0ad8d 100644
--- a/mixer.c
+++ b/mixer.c
@@ -619,6 +619,9 @@ int mixer_ctl_get_array(struct mixer_ctl *ctl, void *array, size_t count)
}
case SNDRV_CTL_ELEM_TYPE_IEC958:
+ ret = grp->ops->ioctl(grp->data, SNDRV_CTL_IOCTL_ELEM_READ, &ev);
+ if (ret < 0)
+ return ret;
size = sizeof(ev.value.iec958);
source = &ev.value.iec958;
break;
diff --git a/tinyhostless.c b/tinyhostless.c
index 2f5e5f9..50c26fc 100644
--- a/tinyhostless.c
+++ b/tinyhostless.c
@@ -73,7 +73,7 @@ int main(int argc, char **argv)
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 @@ int main(int argc, char **argv)
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 @@ static int check_params(unsigned int card, unsigned int device, unsigned int dir
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 @@ int sample_is_playable(unsigned int card, unsigned int device, unsigned int chan
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");