Loading policy_hal/AudioPolicyManager.cpp +16 −6 Original line number Diff line number Diff line /* * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * Not a contribution. * * Copyright (C) 2009 The Android Open Source Project Loading Loading @@ -397,6 +397,7 @@ status_t AudioPolicyManagerCustom::setDeviceConnectionStateInt(audio_devices_t d ALOGW("setDeviceConnectionState() invalid device: %x", device); return BAD_VALUE; } // This function checks for the parameters which can be offloaded. // This can be enhanced depending on the capability of the DSP and policy // of the system. Loading Loading @@ -568,6 +569,7 @@ bool AudioPolicyManagerCustom::isOffloadSupported(const audio_offload_info_t& of ALOGV("isOffloadSupported() profile %sfound", profile != 0 ? "" : "NOT "); return (profile != 0); } audio_devices_t AudioPolicyManagerCustom::getNewOutputDevice(const sp<AudioOutputDescriptor>& outputDesc, bool fromCache) { Loading Loading @@ -633,6 +635,7 @@ audio_devices_t AudioPolicyManagerCustom::getNewOutputDevice(const sp<AudioOutpu ALOGV("getNewOutputDevice() selected device %x", device); return device; } void AudioPolicyManagerCustom::setPhoneState(audio_mode_t state) { ALOGV("setPhoneState() state %d", state); Loading Loading @@ -968,7 +971,7 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe handleEventForBeacon(stream == AUDIO_STREAM_TTS ? STOPPING_BEACON : STOPPING_OUTPUT); // handle special case for sonification while in call if (isInCall() && (outputDesc->mRefCount[stream] == 1)) { if (isInCall()) { if (outputDesc->isDuplicated()) { handleIncallSonification(stream, false, false, outputDesc->subOutput1()->mIoHandle); handleIncallSonification(stream, false, false, outputDesc->subOutput2()->mIoHandle); Loading Loading @@ -1023,6 +1026,7 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe return INVALID_OPERATION; } } status_t AudioPolicyManagerCustom::startSource(sp<AudioOutputDescriptor> outputDesc, audio_stream_type_t stream, audio_devices_t device, Loading Loading @@ -1115,6 +1119,7 @@ status_t AudioPolicyManagerCustom::startSource(sp<AudioOutputDescriptor> outputD } return NO_ERROR; } void AudioPolicyManagerCustom::handleIncallSonification(audio_stream_type_t stream, bool starting, bool stateChange, audio_io_handle_t output) Loading Loading @@ -1167,6 +1172,7 @@ void AudioPolicyManagerCustom::handleIncallSonification(audio_stream_type_t stre } } } void AudioPolicyManagerCustom::handleNotificationRoutingForStream(audio_stream_type_t stream) { switch(stream) { case AUDIO_STREAM_MUSIC: Loading @@ -1177,6 +1183,7 @@ void AudioPolicyManagerCustom::handleNotificationRoutingForStream(audio_stream_t break; } } status_t AudioPolicyManagerCustom::checkAndSetVolume(audio_stream_type_t stream, int index, const sp<AudioOutputDescriptor>& outputDesc, Loading Loading @@ -1246,6 +1253,7 @@ status_t AudioPolicyManagerCustom::checkAndSetVolume(audio_stream_type_t stream, return NO_ERROR; } bool AudioPolicyManagerCustom::isDirectOutput(audio_io_handle_t output) { for (size_t i = 0; i < mOutputs.size(); i++) { audio_io_handle_t curOutput = mOutputs.keyAt(i); Loading Loading @@ -1799,6 +1807,7 @@ status_t AudioPolicyManagerCustom::getInputForAttr(const audio_attributes_t *att selectedDeviceId, inputType); } status_t AudioPolicyManagerCustom::startInput(audio_io_handle_t input, audio_session_t session) { Loading Loading @@ -1922,6 +1931,7 @@ status_t AudioPolicyManagerCustom::startInput(audio_io_handle_t input, #endif return NO_ERROR; } status_t AudioPolicyManagerCustom::stopInput(audio_io_handle_t input, audio_session_t session) { Loading Loading
policy_hal/AudioPolicyManager.cpp +16 −6 Original line number Diff line number Diff line /* * Copyright (c) 2013-2015, The Linux Foundation. All rights reserved. * Copyright (c) 2013-2016, The Linux Foundation. All rights reserved. * Not a contribution. * * Copyright (C) 2009 The Android Open Source Project Loading Loading @@ -397,6 +397,7 @@ status_t AudioPolicyManagerCustom::setDeviceConnectionStateInt(audio_devices_t d ALOGW("setDeviceConnectionState() invalid device: %x", device); return BAD_VALUE; } // This function checks for the parameters which can be offloaded. // This can be enhanced depending on the capability of the DSP and policy // of the system. Loading Loading @@ -568,6 +569,7 @@ bool AudioPolicyManagerCustom::isOffloadSupported(const audio_offload_info_t& of ALOGV("isOffloadSupported() profile %sfound", profile != 0 ? "" : "NOT "); return (profile != 0); } audio_devices_t AudioPolicyManagerCustom::getNewOutputDevice(const sp<AudioOutputDescriptor>& outputDesc, bool fromCache) { Loading Loading @@ -633,6 +635,7 @@ audio_devices_t AudioPolicyManagerCustom::getNewOutputDevice(const sp<AudioOutpu ALOGV("getNewOutputDevice() selected device %x", device); return device; } void AudioPolicyManagerCustom::setPhoneState(audio_mode_t state) { ALOGV("setPhoneState() state %d", state); Loading Loading @@ -968,7 +971,7 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe handleEventForBeacon(stream == AUDIO_STREAM_TTS ? STOPPING_BEACON : STOPPING_OUTPUT); // handle special case for sonification while in call if (isInCall() && (outputDesc->mRefCount[stream] == 1)) { if (isInCall()) { if (outputDesc->isDuplicated()) { handleIncallSonification(stream, false, false, outputDesc->subOutput1()->mIoHandle); handleIncallSonification(stream, false, false, outputDesc->subOutput2()->mIoHandle); Loading Loading @@ -1023,6 +1026,7 @@ status_t AudioPolicyManagerCustom::stopSource(sp<AudioOutputDescriptor> outputDe return INVALID_OPERATION; } } status_t AudioPolicyManagerCustom::startSource(sp<AudioOutputDescriptor> outputDesc, audio_stream_type_t stream, audio_devices_t device, Loading Loading @@ -1115,6 +1119,7 @@ status_t AudioPolicyManagerCustom::startSource(sp<AudioOutputDescriptor> outputD } return NO_ERROR; } void AudioPolicyManagerCustom::handleIncallSonification(audio_stream_type_t stream, bool starting, bool stateChange, audio_io_handle_t output) Loading Loading @@ -1167,6 +1172,7 @@ void AudioPolicyManagerCustom::handleIncallSonification(audio_stream_type_t stre } } } void AudioPolicyManagerCustom::handleNotificationRoutingForStream(audio_stream_type_t stream) { switch(stream) { case AUDIO_STREAM_MUSIC: Loading @@ -1177,6 +1183,7 @@ void AudioPolicyManagerCustom::handleNotificationRoutingForStream(audio_stream_t break; } } status_t AudioPolicyManagerCustom::checkAndSetVolume(audio_stream_type_t stream, int index, const sp<AudioOutputDescriptor>& outputDesc, Loading Loading @@ -1246,6 +1253,7 @@ status_t AudioPolicyManagerCustom::checkAndSetVolume(audio_stream_type_t stream, return NO_ERROR; } bool AudioPolicyManagerCustom::isDirectOutput(audio_io_handle_t output) { for (size_t i = 0; i < mOutputs.size(); i++) { audio_io_handle_t curOutput = mOutputs.keyAt(i); Loading Loading @@ -1799,6 +1807,7 @@ status_t AudioPolicyManagerCustom::getInputForAttr(const audio_attributes_t *att selectedDeviceId, inputType); } status_t AudioPolicyManagerCustom::startInput(audio_io_handle_t input, audio_session_t session) { Loading Loading @@ -1922,6 +1931,7 @@ status_t AudioPolicyManagerCustom::startInput(audio_io_handle_t input, #endif return NO_ERROR; } status_t AudioPolicyManagerCustom::stopInput(audio_io_handle_t input, audio_session_t session) { Loading