diff options
Diffstat (limited to 'services')
-rw-r--r-- | services/audioflinger/AudioFlinger.cpp | 296 | ||||
-rw-r--r-- | services/audioflinger/AudioMixer.cpp | 22 | ||||
-rw-r--r-- | services/audioflinger/AudioPolicyService.cpp | 78 | ||||
-rw-r--r-- | services/audioflinger/AudioResampler.cpp | 8 | ||||
-rw-r--r-- | services/camera/libcameraservice/CameraHardwareInterface.h | 52 | ||||
-rw-r--r-- | services/camera/libcameraservice/CameraHardwareStub.cpp | 2 |
6 files changed, 229 insertions, 229 deletions
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp index ff262f1..cb6fcc6 100644 --- a/services/audioflinger/AudioFlinger.cpp +++ b/services/audioflinger/AudioFlinger.cpp @@ -413,7 +413,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( mClients.add(pid, client); } - LOGV("createTrack() sessionId: %d", (sessionId == NULL) ? -2 : *sessionId); + ALOGV("createTrack() sessionId: %d", (sessionId == NULL) ? -2 : *sessionId); if (sessionId != NULL && *sessionId != AUDIO_SESSION_OUTPUT_MIX) { for (size_t i = 0; i < mPlaybackThreads.size(); i++) { sp<PlaybackThread> t = mPlaybackThreads.valueAt(i); @@ -438,7 +438,7 @@ sp<IAudioTrack> AudioFlinger::createTrack( *sessionId = lSessionId; } } - LOGV("createTrack() lSessionId: %d", lSessionId); + ALOGV("createTrack() lSessionId: %d", lSessionId); track = thread->createTrack_l(client, streamType, sampleRate, format, channelMask, frameCount, sharedBuffer, lSessionId, &lStatus); @@ -730,7 +730,7 @@ status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs) { status_t result; - LOGV("setParameters(): io %d, keyvalue %s, tid %d, calling tid %d", + ALOGV("setParameters(): io %d, keyvalue %s, tid %d, calling tid %d", ioHandle, keyValuePairs.string(), gettid(), IPCThreadState::self()->getCallingPid()); // check calling permissions if (!settingsAllowed()) { @@ -804,7 +804,7 @@ status_t AudioFlinger::setParameters(int ioHandle, const String8& keyValuePairs) String8 AudioFlinger::getParameters(int ioHandle, const String8& keys) { -// LOGV("getParameters() io %d, keys %s, tid %d, calling tid %d", +// ALOGV("getParameters() io %d, keys %s, tid %d, calling tid %d", // ioHandle, keys.string(), gettid(), IPCThreadState::self()->getCallingPid()); if (ioHandle == 0) { @@ -901,7 +901,7 @@ void AudioFlinger::registerClient(const sp<IAudioFlingerClient>& client) sp<NotificationClient> notificationClient = new NotificationClient(this, client, pid); - LOGV("registerClient() client %p, pid %d", notificationClient.get(), pid); + ALOGV("registerClient() client %p, pid %d", notificationClient.get(), pid); mNotificationClients.add(pid, notificationClient); @@ -927,18 +927,18 @@ void AudioFlinger::removeNotificationClient(pid_t pid) int index = mNotificationClients.indexOfKey(pid); if (index >= 0) { sp <NotificationClient> client = mNotificationClients.valueFor(pid); - LOGV("removeNotificationClient() %p, pid %d", client.get(), pid); + ALOGV("removeNotificationClient() %p, pid %d", client.get(), pid); mNotificationClients.removeItem(pid); } - LOGV("%d died, releasing its sessions", pid); + ALOGV("%d died, releasing its sessions", pid); int num = mAudioSessionRefs.size(); bool removed = false; for (int i = 0; i< num; i++) { AudioSessionRef *ref = mAudioSessionRefs.itemAt(i); - LOGV(" pid %d @ %d", ref->pid, i); + ALOGV(" pid %d @ %d", ref->pid, i); if (ref->pid == pid) { - LOGV(" removing entry for pid %d session %d", pid, ref->sessionid); + ALOGV(" removing entry for pid %d session %d", pid, ref->sessionid); mAudioSessionRefs.removeAt(i); delete ref; removed = true; @@ -963,7 +963,7 @@ void AudioFlinger::audioConfigChanged_l(int event, int ioHandle, void *param2) // removeClient_l() must be called with AudioFlinger::mLock held void AudioFlinger::removeClient_l(pid_t pid) { - LOGV("removeClient_l() pid %d, tid %d, calling tid %d", pid, gettid(), IPCThreadState::self()->getCallingPid()); + ALOGV("removeClient_l() pid %d, tid %d, calling tid %d", pid, gettid(), IPCThreadState::self()->getCallingPid()); mClients.removeItem(pid); } @@ -997,7 +997,7 @@ void AudioFlinger::ThreadBase::exit() // destroyed in the middle of requestExitAndWait() sp <ThreadBase> strongMe = this; - LOGV("ThreadBase::exit"); + ALOGV("ThreadBase::exit"); { AutoMutex lock(&mLock); mExiting = true; @@ -1031,7 +1031,7 @@ status_t AudioFlinger::ThreadBase::setParameters(const String8& keyValuePairs) { status_t status; - LOGV("ThreadBase::setParameters() %s", keyValuePairs.string()); + ALOGV("ThreadBase::setParameters() %s", keyValuePairs.string()); Mutex::Autolock _l(mLock); mNewParameters.add(keyValuePairs); @@ -1060,7 +1060,7 @@ void AudioFlinger::ThreadBase::sendConfigEvent_l(int event, int param) configEvent->mEvent = event; configEvent->mParam = param; mConfigEvents.add(configEvent); - LOGV("sendConfigEvent() num events %d event %d, param %d", mConfigEvents.size(), event, param); + ALOGV("sendConfigEvent() num events %d event %d, param %d", mConfigEvents.size(), event, param); mWaitWorkCV.signal(); } @@ -1068,7 +1068,7 @@ void AudioFlinger::ThreadBase::processConfigEvents() { mLock.lock(); while(!mConfigEvents.isEmpty()) { - LOGV("processConfigEvents() remaining events %d", mConfigEvents.size()); + ALOGV("processConfigEvents() remaining events %d", mConfigEvents.size()); ConfigEvent *configEvent = mConfigEvents[0]; mConfigEvents.removeAt(0); // release mLock before locking AudioFlinger mLock: lock order is always @@ -1182,7 +1182,7 @@ void AudioFlinger::ThreadBase::acquireWakeLock_l() if (status == NO_ERROR) { mWakeLockToken = binder; } - LOGV("acquireWakeLock_l() %s status %d", mName, status); + ALOGV("acquireWakeLock_l() %s status %d", mName, status); } } @@ -1195,7 +1195,7 @@ void AudioFlinger::ThreadBase::releaseWakeLock() void AudioFlinger::ThreadBase::releaseWakeLock_l() { if (mWakeLockToken != 0) { - LOGV("releaseWakeLock_l() %s", mName); + ALOGV("releaseWakeLock_l() %s", mName); if (mPowerManager != 0) { mPowerManager->releaseWakeLock(mWakeLockToken, 0); } @@ -1258,7 +1258,7 @@ void AudioFlinger::ThreadBase::checkSuspendOnAddEffectChain_l(const sp<EffectCha if (sessionEffects.keyAt(i) == EffectChain::kKeyForSuspendAll) { chain->setEffectSuspendedAll_l(true); } else { - LOGV("checkSuspendOnAddEffectChain_l() suspending effects %08x", + ALOGV("checkSuspendOnAddEffectChain_l() suspending effects %08x", desc->mType.timeLow); chain->setEffectSuspended_l(&desc->mType, true); } @@ -1304,7 +1304,7 @@ void AudioFlinger::ThreadBase::updateSuspendedSessions_l(const effect_uuid_t *ty memcpy(&desc->mType, type, sizeof(effect_uuid_t)); } sessionEffects.add(key, desc); - LOGV("updateSuspendedSessions_l() suspend adding effect %08x", key); + ALOGV("updateSuspendedSessions_l() suspend adding effect %08x", key); } desc->mRefCount++; } else { @@ -1313,10 +1313,10 @@ void AudioFlinger::ThreadBase::updateSuspendedSessions_l(const effect_uuid_t *ty } desc = sessionEffects.valueAt(index); if (--desc->mRefCount == 0) { - LOGV("updateSuspendedSessions_l() restore removing effect %08x", key); + ALOGV("updateSuspendedSessions_l() restore removing effect %08x", key); sessionEffects.removeItemsAt(index); if (sessionEffects.isEmpty()) { - LOGV("updateSuspendedSessions_l() restore removing session %d", + ALOGV("updateSuspendedSessions_l() restore removing session %d", sessionId); mSuspendedSessions.removeItem(sessionId); } @@ -1538,7 +1538,7 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTra sp<EffectChain> chain = getEffectChain_l(sessionId); if (chain != 0) { - LOGV("createTrack_l() setting main buffer %p", chain->inBuffer()); + ALOGV("createTrack_l() setting main buffer %p", chain->inBuffer()); track->setMainBuffer(chain->inBuffer()); chain->setStrategy(AudioSystem::getStrategyForStream((audio_stream_type_t)track->type())); chain->incTrackCnt(); @@ -1632,7 +1632,7 @@ status_t AudioFlinger::PlaybackThread::addTrack_l(const sp<Track>& track) if (track->mainBuffer() != mMixBuffer) { sp<EffectChain> chain = getEffectChain_l(track->sessionId()); if (chain != 0) { - LOGV("addTrack_l() starting track on chain %p for session %d", chain.get(), track->sessionId()); + ALOGV("addTrack_l() starting track on chain %p for session %d", chain.get(), track->sessionId()); chain->incActiveTrackCnt(); } } @@ -1640,7 +1640,7 @@ status_t AudioFlinger::PlaybackThread::addTrack_l(const sp<Track>& track) status = NO_ERROR; } - LOGV("mWaitWorkCV.broadcast"); + ALOGV("mWaitWorkCV.broadcast"); mWaitWorkCV.broadcast(); return status; @@ -1686,7 +1686,7 @@ void AudioFlinger::PlaybackThread::audioConfigChanged_l(int event, int param) { AudioSystem::OutputDescriptor desc; void *param2 = 0; - LOGV("PlaybackThread::audioConfigChanged_l, thread %p, event %d, param %d", this, event, param); + ALOGV("PlaybackThread::audioConfigChanged_l, thread %p, event %d, param %d", this, event, param); switch (event) { case AudioSystem::OUTPUT_OPENED: @@ -1907,7 +1907,7 @@ bool AudioFlinger::MixerThread::threadLoop() if UNLIKELY((!activeTracks.size() && systemTime() > standbyTime) || mSuspended) { if (!mStandby) { - LOGV("Audio hardware entering standby, mixer %p, mSuspended %d\n", this, mSuspended); + ALOGV("Audio hardware entering standby, mixer %p, mSuspended %d\n", this, mSuspended); mOutput->stream->common.standby(&mOutput->stream->common); mStandby = true; mBytesWritten = 0; @@ -1921,9 +1921,9 @@ bool AudioFlinger::MixerThread::threadLoop() releaseWakeLock_l(); // wait until we have something to do... - LOGV("MixerThread %p TID %d going to sleep\n", this, gettid()); + ALOGV("MixerThread %p TID %d going to sleep\n", this, gettid()); mWaitWorkCV.wait(mLock); - LOGV("MixerThread %p TID %d waking up\n", this, gettid()); + ALOGV("MixerThread %p TID %d waking up\n", this, gettid()); acquireWakeLock_l(); if (mMasterMute == false) { @@ -1968,7 +1968,7 @@ bool AudioFlinger::MixerThread::threadLoop() (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)) { memset (mMixBuffer, 0, mixBufferSize); sleepTime = 0; - LOGV_IF((mBytesWritten == 0 && (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)), "anticipated start"); + ALOGV_IF((mBytesWritten == 0 && (mixerStatus == MIXER_TRACKS_ENABLED && longStandbyExit)), "anticipated start"); } // TODO add standby time extension fct of effect tail } @@ -2027,7 +2027,7 @@ bool AudioFlinger::MixerThread::threadLoop() releaseWakeLock(); - LOGV("MixerThread %p exiting", this); + ALOGV("MixerThread %p exiting", this); return false; } @@ -2083,7 +2083,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track if ((cblk->framesReady() >= minFrames) && track->isReady() && !track->isPaused() && !track->isTerminated()) { - //LOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this); + //ALOGV("track %d u=%08x, s=%08x [OK] on thread %p", track->name(), cblk->user, cblk->server, this); mixedTracks++; @@ -2189,7 +2189,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track track->mRetryCount = kMaxTrackRetries; mixerStatus = MIXER_TRACKS_READY; } else { - //LOGV("track %d u=%08x, s=%08x [NOT READY] on thread %p", track->name(), cblk->user, cblk->server, this); + //ALOGV("track %d u=%08x, s=%08x [NOT READY] on thread %p", track->name(), cblk->user, cblk->server, this); if (track->isStopped()) { track->reset(); } @@ -2201,7 +2201,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track // No buffers for this track. Give it a few chances to // fill a buffer, then remove it from active list. if (--(track->mRetryCount) <= 0) { - LOGV("BUFFER TIMEOUT: remove(%d) from active list on thread %p", track->name(), this); + ALOGV("BUFFER TIMEOUT: remove(%d) from active list on thread %p", track->name(), this); tracksToRemove->add(track); // indicate to client process that the track was disabled because of underrun android_atomic_or(CBLK_DISABLED_ON, &cblk->flags); @@ -2222,7 +2222,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track if (track->mainBuffer() != mMixBuffer) { chain = getEffectChain_l(track->sessionId()); if (chain != 0) { - LOGV("stopping track on chain %p for session Id: %d", chain.get(), track->sessionId()); + ALOGV("stopping track on chain %p for session Id: %d", chain.get(), track->sessionId()); chain->decActiveTrackCnt(); } } @@ -2244,7 +2244,7 @@ uint32_t AudioFlinger::MixerThread::prepareTracks_l(const SortedVector< wp<Track void AudioFlinger::MixerThread::invalidateTracks(int streamType) { - LOGV ("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %d", + ALOGV ("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %d", this, streamType, mTracks.size()); Mutex::Autolock _l(mLock); @@ -2260,7 +2260,7 @@ void AudioFlinger::MixerThread::invalidateTracks(int streamType) void AudioFlinger::PlaybackThread::setStreamValid(int streamType, bool valid) { - LOGV ("PlaybackThread::setStreamValid() thread %p, streamType %d, valid %d", + ALOGV ("PlaybackThread::setStreamValid() thread %p, streamType %d, valid %d", this, streamType, valid); Mutex::Autolock _l(mLock); @@ -2276,7 +2276,7 @@ int AudioFlinger::MixerThread::getTrackName_l() // deleteTrackName_l() must be called with ThreadBase::mLock held void AudioFlinger::MixerThread::deleteTrackName_l(int name) { - LOGV("remove track (%d) and delete from mixer", name); + ALOGV("remove track (%d) and delete from mixer", name); mAudioMixer->deleteTrackName(name); } @@ -2567,7 +2567,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() mSuspended) { // wait until we have something to do... if (!mStandby) { - LOGV("Audio hardware entering standby, mixer %p\n", this); + ALOGV("Audio hardware entering standby, mixer %p\n", this); mOutput->stream->common.standby(&mOutput->stream->common); mStandby = true; mBytesWritten = 0; @@ -2580,9 +2580,9 @@ bool AudioFlinger::DirectOutputThread::threadLoop() if (exitPending()) break; releaseWakeLock_l(); - LOGV("DirectOutputThread %p TID %d going to sleep\n", this, gettid()); + ALOGV("DirectOutputThread %p TID %d going to sleep\n", this, gettid()); mWaitWorkCV.wait(mLock); - LOGV("DirectOutputThread %p TID %d waking up in active mode\n", this, gettid()); + ALOGV("DirectOutputThread %p TID %d waking up in active mode\n", this, gettid()); acquireWakeLock_l(); if (mMasterMute == false) { @@ -2615,7 +2615,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() if (cblk->framesReady() && track->isReady() && !track->isPaused() && !track->isTerminated()) { - //LOGV("track %d u=%08x, s=%08x [OK]", track->name(), cblk->user, cblk->server); + //ALOGV("track %d u=%08x, s=%08x [OK]", track->name(), cblk->user, cblk->server); if (track->mFillingUpStatus == Track::FS_FILLED) { track->mFillingUpStatus = Track::FS_ACTIVE; @@ -2692,7 +2692,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() activeTrack = t; mixerStatus = MIXER_TRACKS_READY; } else { - //LOGV("track %d u=%08x, s=%08x [NOT READY]", track->name(), cblk->user, cblk->server); + //ALOGV("track %d u=%08x, s=%08x [NOT READY]", track->name(), cblk->user, cblk->server); if (track->isStopped()) { track->reset(); } @@ -2704,7 +2704,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() // No buffers for this track. Give it a few chances to // fill a buffer, then remove it from active list. if (--(track->mRetryCount) <= 0) { - LOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name()); + ALOGV("BUFFER TIMEOUT: remove(%d) from active list", track->name()); trackToRemove = track; } else { mixerStatus = MIXER_TRACKS_ENABLED; @@ -2717,7 +2717,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() if (UNLIKELY(trackToRemove != 0)) { mActiveTracks.remove(trackToRemove); if (!effectChains.isEmpty()) { - LOGV("stopping track on chain %p for session Id: %d", effectChains[0].get(), + ALOGV("stopping track on chain %p for session Id: %d", effectChains[0].get(), trackToRemove->sessionId()); effectChains[0]->decActiveTrackCnt(); } @@ -2804,7 +2804,7 @@ bool AudioFlinger::DirectOutputThread::threadLoop() releaseWakeLock(); - LOGV("DirectOutputThread %p exiting", this); + ALOGV("DirectOutputThread %p exiting", this); return false; } @@ -2974,9 +2974,9 @@ bool AudioFlinger::DuplicatingThread::threadLoop() if (exitPending()) break; releaseWakeLock_l(); - LOGV("DuplicatingThread %p TID %d going to sleep\n", this, gettid()); + ALOGV("DuplicatingThread %p TID %d going to sleep\n", this, gettid()); mWaitWorkCV.wait(mLock); - LOGV("DuplicatingThread %p TID %d waking up\n", this, gettid()); + ALOGV("DuplicatingThread %p TID %d waking up\n", this, gettid()); acquireWakeLock_l(); if (mMasterMute == false) { @@ -3082,7 +3082,7 @@ void AudioFlinger::DuplicatingThread::addOutputTrack(MixerThread *thread) if (outputTrack->cblk() != NULL) { thread->setStreamVolume(AUDIO_STREAM_CNT, 1.0f); mOutputTracks.add(outputTrack); - LOGV("addOutputTrack() track %p, on thread %p", outputTrack, thread); + ALOGV("addOutputTrack() track %p, on thread %p", outputTrack, thread); updateWaitTime(); } } @@ -3098,7 +3098,7 @@ void AudioFlinger::DuplicatingThread::removeOutputTrack(MixerThread *thread) return; } } - LOGV("removeOutputTrack(): unkonwn thread: %p", thread); + ALOGV("removeOutputTrack(): unkonwn thread: %p", thread); } void AudioFlinger::DuplicatingThread::updateWaitTime() @@ -3126,7 +3126,7 @@ bool AudioFlinger::DuplicatingThread::outputsReady(SortedVector< sp<OutputTrack> } PlaybackThread *playbackThread = (PlaybackThread *)thread.get(); if (playbackThread->standby() && !playbackThread->isSuspended()) { - LOGV("DuplicatingThread output track %p on thread %p Not Ready", outputTracks[i].get(), thread.get()); + ALOGV("DuplicatingThread output track %p on thread %p Not Ready", outputTracks[i].get(), thread.get()); return false; } } @@ -3162,7 +3162,7 @@ AudioFlinger::ThreadBase::TrackBase::TrackBase( mFlags(flags & ~SYSTEM_FLAGS_MASK), mSessionId(sessionId) { - LOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); + ALOGV_IF(sharedBuffer != 0, "sharedBuffer: %p, size: %d", sharedBuffer->pointer(), sharedBuffer->size()); // LOGD("Creating track with %d buffers @ %d bytes", bufferCount, bufferSize); size_t size = sizeof(audio_track_cblk_t); @@ -3247,7 +3247,7 @@ bool AudioFlinger::ThreadBase::TrackBase::step() { result = cblk->stepServer(mFrameCount); if (!result) { - LOGV("stepServer failed acquiring cblk mutex"); + ALOGV("stepServer failed acquiring cblk mutex"); mFlags |= STEPSERVER_FAILED; } return result; @@ -3261,7 +3261,7 @@ void AudioFlinger::ThreadBase::TrackBase::reset() { cblk->userBase = 0; cblk->serverBase = 0; mFlags &= (uint32_t)(~SYSTEM_FLAGS_MASK); - LOGV("TrackBase::reset"); + ALOGV("TrackBase::reset"); } sp<IMemory> AudioFlinger::ThreadBase::TrackBase::getCblk() const @@ -3323,7 +3323,7 @@ AudioFlinger::PlaybackThread::Track::Track( mName = playbackThread->getTrackName_l(); mMainBuffer = playbackThread->mixBuffer(); } - LOGV("Track constructor name %d, calling thread %d", mName, IPCThreadState::self()->getCallingPid()); + ALOGV("Track constructor name %d, calling thread %d", mName, IPCThreadState::self()->getCallingPid()); if (mName < 0) { LOGE("no more track names available"); } @@ -3338,7 +3338,7 @@ AudioFlinger::PlaybackThread::Track::Track( AudioFlinger::PlaybackThread::Track::~Track() { - LOGV("PlaybackThread::Track destructor"); + ALOGV("PlaybackThread::Track destructor"); sp<ThreadBase> thread = mThread.promote(); if (thread != 0) { Mutex::Autolock _l(thread->mLock); @@ -3409,7 +3409,7 @@ status_t AudioFlinger::PlaybackThread::Track::getNextBuffer(AudioBufferProvider: // Check if last stepServer failed, try to step now if (mFlags & TrackBase::STEPSERVER_FAILED) { if (!step()) goto getNextBuffer_exit; - LOGV("stepServer recovered"); + ALOGV("stepServer recovered"); mFlags &= ~TrackBase::STEPSERVER_FAILED; } @@ -3437,7 +3437,7 @@ status_t AudioFlinger::PlaybackThread::Track::getNextBuffer(AudioBufferProvider: getNextBuffer_exit: buffer->raw = 0; buffer->frameCount = 0; - LOGV("getNextBuffer() no more data for track %d on thread %p", mName, mThread.unsafe_get()); + ALOGV("getNextBuffer() no more data for track %d on thread %p", mName, mThread.unsafe_get()); return NOT_ENOUGH_DATA; } @@ -3456,7 +3456,7 @@ bool AudioFlinger::PlaybackThread::Track::isReady() const { status_t AudioFlinger::PlaybackThread::Track::start() { status_t status = NO_ERROR; - LOGV("start(%d), calling thread %d session %d", + ALOGV("start(%d), calling thread %d session %d", mName, IPCThreadState::self()->getCallingPid(), mSessionId); sp<ThreadBase> thread = mThread.promote(); if (thread != 0) { @@ -3466,10 +3466,10 @@ status_t AudioFlinger::PlaybackThread::Track::start() // in both cases "unstop" the track if (mState == PAUSED) { mState = TrackBase::RESUMING; - LOGV("PAUSED => RESUMING (%d) on thread %p", mName, this); + ALOGV("PAUSED => RESUMING (%d) on thread %p", mName, this); } else { mState = TrackBase::ACTIVE; - LOGV("? => ACTIVE (%d) on thread %p", mName, this); + ALOGV("? => ACTIVE (%d) on thread %p", mName, this); } if (!isOutputTrack() && state != ACTIVE && state != RESUMING) { @@ -3498,7 +3498,7 @@ status_t AudioFlinger::PlaybackThread::Track::start() void AudioFlinger::PlaybackThread::Track::stop() { - LOGV("stop(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid()); + ALOGV("stop(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid()); sp<ThreadBase> thread = mThread.promote(); if (thread != 0) { Mutex::Autolock _l(thread->mLock); @@ -3510,7 +3510,7 @@ void AudioFlinger::PlaybackThread::Track::stop() if (playbackThread->mActiveTracks.indexOf(this) < 0) { reset(); } - LOGV("(> STOPPED) => STOPPED (%d) on thread %p", mName, playbackThread); + ALOGV("(> STOPPED) => STOPPED (%d) on thread %p", mName, playbackThread); } if (!isOutputTrack() && (state == ACTIVE || state == RESUMING)) { thread->mLock.unlock(); @@ -3527,13 +3527,13 @@ void AudioFlinger::PlaybackThread::Track::stop() void AudioFlinger::PlaybackThread::Track::pause() { - LOGV("pause(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid()); + ALOGV("pause(%d), calling thread %d", mName, IPCThreadState::self()->getCallingPid()); sp<ThreadBase> thread = mThread.promote(); if (thread != 0) { Mutex::Autolock _l(thread->mLock); if (mState == ACTIVE || mState == RESUMING) { mState = PAUSING; - LOGV("ACTIVE/RESUMING => PAUSING (%d) on thread %p", mName, thread.get()); + ALOGV("ACTIVE/RESUMING => PAUSING (%d) on thread %p", mName, thread.get()); if (!isOutputTrack()) { thread->mLock.unlock(); AudioSystem::stopOutput(thread->id(), @@ -3550,7 +3550,7 @@ void AudioFlinger::PlaybackThread::Track::pause() void AudioFlinger::PlaybackThread::Track::flush() { - LOGV("flush(%d)", mName); + ALOGV("flush(%d)", mName); sp<ThreadBase> thread = mThread.promote(); if (thread != 0) { Mutex::Autolock _l(thread->mLock); @@ -3630,7 +3630,7 @@ AudioFlinger::RecordThread::RecordTrack::RecordTrack( mOverflow(false) { if (mCblk != NULL) { - LOGV("RecordTrack constructor, size %d", (int)mBufferEnd - (int)mBuffer); + ALOGV("RecordTrack constructor, size %d", (int)mBufferEnd - (int)mBuffer); if (format == AUDIO_FORMAT_PCM_16_BIT) { mCblk->frameSize = mChannelCount * sizeof(int16_t); } else if (format == AUDIO_FORMAT_PCM_8_BIT) { @@ -3658,7 +3658,7 @@ status_t AudioFlinger::RecordThread::RecordTrack::getNextBuffer(AudioBufferProvi // Check if last stepServer failed, try to step now if (mFlags & TrackBase::STEPSERVER_FAILED) { if (!step()) goto getNextBuffer_exit; - LOGV("stepServer recovered"); + ALOGV("stepServer recovered"); mFlags &= ~TrackBase::STEPSERVER_FAILED; } @@ -3747,7 +3747,7 @@ AudioFlinger::PlaybackThread::OutputTrack::OutputTrack( mCblk->volume[0] = mCblk->volume[1] = 0x1000; mOutBuffer.frameCount = 0; playbackThread->mTracks.add(this); - LOGV("OutputTrack constructor mCblk %p, mBuffer %p, mCblk->buffers %p, " \ + ALOGV("OutputTrack constructor mCblk %p, mBuffer %p, mCblk->buffers %p, " \ "mCblk->frameCount %d, mCblk->sampleRate %d, mChannelMask 0x%08x mBufferEnd %p", mCblk, mBuffer, mCblk->buffers, mCblk->frameCount, mCblk->sampleRate, mChannelMask, mBufferEnd); @@ -3829,7 +3829,7 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t fr mOutBuffer.frameCount = pInBuffer->frameCount; nsecs_t startTime = systemTime(); if (obtainBuffer(&mOutBuffer, waitTimeLeftMs) == (status_t)AudioTrack::NO_MORE_BUFFERS) { - LOGV ("OutputTrack::write() %p thread %p no more output buffers", this, mThread.unsafe_get()); + ALOGV ("OutputTrack::write() %p thread %p no more output buffers", this, mThread.unsafe_get()); outputBufferFull = true; break; } @@ -3854,7 +3854,7 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t fr mBufferQueue.removeAt(0); delete [] pInBuffer->mBuffer; delete pInBuffer; - LOGV("OutputTrack::write() %p thread %p released overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size()); + ALOGV("OutputTrack::write() %p thread %p released overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size()); } else { break; } @@ -3872,7 +3872,7 @@ bool AudioFlinger::PlaybackThread::OutputTrack::write(int16_t* data, uint32_t fr pInBuffer->i16 = pInBuffer->mBuffer; memcpy(pInBuffer->raw, inBuffer.raw, inBuffer.frameCount * channelCount * sizeof(int16_t)); mBufferQueue.add(pInBuffer); - LOGV("OutputTrack::write() %p thread %p adding overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size()); + ALOGV("OutputTrack::write() %p thread %p adding overflow buffer %d", this, mThread.unsafe_get(), mBufferQueue.size()); } else { LOGW("OutputTrack::write() %p thread %p no more overflow buffers", mThread.unsafe_get(), this); } @@ -3906,7 +3906,7 @@ status_t AudioFlinger::PlaybackThread::OutputTrack::obtainBuffer(AudioBufferProv audio_track_cblk_t* cblk = mCblk; uint32_t framesReq = buffer->frameCount; -// LOGV("OutputTrack::obtainBuffer user %d, server %d", cblk->user, cblk->server); +// ALOGV("OutputTrack::obtainBuffer user %d, server %d", cblk->user, cblk->server); buffer->frameCount = 0; uint32_t framesAvail = cblk->framesAvailable(); @@ -3918,7 +3918,7 @@ status_t AudioFlinger::PlaybackThread::OutputTrack::obtainBuffer(AudioBufferProv while (framesAvail == 0) { active = mActive; if (UNLIKELY(!active)) { - LOGV("Not active and NO_MORE_BUFFERS"); + ALOGV("Not active and NO_MORE_BUFFERS"); return AudioTrack::NO_MORE_BUFFERS; } result = cblk->cv.waitRelative(cblk->lock, milliseconds(waitTimeMs)); @@ -4160,12 +4160,12 @@ AudioFlinger::RecordHandle::~RecordHandle() { } status_t AudioFlinger::RecordHandle::start() { - LOGV("RecordHandle::start()"); + ALOGV("RecordHandle::start()"); return mRecordTrack->start(); } void AudioFlinger::RecordHandle::stop() { - LOGV("RecordHandle::stop()"); + ALOGV("RecordHandle::stop()"); mRecordTrack->stop(); } @@ -4248,10 +4248,10 @@ bool AudioFlinger::RecordThread::threadLoop() if (exitPending()) break; releaseWakeLock_l(); - LOGV("RecordThread: loop stopping"); + ALOGV("RecordThread: loop stopping"); // go to sleep mWaitWorkCV.wait(mLock); - LOGV("RecordThread: loop starting"); + ALOGV("RecordThread: loop starting"); acquireWakeLock_l(); continue; } @@ -4407,7 +4407,7 @@ bool AudioFlinger::RecordThread::threadLoop() releaseWakeLock(); - LOGV("RecordThread %p exiting", this); + ALOGV("RecordThread %p exiting", this); return false; } @@ -4460,7 +4460,7 @@ Exit: status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrack) { - LOGV("RecordThread::start"); + ALOGV("RecordThread::start"); sp <ThreadBase> strongMe = this; status_t status = NO_ERROR; { @@ -4490,7 +4490,7 @@ status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrac } mActiveTrack->mState = TrackBase::RESUMING; // signal thread to start - LOGV("Signal record thread"); + ALOGV("Signal record thread"); mWaitWorkCV.signal(); // do not wait for mStartStopCond if exiting if (mExiting) { @@ -4500,11 +4500,11 @@ status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrac } mStartStopCond.wait(mLock); if (mActiveTrack == 0) { - LOGV("Record failed to start"); + ALOGV("Record failed to start"); status = BAD_VALUE; goto startError; } - LOGV("Record started OK"); + ALOGV("Record started OK"); return status; } startError: @@ -4513,7 +4513,7 @@ startError: } void AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) { - LOGV("RecordThread::stop"); + ALOGV("RecordThread::stop"); sp <ThreadBase> strongMe = this; { AutoMutex lock(&mLock); @@ -4529,7 +4529,7 @@ void AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) { mLock.unlock(); AudioSystem::stopInput(mId); mLock.lock(); - LOGV("Record stopped OK"); + ALOGV("Record stopped OK"); } } } @@ -4862,7 +4862,7 @@ int AudioFlinger::openOutput(uint32_t *pDevices, audio_stream_out_t *outStream; audio_hw_device_t *outHwDev; - LOGV("openOutput(), Device %x, SamplingRate %d, Format %d, Channels %x, flags %x", + ALOGV("openOutput(), Device %x, SamplingRate %d, Format %d, Channels %x, flags %x", pDevices ? *pDevices : 0, samplingRate, format, @@ -4881,7 +4881,7 @@ int AudioFlinger::openOutput(uint32_t *pDevices, status = outHwDev->open_output_stream(outHwDev, *pDevices, (int *)&format, &channels, &samplingRate, &outStream); - LOGV("openOutput() openOutputStream returned output %p, SamplingRate %d, Format %d, Channels %x, status %d", + ALOGV("openOutput() openOutputStream returned output %p, SamplingRate %d, Format %d, Channels %x, status %d", outStream, samplingRate, format, @@ -4897,10 +4897,10 @@ int AudioFlinger::openOutput(uint32_t *pDevices, (format != AUDIO_FORMAT_PCM_16_BIT) || (channels != AUDIO_CHANNEL_OUT_STEREO)) { thread = new DirectOutputThread(this, output, id, *pDevices); - LOGV("openOutput() created direct output: ID %d thread %p", id, thread); + ALOGV("openOutput() created direct output: ID %d thread %p", id, thread); } else { thread = new MixerThread(this, output, id, *pDevices); - LOGV("openOutput() created mixer output: ID %d thread %p", id, thread); + ALOGV("openOutput() created mixer output: ID %d thread %p", id, thread); } mPlaybackThreads.add(id, thread); @@ -4949,7 +4949,7 @@ status_t AudioFlinger::closeOutput(int output) return BAD_VALUE; } - LOGV("closeOutput() %d", output); + ALOGV("closeOutput() %d", output); if (thread->type() == ThreadBase::MIXER) { for (size_t i = 0; i < mPlaybackThreads.size(); i++) { @@ -4983,7 +4983,7 @@ status_t AudioFlinger::suspendOutput(int output) return BAD_VALUE; } - LOGV("suspendOutput() %d", output); + ALOGV("suspendOutput() %d", output); thread->suspend(); return NO_ERROR; @@ -4998,7 +4998,7 @@ status_t AudioFlinger::restoreOutput(int output) return BAD_VALUE; } - LOGV("restoreOutput() %d", output); + ALOGV("restoreOutput() %d", output); thread->restore(); @@ -5036,7 +5036,7 @@ int AudioFlinger::openInput(uint32_t *pDevices, &channels, &samplingRate, (audio_in_acoustics_t)acoustics, &inStream); - LOGV("openInput() openInputStream returned input %p, SamplingRate %d, Format %d, Channels %x, acoustics %x, status %d", + ALOGV("openInput() openInputStream returned input %p, SamplingRate %d, Format %d, Channels %x, acoustics %x, status %d", inStream, samplingRate, format, @@ -5051,7 +5051,7 @@ int AudioFlinger::openInput(uint32_t *pDevices, reqFormat == format && format == AUDIO_FORMAT_PCM_16_BIT && (samplingRate <= 2 * reqSamplingRate) && (popcount(channels) < 3) && (popcount(reqChannels) < 3)) { - LOGV("openInput() reopening with proposed sampling rate and channels"); + ALOGV("openInput() reopening with proposed sampling rate and channels"); status = inHwDev->open_input_stream(inHwDev, *pDevices, (int *)&format, &channels, &samplingRate, (audio_in_acoustics_t)acoustics, @@ -5073,7 +5073,7 @@ int AudioFlinger::openInput(uint32_t *pDevices, id, device); mRecordThreads.add(id, thread); - LOGV("openInput() created record thread: ID %d thread %p", id, thread); + ALOGV("openInput() created record thread: ID %d thread %p", id, thread); if (pSamplingRate) *pSamplingRate = reqSamplingRate; if (pFormat) *pFormat = format; if (pChannels) *pChannels = reqChannels; @@ -5100,7 +5100,7 @@ status_t AudioFlinger::closeInput(int input) return BAD_VALUE; } - LOGV("closeInput() %d", input); + ALOGV("closeInput() %d", input); void *param2 = 0; audioConfigChanged_l(AudioSystem::INPUT_CLOSED, input, param2); mRecordThreads.removeItem(input); @@ -5124,7 +5124,7 @@ status_t AudioFlinger::setStreamOutput(uint32_t stream, int output) return BAD_VALUE; } - LOGV("setStreamOutput() stream %d to output %d", stream, output); + ALOGV("setStreamOutput() stream %d to output %d", stream, output); audioConfigChanged_l(AudioSystem::STREAM_CONFIG_CHANGED, output, &stream); dstThread->setStreamValid(stream, true); @@ -5152,13 +5152,13 @@ void AudioFlinger::acquireAudioSessionId(int audioSession) { Mutex::Autolock _l(mLock); int caller = IPCThreadState::self()->getCallingPid(); - LOGV("acquiring %d from %d", audioSession, caller); + ALOGV("acquiring %d from %d", audioSession, caller); int num = mAudioSessionRefs.size(); for (int i = 0; i< num; i++) { AudioSessionRef *ref = mAudioSessionRefs.editItemAt(i); if (ref->sessionid == audioSession && ref->pid == caller) { ref->cnt++; - LOGV(" incremented refcount to %d", ref->cnt); + ALOGV(" incremented refcount to %d", ref->cnt); return; } } @@ -5167,20 +5167,20 @@ void AudioFlinger::acquireAudioSessionId(int audioSession) ref->pid = caller; ref->cnt = 1; mAudioSessionRefs.push(ref); - LOGV(" added new entry for %d", ref->sessionid); + ALOGV(" added new entry for %d", ref->sessionid); } void AudioFlinger::releaseAudioSessionId(int audioSession) { Mutex::Autolock _l(mLock); int caller = IPCThreadState::self()->getCallingPid(); - LOGV("releasing %d from %d", audioSession, caller); + ALOGV("releasing %d from %d", audioSession, caller); int num = mAudioSessionRefs.size(); for (int i = 0; i< num; i++) { AudioSessionRef *ref = mAudioSessionRefs.itemAt(i); if (ref->sessionid == audioSession && ref->pid == caller) { ref->cnt--; - LOGV(" decremented refcount to %d", ref->cnt); + ALOGV(" decremented refcount to %d", ref->cnt); if (ref->cnt == 0) { mAudioSessionRefs.removeAt(i); delete ref; @@ -5194,7 +5194,7 @@ void AudioFlinger::releaseAudioSessionId(int audioSession) void AudioFlinger::purgeStaleEffects_l() { - LOGV("purging stale effects"); + ALOGV("purging stale effects"); Vector< sp<EffectChain> > chains; @@ -5227,7 +5227,7 @@ void AudioFlinger::purgeStaleEffects_l() { for (size_t k = 0; k < numsessionrefs; k++) { AudioSessionRef *ref = mAudioSessionRefs.itemAt(k); if (ref->sessionid == sessionid) { - LOGV(" session %d still exists for %d with %d refs", + ALOGV(" session %d still exists for %d with %d refs", sessionid, ref->pid, ref->cnt); found = true; break; @@ -5357,7 +5357,7 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid, sp<Client> client; wp<Client> wclient; - LOGV("createEffect pid %d, client %p, priority %d, sessionId %d, io %d", + ALOGV("createEffect pid %d, client %p, priority %d, sessionId %d, io %d", pid, effectClient.get(), priority, sessionId, io); if (pDesc == NULL) { @@ -5496,7 +5496,7 @@ sp<IEffect> AudioFlinger::createEffect(pid_t pid, if (io == 0 && mPlaybackThreads.size()) { io = mPlaybackThreads.keyAt(0); } - LOGV("createEffect() got io %d for effect %s", io, desc.name); + ALOGV("createEffect() got io %d for effect %s", io, desc.name); } ThreadBase *thread = checkRecordThread_l(io); if (thread == NULL) { @@ -5534,7 +5534,7 @@ Exit: status_t AudioFlinger::moveEffects(int sessionId, int srcOutput, int dstOutput) { - LOGV("moveEffects() session %d, srcOutput %d, dstOutput %d", + ALOGV("moveEffects() session %d, srcOutput %d, dstOutput %d", sessionId, srcOutput, dstOutput); Mutex::Autolock _l(mLock); if (srcOutput == dstOutput) { @@ -5565,7 +5565,7 @@ status_t AudioFlinger::moveEffectChain_l(int sessionId, AudioFlinger::PlaybackThread *dstThread, bool reRegister) { - LOGV("moveEffectChain_l() session %d from thread %p to thread %p", + ALOGV("moveEffectChain_l() session %d from thread %p to thread %p", sessionId, srcThread, dstThread); sp<EffectChain> chain = srcThread->getEffectChain_l(sessionId); @@ -5665,7 +5665,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l( goto Exit; } - LOGV("createEffect_l() thread %p effect %s on session %d", this, desc->name, sessionId); + ALOGV("createEffect_l() thread %p effect %s on session %d", this, desc->name, sessionId); { // scope for mLock Mutex::Autolock _l(mLock); @@ -5674,7 +5674,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l( chain = getEffectChain_l(sessionId); if (chain == 0) { // create a new chain for this session - LOGV("createEffect_l() new effect chain for session %d", sessionId); + ALOGV("createEffect_l() new effect chain for session %d", sessionId); chain = new EffectChain(this, sessionId); addEffectChain_l(chain); chain->setStrategy(getStrategyForSession_l(sessionId)); @@ -5683,7 +5683,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l( effect = chain->getEffectFromDesc_l(desc); } - LOGV("createEffect_l() got effect %p on chain %p", effect == 0 ? 0 : effect.get(), chain.get()); + ALOGV("createEffect_l() got effect %p on chain %p", effect == 0 ? 0 : effect.get(), chain.get()); if (effect == 0) { int id = mAudioFlinger->nextUniqueId(); @@ -5759,13 +5759,13 @@ status_t AudioFlinger::ThreadBase::addEffect_l(const sp<EffectModule>& effect) if (chain == 0) { // create a new chain for this session - LOGV("addEffect_l() new effect chain for session %d", sessionId); + ALOGV("addEffect_l() new effect chain for session %d", sessionId); chain = new EffectChain(this, sessionId); addEffectChain_l(chain); chain->setStrategy(getStrategyForSession_l(sessionId)); chainCreated = true; } - LOGV("addEffect_l() %p chain %p effect %p", this, chain.get(), effect.get()); + ALOGV("addEffect_l() %p chain %p effect %p", this, chain.get(), effect.get()); if (chain->getEffectFromId_l(effect->id()) != 0) { LOGW("addEffect_l() %p effect %s already present in chain %p", @@ -5788,7 +5788,7 @@ status_t AudioFlinger::ThreadBase::addEffect_l(const sp<EffectModule>& effect) void AudioFlinger::ThreadBase::removeEffect_l(const sp<EffectModule>& effect) { - LOGV("removeEffect_l() %p effect %p", this, effect.get()); + ALOGV("removeEffect_l() %p effect %p", this, effect.get()); effect_descriptor_t desc = effect->desc(); if ((desc.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_AUXILIARY) { detachAuxEffect_l(effect->id()); @@ -5856,7 +5856,7 @@ void AudioFlinger::ThreadBase::disconnectEffect(const sp<EffectModule>& effect, bool unpiniflast) { Mutex::Autolock _l(mLock); - LOGV("disconnectEffect() %p effect %p", this, effect.get()); + ALOGV("disconnectEffect() %p effect %p", this, effect.get()); // delete the effect module if removing last handle on it if (effect->removeHandle(handle) == 0) { if (!effect->isPinned() || unpiniflast) { @@ -5872,7 +5872,7 @@ status_t AudioFlinger::PlaybackThread::addEffectChain_l(const sp<EffectChain>& c int16_t *buffer = mMixBuffer; bool ownsBuffer = false; - LOGV("addEffectChain_l() %p on thread %p for session %d", chain.get(), this, session); + ALOGV("addEffectChain_l() %p on thread %p for session %d", chain.get(), this, session); if (session > 0) { // Only one effect chain can be present in direct output thread and it uses // the mix buffer as input @@ -5880,7 +5880,7 @@ status_t AudioFlinger::PlaybackThread::addEffectChain_l(const sp<EffectChain>& c size_t numSamples = mFrameCount * mChannelCount; buffer = new int16_t[numSamples]; memset(buffer, 0, numSamples * sizeof(int16_t)); - LOGV("addEffectChain_l() creating new input buffer %p session %d", buffer, session); + ALOGV("addEffectChain_l() creating new input buffer %p session %d", buffer, session); ownsBuffer = true; } @@ -5888,7 +5888,7 @@ status_t AudioFlinger::PlaybackThread::addEffectChain_l(const sp<EffectChain>& c for (size_t i = 0; i < mTracks.size(); ++i) { sp<Track> track = mTracks[i]; if (session == track->sessionId()) { - LOGV("addEffectChain_l() track->setMainBuffer track %p buffer %p", track.get(), buffer); + ALOGV("addEffectChain_l() track->setMainBuffer track %p buffer %p", track.get(), buffer); track->setMainBuffer(buffer); chain->incTrackCnt(); } @@ -5899,7 +5899,7 @@ status_t AudioFlinger::PlaybackThread::addEffectChain_l(const sp<EffectChain>& c sp<Track> track = mActiveTracks[i].promote(); if (track == 0) continue; if (session == track->sessionId()) { - LOGV("addEffectChain_l() activating track %p on session %d", track.get(), session); + ALOGV("addEffectChain_l() activating track %p on session %d", track.get(), session); chain->incActiveTrackCnt(); } } @@ -5932,7 +5932,7 @@ size_t AudioFlinger::PlaybackThread::removeEffectChain_l(const sp<EffectChain>& { int session = chain->sessionId(); - LOGV("removeEffectChain_l() %p from thread %p for session %d", chain.get(), this, session); + ALOGV("removeEffectChain_l() %p from thread %p for session %d", chain.get(), this, session); for (size_t i = 0; i < mEffectChains.size(); i++) { if (chain == mEffectChains[i]) { @@ -5942,7 +5942,7 @@ size_t AudioFlinger::PlaybackThread::removeEffectChain_l(const sp<EffectChain>& sp<Track> track = mActiveTracks[i].promote(); if (track == 0) continue; if (session == track->sessionId()) { - LOGV("removeEffectChain_l(): stopping track on chain %p for session Id: %d", + ALOGV("removeEffectChain_l(): stopping track on chain %p for session Id: %d", chain.get(), session); chain->decActiveTrackCnt(); } @@ -6008,7 +6008,7 @@ status_t AudioFlinger::RecordThread::addEffectChain_l(const sp<EffectChain>& cha if (mEffectChains.size() != 0) { return INVALID_OPERATION; } - LOGV("addEffectChain_l() %p on thread %p", chain.get(), this); + ALOGV("addEffectChain_l() %p on thread %p", chain.get(), this); chain->setInBuffer(NULL); chain->setOutBuffer(NULL); @@ -6022,7 +6022,7 @@ status_t AudioFlinger::RecordThread::addEffectChain_l(const sp<EffectChain>& cha size_t AudioFlinger::RecordThread::removeEffectChain_l(const sp<EffectChain>& chain) { - LOGV("removeEffectChain_l() %p from thread %p", chain.get(), this); + ALOGV("removeEffectChain_l() %p from thread %p", chain.get(), this); LOGW_IF(mEffectChains.size() != 1, "removeEffectChain_l() %p invalid chain size %d on thread %p", chain.get(), mEffectChains.size(), this); @@ -6047,7 +6047,7 @@ AudioFlinger::EffectModule::EffectModule(const wp<ThreadBase>& wThread, : mThread(wThread), mChain(chain), mId(id), mSessionId(sessionId), mEffectInterface(NULL), mStatus(NO_INIT), mState(IDLE), mSuspended(false) { - LOGV("Constructor %p", this); + ALOGV("Constructor %p", this); int lStatus; sp<ThreadBase> thread = mThread.promote(); if (thread == 0) { @@ -6071,17 +6071,17 @@ AudioFlinger::EffectModule::EffectModule(const wp<ThreadBase>& wThread, if (mSessionId > AUDIO_SESSION_OUTPUT_MIX) { mPinned = true; } - LOGV("Constructor success name %s, Interface %p", mDescriptor.name, mEffectInterface); + ALOGV("Constructor success name %s, Interface %p", mDescriptor.name, mEffectInterface); return; Error: EffectRelease(mEffectInterface); mEffectInterface = NULL; - LOGV("Constructor Error %d", mStatus); + ALOGV("Constructor Error %d", mStatus); } AudioFlinger::EffectModule::~EffectModule() { - LOGV("Destructor %p", this); + ALOGV("Destructor %p", this); if (mEffectInterface != NULL) { if ((mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_PRE_PROC || (mDescriptor.flags & EFFECT_FLAG_TYPE_MASK) == EFFECT_FLAG_TYPE_POST_PROC) { @@ -6125,7 +6125,7 @@ status_t AudioFlinger::EffectModule::addHandle(sp<EffectHandle>& handle) } else { status = ALREADY_EXISTS; } - LOGV("addHandle() %p added handle %p in position %d", this, handle.get(), i); + ALOGV("addHandle() %p added handle %p in position %d", this, handle.get(), i); mHandles.insertAt(handle, i); return status; } @@ -6141,12 +6141,12 @@ size_t AudioFlinger::EffectModule::removeHandle(const wp<EffectHandle>& handle) if (i == size) { return size; } - LOGV("removeHandle() %p removed handle %p in position %d", this, handle.unsafe_get(), i); + ALOGV("removeHandle() %p removed handle %p in position %d", this, handle.unsafe_get(), i); bool enabled = false; EffectHandle *hdl = handle.unsafe_get(); if (hdl) { - LOGV("removeHandle() unsafe_get OK"); + ALOGV("removeHandle() unsafe_get OK"); enabled = hdl->enabled(); } mHandles.removeAt(i); @@ -6181,7 +6181,7 @@ sp<AudioFlinger::EffectHandle> AudioFlinger::EffectModule::controlHandle() void AudioFlinger::EffectModule::disconnect(const wp<EffectHandle>& handle, bool unpiniflast) { - LOGV("disconnect() %p handle %p ", this, handle.unsafe_get()); + ALOGV("disconnect() %p handle %p ", this, handle.unsafe_get()); // keep a strong reference on this EffectModule to avoid calling the // destructor before we exit sp<EffectModule> keep(this); @@ -6341,7 +6341,7 @@ status_t AudioFlinger::EffectModule::configure() mConfig.inputCfg.buffer.frameCount = thread->frameCount(); mConfig.outputCfg.buffer.frameCount = mConfig.inputCfg.buffer.frameCount; - LOGV("configure() %p thread %p buffer %p framecount %d", + ALOGV("configure() %p thread %p buffer %p framecount %d", this, thread.get(), mConfig.inputCfg.buffer.raw, mConfig.inputCfg.buffer.frameCount); status_t cmdStatus; @@ -6461,7 +6461,7 @@ status_t AudioFlinger::EffectModule::command(uint32_t cmdCode, void *pReplyData) { Mutex::Autolock _l(mLock); -// LOGV("command(), cmdCode: %d, mEffectInterface: %p", cmdCode, mEffectInterface); +// ALOGV("command(), cmdCode: %d, mEffectInterface: %p", cmdCode, mEffectInterface); if (mState == DESTROYED || mEffectInterface == NULL) { return NO_INIT; @@ -6488,7 +6488,7 @@ status_t AudioFlinger::EffectModule::setEnabled(bool enabled) { Mutex::Autolock _l(mLock); - LOGV("setEnabled %p enabled %d", this, enabled); + ALOGV("setEnabled %p enabled %d", this, enabled); if (enabled != isEnabled()) { status_t status = AudioSystem::setEffectEnabled(mId, enabled); @@ -6770,7 +6770,7 @@ AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect, mEffect(effect), mEffectClient(effectClient), mClient(client), mCblk(NULL), mPriority(priority), mHasControl(false), mEnabled(false) { - LOGV("constructor %p", this); + ALOGV("constructor %p", this); if (client == 0) { return; @@ -6792,14 +6792,14 @@ AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect, AudioFlinger::EffectHandle::~EffectHandle() { - LOGV("Destructor %p", this); + ALOGV("Destructor %p", this); disconnect(false); - LOGV("Destructor DONE %p", this); + ALOGV("Destructor DONE %p", this); } status_t AudioFlinger::EffectHandle::enable() { - LOGV("enable %p", this); + ALOGV("enable %p", this); if (!mHasControl) return INVALID_OPERATION; if (mEffect == 0) return DEAD_OBJECT; @@ -6831,7 +6831,7 @@ status_t AudioFlinger::EffectHandle::enable() status_t AudioFlinger::EffectHandle::disable() { - LOGV("disable %p", this); + ALOGV("disable %p", this); if (!mHasControl) return INVALID_OPERATION; if (mEffect == 0) return DEAD_OBJECT; @@ -6861,7 +6861,7 @@ void AudioFlinger::EffectHandle::disconnect() void AudioFlinger::EffectHandle::disconnect(bool unpiniflast) { - LOGV("disconnect(%s)", unpiniflast ? "true" : "false"); + ALOGV("disconnect(%s)", unpiniflast ? "true" : "false"); if (mEffect == 0) { return; } @@ -6892,7 +6892,7 @@ status_t AudioFlinger::EffectHandle::command(uint32_t cmdCode, uint32_t *replySize, void *pReplyData) { -// LOGV("command(), cmdCode: %d, mHasControl: %d, mEffect: %p", +// ALOGV("command(), cmdCode: %d, mHasControl: %d, mEffect: %p", // cmdCode, mHasControl, (mEffect == 0) ? 0 : mEffect.get()); // only get parameter command is permitted for applications not controlling the effect @@ -6968,7 +6968,7 @@ sp<IMemory> AudioFlinger::EffectHandle::getCblk() const { void AudioFlinger::EffectHandle::setControl(bool hasControl, bool signal, bool enabled) { - LOGV("setControl %p control %d", this, hasControl); + ALOGV("setControl %p control %d", this, hasControl); mHasControl = hasControl; mEnabled = enabled; @@ -7233,7 +7233,7 @@ status_t AudioFlinger::EffectChain::addEffect_l(const sp<EffectModule>& effect) } mEffects.insertAt(effect, idx_insert); - LOGV("addEffect_l() effect %p, added in chain %p at rank %d", effect.get(), this, idx_insert); + ALOGV("addEffect_l() effect %p, added in chain %p at rank %d", effect.get(), this, idx_insert); } effect->configure(); return NO_ERROR; @@ -7265,7 +7265,7 @@ size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect) } } mEffects.removeAt(i); - LOGV("removeEffect_l() effect %p, removed from chain %p at rank %d", effect.get(), this, i); + ALOGV("removeEffect_l() effect %p, removed from chain %p at rank %d", effect.get(), this, i); break; } } @@ -7402,7 +7402,7 @@ void AudioFlinger::EffectChain::setEffectSuspended_l( desc = new SuspendedEffectDesc(); memcpy(&desc->mType, type, sizeof(effect_uuid_t)); mSuspendedEffects.add(type->timeLow, desc); - LOGV("setEffectSuspended_l() add entry for %08x", type->timeLow); + ALOGV("setEffectSuspended_l() add entry for %08x", type->timeLow); } if (desc->mRefCount++ == 0) { sp<EffectModule> effect = getEffectIfEnabled(type); @@ -7422,7 +7422,7 @@ void AudioFlinger::EffectChain::setEffectSuspended_l( desc->mRefCount = 1; } if (--desc->mRefCount == 0) { - LOGV("setEffectSuspended_l() remove entry for %08x", mSuspendedEffects.keyAt(index)); + ALOGV("setEffectSuspended_l() remove entry for %08x", mSuspendedEffects.keyAt(index)); if (desc->mEffect != 0) { sp<EffectModule> effect = desc->mEffect.promote(); if (effect != 0) { @@ -7451,7 +7451,7 @@ void AudioFlinger::EffectChain::setEffectSuspendedAll_l(bool suspend) } else { desc = new SuspendedEffectDesc(); mSuspendedEffects.add((int)kKeyForSuspendAll, desc); - LOGV("setEffectSuspendedAll_l() add entry for 0"); + ALOGV("setEffectSuspendedAll_l() add entry for 0"); } if (desc->mRefCount++ == 0) { Vector< sp<EffectModule> > effects = getSuspendEligibleEffects(); @@ -7479,7 +7479,7 @@ void AudioFlinger::EffectChain::setEffectSuspendedAll_l(bool suspend) for (size_t i = 0; i < types.size(); i++) { setEffectSuspended_l(types[i], false); } - LOGV("setEffectSuspendedAll_l() remove entry for %08x", mSuspendedEffects.keyAt(index)); + ALOGV("setEffectSuspendedAll_l() remove entry for %08x", mSuspendedEffects.keyAt(index)); mSuspendedEffects.removeItem((int)kKeyForSuspendAll); } } @@ -7549,7 +7549,7 @@ void AudioFlinger::EffectChain::checkSuspendOnEffectEnabled(const sp<EffectModul return; } } - LOGV("checkSuspendOnEffectEnabled() enable suspending fx %08x", + ALOGV("checkSuspendOnEffectEnabled() enable suspending fx %08x", effect->desc().type.timeLow); sp<SuspendedEffectDesc> desc = mSuspendedEffects.valueAt(index); // if effect is requested to suspended but was not yet enabled, supend it now. @@ -7562,7 +7562,7 @@ void AudioFlinger::EffectChain::checkSuspendOnEffectEnabled(const sp<EffectModul if (index < 0) { return; } - LOGV("checkSuspendOnEffectEnabled() disable restoring fx %08x", + ALOGV("checkSuspendOnEffectEnabled() disable restoring fx %08x", effect->desc().type.timeLow); sp<SuspendedEffectDesc> desc = mSuspendedEffects.valueAt(index); desc->mEffect.clear(); diff --git a/services/audioflinger/AudioMixer.cpp b/services/audioflinger/AudioMixer.cpp index 6e9319d..7c7fa56 100644 --- a/services/audioflinger/AudioMixer.cpp +++ b/services/audioflinger/AudioMixer.cpp @@ -99,7 +99,7 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate) n++; } if (mask) { - LOGV("add track (%d)", n); + ALOGV("add track (%d)", n); mTrackNames |= mask; return TRACK0 + n; } @@ -118,7 +118,7 @@ AudioMixer::AudioMixer(size_t frameCount, uint32_t sampleRate) { name -= TRACK0; if (uint32_t(name) < MAX_NUM_TRACKS) { - LOGV("deleteTrackName(%d)", name); + ALOGV("deleteTrackName(%d)", name); track_t& track(mState.tracks[ name ]); if (track.enabled != 0) { track.enabled = 0; @@ -143,7 +143,7 @@ status_t AudioMixer::enable(int name) case MIXING: { if (mState.tracks[ mActiveTrack ].enabled != 1) { mState.tracks[ mActiveTrack ].enabled = 1; - LOGV("enable(%d)", mActiveTrack); + ALOGV("enable(%d)", mActiveTrack); invalidateState(1<<mActiveTrack); } } break; @@ -159,7 +159,7 @@ status_t AudioMixer::disable(int name) case MIXING: { if (mState.tracks[ mActiveTrack ].enabled != 0) { mState.tracks[ mActiveTrack ].enabled = 0; - LOGV("disable(%d)", mActiveTrack); + ALOGV("disable(%d)", mActiveTrack); invalidateState(1<<mActiveTrack); } } break; @@ -192,7 +192,7 @@ status_t AudioMixer::setParameter(int target, int name, void *value) if ((channelCount <= MAX_NUM_CHANNELS) && (channelCount)) { mState.tracks[ mActiveTrack ].channelMask = mask; mState.tracks[ mActiveTrack ].channelCount = channelCount; - LOGV("setParameter(TRACK, CHANNEL_MASK, %x)", mask); + ALOGV("setParameter(TRACK, CHANNEL_MASK, %x)", mask); invalidateState(1<<mActiveTrack); return NO_ERROR; } @@ -203,7 +203,7 @@ status_t AudioMixer::setParameter(int target, int name, void *value) if (name == MAIN_BUFFER) { if (mState.tracks[ mActiveTrack ].mainBuffer != valueBuf) { mState.tracks[ mActiveTrack ].mainBuffer = valueBuf; - LOGV("setParameter(TRACK, MAIN_BUFFER, %p)", valueBuf); + ALOGV("setParameter(TRACK, MAIN_BUFFER, %p)", valueBuf); invalidateState(1<<mActiveTrack); } return NO_ERROR; @@ -211,7 +211,7 @@ status_t AudioMixer::setParameter(int target, int name, void *value) if (name == AUX_BUFFER) { if (mState.tracks[ mActiveTrack ].auxBuffer != valueBuf) { mState.tracks[ mActiveTrack ].auxBuffer = valueBuf; - LOGV("setParameter(TRACK, AUX_BUFFER, %p)", valueBuf); + ALOGV("setParameter(TRACK, AUX_BUFFER, %p)", valueBuf); invalidateState(1<<mActiveTrack); } return NO_ERROR; @@ -223,7 +223,7 @@ status_t AudioMixer::setParameter(int target, int name, void *value) if (valueInt > 0) { track_t& track = mState.tracks[ mActiveTrack ]; if (track.setResampler(uint32_t(valueInt), mSampleRate)) { - LOGV("setParameter(RESAMPLE, SAMPLE_RATE, %u)", + ALOGV("setParameter(RESAMPLE, SAMPLE_RATE, %u)", uint32_t(valueInt)); invalidateState(1<<mActiveTrack); } @@ -242,7 +242,7 @@ status_t AudioMixer::setParameter(int target, int name, void *value) if ((uint32_t(name-VOLUME0) < MAX_NUM_CHANNELS)) { track_t& track = mState.tracks[ mActiveTrack ]; if (track.volume[name-VOLUME0] != valueInt) { - LOGV("setParameter(VOLUME, VOLUME0/1: %04x)", valueInt); + ALOGV("setParameter(VOLUME, VOLUME0/1: %04x)", valueInt); track.prevVolume[name-VOLUME0] = track.volume[name-VOLUME0] << 16; track.volume[name-VOLUME0] = valueInt; if (target == VOLUME) { @@ -262,7 +262,7 @@ status_t AudioMixer::setParameter(int target, int name, void *value) } else if (name == AUXLEVEL) { track_t& track = mState.tracks[ mActiveTrack ]; if (track.auxLevel != valueInt) { - LOGV("setParameter(VOLUME, AUXLEVEL: %04x)", valueInt); + ALOGV("setParameter(VOLUME, AUXLEVEL: %04x)", valueInt); track.prevAuxLevel = track.auxLevel << 16; track.auxLevel = valueInt; if (target == VOLUME) { @@ -445,7 +445,7 @@ void AudioMixer::process__validate(state_t* state) } } - LOGV("mixer configuration change: %d activeTracks (%08x) " + ALOGV("mixer configuration change: %d activeTracks (%08x) " "all16BitsStereoNoResample=%d, resampling=%d, volumeRamp=%d", countActiveTracks, state->enabledTracks, all16BitsStereoNoResample, resampling, volumeRamp); diff --git a/services/audioflinger/AudioPolicyService.cpp b/services/audioflinger/AudioPolicyService.cpp index 8da5ca1..840d70d 100644 --- a/services/audioflinger/AudioPolicyService.cpp +++ b/services/audioflinger/AudioPolicyService.cpp @@ -169,7 +169,7 @@ status_t AudioPolicyService::setDeviceConnectionState(audio_devices_t device, return BAD_VALUE; } - LOGV("setDeviceConnectionState() tid %d", gettid()); + ALOGV("setDeviceConnectionState() tid %d", gettid()); Mutex::Autolock _l(mLock); return mpAudioPolicy->set_device_connection_state(mpAudioPolicy, device, state, device_address); @@ -198,7 +198,7 @@ status_t AudioPolicyService::setPhoneState(int state) return BAD_VALUE; } - LOGV("setPhoneState() tid %d", gettid()); + ALOGV("setPhoneState() tid %d", gettid()); // TODO: check if it is more appropriate to do it in platform specific policy manager AudioSystem::setMode(state); @@ -236,7 +236,7 @@ status_t AudioPolicyService::setForceUse(audio_policy_force_use_t usage, if (config < 0 || config >= AUDIO_POLICY_FORCE_CFG_CNT) { return BAD_VALUE; } - LOGV("setForceUse() tid %d", gettid()); + ALOGV("setForceUse() tid %d", gettid()); Mutex::Autolock _l(mLock); mpAudioPolicy->set_force_use(mpAudioPolicy, usage, config); return NO_ERROR; @@ -262,7 +262,7 @@ audio_io_handle_t AudioPolicyService::getOutput(audio_stream_type_t stream, if (mpAudioPolicy == NULL) { return 0; } - LOGV("getOutput() tid %d", gettid()); + ALOGV("getOutput() tid %d", gettid()); Mutex::Autolock _l(mLock); return mpAudioPolicy->get_output(mpAudioPolicy, stream, samplingRate, format, channels, flags); } @@ -274,7 +274,7 @@ status_t AudioPolicyService::startOutput(audio_io_handle_t output, if (mpAudioPolicy == NULL) { return NO_INIT; } - LOGV("startOutput() tid %d", gettid()); + ALOGV("startOutput() tid %d", gettid()); Mutex::Autolock _l(mLock); return mpAudioPolicy->start_output(mpAudioPolicy, output, stream, session); } @@ -286,7 +286,7 @@ status_t AudioPolicyService::stopOutput(audio_io_handle_t output, if (mpAudioPolicy == NULL) { return NO_INIT; } - LOGV("stopOutput() tid %d", gettid()); + ALOGV("stopOutput() tid %d", gettid()); Mutex::Autolock _l(mLock); return mpAudioPolicy->stop_output(mpAudioPolicy, output, stream, session); } @@ -296,7 +296,7 @@ void AudioPolicyService::releaseOutput(audio_io_handle_t output) if (mpAudioPolicy == NULL) { return; } - LOGV("releaseOutput() tid %d", gettid()); + ALOGV("releaseOutput() tid %d", gettid()); Mutex::Autolock _l(mLock); mpAudioPolicy->release_output(mpAudioPolicy, output); } @@ -672,7 +672,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() case START_TONE: { mLock.unlock(); ToneData *data = (ToneData *)command->mParam; - LOGV("AudioCommandThread() processing start tone %d on stream %d", + ALOGV("AudioCommandThread() processing start tone %d on stream %d", data->mType, data->mStream); if (mpToneGenerator != NULL) delete mpToneGenerator; @@ -683,7 +683,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() }break; case STOP_TONE: { mLock.unlock(); - LOGV("AudioCommandThread() processing stop tone"); + ALOGV("AudioCommandThread() processing stop tone"); if (mpToneGenerator != NULL) { mpToneGenerator->stopTone(); delete mpToneGenerator; @@ -693,7 +693,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() }break; case SET_VOLUME: { VolumeData *data = (VolumeData *)command->mParam; - LOGV("AudioCommandThread() processing set volume stream %d, \ + ALOGV("AudioCommandThread() processing set volume stream %d, \ volume %f, output %d", data->mStream, data->mVolume, data->mIO); command->mStatus = AudioSystem::setStreamVolume(data->mStream, data->mVolume, @@ -706,7 +706,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() }break; case SET_PARAMETERS: { ParametersData *data = (ParametersData *)command->mParam; - LOGV("AudioCommandThread() processing set parameters string %s, io %d", + ALOGV("AudioCommandThread() processing set parameters string %s, io %d", data->mKeyValuePairs.string(), data->mIO); command->mStatus = AudioSystem::setParameters(data->mIO, data->mKeyValuePairs); if (command->mWaitStatus) { @@ -717,7 +717,7 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() }break; case SET_VOICE_VOLUME: { VoiceVolumeData *data = (VoiceVolumeData *)command->mParam; - LOGV("AudioCommandThread() processing set voice volume volume %f", + ALOGV("AudioCommandThread() processing set voice volume volume %f", data->mVolume); command->mStatus = AudioSystem::setVoiceVolume(data->mVolume); if (command->mWaitStatus) { @@ -740,9 +740,9 @@ bool AudioPolicyService::AudioCommandThread::threadLoop() if (mName != "" && mAudioCommands.isEmpty()) { release_wake_lock(mName.string()); } - LOGV("AudioCommandThread() going to sleep"); + ALOGV("AudioCommandThread() going to sleep"); mWaitWorkCV.waitRelative(mLock, waitTime); - LOGV("AudioCommandThread() waking up"); + ALOGV("AudioCommandThread() waking up"); } mLock.unlock(); return false; @@ -793,7 +793,7 @@ void AudioPolicyService::AudioCommandThread::startToneCommand(int type, int stre command->mWaitStatus = false; Mutex::Autolock _l(mLock); insertCommand_l(command); - LOGV("AudioCommandThread() adding tone start type %d, stream %d", type, stream); + ALOGV("AudioCommandThread() adding tone start type %d, stream %d", type, stream); mWaitWorkCV.signal(); } @@ -805,7 +805,7 @@ void AudioPolicyService::AudioCommandThread::stopToneCommand() command->mWaitStatus = false; Mutex::Autolock _l(mLock); insertCommand_l(command); - LOGV("AudioCommandThread() adding tone stop"); + ALOGV("AudioCommandThread() adding tone stop"); mWaitWorkCV.signal(); } @@ -830,7 +830,7 @@ status_t AudioPolicyService::AudioCommandThread::volumeCommand(int stream, } Mutex::Autolock _l(mLock); insertCommand_l(command, delayMs); - LOGV("AudioCommandThread() adding set volume stream %d, volume %f, output %d", + ALOGV("AudioCommandThread() adding set volume stream %d, volume %f, output %d", stream, volume, output); mWaitWorkCV.signal(); if (command->mWaitStatus) { @@ -860,7 +860,7 @@ status_t AudioPolicyService::AudioCommandThread::parametersCommand(int ioHandle, } Mutex::Autolock _l(mLock); insertCommand_l(command, delayMs); - LOGV("AudioCommandThread() adding set parameter string %s, io %d ,delay %d", + ALOGV("AudioCommandThread() adding set parameter string %s, io %d ,delay %d", keyValuePairs, ioHandle, delayMs); mWaitWorkCV.signal(); if (command->mWaitStatus) { @@ -887,7 +887,7 @@ status_t AudioPolicyService::AudioCommandThread::voiceVolumeCommand(float volume } Mutex::Autolock _l(mLock); insertCommand_l(command, delayMs); - LOGV("AudioCommandThread() adding set voice volume volume %f", volume); + ALOGV("AudioCommandThread() adding set voice volume volume %f", volume); mWaitWorkCV.signal(); if (command->mWaitStatus) { command->mCond.wait(mLock); @@ -922,7 +922,7 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma ParametersData *data = (ParametersData *)command->mParam; ParametersData *data2 = (ParametersData *)command2->mParam; if (data->mIO != data2->mIO) break; - LOGV("Comparing parameter command %s to new command %s", + ALOGV("Comparing parameter command %s to new command %s", data2->mKeyValuePairs.string(), data->mKeyValuePairs.string()); AudioParameter param = AudioParameter(data->mKeyValuePairs); AudioParameter param2 = AudioParameter(data2->mKeyValuePairs); @@ -936,7 +936,7 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma param2.getAt(k, key2, value2); if (key2 == key) { param2.remove(key2); - LOGV("Filtering out parameter %s", key2.string()); + ALOGV("Filtering out parameter %s", key2.string()); break; } } @@ -955,7 +955,7 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma VolumeData *data2 = (VolumeData *)command2->mParam; if (data->mIO != data2->mIO) break; if (data->mStream != data2->mStream) break; - LOGV("Filtering out volume command on output %d for stream %d", + ALOGV("Filtering out volume command on output %d for stream %d", data->mIO, data->mStream); removedCommands.add(command2); } break; @@ -971,7 +971,7 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma // removed commands always have time stamps greater than current command for (size_t k = i + 1; k < mAudioCommands.size(); k++) { if (mAudioCommands[k] == removedCommands[j]) { - LOGV("suppressing command: %d", mAudioCommands[k]->mCommand); + ALOGV("suppressing command: %d", mAudioCommands[k]->mCommand); mAudioCommands.removeAt(k); break; } @@ -980,14 +980,14 @@ void AudioPolicyService::AudioCommandThread::insertCommand_l(AudioCommand *comma removedCommands.clear(); // insert command at the right place according to its time stamp - LOGV("inserting command: %d at index %d, num commands %d", + ALOGV("inserting command: %d at index %d, num commands %d", command->mCommand, (int)i+1, mAudioCommands.size()); mAudioCommands.insertAt(command, i + 1); } void AudioPolicyService::AudioCommandThread::exit() { - LOGV("AudioCommandThread::exit"); + ALOGV("AudioCommandThread::exit"); { AutoMutex _l(mLock); requestExit(); @@ -1069,7 +1069,7 @@ audio_source_t AudioPolicyService::inputSourceNameToEnum(const char *name) int i; for (i = AUDIO_SOURCE_MIC; i < AUDIO_SOURCE_CNT; i++) { if (strcmp(name, kInputSourceNames[i - AUDIO_SOURCE_MIC]) == 0) { - LOGV("inputSourceNameToEnum found source %s %d", name, i); + ALOGV("inputSourceNameToEnum found source %s %d", name, i); break; } } @@ -1102,17 +1102,17 @@ size_t AudioPolicyService::readParamValue(cnode *node, if (strncmp(node->name, SHORT_TAG, sizeof(SHORT_TAG) + 1) == 0) { size_t pos = growParamSize(param, sizeof(short), curSize, totSize); *(short *)((char *)param + pos) = (short)atoi(node->value); - LOGV("readParamValue() reading short %d", *(short *)((char *)param + pos)); + ALOGV("readParamValue() reading short %d", *(short *)((char *)param + pos)); return sizeof(short); } else if (strncmp(node->name, INT_TAG, sizeof(INT_TAG) + 1) == 0) { size_t pos = growParamSize(param, sizeof(int), curSize, totSize); *(int *)((char *)param + pos) = atoi(node->value); - LOGV("readParamValue() reading int %d", *(int *)((char *)param + pos)); + ALOGV("readParamValue() reading int %d", *(int *)((char *)param + pos)); return sizeof(int); } else if (strncmp(node->name, FLOAT_TAG, sizeof(FLOAT_TAG) + 1) == 0) { size_t pos = growParamSize(param, sizeof(float), curSize, totSize); *(float *)((char *)param + pos) = (float)atof(node->value); - LOGV("readParamValue() reading float %f",*(float *)((char *)param + pos)); + ALOGV("readParamValue() reading float %f",*(float *)((char *)param + pos)); return sizeof(float); } else if (strncmp(node->name, BOOL_TAG, sizeof(BOOL_TAG) + 1) == 0) { size_t pos = growParamSize(param, sizeof(bool), curSize, totSize); @@ -1121,7 +1121,7 @@ size_t AudioPolicyService::readParamValue(cnode *node, } else { *(bool *)((char *)param + pos) = true; } - LOGV("readParamValue() reading bool %s",*(bool *)((char *)param + pos) ? "true" : "false"); + ALOGV("readParamValue() reading bool %s",*(bool *)((char *)param + pos) ? "true" : "false"); return sizeof(bool); } else if (strncmp(node->name, STRING_TAG, sizeof(STRING_TAG) + 1) == 0) { size_t len = strnlen(node->value, EFFECT_STRING_LEN_MAX); @@ -1132,7 +1132,7 @@ size_t AudioPolicyService::readParamValue(cnode *node, strncpy(param + *curSize, node->value, len); *curSize += len; param[*curSize] = '\0'; - LOGV("readParamValue() reading string %s", param + *curSize - len); + ALOGV("readParamValue() reading string %s", param + *curSize - len); return len; } LOGW("readParamValue() unknown param type %s", node->name); @@ -1172,7 +1172,7 @@ effect_param_t *AudioPolicyService::loadEffectParameter(cnode *root) fx_param->psize = 0; param = param->first_child; while (param) { - LOGV("loadEffectParameter() reading param of type %s", param->name); + ALOGV("loadEffectParameter() reading param of type %s", param->name); size_t size = readParamValue(param, (char *)fx_param, &curSize, &totSize); if (size == 0) { goto error; @@ -1187,7 +1187,7 @@ effect_param_t *AudioPolicyService::loadEffectParameter(cnode *root) fx_param->vsize = 0; value = value->first_child; while (value) { - LOGV("loadEffectParameter() reading value of type %s", value->name); + ALOGV("loadEffectParameter() reading value of type %s", value->name); size_t size = readParamValue(value, (char *)fx_param, &curSize, &totSize); if (size == 0) { goto error; @@ -1207,7 +1207,7 @@ void AudioPolicyService::loadEffectParameters(cnode *root, Vector <effect_param_ { cnode *node = root->first_child; while (node) { - LOGV("loadEffectParameters() loading param %s", node->name); + ALOGV("loadEffectParameters() loading param %s", node->name); effect_param_t *param = loadEffectParameter(node); if (param == NULL) { node = node->next; @@ -1232,18 +1232,18 @@ AudioPolicyService::InputSourceDesc *AudioPolicyService::loadInputSource( size_t i; for (i = 0; i < effects.size(); i++) { if (strncmp(effects[i]->mName, node->name, EFFECT_STRING_LEN_MAX) == 0) { - LOGV("loadInputSource() found effect %s in list", node->name); + ALOGV("loadInputSource() found effect %s in list", node->name); break; } } if (i == effects.size()) { - LOGV("loadInputSource() effect %s not in list", node->name); + ALOGV("loadInputSource() effect %s not in list", node->name); node = node->next; continue; } EffectDesc *effect = new EffectDesc(*effects[i]); loadEffectParameters(node, effect->mParams); - LOGV("loadInputSource() adding effect %s uuid %08x", effect->mName, effect->mUuid.timeLow); + ALOGV("loadInputSource() adding effect %s uuid %08x", effect->mName, effect->mUuid.timeLow); source->mEffects.add(effect); node = node->next; } @@ -1269,7 +1269,7 @@ status_t AudioPolicyService::loadInputSources(cnode *root, const Vector <EffectD node = node->next; continue; } - LOGV("loadInputSources() loading input source %s", node->name); + ALOGV("loadInputSources() loading input source %s", node->name); InputSourceDesc *desc = loadInputSource(node, effects); if (desc == NULL) { node = node->next; @@ -1307,7 +1307,7 @@ status_t AudioPolicyService::loadEffects(cnode *root, Vector <EffectDesc *>& eff } node = node->first_child; while (node) { - LOGV("loadEffects() loading effect %s", node->name); + ALOGV("loadEffects() loading effect %s", node->name); EffectDesc *effect = loadEffect(node); if (effect == NULL) { node = node->next; diff --git a/services/audioflinger/AudioResampler.cpp b/services/audioflinger/AudioResampler.cpp index 9ee5a30..906794b 100644 --- a/services/audioflinger/AudioResampler.cpp +++ b/services/audioflinger/AudioResampler.cpp @@ -33,7 +33,7 @@ namespace android { #ifdef __ARM_HAVE_HALFWORD_MULTIPLY // optimized asm option - #define ASM_ARM_RESAMP1 // enable asm optimisation for ResamplerOrder1 + //#define ASM_ARM_RESAMP1 // enable asm optimisation for ResamplerOrder1 #endif // __ARM_HAVE_HALFWORD_MULTIPLY // ---------------------------------------------------------------------------- @@ -96,15 +96,15 @@ AudioResampler* AudioResampler::create(int bitDepth, int inChannelCount, switch (quality) { default: case LOW_QUALITY: - LOGV("Create linear Resampler"); + ALOGV("Create linear Resampler"); resampler = new AudioResamplerOrder1(bitDepth, inChannelCount, sampleRate); break; case MED_QUALITY: - LOGV("Create cubic Resampler"); + ALOGV("Create cubic Resampler"); resampler = new AudioResamplerCubic(bitDepth, inChannelCount, sampleRate); break; case HIGH_QUALITY: - LOGV("Create sinc Resampler"); + ALOGV("Create sinc Resampler"); resampler = new AudioResamplerSinc(bitDepth, inChannelCount, sampleRate); break; } diff --git a/services/camera/libcameraservice/CameraHardwareInterface.h b/services/camera/libcameraservice/CameraHardwareInterface.h index c3ced4c..658e25e 100644 --- a/services/camera/libcameraservice/CameraHardwareInterface.h +++ b/services/camera/libcameraservice/CameraHardwareInterface.h @@ -112,12 +112,12 @@ public: /** Set the ANativeWindow to which preview frames are sent */ status_t setPreviewWindow(const sp<ANativeWindow>& buf) { - LOGV("%s(%s) buf %p", __FUNCTION__, mName.string(), buf.get()); + ALOGV("%s(%s) buf %p", __FUNCTION__, mName.string(), buf.get()); if (mDevice->ops->set_preview_window) { mPreviewWindow = buf; mHalPreviewWindow.user = this; - LOGV("%s &mHalPreviewWindow %p mHalPreviewWindow.user %p", __FUNCTION__, + ALOGV("%s &mHalPreviewWindow %p mHalPreviewWindow.user %p", __FUNCTION__, &mHalPreviewWindow, mHalPreviewWindow.user); return mDevice->ops->set_preview_window(mDevice, buf.get() ? &mHalPreviewWindow.nw : 0); @@ -136,7 +136,7 @@ public: mDataCbTimestamp = data_cb_timestamp; mCbUser = user; - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->set_callbacks) { mDevice->ops->set_callbacks(mDevice, @@ -159,7 +159,7 @@ public: */ void enableMsgType(int32_t msgType) { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->enable_msg_type) mDevice->ops->enable_msg_type(mDevice, msgType); } @@ -176,7 +176,7 @@ public: */ void disableMsgType(int32_t msgType) { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->disable_msg_type) mDevice->ops->disable_msg_type(mDevice, msgType); } @@ -188,7 +188,7 @@ public: */ int msgTypeEnabled(int32_t msgType) { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->msg_type_enabled) return mDevice->ops->msg_type_enabled(mDevice, msgType); return false; @@ -199,7 +199,7 @@ public: */ status_t startPreview() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->start_preview) return mDevice->ops->start_preview(mDevice); return INVALID_OPERATION; @@ -210,7 +210,7 @@ public: */ void stopPreview() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->stop_preview) mDevice->ops->stop_preview(mDevice); } @@ -220,7 +220,7 @@ public: */ int previewEnabled() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->preview_enabled) return mDevice->ops->preview_enabled(mDevice); return false; @@ -260,7 +260,7 @@ public: status_t storeMetaDataInBuffers(int enable) { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->store_meta_data_in_buffers) return mDevice->ops->store_meta_data_in_buffers(mDevice, enable); return enable ? INVALID_OPERATION: OK; @@ -277,7 +277,7 @@ public: */ status_t startRecording() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->start_recording) return mDevice->ops->start_recording(mDevice); return INVALID_OPERATION; @@ -288,7 +288,7 @@ public: */ void stopRecording() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->stop_recording) mDevice->ops->stop_recording(mDevice); } @@ -298,7 +298,7 @@ public: */ int recordingEnabled() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->recording_enabled) return mDevice->ops->recording_enabled(mDevice); return false; @@ -316,7 +316,7 @@ public: */ void releaseRecordingFrame(const sp<IMemory>& mem) { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->release_recording_frame) { ssize_t offset; size_t size; @@ -333,7 +333,7 @@ public: */ status_t autoFocus() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->auto_focus) return mDevice->ops->auto_focus(mDevice); return INVALID_OPERATION; @@ -347,7 +347,7 @@ public: */ status_t cancelAutoFocus() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->cancel_auto_focus) return mDevice->ops->cancel_auto_focus(mDevice); return INVALID_OPERATION; @@ -358,7 +358,7 @@ public: */ status_t takePicture() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->take_picture) return mDevice->ops->take_picture(mDevice); return INVALID_OPERATION; @@ -370,7 +370,7 @@ public: */ status_t cancelPicture() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->cancel_picture) return mDevice->ops->cancel_picture(mDevice); return INVALID_OPERATION; @@ -381,7 +381,7 @@ public: * invalid or not supported. */ status_t setParameters(const CameraParameters ¶ms) { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->set_parameters) return mDevice->ops->set_parameters(mDevice, params.flatten().string()); @@ -391,7 +391,7 @@ public: /** Return the camera parameters. */ CameraParameters getParameters() const { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); CameraParameters parms; if (mDevice->ops->get_parameters) { char *temp = mDevice->ops->get_parameters(mDevice); @@ -410,7 +410,7 @@ public: */ status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->send_command) return mDevice->ops->send_command(mDevice, cmd, arg1, arg2); return INVALID_OPERATION; @@ -421,7 +421,7 @@ public: * *not* done in the destructor. */ void release() { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->release) mDevice->ops->release(mDevice); } @@ -431,7 +431,7 @@ public: */ status_t dump(int fd, const Vector<String16>& args) const { - LOGV("%s(%s)", __FUNCTION__, mName.string()); + ALOGV("%s(%s)", __FUNCTION__, mName.string()); if (mDevice->ops->dump) return mDevice->ops->dump(mDevice, fd); return OK; // It's fine if the HAL doesn't implement dump() @@ -444,7 +444,7 @@ private: static void __notify_cb(int32_t msg_type, int32_t ext1, int32_t ext2, void *user) { - LOGV("%s", __FUNCTION__); + ALOGV("%s", __FUNCTION__); CameraHardwareInterface *__this = static_cast<CameraHardwareInterface *>(user); __this->mNotifyCb(msg_type, ext1, ext2, __this->mCbUser); @@ -455,7 +455,7 @@ private: camera_frame_metadata_t *metadata, void *user) { - LOGV("%s", __FUNCTION__); + ALOGV("%s", __FUNCTION__); CameraHardwareInterface *__this = static_cast<CameraHardwareInterface *>(user); sp<CameraHeapMemory> mem(static_cast<CameraHeapMemory *>(data->handle)); @@ -471,7 +471,7 @@ private: const camera_memory_t *data, unsigned index, void *user) { - LOGV("%s", __FUNCTION__); + ALOGV("%s", __FUNCTION__); CameraHardwareInterface *__this = static_cast<CameraHardwareInterface *>(user); // Start refcounting the heap object from here on. When the clients diff --git a/services/camera/libcameraservice/CameraHardwareStub.cpp b/services/camera/libcameraservice/CameraHardwareStub.cpp index 863f19e..8558fdd 100644 --- a/services/camera/libcameraservice/CameraHardwareStub.cpp +++ b/services/camera/libcameraservice/CameraHardwareStub.cpp @@ -176,7 +176,7 @@ int CameraHardwareStub::previewThread() uint8_t *frame = ((uint8_t *)base) + offset; fakeCamera->getNextFrameAsYuv420(frame); - //LOGV("previewThread: generated frame to buffer %d", mCurrentPreviewFrame); + //ALOGV("previewThread: generated frame to buffer %d", mCurrentPreviewFrame); // Notify the client of a new frame. if (mMsgEnabled & CAMERA_MSG_PREVIEW_FRAME) |