Adding Audio HAL V5: Direction API
Bug: 119137468
Test: Testbed app.
Change-Id: I1b3c81079000958da80d36616fe06930d876aac3
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 9a7f1f1..d23d19d 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1710,6 +1710,18 @@
mRecordTrack->getActiveMicrophones(activeMicrophones));
}
+binder::Status AudioFlinger::RecordHandle::setMicrophoneDirection(
+ int /*audio_microphone_direction_t*/ direction) {
+ ALOGV("%s()", __func__);
+ return binder::Status::fromStatusT(mRecordTrack->setMicrophoneDirection(
+ static_cast<audio_microphone_direction_t>(direction)));
+}
+
+binder::Status AudioFlinger::RecordHandle::setMicrophoneFieldDimension(float zoom) {
+ ALOGV("%s()", __func__);
+ return binder::Status::fromStatusT(mRecordTrack->setMicrophoneFieldDimension(zoom));
+}
+
// ----------------------------------------------------------------------------
#undef LOG_TAG
#define LOG_TAG "AF::RecordTrack"
@@ -2004,6 +2016,27 @@
}
}
+status_t AudioFlinger::RecordThread::RecordTrack::setMicrophoneDirection(
+ audio_microphone_direction_t direction) {
+ sp<ThreadBase> thread = mThread.promote();
+ if (thread != 0) {
+ RecordThread *recordThread = (RecordThread *)thread.get();
+ return recordThread->setMicrophoneDirection(direction);
+ } else {
+ return BAD_VALUE;
+ }
+}
+
+status_t AudioFlinger::RecordThread::RecordTrack::setMicrophoneFieldDimension(float zoom) {
+ sp<ThreadBase> thread = mThread.promote();
+ if (thread != 0) {
+ RecordThread *recordThread = (RecordThread *)thread.get();
+ return recordThread->setMicrophoneFieldDimension(zoom);
+ } else {
+ return BAD_VALUE;
+ }
+}
+
// ----------------------------------------------------------------------------
#undef LOG_TAG
#define LOG_TAG "AF::PatchRecord"