Loading services/audioflinger/AudioFlinger.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -520,7 +520,7 @@ status_t AudioFlinger::dump(int fd, const Vector<String16>& args) #ifdef TEE_SINK // dump the serially shared record tee sink if (mRecordTeeSource != 0) { dumpTee(fd, mRecordTeeSource); dumpTee(fd, mRecordTeeSource, AUDIO_IO_HANDLE_NONE, 'C'); } #endif Loading Loading @@ -3261,7 +3261,7 @@ int comparEntry(const void *p1, const void *p2) } #ifdef TEE_SINK void AudioFlinger::dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id) void AudioFlinger::dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id, char suffix) { NBAIO_Source *teeSource = source.get(); if (teeSource != NULL) { Loading Loading @@ -3323,7 +3323,8 @@ void AudioFlinger::dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_hand struct tm tm; localtime_r(&tv.tv_sec, &tm); strftime(teeTime, sizeof(teeTime), "%Y%m%d%H%M%S", &tm); snprintf(&teePath[teePathLen], sizeof(teePath) - teePathLen, "%s_%d.wav", teeTime, id); snprintf(&teePath[teePathLen], sizeof(teePath) - teePathLen, "%s_%d_%c.wav", teeTime, id, suffix); // if 2 dumpsys are done within 1 second, and rotation didn't work, then discard 2nd int teeFd = open(teePath, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, S_IRUSR | S_IWUSR); if (teeFd >= 0) { Loading services/audioflinger/AudioFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -825,7 +825,7 @@ public: #ifdef TEE_SINK // tee sink, if enabled by property, allows dumpsys to write most recent audio to .wav file static void dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id = 0); static void dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id, char suffix); // whether tee sink is enabled by property static bool mTeeSinkInputEnabled; Loading services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -4751,7 +4751,7 @@ void AudioFlinger::MixerThread::dumpInternals(int fd, const Vector<String16>& ar #ifdef TEE_SINK // Write the tee output to a .wav file dumpTee(fd, mTeeSource, mId); dumpTee(fd, mTeeSource, mId, 'M'); #endif } Loading services/audioflinger/Tracks.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ status_t AudioFlinger::ThreadBase::TrackBase::initCheck() const AudioFlinger::ThreadBase::TrackBase::~TrackBase() { #ifdef TEE_SINK dumpTee(-1, mTeeSource, mId); dumpTee(-1, mTeeSource, mId, 'T'); #endif // delete the proxy before deleting the shared memory it refers to, to avoid dangling reference mServerProxy.clear(); Loading Loading
services/audioflinger/AudioFlinger.cpp +4 −3 Original line number Diff line number Diff line Loading @@ -520,7 +520,7 @@ status_t AudioFlinger::dump(int fd, const Vector<String16>& args) #ifdef TEE_SINK // dump the serially shared record tee sink if (mRecordTeeSource != 0) { dumpTee(fd, mRecordTeeSource); dumpTee(fd, mRecordTeeSource, AUDIO_IO_HANDLE_NONE, 'C'); } #endif Loading Loading @@ -3261,7 +3261,7 @@ int comparEntry(const void *p1, const void *p2) } #ifdef TEE_SINK void AudioFlinger::dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id) void AudioFlinger::dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id, char suffix) { NBAIO_Source *teeSource = source.get(); if (teeSource != NULL) { Loading Loading @@ -3323,7 +3323,8 @@ void AudioFlinger::dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_hand struct tm tm; localtime_r(&tv.tv_sec, &tm); strftime(teeTime, sizeof(teeTime), "%Y%m%d%H%M%S", &tm); snprintf(&teePath[teePathLen], sizeof(teePath) - teePathLen, "%s_%d.wav", teeTime, id); snprintf(&teePath[teePathLen], sizeof(teePath) - teePathLen, "%s_%d_%c.wav", teeTime, id, suffix); // if 2 dumpsys are done within 1 second, and rotation didn't work, then discard 2nd int teeFd = open(teePath, O_WRONLY | O_CREAT | O_EXCL | O_NOFOLLOW, S_IRUSR | S_IWUSR); if (teeFd >= 0) { Loading
services/audioflinger/AudioFlinger.h +1 −1 Original line number Diff line number Diff line Loading @@ -825,7 +825,7 @@ public: #ifdef TEE_SINK // tee sink, if enabled by property, allows dumpsys to write most recent audio to .wav file static void dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id = 0); static void dumpTee(int fd, const sp<NBAIO_Source>& source, audio_io_handle_t id, char suffix); // whether tee sink is enabled by property static bool mTeeSinkInputEnabled; Loading
services/audioflinger/Threads.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -4751,7 +4751,7 @@ void AudioFlinger::MixerThread::dumpInternals(int fd, const Vector<String16>& ar #ifdef TEE_SINK // Write the tee output to a .wav file dumpTee(fd, mTeeSource, mId); dumpTee(fd, mTeeSource, mId, 'M'); #endif } Loading
services/audioflinger/Tracks.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -234,7 +234,7 @@ status_t AudioFlinger::ThreadBase::TrackBase::initCheck() const AudioFlinger::ThreadBase::TrackBase::~TrackBase() { #ifdef TEE_SINK dumpTee(-1, mTeeSource, mId); dumpTee(-1, mTeeSource, mId, 'T'); #endif // delete the proxy before deleting the shared memory it refers to, to avoid dangling reference mServerProxy.clear(); Loading