diff options
| author | Glenn Kasten <gkasten@google.com> | 2012-01-17 11:33:14 -0800 |
|---|---|---|
| committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-17 11:33:14 -0800 |
| commit | 9038c346d76d6f9e33be34b7760f39804553d993 (patch) | |
| tree | 3ae1fd05e7c7a5879a6892d8c75cedd0cd65339f /audio | |
| parent | d97809bca3b086fe85475f462b6fdba6775f5ae1 (diff) | |
| parent | 5c1ebdc9db8d7e5ff51704f80c55f460638eb095 (diff) | |
| download | hardware_libhardware_legacy-9038c346d76d6f9e33be34b7760f39804553d993.tar.gz hardware_libhardware_legacy-9038c346d76d6f9e33be34b7760f39804553d993.tar.bz2 hardware_libhardware_legacy-9038c346d76d6f9e33be34b7760f39804553d993.zip | |
Merge "Use audio_mode_t consistently"
Diffstat (limited to 'audio')
| -rw-r--r-- | audio/audio_hw_hal.cpp | 5 | ||||
| -rw-r--r-- | audio/audio_policy_hal.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/audio/audio_hw_hal.cpp b/audio/audio_hw_hal.cpp index 6810c87..5fdfdb8 100644 --- a/audio/audio_hw_hal.cpp +++ b/audio/audio_hw_hal.cpp @@ -346,10 +346,11 @@ static int adev_set_master_volume(struct audio_hw_device *dev, float volume) return ladev->hwif->setMasterVolume(volume); } -static int adev_set_mode(struct audio_hw_device *dev, int mode) +static int adev_set_mode(struct audio_hw_device *dev, audio_mode_t mode) { struct legacy_audio_device *ladev = to_ladev(dev); - return ladev->hwif->setMode(mode); + // as this is the legacy API, don't change it to use audio_mode_t instead of int + return ladev->hwif->setMode((int) mode); } static int adev_set_mic_mute(struct audio_hw_device *dev, bool state) diff --git a/audio/audio_policy_hal.cpp b/audio/audio_policy_hal.cpp index a229ea9..a0100a8 100644 --- a/audio/audio_policy_hal.cpp +++ b/audio/audio_policy_hal.cpp @@ -84,10 +84,11 @@ static audio_policy_dev_state_t ap_get_device_connection_state( device_address); } -static void ap_set_phone_state(struct audio_policy *pol, int state) +static void ap_set_phone_state(struct audio_policy *pol, audio_mode_t state) { struct legacy_audio_policy *lap = to_lap(pol); - lap->apm->setPhoneState(state); + // as this is the legacy API, don't change it to use audio_mode_t instead of int + lap->apm->setPhoneState((int) state); } /* indicate a change in ringer mode */ |
