diff options
author | Jeff Brown <jeffbrown@google.com> | 2013-08-16 20:09:37 -0700 |
---|---|---|
committer | Jeff Brown <jeffbrown@google.com> | 2013-08-16 20:21:10 -0700 |
commit | 8ecc7afca42d0bb27aad25733790309f71f307d6 (patch) | |
tree | 1f25c7e2c33abd2ac4a39d4340ebc55242bcc5cb | |
parent | 08380deb247865b862f7f284c80eeea4f5ec38f6 (diff) | |
download | system_core-8ecc7afca42d0bb27aad25733790309f71f307d6.zip system_core-8ecc7afca42d0bb27aad25733790309f71f307d6.tar.gz system_core-8ecc7afca42d0bb27aad25733790309f71f307d6.tar.bz2 |
Add helpers for audio remote submix devices.
Bug: 10265163
Change-Id: Iea7ecab4f2a655b719ff14b04c757d6dbd7a7ef3
-rw-r--r-- | include/system/audio.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/system/audio.h b/include/system/audio.h index abd2990..b90f4a9 100644 --- a/include/system/audio.h +++ b/include/system/audio.h @@ -31,6 +31,9 @@ __BEGIN_DECLS * frameworks/base/include/media/AudioSystem.h */ +/* device address used to refer to the standard remote submix */ +#define AUDIO_REMOTE_SUBMIX_DEVICE_ADDRESS "0" + typedef int audio_io_handle_t; /* Audio stream types */ @@ -481,7 +484,8 @@ static inline bool audio_is_usb_device(audio_devices_t device) static inline bool audio_is_remote_submix_device(audio_devices_t device) { - if ((popcount(device) == 1) && (device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX)) + if ((device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) == AUDIO_DEVICE_OUT_REMOTE_SUBMIX + || (device & AUDIO_DEVICE_IN_REMOTE_SUBMIX) == AUDIO_DEVICE_IN_REMOTE_SUBMIX) return true; else return false; |