Audio V4: Forward tracks attributes to the hal

Forward to the HAL the audio usage, audio content types and volume
of playback tracks to the stream out they are playing to.

Forward to the HAL the audio source and volume of record tracks
to the stream in they are playing to.

This will allow the HAL to better tune its effects and remove the need
to inject a fake effect (volume listener) to get the tracks volume.

Bug: 38184704
Test: none
Change-Id: Iede0f7aa518608c3b3ce1497f059f672aac109b2
Signed-off-by: Kevin Rocard <krocard@google.com>
diff --git a/audio/4.0/IDevice.hal b/audio/4.0/IDevice.hal
index 4bc2d4d..591e565 100644
--- a/audio/4.0/IDevice.hal
+++ b/audio/4.0/IDevice.hal
@@ -109,6 +109,8 @@
      * @param device device type and (if needed) address.
      * @param config stream configuration.
      * @param flags additional flags.
+     * @param sourceMetadata Description of the audio that will be played.
+                             May be used by implementations to configure hardware effects.
      * @return retval operation completion status.
      * @return outStream created output stream.
      * @return suggestedConfig in case of invalid parameters, suggested config.
@@ -117,7 +119,8 @@
             AudioIoHandle ioHandle,
             DeviceAddress device,
             AudioConfig config,
-            bitfield<AudioOutputFlag> flags) generates (
+            bitfield<AudioOutputFlag> flags,
+            SourceMetadata sourceMetadata) generates (
                     Result retval,
                     IStreamOut outStream,
                     AudioConfig suggestedConfig);
@@ -132,6 +135,8 @@
      * @param config stream configuration.
      * @param flags additional flags.
      * @param source source specification.
+     * @param sinkMetadata Description of the audio that is suggested by the client.
+     *                     May be used by implementations to configure hardware effects.
      * @return retval operation completion status.
      * @return inStream in case of success, created input stream.
      * @return suggestedConfig in case of invalid parameters, suggested config.
@@ -141,7 +146,7 @@
             DeviceAddress device,
             AudioConfig config,
             bitfield<AudioInputFlag> flags,
-            AudioSource source) generates (
+            SinkMetadata sinkMetadata) generates (
                     Result retval,
                     IStreamIn inStream,
                     AudioConfig suggestedConfig);