Loading services/audiopolicy/common/managerdefinitions/include/ClientDescriptor.h +5 −1 Original line number Diff line number Diff line Loading @@ -180,8 +180,12 @@ public: return it->second; } virtual void removeClient(audio_port_handle_t portId) { LOG_ALWAYS_FATAL_IF(mClients.erase(portId) == 0, auto it = mClients.find(portId); LOG_ALWAYS_FATAL_IF(it == mClients.end(), "%s(%d): client does not exist", __func__, portId); LOG_ALWAYS_FATAL_IF(it->second->active(), "%s(%d): removing client still active!", __func__, portId); (void)mClients.erase(it); } size_t getClientCount() const { return mClients.size(); Loading services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -257,6 +257,9 @@ void AudioInputDescriptor::close() mProfile->curActiveCount--; } mProfile->curOpenCount--; LOG_ALWAYS_FATAL_IF(mProfile->curOpenCount < mProfile->curActiveCount, "%s(%d): mProfile->curOpenCount %d < mProfile->curActiveCount %d.", __func__, mId, mProfile->curOpenCount, mProfile->curActiveCount); mIoHandle = AUDIO_IO_HANDLE_NONE; } } Loading @@ -272,8 +275,9 @@ void AudioInputDescriptor::setClientActive(const sp<RecordClientDescriptor>& cli // Handle non-client-specific activity ref count int32_t oldGlobalActiveCount = mGlobalActiveCount; if (!active && mGlobalActiveCount < 1) { ALOGW("%s invalid deactivation with globalRefCount %d", __FUNCTION__, mGlobalActiveCount); mGlobalActiveCount = 1; LOG_ALWAYS_FATAL("%s(%d) invalid deactivation with globalActiveCount %d", __func__, client->portId(), mGlobalActiveCount); // mGlobalActiveCount = 1; } const int delta = active ? 1 : -1; mGlobalActiveCount += delta; Loading Loading
services/audiopolicy/common/managerdefinitions/include/ClientDescriptor.h +5 −1 Original line number Diff line number Diff line Loading @@ -180,8 +180,12 @@ public: return it->second; } virtual void removeClient(audio_port_handle_t portId) { LOG_ALWAYS_FATAL_IF(mClients.erase(portId) == 0, auto it = mClients.find(portId); LOG_ALWAYS_FATAL_IF(it == mClients.end(), "%s(%d): client does not exist", __func__, portId); LOG_ALWAYS_FATAL_IF(it->second->active(), "%s(%d): removing client still active!", __func__, portId); (void)mClients.erase(it); } size_t getClientCount() const { return mClients.size(); Loading
services/audiopolicy/common/managerdefinitions/src/AudioInputDescriptor.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -257,6 +257,9 @@ void AudioInputDescriptor::close() mProfile->curActiveCount--; } mProfile->curOpenCount--; LOG_ALWAYS_FATAL_IF(mProfile->curOpenCount < mProfile->curActiveCount, "%s(%d): mProfile->curOpenCount %d < mProfile->curActiveCount %d.", __func__, mId, mProfile->curOpenCount, mProfile->curActiveCount); mIoHandle = AUDIO_IO_HANDLE_NONE; } } Loading @@ -272,8 +275,9 @@ void AudioInputDescriptor::setClientActive(const sp<RecordClientDescriptor>& cli // Handle non-client-specific activity ref count int32_t oldGlobalActiveCount = mGlobalActiveCount; if (!active && mGlobalActiveCount < 1) { ALOGW("%s invalid deactivation with globalRefCount %d", __FUNCTION__, mGlobalActiveCount); mGlobalActiveCount = 1; LOG_ALWAYS_FATAL("%s(%d) invalid deactivation with globalActiveCount %d", __func__, client->portId(), mGlobalActiveCount); // mGlobalActiveCount = 1; } const int delta = active ? 1 : -1; mGlobalActiveCount += delta; Loading