summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/Tracks.cpp
diff options
context:
space:
mode:
authorEric Laurent <elaurent@google.com>2013-09-09 09:08:44 -0700
committerEric Laurent <elaurent@google.com>2013-09-10 14:39:28 -0700
commit9a54bc27876acd5d8be5b1fc3dc46701fe76fbb3 (patch)
tree15f25097fc7fc2548d41a29c94c22710472f01ca /services/audioflinger/Tracks.cpp
parent84b7fb0c88ddd05ed7c148c82fe1691040a9404d (diff)
downloadframeworks_av-9a54bc27876acd5d8be5b1fc3dc46701fe76fbb3.zip
frameworks_av-9a54bc27876acd5d8be5b1fc3dc46701fe76fbb3.tar.gz
frameworks_av-9a54bc27876acd5d8be5b1fc3dc46701fe76fbb3.tar.bz2
audioflinger: add HOTWORD audio source.
HOTWORD is a special capture audio source that uses the same audio tuning as VOICE_RECOGNITION but allows an active capture to be preempted. Bug: 10640877. Change-Id: Iea09a11cbcdbacc8d434e5230e7559dcd1b44ac0
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 2042050..9103932 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1760,6 +1760,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)
{