audio: Implement compressed offload simulation
Add 'StreamOffloadStub' to 'ModulePrimary' which simulates
offloaded playback ('COMPRESS_OFFLOAD') and can send asynchronous
callbacks. The simulation only keeps track of the playback
time, it does not actually decode compressed audio. This
approach was chosen to avoid linking against any decoder
implementation.
For the same reason, the only supported format is 'APE' ("Monkey
audio") which was chosen due to the simplicity of its header
structure.
As 'StreamOffloadStub' provides a proper implementation of
'EARLY_NOTIFY' drain callbacks, there is no more need to use
'aosp.forceDrainToDraining' property in VTS, and support for
it has been removed.
Bug: 373872271
Bug: 384431822
Test: atest CtsMediaAudioTestCases
Test: atest VtsHalAudioCoreTargetTest
Change-Id: I74ae867227c768d4afe9314ed93168da58362131
diff --git a/audio/aidl/default/Android.bp b/audio/aidl/default/Android.bp
index 687d8fc..230c717 100644
--- a/audio/aidl/default/Android.bp
+++ b/audio/aidl/default/Android.bp
@@ -77,8 +77,10 @@
"r_submix/ModuleRemoteSubmix.cpp",
"r_submix/SubmixRoute.cpp",
"r_submix/StreamRemoteSubmix.cpp",
+ "stub/ApeHeader.cpp",
"stub/DriverStubImpl.cpp",
"stub/ModuleStub.cpp",
+ "stub/StreamOffloadStub.cpp",
"stub/StreamStub.cpp",
"usb/ModuleUsb.cpp",
"usb/StreamUsb.cpp",