diff options
author | Steve Kondik <shade@chemlab.org> | 2012-11-18 20:46:23 -0800 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2012-11-18 20:46:23 -0800 |
commit | 90b17dc3aca5efbed34a82972db73de71b724fe3 (patch) | |
tree | 9acc413d20b5520ad4f5f96786e46718d5dbb7fb /modules/audio/audio_hw.c | |
parent | bb992a86df645482167013634a8c1de1a3109344 (diff) | |
parent | c55d7ac337641c7ad9ff734169e65553fbb40787 (diff) | |
download | hardware_libhardware-90b17dc3aca5efbed34a82972db73de71b724fe3.zip hardware_libhardware-90b17dc3aca5efbed34a82972db73de71b724fe3.tar.gz hardware_libhardware-90b17dc3aca5efbed34a82972db73de71b724fe3.tar.bz2 |
Merge branch 'jb-mr1-release' of https://android.googlesource.com/platform/hardware/libhardware into HEAD
Conflicts:
include/hardware/fb.h
include/hardware/hwcomposer.h
modules/audio/audio_hw.c
Change-Id: Ib37d49cb600bf0cd062847f9c0eb3841bae13f74
Diffstat (limited to 'modules/audio/audio_hw.c')
-rw-r--r-- | modules/audio/audio_hw.c | 45 |
1 files changed, 16 insertions, 29 deletions
diff --git a/modules/audio/audio_hw.c b/modules/audio/audio_hw.c index 78bed03..b051cf9 100644 --- a/modules/audio/audio_hw.c +++ b/modules/audio/audio_hw.c @@ -55,7 +55,7 @@ static size_t out_get_buffer_size(const struct audio_stream *stream) return 4096; } -static uint32_t out_get_channels(const struct audio_stream *stream) +static audio_channel_mask_t out_get_channels(const struct audio_stream *stream) { return AUDIO_CHANNEL_OUT_STEREO; } @@ -150,7 +150,7 @@ static size_t in_get_buffer_size(const struct audio_stream *stream) return 320; } -static uint32_t in_get_channels(const struct audio_stream *stream) +static audio_channel_mask_t in_get_channels(const struct audio_stream *stream) { return AUDIO_CHANNEL_IN_MONO; } @@ -292,8 +292,17 @@ static int adev_set_master_volume(struct audio_hw_device *dev, float volume) } #ifndef ICS_AUDIO_BLOB -static int adev_get_master_volume(struct audio_hw_device *dev, - float *volume) +static int adev_get_master_volume(struct audio_hw_device *dev, float *volume) +{ + return -ENOSYS; +} + +static int adev_set_master_mute(struct audio_hw_device *dev, bool muted) +{ + return -ENOSYS; +} + +static int adev_get_master_mute(struct audio_hw_device *dev, bool *muted) { return -ENOSYS; } @@ -376,29 +385,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) { @@ -413,16 +399,17 @@ 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; #ifndef ICS_AUDIO_BLOB adev->device.get_master_volume = adev_get_master_volume; + adev->device.set_master_mute = adev_set_master_mute; + adev->device.get_master_mute = adev_get_master_mute; #endif adev->device.set_mode = adev_set_mode; adev->device.set_mic_mute = adev_set_mic_mute; |