Merge "Add helpers for audio remote submix devices." into klp-dev

This commit is contained in:
Jeff Brown 2013-08-19 23:56:44 +00:00 committed by Android (Google) Code Review
commit c7a4f74dad

View file

@ -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;