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

Skip to content
Commit c5f4587c authored by Ytai Ben-Tsvi's avatar Ytai Ben-Tsvi
Browse files

Convert AAudioService to AIDL

This change removes all hand-written binder code associated with
parceling of AAudio types and IAAudioService interface.

The existing types defined in the 'binding' directory have not been
replaced by their AIDL counterparts, but rather were made convertible
to/from them (in lieu of them being parcelables themselves).
The reasons are:
- Some of those types offer additional functionality rather than
  simply being data containers / serializers. For example, the
  SharedMemoryParcelable type supports mmaping a memory region.
- Reduce impact on existing code, which relies on the interface
  offered by those type, which is different than the interface offered
  by their AIDL counterparts.

The conversion between those types and their parcelable counterparts
is handled at the edge of the client (inside AAudioBinderAdapter) and
server (inside AAudioService) code.

Future changes may gradually get rid of the duality by retiring the
data types in the 'binding' directory, inlining some of the features
they are offering (such as accessor methods) and replacing others with
utility functions, operation on the parcelables directly.

Bug: 160253486
Test: Manual testing using OboeTester
      Ran atest CtsNativeMediaAAudioTestCases
      Ran atest test_aaudio_marshalling
Change-Id: I6eed19246a472dc31c1e2d6d2112d7562cf8940c
parent 734e3505
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment