diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-11 05:13:48 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-11 05:13:48 +0000 |
commit | 495e58c550677f93acd327310769714694cd8f52 (patch) | |
tree | cced5800b1f3abef71378dc421a2951b08bc777e | |
parent | 43bde0116bb22fa68f3a14a18eef9dc332045f4f (diff) | |
parent | 4d37e1a4e6c8aaadea3ac2e1d85156851e4e7a48 (diff) | |
download | tinyalsa-android13-mainline-networking-release.tar.gz |
Snap for 8570526 from 4d37e1a4e6c8aaadea3ac2e1d85156851e4e7a48 to mainline-networking-releaseaml_net_331910030aml_net_331812010aml_net_331710000aml_net_331610000aml_net_331412000aml_net_331313030aml_net_331313010aml_net_331110020aml_net_331011030aml_net_330910010aml_net_330811010android13-mainline-networking-release
Change-Id: I709c9b1c4d82faa88e070a5e969b5d65cdc1d957
-rw-r--r-- | Android.bp | 5 | ||||
-rw-r--r-- | OWNERS | 5 | ||||
-rw-r--r-- | mixer.c | 3 | ||||
-rw-r--r-- | tinyhostless.c | 9 | ||||
-rw-r--r-- | tinyplay.c | 2 |
5 files changed, 18 insertions, 6 deletions
@@ -40,9 +40,10 @@ cc_library { darwin: { enabled: false, }, + bionic: { + system_shared_libs: ["libc", "libdl"], + }, }, - - system_shared_libs: ["libc","libdl"], } cc_binary { @@ -1,2 +1,5 @@ dvdli@google.com -gkasten@google.com +elaurent@google.com +mnaganov@google.com +carterhsu@google.com + @@ -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"); @@ -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"); |