Loading media/libaudioclient/IAudioFlinger.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -923,6 +923,11 @@ status_t AudioFlingerClientAdapter::setTracksInternalMute( return statusTFromBinderStatus(mDelegate->setTracksInternalMute(tracksInternalMuted)); } status_t AudioFlingerClientAdapter::resetReferencesForTest() { RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mDelegate->resetReferencesForTest())); return OK; } //////////////////////////////////////////////////////////////////////////////////////////////////// // AudioFlingerServerAdapter AudioFlingerServerAdapter::AudioFlingerServerAdapter( Loading Loading @@ -1487,4 +1492,9 @@ Status AudioFlingerServerAdapter::setTracksInternalMute( return Status::fromStatusT(mDelegate->setTracksInternalMute(tracksInternalMute)); } Status AudioFlingerServerAdapter::resetReferencesForTest() { RETURN_BINDER_IF_ERROR(mDelegate->resetReferencesForTest()); return Status::ok(); } } // namespace android media/libaudioclient/aidl/android/media/IAudioFlingerService.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,12 @@ interface IAudioFlingerService { */ void setTracksInternalMute(in TrackInternalMuteInfo[] tracksInternalMute); /* * Reset Circular references in AudioFlinger service. * Test API */ void resetReferencesForTest(); // When adding a new method, please review and update // IAudioFlinger.h AudioFlingerServerAdapter::Delegate::TransactionCode // AudioFlinger.cpp AudioFlinger::onTransactWrapper() Loading media/libaudioclient/include/media/IAudioFlinger.h +6 −0 Original line number Diff line number Diff line Loading @@ -392,6 +392,8 @@ public: virtual status_t setTracksInternalMute( const std::vector<media::TrackInternalMuteInfo>& tracksInternalMute) = 0; virtual status_t resetReferencesForTest() = 0; }; /** Loading Loading @@ -510,6 +512,7 @@ public: struct audio_port_v7 *mixPort) const override; status_t setTracksInternalMute( const std::vector<media::TrackInternalMuteInfo>& tracksInternalMute) override; status_t resetReferencesForTest() override; private: const sp<media::IAudioFlingerService> mDelegate; Loading Loading @@ -613,6 +616,8 @@ public: media::BnAudioFlingerService::TRANSACTION_getAudioPolicyConfig, GET_AUDIO_MIX_PORT = media::BnAudioFlingerService::TRANSACTION_getAudioMixPort, SET_TRACKS_INTERNAL_MUTE = media::BnAudioFlingerService::TRANSACTION_setTracksInternalMute, RESET_REFERENCES_FOR_TEST = media::BnAudioFlingerService::TRANSACTION_resetReferencesForTest, }; protected: Loading Loading @@ -751,6 +756,7 @@ public: media::AudioPortFw* _aidl_return) override; Status setTracksInternalMute( const std::vector<media::TrackInternalMuteInfo>& tracksInternalMute) override; Status resetReferencesForTest() override; private: const sp<AudioFlingerServerAdapter::Delegate> mDelegate; }; Loading services/audioflinger/AudioFlinger.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ BINDER_METHOD_ENTRY(supportsBluetoothVariableLatency) \ BINDER_METHOD_ENTRY(getSoundDoseInterface) \ BINDER_METHOD_ENTRY(getAudioPolicyConfig) \ BINDER_METHOD_ENTRY(getAudioMixPort) \ BINDER_METHOD_ENTRY(resetReferencesForTest) \ // singleton for Binder Method Statistics for IAudioFlinger static auto& getIAudioFlingerStatistics() { Loading Loading @@ -466,6 +467,8 @@ AudioFlinger::~AudioFlinger() sMediaLogService->unregisterWriter(iMemory); } } mMediaLogNotifier->requestExit(); mPatchCommandThread->exit(); } //static Loading Loading @@ -4986,6 +4989,13 @@ status_t AudioFlinger::setTracksInternalMute( return NO_ERROR; } status_t AudioFlinger::resetReferencesForTest() { mDeviceEffectManager.clear(); mPatchPanel.clear(); mMelReporter->resetReferencesForTest(); return NO_ERROR; } // ---------------------------------------------------------------------------- status_t AudioFlinger::onTransactWrapper(TransactionCode code, Loading Loading @@ -5021,6 +5031,7 @@ status_t AudioFlinger::onTransactWrapper(TransactionCode code, case TransactionCode::GET_AUDIO_POLICY_CONFIG: case TransactionCode::GET_AUDIO_MIX_PORT: case TransactionCode::SET_TRACKS_INTERNAL_MUTE: case TransactionCode::RESET_REFERENCES_FOR_TEST: ALOGW("%s: transaction %d received from PID %d", __func__, static_cast<int>(code), IPCThreadState::self()->getCallingPid()); // return status only for non void methods Loading services/audioflinger/AudioFlinger.h +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,8 @@ class AudioFlinger public: static void instantiate() ANDROID_API; status_t resetReferencesForTest(); private: // ---- begin IAudioFlinger interface Loading Loading
media/libaudioclient/IAudioFlinger.cpp +10 −0 Original line number Diff line number Diff line Loading @@ -923,6 +923,11 @@ status_t AudioFlingerClientAdapter::setTracksInternalMute( return statusTFromBinderStatus(mDelegate->setTracksInternalMute(tracksInternalMuted)); } status_t AudioFlingerClientAdapter::resetReferencesForTest() { RETURN_STATUS_IF_ERROR(statusTFromBinderStatus(mDelegate->resetReferencesForTest())); return OK; } //////////////////////////////////////////////////////////////////////////////////////////////////// // AudioFlingerServerAdapter AudioFlingerServerAdapter::AudioFlingerServerAdapter( Loading Loading @@ -1487,4 +1492,9 @@ Status AudioFlingerServerAdapter::setTracksInternalMute( return Status::fromStatusT(mDelegate->setTracksInternalMute(tracksInternalMute)); } Status AudioFlingerServerAdapter::resetReferencesForTest() { RETURN_BINDER_IF_ERROR(mDelegate->resetReferencesForTest()); return Status::ok(); } } // namespace android
media/libaudioclient/aidl/android/media/IAudioFlingerService.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -299,6 +299,12 @@ interface IAudioFlingerService { */ void setTracksInternalMute(in TrackInternalMuteInfo[] tracksInternalMute); /* * Reset Circular references in AudioFlinger service. * Test API */ void resetReferencesForTest(); // When adding a new method, please review and update // IAudioFlinger.h AudioFlingerServerAdapter::Delegate::TransactionCode // AudioFlinger.cpp AudioFlinger::onTransactWrapper() Loading
media/libaudioclient/include/media/IAudioFlinger.h +6 −0 Original line number Diff line number Diff line Loading @@ -392,6 +392,8 @@ public: virtual status_t setTracksInternalMute( const std::vector<media::TrackInternalMuteInfo>& tracksInternalMute) = 0; virtual status_t resetReferencesForTest() = 0; }; /** Loading Loading @@ -510,6 +512,7 @@ public: struct audio_port_v7 *mixPort) const override; status_t setTracksInternalMute( const std::vector<media::TrackInternalMuteInfo>& tracksInternalMute) override; status_t resetReferencesForTest() override; private: const sp<media::IAudioFlingerService> mDelegate; Loading Loading @@ -613,6 +616,8 @@ public: media::BnAudioFlingerService::TRANSACTION_getAudioPolicyConfig, GET_AUDIO_MIX_PORT = media::BnAudioFlingerService::TRANSACTION_getAudioMixPort, SET_TRACKS_INTERNAL_MUTE = media::BnAudioFlingerService::TRANSACTION_setTracksInternalMute, RESET_REFERENCES_FOR_TEST = media::BnAudioFlingerService::TRANSACTION_resetReferencesForTest, }; protected: Loading Loading @@ -751,6 +756,7 @@ public: media::AudioPortFw* _aidl_return) override; Status setTracksInternalMute( const std::vector<media::TrackInternalMuteInfo>& tracksInternalMute) override; Status resetReferencesForTest() override; private: const sp<AudioFlingerServerAdapter::Delegate> mDelegate; }; Loading
services/audioflinger/AudioFlinger.cpp +11 −0 Original line number Diff line number Diff line Loading @@ -193,6 +193,7 @@ BINDER_METHOD_ENTRY(supportsBluetoothVariableLatency) \ BINDER_METHOD_ENTRY(getSoundDoseInterface) \ BINDER_METHOD_ENTRY(getAudioPolicyConfig) \ BINDER_METHOD_ENTRY(getAudioMixPort) \ BINDER_METHOD_ENTRY(resetReferencesForTest) \ // singleton for Binder Method Statistics for IAudioFlinger static auto& getIAudioFlingerStatistics() { Loading Loading @@ -466,6 +467,8 @@ AudioFlinger::~AudioFlinger() sMediaLogService->unregisterWriter(iMemory); } } mMediaLogNotifier->requestExit(); mPatchCommandThread->exit(); } //static Loading Loading @@ -4986,6 +4989,13 @@ status_t AudioFlinger::setTracksInternalMute( return NO_ERROR; } status_t AudioFlinger::resetReferencesForTest() { mDeviceEffectManager.clear(); mPatchPanel.clear(); mMelReporter->resetReferencesForTest(); return NO_ERROR; } // ---------------------------------------------------------------------------- status_t AudioFlinger::onTransactWrapper(TransactionCode code, Loading Loading @@ -5021,6 +5031,7 @@ status_t AudioFlinger::onTransactWrapper(TransactionCode code, case TransactionCode::GET_AUDIO_POLICY_CONFIG: case TransactionCode::GET_AUDIO_MIX_PORT: case TransactionCode::SET_TRACKS_INTERNAL_MUTE: case TransactionCode::RESET_REFERENCES_FOR_TEST: ALOGW("%s: transaction %d received from PID %d", __func__, static_cast<int>(code), IPCThreadState::self()->getCallingPid()); // return status only for non void methods Loading
services/audioflinger/AudioFlinger.h +2 −0 Original line number Diff line number Diff line Loading @@ -62,6 +62,8 @@ class AudioFlinger public: static void instantiate() ANDROID_API; status_t resetReferencesForTest(); private: // ---- begin IAudioFlinger interface Loading