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

Skip to content
Commit 9555ad75 authored by Mikhail Naganov's avatar Mikhail Naganov
Browse files

libaudiohal@aidl: Provide HIDL-like 'createMmapBuffer'

If the AIDL HAL is at least V4 or it advertises MMAP
buffer re-creation support via the parameter
'aosp.createMmapBuffer' then use this call to implement
'StreamHalInterface::createMmapBuffer'. This allows
receiving updated file descriptor for the shared buffer.

Also, since AIDL HALs implementing 'createMmapBuffer'
(either way) will need to pass VTS tests which require
continuous non-retrograde hardware position reporting,
add necessary logic for offsetting the harware position
when reporting it to the framework, in order to stay
compatible with the HIDL behavior.

Another change is to use `burst` command for retrieving
the hardware position for MMAP streams that implement
'createMmapBuffer'. This is to fulfil the HAL API contract
which suggests that MMAP streams also use `burst` command
during audio I/O.

Bug: 274456992
Test: atest CoreAudioHalAidlTest
Test: atest CtsNativeMediaAAudioTestCases
Change-Id: I209c80b951758f8dd5f60e6df1992b29c010d118
parent ea785f09
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