diff options
author | Steve Block <steveblock@google.com> | 2011-10-20 11:56:21 +0100 |
---|---|---|
committer | Steve Block <steveblock@google.com> | 2011-10-26 09:57:46 +0100 |
commit | fc4d70454282d831c697e50d7e77bdcd938b2bb4 (patch) | |
tree | ed289a9e2c3a7aedd2d9dba453a0837d03f2eb0e /libaudio | |
parent | 4539e6b7db5f023be83f48458b02450d194af6f1 (diff) | |
download | device_samsung_crespo-fc4d70454282d831c697e50d7e77bdcd938b2bb4.zip device_samsung_crespo-fc4d70454282d831c697e50d7e77bdcd938b2bb4.tar.gz device_samsung_crespo-fc4d70454282d831c697e50d7e77bdcd938b2bb4.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: I73e1ab4f4eadb55e747b3b2be4b6c1824dce7b2c
Diffstat (limited to 'libaudio')
-rw-r--r-- | libaudio/AudioHardware.cpp | 110 |
1 files changed, 55 insertions, 55 deletions
diff --git a/libaudio/AudioHardware.cpp b/libaudio/AudioHardware.cpp index a189510..14a13bf 100644 --- a/libaudio/AudioHardware.cpp +++ b/libaudio/AudioHardware.cpp @@ -148,7 +148,7 @@ void AudioHardware::loadRILD(void) mSecRilLibHandle = dlopen("libsecril-client.so", RTLD_NOW); if (mSecRilLibHandle) { - LOGV("libsecril-client.so is loaded"); + ALOGV("libsecril-client.so is loaded"); openClientRILD = (HRilClient (*)(void)) dlsym(mSecRilLibHandle, "OpenClient_RILD"); @@ -304,7 +304,7 @@ AudioStreamIn* AudioHardware::openInputStream( *status = rc; } - LOGV("AudioHardware::openInputStream()%p", in.get()); + ALOGV("AudioHardware::openInputStream()%p", in.get()); return in.get(); } @@ -322,7 +322,7 @@ void AudioHardware::closeInputStream(AudioStreamIn* in) { spIn = mInputs[index]; mInputs.removeAt(index); } - LOGV("AudioHardware::closeInputStream()%p", in); + ALOGV("AudioHardware::closeInputStream()%p", in); spIn.clear(); } @@ -374,7 +374,7 @@ status_t AudioHardware::setMode(int mode) int prevMode = mMode; status = AudioHardwareBase::setMode(mode); - LOGV("setMode() : new %d, old %d", mMode, prevMode); + ALOGV("setMode() : new %d, old %d", mMode, prevMode); if (status == NO_ERROR) { bool modeNeedsCPActive = mMode == AudioSystem::MODE_IN_CALL || mMode == AudioSystem::MODE_RINGTONE; @@ -389,15 +389,15 @@ status_t AudioHardware::setMode(int mode) if (mMode == AudioSystem::MODE_IN_CALL && !mInCallAudioMode) { if (spOut != 0) { - LOGV("setMode() in call force output standby"); + ALOGV("setMode() in call force output standby"); spOut->doStandby_l(); } if (spIn != 0) { - LOGV("setMode() in call force input standby"); + ALOGV("setMode() in call force input standby"); spIn->doStandby_l(); } - LOGV("setMode() openPcmOut_l()"); + ALOGV("setMode() openPcmOut_l()"); openPcmOut_l(); openMixer_l(); setInputSource_l(AUDIO_SOURCE_DEFAULT); @@ -411,22 +411,22 @@ status_t AudioHardware::setMode(int mode) struct mixer_ctl *ctl= mixer_get_ctl_by_name(mMixer, "Playback Path"); TRACE_DRIVER_OUT if (ctl != NULL) { - LOGV("setMode() reset Playback Path to RCV"); + ALOGV("setMode() reset Playback Path to RCV"); TRACE_DRIVER_IN(DRV_MIXER_SEL) mixer_ctl_set_enum_by_string(ctl, "RCV"); TRACE_DRIVER_OUT } } - LOGV("setMode() closePcmOut_l()"); + ALOGV("setMode() closePcmOut_l()"); closeMixer_l(); closePcmOut_l(); if (spOut != 0) { - LOGV("setMode() off call force output standby"); + ALOGV("setMode() off call force output standby"); spOut->doStandby_l(); } if (spIn != 0) { - LOGV("setMode() off call force input standby"); + ALOGV("setMode() off call force input standby"); spIn->doStandby_l(); } @@ -451,7 +451,7 @@ status_t AudioHardware::setMode(int mode) status_t AudioHardware::setMicMute(bool state) { - LOGV("setMicMute(%d) mMicMute %d", state, mMicMute); + ALOGV("setMicMute(%d) mMicMute %d", state, mMicMute); sp<AudioStreamInALSA> spIn; { AutoMutex lock(mLock); @@ -518,7 +518,7 @@ status_t AudioHardware::setParameters(const String8& keyValuePairs) } if (ttyMode != mTTYMode) { - LOGV("new tty mode %d", ttyMode); + ALOGV("new tty mode %d", ttyMode); mTTYMode = ttyMode; if (mOutput != 0 && mMode == AudioSystem::MODE_IN_CALL) { setIncallPath_l(mOutput->device()); @@ -535,7 +535,7 @@ String8 AudioHardware::getParameters(const String8& keys) AudioParameter request = AudioParameter(keys); AudioParameter reply = AudioParameter(); - LOGV("getParameters() %s", keys.string()); + ALOGV("getParameters() %s", keys.string()); return reply.toString(); } @@ -621,7 +621,7 @@ void AudioHardware::setVoiceVolume_l(float volume) status_t AudioHardware::setMasterVolume(float volume) { - LOGV("Set master volume to %f.\n", volume); + ALOGV("Set master volume to %f.\n", volume); // We return an error code here to let the audioflinger do in-software // volume on top of the maximum volume that we set through the SND API. // return error - software mixer will handle it @@ -704,7 +704,7 @@ status_t AudioHardware::dump(int fd, const Vector<String16>& args) status_t AudioHardware::setIncallPath_l(uint32_t device) { - LOGV("setIncallPath_l: device %x", device); + ALOGV("setIncallPath_l: device %x", device); // Setup sound path for CP clocking if ((mSecRilLibHandle) && @@ -757,7 +757,7 @@ status_t AudioHardware::setIncallPath_l(uint32_t device) TRACE_DRIVER_OUT LOGE_IF(ctl == NULL, "setIncallPath_l() could not get mixer ctl"); if (ctl != NULL) { - LOGV("setIncallPath_l() Voice Call Path, (%x)", device); + ALOGV("setIncallPath_l() Voice Call Path, (%x)", device); TRACE_DRIVER_IN(DRV_MIXER_SEL) mixer_ctl_set_enum_by_string(ctl, getVoiceRouteFromDevice(device)); TRACE_DRIVER_OUT @@ -823,7 +823,7 @@ void AudioHardware::closePcmOut_l() struct mixer *AudioHardware::openMixer_l() { - LOGV("openMixer_l() mMixerOpenCnt: %d", mMixerOpenCnt); + ALOGV("openMixer_l() mMixerOpenCnt: %d", mMixerOpenCnt); if (mMixerOpenCnt++ == 0) { if (mMixer != NULL) { LOGE("openMixer_l() mMixerOpenCnt == 0 and mMixer == %p\n", mMixer); @@ -844,7 +844,7 @@ struct mixer *AudioHardware::openMixer_l() void AudioHardware::closeMixer_l() { - LOGV("closeMixer_l() mMixerOpenCnt: %d", mMixerOpenCnt); + ALOGV("closeMixer_l() mMixerOpenCnt: %d", mMixerOpenCnt); if (mMixerOpenCnt == 0) { LOGE("closeMixer_l() mMixerOpenCnt == 0"); return; @@ -970,7 +970,7 @@ sp <AudioHardware::AudioStreamInALSA> AudioHardware::getActiveInput_l() status_t AudioHardware::setInputSource_l(audio_source source) { - LOGV("setInputSource_l(%d)", source); + ALOGV("setInputSource_l(%d)", source); if (source != mInputSource) { if ((source == AUDIO_SOURCE_DEFAULT) || (mMode != AudioSystem::MODE_IN_CALL)) { if (mMixer) { @@ -999,7 +999,7 @@ status_t AudioHardware::setInputSource_l(audio_source source) default: return NO_INIT; } - LOGV("mixer_ctl_set_enum_by_string, Input Source, (%s)", sourceName); + ALOGV("mixer_ctl_set_enum_by_string, Input Source, (%s)", sourceName); TRACE_DRIVER_IN(DRV_MIXER_SEL) mixer_ctl_set_enum_by_string(ctl, sourceName); TRACE_DRIVER_OUT @@ -1015,7 +1015,7 @@ struct echo_reference_itfe *AudioHardware::getEchoReference(audio_format_t forma uint32_t channelCount, uint32_t samplingRate) { - LOGV("AudioHardware::getEchoReference %p", mEchoReference); + ALOGV("AudioHardware::getEchoReference %p", mEchoReference); releaseEchoReference(mEchoReference); if (mOutput != NULL) { uint32_t wrChannelCount = popcount(mOutput->channels()); @@ -1037,7 +1037,7 @@ struct echo_reference_itfe *AudioHardware::getEchoReference(audio_format_t forma void AudioHardware::releaseEchoReference(struct echo_reference_itfe *reference) { - LOGV("AudioHardware::releaseEchoReference %p", mEchoReference); + ALOGV("AudioHardware::releaseEchoReference %p", mEchoReference); if (mEchoReference != NULL && reference == mEchoReference) { if (mOutput != NULL) { mOutput->removeEchoReference(reference); @@ -1112,7 +1112,7 @@ int AudioHardware::AudioStreamOutALSA::getPlaybackDelay(size_t frames, buffer->time_stamp.tv_sec = 0; buffer->time_stamp.tv_nsec = 0; buffer->delay_ns = 0; - LOGV("getPlaybackDelay(): pcm_get_htimestamp error, setting playbackTimestamp to 0"); + ALOGV("getPlaybackDelay(): pcm_get_htimestamp error, setting playbackTimestamp to 0"); return rc; } @@ -1123,7 +1123,7 @@ int AudioHardware::AudioStreamOutALSA::getPlaybackDelay(size_t frames, // sample being written. long delayNs = (long)(((int64_t)(kernelFr + frames)* 1000000000) /AUDIO_HW_OUT_SAMPLERATE); - LOGV("AudioStreamOutALSA::getPlaybackDelay delayNs: [%ld], "\ + ALOGV("AudioStreamOutALSA::getPlaybackDelay delayNs: [%ld], "\ "kernelFr:[%d], frames:[%d], buffSize:[%d], time_stamp:[%ld].[%ld]", delayNs, (int)kernelFr, (int)frames, pcm_get_buffer_size(mPcm), (long)buffer->time_stamp.tv_sec, buffer->time_stamp.tv_nsec); @@ -1135,7 +1135,7 @@ int AudioHardware::AudioStreamOutALSA::getPlaybackDelay(size_t frames, ssize_t AudioHardware::AudioStreamOutALSA::write(const void* buffer, size_t bytes) { - LOGV("-----AudioStreamInALSA::write(%p, %d) START", buffer, (int)bytes); + ALOGV("-----AudioStreamInALSA::write(%p, %d) START", buffer, (int)bytes); status_t status = NO_INIT; const uint8_t* p = static_cast<const uint8_t*>(buffer); int ret; @@ -1167,7 +1167,7 @@ ssize_t AudioHardware::AudioStreamOutALSA::write(const void* buffer, size_t byte // while the mutex is released if ((spIn == mHardware->getActiveInput_l()) && (cnt == spIn->standbyCnt())) { - LOGV("AudioStreamOutALSA::write() force input standby"); + ALOGV("AudioStreamOutALSA::write() force input standby"); spIn->close_l(); break; } @@ -1206,7 +1206,7 @@ ssize_t AudioHardware::AudioStreamOutALSA::write(const void* buffer, size_t byte TRACE_DRIVER_OUT if (ret == 0) { - LOGV("-----AudioStreamInALSA::write(%p, %d) END", buffer, (int)bytes); + ALOGV("-----AudioStreamInALSA::write(%p, %d) END", buffer, (int)bytes); return bytes; } LOGW("write error: %d", errno); @@ -1271,7 +1271,7 @@ void AudioHardware::AudioStreamOutALSA::close_l() status_t AudioHardware::AudioStreamOutALSA::open_l() { - LOGV("open pcm_out driver"); + ALOGV("open pcm_out driver"); mPcm = mHardware->openPcmOut_l(); if (mPcm == NULL) { return NO_INIT; @@ -1279,14 +1279,14 @@ status_t AudioHardware::AudioStreamOutALSA::open_l() mMixer = mHardware->openMixer_l(); if (mMixer) { - LOGV("open playback normal"); + ALOGV("open playback normal"); TRACE_DRIVER_IN(DRV_MIXER_GET) mRouteCtl = mixer_get_ctl_by_name(mMixer, "Playback Path"); TRACE_DRIVER_OUT } if (mHardware->mode() != AudioSystem::MODE_IN_CALL) { const char *route = mHardware->getOutputRouteFromDevice(mDevices); - LOGV("write() wakeup setting route %s", route); + ALOGV("write() wakeup setting route %s", route); if (mRouteCtl) { TRACE_DRIVER_IN(DRV_MIXER_SEL) mixer_ctl_set_enum_by_string(mRouteCtl, route); @@ -1391,7 +1391,7 @@ String8 AudioHardware::AudioStreamOutALSA::getParameters(const String8& keys) param.addInt(key, (int)mDevices); } - LOGV("AudioStreamOutALSA::getParameters() %s", param.toString().string()); + ALOGV("AudioStreamOutALSA::getParameters() %s", param.toString().string()); return param.toString(); } @@ -1421,7 +1421,7 @@ void AudioHardware::AudioStreamOutALSA::unlock() { void AudioHardware::AudioStreamOutALSA::addEchoReference(struct echo_reference_itfe *reference) { - LOGV("AudioStreamOutALSA::addEchoReference %p", mEchoReference); + ALOGV("AudioStreamOutALSA::addEchoReference %p", mEchoReference); if (mEchoReference == NULL) { mEchoReference = reference; } @@ -1429,7 +1429,7 @@ void AudioHardware::AudioStreamOutALSA::addEchoReference(struct echo_reference_i void AudioHardware::AudioStreamOutALSA::removeEchoReference(struct echo_reference_itfe *reference) { - LOGV("AudioStreamOutALSA::removeEchoReference %p", mEchoReference); + ALOGV("AudioStreamOutALSA::removeEchoReference %p", mEchoReference); if (mEchoReference == reference) { mEchoReference->write(mEchoReference, NULL); mEchoReference = NULL; @@ -1477,7 +1477,7 @@ status_t AudioHardware::AudioStreamInALSA::set( mHardware = hw; - LOGV("AudioStreamInALSA::set(%d, %d, %u)", *pFormat, *pChannels, *pRate); + ALOGV("AudioStreamInALSA::set(%d, %d, %u)", *pFormat, *pChannels, *pRate); mBufferSize = getBufferSize(*pRate, AudioSystem::popCount(*pChannels)); mDevices = devices; @@ -1564,7 +1564,7 @@ ssize_t AudioHardware::AudioStreamInALSA::processFrames(void* buffer, ssize_t fr mProcBufSize = (size_t)frames; mProcBuf = (int16_t *)realloc(mProcBuf, mProcBufSize * mChannelCount * sizeof(int16_t)); - LOGV("processFrames(): mProcBuf %p size extended to %d frames", + ALOGV("processFrames(): mProcBuf %p size extended to %d frames", mProcBuf, mProcBufSize); } ssize_t framesRd = readFrames(mProcBuf + mProcFramesIn * mChannelCount, @@ -1621,7 +1621,7 @@ int32_t AudioHardware::AudioStreamInALSA::updateEchoReference(size_t frames) struct echo_reference_buffer b; b.delay_ns = 0; - LOGV("updateEchoReference1 START, frames = [%d], mRefFramesIn = [%d], b.frame_count = [%d]", + ALOGV("updateEchoReference1 START, frames = [%d], mRefFramesIn = [%d], b.frame_count = [%d]", frames, mRefFramesIn, frames - mRefFramesIn); if (mRefFramesIn < frames) { if (mRefBufSize < frames) { @@ -1638,12 +1638,12 @@ int32_t AudioHardware::AudioStreamInALSA::updateEchoReference(size_t frames) if (mEchoReference->read(mEchoReference, &b) == NO_ERROR) { mRefFramesIn += b.frame_count; - LOGV("updateEchoReference2: mRefFramesIn:[%d], mRefBufSize:[%d], "\ + ALOGV("updateEchoReference2: mRefFramesIn:[%d], mRefBufSize:[%d], "\ "frames:[%d], b.frame_count:[%d]", mRefFramesIn, mRefBufSize,frames,b.frame_count); } }else{ - LOGV("updateEchoReference3: NOT enough frames to read ref buffer"); + ALOGV("updateEchoReference3: NOT enough frames to read ref buffer"); } return b.delay_ns; } @@ -1675,7 +1675,7 @@ void AudioHardware::AudioStreamInALSA::pushEchoReference(size_t frames) mRefFramesIn -= refBuf.frameCount; if (mRefFramesIn) { - LOGV("pushEchoReference5: shifting mRefBuf down by = %d frames", mRefFramesIn); + ALOGV("pushEchoReference5: shifting mRefBuf down by = %d frames", mRefFramesIn); memcpy(mRefBuf, mRefBuf + refBuf.frameCount * mChannelCount, mRefFramesIn * mChannelCount * sizeof(int16_t)); @@ -1693,7 +1693,7 @@ status_t AudioHardware::AudioStreamInALSA::setPreProcessorEchoDelay(effect_handl *(uint32_t *)param->data = AEC_PARAM_ECHO_DELAY; *((int32_t *)param->data + 1) = delayUs; - LOGV("setPreProcessorEchoDelay: %d us", delayUs); + ALOGV("setPreProcessorEchoDelay: %d us", delayUs); return setPreprocessorParam(handle, param); } @@ -1750,7 +1750,7 @@ void AudioHardware::AudioStreamInALSA::getCaptureDelay(size_t frames, buffer->time_stamp = tstamp; buffer->delay_ns = delayNs; - LOGV("AudioStreamInALSA::getCaptureDelay TimeStamp = [%ld].[%ld], delayCaptureNs: [%d],"\ + ALOGV("AudioStreamInALSA::getCaptureDelay TimeStamp = [%ld].[%ld], delayCaptureNs: [%d],"\ " kernelDelay:[%ld], bufDelay:[%ld], rsmpDelay:[%ld], kernelFr:[%d], "\ "mInputFramesIn:[%d], mProcFramesIn:[%d], frames:[%d]", buffer->time_stamp.tv_sec , buffer->time_stamp.tv_nsec, buffer->delay_ns, @@ -1760,7 +1760,7 @@ void AudioHardware::AudioStreamInALSA::getCaptureDelay(size_t frames, ssize_t AudioHardware::AudioStreamInALSA::read(void* buffer, ssize_t bytes) { - LOGV("-----AudioStreamInALSA::read(%p, %d) START", buffer, (int)bytes); + ALOGV("-----AudioStreamInALSA::read(%p, %d) START", buffer, (int)bytes); status_t status = NO_INIT; if (mHardware == NULL) return NO_INIT; @@ -1798,13 +1798,13 @@ ssize_t AudioHardware::AudioStreamInALSA::read(void* buffer, ssize_t bytes) // open output before input if (spOut != 0) { if (!spOut->checkStandby()) { - LOGV("AudioStreamInALSA::read() force output standby"); + ALOGV("AudioStreamInALSA::read() force output standby"); spOut->close_l(); if (spOut->open_l() != NO_ERROR) { spOut->doStandby_l(); } } - LOGV("AudioStreamInALSA exit standby mNeedEchoReference %d mEchoReference %p", + ALOGV("AudioStreamInALSA exit standby mNeedEchoReference %d mEchoReference %p", mNeedEchoReference, mEchoReference); if (mNeedEchoReference && mEchoReference == NULL) { mEchoReference = mHardware->getEchoReference(AUDIO_FORMAT_PCM_16_BIT, @@ -1832,7 +1832,7 @@ ssize_t AudioHardware::AudioStreamInALSA::read(void* buffer, ssize_t bytes) } if (framesRd >= 0) { - LOGV("-----AudioStreamInALSA::read(%p, %d) END", buffer, (int)bytes); + ALOGV("-----AudioStreamInALSA::read(%p, %d) END", buffer, (int)bytes); return framesRd * mChannelCount * sizeof(int16_t); } @@ -1935,7 +1935,7 @@ status_t AudioHardware::AudioStreamInALSA::open_l() silence_threshold : 0, }; - LOGV("open pcm_in driver"); + ALOGV("open pcm_in driver"); TRACE_DRIVER_IN(DRV_PCM_OPEN) mPcm = pcm_open(0, 0, flags, &config); TRACE_DRIVER_OUT @@ -1967,7 +1967,7 @@ status_t AudioHardware::AudioStreamInALSA::open_l() if (mHardware->mode() != AudioSystem::MODE_IN_CALL) { const char *route = mHardware->getInputRouteFromDevice(mDevices); - LOGV("read() wakeup setting route %s", route); + ALOGV("read() wakeup setting route %s", route); if (mRouteCtl) { TRACE_DRIVER_IN(DRV_MIXER_SEL) mixer_ctl_set_enum_by_string(mRouteCtl, route); @@ -2079,25 +2079,25 @@ String8 AudioHardware::AudioStreamInALSA::getParameters(const String8& keys) param.addInt(key, (int)mDevices); } - LOGV("AudioStreamInALSA::getParameters() %s", param.toString().string()); + ALOGV("AudioStreamInALSA::getParameters() %s", param.toString().string()); return param.toString(); } status_t AudioHardware::AudioStreamInALSA::addAudioEffect(effect_handle_t effect) { - LOGV("AudioStreamInALSA::addAudioEffect() %p", effect); + ALOGV("AudioStreamInALSA::addAudioEffect() %p", effect); effect_descriptor_t desc; status_t status = (*effect)->get_descriptor(effect, &desc); if (status == 0) { if (memcmp(&desc.type, FX_IID_AEC, sizeof(effect_uuid_t)) == 0) { - LOGV("AudioStreamInALSA::addAudioEffect() mNeedEchoReference true"); + ALOGV("AudioStreamInALSA::addAudioEffect() mNeedEchoReference true"); mNeedEchoReference = true; standby(); } - LOGV("AudioStreamInALSA::addAudioEffect() name %s", desc.name); + ALOGV("AudioStreamInALSA::addAudioEffect() name %s", desc.name); } else { - LOGV("AudioStreamInALSA::addAudioEffect() get_descriptor() error"); + ALOGV("AudioStreamInALSA::addAudioEffect() get_descriptor() error"); } AutoMutex lock(mLock); @@ -2108,7 +2108,7 @@ status_t AudioHardware::AudioStreamInALSA::addAudioEffect(effect_handle_t effect status_t AudioHardware::AudioStreamInALSA::removeAudioEffect(effect_handle_t effect) { status_t status = INVALID_OPERATION; - LOGV("AudioStreamInALSA::removeAudioEffect() %p", effect); + ALOGV("AudioStreamInALSA::removeAudioEffect() %p", effect); { AutoMutex lock(mLock); for (size_t i = 0; i < mPreprocessors.size(); i++) { @@ -2124,7 +2124,7 @@ status_t AudioHardware::AudioStreamInALSA::removeAudioEffect(effect_handle_t eff effect_descriptor_t desc; if ((*effect)->get_descriptor(effect, &desc) == 0) { if (memcmp(&desc.type, FX_IID_AEC, sizeof(effect_uuid_t)) == 0) { - LOGV("AudioStreamInALSA::removeAudioEffect() mNeedEchoReference false"); + ALOGV("AudioStreamInALSA::removeAudioEffect() mNeedEchoReference false"); mNeedEchoReference = false; standby(); } |