diff options
author | John Grossman <johngro@google.com> | 2011-08-22 13:25:06 -0700 |
---|---|---|
committer | Mike Lockwood <lockwood@android.com> | 2011-10-27 17:35:43 -0400 |
commit | 617c80a82e5620b2f16348e4bd3d7fc3b76e9021 (patch) | |
tree | d1ff4dd3adceed4324466c54eef21a1b6ab5ac68 /audio/audio_hw_hal.cpp | |
parent | 497fb4566204c88bd247aafc2412ddef8f85e480 (diff) | |
download | hardware_libhardware_legacy-617c80a82e5620b2f16348e4bd3d7fc3b76e9021.zip hardware_libhardware_legacy-617c80a82e5620b2f16348e4bd3d7fc3b76e9021.tar.gz hardware_libhardware_legacy-617c80a82e5620b2f16348e4bd3d7fc3b76e9021.tar.bz2 |
Add a bridge implementation of get_master_volume.
Add an implementation of the new get_master_volume method to bridge from the new
C only audio HAL to the old C++ legacy audio HAL.
Change-Id: I5c29814623b5141b0c69927ea60be9873c8a5dab
Diffstat (limited to 'audio/audio_hw_hal.cpp')
-rw-r--r-- | audio/audio_hw_hal.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/audio_hw_hal.cpp b/audio/audio_hw_hal.cpp index e6805c5..f249f88 100644 --- a/audio/audio_hw_hal.cpp +++ b/audio/audio_hw_hal.cpp @@ -346,6 +346,12 @@ static int adev_set_master_volume(struct audio_hw_device *dev, float volume) return ladev->hwif->setMasterVolume(volume); } +static int adev_get_master_volume(struct audio_hw_device *dev, float* volume) +{ + struct legacy_audio_device *ladev = to_ladev(dev); + return ladev->hwif->getMasterVolume(volume); +} + static int adev_set_mode(struct audio_hw_device *dev, int mode) { struct legacy_audio_device *ladev = to_ladev(dev); @@ -553,6 +559,7 @@ static int legacy_adev_open(const hw_module_t* module, const char* name, ladev->device.init_check = adev_init_check; ladev->device.set_voice_volume = adev_set_voice_volume; ladev->device.set_master_volume = adev_set_master_volume; + ladev->device.get_master_volume = adev_get_master_volume; ladev->device.set_mode = adev_set_mode; ladev->device.set_mic_mute = adev_set_mic_mute; ladev->device.get_mic_mute = adev_get_mic_mute; |