Revert "audio policy: refactor audio record APIs"
This reverts commit 0f4b3c5449f85c1cd78e1b9ac4850de962b8edbe.
Bug: 72628781
Test: Capture several videos from camera app
Change-Id: I6bcc87c618ac9bfe5c911915cbb37de616bc727a
diff --git a/services/audioflinger/Tracks.cpp b/services/audioflinger/Tracks.cpp
index 06bbf1e..cdd8ca0 100644
--- a/services/audioflinger/Tracks.cpp
+++ b/services/audioflinger/Tracks.cpp
@@ -1687,7 +1687,7 @@
if (thread != 0) {
RecordThread *recordThread = (RecordThread *)thread.get();
if (recordThread->stop(this) && isExternalTrack()) {
- AudioSystem::stopInput(mPortId);
+ AudioSystem::stopInput(mThreadIoHandle, mSessionId);
}
}
}
@@ -1699,9 +1699,9 @@
{
if (isExternalTrack()) {
if (mState == ACTIVE || mState == RESUMING) {
- AudioSystem::stopInput(mPortId);
+ AudioSystem::stopInput(mThreadIoHandle, mSessionId);
}
- AudioSystem::releaseInput(mPortId);
+ AudioSystem::releaseInput(mThreadIoHandle, mSessionId);
}
sp<ThreadBase> thread = mThread.promote();
if (thread != 0) {