summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2012-09-07 14:52:27 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-09-07 14:52:28 -0700
commit43110fa5e5097a196b1f8902b7af508bc07b66f7 (patch)
tree70c452b6b9c8a16ab4321e50f60ff97fc1537aae /modules
parent416d37b37b9f84c3e759d78af50d88be7e778247 (diff)
parent85e08e26258711f2fd672d9a920d88bf91410f6b (diff)
downloadhardware_libhardware-43110fa5e5097a196b1f8902b7af508bc07b66f7.zip
hardware_libhardware-43110fa5e5097a196b1f8902b7af508bc07b66f7.tar.gz
hardware_libhardware-43110fa5e5097a196b1f8902b7af508bc07b66f7.tar.bz2
Merge "audio: new audio devices enums" into jb-mr1-dev
Diffstat (limited to 'modules')
-rw-r--r--modules/audio/audio_hw.c26
-rw-r--r--modules/usbaudio/audio_hw.c8
2 files changed, 2 insertions, 32 deletions
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c
index e4fb711..3051519 100644
--- a/modules/audio/audio_hw.c
+++ b/modules/audio/audio_hw.c
@@ -379,29 +379,6 @@ static int adev_close(hw_device_t *device)
return 0;
}
-static uint32_t adev_get_supported_devices(const struct audio_hw_device *dev)
-{
- return (/* OUT */
- AUDIO_DEVICE_OUT_EARPIECE |
- AUDIO_DEVICE_OUT_SPEAKER |
- AUDIO_DEVICE_OUT_WIRED_HEADSET |
- AUDIO_DEVICE_OUT_WIRED_HEADPHONE |
- AUDIO_DEVICE_OUT_AUX_DIGITAL |
- AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET |
- AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET |
- AUDIO_DEVICE_OUT_ALL_SCO |
- AUDIO_DEVICE_OUT_DEFAULT |
- /* IN */
- AUDIO_DEVICE_IN_COMMUNICATION |
- AUDIO_DEVICE_IN_AMBIENT |
- AUDIO_DEVICE_IN_BUILTIN_MIC |
- AUDIO_DEVICE_IN_WIRED_HEADSET |
- AUDIO_DEVICE_IN_AUX_DIGITAL |
- AUDIO_DEVICE_IN_BACK_MIC |
- AUDIO_DEVICE_IN_ALL_SCO |
- AUDIO_DEVICE_IN_DEFAULT);
-}
-
static int adev_open(const hw_module_t* module, const char* name,
hw_device_t** device)
{
@@ -416,11 +393,10 @@ static int adev_open(const hw_module_t* module, const char* name,
return -ENOMEM;
adev->device.common.tag = HARDWARE_DEVICE_TAG;
- adev->device.common.version = AUDIO_DEVICE_API_VERSION_1_0;
+ adev->device.common.version = AUDIO_DEVICE_API_VERSION_2_0;
adev->device.common.module = (struct hw_module_t *) module;
adev->device.common.close = adev_close;
- adev->device.get_supported_devices = adev_get_supported_devices;
adev->device.init_check = adev_init_check;
adev->device.set_voice_volume = adev_set_voice_volume;
adev->device.set_master_volume = adev_set_master_volume;
diff --git a/modules/usbaudio/audio_hw.c b/modules/usbaudio/audio_hw.c
index 9283016..f33c343 100644
--- a/modules/usbaudio/audio_hw.c
+++ b/modules/usbaudio/audio_hw.c
@@ -379,11 +379,6 @@ static int adev_close(hw_device_t *device)
return 0;
}
-static uint32_t adev_get_supported_devices(const struct audio_hw_device *dev)
-{
- return AUDIO_DEVICE_OUT_ALL_USB;
-}
-
static int adev_open(const hw_module_t* module, const char* name,
hw_device_t** device)
{
@@ -398,11 +393,10 @@ static int adev_open(const hw_module_t* module, const char* name,
return -ENOMEM;
adev->hw_device.common.tag = HARDWARE_DEVICE_TAG;
- adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_1_0;
+ adev->hw_device.common.version = AUDIO_DEVICE_API_VERSION_2_0;
adev->hw_device.common.module = (struct hw_module_t *) module;
adev->hw_device.common.close = adev_close;
- adev->hw_device.get_supported_devices = adev_get_supported_devices;
adev->hw_device.init_check = adev_init_check;
adev->hw_device.set_voice_volume = adev_set_voice_volume;
adev->hw_device.set_master_volume = adev_set_master_volume;