Merge "Add new certificate tags defination for KeyMint V1." am: 78b8a3ffed am: 210e6bb504 am: e79b241ac6 am: fac68811bb

Original change: https://android-review.googlesource.com/c/platform/hardware/libhardware/+/1412868

Change-Id: Id8277401ba23900dcaffd5d82b7206e3c400b51f
diff --git a/include/hardware/audio.h b/include/hardware/audio.h
index b87d3bb..69b0b9c 100644
--- a/include/hardware/audio.h
+++ b/include/hardware/audio.h
@@ -57,7 +57,8 @@
 #define AUDIO_DEVICE_API_VERSION_2_0 HARDWARE_DEVICE_API_VERSION(2, 0)
 #define AUDIO_DEVICE_API_VERSION_3_0 HARDWARE_DEVICE_API_VERSION(3, 0)
 #define AUDIO_DEVICE_API_VERSION_3_1 HARDWARE_DEVICE_API_VERSION(3, 1)
-#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_1
+#define AUDIO_DEVICE_API_VERSION_3_2 HARDWARE_DEVICE_API_VERSION(3, 2)
+#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_2
 /* Minimal audio HAL version supported by the audio framework */
 #define AUDIO_DEVICE_API_VERSION_MIN AUDIO_DEVICE_API_VERSION_2_0
 
@@ -865,6 +866,18 @@
      */
     int (*remove_device_effect)(struct audio_hw_device *dev,
                         audio_port_handle_t device, effect_handle_t effect);
+
+    /**
+     * Fills the list of supported attributes for a given audio port.
+     * As input, "port" contains the information (type, role, address etc...)
+     * needed by the HAL to identify the port.
+     * As output, "port" contains possible attributes (sampling rates, formats,
+     * channel masks, gain controllers...) for this port. The possible attributes
+     * are saved as audio profiles, which contains audio format and the supported
+     * sampling rates and channel masks.
+     */
+    int (*get_audio_port_v7)(struct audio_hw_device *dev,
+                             struct audio_port_v7 *port);
 };
 typedef struct audio_hw_device audio_hw_device_t;
 
diff --git a/modules/audio_remote_submix/audio_hw.cpp b/modules/audio_remote_submix/audio_hw.cpp
index 103f57d..72e1fa5 100644
--- a/modules/audio_remote_submix/audio_hw.cpp
+++ b/modules/audio_remote_submix/audio_hw.cpp
@@ -675,7 +675,8 @@
 {
     const struct submix_stream_out * const out = audio_stream_get_submix_stream_out(
             const_cast<struct audio_stream *>(stream));
-    uint32_t channel_mask = out->dev->routes[out->route_handle].config.output_channel_mask;
+    audio_channel_mask_t channel_mask =
+            out->dev->routes[out->route_handle].config.output_channel_mask;
     SUBMIX_ALOGV("out_get_channels() returns %08x", channel_mask);
     return channel_mask;
 }