diff options
author | David Li <dvdli@google.com> | 2020-12-02 07:46:19 +0000 |
---|---|---|
committer | David Li <dvdli@google.com> | 2020-12-02 07:46:19 +0000 |
commit | c0d68b1cfc5e91e5b154b1b69af04b4d6006a122 (patch) | |
tree | 7028f39cbd40f356e0be427e8b436e6099f86f6b /src/pcm.c | |
parent | 40867609e738919872c88b7716b17c30d96211a4 (diff) |
fix build breakage
1. Add a missing field and a function
2. Disable the deprecated attribute in Android temporarily to
allow us to use "pcm_read/write" which are deprecated upstream
3. Remove an unused define and an include in mixer.h
4. Add mixer_ctl_event and copy the snd_ctl_event to mixer_ctl_event
5. Add pcm_ioctl function and mark as deprecated function
Diffstat (limited to 'src/pcm.c')
-rw-r--r-- | src/pcm.c | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1750,3 +1750,21 @@ long pcm_get_delay(struct pcm *pcm) return pcm->pcm_delay; } + +// TODO: Currently in Android, there are some libraries using this function to control the driver. +// We should remove this function as soon as possible. +int pcm_ioctl(struct pcm *pcm, int request, ...) +{ + va_list ap; + void * arg; + + if (!pcm_is_ready(pcm)) + return -1; + + va_start(ap, request); + arg = va_arg(ap, void *); + va_end(ap); + + // FIXME Does not handle plugins + return ioctl(pcm->fd, request, arg); +} |