summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-04-06 08:57:48 -0700
committerEric Laurent <elaurent@google.com>2012-04-06 14:03:09 -0700
commit79f90bdc7de561aa31888948c0661568ccc33da1 (patch)
treeff9c2d46d5ab6cd134cb368a868cd295226eb4d0 /include
parenta64adba539c290624c27a8506ee6c0ba39f44ffc (diff)
downloadsystem_core-79f90bdc7de561aa31888948c0661568ccc33da1.zip
system_core-79f90bdc7de561aa31888948c0661568ccc33da1.tar.gz
system_core-79f90bdc7de561aa31888948c0661568ccc33da1.tar.bz2
audio: added definitions for usb audio devices
Change-Id: I4a4f5919708a09f87974367961b1d09664ae6c06
Diffstat (limited to 'include')
-rw-r--r--include/system/audio.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/system/audio.h b/include/system/audio.h
index 0276231..4cadb67 100644
--- a/include/system/audio.h
+++ b/include/system/audio.h
@@ -290,6 +290,8 @@ typedef enum {
AUDIO_DEVICE_OUT_AUX_DIGITAL = 0x400,
AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET = 0x800,
AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET = 0x1000,
+ AUDIO_DEVICE_OUT_USB_ACCESSORY = 0x2000,
+ AUDIO_DEVICE_OUT_USB_DEVICE = 0x4000,
AUDIO_DEVICE_OUT_DEFAULT = 0x8000,
AUDIO_DEVICE_OUT_ALL = (AUDIO_DEVICE_OUT_EARPIECE |
AUDIO_DEVICE_OUT_SPEAKER |
@@ -304,6 +306,8 @@ typedef enum {
AUDIO_DEVICE_OUT_AUX_DIGITAL |
AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET |
AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET |
+ AUDIO_DEVICE_OUT_USB_ACCESSORY |
+ AUDIO_DEVICE_OUT_USB_DEVICE |
AUDIO_DEVICE_OUT_DEFAULT),
AUDIO_DEVICE_OUT_ALL_A2DP = (AUDIO_DEVICE_OUT_BLUETOOTH_A2DP |
AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES |
@@ -311,6 +315,8 @@ typedef enum {
AUDIO_DEVICE_OUT_ALL_SCO = (AUDIO_DEVICE_OUT_BLUETOOTH_SCO |
AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET |
AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT),
+ AUDIO_DEVICE_OUT_ALL_USB = (AUDIO_DEVICE_OUT_USB_ACCESSORY |
+ AUDIO_DEVICE_OUT_USB_DEVICE),
/* input devices */
AUDIO_DEVICE_IN_COMMUNICATION = 0x10000,
@@ -368,6 +374,14 @@ static inline bool audio_is_bluetooth_sco_device(audio_devices_t device)
return false;
}
+static inline bool audio_is_usb_device(audio_devices_t device)
+{
+ if ((popcount(device) == 1) && (device & AUDIO_DEVICE_OUT_ALL_USB))
+ return true;
+ else
+ return false;
+}
+
static inline bool audio_is_input_channel(uint32_t channel)
{
if ((channel & ~AUDIO_CHANNEL_IN_ALL) == 0)