summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Tracks.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-09-12 00:15:15 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-09-12 00:15:15 +0000
commitefc4d4899e03fb8464017dd48539106cec2163de (patch)
tree40e6503137bc0720b515c05b2d39771d1d25c7c7 /services/audioflinger/Tracks.cpp
parenta911f51c21430ac92f1d796b2338878fd98382e9 (diff)
parent9a54bc27876acd5d8be5b1fc3dc46701fe76fbb3 (diff)
downloadframeworks_av-efc4d4899e03fb8464017dd48539106cec2163de.zip
frameworks_av-efc4d4899e03fb8464017dd48539106cec2163de.tar.gz
frameworks_av-efc4d4899e03fb8464017dd48539106cec2163de.tar.bz2
Merge "audioflinger: add HOTWORD audio source." into klp-dev
Diffstat (limited to 'services/audioflinger/Tracks.cpp')
-rw-r--r--services/audioflinger/Tracks.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 6002aa3..821e4a5 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1770,6 +1770,16 @@ void AudioFlinger::RecordThread::RecordTrack::destroy()
}
}
+void AudioFlinger::RecordThread::RecordTrack::invalidate()
+{
+ // FIXME should use proxy, and needs work
+ audio_track_cblk_t* cblk = mCblk;
+ android_atomic_or(CBLK_INVALID, &cblk->mFlags);
+ android_atomic_release_store(0x40000000, &cblk->mFutex);
+ // client is not in server, so FUTEX_WAKE is needed instead of FUTEX_WAKE_PRIVATE
+ (void) __futex_syscall3(&cblk->mFutex, FUTEX_WAKE, INT_MAX);
+}
+
/*static*/ void AudioFlinger::RecordThread::RecordTrack::appendDumpHeader(String8& result)
{