diff options
author | Steve Kondik <shade@chemlab.org> | 2014-08-03 08:35:22 -0700 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2014-08-03 22:13:01 -0700 |
commit | e23d708a8b43fee61950101f88e3da3ad624535c (patch) | |
tree | 2ddf188bb1fb91aabf8d4f303d05554e7680c820 | |
parent | 0faa063518b2e15e4447fc6b932a8a6925e3c8b4 (diff) | |
download | android_external_tinyalsa-cm-11.0.tar.gz android_external_tinyalsa-cm-11.0.tar.bz2 android_external_tinyalsa-cm-11.0.zip |
Revert "Revert "pcm: add support for pcm_ioctl() api""cm-11.0-XNPH44S-bacon-5fa8c79c0bcm-11.0-XNPH05Q-tomato-9828f8e9cccm-11.0-XNPH05Q-bacon-5229c4ef56stable/cm-11.0-XNG3Cstable/cm-11.0-XNG2Sstable/cm-11.0-XNF9Xstable/cm-11.0-XNF8Ystable/cm-11.0shipping/cm-11.0cm-11.0
* At least one thing still wants this.
This reverts commit 0faa063518b2e15e4447fc6b932a8a6925e3c8b4.
Change-Id: I656940cb0bd6dd1f354f6a104a2d89c9922340a0
-rw-r--r-- | include/tinyalsa/asoundlib.h | 6 | ||||
-rw-r--r-- | pcm.c | 15 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index ec526e6..c1cef00 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -1,5 +1,8 @@ /* asoundlib.h ** +** Copyright (c) 2013, The Linux Foundation. All rights reserved. +** Not a contribution. +** ** Copyright 2011, The Android Open Source Project ** ** Redistribution and use in source and binary forms, with or without @@ -203,6 +206,9 @@ int pcm_mmap_commit(struct pcm *pcm, unsigned int offset, unsigned int frames); int pcm_start(struct pcm *pcm); int pcm_stop(struct pcm *pcm); +/* ioctl function for PCM driver */ +int pcm_ioctl(struct pcm *pcm, int request, ...); + /* Interrupt driven API */ int pcm_wait(struct pcm *pcm, int timeout); @@ -1,5 +1,8 @@ /* pcm.c ** +** Copyright (c) 2013, The Linux Foundation. All rights reserved. +** Not a contribution. +** ** Copyright 2011, The Android Open Source Project ** ** Redistribution and use in source and binary forms, with or without @@ -1039,3 +1042,15 @@ int pcm_mmap_read(struct pcm *pcm, void *data, unsigned int count) return pcm_mmap_transfer(pcm, data, count); } + +int pcm_ioctl(struct pcm *pcm, int request, ...) +{ + va_list ap; + void * arg; + + va_start(ap, request); + arg = va_arg(ap, void *); + va_end(ap); + + return ioctl(pcm->fd, request, arg); +} |