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

Commit 3043b13c authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

StreamHalAidl: Treat MMAP 'stop' as 'pause'

Since MMAP 'stop' does not assume that the shared buffer handler
can be invalidated, the framework does not call
'createMmapBuffer' when starting after a 'stop'. However, the
AIDL HAL stream state machine automatically moves into 'STANDBY'
after 'flush', and this may invalidate the shared buffer.

The solution is to avoid calling 'flush' and anticipate that an
input stream can be in a 'PAUSED' state when the framework wants
to start it. Since the HAL may report "overruns" (lost frames)
while having the hardware is producing frames but the client
is not consuming them, ignore 'xrunFrames' when exiting paused
state.

Flag: EXEMPT BUGFIX
Bug: 419693182
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: I572c908604e967cdbd999fd1bf8224a802717c78
parent c9d3ce6a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment