Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01128a03 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "Workaround AudioRecord bug for large buffer sizes"

parents 269e91be 93bb77da
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -482,7 +482,8 @@ void ServerProxy::releaseBuffer(Buffer* buffer)
    } else if (minimum > half) {
        minimum = half;
    }
    if (!mDeferWake && mAvailToClient + stepCount >= minimum) {
    // FIXME AudioRecord wakeup needs to be optimized; it currently wakes up client every time
    if (!mIsOut || (!mDeferWake && mAvailToClient + stepCount >= minimum)) {
        ALOGV("mAvailToClient=%u stepCount=%u minimum=%u", mAvailToClient, stepCount, minimum);
        int32_t old = android_atomic_or(CBLK_FUTEX_WAKE, &cblk->mFutex);
        if (!(old & CBLK_FUTEX_WAKE)) {