diff options
author | Steve Block <steveblock@google.com> | 2011-10-20 11:56:19 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-10-25 18:16:13 +0100 |
commit | 6a70518b93928d1c91457ff805e375c82d76b0e5 (patch) | |
tree | 8c3a43fa892003e7ac137a34bba9c6bc0de64946 /audio/AudioPolicyManagerBase.cpp | |
parent | 497fb4566204c88bd247aafc2412ddef8f85e480 (diff) | |
download | hardware_libhardware_legacy-6a70518b93928d1c91457ff805e375c82d76b0e5.zip hardware_libhardware_legacy-6a70518b93928d1c91457ff805e375c82d76b0e5.tar.gz hardware_libhardware_legacy-6a70518b93928d1c91457ff805e375c82d76b0e5.tar.bz2 |
Rename LOGV(_IF) to ALOGV(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/143865
Bug: 5449033
Change-Id: I953e5eabaf5023a4dcd76339c336d9132f257f8c
Diffstat (limited to 'audio/AudioPolicyManagerBase.cpp')
-rw-r--r-- | audio/AudioPolicyManagerBase.cpp | 144 |
1 files changed, 72 insertions, 72 deletions
diff --git a/audio/AudioPolicyManagerBase.cpp b/audio/AudioPolicyManagerBase.cpp index e299db8..b0c3006 100644 --- a/audio/AudioPolicyManagerBase.cpp +++ b/audio/AudioPolicyManagerBase.cpp @@ -33,7 +33,7 @@ status_t AudioPolicyManagerBase::setDeviceConnectionState(AudioSystem::audio_dev const char *device_address) { - LOGV("setDeviceConnectionState() device: %x, state %d, address %s", device, state, device_address); + ALOGV("setDeviceConnectionState() device: %x, state %d, address %s", device, state, device_address); // connect/disconnect only 1 device at a time if (AudioSystem::popCount(device) != 1) return BAD_VALUE; @@ -61,7 +61,7 @@ status_t AudioPolicyManagerBase::setDeviceConnectionState(AudioSystem::audio_dev LOGW("setDeviceConnectionState() device already connected: %x", device); return INVALID_OPERATION; } - LOGV("setDeviceConnectionState() connecting device %x", device); + ALOGV("setDeviceConnectionState() connecting device %x", device); // register new device as available mAvailableOutputDevices |= device; @@ -78,7 +78,7 @@ status_t AudioPolicyManagerBase::setDeviceConnectionState(AudioSystem::audio_dev #endif { if (AudioSystem::isBluetoothScoDevice(device)) { - LOGV("setDeviceConnectionState() BT SCO device, address %s", device_address); + ALOGV("setDeviceConnectionState() BT SCO device, address %s", device_address); // keep track of SCO device address mScoDeviceAddress = String8(device_address, MAX_DEVICE_ADDRESS_LEN); } @@ -92,7 +92,7 @@ status_t AudioPolicyManagerBase::setDeviceConnectionState(AudioSystem::audio_dev } - LOGV("setDeviceConnectionState() disconnecting device %x", device); + ALOGV("setDeviceConnectionState() disconnecting device %x", device); // remove device from available output devices mAvailableOutputDevices &= ~device; @@ -175,7 +175,7 @@ status_t AudioPolicyManagerBase::setDeviceConnectionState(AudioSystem::audio_dev AudioInputDescriptor *inputDesc = mInputs.valueFor(activeInput); uint32_t newDevice = getDeviceForInputSource(inputDesc->mInputSource); if (newDevice != inputDesc->mDevice) { - LOGV("setDeviceConnectionState() changing device from %x to %x for input %d", + ALOGV("setDeviceConnectionState() changing device from %x to %x for input %d", inputDesc->mDevice, newDevice, activeInput); inputDesc->mDevice = newDevice; AudioParameter param = AudioParameter(); @@ -221,7 +221,7 @@ AudioSystem::device_connection_state AudioPolicyManagerBase::getDeviceConnection void AudioPolicyManagerBase::setPhoneState(int state) { - LOGV("setPhoneState() state %d", state); + ALOGV("setPhoneState() state %d", state); uint32_t newDevice = 0; if (state < 0 || state >= AudioSystem::NUM_MODES) { LOGW("setPhoneState() invalid state %d", state); @@ -236,7 +236,7 @@ void AudioPolicyManagerBase::setPhoneState(int state) // if leaving call state, handle special case of active streams // pertaining to sonification strategy see handleIncallSonification() if (isInCall()) { - LOGV("setPhoneState() in call state management: new state is %d", state); + ALOGV("setPhoneState() in call state management: new state is %d", state); for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) { handleIncallSonification(stream, false, true); } @@ -249,17 +249,17 @@ void AudioPolicyManagerBase::setPhoneState(int state) // are we entering or starting a call if (!isStateInCall(oldState) && isStateInCall(state)) { - LOGV(" Entering call in setPhoneState()"); + ALOGV(" Entering call in setPhoneState()"); // force routing command to audio hardware when starting a call // even if no device change is needed force = true; } else if (isStateInCall(oldState) && !isStateInCall(state)) { - LOGV(" Exiting call in setPhoneState()"); + ALOGV(" Exiting call in setPhoneState()"); // force routing command to audio hardware when exiting a call // even if no device change is needed force = true; } else if (isStateInCall(state) && (state != oldState)) { - LOGV(" Switching between telephony and VoIP in setPhoneState()"); + ALOGV(" Switching between telephony and VoIP in setPhoneState()"); // force routing command to audio hardware when switching between telephony and VoIP // even if no device change is needed force = true; @@ -299,7 +299,7 @@ void AudioPolicyManagerBase::setPhoneState(int state) // if entering in call state, handle special case of active streams // pertaining to sonification strategy see handleIncallSonification() if (isStateInCall(state)) { - LOGV("setPhoneState() in call state management: new state is %d", state); + ALOGV("setPhoneState() in call state management: new state is %d", state); // unmute the ringing tone after a sufficient delay if it was muted before // setting output device above if (oldState == AudioSystem::MODE_RINGTONE) { @@ -321,14 +321,14 @@ void AudioPolicyManagerBase::setPhoneState(int state) void AudioPolicyManagerBase::setRingerMode(uint32_t mode, uint32_t mask) { - LOGV("setRingerMode() mode %x, mask %x", mode, mask); + ALOGV("setRingerMode() mode %x, mask %x", mode, mask); mRingerMode = mode; } void AudioPolicyManagerBase::setForceUse(AudioSystem::force_use usage, AudioSystem::forced_config config) { - LOGV("setForceUse() usage %d, config %d, mPhoneState %d", usage, config, mPhoneState); + ALOGV("setForceUse() usage %d, config %d, mPhoneState %d", usage, config, mPhoneState); bool forceVolumeReeval = false; switch(usage) { @@ -392,7 +392,7 @@ void AudioPolicyManagerBase::setForceUse(AudioSystem::force_use usage, AudioSyst AudioInputDescriptor *inputDesc = mInputs.valueFor(activeInput); newDevice = getDeviceForInputSource(inputDesc->mInputSource); if (newDevice != inputDesc->mDevice) { - LOGV("setForceUse() changing device from %x to %x for input %d", + ALOGV("setForceUse() changing device from %x to %x for input %d", inputDesc->mDevice, newDevice, activeInput); inputDesc->mDevice = newDevice; AudioParameter param = AudioParameter(); @@ -410,13 +410,13 @@ AudioSystem::forced_config AudioPolicyManagerBase::getForceUse(AudioSystem::forc void AudioPolicyManagerBase::setSystemProperty(const char* property, const char* value) { - LOGV("setSystemProperty() property %s, value %s", property, value); + ALOGV("setSystemProperty() property %s, value %s", property, value); if (strcmp(property, "ro.camera.sound.forced") == 0) { if (atoi(value)) { - LOGV("ENFORCED_AUDIBLE cannot be muted"); + ALOGV("ENFORCED_AUDIBLE cannot be muted"); mStreams[AudioSystem::ENFORCED_AUDIBLE].mCanBeMuted = false; } else { - LOGV("ENFORCED_AUDIBLE can be muted"); + ALOGV("ENFORCED_AUDIBLE can be muted"); mStreams[AudioSystem::ENFORCED_AUDIBLE].mCanBeMuted = true; } } @@ -432,15 +432,15 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str uint32_t latency = 0; routing_strategy strategy = getStrategy((AudioSystem::stream_type)stream); uint32_t device = getDeviceForStrategy(strategy); - LOGV("getOutput() stream %d, samplingRate %d, format %d, channels %x, flags %x", stream, samplingRate, format, channels, flags); + ALOGV("getOutput() stream %d, samplingRate %d, format %d, channels %x, flags %x", stream, samplingRate, format, channels, flags); #ifdef AUDIO_POLICY_TEST if (mCurOutput != 0) { - LOGV("getOutput() test output mCurOutput %d, samplingRate %d, format %d, channels %x, mDirectOutput %d", + ALOGV("getOutput() test output mCurOutput %d, samplingRate %d, format %d, channels %x, mDirectOutput %d", mCurOutput, mTestSamplingRate, mTestFormat, mTestChannels, mDirectOutput); if (mTestOutputs[mCurOutput] == 0) { - LOGV("getOutput() opening test output"); + ALOGV("getOutput() opening test output"); AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor(); outputDesc->mDevice = mTestDevice; outputDesc->mSamplingRate = mTestSamplingRate; @@ -469,7 +469,7 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str // open a direct output if required by specified parameters if (needsDirectOuput(stream, samplingRate, format, channels, flags, device)) { - LOGV("getOutput() opening direct output device %x", device); + ALOGV("getOutput() opening direct output device %x", device); AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor(); outputDesc->mDevice = device; outputDesc->mSamplingRate = samplingRate; @@ -491,7 +491,7 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str (samplingRate != 0 && samplingRate != outputDesc->mSamplingRate) || (format != 0 && format != outputDesc->mFormat) || (channels != 0 && channels != outputDesc->mChannels)) { - LOGV("getOutput() failed opening direct output: samplingRate %d, format %d, channels %d", + ALOGV("getOutput() failed opening direct output: samplingRate %d, format %d, channels %d", samplingRate, format, channels); if (output != 0) { mpClientInterface->closeOutput(output); @@ -516,7 +516,7 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str #ifdef WITH_A2DP if (a2dpUsedForSonification() && a2dpDevice != 0) { // if playing on 2 devices among which one is A2DP, use duplicated output - LOGV("getOutput() using duplicated output"); + ALOGV("getOutput() using duplicated output"); LOGW_IF((mA2dpOutput == 0), "getOutput() A2DP device in multiple %x selected but A2DP output not opened", device); output = mDuplicatedOutput; } else @@ -525,7 +525,7 @@ audio_io_handle_t AudioPolicyManagerBase::getOutput(AudioSystem::stream_type str // if playing on 2 devices among which none is A2DP, use hardware output output = mHardwareOutput; } - LOGV("getOutput() using output %d for 2 devices %x", output, device); + ALOGV("getOutput() using output %d for 2 devices %x", output, device); } else { #ifdef WITH_A2DP if (a2dpDevice != 0) { @@ -551,7 +551,7 @@ status_t AudioPolicyManagerBase::startOutput(audio_io_handle_t output, AudioSystem::stream_type stream, int session) { - LOGV("startOutput() output %d, stream %d, session %d", output, stream, session); + ALOGV("startOutput() output %d, stream %d, session %d", output, stream, session); ssize_t index = mOutputs.indexOfKey(output); if (index < 0) { LOGW("startOutput() unknow output %d", output); @@ -589,7 +589,7 @@ status_t AudioPolicyManagerBase::stopOutput(audio_io_handle_t output, AudioSystem::stream_type stream, int session) { - LOGV("stopOutput() output %d, stream %d, session %d", output, stream, session); + ALOGV("stopOutput() output %d, stream %d, session %d", output, stream, session); ssize_t index = mOutputs.indexOfKey(output); if (index < 0) { LOGW("stopOutput() unknow output %d", output); @@ -633,7 +633,7 @@ status_t AudioPolicyManagerBase::stopOutput(audio_io_handle_t output, void AudioPolicyManagerBase::releaseOutput(audio_io_handle_t output) { - LOGV("releaseOutput() %d", output); + ALOGV("releaseOutput() %d", output); ssize_t index = mOutputs.indexOfKey(output); if (index < 0) { LOGW("releaseOutput() releasing unknown output %d", output); @@ -670,7 +670,7 @@ audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource, audio_io_handle_t input = 0; uint32_t device = getDeviceForInputSource(inputSource); - LOGV("getInput() inputSource %d, samplingRate %d, format %d, channels %x, acoustics %x", inputSource, samplingRate, format, channels, acoustics); + ALOGV("getInput() inputSource %d, samplingRate %d, format %d, channels %x, acoustics %x", inputSource, samplingRate, format, channels, acoustics); if (device == 0) { return 0; @@ -711,7 +711,7 @@ audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource, (samplingRate != inputDesc->mSamplingRate) || (format != inputDesc->mFormat) || (channels != inputDesc->mChannels)) { - LOGV("getInput() failed opening input: samplingRate %d, format %d, channels %d", + ALOGV("getInput() failed opening input: samplingRate %d, format %d, channels %d", samplingRate, format, channels); if (input != 0) { mpClientInterface->closeInput(input); @@ -725,7 +725,7 @@ audio_io_handle_t AudioPolicyManagerBase::getInput(int inputSource, status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input) { - LOGV("startInput() input %d", input); + ALOGV("startInput() input %d", input); ssize_t index = mInputs.indexOfKey(input); if (index < 0) { LOGW("startInput() unknow input %d", input); @@ -748,7 +748,7 @@ status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input) param.addInt(String8(AudioParameter::keyRouting), (int)inputDesc->mDevice); param.addInt(String8(AudioParameter::keyInputSource), (int)inputDesc->mInputSource); - LOGV("AudioPolicyManager::startInput() input source = %d", inputDesc->mInputSource); + ALOGV("AudioPolicyManager::startInput() input source = %d", inputDesc->mInputSource); mpClientInterface->setParameters(input, param.toString()); @@ -758,7 +758,7 @@ status_t AudioPolicyManagerBase::startInput(audio_io_handle_t input) status_t AudioPolicyManagerBase::stopInput(audio_io_handle_t input) { - LOGV("stopInput() input %d", input); + ALOGV("stopInput() input %d", input); ssize_t index = mInputs.indexOfKey(input); if (index < 0) { LOGW("stopInput() unknow input %d", input); @@ -780,7 +780,7 @@ status_t AudioPolicyManagerBase::stopInput(audio_io_handle_t input) void AudioPolicyManagerBase::releaseInput(audio_io_handle_t input) { - LOGV("releaseInput() %d", input); + ALOGV("releaseInput() %d", input); ssize_t index = mInputs.indexOfKey(input); if (index < 0) { LOGW("releaseInput() releasing unknown input %d", input); @@ -789,14 +789,14 @@ void AudioPolicyManagerBase::releaseInput(audio_io_handle_t input) mpClientInterface->closeInput(input); delete mInputs.valueAt(index); mInputs.removeItem(input); - LOGV("releaseInput() exit"); + ALOGV("releaseInput() exit"); } void AudioPolicyManagerBase::initStreamVolume(AudioSystem::stream_type stream, int indexMin, int indexMax) { - LOGV("initStreamVolume() stream %d, min %d, max %d", stream , indexMin, indexMax); + ALOGV("initStreamVolume() stream %d, min %d, max %d", stream , indexMin, indexMax); if (indexMin < 0 || indexMin >= indexMax) { LOGW("initStreamVolume() invalid index limits for stream %d, min %d, max %d", stream , indexMin, indexMax); return; @@ -815,7 +815,7 @@ status_t AudioPolicyManagerBase::setStreamVolumeIndex(AudioSystem::stream_type s // Force max volume if stream cannot be muted if (!mStreams[stream].mCanBeMuted) index = mStreams[stream].mIndexMax; - LOGV("setStreamVolumeIndex() stream %d, index %d", stream, index); + ALOGV("setStreamVolumeIndex() stream %d, index %d", stream, index); mStreams[stream].mIndexCur = index; // compute and apply stream volume on all outputs according to connected device @@ -834,14 +834,14 @@ status_t AudioPolicyManagerBase::getStreamVolumeIndex(AudioSystem::stream_type s if (index == 0) { return BAD_VALUE; } - LOGV("getStreamVolumeIndex() stream %d", stream); + ALOGV("getStreamVolumeIndex() stream %d", stream); *index = mStreams[stream].mIndexCur; return NO_ERROR; } audio_io_handle_t AudioPolicyManagerBase::getOutputForEffect(effect_descriptor_t *desc) { - LOGV("getOutputForEffect()"); + ALOGV("getOutputForEffect()"); // apply simple rule where global effects are attached to the same output as MUSIC streams return getOutput(AudioSystem::MUSIC); } @@ -867,9 +867,9 @@ status_t AudioPolicyManagerBase::registerEffect(effect_descriptor_t *desc, return INVALID_OPERATION; } mTotalEffectsMemory += desc->memoryUsage; - LOGV("registerEffect() effect %s, io %d, strategy %d session %d id %d", + ALOGV("registerEffect() effect %s, io %d, strategy %d session %d id %d", desc->name, io, strategy, session, id); - LOGV("registerEffect() memory %d, total memory %d", desc->memoryUsage, mTotalEffectsMemory); + ALOGV("registerEffect() memory %d, total memory %d", desc->memoryUsage, mTotalEffectsMemory); EffectDescriptor *pDesc = new EffectDescriptor(); memcpy (&pDesc->mDesc, desc, sizeof(effect_descriptor_t)); @@ -901,7 +901,7 @@ status_t AudioPolicyManagerBase::unregisterEffect(int id) pDesc->mDesc.memoryUsage = mTotalEffectsMemory; } mTotalEffectsMemory -= pDesc->mDesc.memoryUsage; - LOGV("unregisterEffect() effect %s, ID %d, memory %d total memory %d", + ALOGV("unregisterEffect() effect %s, ID %d, memory %d total memory %d", pDesc->mDesc.name, id, pDesc->mDesc.memoryUsage, mTotalEffectsMemory); mEffects.removeItem(id); @@ -924,7 +924,7 @@ status_t AudioPolicyManagerBase::setEffectEnabled(int id, bool enabled) status_t AudioPolicyManagerBase::setEffectEnabled(EffectDescriptor *pDesc, bool enabled) { if (enabled == pDesc->mEnabled) { - LOGV("setEffectEnabled(%s) effect already %s", + ALOGV("setEffectEnabled(%s) effect already %s", enabled?"true":"false", enabled?"enabled":"disabled"); return INVALID_OPERATION; } @@ -936,7 +936,7 @@ status_t AudioPolicyManagerBase::setEffectEnabled(EffectDescriptor *pDesc, bool return INVALID_OPERATION; } mTotalEffectsCpuLoad += pDesc->mDesc.cpuLoad; - LOGV("setEffectEnabled(true) total CPU %d", mTotalEffectsCpuLoad); + ALOGV("setEffectEnabled(true) total CPU %d", mTotalEffectsCpuLoad); } else { if (mTotalEffectsCpuLoad < pDesc->mDesc.cpuLoad) { LOGW("setEffectEnabled(false) CPU load %d too high for total %d", @@ -944,7 +944,7 @@ status_t AudioPolicyManagerBase::setEffectEnabled(EffectDescriptor *pDesc, bool pDesc->mDesc.cpuLoad = mTotalEffectsCpuLoad; } mTotalEffectsCpuLoad -= pDesc->mDesc.cpuLoad; - LOGV("setEffectEnabled(false) total CPU %d", mTotalEffectsCpuLoad); + ALOGV("setEffectEnabled(false) total CPU %d", mTotalEffectsCpuLoad); } pDesc->mEnabled = enabled; return NO_ERROR; @@ -1147,7 +1147,7 @@ status_t AudioPolicyManagerBase::initCheck() #ifdef AUDIO_POLICY_TEST bool AudioPolicyManagerBase::threadLoop() { - LOGV("entering threadLoop()"); + ALOGV("entering threadLoop()"); while (!exitPending()) { String8 command; @@ -1162,7 +1162,7 @@ bool AudioPolicyManagerBase::threadLoop() if (param.getInt(String8("test_cmd_policy"), valueInt) == NO_ERROR && valueInt != 0) { - LOGV("Test command %s received", command.string()); + ALOGV("Test command %s received", command.string()); String8 target; if (param.get(String8("target"), target) != NO_ERROR) { target = "Manager"; @@ -1303,7 +1303,7 @@ status_t AudioPolicyManagerBase::handleA2dpConnection(AudioSystem::audio_devices const char *device_address) { // when an A2DP device is connected, open an A2DP and a duplicated output - LOGV("opening A2DP output for device %s", device_address); + ALOGV("opening A2DP output for device %s", device_address); AudioOutputDescriptor *outputDesc = new AudioOutputDescriptor(); outputDesc->mDevice = device; mA2dpOutput = mpClientInterface->openOutput(&outputDesc->mDevice, @@ -1406,7 +1406,7 @@ status_t AudioPolicyManagerBase::handleA2dpDisconnection(AudioSystem::audio_devi void AudioPolicyManagerBase::closeA2dpOutputs() { - LOGV("setDeviceConnectionState() closing A2DP and duplicated output!"); + ALOGV("setDeviceConnectionState() closing A2DP and duplicated output!"); if (mDuplicatedOutput != 0) { AudioOutputDescriptor *dupOutputDesc = mOutputs.valueFor(mDuplicatedOutput); @@ -1450,10 +1450,10 @@ void AudioPolicyManagerBase::checkOutputForStrategy(routing_strategy strategy) bool dupUsed = a2dpUsedForSonification() && a2dpWasUsed && (AudioSystem::popCount(prevDevice) == 2); dstOutput = mHardwareOutput; if (dupUsed) { - LOGV("checkOutputForStrategy() moving strategy %d from duplicated", strategy); + ALOGV("checkOutputForStrategy() moving strategy %d from duplicated", strategy); srcOutput = mDuplicatedOutput; } else { - LOGV("checkOutputForStrategy() moving strategy %d from a2dp", strategy); + ALOGV("checkOutputForStrategy() moving strategy %d from a2dp", strategy); srcOutput = mA2dpOutput; } } @@ -1461,10 +1461,10 @@ void AudioPolicyManagerBase::checkOutputForStrategy(routing_strategy strategy) bool dupUsed = a2dpUsedForSonification() && a2dpIsUsed && (AudioSystem::popCount(curDevice) == 2); srcOutput = mHardwareOutput; if (dupUsed) { - LOGV("checkOutputForStrategy() moving strategy %d to duplicated", strategy); + ALOGV("checkOutputForStrategy() moving strategy %d to duplicated", strategy); dstOutput = mDuplicatedOutput; } else { - LOGV("checkOutputForStrategy() moving strategy %d to a2dp", strategy); + ALOGV("checkOutputForStrategy() moving strategy %d to a2dp", strategy); dstOutput = mA2dpOutput; } } @@ -1476,7 +1476,7 @@ void AudioPolicyManagerBase::checkOutputForStrategy(routing_strategy strategy) if (desc->mSession != AudioSystem::SESSION_OUTPUT_STAGE && desc->mStrategy == strategy && desc->mIo == srcOutput) { - LOGV("checkOutputForStrategy() moving effect %d to output %d", mEffects.keyAt(i), dstOutput); + ALOGV("checkOutputForStrategy() moving effect %d to output %d", mEffects.keyAt(i), dstOutput); mpClientInterface->moveEffects(desc->mSession, srcOutput, dstOutput); desc->mIo = dstOutput; } @@ -1567,7 +1567,7 @@ uint32_t AudioPolicyManagerBase::getNewDevice(audio_io_handle_t output, bool fro device = getDeviceForStrategy(STRATEGY_DTMF, fromCache); } - LOGV("getNewDevice() selected device %x", device); + ALOGV("getNewDevice() selected device %x", device); return device; } @@ -1619,7 +1619,7 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy, uint32_t device = 0; if (fromCache) { - LOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, mDeviceForStrategy[strategy]); + ALOGV("getDeviceForStrategy() from cache strategy %d, device %x", strategy, mDeviceForStrategy[strategy]); return mDeviceForStrategy[strategy]; } @@ -1757,7 +1757,7 @@ uint32_t AudioPolicyManagerBase::getDeviceForStrategy(routing_strategy strategy, break; } - LOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device); + ALOGV("getDeviceForStrategy() strategy %d, device %x", strategy, device); return device; } @@ -1770,7 +1770,7 @@ void AudioPolicyManagerBase::updateDeviceForStrategy() void AudioPolicyManagerBase::setOutputDevice(audio_io_handle_t output, uint32_t device, bool force, int delayMs) { - LOGV("setOutputDevice() output %d device %x delayMs %d", output, device, delayMs); + ALOGV("setOutputDevice() output %d device %x delayMs %d", output, device, delayMs); AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output); @@ -1794,7 +1794,7 @@ void AudioPolicyManagerBase::setOutputDevice(audio_io_handle_t output, uint32_t // - the requested device is the same as current device and force is not specified. // Doing this check here allows the caller to call setOutputDevice() without conditions if ((device == 0 || device == prevDevice) && !force) { - LOGV("setOutputDevice() setting same device %x or null device for output %d", device, output); + ALOGV("setOutputDevice() setting same device %x or null device for output %d", device, output); return; } @@ -1856,7 +1856,7 @@ uint32_t AudioPolicyManagerBase::getDeviceForInputSource(int inputSource) device = 0; break; } - LOGV("getDeviceForInputSource()input source %d, device %08x", inputSource, device); + ALOGV("getDeviceForInputSource()input source %d, device %08x", inputSource, device); return device; } @@ -1949,7 +1949,7 @@ float AudioPolicyManagerBase::volIndexToAmpl(uint32_t device, const StreamDescri float amplification = exp( decibels * 0.115129f); // exp( dB * ln(10) / 20 ) - LOGV("VOLUME vol index=[%d %d %d], dB=[%.1f %.1f %.1f] ampl=%.5f", + ALOGV("VOLUME vol index=[%d %d %d], dB=[%.1f %.1f %.1f] ampl=%.5f", curve[segment].mIndex, volIdx, curve[segment+1].mIndex, curve[segment].mDBAttenuation, @@ -2058,7 +2058,7 @@ float AudioPolicyManagerBase::computeVolume(int stream, int index, audio_io_hand float minVol = (musicVol > SONIFICATION_HEADSET_VOLUME_MIN) ? musicVol : SONIFICATION_HEADSET_VOLUME_MIN; if (volume > minVol) { volume = minVol; - LOGV("computeVolume limiting volume to %f musicVol %f", minVol, musicVol); + ALOGV("computeVolume limiting volume to %f musicVol %f", minVol, musicVol); } } } @@ -2071,14 +2071,14 @@ status_t AudioPolicyManagerBase::checkAndSetVolume(int stream, int index, audio_ // do not change actual stream volume if the stream is muted if (mOutputs.valueFor(output)->mMuteCount[stream] != 0) { - LOGV("checkAndSetVolume() stream %d muted count %d", stream, mOutputs.valueFor(output)->mMuteCount[stream]); + ALOGV("checkAndSetVolume() stream %d muted count %d", stream, mOutputs.valueFor(output)->mMuteCount[stream]); return NO_ERROR; } // do not change in call volume if bluetooth is connected and vice versa if ((stream == AudioSystem::VOICE_CALL && mForceUse[AudioSystem::FOR_COMMUNICATION] == AudioSystem::FORCE_BT_SCO) || (stream == AudioSystem::BLUETOOTH_SCO && mForceUse[AudioSystem::FOR_COMMUNICATION] != AudioSystem::FORCE_BT_SCO)) { - LOGV("checkAndSetVolume() cannot set stream %d volume with force use = %d for comm", + ALOGV("checkAndSetVolume() cannot set stream %d volume with force use = %d for comm", stream, mForceUse[AudioSystem::FOR_COMMUNICATION]); return INVALID_OPERATION; } @@ -2090,7 +2090,7 @@ status_t AudioPolicyManagerBase::checkAndSetVolume(int stream, int index, audio_ if (volume != mOutputs.valueFor(output)->mCurVolume[stream] || force) { mOutputs.valueFor(output)->mCurVolume[stream] = volume; - LOGV("setStreamVolume() for output %d stream %d, volume %f, delay %d", output, stream, volume, delayMs); + ALOGV("setStreamVolume() for output %d stream %d, volume %f, delay %d", output, stream, volume, delayMs); if (stream == AudioSystem::VOICE_CALL || stream == AudioSystem::DTMF || stream == AudioSystem::BLUETOOTH_SCO) { @@ -2128,7 +2128,7 @@ status_t AudioPolicyManagerBase::checkAndSetVolume(int stream, int index, audio_ void AudioPolicyManagerBase::applyStreamVolumes(audio_io_handle_t output, uint32_t device, int delayMs, bool force) { - LOGV("applyStreamVolumes() for output %d and device %x", output, device); + ALOGV("applyStreamVolumes() for output %d and device %x", output, device); for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) { checkAndSetVolume(stream, mStreams[stream].mIndexCur, output, device, delayMs, force); @@ -2137,7 +2137,7 @@ void AudioPolicyManagerBase::applyStreamVolumes(audio_io_handle_t output, uint32 void AudioPolicyManagerBase::setStrategyMute(routing_strategy strategy, bool on, audio_io_handle_t output, int delayMs) { - LOGV("setStrategyMute() strategy %d, mute %d, output %d", strategy, on, output); + ALOGV("setStrategyMute() strategy %d, mute %d, output %d", strategy, on, output); for (int stream = 0; stream < AudioSystem::NUM_STREAM_TYPES; stream++) { if (getStrategy((AudioSystem::stream_type)stream) == strategy) { setStreamMute(stream, on, output, delayMs); @@ -2150,7 +2150,7 @@ void AudioPolicyManagerBase::setStreamMute(int stream, bool on, audio_io_handle_ StreamDescriptor &streamDesc = mStreams[stream]; AudioOutputDescriptor *outputDesc = mOutputs.valueFor(output); - LOGV("setStreamMute() stream %d, mute %d, output %d, mMuteCount %d", stream, on, output, outputDesc->mMuteCount[stream]); + ALOGV("setStreamMute() stream %d, mute %d, output %d, mMuteCount %d", stream, on, output, outputDesc->mMuteCount[stream]); if (on) { if (outputDesc->mMuteCount[stream] == 0) { @@ -2182,7 +2182,7 @@ void AudioPolicyManagerBase::handleIncallSonification(int stream, bool starting, if (getStrategy((AudioSystem::stream_type)stream) == STRATEGY_SONIFICATION) { AudioOutputDescriptor *outputDesc = mOutputs.valueFor(mHardwareOutput); - LOGV("handleIncallSonification() stream %d starting %d device %x stateChange %d", + ALOGV("handleIncallSonification() stream %d starting %d device %x stateChange %d", stream, starting, outputDesc->mDevice, stateChange); if (outputDesc->mRefCount[stream]) { int muteCount = 1; @@ -2190,14 +2190,14 @@ void AudioPolicyManagerBase::handleIncallSonification(int stream, bool starting, muteCount = outputDesc->mRefCount[stream]; } if (AudioSystem::isLowVisibility((AudioSystem::stream_type)stream)) { - LOGV("handleIncallSonification() low visibility, muteCount %d", muteCount); + ALOGV("handleIncallSonification() low visibility, muteCount %d", muteCount); for (int i = 0; i < muteCount; i++) { setStreamMute(stream, starting, mHardwareOutput); } } else { - LOGV("handleIncallSonification() high visibility"); + ALOGV("handleIncallSonification() high visibility"); if (outputDesc->device() & getDeviceForStrategy(STRATEGY_PHONE)) { - LOGV("handleIncallSonification() high visibility muted, muteCount %d", muteCount); + ALOGV("handleIncallSonification() high visibility muted, muteCount %d", muteCount); for (int i = 0; i < muteCount; i++) { setStreamMute(stream, starting, mHardwareOutput); } @@ -2282,7 +2282,7 @@ void AudioPolicyManagerBase::AudioOutputDescriptor::changeRefCount(AudioSystem:: return; } mRefCount[stream] += delta; - LOGV("changeRefCount() stream %d, count %d", stream, mRefCount[stream]); + ALOGV("changeRefCount() stream %d, count %d", stream, mRefCount[stream]); } uint32_t AudioPolicyManagerBase::AudioOutputDescriptor::refCount() |