diff options
author | Glenn Kasten <gkasten@google.com> | 2013-12-10 09:10:28 -0800 |
---|---|---|
committer | Glenn Kasten <gkasten@google.com> | 2013-12-16 14:10:22 -0800 |
commit | 2c3d2379ee6eadb32b63bf6de538cfd6487e8e20 (patch) | |
tree | d1d5c9644cf13a56ddce81506eead75f925ef4b4 /include | |
parent | 5082dbeb19e37883230510129c94336063a4f91c (diff) | |
download | hardware_libhardware_legacy-2c3d2379ee6eadb32b63bf6de538cfd6487e8e20.zip hardware_libhardware_legacy-2c3d2379ee6eadb32b63bf6de538cfd6487e8e20.tar.gz hardware_libhardware_legacy-2c3d2379ee6eadb32b63bf6de538cfd6487e8e20.tar.bz2 |
Use audio_channel_mask_t in AudioPolicy
Also:
- use %x format for logging channel masks
- use AUDIO_CHANNEL_IN_* constants from system/audio.h instead of AudioSystemLegacy.h symbols
- remove redundant casts
- use "channelMask" instead of "channels" to avoid possible confusion with channel counts
Change-Id: If05d6b1cae5cf1b560cd53a93ae9e592b719ec9e
Diffstat (limited to 'include')
-rw-r--r-- | include/hardware_legacy/AudioPolicyInterface.h | 4 | ||||
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 10 |
2 files changed, 7 insertions, 7 deletions
diff --git a/include/hardware_legacy/AudioPolicyInterface.h b/include/hardware_legacy/AudioPolicyInterface.h index 927fe6d..6a01684 100644 --- a/include/hardware_legacy/AudioPolicyInterface.h +++ b/include/hardware_legacy/AudioPolicyInterface.h @@ -92,7 +92,7 @@ public: virtual audio_io_handle_t getOutput(AudioSystem::stream_type stream, uint32_t samplingRate, audio_format_t format, - uint32_t channels, + audio_channel_mask_t channelMask, AudioSystem::output_flags flags, const audio_offload_info_t *offloadInfo) = 0; // indicates to the audio policy manager that the output starts being used by corresponding stream. @@ -110,7 +110,7 @@ public: virtual audio_io_handle_t getInput(int inputSource, uint32_t samplingRate, audio_format_t format, - uint32_t channels, + audio_channel_mask_t channelMask, AudioSystem::audio_in_acoustics acoustics) = 0; // indicates to the audio policy manager that the input starts being used. virtual status_t startInput(audio_io_handle_t input) = 0; diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index 84fb30e..a1f7d37 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -89,7 +89,7 @@ public: virtual audio_io_handle_t getOutput(AudioSystem::stream_type stream, uint32_t samplingRate, audio_format_t format, - uint32_t channels, + audio_channel_mask_t channelMask, AudioSystem::output_flags flags, const audio_offload_info_t *offloadInfo); virtual status_t startOutput(audio_io_handle_t output, @@ -102,7 +102,7 @@ public: virtual audio_io_handle_t getInput(int inputSource, uint32_t samplingRate, audio_format_t format, - uint32_t channels, + audio_channel_mask_t channelMask, AudioSystem::audio_in_acoustics acoustics); // indicates to the audio policy manager that the input starts being used. @@ -209,7 +209,7 @@ protected: bool isCompatibleProfile(audio_devices_t device, uint32_t samplingRate, audio_format_t format, - uint32_t channelMask, + audio_channel_mask_t channelMask, audio_output_flags_t flags) const; void dump(int fd); @@ -483,11 +483,11 @@ protected: IOProfile *getInputProfile(audio_devices_t device, uint32_t samplingRate, audio_format_t format, - uint32_t channelMask); + audio_channel_mask_t channelMask); IOProfile *getProfileForDirectOutput(audio_devices_t device, uint32_t samplingRate, audio_format_t format, - uint32_t channelMask, + audio_channel_mask_t channelMask, audio_output_flags_t flags); audio_io_handle_t selectOutputForEffects(const SortedVector<audio_io_handle_t>& outputs); |