Loading services/audioflinger/AudioFlinger.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -533,6 +533,8 @@ status_t AudioFlinger::dump(int fd, const Vector<String16>& args) dev->dump(fd); } mPatchPanel.dump(fd); #ifdef TEE_SINK // dump the serially shared record tee sink if (mRecordTeeSource != 0) { Loading services/audioflinger/PatchPanel.cpp +30 −0 Original line number Diff line number Diff line Loading @@ -467,6 +467,14 @@ void AudioFlinger::PatchPanel::Patch::clearConnections(PatchPanel *panel) mPlayback.closeConnections(panel); } String8 AudioFlinger::PatchPanel::Patch::dump(audio_patch_handle_t myHandle) { String8 result; result.appendFormat("Patch %d: thread %p => thread %p\n", myHandle, mRecord.thread().get(), mPlayback.thread().get()); return result; } /* Disconnect a patch */ status_t AudioFlinger::PatchPanel::releaseAudioPatch(audio_patch_handle_t handle) { Loading Loading @@ -555,4 +563,26 @@ sp<DeviceHalInterface> AudioFlinger::PatchPanel::findHwDeviceByModule(audio_modu return mAudioFlinger.mAudioHwDevs.valueAt(index)->hwDevice(); } void AudioFlinger::PatchPanel::dump(int fd) { // Only dump software patches. bool headerPrinted = false; for (auto& iter : mPatches) { if (iter.second.isSoftware()) { if (!headerPrinted) { String8 header("\nSoftware patches:\n"); write(fd, header.string(), header.size()); headerPrinted = true; } String8 patchDump(" "); patchDump.append(iter.second.dump(iter.first)); write(fd, patchDump.string(), patchDump.size()); } } if (headerPrinted) { String8 trailing("\n"); write(fd, trailing.string(), trailing.size()); } } } // namespace android services/audioflinger/PatchPanel.h +4 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ public: status_t listAudioPatches(unsigned int *num_patches, struct audio_patch *patches); void dump(int fd); private: template<typename ThreadType, typename TrackType> class Endpoint { Loading Loading @@ -116,6 +118,8 @@ private: return mRecord.handle() != AUDIO_PATCH_HANDLE_NONE || mPlayback.handle() != AUDIO_PATCH_HANDLE_NONE; } String8 dump(audio_patch_handle_t myHandle); // Note that audio_patch::id is only unique within a HAL module struct audio_patch mAudioPatch; // handle for audio HAL patch handle present only when the audio HAL version is >= 3.0 Loading Loading
services/audioflinger/AudioFlinger.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -533,6 +533,8 @@ status_t AudioFlinger::dump(int fd, const Vector<String16>& args) dev->dump(fd); } mPatchPanel.dump(fd); #ifdef TEE_SINK // dump the serially shared record tee sink if (mRecordTeeSource != 0) { Loading
services/audioflinger/PatchPanel.cpp +30 −0 Original line number Diff line number Diff line Loading @@ -467,6 +467,14 @@ void AudioFlinger::PatchPanel::Patch::clearConnections(PatchPanel *panel) mPlayback.closeConnections(panel); } String8 AudioFlinger::PatchPanel::Patch::dump(audio_patch_handle_t myHandle) { String8 result; result.appendFormat("Patch %d: thread %p => thread %p\n", myHandle, mRecord.thread().get(), mPlayback.thread().get()); return result; } /* Disconnect a patch */ status_t AudioFlinger::PatchPanel::releaseAudioPatch(audio_patch_handle_t handle) { Loading Loading @@ -555,4 +563,26 @@ sp<DeviceHalInterface> AudioFlinger::PatchPanel::findHwDeviceByModule(audio_modu return mAudioFlinger.mAudioHwDevs.valueAt(index)->hwDevice(); } void AudioFlinger::PatchPanel::dump(int fd) { // Only dump software patches. bool headerPrinted = false; for (auto& iter : mPatches) { if (iter.second.isSoftware()) { if (!headerPrinted) { String8 header("\nSoftware patches:\n"); write(fd, header.string(), header.size()); headerPrinted = true; } String8 patchDump(" "); patchDump.append(iter.second.dump(iter.first)); write(fd, patchDump.string(), patchDump.size()); } } if (headerPrinted) { String8 trailing("\n"); write(fd, trailing.string(), trailing.size()); } } } // namespace android
services/audioflinger/PatchPanel.h +4 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ public: status_t listAudioPatches(unsigned int *num_patches, struct audio_patch *patches); void dump(int fd); private: template<typename ThreadType, typename TrackType> class Endpoint { Loading Loading @@ -116,6 +118,8 @@ private: return mRecord.handle() != AUDIO_PATCH_HANDLE_NONE || mPlayback.handle() != AUDIO_PATCH_HANDLE_NONE; } String8 dump(audio_patch_handle_t myHandle); // Note that audio_patch::id is only unique within a HAL module struct audio_patch mAudioPatch; // handle for audio HAL patch handle present only when the audio HAL version is >= 3.0 Loading