Lines Matching refs:audioFlinger
19 #define LOG_TAG "AudioFlinger"
51 #include "AudioFlinger.h"
140 // FIXME It would be better for client to tell AudioFlinger the value of N,
141 // so AudioFlinger could allocate the right amount of memory.
267 AudioFlinger::ThreadBase::ThreadBase(const sp<AudioFlinger>& audioFlinger, audio_io_handle_t id,
271 mAudioFlinger(audioFlinger),
283 AudioFlinger::ThreadBase::~ThreadBase()
300 void AudioFlinger::ThreadBase::exit()
324 status_t AudioFlinger::ThreadBase::setParameters(const String8& keyValuePairs)
344 void AudioFlinger::ThreadBase::sendIoConfigEvent(int event, int param)
351 void AudioFlinger::ThreadBase::sendIoConfigEvent_l(int event, int param)
361 void AudioFlinger::ThreadBase::sendPrioConfigEvent_l(pid_t pid, pid_t tid, int32_t prio)
370 void AudioFlinger::ThreadBase::processConfigEvents()
377 // release mLock before locking AudioFlinger mLock: lock order is always
378 // AudioFlinger then ThreadBase to avoid cross deadlock
408 void AudioFlinger::ThreadBase::dumpBase(int fd, const Vector<String16>& args)
414 bool locked = AudioFlinger::dumpTryLock(mLock);
463 void AudioFlinger::ThreadBase::dumpEffectChains(int fd, const Vector<String16>& args)
480 void AudioFlinger::ThreadBase::acquireWakeLock(int uid)
486 String16 AudioFlinger::ThreadBase::getWakeLockTag()
505 void AudioFlinger::ThreadBase::acquireWakeLock_l(int uid)
530 void AudioFlinger::ThreadBase::releaseWakeLock()
536 void AudioFlinger::ThreadBase::releaseWakeLock_l()
547 void AudioFlinger::ThreadBase::updateWakeLockUids(const SortedVector<int> &uids) {
552 void AudioFlinger::ThreadBase::getPowerManager_l() {
567 void AudioFlinger::ThreadBase::updateWakeLockUids_l(const SortedVector<int> &uids) {
582 void AudioFlinger::ThreadBase::clearPowerManager()
589 void AudioFlinger::ThreadBase::PMDeathRecipient::binderDied(const wp<IBinder>& who)
598 void AudioFlinger::ThreadBase::setEffectSuspended(
605 void AudioFlinger::ThreadBase::setEffectSuspended_l(
620 void AudioFlinger::ThreadBase::checkSuspendOnAddEffectChain_l(const sp<EffectChain>& chain)
644 void AudioFlinger::ThreadBase::updateSuspendedSessions_l(const effect_uuid_t *type,
705 void AudioFlinger::ThreadBase::checkSuspendOnEffectEnabled(const sp<EffectModule>& effect,
713 void AudioFlinger::ThreadBase::checkSuspendOnEffectEnabled_l(const sp<EffectModule>& effect,
734 // ThreadBase::createEffect_l() must be called with AudioFlinger::mLock held
735 sp<AudioFlinger::EffectHandle> AudioFlinger::ThreadBase::createEffect_l(
736 const sp<AudioFlinger::Client>& client,
859 sp<AudioFlinger::EffectModule> AudioFlinger::ThreadBase::getEffect(int sessionId, int effectId)
865 sp<AudioFlinger::EffectModule> AudioFlinger::ThreadBase::getEffect_l(int sessionId, int effectId)
871 // PlaybackThread::addEffect_l() must be called with AudioFlinger::mLock and
873 status_t AudioFlinger::ThreadBase::addEffect_l(const sp<EffectModule>& effect)
917 void AudioFlinger::ThreadBase::removeEffect_l(const sp<EffectModule>& effect) {
936 void AudioFlinger::ThreadBase::lockEffectChains_l(
937 Vector< sp<AudioFlinger::EffectChain> >& effectChains)
945 void AudioFlinger::ThreadBase::unlockEffectChains(
946 const Vector< sp<AudioFlinger::EffectChain> >& effectChains)
953 sp<AudioFlinger::EffectChain> AudioFlinger::ThreadBase::getEffectChain(int sessionId)
959 sp<AudioFlinger::EffectChain> AudioFlinger::ThreadBase::getEffectChain_l(int sessionId) const
970 void AudioFlinger::ThreadBase::setMode(audio_mode_t mode)
979 void AudioFlinger::ThreadBase::disconnectEffect(const sp<EffectModule>& effect,
998 AudioFlinger::PlaybackThread::PlaybackThread(const sp<AudioFlinger>& audioFlinger,
1003 : ThreadBase(audioFlinger, id, device, AUDIO_DEVICE_NONE, type),
1012 standbyDelay(AudioFlinger::mStandbyTimeInNsecs),
1019 mScreenState(AudioFlinger::mScreenState),
1026 mNBLogWriter = audioFlinger->newWriter_l(kLogSize, mName);
1028 // Assumes constructor is called by AudioFlinger with it's mLock held, but
1035 mMasterVolume = audioFlinger->masterVolume_l();
1036 mMasterMute = audioFlinger->masterMute_l();
1060 AudioFlinger::PlaybackThread::~PlaybackThread()
1066 void AudioFlinger::PlaybackThread::dump(int fd, const Vector<String16>& args)
1073 void AudioFlinger::PlaybackThread::dumpTracks(int fd, const Vector<String16>& args)
1123 void AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& args)
1153 status_t AudioFlinger::PlaybackThread::readyToRun()
1157 ALOGI("AudioFlinger's thread %p ready to run", this);
1164 void AudioFlinger::PlaybackThread::onFirstRef()
1170 void AudioFlinger::PlaybackThread::preExit()
1178 // PlaybackThread::createTrack_l() must be called with AudioFlinger::mLock held
1179 sp<AudioFlinger::PlaybackThread::Track> AudioFlinger::PlaybackThread::createTrack_l(
1180 const sp<AudioFlinger::Client>& client,
1363 uint32_t AudioFlinger::PlaybackThread::correctLatency_l(uint32_t latency) const
1368 uint32_t AudioFlinger::PlaybackThread::latency() const
1373 uint32_t AudioFlinger::PlaybackThread::latency_l() const
1382 void AudioFlinger::PlaybackThread::setMasterVolume(float value)
1394 void AudioFlinger::PlaybackThread::setMasterMute(bool muted)
1406 void AudioFlinger::PlaybackThread::setStreamVolume(audio_stream_type_t stream, float value)
1413 void AudioFlinger::PlaybackThread::setStreamMute(audio_stream_type_t stream, bool muted)
1420 float AudioFlinger::PlaybackThread::streamVolume(audio_stream_type_t stream) const
1427 status_t AudioFlinger::PlaybackThread::addTrack_l(const sp<Track>& track)
1484 bool AudioFlinger::PlaybackThread::destroyTrack_l(const sp<Track>& track)
1499 void AudioFlinger::PlaybackThread::removeTrack_l(const sp<Track>& track)
1520 void AudioFlinger::PlaybackThread::broadcast_l()
1530 String8 AudioFlinger::PlaybackThread::getParameters(const String8& keys)
1543 // audioConfigChanged_l() must be called with AudioFlinger::mLock held
1544 void AudioFlinger::PlaybackThread::audioConfigChanged_l(int event, int param) {
1558 // AudioFlinger::frameCount(audio_io_handle_t)
1572 void AudioFlinger::PlaybackThread::writeCallback()
1578 void AudioFlinger::PlaybackThread::drainCallback()
1584 void AudioFlinger::PlaybackThread::resetWriteBlocked(uint32_t sequence)
1594 void AudioFlinger::PlaybackThread::resetDraining(uint32_t sequence)
1605 int AudioFlinger::PlaybackThread::asyncCallback(stream_callback_event_t event,
1609 AudioFlinger::PlaybackThread *me = (AudioFlinger::PlaybackThread *)cookie;
1625 void AudioFlinger::PlaybackThread::readOutputParameters()
1656 AudioFlinger::PlaybackThread::asyncCallback, this) == 0) {
1658 mCallbackThread = new AudioFlinger::AsyncCallbackThread(this);
1723 status_t AudioFlinger::PlaybackThread::getRenderPosition(size_t *halFrames, size_t *dspFrames)
1745 uint32_t AudioFlinger::PlaybackThread::hasAudioSession(int sessionId) const
1764 uint32_t AudioFlinger::PlaybackThread::getStrategyForSession_l(int sessionId)
1781 AudioFlinger::AudioStreamOut* AudioFlinger::PlaybackThread::getOutput() const
1787 AudioFlinger::AudioStreamOut* AudioFlinger::PlaybackThread::clearOutput()
1801 audio_stream_t* AudioFlinger::PlaybackThread::stream() const
1809 uint32_t AudioFlinger::PlaybackThread::activeSleepTimeUs() const
1814 status_t AudioFlinger::PlaybackThread::setSyncEvent(const sp<SyncEvent>& event)
1833 bool AudioFlinger::PlaybackThread::isValidSyncEvent(const sp<SyncEvent>& event) const
1838 void AudioFlinger
1859 void AudioFlinger::PlaybackThread::checkSilentMode_l()
1877 ssize_t AudioFlinger::PlaybackThread::threadLoop_write()
1890 // update the setpoint when AudioFlinger::mScreenState changes
1891 uint32_t screenState = AudioFlinger::mScreenState;
1945 void AudioFlinger::PlaybackThread::threadLoop_drain()
1961 void AudioFlinger::PlaybackThread::threadLoop_exit()
1985 void AudioFlinger::PlaybackThread::cacheParameters_l()
1992 void AudioFlinger::PlaybackThread::invalidateTracks(audio_stream_type_t streamType)
2007 status_t AudioFlinger::PlaybackThread::addEffectChain_l(const sp<EffectChain>& chain)
2074 size_t AudioFlinger::PlaybackThread::removeEffectChain_l(const sp<EffectChain>& chain)
2110 status_t AudioFlinger::PlaybackThread::attachAuxEffect(
2111 const sp<AudioFlinger::PlaybackThread::Track> track, int EffectId)
2117 status_t AudioFlinger::PlaybackThread::attachAuxEffect_l(
2118 const sp<AudioFlinger::PlaybackThread::Track> track, int EffectId)
2140 void AudioFlinger::PlaybackThread::detachAuxEffect_l(int effectId)
2150 bool AudioFlinger::PlaybackThread::threadLoop()
2407 void AudioFlinger::PlaybackThread::removeTracks_l(const Vector< sp<Track> >& tracksToRemove)
2431 status_t AudioFlinger::PlaybackThread::getTimestamp_l(AudioTimestamp& timestamp)
2449 AudioFlinger::MixerThread::MixerThread(const sp<AudioFlinger>& audioFlinger, AudioStreamOut* output,
2451 : PlaybackThread(audioFlinger, output, id, device, type),
2552 mFastMixerNBLogWriter = audioFlinger->newWriter_l(kFastMixerLogSize, "FastMixer");
2597 AudioFlinger::MixerThread::~MixerThread()
2635 uint32_t AudioFlinger::MixerThread::correctLatency_l(uint32_t latency) const
2645 void AudioFlinger::MixerThread::threadLoop_removeTracks(const Vector< sp<Track> >& tracksToRemove)
2650 ssize_t AudioFlinger::MixerThread::threadLoop_write()
2685 void AudioFlinger::MixerThread::threadLoop_standby()
2716 void AudioFlinger::PlaybackThread::flushOutput_l()
2720 bool AudioFlinger::PlaybackThread::waitingAsyncCallback_l()
2725 bool AudioFlinger::PlaybackThread::shouldStandby_l()
2730 bool AudioFlinger::PlaybackThread::waitingAsyncCallback()
2737 void AudioFlinger::PlaybackThread::threadLoop_standby()
2751 void AudioFlinger::MixerThread::threadLoop_mix()
2782 void AudioFlinger::MixerThread::threadLoop_sleepTime()
2812 AudioFlinger::PlaybackThread::mixer_state AudioFlinger::MixerThread::prepareTracks_l(
3314 int AudioFlinger::MixerThread::getTrackName_l(audio_channel_mask_t channelMask, int sessionId)
3320 void AudioFlinger::MixerThread::deleteTrackName_l(int name)
3327 bool AudioFlinger::MixerThread::checkForNewParameters_l()
3462 void AudioFlinger::MixerThread::dumpInternals(int fd, const Vector<String16>& args)
3500 uint32_t AudioFlinger::MixerThread::idleSleepTimeUs() const
3505 uint32_t AudioFlinger::MixerThread::suspendSleepTimeUs() const
3510 void AudioFlinger::MixerThread::cacheParameters_l()
3523 AudioFlinger::DirectOutputThread::DirectOutputThread(const sp<AudioFlinger>& audioFlinger,
3525 : PlaybackThread(audioFlinger, output, id, device, DIRECT)
3530 AudioFlinger::DirectOutputThread::DirectOutputThread(const sp<AudioFlinger>& audioFlinger,
3533 : PlaybackThread(audioFlinger, output, id, device, type)
3538 AudioFlinger::DirectOutputThread::~DirectOutputThread()
3542 void AudioFlinger::DirectOutputThread::processVolume_l(Track *track, bool lastTrack)
3587 AudioFlinger::PlaybackThread::mixer_state AudioFlinger::DirectOutputThread::prepareTracks_l(
3687 void AudioFlinger::DirectOutputThread::threadLoop_mix()
3711 void AudioFlinger::DirectOutputThread::threadLoop_sleepTime()
3726 int AudioFlinger::DirectOutputThread::getTrackName_l(audio_channel_mask_t channelMask,
3733 void AudioFlinger::DirectOutputThread::deleteTrackName_l(int name)
3738 bool AudioFlinger::DirectOutputThread::checkForNewParameters_l()
3785 uint32_t AudioFlinger::DirectOutputThread::activeSleepTimeUs() const
3796 uint32_t AudioFlinger::DirectOutputThread::idleSleepTimeUs() const
3807 uint32_t AudioFlinger::DirectOutputThread::suspendSleepTimeUs() const
3818 void AudioFlinger::DirectOutputThread::cacheParameters_l()
3833 AudioFlinger::AsyncCallbackThread::AsyncCallbackThread(
3834 const wp<AudioFlinger::PlaybackThread>& playbackThread)
3842 AudioFlinger::AsyncCallbackThread::~AsyncCallbackThread()
3846 void AudioFlinger::AsyncCallbackThread::onFirstRef()
3851 bool AudioFlinger::AsyncCallbackThread::threadLoop()
3876 sp<AudioFlinger::PlaybackThread> playbackThread = mPlaybackThread.promote();
3890 void AudioFlinger::AsyncCallbackThread::exit()
3898 void AudioFlinger::AsyncCallbackThread::setWriteBlocked(uint32_t sequence)
3905 void AudioFlinger::AsyncCallbackThread::resetWriteBlocked()
3915 void AudioFlinger::AsyncCallbackThread::setDraining(uint32_t sequence)
3922 void AudioFlinger::AsyncCallbackThread::resetDraining()
3934 AudioFlinger::OffloadThread::OffloadThread(const sp<AudioFlinger>& audioFlinger,
3936 : DirectOutputThread(audioFlinger, output, id, device, OFFLOAD),
3945 void AudioFlinger::OffloadThread::threadLoop_exit()
3958 AudioFlinger::PlaybackThread::mixer_state AudioFlinger::OffloadThread::prepareTracks_l(
4147 void AudioFlinger::OffloadThread::flushOutput_l()
4153 bool AudioFlinger::OffloadThread::waitingAsyncCallback_l()
4164 bool AudioFlinger::OffloadThread::shouldStandby_l()
4178 bool AudioFlinger::OffloadThread::waitingAsyncCallback()
4184 void AudioFlinger::OffloadThread::flushHw_l()
4204 AudioFlinger::DuplicatingThread::DuplicatingThread(const sp<AudioFlinger>& audioFlinger,
4205 AudioFlinger::MixerThread* mainThread, audio_io_handle_t id)
4206 : MixerThread(audioFlinger, mainThread->getOutput(), id, mainThread->outDevice(),
4213 AudioFlinger::DuplicatingThread::~DuplicatingThread()
4220 void AudioFlinger::DuplicatingThread::threadLoop_mix()
4234 void AudioFlinger::DuplicatingThread::threadLoop_sleepTime()
4254 ssize_t AudioFlinger::DuplicatingThread::threadLoop_write()
4263 void AudioFlinger::DuplicatingThread::threadLoop_standby()
4271 void AudioFlinger::DuplicatingThread::saveOutputTracks()
4276 void AudioFlinger::DuplicatingThread::clearOutputTracks()
4281 void AudioFlinger::DuplicatingThread::addOutputTrack(MixerThread *thread)
4301 void AudioFlinger::DuplicatingThread::removeOutputTrack(MixerThread *thread)
4316 void AudioFlinger::DuplicatingThread::updateWaitTime_l()
4331 bool AudioFlinger::DuplicatingThread::outputsReady(
4352 uint32_t AudioFlinger::DuplicatingThread::activeSleepTimeUs() const
4357 void AudioFlinger::DuplicatingThread::cacheParameters_l()
4369 AudioFlinger::RecordThread::RecordThread(const sp<AudioFlinger>& audioFlinger,
4380 ThreadBase(audioFlinger, id, outDevice, inDevice, RECORD),
4397 AudioFlinger::RecordThread::~RecordThread()
4404 void AudioFlinger::RecordThread::onFirstRef()
4409 status_t AudioFlinger::RecordThread::readyToRun()
4416 bool AudioFlinger::RecordThread::threadLoop()
4650 void AudioFlinger::RecordThread::standby()
4658 void AudioFlinger::RecordThread::inputStandBy()
4663 sp<AudioFlinger::RecordThread::RecordTrack> AudioFlinger::RecordThread::createRecordTrack_l(
4664 const sp<AudioFlinger::Client>& client,
4772 status_t AudioFlinger::RecordThread::start(RecordThread::RecordTrack* recordTrack,
4850 void AudioFlinger::RecordThread::clearSyncStartEvent()
4859 void AudioFlinger::RecordThread::syncStartEventCallback(const wp<SyncEvent>& event)
4869 void AudioFlinger::RecordThread::handleSyncStartEvent(const sp<SyncEvent>& event)
4878 bool AudioFlinger::RecordThread::stop(RecordThread::RecordTrack* recordTrack) {
4898 bool AudioFlinger::RecordThread::isValidSyncEvent(const sp<SyncEvent>& event) const
4903 status_t AudioFlinger::RecordThread::setSyncEvent(const sp<SyncEvent>& event)
4929 void AudioFlinger::RecordThread::destroyTrack_l(const sp<RecordTrack>& track)
4939 void AudioFlinger::RecordThread::removeTrack_l(const sp<RecordTrack>& track)
4945 void AudioFlinger::RecordThread::dump(int fd, const Vector<String16>& args)
4952 void AudioFlinger::RecordThread::dumpInternals(int fd, const Vector<String16>& args)
4981 void AudioFlinger::RecordThread::dumpTracks(int fd, const Vector<String16>& args)
5010 status_t AudioFlinger::RecordThread::getNextBuffer(AudioBufferProvider::Buffer* buffer, int64_t pts)
5049 void AudioFlinger::RecordThread::releaseBuffer(AudioBufferProvider::Buffer* buffer)
5055 bool AudioFlinger::RecordThread::checkForNewParameters_l()
5103 // (see AudioFlinger::setParameters()
5168 String8 AudioFlinger::RecordThread::getParameters(const String8& keys)
5181 void AudioFlinger::RecordThread::audioConfigChanged_l(int event, int param) {
5203 void AudioFlinger::RecordThread::readInputParameters()
5249 unsigned int AudioFlinger::RecordThread::getInputFramesLost()
5259 uint32_t AudioFlinger::RecordThread::hasAudioSession(int sessionId) const
5277 KeyedVector<int, bool> AudioFlinger::RecordThread::sessionIds() const
5291 AudioFlinger::AudioStreamIn* AudioFlinger::RecordThread::clearInput()
5300 audio_stream_t* AudioFlinger::RecordThread::stream() const
5308 status_t AudioFlinger::RecordThread::addEffectChain_l(const sp<EffectChain>& chain)
5326 size_t AudioFlinger::RecordThread::removeEffectChain_l(const sp<EffectChain>& chain)