Implement audio devices and streams HAL delegating to legacy HAL
Changes made to the .hal definition:
- introduce Effect ID returned by the IEffectsFactory that
needs to be passed to IStream.{add|remove}Effect; otherwise
it's impossible to retrieve the underlying HAL effect handle;
- change "bus address" in DeviceAddress to "string" type;
- fix signature of some methods w.r.t. returning Result;
- remove unused "struct AudioPatch".
Bug: 30222631
Test: make
Change-Id: Icb51729ef57bb2a5b0b78609735e7481bc04f95c
diff --git a/audio/2.0/IStream.hal b/audio/2.0/IStream.hal
index 09ba42a..dc43346 100644
--- a/audio/2.0/IStream.hal
+++ b/audio/2.0/IStream.hal
@@ -134,18 +134,20 @@
/*
* Applies audio effect to the stream.
*
- * @param effect the effect to apply.
+ * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
+ * the effect to apply.
* @return retval operation completion status.
*/
- addEffect(IEffect effect) generates (Result retval);
+ addEffect(uint64_t effectId) generates (Result retval);
/*
* Stops application of the effect to the stream.
*
- * @param effect the effect to apply.
+ * @param effectId effect ID (obtained from IEffectsFactory.createEffect) of
+ * the effect to remove.
* @return retval operation completion status.
*/
- removeEffect(IEffect effect) generates (Result retval);
+ removeEffect(uint64_t effectId) generates (Result retval);
/*
* Put the audio hardware input/output into standby mode.
@@ -158,10 +160,9 @@
/*
* Return the set of device(s) which this stream is connected to.
*
- * @return retval operation completion status.
* @return device set of device(s) which this stream is connected to.
*/
- getDevice() generates (Result retval, AudioDevice device);
+ getDevice() generates (AudioDevice device);
/*
* Connects the stream to the device.