Loading services/audioflinger/AudioFlinger.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -1302,7 +1302,7 @@ void AudioFlinger::removeNotificationClient(pid_t pid) bool removed = false; for (size_t i = 0; i< num; ) { AudioSessionRef *ref = mAudioSessionRefs.itemAt(i); ALOGV(" pid %d @ %d", ref->mPid, i); ALOGV(" pid %d @ %zu", ref->mPid, i); if (ref->mPid == pid) { ALOGV(" removing entry for pid %d session %d", pid, ref->mSessionid); mAudioSessionRefs.removeAt(i); Loading Loading @@ -1563,7 +1563,7 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name) int rc = load_audio_interface(name, &dev); if (rc) { ALOGI("loadHwModule() error %d loading module %s ", rc, name); ALOGE("loadHwModule() error %d loading module %s", rc, name); return 0; } Loading @@ -1571,7 +1571,7 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name) rc = dev->init_check(dev); mHardwareStatus = AUDIO_HW_IDLE; if (rc) { ALOGI("loadHwModule() init check error %d for module %s ", rc, name); ALOGE("loadHwModule() init check error %d for module %s", rc, name); return 0; } Loading Loading @@ -2857,7 +2857,7 @@ status_t AudioFlinger::putOrphanEffectChain_l(const sp<AudioFlinger::EffectChain { audio_session_t session = chain->sessionId(); ssize_t index = mOrphanEffectChains.indexOfKey(session); ALOGV("putOrphanEffectChain_l session %d index %d", session, index); ALOGV("putOrphanEffectChain_l session %d index %zd", session, index); if (index >= 0) { ALOGW("putOrphanEffectChain_l chain for session %d already present", session); return ALREADY_EXISTS; Loading @@ -2870,7 +2870,7 @@ sp<AudioFlinger::EffectChain> AudioFlinger::getOrphanEffectChain_l(audio_session { sp<EffectChain> chain; ssize_t index = mOrphanEffectChains.indexOfKey(session); ALOGV("getOrphanEffectChain_l session %d index %d", session, index); ALOGV("getOrphanEffectChain_l session %d index %zd", session, index); if (index >= 0) { chain = mOrphanEffectChains.valueAt(index); mOrphanEffectChains.removeItemsAt(index); Loading @@ -2883,11 +2883,11 @@ bool AudioFlinger::updateOrphanEffectChains(const sp<AudioFlinger::EffectModule> Mutex::Autolock _l(mLock); audio_session_t session = effect->sessionId(); ssize_t index = mOrphanEffectChains.indexOfKey(session); ALOGV("updateOrphanEffectChains session %d index %d", session, index); ALOGV("updateOrphanEffectChains session %d index %zd", session, index); if (index >= 0) { sp<EffectChain> chain = mOrphanEffectChains.valueAt(index); if (chain->removeEffect_l(effect) == 0) { ALOGV("updateOrphanEffectChains removing effect chain at index %d", index); ALOGV("updateOrphanEffectChains removing effect chain at index %zd", index); mOrphanEffectChains.removeItemsAt(index); } return true; Loading services/audioflinger/Effects.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ status_t AudioFlinger::EffectModule::addHandle(EffectHandle *handle) } else { status = ALREADY_EXISTS; } ALOGV("addHandle() %p added handle %p in position %d", this, handle, i); ALOGV("addHandle() %p added handle %p in position %zu", this, handle, i); mHandles.insertAt(handle, i); return status; } Loading @@ -156,7 +156,7 @@ size_t AudioFlinger::EffectModule::removeHandle(EffectHandle *handle) if (i == size) { return size; } ALOGV("removeHandle() %p removed handle %p in position %d", this, handle, i); ALOGV("removeHandle() %p removed handle %p in position %zu", this, handle, i); mHandles.removeAt(i); // if removed from first place, move effect control from this handle to next in line Loading Loading @@ -380,7 +380,7 @@ status_t AudioFlinger::EffectModule::configure() mConfig.inputCfg.buffer.frameCount = thread->frameCount(); mConfig.outputCfg.buffer.frameCount = mConfig.inputCfg.buffer.frameCount; ALOGV("configure() %p thread %p buffer %p framecount %d", ALOGV("configure() %p thread %p buffer %p framecount %zu", this, thread.get(), mConfig.inputCfg.buffer.raw, mConfig.inputCfg.buffer.frameCount); status_t cmdStatus; Loading Loading @@ -1050,7 +1050,7 @@ AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect, mCblkMemory = client->heap()->allocate(EFFECT_PARAM_BUFFER_SIZE + bufOffset); if (mCblkMemory == 0 || (mCblk = static_cast<effect_param_cblk_t *>(mCblkMemory->pointer())) == NULL) { ALOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + ALOGE("not enough memory for Effect size=%zu", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t)); mCblkMemory.clear(); return; Loading Loading @@ -1579,7 +1579,7 @@ status_t AudioFlinger::EffectChain::addEffect_l(const sp<EffectModule>& effect) } mEffects.insertAt(effect, idx_insert); ALOGV("addEffect_l() effect %p, added in chain %p at rank %d", effect.get(), this, ALOGV("addEffect_l() effect %p, added in chain %p at rank %zu", effect.get(), this, idx_insert); } effect->configure(); Loading Loading @@ -1611,7 +1611,7 @@ size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect) } } mEffects.removeAt(i); ALOGV("removeEffect_l() effect %p, removed from chain %p at rank %d", effect.get(), ALOGV("removeEffect_l() effect %p, removed from chain %p at rank %zu", effect.get(), this, i); break; } Loading Loading @@ -1726,7 +1726,7 @@ void AudioFlinger::EffectChain::dump(int fd, const Vector<String16>& args) String8 result; size_t numEffects = mEffects.size(); snprintf(buffer, SIZE, " %d effects for session %d\n", numEffects, mSessionId); snprintf(buffer, SIZE, " %zu effects for session %d\n", numEffects, mSessionId); result.append(buffer); if (numEffects) { Loading services/audioflinger/FastMixer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -433,7 +433,8 @@ void FastMixer::onWork() } if (mMasterMono.load()) { // memory_order_seq_cst mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount, true /*limit*/); mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount, true /*limit*/); } // prepare the buffer used to write to sink void *buffer = mSinkBuffer != NULL ? mSinkBuffer : mMixerBuffer; Loading services/audioflinger/PatchPanel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -401,7 +401,7 @@ status_t AudioFlinger::PatchPanel::createPatchConnections(Patch *patch, shift = playbackShift; } size_t frameCount = (playbackFrameCount * recordFramecount) >> shift; ALOGV("createPatchConnections() playframeCount %d recordFramecount %d frameCount %d ", ALOGV("createPatchConnections() playframeCount %zu recordFramecount %zu frameCount %zu", playbackFrameCount, recordFramecount, frameCount); // create a special record track to capture from record thread Loading services/audioflinger/Threads.cpp +24 −23 Original line number Diff line number Diff line Loading @@ -725,7 +725,7 @@ status_t AudioFlinger::ThreadBase::sendConfigEvent_l(sp<ConfigEvent>& event) return status; } mConfigEvents.add(event); ALOGV("sendConfigEvent_l() num events %d event %d", mConfigEvents.size(), event->mType); ALOGV("sendConfigEvent_l() num events %zu event %d", mConfigEvents.size(), event->mType); mWaitWorkCV.signal(); mLock.unlock(); { Loading Loading @@ -817,7 +817,7 @@ void AudioFlinger::ThreadBase::processConfigEvents_l() bool configChanged = false; while (!mConfigEvents.isEmpty()) { ALOGV("processConfigEvents_l() remaining events %d", mConfigEvents.size()); ALOGV("processConfigEvents_l() remaining events %zu", mConfigEvents.size()); sp<ConfigEvent> event = mConfigEvents[0]; mConfigEvents.removeAt(0); switch (event->mType) { Loading Loading @@ -949,7 +949,7 @@ void AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args __u dprintf(fd, " Sample rate: %u Hz\n", mSampleRate); dprintf(fd, " HAL frame count: %zu\n", mFrameCount); dprintf(fd, " HAL format: 0x%x (%s)\n", mHALFormat, formatToString(mHALFormat)); dprintf(fd, " HAL buffer size: %u bytes\n", mBufferSize); dprintf(fd, " HAL buffer size: %zu bytes\n", mBufferSize); dprintf(fd, " Channel count: %u\n", mChannelCount); dprintf(fd, " Channel mask: 0x%08x (%s)\n", mChannelMask, channelMaskToString(mChannelMask, mType != RECORD).string()); Loading Loading @@ -1685,10 +1685,10 @@ void AudioFlinger::PlaybackThread::dumpTracks(int fd, const Vector<String16>& ar size_t numtracks = mTracks.size(); size_t numactive = mActiveTracks.size(); dprintf(fd, " %d Tracks", numtracks); dprintf(fd, " %zu Tracks", numtracks); size_t numactiveseen = 0; if (numtracks) { dprintf(fd, " of which %d are active\n", numactive); dprintf(fd, " of which %zu are active\n", numactive); Track::appendDumpHeader(result); for (size_t i = 0; i < numtracks; ++i) { sp<Track> track = mTracks[i]; Loading Loading @@ -1729,7 +1729,8 @@ void AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& dumpBase(fd, args); dprintf(fd, " Normal frame count: %zu\n", mNormalFrameCount); dprintf(fd, " Last write occurred (msecs): %llu\n", ns2ms(systemTime() - mLastWriteTime)); dprintf(fd, " Last write occurred (msecs): %llu\n", (unsigned long long) ns2ms(systemTime() - mLastWriteTime)); dprintf(fd, " Total writes: %d\n", mNumWrites); dprintf(fd, " Delayed writes: %d\n", mNumDelayedWrites); dprintf(fd, " Blocked in write: %s\n", mInWrite ? "yes" : "no"); Loading Loading @@ -1823,11 +1824,11 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac } frameCount = mFrameCount * sFastTrackMultiplier; } ALOGV("AUDIO_OUTPUT_FLAG_FAST accepted: frameCount=%d mFrameCount=%d", ALOGV("AUDIO_OUTPUT_FLAG_FAST accepted: frameCount=%zu mFrameCount=%zu", frameCount, mFrameCount); } else { ALOGV("AUDIO_OUTPUT_FLAG_FAST denied: sharedBuffer=%p frameCount=%d " "mFrameCount=%d format=%#x mFormat=%#x isLinear=%d channelMask=%#x " ALOGV("AUDIO_OUTPUT_FLAG_FAST denied: sharedBuffer=%p frameCount=%zu " "mFrameCount=%zu format=%#x mFormat=%#x isLinear=%d channelMask=%#x " "sampleRate=%u mSampleRate=%u " "hasFastMixer=%d tid=%d fastTrackAvailMask=%#x", sharedBuffer.get(), frameCount, mFrameCount, format, mFormat, Loading Loading @@ -2259,7 +2260,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() mBufferSize = mOutput->stream->common.get_buffer_size(&mOutput->stream->common); mFrameCount = mBufferSize / mFrameSize; if (mFrameCount & 15) { ALOGW("HAL output buffer size is %u frames but AudioMixer requires multiples of 16 frames", ALOGW("HAL output buffer size is %zu frames but AudioMixer requires multiples of 16 frames", mFrameCount); } Loading Loading @@ -2345,7 +2346,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() if (mType == MIXER || mType == DUPLICATING) { mNormalFrameCount = (mNormalFrameCount + 15) & ~15; } ALOGI("HAL output buffer size %u frames, normal sink buffer size %u frames", mFrameCount, ALOGI("HAL output buffer size %zu frames, normal sink buffer size %zu frames", mFrameCount, mNormalFrameCount); // Check if we want to throttle the processing to no more than 2x normal rate Loading Loading @@ -2682,7 +2683,7 @@ void AudioFlinger::PlaybackThread::cacheParameters_l() void AudioFlinger::PlaybackThread::invalidateTracks(audio_stream_type_t streamType) { ALOGV("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %d", ALOGV("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %zu", this, streamType, mTracks.size()); Mutex::Autolock _l(mLock); Loading Loading @@ -3126,7 +3127,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() if ((now - lastWarning) > kWarningThrottleNs) { ATRACE_NAME("underrun"); ALOGW("write blocked for %llu msecs, %d delayed writes, thread %p", ns2ms(delta), mNumDelayedWrites, this); (unsigned long long) ns2ms(delta), mNumDelayedWrites, this); lastWarning = now; } } Loading Loading @@ -3471,8 +3472,8 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud // mNormalSink below { ALOGV("MixerThread() id=%d device=%#x type=%d", id, device, type); ALOGV("mSampleRate=%u, mChannelMask=%#x, mChannelCount=%u, mFormat=%d, mFrameSize=%u, " "mFrameCount=%d, mNormalFrameCount=%d", ALOGV("mSampleRate=%u, mChannelMask=%#x, mChannelCount=%u, mFormat=%d, mFrameSize=%zu, " "mFrameCount=%zu, mNormalFrameCount=%zu", mSampleRate, mChannelMask, mChannelCount, mFormat, mFrameSize, mFrameCount, mNormalFrameCount); mAudioMixer = new AudioMixer(mNormalFrameCount, mSampleRate); Loading Loading @@ -4965,7 +4966,7 @@ void AudioFlinger::DirectOutputThread::threadLoop_sleepTime() // For compressed offload, use faster sleep time when underruning until more than an // entire buffer was written to the audio HAL if (!audio_has_proportional_frames(mFormat) && (mType == OFFLOAD) && (mBytesWritten < mBufferSize)) { (mType == OFFLOAD) && (mBytesWritten < (int64_t) mBufferSize)) { mSleepTimeUs = kDirectMinSleepTimeUs; } else { mSleepTimeUs = mActiveSleepTimeUs; Loading Loading @@ -5276,7 +5277,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr bool doHwPause = false; bool doHwResume = false; ALOGV("OffloadThread::prepareTracks_l active tracks %d", count); ALOGV("OffloadThread::prepareTracks_l active tracks %zu", count); // find out which tracks need to be processed for (size_t i = 0; i < count; i++) { Loading Loading @@ -6129,7 +6130,7 @@ reacquire_wakelock: // ALOGD("%s", mTimestamp.toString().c_str()); if (framesRead < 0 || (framesRead == 0 && mPipeSource == 0)) { ALOGE("read failed: framesRead=%d", framesRead); ALOGE("read failed: framesRead=%zd", framesRead); // Force input into standby so that it tries to recover at next read attempt inputStandBy(); sleepUs = kRecordThreadSleepUs; Loading Loading @@ -6365,10 +6366,10 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe // there are sufficient fast track slots available mFastTrackAvail ) { ALOGV("AUDIO_INPUT_FLAG_FAST accepted: frameCount=%u mFrameCount=%u", ALOGV("AUDIO_INPUT_FLAG_FAST accepted: frameCount=%zu mFrameCount=%zu", frameCount, mFrameCount); } else { ALOGV("AUDIO_INPUT_FLAG_FAST denied: frameCount=%u mFrameCount=%u mPipeFramesP2=%u " ALOGV("AUDIO_INPUT_FLAG_FAST denied: frameCount=%zu mFrameCount=%zu mPipeFramesP2=%zu " "format=%#x isLinear=%d channelMask=%#x sampleRate=%u mSampleRate=%u " "hasFastCapture=%d tid=%d mFastTrackAvail=%d", frameCount, mFrameCount, mPipeFramesP2, Loading Loading @@ -6661,9 +6662,9 @@ void AudioFlinger::RecordThread::dumpTracks(int fd, const Vector<String16>& args size_t numtracks = mTracks.size(); size_t numactive = mActiveTracks.size(); size_t numactiveseen = 0; dprintf(fd, " %d Tracks", numtracks); dprintf(fd, " %zu Tracks", numtracks); if (numtracks) { dprintf(fd, " of which %d are active\n", numactive); dprintf(fd, " of which %zu are active\n", numactive); RecordTrack::appendDumpHeader(result); for (size_t i = 0; i < numtracks ; ++i) { sp<RecordTrack> track = mTracks[i]; Loading Loading @@ -7327,7 +7328,7 @@ size_t AudioFlinger::RecordThread::removeEffectChain_l(const sp<EffectChain>& ch { ALOGV("removeEffectChain_l() %p from thread %p", chain.get(), this); ALOGW_IF(mEffectChains.size() != 1, "removeEffectChain_l() %p invalid chain size %d on thread %p", "removeEffectChain_l() %p invalid chain size %zu on thread %p", chain.get(), mEffectChains.size(), this); if (mEffectChains.size() == 1) { mEffectChains.removeAt(0); Loading Loading
services/audioflinger/AudioFlinger.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -1302,7 +1302,7 @@ void AudioFlinger::removeNotificationClient(pid_t pid) bool removed = false; for (size_t i = 0; i< num; ) { AudioSessionRef *ref = mAudioSessionRefs.itemAt(i); ALOGV(" pid %d @ %d", ref->mPid, i); ALOGV(" pid %d @ %zu", ref->mPid, i); if (ref->mPid == pid) { ALOGV(" removing entry for pid %d session %d", pid, ref->mSessionid); mAudioSessionRefs.removeAt(i); Loading Loading @@ -1563,7 +1563,7 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name) int rc = load_audio_interface(name, &dev); if (rc) { ALOGI("loadHwModule() error %d loading module %s ", rc, name); ALOGE("loadHwModule() error %d loading module %s", rc, name); return 0; } Loading @@ -1571,7 +1571,7 @@ audio_module_handle_t AudioFlinger::loadHwModule_l(const char *name) rc = dev->init_check(dev); mHardwareStatus = AUDIO_HW_IDLE; if (rc) { ALOGI("loadHwModule() init check error %d for module %s ", rc, name); ALOGE("loadHwModule() init check error %d for module %s", rc, name); return 0; } Loading Loading @@ -2857,7 +2857,7 @@ status_t AudioFlinger::putOrphanEffectChain_l(const sp<AudioFlinger::EffectChain { audio_session_t session = chain->sessionId(); ssize_t index = mOrphanEffectChains.indexOfKey(session); ALOGV("putOrphanEffectChain_l session %d index %d", session, index); ALOGV("putOrphanEffectChain_l session %d index %zd", session, index); if (index >= 0) { ALOGW("putOrphanEffectChain_l chain for session %d already present", session); return ALREADY_EXISTS; Loading @@ -2870,7 +2870,7 @@ sp<AudioFlinger::EffectChain> AudioFlinger::getOrphanEffectChain_l(audio_session { sp<EffectChain> chain; ssize_t index = mOrphanEffectChains.indexOfKey(session); ALOGV("getOrphanEffectChain_l session %d index %d", session, index); ALOGV("getOrphanEffectChain_l session %d index %zd", session, index); if (index >= 0) { chain = mOrphanEffectChains.valueAt(index); mOrphanEffectChains.removeItemsAt(index); Loading @@ -2883,11 +2883,11 @@ bool AudioFlinger::updateOrphanEffectChains(const sp<AudioFlinger::EffectModule> Mutex::Autolock _l(mLock); audio_session_t session = effect->sessionId(); ssize_t index = mOrphanEffectChains.indexOfKey(session); ALOGV("updateOrphanEffectChains session %d index %d", session, index); ALOGV("updateOrphanEffectChains session %d index %zd", session, index); if (index >= 0) { sp<EffectChain> chain = mOrphanEffectChains.valueAt(index); if (chain->removeEffect_l(effect) == 0) { ALOGV("updateOrphanEffectChains removing effect chain at index %d", index); ALOGV("updateOrphanEffectChains removing effect chain at index %zd", index); mOrphanEffectChains.removeItemsAt(index); } return true; Loading
services/audioflinger/Effects.cpp +7 −7 Original line number Diff line number Diff line Loading @@ -138,7 +138,7 @@ status_t AudioFlinger::EffectModule::addHandle(EffectHandle *handle) } else { status = ALREADY_EXISTS; } ALOGV("addHandle() %p added handle %p in position %d", this, handle, i); ALOGV("addHandle() %p added handle %p in position %zu", this, handle, i); mHandles.insertAt(handle, i); return status; } Loading @@ -156,7 +156,7 @@ size_t AudioFlinger::EffectModule::removeHandle(EffectHandle *handle) if (i == size) { return size; } ALOGV("removeHandle() %p removed handle %p in position %d", this, handle, i); ALOGV("removeHandle() %p removed handle %p in position %zu", this, handle, i); mHandles.removeAt(i); // if removed from first place, move effect control from this handle to next in line Loading Loading @@ -380,7 +380,7 @@ status_t AudioFlinger::EffectModule::configure() mConfig.inputCfg.buffer.frameCount = thread->frameCount(); mConfig.outputCfg.buffer.frameCount = mConfig.inputCfg.buffer.frameCount; ALOGV("configure() %p thread %p buffer %p framecount %d", ALOGV("configure() %p thread %p buffer %p framecount %zu", this, thread.get(), mConfig.inputCfg.buffer.raw, mConfig.inputCfg.buffer.frameCount); status_t cmdStatus; Loading Loading @@ -1050,7 +1050,7 @@ AudioFlinger::EffectHandle::EffectHandle(const sp<EffectModule>& effect, mCblkMemory = client->heap()->allocate(EFFECT_PARAM_BUFFER_SIZE + bufOffset); if (mCblkMemory == 0 || (mCblk = static_cast<effect_param_cblk_t *>(mCblkMemory->pointer())) == NULL) { ALOGE("not enough memory for Effect size=%u", EFFECT_PARAM_BUFFER_SIZE + ALOGE("not enough memory for Effect size=%zu", EFFECT_PARAM_BUFFER_SIZE + sizeof(effect_param_cblk_t)); mCblkMemory.clear(); return; Loading Loading @@ -1579,7 +1579,7 @@ status_t AudioFlinger::EffectChain::addEffect_l(const sp<EffectModule>& effect) } mEffects.insertAt(effect, idx_insert); ALOGV("addEffect_l() effect %p, added in chain %p at rank %d", effect.get(), this, ALOGV("addEffect_l() effect %p, added in chain %p at rank %zu", effect.get(), this, idx_insert); } effect->configure(); Loading Loading @@ -1611,7 +1611,7 @@ size_t AudioFlinger::EffectChain::removeEffect_l(const sp<EffectModule>& effect) } } mEffects.removeAt(i); ALOGV("removeEffect_l() effect %p, removed from chain %p at rank %d", effect.get(), ALOGV("removeEffect_l() effect %p, removed from chain %p at rank %zu", effect.get(), this, i); break; } Loading Loading @@ -1726,7 +1726,7 @@ void AudioFlinger::EffectChain::dump(int fd, const Vector<String16>& args) String8 result; size_t numEffects = mEffects.size(); snprintf(buffer, SIZE, " %d effects for session %d\n", numEffects, mSessionId); snprintf(buffer, SIZE, " %zu effects for session %d\n", numEffects, mSessionId); result.append(buffer); if (numEffects) { Loading
services/audioflinger/FastMixer.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -433,7 +433,8 @@ void FastMixer::onWork() } if (mMasterMono.load()) { // memory_order_seq_cst mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount, true /*limit*/); mono_blend(mMixerBuffer, mMixerBufferFormat, Format_channelCount(mFormat), frameCount, true /*limit*/); } // prepare the buffer used to write to sink void *buffer = mSinkBuffer != NULL ? mSinkBuffer : mMixerBuffer; Loading
services/audioflinger/PatchPanel.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -401,7 +401,7 @@ status_t AudioFlinger::PatchPanel::createPatchConnections(Patch *patch, shift = playbackShift; } size_t frameCount = (playbackFrameCount * recordFramecount) >> shift; ALOGV("createPatchConnections() playframeCount %d recordFramecount %d frameCount %d ", ALOGV("createPatchConnections() playframeCount %zu recordFramecount %zu frameCount %zu", playbackFrameCount, recordFramecount, frameCount); // create a special record track to capture from record thread Loading
services/audioflinger/Threads.cpp +24 −23 Original line number Diff line number Diff line Loading @@ -725,7 +725,7 @@ status_t AudioFlinger::ThreadBase::sendConfigEvent_l(sp<ConfigEvent>& event) return status; } mConfigEvents.add(event); ALOGV("sendConfigEvent_l() num events %d event %d", mConfigEvents.size(), event->mType); ALOGV("sendConfigEvent_l() num events %zu event %d", mConfigEvents.size(), event->mType); mWaitWorkCV.signal(); mLock.unlock(); { Loading Loading @@ -817,7 +817,7 @@ void AudioFlinger::ThreadBase::processConfigEvents_l() bool configChanged = false; while (!mConfigEvents.isEmpty()) { ALOGV("processConfigEvents_l() remaining events %d", mConfigEvents.size()); ALOGV("processConfigEvents_l() remaining events %zu", mConfigEvents.size()); sp<ConfigEvent> event = mConfigEvents[0]; mConfigEvents.removeAt(0); switch (event->mType) { Loading Loading @@ -949,7 +949,7 @@ void AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args __u dprintf(fd, " Sample rate: %u Hz\n", mSampleRate); dprintf(fd, " HAL frame count: %zu\n", mFrameCount); dprintf(fd, " HAL format: 0x%x (%s)\n", mHALFormat, formatToString(mHALFormat)); dprintf(fd, " HAL buffer size: %u bytes\n", mBufferSize); dprintf(fd, " HAL buffer size: %zu bytes\n", mBufferSize); dprintf(fd, " Channel count: %u\n", mChannelCount); dprintf(fd, " Channel mask: 0x%08x (%s)\n", mChannelMask, channelMaskToString(mChannelMask, mType != RECORD).string()); Loading Loading @@ -1685,10 +1685,10 @@ void AudioFlinger::PlaybackThread::dumpTracks(int fd, const Vector<String16>& ar size_t numtracks = mTracks.size(); size_t numactive = mActiveTracks.size(); dprintf(fd, " %d Tracks", numtracks); dprintf(fd, " %zu Tracks", numtracks); size_t numactiveseen = 0; if (numtracks) { dprintf(fd, " of which %d are active\n", numactive); dprintf(fd, " of which %zu are active\n", numactive); Track::appendDumpHeader(result); for (size_t i = 0; i < numtracks; ++i) { sp<Track> track = mTracks[i]; Loading Loading @@ -1729,7 +1729,8 @@ void AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& dumpBase(fd, args); dprintf(fd, " Normal frame count: %zu\n", mNormalFrameCount); dprintf(fd, " Last write occurred (msecs): %llu\n", ns2ms(systemTime() - mLastWriteTime)); dprintf(fd, " Last write occurred (msecs): %llu\n", (unsigned long long) ns2ms(systemTime() - mLastWriteTime)); dprintf(fd, " Total writes: %d\n", mNumWrites); dprintf(fd, " Delayed writes: %d\n", mNumDelayedWrites); dprintf(fd, " Blocked in write: %s\n", mInWrite ? "yes" : "no"); Loading Loading @@ -1823,11 +1824,11 @@ sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrac } frameCount = mFrameCount * sFastTrackMultiplier; } ALOGV("AUDIO_OUTPUT_FLAG_FAST accepted: frameCount=%d mFrameCount=%d", ALOGV("AUDIO_OUTPUT_FLAG_FAST accepted: frameCount=%zu mFrameCount=%zu", frameCount, mFrameCount); } else { ALOGV("AUDIO_OUTPUT_FLAG_FAST denied: sharedBuffer=%p frameCount=%d " "mFrameCount=%d format=%#x mFormat=%#x isLinear=%d channelMask=%#x " ALOGV("AUDIO_OUTPUT_FLAG_FAST denied: sharedBuffer=%p frameCount=%zu " "mFrameCount=%zu format=%#x mFormat=%#x isLinear=%d channelMask=%#x " "sampleRate=%u mSampleRate=%u " "hasFastMixer=%d tid=%d fastTrackAvailMask=%#x", sharedBuffer.get(), frameCount, mFrameCount, format, mFormat, Loading Loading @@ -2259,7 +2260,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() mBufferSize = mOutput->stream->common.get_buffer_size(&mOutput->stream->common); mFrameCount = mBufferSize / mFrameSize; if (mFrameCount & 15) { ALOGW("HAL output buffer size is %u frames but AudioMixer requires multiples of 16 frames", ALOGW("HAL output buffer size is %zu frames but AudioMixer requires multiples of 16 frames", mFrameCount); } Loading Loading @@ -2345,7 +2346,7 @@ void AudioFlinger::PlaybackThread::readOutputParameters_l() if (mType == MIXER || mType == DUPLICATING) { mNormalFrameCount = (mNormalFrameCount + 15) & ~15; } ALOGI("HAL output buffer size %u frames, normal sink buffer size %u frames", mFrameCount, ALOGI("HAL output buffer size %zu frames, normal sink buffer size %zu frames", mFrameCount, mNormalFrameCount); // Check if we want to throttle the processing to no more than 2x normal rate Loading Loading @@ -2682,7 +2683,7 @@ void AudioFlinger::PlaybackThread::cacheParameters_l() void AudioFlinger::PlaybackThread::invalidateTracks(audio_stream_type_t streamType) { ALOGV("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %d", ALOGV("MixerThread::invalidateTracks() mixer %p, streamType %d, mTracks.size %zu", this, streamType, mTracks.size()); Mutex::Autolock _l(mLock); Loading Loading @@ -3126,7 +3127,7 @@ bool AudioFlinger::PlaybackThread::threadLoop() if ((now - lastWarning) > kWarningThrottleNs) { ATRACE_NAME("underrun"); ALOGW("write blocked for %llu msecs, %d delayed writes, thread %p", ns2ms(delta), mNumDelayedWrites, this); (unsigned long long) ns2ms(delta), mNumDelayedWrites, this); lastWarning = now; } } Loading Loading @@ -3471,8 +3472,8 @@ AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, Aud // mNormalSink below { ALOGV("MixerThread() id=%d device=%#x type=%d", id, device, type); ALOGV("mSampleRate=%u, mChannelMask=%#x, mChannelCount=%u, mFormat=%d, mFrameSize=%u, " "mFrameCount=%d, mNormalFrameCount=%d", ALOGV("mSampleRate=%u, mChannelMask=%#x, mChannelCount=%u, mFormat=%d, mFrameSize=%zu, " "mFrameCount=%zu, mNormalFrameCount=%zu", mSampleRate, mChannelMask, mChannelCount, mFormat, mFrameSize, mFrameCount, mNormalFrameCount); mAudioMixer = new AudioMixer(mNormalFrameCount, mSampleRate); Loading Loading @@ -4965,7 +4966,7 @@ void AudioFlinger::DirectOutputThread::threadLoop_sleepTime() // For compressed offload, use faster sleep time when underruning until more than an // entire buffer was written to the audio HAL if (!audio_has_proportional_frames(mFormat) && (mType == OFFLOAD) && (mBytesWritten < mBufferSize)) { (mType == OFFLOAD) && (mBytesWritten < (int64_t) mBufferSize)) { mSleepTimeUs = kDirectMinSleepTimeUs; } else { mSleepTimeUs = mActiveSleepTimeUs; Loading Loading @@ -5276,7 +5277,7 @@ AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTr bool doHwPause = false; bool doHwResume = false; ALOGV("OffloadThread::prepareTracks_l active tracks %d", count); ALOGV("OffloadThread::prepareTracks_l active tracks %zu", count); // find out which tracks need to be processed for (size_t i = 0; i < count; i++) { Loading Loading @@ -6129,7 +6130,7 @@ reacquire_wakelock: // ALOGD("%s", mTimestamp.toString().c_str()); if (framesRead < 0 || (framesRead == 0 && mPipeSource == 0)) { ALOGE("read failed: framesRead=%d", framesRead); ALOGE("read failed: framesRead=%zd", framesRead); // Force input into standby so that it tries to recover at next read attempt inputStandBy(); sleepUs = kRecordThreadSleepUs; Loading Loading @@ -6365,10 +6366,10 @@ sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRe // there are sufficient fast track slots available mFastTrackAvail ) { ALOGV("AUDIO_INPUT_FLAG_FAST accepted: frameCount=%u mFrameCount=%u", ALOGV("AUDIO_INPUT_FLAG_FAST accepted: frameCount=%zu mFrameCount=%zu", frameCount, mFrameCount); } else { ALOGV("AUDIO_INPUT_FLAG_FAST denied: frameCount=%u mFrameCount=%u mPipeFramesP2=%u " ALOGV("AUDIO_INPUT_FLAG_FAST denied: frameCount=%zu mFrameCount=%zu mPipeFramesP2=%zu " "format=%#x isLinear=%d channelMask=%#x sampleRate=%u mSampleRate=%u " "hasFastCapture=%d tid=%d mFastTrackAvail=%d", frameCount, mFrameCount, mPipeFramesP2, Loading Loading @@ -6661,9 +6662,9 @@ void AudioFlinger::RecordThread::dumpTracks(int fd, const Vector<String16>& args size_t numtracks = mTracks.size(); size_t numactive = mActiveTracks.size(); size_t numactiveseen = 0; dprintf(fd, " %d Tracks", numtracks); dprintf(fd, " %zu Tracks", numtracks); if (numtracks) { dprintf(fd, " of which %d are active\n", numactive); dprintf(fd, " of which %zu are active\n", numactive); RecordTrack::appendDumpHeader(result); for (size_t i = 0; i < numtracks ; ++i) { sp<RecordTrack> track = mTracks[i]; Loading Loading @@ -7327,7 +7328,7 @@ size_t AudioFlinger::RecordThread::removeEffectChain_l(const sp<EffectChain>& ch { ALOGV("removeEffectChain_l() %p from thread %p", chain.get(), this); ALOGW_IF(mEffectChains.size() != 1, "removeEffectChain_l() %p invalid chain size %d on thread %p", "removeEffectChain_l() %p invalid chain size %zu on thread %p", chain.get(), mEffectChains.size(), this); if (mEffectChains.size() == 1) { mEffectChains.removeAt(0); Loading