Loading media/libmediaplayerservice/MediaPlayerService.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -1936,8 +1936,13 @@ void MediaPlayerService::AudioOutput::pause() void MediaPlayerService::AudioOutput::close() { ALOGV("close"); sp<AudioTrack> track; { Mutex::Autolock lock(mLock); close_l(); track = mTrack; close_l(); // clears mTrack } // destruction of the track occurs outside of mutex. } void MediaPlayerService::AudioOutput::setVolume(float left, float right) Loading services/audioflinger/Threads.cpp +20 −3 Original line number Diff line number Diff line Loading @@ -1630,6 +1630,7 @@ void AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& dprintf(fd, " Mixer buffer: %p\n", mMixerBuffer); dprintf(fd, " Effect buffer: %p\n", mEffectBuffer); dprintf(fd, " Fast track availMask=%#x\n", mFastTrackAvailMask); dprintf(fd, " Standby delay ns=%lld\n", (long long)mStandbyDelayNs); AudioStreamOut *output = mOutput; audio_output_flags_t flags = output != NULL ? output->flags : AUDIO_OUTPUT_FLAG_NONE; String8 flagsAsString = outputFlagsToString(flags); Loading Loading @@ -2542,7 +2543,8 @@ The derived values that are cached: - mSinkBufferSize from frame count * frame size - mActiveSleepTimeUs from activeSleepTimeUs() - mIdleSleepTimeUs from idleSleepTimeUs() - mStandbyDelayNs from mActiveSleepTimeUs (DIRECT only) - mStandbyDelayNs from mActiveSleepTimeUs (DIRECT only) or forced to at least kDefaultStandbyTimeInNsecs when connected to an A2DP device. - maxPeriod from frame count and sample rate (MIXER only) The parameters that affect these derived values are: Loading @@ -2561,6 +2563,15 @@ void AudioFlinger::PlaybackThread::cacheParameters_l() mSinkBufferSize = mNormalFrameCount * mFrameSize; mActiveSleepTimeUs = activeSleepTimeUs(); mIdleSleepTimeUs = idleSleepTimeUs(); // make sure standby delay is not too short when connected to an A2DP sink to avoid // truncating audio when going to standby. mStandbyDelayNs = AudioFlinger::mStandbyTimeInNsecs; if ((mOutDevice & AUDIO_DEVICE_OUT_ALL_A2DP) != 0) { if (mStandbyDelayNs < kDefaultStandbyTimeInNsecs) { mStandbyDelayNs = kDefaultStandbyTimeInNsecs; } } } void AudioFlinger::PlaybackThread::invalidateTracks(audio_stream_type_t streamType) Loading Loading @@ -4319,6 +4330,7 @@ bool AudioFlinger::MixerThread::checkForNewParameter_l(const String8& keyValuePa status_t& status) { bool reconfig = false; bool a2dpDeviceChanged = false; status = NO_ERROR; Loading Loading @@ -4398,6 +4410,8 @@ bool AudioFlinger::MixerThread::checkForNewParameter_l(const String8& keyValuePa // forward device change to effects that have requested to be // aware of attached audio device. if (value != AUDIO_DEVICE_NONE) { a2dpDeviceChanged = (mOutDevice & AUDIO_DEVICE_OUT_ALL_A2DP) != (value & AUDIO_DEVICE_OUT_ALL_A2DP); mOutDevice = value; for (size_t i = 0; i < mEffectChains.size(); i++) { mEffectChains[i]->setDevice_l(mOutDevice); Loading Loading @@ -4441,7 +4455,7 @@ bool AudioFlinger::MixerThread::checkForNewParameter_l(const String8& keyValuePa sq->push(FastMixerStateQueue::BLOCK_UNTIL_PUSHED); } return reconfig; return reconfig || a2dpDeviceChanged; } Loading Loading @@ -4877,6 +4891,7 @@ bool AudioFlinger::DirectOutputThread::checkForNewParameter_l(const String8& key status_t& status) { bool reconfig = false; bool a2dpDeviceChanged = false; status = NO_ERROR; Loading @@ -4887,6 +4902,8 @@ bool AudioFlinger::DirectOutputThread::checkForNewParameter_l(const String8& key // forward device change to effects that have requested to be // aware of attached audio device. if (value != AUDIO_DEVICE_NONE) { a2dpDeviceChanged = (mOutDevice & AUDIO_DEVICE_OUT_ALL_A2DP) != (value & AUDIO_DEVICE_OUT_ALL_A2DP); mOutDevice = value; for (size_t i = 0; i < mEffectChains.size(); i++) { mEffectChains[i]->setDevice_l(mOutDevice); Loading Loading @@ -4919,7 +4936,7 @@ bool AudioFlinger::DirectOutputThread::checkForNewParameter_l(const String8& key } } return reconfig; return reconfig || a2dpDeviceChanged; } uint32_t AudioFlinger::DirectOutputThread::activeSleepTimeUs() const Loading services/camera/libcameraservice/CameraService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ void CameraService::onFirstRef() ALOGE("Could not load camera HAL module: %d (%s)", err, strerror(-err)); logServiceError("Could not load camera HAL module", err); mNumberOfCameras = 0; mNumberOfNormalCameras = 0; return; } Loading Loading
media/libmediaplayerservice/MediaPlayerService.cpp +7 −2 Original line number Diff line number Diff line Loading @@ -1936,8 +1936,13 @@ void MediaPlayerService::AudioOutput::pause() void MediaPlayerService::AudioOutput::close() { ALOGV("close"); sp<AudioTrack> track; { Mutex::Autolock lock(mLock); close_l(); track = mTrack; close_l(); // clears mTrack } // destruction of the track occurs outside of mutex. } void MediaPlayerService::AudioOutput::setVolume(float left, float right) Loading
services/audioflinger/Threads.cpp +20 −3 Original line number Diff line number Diff line Loading @@ -1630,6 +1630,7 @@ void AudioFlinger::PlaybackThread::dumpInternals(int fd, const Vector<String16>& dprintf(fd, " Mixer buffer: %p\n", mMixerBuffer); dprintf(fd, " Effect buffer: %p\n", mEffectBuffer); dprintf(fd, " Fast track availMask=%#x\n", mFastTrackAvailMask); dprintf(fd, " Standby delay ns=%lld\n", (long long)mStandbyDelayNs); AudioStreamOut *output = mOutput; audio_output_flags_t flags = output != NULL ? output->flags : AUDIO_OUTPUT_FLAG_NONE; String8 flagsAsString = outputFlagsToString(flags); Loading Loading @@ -2542,7 +2543,8 @@ The derived values that are cached: - mSinkBufferSize from frame count * frame size - mActiveSleepTimeUs from activeSleepTimeUs() - mIdleSleepTimeUs from idleSleepTimeUs() - mStandbyDelayNs from mActiveSleepTimeUs (DIRECT only) - mStandbyDelayNs from mActiveSleepTimeUs (DIRECT only) or forced to at least kDefaultStandbyTimeInNsecs when connected to an A2DP device. - maxPeriod from frame count and sample rate (MIXER only) The parameters that affect these derived values are: Loading @@ -2561,6 +2563,15 @@ void AudioFlinger::PlaybackThread::cacheParameters_l() mSinkBufferSize = mNormalFrameCount * mFrameSize; mActiveSleepTimeUs = activeSleepTimeUs(); mIdleSleepTimeUs = idleSleepTimeUs(); // make sure standby delay is not too short when connected to an A2DP sink to avoid // truncating audio when going to standby. mStandbyDelayNs = AudioFlinger::mStandbyTimeInNsecs; if ((mOutDevice & AUDIO_DEVICE_OUT_ALL_A2DP) != 0) { if (mStandbyDelayNs < kDefaultStandbyTimeInNsecs) { mStandbyDelayNs = kDefaultStandbyTimeInNsecs; } } } void AudioFlinger::PlaybackThread::invalidateTracks(audio_stream_type_t streamType) Loading Loading @@ -4319,6 +4330,7 @@ bool AudioFlinger::MixerThread::checkForNewParameter_l(const String8& keyValuePa status_t& status) { bool reconfig = false; bool a2dpDeviceChanged = false; status = NO_ERROR; Loading Loading @@ -4398,6 +4410,8 @@ bool AudioFlinger::MixerThread::checkForNewParameter_l(const String8& keyValuePa // forward device change to effects that have requested to be // aware of attached audio device. if (value != AUDIO_DEVICE_NONE) { a2dpDeviceChanged = (mOutDevice & AUDIO_DEVICE_OUT_ALL_A2DP) != (value & AUDIO_DEVICE_OUT_ALL_A2DP); mOutDevice = value; for (size_t i = 0; i < mEffectChains.size(); i++) { mEffectChains[i]->setDevice_l(mOutDevice); Loading Loading @@ -4441,7 +4455,7 @@ bool AudioFlinger::MixerThread::checkForNewParameter_l(const String8& keyValuePa sq->push(FastMixerStateQueue::BLOCK_UNTIL_PUSHED); } return reconfig; return reconfig || a2dpDeviceChanged; } Loading Loading @@ -4877,6 +4891,7 @@ bool AudioFlinger::DirectOutputThread::checkForNewParameter_l(const String8& key status_t& status) { bool reconfig = false; bool a2dpDeviceChanged = false; status = NO_ERROR; Loading @@ -4887,6 +4902,8 @@ bool AudioFlinger::DirectOutputThread::checkForNewParameter_l(const String8& key // forward device change to effects that have requested to be // aware of attached audio device. if (value != AUDIO_DEVICE_NONE) { a2dpDeviceChanged = (mOutDevice & AUDIO_DEVICE_OUT_ALL_A2DP) != (value & AUDIO_DEVICE_OUT_ALL_A2DP); mOutDevice = value; for (size_t i = 0; i < mEffectChains.size(); i++) { mEffectChains[i]->setDevice_l(mOutDevice); Loading Loading @@ -4919,7 +4936,7 @@ bool AudioFlinger::DirectOutputThread::checkForNewParameter_l(const String8& key } } return reconfig; return reconfig || a2dpDeviceChanged; } uint32_t AudioFlinger::DirectOutputThread::activeSleepTimeUs() const Loading
services/camera/libcameraservice/CameraService.cpp +1 −0 Original line number Diff line number Diff line Loading @@ -153,6 +153,7 @@ void CameraService::onFirstRef() ALOGE("Could not load camera HAL module: %d (%s)", err, strerror(-err)); logServiceError("Could not load camera HAL module", err); mNumberOfCameras = 0; mNumberOfNormalCameras = 0; return; } Loading