diff options
-rw-r--r-- | audio/AudioPolicyManagerBase.cpp | 10 | ||||
-rw-r--r-- | audio/audio_policy_hal.cpp | 4 | ||||
-rw-r--r-- | include/hardware_legacy/AudioPolicyInterface.h | 19 | ||||
-rw-r--r-- | include/hardware_legacy/AudioPolicyManagerBase.h | 19 |
4 files changed, 25 insertions, 27 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index 8187134..b3a9044 100644 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -495,7 +495,7 @@ void AudioPolicyManagerBase::setSystemProperty(const char* property, const char* AudioPolicyManagerBase::IOProfile *AudioPolicyManagerBase::getProfileForDirectOutput( audio_devices_t device, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask, audio_output_flags_t flags) { @@ -529,7 +529,7 @@ AudioPolicyManagerBase::IOProfile *AudioPolicyManagerBase::getProfileForDirectOu audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type stream, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask, AudioSystem::output_flags flags, const audio_offload_info_t *offloadInfo) @@ -900,7 +900,7 @@ void AudioPolicyManagerBase::releaseOutput(audio_io_handle_t output) audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask, AudioSystem::audio_in_acoustics acoustics) { @@ -2661,7 +2661,7 @@ uint32_t AudioPolicyManagerBase::setOutputDevice(audio_io_handle_t output, AudioPolicyManagerBase::IOProfile *AudioPolicyManagerBase::getInputProfile(audio_devices_t device, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask) { // Choose an input profile based on the requested capture parameters: select the first available @@ -3549,7 +3549,7 @@ AudioPolicyManagerBase::IOProfile::~IOProfile() // get a valid a match bool AudioPolicyManagerBase::IOProfile::isCompatibleProfile(audio_devices_t device, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask, audio_output_flags_t flags) const { diff --git a/audio/audio_policy_hal.cpp b/audio/audio_policy_hal.cpp index e44bc48..87c4131 100644 --- a/audio/audio_policy_hal.cpp +++ b/audio/audio_policy_hal.cpp @@ -145,7 +145,7 @@ static audio_io_handle_t ap_get_output(struct audio_policy *pol, ALOGV("%s: tid %d", __func__, gettid()); return lap->apm->getOutput((AudioSystem::stream_type)stream, - sampling_rate, (int) format, channelMask, + sampling_rate, format, channelMask, (AudioSystem::output_flags)flags, offloadInfo); } @@ -180,7 +180,7 @@ static audio_io_handle_t ap_get_input(struct audio_policy *pol, audio_source_t i audio_in_acoustics_t acoustics) { struct legacy_audio_policy *lap = to_lap(pol); - return lap->apm->getInput((int) inputSource, sampling_rate, (int) format, channelMask, + return lap->apm->getInput((int) inputSource, sampling_rate, format, channelMask, (AudioSystem::audio_in_acoustics)acoustics); } diff --git a/include/hardware_legacy/AudioPolicyInterface.h b/include/hardware_legacy/AudioPolicyInterface.h index 7847bdd..927fe6d 100644 --- a/include/hardware_legacy/AudioPolicyInterface.h +++ b/include/hardware_legacy/AudioPolicyInterface.h @@ -90,12 +90,11 @@ public: // request an output appropriate for playback of the supplied stream type and parameters virtual audio_io_handle_t getOutput(AudioSystem::stream_type stream, - uint32_t samplingRate = 0, - uint32_t format = AudioSystem::FORMAT_DEFAULT, - uint32_t channels = 0, - AudioSystem::output_flags flags = - AudioSystem::OUTPUT_FLAG_INDIRECT, - const audio_offload_info_t *offloadInfo = NULL) = 0; + uint32_t samplingRate, + audio_format_t format, + uint32_t channels, + 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. virtual status_t startOutput(audio_io_handle_t output, AudioSystem::stream_type stream, @@ -109,10 +108,10 @@ public: // request an input appropriate for record from the supplied device with supplied parameters. virtual audio_io_handle_t getInput(int inputSource, - uint32_t samplingRate = 0, - uint32_t Format = AudioSystem::FORMAT_DEFAULT, - uint32_t channels = 0, - AudioSystem::audio_in_acoustics acoustics = (AudioSystem::audio_in_acoustics)0) = 0; + uint32_t samplingRate, + audio_format_t format, + uint32_t channels, + 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; // indicates to the audio policy manager that the input stops being used. diff --git a/include/hardware_legacy/AudioPolicyManagerBase.h b/include/hardware_legacy/AudioPolicyManagerBase.h index 8343f2b..84fb30e 100644 --- a/include/hardware_legacy/AudioPolicyManagerBase.h +++ b/include/hardware_legacy/AudioPolicyManagerBase.h @@ -87,12 +87,11 @@ public: virtual void setSystemProperty(const char* property, const char* value); virtual status_t initCheck(); virtual audio_io_handle_t getOutput(AudioSystem::stream_type stream, - uint32_t samplingRate = 0, - uint32_t format = AudioSystem::FORMAT_DEFAULT, - uint32_t channels = 0, - AudioSystem::output_flags flags = - AudioSystem::OUTPUT_FLAG_INDIRECT, - const audio_offload_info_t *offloadInfo = NULL); + uint32_t samplingRate, + audio_format_t format, + uint32_t channels, + AudioSystem::output_flags flags, + const audio_offload_info_t *offloadInfo); virtual status_t startOutput(audio_io_handle_t output, AudioSystem::stream_type stream, int session = 0); @@ -102,7 +101,7 @@ public: virtual void releaseOutput(audio_io_handle_t output); virtual audio_io_handle_t getInput(int inputSource, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channels, AudioSystem::audio_in_acoustics acoustics); @@ -209,7 +208,7 @@ protected: bool isCompatibleProfile(audio_devices_t device, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask, audio_output_flags_t flags) const; @@ -483,11 +482,11 @@ protected: AudioSystem::output_flags flags); IOProfile *getInputProfile(audio_devices_t device, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask); IOProfile *getProfileForDirectOutput(audio_devices_t device, uint32_t samplingRate, - uint32_t format, + audio_format_t format, uint32_t channelMask, audio_output_flags_t flags); |