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

Commit 9ce67b52 authored by Haynes Mathew George's avatar Haynes Mathew George Committed by Glenn Kasten
Browse files

Park FastCapture in HOT_IDLE while processing new parameters

Without this, FastCapture can starve RecordThread delaying
handling of new parameters.

Bug: 24667895
Change-Id: Idb7113b7b0f96f2c35c655b6fdb3279f119ad1a3
parent 15ac558b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6991,6 +6991,10 @@ bool AudioFlinger::RecordThread::checkForNewParameter_l(const String8& keyValueP

    AudioParameter param = AudioParameter(keyValuePair);
    int value;

    // scope for AutoPark extends to end of method
    AutoPark<FastCapture> park(mFastCapture);

    // TODO Investigate when this code runs. Check with audio policy when a sample rate and
    //      channel count change can be requested. Do we mandate the first client defines the
    //      HAL sampling rate and channel count or do we allow changes on the fly?