summaryrefslogtreecommitdiffstats
path: root/services/audioflinger
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2012-01-06 19:20:56 +0000
committerSteve Block <steveblock@google.com>2012-01-08 13:19:13 +0000
commit29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47 (patch)
tree3bdafe4b02fe36f6ee29c3170f0b0d2799bebf86 /services/audioflinger
parentd709ca9c6a0fa1c8f40cbe624a119398643c5087 (diff)
downloadframeworks_av-29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47.zip
frameworks_av-29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47.tar.gz
frameworks_av-29357bc2c0dd7c43ad3bd0c8e3efa4e6fd9bfd47.tar.bz2
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE
See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
Diffstat (limited to 'services/audioflinger')
-rw-r--r--services/audioflinger/AudioFlinger.cpp46
-rw-r--r--services/audioflinger/AudioMixer.cpp2
-rw-r--r--services/audioflinger/AudioPolicyService.cpp12
-rw-r--r--services/audioflinger/AudioResampler.cpp30
4 files changed, 45 insertions, 45 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index 7bef5a9..2b3c442 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -105,14 +105,14 @@ static const uint32_t kMaxThreadSleepTimeShift = 2;
static bool recordingAllowed() {
if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
bool ok = checkCallingPermission(String16("android.permission.RECORD_AUDIO"));
- if (!ok) LOGE("Request requires android.permission.RECORD_AUDIO");
+ if (!ok) ALOGE("Request requires android.permission.RECORD_AUDIO");
return ok;
}
static bool settingsAllowed() {
if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS"));
- if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS");
+ if (!ok) ALOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS");
return ok;
}
@@ -139,7 +139,7 @@ static int load_audio_interface(const char *if_name, const hw_module_t **mod,
goto out;
rc = audio_hw_device_open(*mod, dev);
- LOGE_IF(rc, "couldn't open audio hw device in %s.%s (%s)",
+ ALOGE_IF(rc, "couldn't open audio hw device in %s.%s (%s)",
AUDIO_HARDWARE_MODULE_ID, if_name, strerror(-rc));
if (rc)
goto out;
@@ -199,7 +199,7 @@ void AudioFlinger::onFirstRef()
mHardwareStatus = AUDIO_HW_INIT;
if (!mPrimaryHardwareDev || mAudioHwDevs.size() == 0) {
- LOGE("Primary audio interface not found");
+ ALOGE("Primary audio interface not found");
return;
}
@@ -400,7 +400,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(
int lSessionId;
if (streamType >= AUDIO_STREAM_CNT) {
- LOGE("createTrack() invalid stream type %d", streamType);
+ ALOGE("createTrack() invalid stream type %d", streamType);
lStatus = BAD_VALUE;
goto Exit;
}
@@ -410,7 +410,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(
PlaybackThread *thread = checkPlaybackThread_l(output);
PlaybackThread *effectThread = NULL;
if (thread == NULL) {
- LOGE("unknown output thread");
+ ALOGE("unknown output thread");
lStatus = BAD_VALUE;
goto Exit;
}
@@ -432,7 +432,7 @@ sp<IAudioTrack> AudioFlinger::createTrack(
// prevent same audio session on different output threads
uint32_t sessions = t->hasAudioSession(*sessionId);
if (sessions & PlaybackThread::TRACK_SESSION) {
- LOGE("createTrack() session ID %d already in use", *sessionId);
+ ALOGE("createTrack() session ID %d already in use", *sessionId);
lStatus = BAD_VALUE;
goto Exit;
}
@@ -663,7 +663,7 @@ status_t AudioFlinger::setStreamVolume(int stream, float value, int output)
}
if (stream < 0 || uint32_t(stream) >= AUDIO_STREAM_CNT) {
- LOGE("setStreamVolume() invalid stream %d", stream);
+ ALOGE("setStreamVolume() invalid stream %d", stream);
return BAD_VALUE;
}
@@ -698,7 +698,7 @@ status_t AudioFlinger::setStreamMute(int stream, bool muted)
if (stream < 0 || uint32_t(stream) >= AUDIO_STREAM_CNT ||
uint32_t(stream) == AUDIO_STREAM_ENFORCED_AUDIBLE) {
- LOGE("setStreamMute() invalid stream %d", stream);
+ ALOGE("setStreamMute() invalid stream %d", stream);
return BAD_VALUE;
}
@@ -1471,7 +1471,7 @@ status_t AudioFlinger::PlaybackThread::readyToRun()
if (status == NO_ERROR) {
ALOGI("AudioFlinger's thread %p ready to run", this);
} else {
- LOGE("No working audio driver found.");
+ ALOGE("No working audio driver found.");
}
return status;
}
@@ -1499,7 +1499,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra
if (mType == DIRECT) {
if ((format & AUDIO_FORMAT_MAIN_MASK) == AUDIO_FORMAT_PCM) {
if (sampleRate != mSampleRate || format != mFormat || channelMask != mChannelMask) {
- LOGE("createTrack_l() Bad parameter: sampleRate %d format %d, channelMask 0x%08x \""
+ ALOGE("createTrack_l() Bad parameter: sampleRate %d format %d, channelMask 0x%08x \""
"for output %p with format %d",
sampleRate, format, channelMask, mOutput, mFormat);
lStatus = BAD_VALUE;
@@ -1509,7 +1509,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra
} else {
// Resampler implementation limits input sampling rate to 2 x output sampling rate.
if (sampleRate > mSampleRate*2) {
- LOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate);
+ ALOGE("Sample rate out of range: %d mSampleRate %d", sampleRate, mSampleRate);
lStatus = BAD_VALUE;
goto Exit;
}
@@ -1517,7 +1517,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra
lStatus = initCheck();
if (lStatus != NO_ERROR) {
- LOGE("Audio driver not initialized.");
+ ALOGE("Audio driver not initialized.");
goto Exit;
}
@@ -1534,7 +1534,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra
if (t != 0) {
uint32_t actual = AudioSystem::getStrategyForStream((audio_stream_type_t)t->type());
if (sessionId == t->sessionId() && strategy != actual) {
- LOGE("createTrack_l() mismatched strategy; expected %u but found %u",
+ ALOGE("createTrack_l() mismatched strategy; expected %u but found %u",
strategy, actual);
lStatus = BAD_VALUE;
goto Exit;
@@ -1847,7 +1847,7 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud
// FIXME - Current mixer implementation only supports stereo output
if (mChannelCount == 1) {
- LOGE("Invalid audio hardware channel count");
+ ALOGE("Invalid audio hardware channel count");
}
}
@@ -3238,7 +3238,7 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase(
mBufferEnd = (uint8_t *)mBuffer + bufferSize;
}
} else {
- LOGE("not enough memory for AudioTrack size=%u", size);
+ ALOGE("not enough memory for AudioTrack size=%u", size);
client->heap()->dump("AudioTrack");
return;
}
@@ -3332,7 +3332,7 @@ void* AudioFlinger::ThreadBase::TrackBase::getBuffer(uint32_t offset, uint32_t f
// Check validity of returned pointer in case the track control block would have been corrupted.
if (bufferStart < mBuffer || bufferStart > bufferEnd || bufferEnd > mBufferEnd ||
((unsigned long)bufferStart & (unsigned long)(cblk->frameSize - 1))) {
- LOGE("TrackBase::getBuffer buffer out of range:\n start: %p, end %p , mBuffer %p mBufferEnd %p\n \
+ ALOGE("TrackBase::getBuffer buffer out of range:\n start: %p, end %p , mBuffer %p mBufferEnd %p\n \
server %d, serverBase %d, user %d, userBase %d",
bufferStart, bufferEnd, mBuffer, mBufferEnd,
cblk->server, cblk->serverBase, cblk->user, cblk->userBase);
@@ -3368,7 +3368,7 @@ AudioFlinger::PlaybackThread::Track::Track(
}
ALOGV("Track constructor name %d, calling thread %d", mName, IPCThreadState::self()->getCallingPid());
if (mName < 0) {
- LOGE("no more track names available");
+ ALOGE("no more track names available");
}
mVolume[0] = 1.0f;
mVolume[1] = 1.0f;
@@ -4380,7 +4380,7 @@ bool AudioFlinger::RecordThread::threadLoop()
mRsmpInIndex = 0;
}
if (mBytesRead < 0) {
- LOGE("Error reading audio input");
+ ALOGE("Error reading audio input");
if (mActiveTrack->mState == TrackBase::ACTIVE) {
// Force input into standby so that it tries to
// recover at next read attempt
@@ -4470,7 +4470,7 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createR
lStatus = initCheck();
if (lStatus != NO_ERROR) {
- LOGE("Audio driver not initialized.");
+ ALOGE("Audio driver not initialized.");
goto Exit;
}
@@ -4626,7 +4626,7 @@ status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer*
if (framesReady == 0) {
mBytesRead = mInput->stream->read(mInput->stream, mRsmpInBuffer, mInputBytes);
if (mBytesRead < 0) {
- LOGE("RecordThread::getNextBuffer() Error reading audio input");
+ ALOGE("RecordThread::getNextBuffer() Error reading audio input");
if (mActiveTrack->mState == TrackBase::ACTIVE) {
// Force input into standby so that it tries to
// recover at next read attempt
@@ -5545,7 +5545,7 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid,
if (thread == NULL) {
thread = checkPlaybackThread_l(io);
if (thread == NULL) {
- LOGE("createEffect() unknown output thread");
+ ALOGE("createEffect() unknown output thread");
lStatus = BAD_VALUE;
goto Exit;
}
@@ -6828,7 +6828,7 @@ AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect,
mBuffer = (uint8_t *)mCblk + bufOffset;
}
} else {
- LOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t));
+ ALOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t));
return;
}
}
diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp
index b8e456f..36cdeb8 100644
--- a/services/audioflinger/AudioMixer.cpp
+++ b/services/audioflinger/AudioMixer.cpp
@@ -1004,7 +1004,7 @@ void AudioMixer::process__OneTrack16BitsStereoNoResampling(state_t* state)
// been enabled for mixing.
if (in == NULL || ((unsigned long)in & 3)) {
memset(out, 0, numFrames*MAX_NUM_CHANNELS*sizeof(int16_t));
- LOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x",
+ ALOGE_IF(((unsigned long)in & 3), "process stereo track: input buffer alignment pb: buffer %p track %d, channels %d, needs %08x",
in, i, t.channelCount, t.needs);
return;
}
diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp
index 144f04e..f572fce 100644
--- a/services/audioflinger/AudioPolicyService.cpp
+++ b/services/audioflinger/AudioPolicyService.cpp
@@ -52,7 +52,7 @@ static const int kDumpLockSleep = 20000;
static bool checkPermission() {
if (getpid() == IPCThreadState::self()->getCallingPid()) return true;
bool ok = checkCallingPermission(String16("android.permission.MODIFY_AUDIO_SETTINGS"));
- if (!ok) LOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS");
+ if (!ok) ALOGE("Request requires android.permission.MODIFY_AUDIO_SETTINGS");
return ok;
}
@@ -83,18 +83,18 @@ AudioPolicyService::AudioPolicyService()
return;
rc = audio_policy_dev_open(module, &mpAudioPolicyDev);
- LOGE_IF(rc, "couldn't open audio policy device (%s)", strerror(-rc));
+ ALOGE_IF(rc, "couldn't open audio policy device (%s)", strerror(-rc));
if (rc)
return;
rc = mpAudioPolicyDev->create_audio_policy(mpAudioPolicyDev, &aps_ops, this,
&mpAudioPolicy);
- LOGE_IF(rc, "couldn't create audio policy (%s)", strerror(-rc));
+ ALOGE_IF(rc, "couldn't create audio policy (%s)", strerror(-rc));
if (rc)
return;
rc = mpAudioPolicy->init_check(mpAudioPolicy);
- LOGE_IF(rc, "couldn't init_check the audio policy (%s)", strerror(-rc));
+ ALOGE_IF(rc, "couldn't init_check the audio policy (%s)", strerror(-rc));
if (rc)
return;
@@ -1027,9 +1027,9 @@ int AudioPolicyService::startTone(audio_policy_tone_t tone,
audio_stream_type_t stream)
{
if (tone != AUDIO_POLICY_TONE_IN_CALL_NOTIFICATION)
- LOGE("startTone: illegal tone requested (%d)", tone);
+ ALOGE("startTone: illegal tone requested (%d)", tone);
if (stream != AUDIO_STREAM_VOICE_CALL)
- LOGE("startTone: illegal stream (%d) requested for tone %d", stream,
+ ALOGE("startTone: illegal stream (%d) requested for tone %d", stream,
tone);
mTonePlaybackThread->startToneCommand(ToneGenerator::TONE_SUP_CALL_WAITING,
AUDIO_STREAM_VOICE_CALL);
diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp
index 7205045..fbdcb62 100644
--- a/services/audioflinger/AudioResampler.cpp
+++ b/services/audioflinger/AudioResampler.cpp
@@ -121,7 +121,7 @@ AudioResampler::AudioResampler(int bitDepth, int inChannelCount,
mPhaseFraction(0) {
// sanity check on format
if ((bitDepth != 16) ||(inChannelCount < 1) || (inChannelCount > 2)) {
- LOGE("Unsupported sample format, %d bits, %d channels", bitDepth,
+ ALOGE("Unsupported sample format, %d bits, %d channels", bitDepth,
inChannelCount);
// LOG_ASSERT(0);
}
@@ -190,7 +190,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
size_t outputSampleCount = outFrameCount * 2;
size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate;
- // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
+ // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
// outFrameCount, inputIndex, phaseFraction, phaseIncrement);
while (outputIndex < outputSampleCount) {
@@ -203,7 +203,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
goto resampleStereo16_exit;
}
- // LOGE("New buffer fetched: %d frames\n", mBuffer.frameCount);
+ // ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount);
if (mBuffer.frameCount > inputIndex) break;
inputIndex -= mBuffer.frameCount;
@@ -217,7 +217,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
// handle boundary case
while (inputIndex == 0) {
- // LOGE("boundary case\n");
+ // ALOGE("boundary case\n");
out[outputIndex++] += vl * Interp(mX0L, in[0], phaseFraction);
out[outputIndex++] += vr * Interp(mX0R, in[1], phaseFraction);
Advance(&inputIndex, &phaseFraction, phaseIncrement);
@@ -226,7 +226,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
}
// process input samples
- // LOGE("general case\n");
+ // ALOGE("general case\n");
#ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1
if (inputIndex + 2 < mBuffer.frameCount) {
@@ -248,13 +248,13 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
Advance(&inputIndex, &phaseFraction, phaseIncrement);
}
- // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
+ // ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
// if done with buffer, save samples
if (inputIndex >= mBuffer.frameCount) {
inputIndex -= mBuffer.frameCount;
- // LOGE("buffer done, new input index %d", inputIndex);
+ // ALOGE("buffer done, new input index %d", inputIndex);
mX0L = mBuffer.i16[mBuffer.frameCount*2-2];
mX0R = mBuffer.i16[mBuffer.frameCount*2-1];
@@ -265,7 +265,7 @@ void AudioResamplerOrder1::resampleStereo16(int32_t* out, size_t outFrameCount,
}
}
- // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
+ // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
resampleStereo16_exit:
// save state
@@ -286,7 +286,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
size_t outputSampleCount = outFrameCount * 2;
size_t inFrameCount = (outFrameCount*mInSampleRate)/mSampleRate;
- // LOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
+ // ALOGE("starting resample %d frames, inputIndex=%d, phaseFraction=%d, phaseIncrement=%d\n",
// outFrameCount, inputIndex, phaseFraction, phaseIncrement);
while (outputIndex < outputSampleCount) {
// buffer is empty, fetch a new one
@@ -298,7 +298,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
mPhaseFraction = phaseFraction;
goto resampleMono16_exit;
}
- // LOGE("New buffer fetched: %d frames\n", mBuffer.frameCount);
+ // ALOGE("New buffer fetched: %d frames\n", mBuffer.frameCount);
if (mBuffer.frameCount > inputIndex) break;
inputIndex -= mBuffer.frameCount;
@@ -310,7 +310,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
// handle boundary case
while (inputIndex == 0) {
- // LOGE("boundary case\n");
+ // ALOGE("boundary case\n");
int32_t sample = Interp(mX0L, in[0], phaseFraction);
out[outputIndex++] += vl * sample;
out[outputIndex++] += vr * sample;
@@ -320,7 +320,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
}
// process input samples
- // LOGE("general case\n");
+ // ALOGE("general case\n");
#ifdef ASM_ARM_RESAMP1 // asm optimisation for ResamplerOrder1
if (inputIndex + 2 < mBuffer.frameCount) {
@@ -343,13 +343,13 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
}
- // LOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
+ // ALOGE("loop done - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
// if done with buffer, save samples
if (inputIndex >= mBuffer.frameCount) {
inputIndex -= mBuffer.frameCount;
- // LOGE("buffer done, new input index %d", inputIndex);
+ // ALOGE("buffer done, new input index %d", inputIndex);
mX0L = mBuffer.i16[mBuffer.frameCount-1];
provider->releaseBuffer(&mBuffer);
@@ -359,7 +359,7 @@ void AudioResamplerOrder1::resampleMono16(int32_t* out, size_t outFrameCount,
}
}
- // LOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
+ // ALOGE("output buffer full - outputIndex=%d, inputIndex=%d\n", outputIndex, inputIndex);
resampleMono16_exit:
// save state