diff options
-rw-r--r-- | include/media/AudioSystem.h | 2 | ||||
-rw-r--r-- | include/media/IAudioPolicyService.h | 2 | ||||
-rw-r--r-- | media/libmedia/AudioSystem.cpp | 4 | ||||
-rw-r--r-- | media/libmedia/IAudioPolicyService.cpp | 4 | ||||
-rw-r--r-- | services/audioflinger/AudioPolicyService.cpp | 6 | ||||
-rw-r--r-- | services/audioflinger/AudioPolicyService.h | 2 |
6 files changed, 11 insertions, 9 deletions
diff --git a/include/media/AudioSystem.h b/include/media/AudioSystem.h index 89bc95d..e20f1fd 100644 --- a/include/media/AudioSystem.h +++ b/include/media/AudioSystem.h @@ -185,7 +185,7 @@ public: audio_devices_t device); static uint32_t getStrategyForStream(audio_stream_type_t stream); - static uint32_t getDevicesForStream(audio_stream_type_t stream); + static audio_devices_t getDevicesForStream(audio_stream_type_t stream); static audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc); static status_t registerEffect(effect_descriptor_t *desc, diff --git a/include/media/IAudioPolicyService.h b/include/media/IAudioPolicyService.h index bdd7747..04c927a 100644 --- a/include/media/IAudioPolicyService.h +++ b/include/media/IAudioPolicyService.h @@ -79,7 +79,7 @@ public: int *index, audio_devices_t device) = 0; virtual uint32_t getStrategyForStream(audio_stream_type_t stream) = 0; - virtual uint32_t getDevicesForStream(audio_stream_type_t stream) = 0; + virtual audio_devices_t getDevicesForStream(audio_stream_type_t stream) = 0; virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) = 0; virtual status_t registerEffect(effect_descriptor_t *desc, audio_io_handle_t io, diff --git a/media/libmedia/AudioSystem.cpp b/media/libmedia/AudioSystem.cpp index ec4c044..404853c 100644 --- a/media/libmedia/AudioSystem.cpp +++ b/media/libmedia/AudioSystem.cpp @@ -701,10 +701,10 @@ uint32_t AudioSystem::getStrategyForStream(audio_stream_type_t stream) return aps->getStrategyForStream(stream); } -uint32_t AudioSystem::getDevicesForStream(audio_stream_type_t stream) +audio_devices_t AudioSystem::getDevicesForStream(audio_stream_type_t stream) { const sp<IAudioPolicyService>& aps = AudioSystem::get_audio_policy_service(); - if (aps == 0) return 0; + if (aps == 0) return (audio_devices_t)0; return aps->getDevicesForStream(stream); } diff --git a/media/libmedia/IAudioPolicyService.cpp b/media/libmedia/IAudioPolicyService.cpp index 99385aa..da7c124 100644 --- a/media/libmedia/IAudioPolicyService.cpp +++ b/media/libmedia/IAudioPolicyService.cpp @@ -267,13 +267,13 @@ public: return reply.readInt32(); } - virtual uint32_t getDevicesForStream(audio_stream_type_t stream) + virtual audio_devices_t getDevicesForStream(audio_stream_type_t stream) { Parcel data, reply; data.writeInterfaceToken(IAudioPolicyService::getInterfaceDescriptor()); data.writeInt32(static_cast <uint32_t>(stream)); remote()->transact(GET_DEVICES_FOR_STREAM, data, &reply); - return (uint32_t) reply.readInt32(); + return (audio_devices_t) reply.readInt32(); } virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc) diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index 753b1d2..62768bf 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -432,10 +432,12 @@ uint32_t AudioPolicyService::getStrategyForStream(audio_stream_type_t stream) return mpAudioPolicy->get_strategy_for_stream(mpAudioPolicy, stream); } -uint32_t AudioPolicyService::getDevicesForStream(audio_stream_type_t stream) +//audio policy: use audio_device_t appropriately + +audio_devices_t AudioPolicyService::getDevicesForStream(audio_stream_type_t stream) { if (mpAudioPolicy == NULL) { - return 0; + return (audio_devices_t)0; } return mpAudioPolicy->get_devices_for_stream(mpAudioPolicy, stream); } diff --git a/services/audioflinger/AudioPolicyService.h b/services/audioflinger/AudioPolicyService.h index 962c917..e41d51e 100644 --- a/services/audioflinger/AudioPolicyService.h +++ b/services/audioflinger/AudioPolicyService.h @@ -95,7 +95,7 @@ public: audio_devices_t device); virtual uint32_t getStrategyForStream(audio_stream_type_t stream); - virtual uint32_t getDevicesForStream(audio_stream_type_t stream); + virtual audio_devices_t getDevicesForStream(audio_stream_type_t stream); virtual audio_io_handle_t getOutputForEffect(effect_descriptor_t *desc); virtual status_t registerEffect(effect_descriptor_t *desc, |