Snap for 8426163 from 4a350ee52b516954a08a8f39ec39b0e9346f2a4c to mainline-tzdata2-release

Change-Id: Iafa12d5945c89af4b5e9feb46e0b2ae3749c82c5
diff --git a/Android.bp b/Android.bp
index 6877985..b44c296 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,18 +1 @@
-package {
-    default_applicable_licenses: ["system_media_license"],
-}
-
-// Added automatically by a large-scale-change
-// http://go/android-license-faq
-license {
-    name: "system_media_license",
-    visibility: [":__subpackages__"],
-    license_kinds: [
-        "SPDX-license-identifier-Apache-2.0",
-    ],
-    license_text: [
-        "NOTICE",
-    ],
-}
-
 subdirs = ["*"]
diff --git a/MODULE_LICENSE_APACHE2 b/MODULE_LICENSE_APACHE2
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/MODULE_LICENSE_APACHE2
diff --git a/OWNERS b/OWNERS
index c3c2a32..66d5d89 100644
--- a/OWNERS
+++ b/OWNERS
@@ -5,5 +5,5 @@
 elaurent@google.com
 gkasten@google.com
 hunga@google.com
-jiabin@google.com
+krocard@google.com
 mnaganov@google.com
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 0f3294e..60e273a 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,10 +1,7 @@
 {
   "presubmit": [
     {
-      "name": "systemaudio_tests"
-    },
-    {
-      "name": "libmedia_helper_tests"
+       "name": "systemaudio_tests"
     }
   ]
 }
diff --git a/alsa_utils/Android.bp b/alsa_utils/Android.bp
index 7c3a8ce..db6beb1 100644
--- a/alsa_utils/Android.bp
+++ b/alsa_utils/Android.bp
@@ -12,16 +12,8 @@
 // See the License for the specific language governing permissions and
 // limitations under the License.
 
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
-cc_defaults {
-    name: "libalsautils_defaults",
+cc_library_shared {
+    name: "libalsautils",
     vendor: true,
     srcs: [
         "alsa_device_profile.c",
@@ -39,6 +31,7 @@
     shared_libs: [
         "liblog",
         "libcutils",
+        "libtinyalsa",
         "libaudioutils",
     ],
     cflags: [
@@ -47,19 +40,3 @@
         "-Wno-unused-parameter",
     ],
 }
-
-cc_library_shared {
-    name: "libalsautils",
-    defaults: ["libalsautils_defaults"],
-    shared_libs: [
-        "libtinyalsa",
-    ],
-}
-
-cc_library_shared {
-    name: "libalsautilsv2",
-    defaults: ["libalsautils_defaults"],
-    shared_libs: [
-        "libtinyalsav2",
-    ],
-}
diff --git a/alsa_utils/alsa_device_profile.c b/alsa_utils/alsa_device_profile.c
index 7edffd0..6b76bbe 100644
--- a/alsa_utils/alsa_device_profile.c
+++ b/alsa_utils/alsa_device_profile.c
@@ -234,30 +234,7 @@
 {
     struct pcm_config config = profile->default_config;
     config.rate = rate;
-    // This method tests whether a sample rate is supported by the USB device
-    // by attempting to open it.
-    //
-    // The profile default_config currently contains the minimum channel count.
-    // As some usb devices cannot sustain the sample rate across all its supported
-    // channel counts, we try the largest usable channel count.  This is
-    // bounded by FCC_LIMIT.
-    //
-    // If config.channels > FCC_LIMIT then we still test it for sample rate compatibility.
-    // It is possible that the USB device does not support less than a certain number
-    // of channels, and that minimum number is > FCC_LIMIT.  Then the default_config
-    // channels will be > FCC_LIMIT (and we still proceed with the test).
-    //
-    // For example, the FocusRite Scarlett 18i20 supports between 16 to 20 playback
-    // channels and between 14 to 18 capture channels.
-    // If FCC_LIMIT is 8, we still need to use and test 16 output channels for playback
-    // and 14 input channels for capture, as that will be the ALSA opening configuration.
-    // The Android USB audio HAL layer will automatically zero pad to accommodate the
-    // 16 playback or 14 capture channel configuration from the (up to FCC_LIMIT)
-    // channels delivered by AudioFlinger.
-    if (config.channels < FCC_LIMIT) {
-        config.channels = profile->max_channel_count;
-        if (config.channels > FCC_LIMIT) config.channels = FCC_LIMIT;
-    }
+
     bool works = false; /* let's be pessimistic */
     struct pcm * pcm = pcm_open(profile->card, profile->device,
                                 profile->direction, &config);
@@ -287,8 +264,7 @@
     return num_entries; /* return # of supported rates */
 }
 
-static unsigned profile_enum_sample_formats(alsa_device_profile* profile,
-        const struct pcm_mask * mask)
+static unsigned profile_enum_sample_formats(alsa_device_profile* profile, struct pcm_mask * mask)
 {
     const int num_slots = ARRAY_SIZE(mask->bits);
     const int bits_per_slot = sizeof(mask->bits[0]) * 8;
@@ -328,42 +304,26 @@
         unsigned max)
 {
     /* modify alsa_device_profile.h if you change the std_channel_counts[] array. */
-    // The order of this array controls the order for channel mask generation.
-    // In general, this is just counting from max to min not skipping anything,
-    // but need not be that way.
-    static const unsigned std_channel_counts[FCC_24] = {
-        24, 23, 22, 21, 20, 19, 18, 17,
-        16, 15, 14, 13, 12, 11, 10, 9,
-        8, 7, 6, 5, 4, 3, 2, 1
-    };
+    static const unsigned std_channel_counts[] = {8, 7, 6, 5, 4, 3, 2, 1};
 
     unsigned num_counts = 0;
     unsigned index;
-    int max_allowed_index = -1; // index of maximum allowed channel count reported by device.
     /* TODO write a profile_test_channel_count() */
     /* Ensure there is at least one invalid channel count to terminate the channel counts array */
     for (index = 0; index < ARRAY_SIZE(std_channel_counts) &&
                     num_counts < ARRAY_SIZE(profile->channel_counts) - 1;
          index++) {
-        const unsigned test_count = std_channel_counts[index];
         /* TODO Do we want a channel counts test? */
-        if (test_count <= FCC_LIMIT) {
-            if (test_count >= min && test_count <= max /* &&
-                    profile_test_channel_count(profile, channel_counts[index])*/) {
-                profile->channel_counts[num_counts++] = test_count;
-            }
-            if (max_allowed_index < 0 ||
-                    std_channel_counts[max_allowed_index] < test_count) {
-                max_allowed_index = index;
-            }
+        if (std_channel_counts[index] >= min && std_channel_counts[index] <= max /* &&
+            profile_test_channel_count(profile, channel_counts[index])*/) {
+            profile->channel_counts[num_counts++] = std_channel_counts[index];
         }
     }
     // if we have no match with the standard counts, we use the largest (preferred) std count.
-    // Note: the usb hal will adjust channel data properly to fit.
-    if (num_counts == 0 && max_allowed_index >= 0) {
+    if (num_counts == 0) {
         ALOGW("usb device does not match std channel counts, setting to %d",
-                std_channel_counts[max_allowed_index]);
-        profile->channel_counts[num_counts++] = std_channel_counts[max_allowed_index];
+                std_channel_counts[0]);
+        profile->channel_counts[num_counts++] = std_channel_counts[0];
     }
     profile->channel_counts[num_counts] = 0;
     return num_counts; /* return # of supported counts */
@@ -454,7 +414,7 @@
     }
 
     /* Formats */
-    const struct pcm_mask * format_mask = pcm_params_get_mask(alsa_hw_params, PCM_PARAM_FORMAT);
+    struct pcm_mask * format_mask = pcm_params_get_mask(alsa_hw_params, PCM_PARAM_FORMAT);
     profile_enum_sample_formats(profile, format_mask);
 
     /* Channels */
@@ -539,71 +499,51 @@
 
 char * profile_get_channel_count_strs(const alsa_device_profile* profile)
 {
+    // FIXME implicit fixed channel count assumption here (FCC_8).
     // we use only the canonical even number channel position masks.
     static const char * const out_chans_strs[] = {
-        [0] = "AUDIO_CHANNEL_NONE", /* will never be taken as this is a terminator */
-        [1] = "AUDIO_CHANNEL_OUT_MONO",
-        [2] = "AUDIO_CHANNEL_OUT_STEREO",
-        [4] = "AUDIO_CHANNEL_OUT_QUAD",
-        [6] = "AUDIO_CHANNEL_OUT_5POINT1",
-        [FCC_8] = "AUDIO_CHANNEL_OUT_7POINT1",
-        [FCC_12] = "AUDIO_CHANNEL_OUT_7POINT1POINT4",
-        [FCC_24] = "AUDIO_CHANNEL_OUT_22POINT2",
+        /* 0 */"AUDIO_CHANNEL_NONE", /* will never be taken as this is a terminator */
+        /* 1 */"AUDIO_CHANNEL_OUT_MONO",
+        /* 2 */"AUDIO_CHANNEL_OUT_STEREO",
+        /* 3 */ /* "AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_FRONT_CENTER" */ NULL,
+        /* 4 */"AUDIO_CHANNEL_OUT_QUAD",
+        /* 5 */ /* "AUDIO_CHANNEL_OUT_QUAD|AUDIO_CHANNEL_OUT_FRONT_CENTER" */ NULL,
+        /* 6 */"AUDIO_CHANNEL_OUT_5POINT1",
+        /* 7 */ /* "AUDIO_CHANNEL_OUT_5POINT1|AUDIO_CHANNEL_OUT_BACK_CENTER" */ NULL,
+        /* 8 */"AUDIO_CHANNEL_OUT_7POINT1",
+        /* channel counts greater than this not considered */
     };
 
     static const char * const in_chans_strs[] = {
-        [0] = "AUDIO_CHANNEL_NONE", /* will never be taken as this is a terminator */
-        [1] = "AUDIO_CHANNEL_IN_MONO",
-        [2] = "AUDIO_CHANNEL_IN_STEREO",
+        /* 0 */"AUDIO_CHANNEL_NONE", /* will never be taken as this is a terminator */
+        /* 1 */"AUDIO_CHANNEL_IN_MONO",
+        /* 2 */"AUDIO_CHANNEL_IN_STEREO",
         /* channel counts greater than this not considered */
     };
 
     static const char * const index_chans_strs[] = {
-        [0] = "AUDIO_CHANNEL_NONE", /* will never be taken as this is a terminator */
-
-        [1] = "AUDIO_CHANNEL_INDEX_MASK_1",
-        [2] = "AUDIO_CHANNEL_INDEX_MASK_2",
-        [3] = "AUDIO_CHANNEL_INDEX_MASK_3",
-        [4] = "AUDIO_CHANNEL_INDEX_MASK_4",
-        [5] = "AUDIO_CHANNEL_INDEX_MASK_5",
-        [6] = "AUDIO_CHANNEL_INDEX_MASK_6",
-        [7] = "AUDIO_CHANNEL_INDEX_MASK_7",
-        [8] = "AUDIO_CHANNEL_INDEX_MASK_8",
-
-        [9] = "AUDIO_CHANNEL_INDEX_MASK_9",
-        [10] = "AUDIO_CHANNEL_INDEX_MASK_10",
-        [11] = "AUDIO_CHANNEL_INDEX_MASK_11",
-        [12] = "AUDIO_CHANNEL_INDEX_MASK_12",
-        [13] = "AUDIO_CHANNEL_INDEX_MASK_13",
-        [14] = "AUDIO_CHANNEL_INDEX_MASK_14",
-        [15] = "AUDIO_CHANNEL_INDEX_MASK_15",
-        [16] = "AUDIO_CHANNEL_INDEX_MASK_16",
-
-        [17] = "AUDIO_CHANNEL_INDEX_MASK_17",
-        [18] = "AUDIO_CHANNEL_INDEX_MASK_18",
-        [19] = "AUDIO_CHANNEL_INDEX_MASK_19",
-        [20] = "AUDIO_CHANNEL_INDEX_MASK_20",
-        [21] = "AUDIO_CHANNEL_INDEX_MASK_21",
-        [22] = "AUDIO_CHANNEL_INDEX_MASK_22",
-        [23] = "AUDIO_CHANNEL_INDEX_MASK_23",
-        [24] = "AUDIO_CHANNEL_INDEX_MASK_24",
+        /* 0 */"AUDIO_CHANNEL_NONE", /* will never be taken as this is a terminator */
+        /* 1 */"AUDIO_CHANNEL_INDEX_MASK_1",
+        /* 2 */"AUDIO_CHANNEL_INDEX_MASK_2",
+        /* 3 */"AUDIO_CHANNEL_INDEX_MASK_3",
+        /* 4 */"AUDIO_CHANNEL_INDEX_MASK_4",
+        /* 5 */"AUDIO_CHANNEL_INDEX_MASK_5",
+        /* 6 */"AUDIO_CHANNEL_INDEX_MASK_6",
+        /* 7 */"AUDIO_CHANNEL_INDEX_MASK_7",
+        /* 8 */"AUDIO_CHANNEL_INDEX_MASK_8",
     };
 
     const bool isOutProfile = profile->direction == PCM_OUT;
 
     const char * const * const chans_strs = isOutProfile ? out_chans_strs : in_chans_strs;
-    size_t chans_strs_size =
+    const size_t chans_strs_size =
             isOutProfile ? ARRAY_SIZE(out_chans_strs) : ARRAY_SIZE(in_chans_strs);
-    if (chans_strs_size > FCC_LIMIT + 1) chans_strs_size = FCC_LIMIT + 1; // starts with 0.
 
     /*
-     * MAX_CHANNEL_NAME_LEN: The longest channel name so far is "AUDIO_CHANNEL_OUT_7POINT1POINT4"
-     * at 31 chars, add 1 for the "|" delimiter, so we allocate 48 chars to be safe.
-     *
-     * We allocate room for channel index and channel position strings (2x).
+     * If we assume each channel string is 26 chars ("AUDIO_CHANNEL_INDEX_MASK_8" is 26) + 1 for,
+     * the "|" delimiter, then we allocate room for 16 strings.
      */
-    const size_t MAX_CHANNEL_NAME_LEN = 48;
-    char buffer[MAX_CHANNEL_NAME_LEN * (FCC_LIMIT * 2) + 1];
+    char buffer[27 * 16 + 1]; /* caution, may need to be expanded */
     buffer[0] = '\0';
     size_t buffSize = ARRAY_SIZE(buffer);
     size_t curStrLen = 0;
@@ -625,8 +565,6 @@
          (channel_count = profile->channel_counts[index]) != 0;
          index++) {
 
-        if (channel_count > FCC_LIMIT) continue;
-
         /* we only show positional information for mono (stereo handled already) */
         if (channel_count < chans_strs_size
                 && chans_strs[channel_count] != NULL
@@ -639,7 +577,7 @@
                 break;
             }
 
-            if (curStrLen != 0) strlcat(buffer, "|", buffSize);
+            strlcat(buffer, "|", buffSize);
             curStrLen = strlcat(buffer, chans_strs[channel_count], buffSize);
         }
 
@@ -652,7 +590,7 @@
              break;
          }
 
-         if (curStrLen != 0) strlcat(buffer, "|", buffSize);
+         strlcat(buffer, "|", buffSize);
          curStrLen = strlcat(buffer, index_chans_strs[channel_count], buffSize);
     }
 
diff --git a/alsa_utils/alsa_format.c b/alsa_utils/alsa_format.c
index ef4d7a8..de8fcf2 100644
--- a/alsa_utils/alsa_format.c
+++ b/alsa_utils/alsa_format.c
@@ -83,7 +83,7 @@
  * Scans the provided format mask and returns the first non-8 bit sample
  * format supported by the devices.
  */
-enum pcm_format get_pcm_format_for_mask(const struct pcm_mask* mask)
+enum pcm_format get_pcm_format_for_mask(struct pcm_mask* mask)
 {
     int num_slots = ARRAY_SIZE(mask->bits);
     int bits_per_slot = sizeof(mask->bits[0]) * 8;
diff --git a/alsa_utils/alsa_logging.c b/alsa_utils/alsa_logging.c
index 44f7c44..e90797d 100644
--- a/alsa_utils/alsa_logging.c
+++ b/alsa_utils/alsa_logging.c
@@ -28,7 +28,7 @@
 /*
  * Logging
  */
-void log_pcm_mask(const char* mask_name, const struct pcm_mask* mask)
+void log_pcm_mask(const char* mask_name, struct pcm_mask* mask)
 {
     const size_t num_slots = ARRAY_SIZE(mask->bits);
     const size_t bits_per_slot = (sizeof(mask->bits[0]) * 8);
diff --git a/alsa_utils/include/alsa_device_profile.h b/alsa_utils/include/alsa_device_profile.h
index b0f4b41..117d6fa 100644
--- a/alsa_utils/include/alsa_device_profile.h
+++ b/alsa_utils/include/alsa_device_profile.h
@@ -18,7 +18,7 @@
 #define ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_DEVICE_PROFILE_H
 
 #include <stdbool.h>
-#include <system/audio.h>
+
 #include <tinyalsa/asoundlib.h>
 
 #define MAX_PROFILE_FORMATS         6  /* We long support the 5 standard formats defined
@@ -27,8 +27,7 @@
 #define MAX_PROFILE_SAMPLE_RATES    14 /* this number needs to be 1 more than the number of
                                         * sample rates in std_sample_rates[]
                                         * (in alsa_device_profile.c) */
-#define MAX_PROFILE_CHANNEL_COUNTS  (FCC_LIMIT + 1)
-                                       /* this number need to be 1 more than the number of
+#define MAX_PROFILE_CHANNEL_COUNTS  9  /* this number need to be 1 more than the number of
                                         * standard channel formats in std_channel_counts[]
                                         * (in alsa_device_profile.c) */
 
diff --git a/alsa_utils/include/alsa_format.h b/alsa_utils/include/alsa_format.h
index fb39f53..e07f836 100644
--- a/alsa_utils/include/alsa_format.h
+++ b/alsa_utils/include/alsa_format.h
@@ -21,6 +21,6 @@
 
 #include <tinyalsa/asoundlib.h>
 
-enum pcm_format get_pcm_format_for_mask(const struct pcm_mask* mask);
+enum pcm_format get_pcm_format_for_mask(struct pcm_mask* mask);
 
 #endif /* ANDROID_SYSTEM_MEDIA_ALSA_UTILS_ALSA_FORMAT_H */
diff --git a/alsa_utils/include/alsa_logging.h b/alsa_utils/include/alsa_logging.h
index 817729e..1b0731e 100644
--- a/alsa_utils/include/alsa_logging.h
+++ b/alsa_utils/include/alsa_logging.h
@@ -19,7 +19,7 @@
 
 #include <tinyalsa/asoundlib.h>
 
-void log_pcm_mask(const char* mask_name, const struct pcm_mask* mask);
+void log_pcm_mask(const char* mask_name, struct pcm_mask* mask);
 void log_pcm_params(struct pcm_params * alsa_hw_params);
 void log_pcm_config(struct pcm_config * config, const char* label);
 
diff --git a/audio/Android.bp b/audio/Android.bp
index 2609670..8365aad 100644
--- a/audio/Android.bp
+++ b/audio/Android.bp
@@ -1,16 +1,7 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_library_headers {
     name: "libaudio_system_headers",
     host_supported: true,
     vendor_available: true,
-    product_available: true,
     // TODO(b/153609531): remove when no longer needed.
     native_bridge_supported: true,
 
@@ -27,7 +18,6 @@
             enabled: true,
         },
         vendor: {
-            // product variant does not require this flag
             cflags: ["-DAUDIO_NO_SYSTEM_DECLARATIONS"],
         },
     },
@@ -37,16 +27,7 @@
 filegroup {
     name: "libaudio_system_audio_base",
     srcs: [
-        "include/system/audio-hal-enums.h",
-    ],
-    path: "include",
-}
-
-
-filegroup {
-    name: "libaudio_system_audio_common_base",
-    srcs: [
-        "include/system/audio_common-base.h",
+        "include/system/audio-base.h",
     ],
     path: "include",
 }
diff --git a/audio/include/system/audio-base-utils.h b/audio/include/system/audio-base-utils.h
index 6e3df95..ebc6b56 100644
--- a/audio/include/system/audio-base-utils.h
+++ b/audio/include/system/audio-base-utils.h
@@ -18,33 +18,29 @@
 #define ANDROID_AUDIO_BASE_UTILS_H
 
 #include "audio-base.h"
-#include "audio-hal-enums.h"
-#include "audio_common-base.h"
 
 /** Define helper values to iterate over enum, extend them or checking value validity.
- *  Those values are compatible with the corresponding enum values.
+ *  Those values are compatible with the O corresponding enum values.
  *  They are not macro like similar values in audio.h to avoid conflicting
  *  with the libhardware_legacy audio.h.
  */
 enum {
-    AUDIO_STREAM_MIN = AUDIO_STREAM_VOICE_CALL,
-    /** Number of audio streams available to vendors. */
+    /** Number of audio stream available to vendors. */
     AUDIO_STREAM_PUBLIC_CNT = AUDIO_STREAM_ASSISTANT + 1,
 
 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    /** Total number of streams handled by the policy. */
+    /** Total number of stream handled by the policy*/
     AUDIO_STREAM_FOR_POLICY_CNT= AUDIO_STREAM_REROUTING + 1,
 #endif
 
-   /** Total number of streams. */
+   /** Total number of stream. */
     AUDIO_STREAM_CNT          = AUDIO_STREAM_CALL_ASSISTANT + 1,
 
     AUDIO_SOURCE_MAX          = AUDIO_SOURCE_VOICE_PERFORMANCE,
     AUDIO_SOURCE_CNT          = AUDIO_SOURCE_MAX + 1,
 
-    AUDIO_MICROPHONE_CHANNEL_MAPPING_CNT = AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED + 1,
-    AUDIO_MICROPHONE_LOCATION_CNT = AUDIO_MICROPHONE_LOCATION_PERIPHERAL + 1,
-    AUDIO_MICROPHONE_DIRECTIONALITY_CNT = AUDIO_MICROPHONE_DIRECTIONALITY_SUPER_CARDIOID + 1,
+    AUDIO_MODE_MAX            = AUDIO_MODE_CALL_SCREEN,
+    AUDIO_MODE_CNT            = AUDIO_MODE_MAX + 1,
 
     /** For retrocompatibility AUDIO_MODE_* and AUDIO_STREAM_* must be signed. */
     AUDIO_DETAIL_NEGATIVE_VALUE = -1,
@@ -52,6 +48,53 @@
 
 // TODO: remove audio device combination as it is not allowed to use as bit mask since R.
 enum {
+    AUDIO_CHANNEL_OUT_ALL     = AUDIO_CHANNEL_OUT_FRONT_LEFT |
+                                AUDIO_CHANNEL_OUT_FRONT_RIGHT |
+                                AUDIO_CHANNEL_OUT_FRONT_CENTER |
+                                AUDIO_CHANNEL_OUT_LOW_FREQUENCY |
+                                AUDIO_CHANNEL_OUT_BACK_LEFT |
+                                AUDIO_CHANNEL_OUT_BACK_RIGHT |
+                                AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER |
+                                AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER |
+                                AUDIO_CHANNEL_OUT_BACK_CENTER |
+                                AUDIO_CHANNEL_OUT_SIDE_LEFT |
+                                AUDIO_CHANNEL_OUT_SIDE_RIGHT |
+                                AUDIO_CHANNEL_OUT_TOP_CENTER |
+                                AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT |
+                                AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER |
+                                AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT |
+                                AUDIO_CHANNEL_OUT_TOP_BACK_LEFT |
+                                AUDIO_CHANNEL_OUT_TOP_BACK_CENTER |
+                                AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT |
+                                AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT |
+                                AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT |
+                                AUDIO_CHANNEL_OUT_HAPTIC_B |
+                                AUDIO_CHANNEL_OUT_HAPTIC_A,
+
+    AUDIO_CHANNEL_IN_ALL      = AUDIO_CHANNEL_IN_LEFT |
+                                AUDIO_CHANNEL_IN_RIGHT |
+                                AUDIO_CHANNEL_IN_FRONT |
+                                AUDIO_CHANNEL_IN_BACK|
+                                AUDIO_CHANNEL_IN_LEFT_PROCESSED |
+                                AUDIO_CHANNEL_IN_RIGHT_PROCESSED |
+                                AUDIO_CHANNEL_IN_FRONT_PROCESSED |
+                                AUDIO_CHANNEL_IN_BACK_PROCESSED|
+                                AUDIO_CHANNEL_IN_PRESSURE |
+                                AUDIO_CHANNEL_IN_X_AXIS |
+                                AUDIO_CHANNEL_IN_Y_AXIS |
+                                AUDIO_CHANNEL_IN_Z_AXIS |
+                                AUDIO_CHANNEL_IN_VOICE_UPLINK |
+                                AUDIO_CHANNEL_IN_VOICE_DNLINK |
+                                AUDIO_CHANNEL_IN_BACK_LEFT |
+                                AUDIO_CHANNEL_IN_BACK_RIGHT |
+                                AUDIO_CHANNEL_IN_CENTER |
+                                AUDIO_CHANNEL_IN_LOW_FREQUENCY |
+                                AUDIO_CHANNEL_IN_TOP_LEFT |
+                                AUDIO_CHANNEL_IN_TOP_RIGHT,
+
+    AUDIO_CHANNEL_HAPTIC_ALL  = AUDIO_CHANNEL_OUT_HAPTIC_B |
+                                AUDIO_CHANNEL_OUT_HAPTIC_A,
+
     AUDIO_DEVICE_OUT_ALL      = AUDIO_DEVICE_OUT_EARPIECE |
                                 AUDIO_DEVICE_OUT_SPEAKER |
                                 AUDIO_DEVICE_OUT_WIRED_HEADSET |
@@ -71,7 +114,6 @@
                                 AUDIO_DEVICE_OUT_TELEPHONY_TX |
                                 AUDIO_DEVICE_OUT_LINE |
                                 AUDIO_DEVICE_OUT_HDMI_ARC |
-                                // AUDIO_DEVICE_OUT_HDMI_EARC | not a bitfield
                                 AUDIO_DEVICE_OUT_SPDIF |
                                 AUDIO_DEVICE_OUT_FM |
                                 AUDIO_DEVICE_OUT_AUX_LINE |
@@ -121,7 +163,6 @@
                                 AUDIO_DEVICE_IN_USB_HEADSET |
                                 AUDIO_DEVICE_IN_BLUETOOTH_BLE |
                                 AUDIO_DEVICE_IN_HDMI_ARC |
-                                // AUDIO_DEVICE_IN_HDMI_EARC | // not a bitfield
                                 AUDIO_DEVICE_IN_ECHO_REFERENCE |
                                 AUDIO_DEVICE_IN_DEFAULT,
 
@@ -133,8 +174,20 @@
 
     AUDIO_USAGE_MAX           = AUDIO_USAGE_CALL_ASSISTANT,
     AUDIO_USAGE_CNT           = AUDIO_USAGE_CALL_ASSISTANT + 1,
+
+    AUDIO_PORT_CONFIG_ALL     = AUDIO_PORT_CONFIG_SAMPLE_RATE |
+                                AUDIO_PORT_CONFIG_CHANNEL_MASK |
+                                AUDIO_PORT_CONFIG_FORMAT |
+                                AUDIO_PORT_CONFIG_GAIN,
 }; // enum
 
+// Add new aliases
+enum {
+    AUDIO_CHANNEL_OUT_TRI                   = 0x7u,     // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER
+    AUDIO_CHANNEL_OUT_TRI_BACK              = 0x103u,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_BACK_CENTER
+    AUDIO_CHANNEL_OUT_3POINT1               = 0xFu,     // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY
+};
+
 // Microphone Field Dimension Constants
 #define MIC_FIELD_DIMENSION_WIDE (-1.0f)
 #define MIC_FIELD_DIMENSION_NORMAL (0.0f)
@@ -149,7 +202,7 @@
 
 // Keep the device arrays in order from low to high as they may be needed to do binary search.
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_OUT_ALL_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_OUT_ALL_ARRAY[] = {
     AUDIO_DEVICE_OUT_EARPIECE,                  // 0x00000001u
     AUDIO_DEVICE_OUT_SPEAKER,                   // 0x00000002u
     AUDIO_DEVICE_OUT_WIRED_HEADSET,             // 0x00000004u
@@ -169,7 +222,6 @@
     AUDIO_DEVICE_OUT_TELEPHONY_TX,              // 0x00010000u
     AUDIO_DEVICE_OUT_LINE,                      // 0x00020000u
     AUDIO_DEVICE_OUT_HDMI_ARC,                  // 0x00040000u
-    AUDIO_DEVICE_OUT_HDMI_EARC,                 // 0x00040001u,
     AUDIO_DEVICE_OUT_SPDIF,                     // 0x00080000u
     AUDIO_DEVICE_OUT_FM,                        // 0x00100000u
     AUDIO_DEVICE_OUT_AUX_LINE,                  // 0x00200000u
@@ -180,27 +232,25 @@
     AUDIO_DEVICE_OUT_USB_HEADSET,               // 0x04000000u
     AUDIO_DEVICE_OUT_HEARING_AID,               // 0x08000000u
     AUDIO_DEVICE_OUT_ECHO_CANCELLER,            // 0x10000000u
-    AUDIO_DEVICE_OUT_BLE_HEADSET,               // 0x20000000u
-    AUDIO_DEVICE_OUT_BLE_SPEAKER,               // 0x20000001u
     AUDIO_DEVICE_OUT_DEFAULT,                   // 0x40000000u, BIT_DEFAULT
 };
 
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_OUT_ALL_A2DP_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_OUT_ALL_A2DP_ARRAY[] = {
     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP,            // 0x00000080u,
     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, // 0x00000100u,
     AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER,    // 0x00000200u,
 };
 
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_OUT_ALL_SCO_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_OUT_ALL_SCO_ARRAY[] = {
     AUDIO_DEVICE_OUT_BLUETOOTH_SCO,             // 0x00000010u,
     AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET,     // 0x00000020u,
     AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT,      // 0x00000040u,
 };
 
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_OUT_ALL_USB_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_OUT_ALL_USB_ARRAY[] = {
     AUDIO_DEVICE_OUT_USB_ACCESSORY,             // 0x00002000u
     AUDIO_DEVICE_OUT_USB_DEVICE,                // 0x00004000u
     AUDIO_DEVICE_OUT_USB_HEADSET,               // 0x04000000u
@@ -208,25 +258,19 @@
 
 // Digital out device array should contain all usb out devices
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_OUT_ALL_DIGITAL_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_OUT_ALL_DIGITAL_ARRAY[] = {
     AUDIO_DEVICE_OUT_HDMI,                      // 0x00000400u, OUT_AUX_DIGITAL
     AUDIO_DEVICE_OUT_USB_ACCESSORY,             // 0x00002000u
     AUDIO_DEVICE_OUT_USB_DEVICE,                // 0x00004000u
     AUDIO_DEVICE_OUT_HDMI_ARC,                  // 0x00040000u
-    AUDIO_DEVICE_OUT_HDMI_EARC,                 // 0x00040001u
     AUDIO_DEVICE_OUT_SPDIF,                     // 0x00080000u
     AUDIO_DEVICE_OUT_IP,                        // 0x00800000u
     AUDIO_DEVICE_OUT_BUS,                       // 0x01000000u
     AUDIO_DEVICE_OUT_USB_HEADSET,               // 0x04000000u
 };
 
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_OUT_ALL_BLE_ARRAY[] = {
-    AUDIO_DEVICE_OUT_BLE_HEADSET,               // 0x20000000u
-    AUDIO_DEVICE_OUT_BLE_SPEAKER,               // 0x20000001u
-};
-
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_IN_ALL_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_IN_ALL_ARRAY[] = {
     AUDIO_DEVICE_IN_COMMUNICATION,              // 0x80000001u
     AUDIO_DEVICE_IN_AMBIENT,                    // 0x80000002u
     AUDIO_DEVICE_IN_BUILTIN_MIC,                // 0x80000004u
@@ -252,19 +296,17 @@
     AUDIO_DEVICE_IN_USB_HEADSET,                // 0x82000000u
     AUDIO_DEVICE_IN_BLUETOOTH_BLE,              // 0x84000000u
     AUDIO_DEVICE_IN_HDMI_ARC,                   // 0x88000000u
-    AUDIO_DEVICE_IN_HDMI_EARC,                  // 0x88000001u
     AUDIO_DEVICE_IN_ECHO_REFERENCE,             // 0x90000000u
-    AUDIO_DEVICE_IN_BLE_HEADSET,                // 0xA0000000u
     AUDIO_DEVICE_IN_DEFAULT,                    // 0xC0000000u
 };
 
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_IN_ALL_SCO_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_IN_ALL_SCO_ARRAY[] = {
     AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET,      // 0x80000008u
 };
 
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_IN_ALL_USB_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_IN_ALL_USB_ARRAY[] = {
     AUDIO_DEVICE_IN_USB_ACCESSORY,              // 0x80000800u
     AUDIO_DEVICE_IN_USB_DEVICE,                 // 0x80001000u
     AUDIO_DEVICE_IN_USB_HEADSET,                // 0x82000000u
@@ -272,7 +314,7 @@
 
 // Digital in device array should contain all usb in devices
 // inline constexpr
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_IN_ALL_DIGITAL_ARRAY[] = {
+static CONST_ARRAY uint32_t AUDIO_DEVICE_IN_ALL_DIGITAL_ARRAY[] = {
     AUDIO_DEVICE_IN_HDMI,                       // 0x80000020u, IN_AUX_DIGITAL
     AUDIO_DEVICE_IN_USB_ACCESSORY,              // 0x80000800u
     AUDIO_DEVICE_IN_USB_DEVICE,                 // 0x80001000u
@@ -281,19 +323,8 @@
     AUDIO_DEVICE_IN_BUS,                        // 0x80100000u
     AUDIO_DEVICE_IN_USB_HEADSET,                // 0x82000000u
     AUDIO_DEVICE_IN_HDMI_ARC,                   // 0x88000000u
-    AUDIO_DEVICE_IN_HDMI_EARC,                  // 0x88000001u
 };
 
-static CONST_ARRAY audio_devices_t AUDIO_DEVICE_IN_ALL_BLE_ARRAY[] = {
-    AUDIO_DEVICE_IN_BLE_HEADSET,                // 0xA0000000u
-};
-
-
-static CONST_ARRAY audio_encapsulation_type_t AUDIO_ENCAPSULATION_TYPE_ALL_ARRAY[] = {
-    AUDIO_ENCAPSULATION_TYPE_IEC61937,
-};
-
-
 #ifndef AUDIO_ARRAY_SIZE
 // std::size()
 #define AUDIO_ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
@@ -306,16 +337,11 @@
 static const uint32_t AUDIO_DEVICE_OUT_USB_CNT = AUDIO_ARRAY_SIZE(AUDIO_DEVICE_OUT_ALL_USB_ARRAY);
 static const uint32_t AUDIO_DEVICE_OUT_DIGITAL_CNT = AUDIO_ARRAY_SIZE(
                                                      AUDIO_DEVICE_OUT_ALL_DIGITAL_ARRAY);
-static const uint32_t AUDIO_DEVICE_OUT_BLE_CNT = AUDIO_ARRAY_SIZE(
-                                                     AUDIO_DEVICE_OUT_ALL_BLE_ARRAY);
-
 static const uint32_t AUDIO_DEVICE_IN_CNT = AUDIO_ARRAY_SIZE(AUDIO_DEVICE_IN_ALL_ARRAY);
 static const uint32_t AUDIO_DEVICE_IN_SCO_CNT = AUDIO_ARRAY_SIZE(AUDIO_DEVICE_IN_ALL_SCO_ARRAY);
 static const uint32_t AUDIO_DEVICE_IN_USB_CNT = AUDIO_ARRAY_SIZE(AUDIO_DEVICE_IN_ALL_USB_ARRAY);
 static const uint32_t AUDIO_DEVICE_IN_DIGITAL_CNT = AUDIO_ARRAY_SIZE(
                                                     AUDIO_DEVICE_IN_ALL_DIGITAL_ARRAY);
-static const uint32_t AUDIO_DEVICE_IN_BLE_CNT = AUDIO_ARRAY_SIZE(
-                                                    AUDIO_DEVICE_IN_ALL_BLE_ARRAY);
 
 static const uint32_t AUDIO_ENCAPSULATION_MODE_ALL_POSITION_BITS =
         (1 << AUDIO_ENCAPSULATION_MODE_NONE) |
@@ -326,9 +352,6 @@
         (1 << AUDIO_ENCAPSULATION_METADATA_TYPE_FRAMEWORK_TUNER) |
         (1 << AUDIO_ENCAPSULATION_METADATA_TYPE_DVB_AD_DESCRIPTOR);
 
-static const uint32_t AUDIO_ENCAPSULATION_TYPE_CNT = AUDIO_ARRAY_SIZE(
-                                                     AUDIO_ENCAPSULATION_TYPE_ALL_ARRAY);
-
 #if AUDIO_ARRAYS_STATIC_CHECK
 
 template<typename T, size_t N>
@@ -351,8 +374,6 @@
               "AUDIO_DEVICE_OUT_ALL_USB_ARRAY must be sorted");
 static_assert(isSorted(AUDIO_DEVICE_OUT_ALL_DIGITAL_ARRAY),
               "AUDIO_DEVICE_OUT_ALL_DIGITAL_ARRAY must be sorted");
-static_assert(isSorted(AUDIO_DEVICE_OUT_ALL_BLE_ARRAY),
-              "AUDIO_DEVICE_OUT_ALL_BLE_ARRAY must be sorted");
 static_assert(isSorted(AUDIO_DEVICE_IN_ALL_ARRAY),
               "AUDIO_DEVICE_IN_ALL_ARRAY must be sorted");
 static_assert(isSorted(AUDIO_DEVICE_IN_ALL_SCO_ARRAY),
@@ -361,81 +382,16 @@
               "AUDIO_DEVICE_IN_ALL_USB_ARRAY must be sorted");
 static_assert(isSorted(AUDIO_DEVICE_IN_ALL_DIGITAL_ARRAY),
               "AUDIO_DEVICE_IN_ALL_DIGITAL_ARRAY must be sorted");
-static_assert(isSorted(AUDIO_DEVICE_IN_ALL_BLE_ARRAY),
-              "AUDIO_DEVICE_IN_ALL_BLE_ARRAY must be sorted");
 
 static_assert(AUDIO_DEVICE_OUT_CNT == std::size(AUDIO_DEVICE_OUT_ALL_ARRAY));
 static_assert(AUDIO_DEVICE_OUT_A2DP_CNT == std::size(AUDIO_DEVICE_OUT_ALL_A2DP_ARRAY));
 static_assert(AUDIO_DEVICE_OUT_SCO_CNT == std::size(AUDIO_DEVICE_OUT_ALL_SCO_ARRAY));
 static_assert(AUDIO_DEVICE_OUT_USB_CNT == std::size(AUDIO_DEVICE_OUT_ALL_USB_ARRAY));
 static_assert(AUDIO_DEVICE_OUT_DIGITAL_CNT == std::size(AUDIO_DEVICE_OUT_ALL_DIGITAL_ARRAY));
-static_assert(AUDIO_DEVICE_OUT_BLE_CNT == std::size(AUDIO_DEVICE_OUT_ALL_BLE_ARRAY));
 static_assert(AUDIO_DEVICE_IN_CNT == std::size(AUDIO_DEVICE_IN_ALL_ARRAY));
 static_assert(AUDIO_DEVICE_IN_SCO_CNT == std::size(AUDIO_DEVICE_IN_ALL_SCO_ARRAY));
 static_assert(AUDIO_DEVICE_IN_USB_CNT == std::size(AUDIO_DEVICE_IN_ALL_USB_ARRAY));
 static_assert(AUDIO_DEVICE_IN_DIGITAL_CNT == std::size(AUDIO_DEVICE_IN_ALL_DIGITAL_ARRAY));
-static_assert(AUDIO_DEVICE_IN_BLE_CNT == std::size(AUDIO_DEVICE_IN_ALL_BLE_ARRAY));
-static_assert(AUDIO_ENCAPSULATION_TYPE_CNT == std::size(AUDIO_ENCAPSULATION_TYPE_ALL_ARRAY));
-
-#if __has_builtin(__builtin_popcount)
-// Replace with constexpr std::popcount with C++20
-
-// Check common channel masks have counts we expect.
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_MONO) == 1);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_STEREO) == 2);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_2POINT1) == 3);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_TRI) == 3);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_TRI_BACK) == 3);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_QUAD) == 4);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_3POINT1) == 4);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_2POINT0POINT2) == 4);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_QUAD) == 4);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_QUAD_SIDE) == 4);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_SURROUND) == 4);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_PENTA) == 5);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_2POINT1POINT2) == 5);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_3POINT0POINT2) == 5);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_5POINT1) == 6);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_3POINT1POINT2) == 6);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_6POINT1) == 7);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_7POINT1) == 8);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_5POINT1POINT2) == 8);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_5POINT1POINT4) == 10);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_7POINT1POINT2) == 10);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_7POINT1POINT4) == 12);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_13POINT_360RA) == 13);
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_22POINT2) == 24);
-
-// Check common channel masks which are a subset of another.
-// (by subset, all the channel positions are contained in the other mask).
-
-// Validate that channel positions in (a) are a subset of (b).
-#define CHANNEL_CHECK_SUBSET_OF(a, b) \
-    static_assert(__builtin_popcount((a)^(b)) == __builtin_popcount(b) - __builtin_popcount(a))
-
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_MONO, AUDIO_CHANNEL_OUT_STEREO);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_STEREO, AUDIO_CHANNEL_OUT_2POINT1);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_STEREO, AUDIO_CHANNEL_OUT_QUAD);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_QUAD, AUDIO_CHANNEL_OUT_PENTA);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_2POINT1, AUDIO_CHANNEL_OUT_5POINT1);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_5POINT1, AUDIO_CHANNEL_OUT_5POINT1POINT2);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_5POINT1, AUDIO_CHANNEL_OUT_5POINT1POINT4);
-// Note AUDIO_CHANNEL_OUT_5POINT1POINT2 is not subset of AUDIO_CHANNEL_OUT_5POINT1POINT4
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_5POINT1POINT2, AUDIO_CHANNEL_OUT_7POINT1POINT2);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_7POINT1, AUDIO_CHANNEL_OUT_7POINT1POINT2);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_7POINT1, AUDIO_CHANNEL_OUT_7POINT1POINT4);
-// Note AUDIO_CHANNEL_OUT_7POINT1POINT2 is not subset of AUDIO_CHANNEL_OUT_7POINT1POINT4
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_5POINT1POINT4, AUDIO_CHANNEL_OUT_7POINT1POINT4);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_13POINT_360RA, AUDIO_CHANNEL_OUT_22POINT2);
-CHANNEL_CHECK_SUBSET_OF(AUDIO_CHANNEL_OUT_7POINT1POINT4, AUDIO_CHANNEL_OUT_22POINT2);
-
-#undef CHANNEL_CHECK_SUBSET_OF
-
-// Extra channel mask check
-static_assert(__builtin_popcount(AUDIO_CHANNEL_OUT_13POINT_360RA
-        ^ AUDIO_CHANNEL_OUT_7POINT1POINT4) == 7); // bfl, bfr, bfc + tfc replace lfe + bl + br
-
-#endif // __has_builtin(__builtin_popcount)
 
 #endif  // AUDIO_ARRAYS_STATIC_CHECK
 
diff --git a/audio/include/system/audio-base.h b/audio/include/system/audio-base.h
index d5c4452..97715ae 100644
--- a/audio/include/system/audio-base.h
+++ b/audio/include/system/audio-base.h
@@ -1,35 +1,511 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.audio@7.0
-// Location: hardware/interfaces/audio/7.0/
+// This file is autogenerated by hidl-gen
+// then manualy edited for retrocompatiblity
+// Source: android.hardware.audio.common@6.0
+// Root: android.hardware:hardware/interfaces
 
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V7_0_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V7_0_EXPORTED_CONSTANTS_H_
+#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_
+#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-typedef enum {
-    AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED = 0u,
-    AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT = 1u,
-    AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED = 2u,
-} audio_microphone_channel_mapping_t;
+enum {
+    AUDIO_IO_HANDLE_NONE = 0,
+    AUDIO_MODULE_HANDLE_NONE = 0,
+    AUDIO_PORT_HANDLE_NONE = 0,
+    AUDIO_PATCH_HANDLE_NONE = 0,
+};
 
 typedef enum {
-    AUDIO_MICROPHONE_LOCATION_UNKNOWN = 0u,
-    AUDIO_MICROPHONE_LOCATION_MAINBODY = 1u,
-    AUDIO_MICROPHONE_LOCATION_MAINBODY_MOVABLE = 2u,
-    AUDIO_MICROPHONE_LOCATION_PERIPHERAL = 3u,
-} audio_microphone_location_t;
+    AUDIO_STREAM_DEFAULT = -1, // (-1)
+    AUDIO_STREAM_MIN = 0,
+    AUDIO_STREAM_VOICE_CALL = 0,
+    AUDIO_STREAM_SYSTEM = 1,
+    AUDIO_STREAM_RING = 2,
+    AUDIO_STREAM_MUSIC = 3,
+    AUDIO_STREAM_ALARM = 4,
+    AUDIO_STREAM_NOTIFICATION = 5,
+    AUDIO_STREAM_BLUETOOTH_SCO = 6,
+    AUDIO_STREAM_ENFORCED_AUDIBLE = 7,
+    AUDIO_STREAM_DTMF = 8,
+    AUDIO_STREAM_TTS = 9,
+    AUDIO_STREAM_ACCESSIBILITY = 10,
+    AUDIO_STREAM_ASSISTANT = 11,
+#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
+    /** For dynamic policy output mixes. Only used by the audio policy */
+    AUDIO_STREAM_REROUTING = 12,
+    /** For audio flinger tracks volume. Only used by the audioflinger */
+    AUDIO_STREAM_PATCH = 13,
+    /** stream for corresponding to AUDIO_USAGE_CALL_ASSISTANT */
+    AUDIO_STREAM_CALL_ASSISTANT = 14,
+#endif // AUDIO_NO_SYSTEM_DECLARATIONS
+} audio_stream_type_t;
 
 typedef enum {
-    AUDIO_MICROPHONE_DIRECTIONALITY_UNKNOWN = 0u,
-    AUDIO_MICROPHONE_DIRECTIONALITY_OMNI = 1u,
-    AUDIO_MICROPHONE_DIRECTIONALITY_BI_DIRECTIONAL = 2u,
-    AUDIO_MICROPHONE_DIRECTIONALITY_CARDIOID = 3u,
-    AUDIO_MICROPHONE_DIRECTIONALITY_HYPER_CARDIOID = 4u,
-    AUDIO_MICROPHONE_DIRECTIONALITY_SUPER_CARDIOID = 5u,
-} audio_microphone_directionality_t;
+    AUDIO_SOURCE_DEFAULT = 0,
+    AUDIO_SOURCE_MIC = 1,
+    AUDIO_SOURCE_VOICE_UPLINK = 2,
+    AUDIO_SOURCE_VOICE_DOWNLINK = 3,
+    AUDIO_SOURCE_VOICE_CALL = 4,
+    AUDIO_SOURCE_CAMCORDER = 5,
+    AUDIO_SOURCE_VOICE_RECOGNITION = 6,
+    AUDIO_SOURCE_VOICE_COMMUNICATION = 7,
+    AUDIO_SOURCE_REMOTE_SUBMIX = 8,
+    AUDIO_SOURCE_UNPROCESSED = 9,
+    AUDIO_SOURCE_VOICE_PERFORMANCE = 10,
+    AUDIO_SOURCE_ECHO_REFERENCE = 1997,
+    AUDIO_SOURCE_FM_TUNER = 1998,
+#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
+    /**
+     * A low-priority, preemptible audio source for for background software
+     * hotword detection. Same tuning as VOICE_RECOGNITION.
+     * Used only internally by the framework.
+     */
+    AUDIO_SOURCE_HOTWORD = 1999,
+#endif // AUDIO_NO_SYSTEM_DECLARATIONS
+} audio_source_t;
+
+typedef enum {
+    AUDIO_SESSION_DEVICE = -2,
+    AUDIO_SESSION_OUTPUT_STAGE = -1, // (-1)
+    AUDIO_SESSION_OUTPUT_MIX = 0,
+    AUDIO_SESSION_ALLOCATE = 0,
+    AUDIO_SESSION_NONE = 0,
+} audio_session_t;
+
+typedef enum {
+    AUDIO_FORMAT_INVALID             = 0xFFFFFFFFu,
+    AUDIO_FORMAT_DEFAULT             = 0,
+    AUDIO_FORMAT_PCM                 = 0x00000000u,
+    AUDIO_FORMAT_MP3                 = 0x01000000u,
+    AUDIO_FORMAT_AMR_NB              = 0x02000000u,
+    AUDIO_FORMAT_AMR_WB              = 0x03000000u,
+    AUDIO_FORMAT_AAC                 = 0x04000000u,
+    AUDIO_FORMAT_HE_AAC_V1           = 0x05000000u,
+    AUDIO_FORMAT_HE_AAC_V2           = 0x06000000u,
+    AUDIO_FORMAT_VORBIS              = 0x07000000u,
+    AUDIO_FORMAT_OPUS                = 0x08000000u,
+    AUDIO_FORMAT_AC3                 = 0x09000000u,
+    AUDIO_FORMAT_E_AC3               = 0x0A000000u,
+    AUDIO_FORMAT_DTS                 = 0x0B000000u,
+    AUDIO_FORMAT_DTS_HD              = 0x0C000000u,
+    AUDIO_FORMAT_IEC61937            = 0x0D000000u,
+    AUDIO_FORMAT_DOLBY_TRUEHD        = 0x0E000000u,
+    AUDIO_FORMAT_EVRC                = 0x10000000u,
+    AUDIO_FORMAT_EVRCB               = 0x11000000u,
+    AUDIO_FORMAT_EVRCWB              = 0x12000000u,
+    AUDIO_FORMAT_EVRCNW              = 0x13000000u,
+    AUDIO_FORMAT_AAC_ADIF            = 0x14000000u,
+    AUDIO_FORMAT_WMA                 = 0x15000000u,
+    AUDIO_FORMAT_WMA_PRO             = 0x16000000u,
+    AUDIO_FORMAT_AMR_WB_PLUS         = 0x17000000u,
+    AUDIO_FORMAT_MP2                 = 0x18000000u,
+    AUDIO_FORMAT_QCELP               = 0x19000000u,
+    AUDIO_FORMAT_DSD                 = 0x1A000000u,
+    AUDIO_FORMAT_FLAC                = 0x1B000000u,
+    AUDIO_FORMAT_ALAC                = 0x1C000000u,
+    AUDIO_FORMAT_APE                 = 0x1D000000u,
+    AUDIO_FORMAT_AAC_ADTS            = 0x1E000000u,
+    AUDIO_FORMAT_SBC                 = 0x1F000000u,
+    AUDIO_FORMAT_APTX                = 0x20000000u,
+    AUDIO_FORMAT_APTX_HD             = 0x21000000u,
+    AUDIO_FORMAT_AC4                 = 0x22000000u,
+    AUDIO_FORMAT_LDAC                = 0x23000000u,
+    AUDIO_FORMAT_MAT                 = 0x24000000u,
+    AUDIO_FORMAT_AAC_LATM            = 0x25000000u,
+    AUDIO_FORMAT_CELT                = 0x26000000u,
+    AUDIO_FORMAT_APTX_ADAPTIVE       = 0x27000000u,
+    AUDIO_FORMAT_LHDC                = 0x28000000u,
+    AUDIO_FORMAT_LHDC_LL             = 0x29000000u,
+    AUDIO_FORMAT_APTX_TWSP           = 0x2A000000u,
+    AUDIO_FORMAT_MAIN_MASK           = 0xFF000000u,
+    AUDIO_FORMAT_SUB_MASK            = 0x00FFFFFFu,
+
+    /* Subformats */
+    AUDIO_FORMAT_PCM_SUB_16_BIT        = 0x1u,
+    AUDIO_FORMAT_PCM_SUB_8_BIT         = 0x2u,
+    AUDIO_FORMAT_PCM_SUB_32_BIT        = 0x3u,
+    AUDIO_FORMAT_PCM_SUB_8_24_BIT      = 0x4u,
+    AUDIO_FORMAT_PCM_SUB_FLOAT         = 0x5u,
+    AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED = 0x6u,
+
+    AUDIO_FORMAT_MP3_SUB_NONE          = 0x0u,
+
+    AUDIO_FORMAT_AMR_SUB_NONE          = 0x0u,
+
+    AUDIO_FORMAT_AAC_SUB_MAIN          = 0x1u,
+    AUDIO_FORMAT_AAC_SUB_LC            = 0x2u,
+    AUDIO_FORMAT_AAC_SUB_SSR           = 0x4u,
+    AUDIO_FORMAT_AAC_SUB_LTP           = 0x8u,
+    AUDIO_FORMAT_AAC_SUB_HE_V1         = 0x10u,
+    AUDIO_FORMAT_AAC_SUB_SCALABLE      = 0x20u,
+    AUDIO_FORMAT_AAC_SUB_ERLC          = 0x40u,
+    AUDIO_FORMAT_AAC_SUB_LD            = 0x80u,
+    AUDIO_FORMAT_AAC_SUB_HE_V2         = 0x100u,
+    AUDIO_FORMAT_AAC_SUB_ELD           = 0x200u,
+    AUDIO_FORMAT_AAC_SUB_XHE           = 0x300u,
+
+    AUDIO_FORMAT_VORBIS_SUB_NONE       = 0x0u,
+
+    AUDIO_FORMAT_E_AC3_SUB_JOC         = 0x1u,
+
+    AUDIO_FORMAT_MAT_SUB_1_0           = 0x1u,
+    AUDIO_FORMAT_MAT_SUB_2_0           = 0x2u,
+    AUDIO_FORMAT_MAT_SUB_2_1           = 0x3u,
+
+    /* Aliases */
+    AUDIO_FORMAT_PCM_16_BIT            = 0x1u,        // (PCM | PCM_SUB_16_BIT)
+    AUDIO_FORMAT_PCM_8_BIT             = 0x2u,        // (PCM | PCM_SUB_8_BIT)
+    AUDIO_FORMAT_PCM_32_BIT            = 0x3u,        // (PCM | PCM_SUB_32_BIT)
+    AUDIO_FORMAT_PCM_8_24_BIT          = 0x4u,        // (PCM | PCM_SUB_8_24_BIT)
+    AUDIO_FORMAT_PCM_FLOAT             = 0x5u,        // (PCM | PCM_SUB_FLOAT)
+    AUDIO_FORMAT_PCM_24_BIT_PACKED     = 0x6u,        // (PCM | PCM_SUB_24_BIT_PACKED)
+    AUDIO_FORMAT_AAC_MAIN              = 0x4000001u,  // (AAC | AAC_SUB_MAIN)
+    AUDIO_FORMAT_AAC_LC                = 0x4000002u,  // (AAC | AAC_SUB_LC)
+    AUDIO_FORMAT_AAC_SSR               = 0x4000004u,  // (AAC | AAC_SUB_SSR)
+    AUDIO_FORMAT_AAC_LTP               = 0x4000008u,  // (AAC | AAC_SUB_LTP)
+    AUDIO_FORMAT_AAC_HE_V1             = 0x4000010u,  // (AAC | AAC_SUB_HE_V1)
+    AUDIO_FORMAT_AAC_SCALABLE          = 0x4000020u,  // (AAC | AAC_SUB_SCALABLE)
+    AUDIO_FORMAT_AAC_ERLC              = 0x4000040u,  // (AAC | AAC_SUB_ERLC)
+    AUDIO_FORMAT_AAC_LD                = 0x4000080u,  // (AAC | AAC_SUB_LD)
+    AUDIO_FORMAT_AAC_HE_V2             = 0x4000100u,  // (AAC | AAC_SUB_HE_V2)
+    AUDIO_FORMAT_AAC_ELD               = 0x4000200u,  // (AAC | AAC_SUB_ELD)
+    AUDIO_FORMAT_AAC_XHE               = 0x4000300u,  // (AAC | AAC_SUB_XHE)
+    AUDIO_FORMAT_AAC_ADTS_MAIN         = 0x1e000001u, // (AAC_ADTS | AAC_SUB_MAIN)
+    AUDIO_FORMAT_AAC_ADTS_LC           = 0x1e000002u, // (AAC_ADTS | AAC_SUB_LC)
+    AUDIO_FORMAT_AAC_ADTS_SSR          = 0x1e000004u, // (AAC_ADTS | AAC_SUB_SSR)
+    AUDIO_FORMAT_AAC_ADTS_LTP          = 0x1e000008u, // (AAC_ADTS | AAC_SUB_LTP)
+    AUDIO_FORMAT_AAC_ADTS_HE_V1        = 0x1e000010u, // (AAC_ADTS | AAC_SUB_HE_V1)
+    AUDIO_FORMAT_AAC_ADTS_SCALABLE     = 0x1e000020u, // (AAC_ADTS | AAC_SUB_SCALABLE)
+    AUDIO_FORMAT_AAC_ADTS_ERLC         = 0x1e000040u, // (AAC_ADTS | AAC_SUB_ERLC)
+    AUDIO_FORMAT_AAC_ADTS_LD           = 0x1e000080u, // (AAC_ADTS | AAC_SUB_LD)
+    AUDIO_FORMAT_AAC_ADTS_HE_V2        = 0x1e000100u, // (AAC_ADTS | AAC_SUB_HE_V2)
+    AUDIO_FORMAT_AAC_ADTS_ELD          = 0x1e000200u, // (AAC_ADTS | AAC_SUB_ELD)
+    AUDIO_FORMAT_AAC_ADTS_XHE          = 0x1e000300u, // (AAC_ADTS | AAC_SUB_XHE)
+    AUDIO_FORMAT_AAC_LATM_LC           = 0x25000002u, // (AAC_LATM | AAC_SUB_LC)
+    AUDIO_FORMAT_AAC_LATM_HE_V1        = 0x25000010u, // (AAC_LATM | AAC_SUB_HE_V1)
+    AUDIO_FORMAT_AAC_LATM_HE_V2        = 0x25000100u, // (AAC_LATM | AAC_SUB_HE_V2)
+    AUDIO_FORMAT_E_AC3_JOC             = 0xA000001u,  // (E_AC3 | E_AC3_SUB_JOC)
+    AUDIO_FORMAT_MAT_1_0               = 0x24000001u, // (MAT | MAT_SUB_1_0)
+    AUDIO_FORMAT_MAT_2_0               = 0x24000002u, // (MAT | MAT_SUB_2_0)
+    AUDIO_FORMAT_MAT_2_1               = 0x24000003u, // (MAT | MAT_SUB_2_1)
+} audio_format_t;
+
+enum {
+    FCC_2 = 2,
+    FCC_8 = 8,
+};
+
+enum {
+    AUDIO_CHANNEL_REPRESENTATION_POSITION   = 0x0u,
+    AUDIO_CHANNEL_REPRESENTATION_INDEX      = 0x2u,
+    AUDIO_CHANNEL_NONE                      = 0x0u,
+    AUDIO_CHANNEL_INVALID                   = 0xC0000000u,
+
+    AUDIO_CHANNEL_OUT_FRONT_LEFT            = 0x1u,
+    AUDIO_CHANNEL_OUT_FRONT_RIGHT           = 0x2u,
+    AUDIO_CHANNEL_OUT_FRONT_CENTER          = 0x4u,
+    AUDIO_CHANNEL_OUT_LOW_FREQUENCY         = 0x8u,
+    AUDIO_CHANNEL_OUT_BACK_LEFT             = 0x10u,
+    AUDIO_CHANNEL_OUT_BACK_RIGHT            = 0x20u,
+    AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER  = 0x40u,
+    AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u,
+    AUDIO_CHANNEL_OUT_BACK_CENTER           = 0x100u,
+    AUDIO_CHANNEL_OUT_SIDE_LEFT             = 0x200u,
+    AUDIO_CHANNEL_OUT_SIDE_RIGHT            = 0x400u,
+    AUDIO_CHANNEL_OUT_TOP_CENTER            = 0x800u,
+    AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT        = 0x1000u,
+    AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER      = 0x2000u,
+    AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT       = 0x4000u,
+    AUDIO_CHANNEL_OUT_TOP_BACK_LEFT         = 0x8000u,
+    AUDIO_CHANNEL_OUT_TOP_BACK_CENTER       = 0x10000u,
+    AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT        = 0x20000u,
+    AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT         = 0x40000u,
+    AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT        = 0x80000u,
+    AUDIO_CHANNEL_OUT_HAPTIC_A              = 0x20000000u,
+    AUDIO_CHANNEL_OUT_HAPTIC_B              = 0x10000000u,
+    AUDIO_CHANNEL_OUT_MONO                  = 0x1u,     // OUT_FRONT_LEFT
+    AUDIO_CHANNEL_OUT_STEREO                = 0x3u,     // OUT_FRONT_LEFT | OUT_FRONT_RIGHT
+    AUDIO_CHANNEL_OUT_2POINT1               = 0xBu,     // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_LOW_FREQUENCY
+    AUDIO_CHANNEL_OUT_2POINT0POINT2         = 0xC0003u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
+    AUDIO_CHANNEL_OUT_2POINT1POINT2         = 0xC000Bu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY
+    AUDIO_CHANNEL_OUT_3POINT0POINT2         = 0xC0007u, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
+    AUDIO_CHANNEL_OUT_3POINT1POINT2         = 0xC000Fu, // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT | OUT_LOW_FREQUENCY
+    AUDIO_CHANNEL_OUT_QUAD                  = 0x33u,    // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_BACK_LEFT | OUT_BACK_RIGHT
+    AUDIO_CHANNEL_OUT_QUAD_BACK             = 0x33u,    // OUT_QUAD
+    AUDIO_CHANNEL_OUT_QUAD_SIDE             = 0x603u,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT
+    AUDIO_CHANNEL_OUT_SURROUND              = 0x107u,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_BACK_CENTER
+    AUDIO_CHANNEL_OUT_PENTA                 = 0x37u,    // OUT_QUAD | OUT_FRONT_CENTER
+    AUDIO_CHANNEL_OUT_5POINT1               = 0x3Fu,    // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT
+    AUDIO_CHANNEL_OUT_5POINT1_BACK          = 0x3Fu,    // OUT_5POINT1
+    AUDIO_CHANNEL_OUT_5POINT1_SIDE          = 0x60Fu,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_SIDE_LEFT | OUT_SIDE_RIGHT
+    AUDIO_CHANNEL_OUT_5POINT1POINT2         = 0xC003Fu, // OUT_5POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
+    AUDIO_CHANNEL_OUT_5POINT1POINT4         = 0x2D03Fu, // OUT_5POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT
+    AUDIO_CHANNEL_OUT_6POINT1               = 0x13Fu,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_BACK_CENTER
+    AUDIO_CHANNEL_OUT_7POINT1               = 0x63Fu,   // OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_FRONT_CENTER | OUT_LOW_FREQUENCY | OUT_BACK_LEFT | OUT_BACK_RIGHT | OUT_SIDE_LEFT | OUT_SIDE_RIGHT
+    AUDIO_CHANNEL_OUT_7POINT1POINT2         = 0xC063Fu, // OUT_7POINT1 | OUT_TOP_SIDE_LEFT | OUT_TOP_SIDE_RIGHT
+    AUDIO_CHANNEL_OUT_7POINT1POINT4         = 0x2D63Fu, // OUT_7POINT1 | OUT_TOP_FRONT_LEFT | OUT_TOP_FRONT_RIGHT | OUT_TOP_BACK_LEFT | OUT_TOP_BACK_RIGHT
+    AUDIO_CHANNEL_OUT_MONO_HAPTIC_A         = 0x20000001u,// OUT_FRONT_LEFT | OUT_HAPTIC_A
+    AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A       = 0x20000003u,// OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A
+    AUDIO_CHANNEL_OUT_HAPTIC_AB             = 0x30000000u,// OUT_HAPTIC_A | OUT_HAPTIC_B
+    AUDIO_CHANNEL_OUT_MONO_HAPTIC_AB        = 0x30000001u,// OUT_FRONT_LEFT | OUT_HAPTIC_A | OUT_HAPTIC_B
+    AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB      = 0x30000003u,// OUT_FRONT_LEFT | OUT_FRONT_RIGHT | OUT_HAPTIC_A | OUT_HAPTIC_B
+
+    AUDIO_CHANNEL_IN_LEFT                   = 0x4u,
+    AUDIO_CHANNEL_IN_RIGHT                  = 0x8u,
+    AUDIO_CHANNEL_IN_FRONT                  = 0x10u,
+    AUDIO_CHANNEL_IN_BACK                   = 0x20u,
+    AUDIO_CHANNEL_IN_LEFT_PROCESSED         = 0x40u,
+    AUDIO_CHANNEL_IN_RIGHT_PROCESSED        = 0x80u,
+    AUDIO_CHANNEL_IN_FRONT_PROCESSED        = 0x100u,
+    AUDIO_CHANNEL_IN_BACK_PROCESSED         = 0x200u,
+    AUDIO_CHANNEL_IN_PRESSURE               = 0x400u,
+    AUDIO_CHANNEL_IN_X_AXIS                 = 0x800u,
+    AUDIO_CHANNEL_IN_Y_AXIS                 = 0x1000u,
+    AUDIO_CHANNEL_IN_Z_AXIS                 = 0x2000u,
+    AUDIO_CHANNEL_IN_BACK_LEFT              = 0x10000u,
+    AUDIO_CHANNEL_IN_BACK_RIGHT             = 0x20000u,
+    AUDIO_CHANNEL_IN_CENTER                 = 0x40000u,
+    AUDIO_CHANNEL_IN_LOW_FREQUENCY          = 0x100000u,
+    AUDIO_CHANNEL_IN_TOP_LEFT               = 0x200000u,
+    AUDIO_CHANNEL_IN_TOP_RIGHT              = 0x400000u,
+    AUDIO_CHANNEL_IN_VOICE_UPLINK           = 0x4000u,
+    AUDIO_CHANNEL_IN_VOICE_DNLINK           = 0x8000u,
+    AUDIO_CHANNEL_IN_MONO                   = 0x10u,     // IN_FRONT
+    AUDIO_CHANNEL_IN_STEREO                 = 0xCu,      // IN_LEFT | IN_RIGHT
+    AUDIO_CHANNEL_IN_FRONT_BACK             = 0x30u,     // IN_FRONT | IN_BACK
+    AUDIO_CHANNEL_IN_6                      = 0xFCu,     // IN_LEFT | IN_RIGHT | IN_FRONT | IN_BACK | IN_LEFT_PROCESSED | IN_RIGHT_PROCESSED
+    AUDIO_CHANNEL_IN_2POINT0POINT2          = 0x60000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT
+    AUDIO_CHANNEL_IN_2POINT1POINT2          = 0x70000Cu, // IN_LEFT | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY
+    AUDIO_CHANNEL_IN_3POINT0POINT2          = 0x64000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT
+    AUDIO_CHANNEL_IN_3POINT1POINT2          = 0x74000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_TOP_LEFT | IN_TOP_RIGHT | IN_LOW_FREQUENCY
+    AUDIO_CHANNEL_IN_5POINT1                = 0x17000Cu, // IN_LEFT | IN_CENTER | IN_RIGHT | IN_BACK_LEFT | IN_BACK_RIGHT | IN_LOW_FREQUENCY
+    AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO      = 0x4010u,   // IN_VOICE_UPLINK | IN_MONO
+    AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO      = 0x8010u,   // IN_VOICE_DNLINK | IN_MONO
+    AUDIO_CHANNEL_IN_VOICE_CALL_MONO        = 0xC010u,   // IN_VOICE_UPLINK_MONO | IN_VOICE_DNLINK_MONO
+
+    AUDIO_CHANNEL_COUNT_MAX                 = 30u,
+    AUDIO_CHANNEL_INDEX_HDR                 = 0x80000000u, // REPRESENTATION_INDEX << COUNT_MAX
+    AUDIO_CHANNEL_INDEX_MASK_1              = 0x80000001u, // INDEX_HDR | (1 << 1) - 1
+    AUDIO_CHANNEL_INDEX_MASK_2              = 0x80000003u, // INDEX_HDR | (1 << 2) - 1
+    AUDIO_CHANNEL_INDEX_MASK_3              = 0x80000007u, // INDEX_HDR | (1 << 3) - 1
+    AUDIO_CHANNEL_INDEX_MASK_4              = 0x8000000Fu, // INDEX_HDR | (1 << 4) - 1
+    AUDIO_CHANNEL_INDEX_MASK_5              = 0x8000001Fu, // INDEX_HDR | (1 << 5) - 1
+    AUDIO_CHANNEL_INDEX_MASK_6              = 0x8000003Fu, // INDEX_HDR | (1 << 6) - 1
+    AUDIO_CHANNEL_INDEX_MASK_7              = 0x8000007Fu, // INDEX_HDR | (1 << 7) - 1
+    AUDIO_CHANNEL_INDEX_MASK_8              = 0x800000FFu, // INDEX_HDR | (1 << 8) - 1
+    AUDIO_CHANNEL_INDEX_MASK_9              = 0x800001FFu, // INDEX_HDR | (1 << 9) - 1
+    AUDIO_CHANNEL_INDEX_MASK_10             = 0x800003FFu, // INDEX_HDR | (1 << 10) - 1
+    AUDIO_CHANNEL_INDEX_MASK_11             = 0x800007FFu, // INDEX_HDR | (1 << 11) - 1
+    AUDIO_CHANNEL_INDEX_MASK_12             = 0x80000FFFu, // INDEX_HDR | (1 << 12) - 1
+    AUDIO_CHANNEL_INDEX_MASK_13             = 0x80001FFFu, // INDEX_HDR | (1 << 13) - 1
+    AUDIO_CHANNEL_INDEX_MASK_14             = 0x80003FFFu, // INDEX_HDR | (1 << 14) - 1
+    AUDIO_CHANNEL_INDEX_MASK_15             = 0x80007FFFu, // INDEX_HDR | (1 << 15) - 1
+    AUDIO_CHANNEL_INDEX_MASK_16             = 0x8000FFFFu, // INDEX_HDR | (1 << 16) - 1
+    AUDIO_CHANNEL_INDEX_MASK_17             = 0x8001FFFFu, // INDEX_HDR | (1 << 17) - 1
+    AUDIO_CHANNEL_INDEX_MASK_18             = 0x8003FFFFu, // INDEX_HDR | (1 << 18) - 1
+    AUDIO_CHANNEL_INDEX_MASK_19             = 0x8007FFFFu, // INDEX_HDR | (1 << 19) - 1
+    AUDIO_CHANNEL_INDEX_MASK_20             = 0x800FFFFFu, // INDEX_HDR | (1 << 20) - 1
+    AUDIO_CHANNEL_INDEX_MASK_21             = 0x801FFFFFu, // INDEX_HDR | (1 << 21) - 1
+    AUDIO_CHANNEL_INDEX_MASK_22             = 0x803FFFFFu, // INDEX_HDR | (1 << 22) - 1
+    AUDIO_CHANNEL_INDEX_MASK_23             = 0x807FFFFFu, // INDEX_HDR | (1 << 23) - 1
+    AUDIO_CHANNEL_INDEX_MASK_24             = 0x80FFFFFFu, // INDEX_HDR | (1 << 24) - 1
+};
+
+typedef enum {
+#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
+    AUDIO_MODE_INVALID = -2, // (-2)
+    AUDIO_MODE_CURRENT = -1, // (-1)
+#endif // AUDIO_NO_SYSTEM_DECLARATIONS
+    AUDIO_MODE_NORMAL = 0,
+    AUDIO_MODE_RINGTONE = 1,
+    AUDIO_MODE_IN_CALL = 2,
+    AUDIO_MODE_IN_COMMUNICATION = 3,
+    AUDIO_MODE_CALL_SCREEN = 4,
+} audio_mode_t;
+
+enum {
+    AUDIO_DEVICE_NONE                          = 0x0u,
+    AUDIO_DEVICE_BIT_IN                        = 0x80000000u,
+    AUDIO_DEVICE_BIT_DEFAULT                   = 0x40000000u,
+
+    AUDIO_DEVICE_OUT_EARPIECE                  = 0x1u,
+    AUDIO_DEVICE_OUT_SPEAKER                   = 0x2u,
+    AUDIO_DEVICE_OUT_WIRED_HEADSET             = 0x4u,
+    AUDIO_DEVICE_OUT_WIRED_HEADPHONE           = 0x8u,
+    AUDIO_DEVICE_OUT_BLUETOOTH_SCO             = 0x10u,
+    AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET     = 0x20u,
+    AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT      = 0x40u,
+    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP            = 0x80u,
+    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 0x100u,
+    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER    = 0x200u,
+    AUDIO_DEVICE_OUT_AUX_DIGITAL               = 0x400u,
+    AUDIO_DEVICE_OUT_HDMI                      = 0x400u,      // OUT_AUX_DIGITAL
+    AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET         = 0x800u,
+    AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET         = 0x1000u,
+    AUDIO_DEVICE_OUT_USB_ACCESSORY             = 0x2000u,
+    AUDIO_DEVICE_OUT_USB_DEVICE                = 0x4000u,
+    AUDIO_DEVICE_OUT_REMOTE_SUBMIX             = 0x8000u,
+    AUDIO_DEVICE_OUT_TELEPHONY_TX              = 0x10000u,
+    AUDIO_DEVICE_OUT_LINE                      = 0x20000u,
+    AUDIO_DEVICE_OUT_HDMI_ARC                  = 0x40000u,
+    AUDIO_DEVICE_OUT_SPDIF                     = 0x80000u,
+    AUDIO_DEVICE_OUT_FM                        = 0x100000u,
+    AUDIO_DEVICE_OUT_AUX_LINE                  = 0x200000u,
+    AUDIO_DEVICE_OUT_SPEAKER_SAFE              = 0x400000u,
+    AUDIO_DEVICE_OUT_IP                        = 0x800000u,
+    AUDIO_DEVICE_OUT_BUS                       = 0x1000000u,
+    AUDIO_DEVICE_OUT_PROXY                     = 0x2000000u,
+    AUDIO_DEVICE_OUT_USB_HEADSET               = 0x4000000u,
+    AUDIO_DEVICE_OUT_HEARING_AID               = 0x8000000u,
+    AUDIO_DEVICE_OUT_ECHO_CANCELLER            = 0x10000000u,
+    AUDIO_DEVICE_OUT_DEFAULT                   = 0x40000000u, // BIT_DEFAULT
+
+    AUDIO_DEVICE_IN_COMMUNICATION              = 0x80000001u, // BIT_IN | 0x1
+    AUDIO_DEVICE_IN_AMBIENT                    = 0x80000002u, // BIT_IN | 0x2
+    AUDIO_DEVICE_IN_BUILTIN_MIC                = 0x80000004u, // BIT_IN | 0x4
+    AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET      = 0x80000008u, // BIT_IN | 0x8
+    AUDIO_DEVICE_IN_WIRED_HEADSET              = 0x80000010u, // BIT_IN | 0x10
+    AUDIO_DEVICE_IN_AUX_DIGITAL                = 0x80000020u, // BIT_IN | 0x20
+    AUDIO_DEVICE_IN_HDMI                       = 0x80000020u, // IN_AUX_DIGITAL
+    AUDIO_DEVICE_IN_VOICE_CALL                 = 0x80000040u, // BIT_IN | 0x40
+    AUDIO_DEVICE_IN_TELEPHONY_RX               = 0x80000040u, // IN_VOICE_CALL
+    AUDIO_DEVICE_IN_BACK_MIC                   = 0x80000080u, // BIT_IN | 0x80
+    AUDIO_DEVICE_IN_REMOTE_SUBMIX              = 0x80000100u, // BIT_IN | 0x100
+    AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET          = 0x80000200u, // BIT_IN | 0x200
+    AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET          = 0x80000400u, // BIT_IN | 0x400
+    AUDIO_DEVICE_IN_USB_ACCESSORY              = 0x80000800u, // BIT_IN | 0x800
+    AUDIO_DEVICE_IN_USB_DEVICE                 = 0x80001000u, // BIT_IN | 0x1000
+    AUDIO_DEVICE_IN_FM_TUNER                   = 0x80002000u, // BIT_IN | 0x2000
+    AUDIO_DEVICE_IN_TV_TUNER                   = 0x80004000u, // BIT_IN | 0x4000
+    AUDIO_DEVICE_IN_LINE                       = 0x80008000u, // BIT_IN | 0x8000
+    AUDIO_DEVICE_IN_SPDIF                      = 0x80010000u, // BIT_IN | 0x10000
+    AUDIO_DEVICE_IN_BLUETOOTH_A2DP             = 0x80020000u, // BIT_IN | 0x20000
+    AUDIO_DEVICE_IN_LOOPBACK                   = 0x80040000u, // BIT_IN | 0x40000
+    AUDIO_DEVICE_IN_IP                         = 0x80080000u, // BIT_IN | 0x80000
+    AUDIO_DEVICE_IN_BUS                        = 0x80100000u, // BIT_IN | 0x100000
+    AUDIO_DEVICE_IN_PROXY                      = 0x81000000u, // BIT_IN | 0x1000000
+    AUDIO_DEVICE_IN_USB_HEADSET                = 0x82000000u, // BIT_IN | 0x2000000
+    AUDIO_DEVICE_IN_BLUETOOTH_BLE              = 0x84000000u, // BIT_IN | 0x4000000
+    AUDIO_DEVICE_IN_HDMI_ARC                   = 0x88000000u, // BIT_IN | 0x8000000
+    AUDIO_DEVICE_IN_ECHO_REFERENCE             = 0x90000000u, // BIT_IN | 0x10000000
+    AUDIO_DEVICE_IN_DEFAULT                    = 0xC0000000u, // BIT_IN | BIT_DEFAULT
+};
+
+typedef enum {
+    AUDIO_OUTPUT_FLAG_NONE             = 0x0,
+    AUDIO_OUTPUT_FLAG_DIRECT           = 0x1,
+    AUDIO_OUTPUT_FLAG_PRIMARY          = 0x2,
+    AUDIO_OUTPUT_FLAG_FAST             = 0x4,
+    AUDIO_OUTPUT_FLAG_DEEP_BUFFER      = 0x8,
+    AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD = 0x10,
+    AUDIO_OUTPUT_FLAG_NON_BLOCKING     = 0x20,
+    AUDIO_OUTPUT_FLAG_HW_AV_SYNC       = 0x40,
+    AUDIO_OUTPUT_FLAG_TTS              = 0x80,
+    AUDIO_OUTPUT_FLAG_RAW              = 0x100,
+    AUDIO_OUTPUT_FLAG_SYNC             = 0x200,
+    AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO  = 0x400,
+    AUDIO_OUTPUT_FLAG_DIRECT_PCM       = 0x2000,
+    AUDIO_OUTPUT_FLAG_MMAP_NOIRQ       = 0x4000,
+    AUDIO_OUTPUT_FLAG_VOIP_RX          = 0x8000,
+    AUDIO_OUTPUT_FLAG_INCALL_MUSIC     = 0x10000,
+} audio_output_flags_t;
+
+typedef enum {
+    AUDIO_INPUT_FLAG_NONE       = 0x0,
+    AUDIO_INPUT_FLAG_FAST       = 0x1,
+    AUDIO_INPUT_FLAG_HW_HOTWORD = 0x2,
+    AUDIO_INPUT_FLAG_RAW        = 0x4,
+    AUDIO_INPUT_FLAG_SYNC       = 0x8,
+    AUDIO_INPUT_FLAG_MMAP_NOIRQ = 0x10,
+    AUDIO_INPUT_FLAG_VOIP_TX    = 0x20,
+    AUDIO_INPUT_FLAG_HW_AV_SYNC = 0x40,
+    AUDIO_INPUT_FLAG_DIRECT     = 0x80,
+} audio_input_flags_t;
+
+typedef enum {
+    AUDIO_USAGE_UNKNOWN = 0,
+    AUDIO_USAGE_MEDIA = 1,
+    AUDIO_USAGE_VOICE_COMMUNICATION = 2,
+    AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING = 3,
+    AUDIO_USAGE_ALARM = 4,
+    AUDIO_USAGE_NOTIFICATION = 5,
+    AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE = 6,
+#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
+    AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST = 7,
+    AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT = 8,
+    AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED = 9,
+    AUDIO_USAGE_NOTIFICATION_EVENT = 10,
+#endif // AUDIO_NO_SYSTEM_DECLARATIONS
+    AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY = 11,
+    AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE = 12,
+    AUDIO_USAGE_ASSISTANCE_SONIFICATION = 13,
+    AUDIO_USAGE_GAME = 14,
+    AUDIO_USAGE_VIRTUAL_SOURCE = 15,
+    AUDIO_USAGE_ASSISTANT = 16,
+    AUDIO_USAGE_CALL_ASSISTANT = 17,
+    AUDIO_USAGE_EMERGENCY = 1000,
+    AUDIO_USAGE_SAFETY = 1001,
+    AUDIO_USAGE_VEHICLE_STATUS = 1002,
+    AUDIO_USAGE_ANNOUNCEMENT = 1003,
+} audio_usage_t;
+
+typedef enum {
+    AUDIO_ENCAPSULATION_MODE_NONE              = 0,
+    AUDIO_ENCAPSULATION_MODE_ELEMENTARY_STREAM = 1,
+    AUDIO_ENCAPSULATION_MODE_HANDLE            = 2,
+} audio_encapsulation_mode_t;
+
+// Manually add encapsulation metadata types.
+// TODO: add the definition in HIDL interface.
+typedef enum {
+    AUDIO_ENCAPSULATION_METADATA_TYPE_NONE              = 0,
+    AUDIO_ENCAPSULATION_METADATA_TYPE_FRAMEWORK_TUNER   = 1,
+    AUDIO_ENCAPSULATION_METADATA_TYPE_DVB_AD_DESCRIPTOR = 2,
+} audio_encapsulation_metadata_type_t;
+
+typedef enum {
+    AUDIO_CONTENT_TYPE_UNKNOWN = 0u,
+    AUDIO_CONTENT_TYPE_SPEECH = 1u,
+    AUDIO_CONTENT_TYPE_MUSIC = 2u,
+    AUDIO_CONTENT_TYPE_MOVIE = 3u,
+    AUDIO_CONTENT_TYPE_SONIFICATION = 4u,
+} audio_content_type_t;
+
+enum {
+    AUDIO_GAIN_MODE_JOINT    = 0x1u,
+    AUDIO_GAIN_MODE_CHANNELS = 0x2u,
+    AUDIO_GAIN_MODE_RAMP     = 0x4u,
+};
+
+typedef enum {
+    AUDIO_PORT_ROLE_NONE = 0,
+    AUDIO_PORT_ROLE_SOURCE = 1, // (::android::hardware::audio::common::V4_0::AudioPortRole.NONE implicitly + 1)
+    AUDIO_PORT_ROLE_SINK = 2, // (::android::hardware::audio::common::V4_0::AudioPortRole.SOURCE implicitly + 1)
+} audio_port_role_t;
+
+typedef enum {
+    AUDIO_PORT_TYPE_NONE = 0,
+    AUDIO_PORT_TYPE_DEVICE = 1, // (::android::hardware::audio::common::V4_0::AudioPortType.NONE implicitly + 1)
+    AUDIO_PORT_TYPE_MIX = 2, // (::android::hardware::audio::common::V4_0::AudioPortType.DEVICE implicitly + 1)
+    AUDIO_PORT_TYPE_SESSION = 3, // (::android::hardware::audio::common::V4_0::AudioPortType.MIX implicitly + 1)
+} audio_port_type_t;
+
+enum {
+    AUDIO_PORT_CONFIG_SAMPLE_RATE  = 0x1u,
+    AUDIO_PORT_CONFIG_CHANNEL_MASK = 0x2u,
+    AUDIO_PORT_CONFIG_FORMAT       = 0x4u,
+    AUDIO_PORT_CONFIG_GAIN         = 0x8u,
+#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
+    AUDIO_PORT_CONFIG_FLAGS        = 0x10u,  // Absent from AudioPortConfigMask, framework only.
+#endif
+};
+
+typedef enum {
+    AUDIO_LATENCY_LOW = 0,
+    AUDIO_LATENCY_NORMAL = 1, // (::android::hardware::audio::common::V4_0::AudioMixLatencyClass.LOW implicitly + 1)
+} audio_mix_latency_class_t;
 
 typedef enum {
     MIC_DIRECTION_UNSPECIFIED = 0,
@@ -47,16 +523,21 @@
 
 typedef enum {
     AUDIO_TIMESTRETCH_STRETCH_DEFAULT = 0,
-    AUDIO_TIMESTRETCH_STRETCH_VOICE = 1,
+    AUDIO_TIMESTRETCH_STRETCH_SPEECH = 1,
 } audio_timestretch_stretch_mode_t;
 
-enum {
-    HAL_AUDIO_TIMESTRETCH_FALLBACK_MUTE = 1,
-    HAL_AUDIO_TIMESTRETCH_FALLBACK_FAIL = 2,
-};
+typedef enum {
+#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
+    AUDIO_TIMESTRETCH_FALLBACK_CUT_REPEAT = -1, // (framework only) for speed <1.0 will truncate
+                                                // frames, for speed > 1.0 will repeat frames
+    AUDIO_TIMESTRETCH_FALLBACK_DEFAULT    = 0,  // (framework only) system determines behavior
+#endif
+    AUDIO_TIMESTRETCH_FALLBACK_MUTE           = 1,  // set all processed frames to zero
+    AUDIO_TIMESTRETCH_FALLBACK_FAIL           = 2,  // stop processing and indicate an error
+} audio_timestretch_fallback_mode_t;
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_V7_0_EXPORTED_CONSTANTS_H_
+#endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V4_0_EXPORTED_CONSTANTS_H_
diff --git a/audio/include/system/audio-hal-enums.h b/audio/include/system/audio-hal-enums.h
deleted file mode 100644
index c8434a3..0000000
--- a/audio/include/system/audio-hal-enums.h
+++ /dev/null
@@ -1,833 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// This header contains definitions of enums that are passed through
-// the system <-> vendor (also known as framework <-> HAL) boundary.
-// On the HAL side they are defined in the Audio Policy config schema:
-// h/i/audio/x.x/config/audio_policy_configuration.xsd
-//
-// These enums are passed between the framework and the HAL as
-// strings. Because of that, functions for to/from string conversion
-// are also defined here. The enums are defined in a way that
-// allows having only one list of values which is then used to
-// generate both enum definitions and to/from string converters.
-// As this header needs to be compatible with C, preprocessor
-// macros are used for templating.
-//
-// Some enums have framework-only extensions. They are disabled
-// for vendor code by means of AUDIO_NO_SYSTEM_DECLARATIONS define.
-// Framework-only enum values can not be received from HAL, thus
-// string -> enum conversion is not generated for them. However,
-// since enum -> string conversion is also useful for debugging
-// purposes, the corresponding cases are handled in conversion
-// functions.
-//
-// There is no automatic update of enum symbols list from the
-// audio HAL schema, or vice versa. Any new enum value used at
-// the system <-> vendor boundary must be added to both locations.
-//
-// No special functions are provided for dealing with enums that
-// constitute flags, e.g. to convert a mask into a list of strings.
-// String conversion functions only support individual flag values.
-// The only exception is 'audio_channel_mask_from_string' function
-// which only deals with masks, not with individual channels.
-
-#ifndef ANDROID_AUDIO_HAL_ENUMS_H
-#define ANDROID_AUDIO_HAL_ENUMS_H
-
-#include <stdbool.h>
-#include <stdint.h>
-#include <string.h>
-#include <sys/cdefs.h>
-
-__BEGIN_DECLS
-
-#define AUDIO_ENUM_QUOTE(x) #x
-#define AUDIO_ENUM_STRINGIFY(x) AUDIO_ENUM_QUOTE(x)
-// Simple enums are the ones relying on default values.
-// Enums that specify values need to use '_V' versions of macros.
-#define AUDIO_DEFINE_ENUM_SYMBOL(symbol) symbol,
-#define AUDIO_DEFINE_ENUM_SYMBOL_V(symbol, value) symbol = value,
-#define AUDIO_DEFINE_BIT_MASK(symbol) symbol |
-#define AUDIO_DEFINE_BIT_MASK_V(symbol, _) AUDIO_DEFINE_BIT_MASK(symbol)
-#define AUDIO_DEFINE_STRINGIFY_CASE(symbol) case symbol: return AUDIO_ENUM_STRINGIFY(symbol);
-#define AUDIO_DEFINE_STRINGIFY_CASE_V(symbol, _) AUDIO_DEFINE_STRINGIFY_CASE(symbol)
-#define AUDIO_DEFINE_PARSE_CASE(symbol) \
-    if (strcmp(s, AUDIO_ENUM_STRINGIFY(symbol)) == 0) { *t = symbol; return true; } else
-#define AUDIO_DEFINE_PARSE_CASE_V(symbol, _) AUDIO_DEFINE_PARSE_CASE(symbol)
-
-
-// These are individual output channel flags, only one bit must be set.
-#define AUDIO_CHANNEL_OUT_DISCRETE_CHANNEL_LIST_DEF(V) \
-    V(AUDIO_CHANNEL_OUT_FRONT_LEFT, 0x1u) \
-    V(AUDIO_CHANNEL_OUT_FRONT_RIGHT, 0x2u) \
-    V(AUDIO_CHANNEL_OUT_FRONT_CENTER, 0x4u) \
-    V(AUDIO_CHANNEL_OUT_LOW_FREQUENCY, 0x8u) \
-    V(AUDIO_CHANNEL_OUT_BACK_LEFT, 0x10u) \
-    V(AUDIO_CHANNEL_OUT_BACK_RIGHT, 0x20u) \
-    V(AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER, 0x40u) \
-    V(AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER, 0x80u) \
-    V(AUDIO_CHANNEL_OUT_BACK_CENTER, 0x100u) \
-    V(AUDIO_CHANNEL_OUT_SIDE_LEFT, 0x200u) \
-    V(AUDIO_CHANNEL_OUT_SIDE_RIGHT, 0x400u) \
-    V(AUDIO_CHANNEL_OUT_TOP_CENTER, 0x800u) \
-    V(AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT, 0x1000u) \
-    V(AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER, 0x2000u) \
-    V(AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT, 0x4000u) \
-    V(AUDIO_CHANNEL_OUT_TOP_BACK_LEFT, 0x8000u) \
-    V(AUDIO_CHANNEL_OUT_TOP_BACK_CENTER, 0x10000u) \
-    V(AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT, 0x20000u) \
-    V(AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT, 0x40000u) \
-    V(AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT, 0x80000u) \
-    V(AUDIO_CHANNEL_OUT_BOTTOM_FRONT_LEFT, 0x100000u) \
-    V(AUDIO_CHANNEL_OUT_BOTTOM_FRONT_CENTER, 0x200000u) \
-    V(AUDIO_CHANNEL_OUT_BOTTOM_FRONT_RIGHT, 0x400000u) \
-    V(AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2, 0x800000u) \
-    V(AUDIO_CHANNEL_OUT_HAPTIC_A, 0x20000000u) \
-    V(AUDIO_CHANNEL_OUT_HAPTIC_B, 0x10000000u)
-// These are individual input channel flags, only one bit must be set.
-#define AUDIO_CHANNEL_IN_DISCRETE_CHANNEL_LIST_DEF(V) \
-    V(AUDIO_CHANNEL_IN_LEFT, 0x4u) \
-    V(AUDIO_CHANNEL_IN_RIGHT, 0x8u) \
-    V(AUDIO_CHANNEL_IN_FRONT, 0x10u) \
-    V(AUDIO_CHANNEL_IN_BACK, 0x20u) \
-    V(AUDIO_CHANNEL_IN_LEFT_PROCESSED, 0x40u) \
-    V(AUDIO_CHANNEL_IN_RIGHT_PROCESSED, 0x80u) \
-    V(AUDIO_CHANNEL_IN_FRONT_PROCESSED, 0x100u) \
-    V(AUDIO_CHANNEL_IN_BACK_PROCESSED, 0x200u) \
-    V(AUDIO_CHANNEL_IN_PRESSURE, 0x400u) \
-    V(AUDIO_CHANNEL_IN_X_AXIS, 0x800u) \
-    V(AUDIO_CHANNEL_IN_Y_AXIS, 0x1000u) \
-    V(AUDIO_CHANNEL_IN_Z_AXIS, 0x2000u) \
-    V(AUDIO_CHANNEL_IN_VOICE_UPLINK, 0x4000u) \
-    V(AUDIO_CHANNEL_IN_VOICE_DNLINK, 0x8000u) \
-    V(AUDIO_CHANNEL_IN_BACK_LEFT, 0x10000u) \
-    V(AUDIO_CHANNEL_IN_BACK_RIGHT, 0x20000u) \
-    V(AUDIO_CHANNEL_IN_CENTER, 0x40000u) \
-    V(AUDIO_CHANNEL_IN_LOW_FREQUENCY, 0x100000u) \
-    V(AUDIO_CHANNEL_IN_TOP_LEFT, 0x200000u) \
-    V(AUDIO_CHANNEL_IN_TOP_RIGHT, 0x400000u)
-#define AUDIO_CHANNEL_IN_OUT_MASK_LIST_DEF(V) \
-    V(AUDIO_CHANNEL_NONE, 0x0u)
-// Input and output masks are defined via individual channels.
-#define AUDIO_CHANNEL_OUT_MASK_LIST_UNIQUE_DEF(V) \
-    V(AUDIO_CHANNEL_OUT_MONO, AUDIO_CHANNEL_OUT_FRONT_LEFT) \
-    V(AUDIO_CHANNEL_OUT_STEREO, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_2POINT1, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_LOW_FREQUENCY) \
-    V(AUDIO_CHANNEL_OUT_TRI, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER) \
-    V(AUDIO_CHANNEL_OUT_TRI_BACK, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_BACK_CENTER) \
-    V(AUDIO_CHANNEL_OUT_3POINT1, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY) \
-    V(AUDIO_CHANNEL_OUT_2POINT0POINT2, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_2POINT1POINT2, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT | AUDIO_CHANNEL_OUT_LOW_FREQUENCY) \
-    V(AUDIO_CHANNEL_OUT_3POINT0POINT2, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_3POINT1POINT2, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT | AUDIO_CHANNEL_OUT_LOW_FREQUENCY) \
-    V(AUDIO_CHANNEL_OUT_QUAD, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_BACK_LEFT | AUDIO_CHANNEL_OUT_BACK_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_QUAD_SIDE, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_SIDE_LEFT | AUDIO_CHANNEL_OUT_SIDE_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_SURROUND, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_BACK_CENTER) \
-    V(AUDIO_CHANNEL_OUT_PENTA, AUDIO_CHANNEL_OUT_QUAD | AUDIO_CHANNEL_OUT_FRONT_CENTER) \
-    V(AUDIO_CHANNEL_OUT_5POINT1, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY | AUDIO_CHANNEL_OUT_BACK_LEFT | AUDIO_CHANNEL_OUT_BACK_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_5POINT1_SIDE, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY | AUDIO_CHANNEL_OUT_SIDE_LEFT | AUDIO_CHANNEL_OUT_SIDE_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_5POINT1POINT2, AUDIO_CHANNEL_OUT_5POINT1 | AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_5POINT1POINT4, AUDIO_CHANNEL_OUT_5POINT1 | AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT | AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT | AUDIO_CHANNEL_OUT_TOP_BACK_LEFT | AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_6POINT1, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY | AUDIO_CHANNEL_OUT_BACK_LEFT | AUDIO_CHANNEL_OUT_BACK_RIGHT | AUDIO_CHANNEL_OUT_BACK_CENTER) \
-    V(AUDIO_CHANNEL_OUT_7POINT1, AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY | AUDIO_CHANNEL_OUT_BACK_LEFT | AUDIO_CHANNEL_OUT_BACK_RIGHT | AUDIO_CHANNEL_OUT_SIDE_LEFT | AUDIO_CHANNEL_OUT_SIDE_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_7POINT1POINT2, AUDIO_CHANNEL_OUT_7POINT1 | AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_7POINT1POINT4, AUDIO_CHANNEL_OUT_7POINT1 | AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT | AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT | AUDIO_CHANNEL_OUT_TOP_BACK_LEFT | AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT) \
-    V(AUDIO_CHANNEL_OUT_13POINT_360RA, \
-            AUDIO_CHANNEL_OUT_FRONT_LEFT | AUDIO_CHANNEL_OUT_FRONT_RIGHT | \
-            AUDIO_CHANNEL_OUT_FRONT_CENTER | \
-            AUDIO_CHANNEL_OUT_SIDE_LEFT | AUDIO_CHANNEL_OUT_SIDE_RIGHT | \
-            AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT | AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT | \
-            AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER | \
-            AUDIO_CHANNEL_OUT_TOP_BACK_LEFT | AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT | \
-            AUDIO_CHANNEL_OUT_BOTTOM_FRONT_LEFT | AUDIO_CHANNEL_OUT_BOTTOM_FRONT_RIGHT | \
-            AUDIO_CHANNEL_OUT_BOTTOM_FRONT_CENTER) \
-    V(AUDIO_CHANNEL_OUT_22POINT2, AUDIO_CHANNEL_OUT_7POINT1POINT4 | \
-            AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER | AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER | \
-            AUDIO_CHANNEL_OUT_BACK_CENTER | AUDIO_CHANNEL_OUT_TOP_CENTER | \
-            AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER | AUDIO_CHANNEL_OUT_TOP_BACK_CENTER | \
-            AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT | AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT | \
-            AUDIO_CHANNEL_OUT_BOTTOM_FRONT_LEFT | AUDIO_CHANNEL_OUT_BOTTOM_FRONT_RIGHT | \
-            AUDIO_CHANNEL_OUT_BOTTOM_FRONT_CENTER | \
-            AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2) \
-    V(AUDIO_CHANNEL_OUT_MONO_HAPTIC_A, AUDIO_CHANNEL_OUT_MONO | AUDIO_CHANNEL_OUT_HAPTIC_A) \
-    V(AUDIO_CHANNEL_OUT_STEREO_HAPTIC_A, AUDIO_CHANNEL_OUT_STEREO | AUDIO_CHANNEL_OUT_HAPTIC_A) \
-    V(AUDIO_CHANNEL_OUT_HAPTIC_AB, AUDIO_CHANNEL_OUT_HAPTIC_A | AUDIO_CHANNEL_OUT_HAPTIC_B) \
-    V(AUDIO_CHANNEL_OUT_MONO_HAPTIC_AB, AUDIO_CHANNEL_OUT_MONO | AUDIO_CHANNEL_OUT_HAPTIC_AB) \
-    V(AUDIO_CHANNEL_OUT_STEREO_HAPTIC_AB, AUDIO_CHANNEL_OUT_STEREO | AUDIO_CHANNEL_OUT_HAPTIC_AB)
-// Some of the channel masks have aliases. They can not appear in the 'to string'
-// converter as case values must be unique.
-#define AUDIO_CHANNEL_OUT_MASK_LIST_DEF(V) \
-    AUDIO_CHANNEL_OUT_MASK_LIST_UNIQUE_DEF(V) \
-    V(AUDIO_CHANNEL_OUT_5POINT1_BACK, AUDIO_CHANNEL_OUT_5POINT1) \
-    V(AUDIO_CHANNEL_OUT_QUAD_BACK, AUDIO_CHANNEL_OUT_QUAD)
-#define AUDIO_CHANNEL_IN_MASK_LIST_DEF(V) \
-    V(AUDIO_CHANNEL_IN_MONO, AUDIO_CHANNEL_IN_FRONT) \
-    V(AUDIO_CHANNEL_IN_STEREO, AUDIO_CHANNEL_IN_LEFT | AUDIO_CHANNEL_IN_RIGHT) \
-    V(AUDIO_CHANNEL_IN_FRONT_BACK, AUDIO_CHANNEL_IN_FRONT | AUDIO_CHANNEL_IN_BACK) \
-    V(AUDIO_CHANNEL_IN_6, AUDIO_CHANNEL_IN_LEFT | AUDIO_CHANNEL_IN_RIGHT | AUDIO_CHANNEL_IN_FRONT | AUDIO_CHANNEL_IN_BACK | AUDIO_CHANNEL_IN_LEFT_PROCESSED | AUDIO_CHANNEL_IN_RIGHT_PROCESSED) \
-    V(AUDIO_CHANNEL_IN_2POINT0POINT2, AUDIO_CHANNEL_IN_LEFT | AUDIO_CHANNEL_IN_RIGHT | AUDIO_CHANNEL_IN_TOP_LEFT | AUDIO_CHANNEL_IN_TOP_RIGHT) \
-    V(AUDIO_CHANNEL_IN_2POINT1POINT2, AUDIO_CHANNEL_IN_LEFT | AUDIO_CHANNEL_IN_RIGHT | AUDIO_CHANNEL_IN_TOP_LEFT | AUDIO_CHANNEL_IN_TOP_RIGHT | AUDIO_CHANNEL_IN_LOW_FREQUENCY) \
-    V(AUDIO_CHANNEL_IN_3POINT0POINT2, AUDIO_CHANNEL_IN_LEFT | AUDIO_CHANNEL_IN_CENTER | AUDIO_CHANNEL_IN_RIGHT | AUDIO_CHANNEL_IN_TOP_LEFT | AUDIO_CHANNEL_IN_TOP_RIGHT) \
-    V(AUDIO_CHANNEL_IN_3POINT1POINT2, AUDIO_CHANNEL_IN_LEFT | AUDIO_CHANNEL_IN_CENTER | AUDIO_CHANNEL_IN_RIGHT | AUDIO_CHANNEL_IN_TOP_LEFT | AUDIO_CHANNEL_IN_TOP_RIGHT | AUDIO_CHANNEL_IN_LOW_FREQUENCY) \
-    V(AUDIO_CHANNEL_IN_5POINT1, AUDIO_CHANNEL_IN_LEFT | AUDIO_CHANNEL_IN_CENTER | AUDIO_CHANNEL_IN_RIGHT | AUDIO_CHANNEL_IN_BACK_LEFT | AUDIO_CHANNEL_IN_BACK_RIGHT | AUDIO_CHANNEL_IN_LOW_FREQUENCY) \
-    V(AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO, AUDIO_CHANNEL_IN_VOICE_UPLINK | AUDIO_CHANNEL_IN_MONO) \
-    V(AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO, AUDIO_CHANNEL_IN_VOICE_DNLINK | AUDIO_CHANNEL_IN_MONO) \
-    V(AUDIO_CHANNEL_IN_VOICE_CALL_MONO, AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO | AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO)
-
-enum {
-    AUDIO_CHANNEL_COUNT_MAX = 30u,
-    // Can't use AUDIO_CHANNEL_REPRESENTATION_INDEX because audio.h depends on this header.
-    AUDIO_CHANNEL_INDEX_HDR = 0x80000000u, // AUDIO_CHANNEL_REPRESENTATION_INDEX << COUNT_MAX
-};
-
-// Channel index representation definitions.
-#define AUDIO_CHANNEL_INDEX_MASK_LIST_DEF(V) \
-    V(AUDIO_CHANNEL_INDEX_MASK_1, AUDIO_CHANNEL_INDEX_HDR | (1 << 1) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_2, AUDIO_CHANNEL_INDEX_HDR | (1 << 2) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_3, AUDIO_CHANNEL_INDEX_HDR | (1 << 3) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_4, AUDIO_CHANNEL_INDEX_HDR | (1 << 4) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_5, AUDIO_CHANNEL_INDEX_HDR | (1 << 5) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_6, AUDIO_CHANNEL_INDEX_HDR | (1 << 6) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_7, AUDIO_CHANNEL_INDEX_HDR | (1 << 7) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_8, AUDIO_CHANNEL_INDEX_HDR | (1 << 8) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_9, AUDIO_CHANNEL_INDEX_HDR | (1 << 9) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_10, AUDIO_CHANNEL_INDEX_HDR | (1 << 10) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_11, AUDIO_CHANNEL_INDEX_HDR | (1 << 11) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_12, AUDIO_CHANNEL_INDEX_HDR | (1 << 12) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_13, AUDIO_CHANNEL_INDEX_HDR | (1 << 13) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_14, AUDIO_CHANNEL_INDEX_HDR | (1 << 14) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_15, AUDIO_CHANNEL_INDEX_HDR | (1 << 15) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_16, AUDIO_CHANNEL_INDEX_HDR | (1 << 16) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_17, AUDIO_CHANNEL_INDEX_HDR | (1 << 17) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_18, AUDIO_CHANNEL_INDEX_HDR | (1 << 18) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_19, AUDIO_CHANNEL_INDEX_HDR | (1 << 19) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_20, AUDIO_CHANNEL_INDEX_HDR | (1 << 20) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_21, AUDIO_CHANNEL_INDEX_HDR | (1 << 21) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_22, AUDIO_CHANNEL_INDEX_HDR | (1 << 22) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_23, AUDIO_CHANNEL_INDEX_HDR | (1 << 23) - 1) \
-    V(AUDIO_CHANNEL_INDEX_MASK_24, AUDIO_CHANNEL_INDEX_HDR | (1 << 24) - 1)
-
-// The "channel mask" enum is comprised of discrete channels,
-// their combinations (masks), and special values.
-typedef enum {
-    AUDIO_CHANNEL_OUT_DISCRETE_CHANNEL_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-    AUDIO_CHANNEL_IN_DISCRETE_CHANNEL_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-    AUDIO_CHANNEL_IN_OUT_MASK_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-    AUDIO_CHANNEL_OUT_MASK_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-    AUDIO_CHANNEL_IN_MASK_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-    AUDIO_CHANNEL_INDEX_MASK_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-    AUDIO_CHANNEL_OUT_ALL =
-        AUDIO_CHANNEL_OUT_DISCRETE_CHANNEL_LIST_DEF(AUDIO_DEFINE_BIT_MASK_V) 0,
-    AUDIO_CHANNEL_HAPTIC_ALL = AUDIO_CHANNEL_OUT_HAPTIC_B |
-                               AUDIO_CHANNEL_OUT_HAPTIC_A,
-    AUDIO_CHANNEL_IN_ALL =
-        AUDIO_CHANNEL_IN_DISCRETE_CHANNEL_LIST_DEF(AUDIO_DEFINE_BIT_MASK_V) 0,
-    // This value must be part of the enum, but it is not a valid mask,
-    // and thus it does not participate in to/from string conversions.
-    AUDIO_CHANNEL_INVALID = 0xC0000000u,
-} audio_channel_mask_t;
-
-// Due to the fact that flag values for input and output channels
-// intersect, to string conversions must be defined separately.
-inline const char* audio_channel_out_mask_to_string(audio_channel_mask_t t) {
-    switch (t) {
-    AUDIO_CHANNEL_IN_OUT_MASK_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    AUDIO_CHANNEL_OUT_MASK_LIST_UNIQUE_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    default:
-        return "";
-    }
-}
-
-inline const char* audio_channel_in_mask_to_string(audio_channel_mask_t t) {
-    switch (t) {
-    AUDIO_CHANNEL_IN_OUT_MASK_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    AUDIO_CHANNEL_IN_MASK_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    default:
-        return "";
-    }
-}
-
-inline const char* audio_channel_index_mask_to_string(audio_channel_mask_t t) {
-    switch (t) {
-    AUDIO_CHANNEL_IN_OUT_MASK_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    AUDIO_CHANNEL_INDEX_MASK_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    default:
-        return "";
-    }
-}
-
-// Note: parsing is only done for masks, individual channels are not used by HAL.
-inline bool audio_channel_mask_from_string(const char* s, audio_channel_mask_t* t) {
-    AUDIO_CHANNEL_IN_OUT_MASK_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    AUDIO_CHANNEL_OUT_MASK_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    AUDIO_CHANNEL_IN_MASK_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    AUDIO_CHANNEL_INDEX_MASK_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_CHANNEL_INDEX_MASK_LIST_DEF
-#undef AUDIO_CHANNEL_IN_MASK_LIST_DEF
-#undef AUDIO_CHANNEL_OUT_MASK_LIST_DEF
-#undef AUDIO_CHANNEL_OUT_MASK_LIST_UNIQUE_DEF
-#undef AUDIO_CHANNEL_IN_OUT_MASK_LIST_DEF
-#undef AUDIO_CHANNEL_IN_DISCRETE_CHANNEL_LIST_DEF
-#undef AUDIO_CHANNEL_OUT_DISCRETE_CHANNEL_LIST_DEF
-
-
-#define AUDIO_CONTENT_TYPE_LIST_DEF(V) \
-    V(AUDIO_CONTENT_TYPE_UNKNOWN) \
-    V(AUDIO_CONTENT_TYPE_SPEECH) \
-    V(AUDIO_CONTENT_TYPE_MUSIC) \
-    V(AUDIO_CONTENT_TYPE_MOVIE) \
-    V(AUDIO_CONTENT_TYPE_SONIFICATION)
-
-typedef enum {
-    AUDIO_CONTENT_TYPE_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL)
-} audio_content_type_t;
-
-inline const char* audio_content_type_to_string(audio_content_type_t t) {
-    switch (t) {
-    AUDIO_CONTENT_TYPE_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE)
-    }
-    return "";
-}
-
-inline bool audio_content_type_from_string(const char* s, audio_content_type_t* t) {
-    AUDIO_CONTENT_TYPE_LIST_DEF(AUDIO_DEFINE_PARSE_CASE)
-    return false;
-}
-
-#undef AUDIO_CONTENT_TYPE_LIST_DEF
-
-
-// Flags that never appear on their own.
-enum {
-    AUDIO_DEVICE_BIT_IN = 0x80000000u,
-    AUDIO_DEVICE_BIT_DEFAULT = 0x40000000u,
-};
-
-#define AUDIO_DEVICE_LIST_UNIQUE_DEF(V) \
-    V(AUDIO_DEVICE_NONE, 0x0u) \
-    V(AUDIO_DEVICE_OUT_EARPIECE, 0x1u) \
-    V(AUDIO_DEVICE_OUT_SPEAKER, 0x2u) \
-    V(AUDIO_DEVICE_OUT_WIRED_HEADSET, 0x4u) \
-    V(AUDIO_DEVICE_OUT_WIRED_HEADPHONE, 0x8u) \
-    V(AUDIO_DEVICE_OUT_BLUETOOTH_SCO, 0x10u) \
-    V(AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET, 0x20u) \
-    V(AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT, 0x40u) \
-    V(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP, 0x80u) \
-    V(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES, 0x100u) \
-    V(AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER, 0x200u) \
-    V(AUDIO_DEVICE_OUT_HDMI, 0x400u) \
-    V(AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET, 0x800u) \
-    V(AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET, 0x1000u) \
-    V(AUDIO_DEVICE_OUT_USB_ACCESSORY, 0x2000u) \
-    V(AUDIO_DEVICE_OUT_USB_DEVICE, 0x4000u) \
-    V(AUDIO_DEVICE_OUT_REMOTE_SUBMIX, 0x8000u) \
-    V(AUDIO_DEVICE_OUT_TELEPHONY_TX, 0x10000u) \
-    V(AUDIO_DEVICE_OUT_LINE, 0x20000u) \
-    V(AUDIO_DEVICE_OUT_HDMI_ARC, 0x40000u) \
-    V(AUDIO_DEVICE_OUT_HDMI_EARC, 0x40001u) \
-    V(AUDIO_DEVICE_OUT_SPDIF, 0x80000u) \
-    V(AUDIO_DEVICE_OUT_FM, 0x100000u) \
-    V(AUDIO_DEVICE_OUT_AUX_LINE, 0x200000u) \
-    V(AUDIO_DEVICE_OUT_SPEAKER_SAFE, 0x400000u) \
-    V(AUDIO_DEVICE_OUT_IP, 0x800000u) \
-    V(AUDIO_DEVICE_OUT_BUS, 0x1000000u) \
-    V(AUDIO_DEVICE_OUT_PROXY, 0x2000000u) \
-    V(AUDIO_DEVICE_OUT_USB_HEADSET, 0x4000000u) \
-    V(AUDIO_DEVICE_OUT_HEARING_AID, 0x8000000u) \
-    V(AUDIO_DEVICE_OUT_ECHO_CANCELLER, 0x10000000u) \
-    V(AUDIO_DEVICE_OUT_BLE_HEADSET, 0x20000000u) \
-    V(AUDIO_DEVICE_OUT_BLE_SPEAKER, 0x20000001u) \
-    V(AUDIO_DEVICE_OUT_DEFAULT, AUDIO_DEVICE_BIT_DEFAULT) \
-    V(AUDIO_DEVICE_IN_COMMUNICATION, AUDIO_DEVICE_BIT_IN | 0x1u) \
-    V(AUDIO_DEVICE_IN_AMBIENT, AUDIO_DEVICE_BIT_IN | 0x2u) \
-    V(AUDIO_DEVICE_IN_BUILTIN_MIC, AUDIO_DEVICE_BIT_IN | 0x4u) \
-    V(AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET, AUDIO_DEVICE_BIT_IN | 0x8u) \
-    V(AUDIO_DEVICE_IN_WIRED_HEADSET, AUDIO_DEVICE_BIT_IN | 0x10u) \
-    V(AUDIO_DEVICE_IN_HDMI, AUDIO_DEVICE_BIT_IN | 0x20u) \
-    V(AUDIO_DEVICE_IN_TELEPHONY_RX, AUDIO_DEVICE_BIT_IN | 0x40u) \
-    V(AUDIO_DEVICE_IN_BACK_MIC, AUDIO_DEVICE_BIT_IN | 0x80u) \
-    V(AUDIO_DEVICE_IN_REMOTE_SUBMIX, AUDIO_DEVICE_BIT_IN | 0x100u) \
-    V(AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET, AUDIO_DEVICE_BIT_IN | 0x200u) \
-    V(AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET, AUDIO_DEVICE_BIT_IN | 0x400u) \
-    V(AUDIO_DEVICE_IN_USB_ACCESSORY, AUDIO_DEVICE_BIT_IN | 0x800u) \
-    V(AUDIO_DEVICE_IN_USB_DEVICE, AUDIO_DEVICE_BIT_IN | 0x1000u) \
-    V(AUDIO_DEVICE_IN_FM_TUNER, AUDIO_DEVICE_BIT_IN | 0x2000u) \
-    V(AUDIO_DEVICE_IN_TV_TUNER, AUDIO_DEVICE_BIT_IN | 0x4000u) \
-    V(AUDIO_DEVICE_IN_LINE, AUDIO_DEVICE_BIT_IN | 0x8000u) \
-    V(AUDIO_DEVICE_IN_SPDIF, AUDIO_DEVICE_BIT_IN | 0x10000u) \
-    V(AUDIO_DEVICE_IN_BLUETOOTH_A2DP, AUDIO_DEVICE_BIT_IN | 0x20000u) \
-    V(AUDIO_DEVICE_IN_LOOPBACK, AUDIO_DEVICE_BIT_IN | 0x40000u) \
-    V(AUDIO_DEVICE_IN_IP, AUDIO_DEVICE_BIT_IN | 0x80000u) \
-    V(AUDIO_DEVICE_IN_BUS, AUDIO_DEVICE_BIT_IN | 0x100000u) \
-    V(AUDIO_DEVICE_IN_PROXY, AUDIO_DEVICE_BIT_IN | 0x1000000u) \
-    V(AUDIO_DEVICE_IN_USB_HEADSET, AUDIO_DEVICE_BIT_IN | 0x2000000u) \
-    V(AUDIO_DEVICE_IN_BLUETOOTH_BLE, AUDIO_DEVICE_BIT_IN | 0x4000000u) \
-    V(AUDIO_DEVICE_IN_HDMI_ARC, AUDIO_DEVICE_BIT_IN | 0x8000000u) \
-    V(AUDIO_DEVICE_IN_HDMI_EARC, AUDIO_DEVICE_BIT_IN | 0x8000001u) \
-    V(AUDIO_DEVICE_IN_ECHO_REFERENCE, AUDIO_DEVICE_BIT_IN | 0x10000000u) \
-    V(AUDIO_DEVICE_IN_BLE_HEADSET, AUDIO_DEVICE_BIT_IN | 0x20000000u) \
-    V(AUDIO_DEVICE_IN_DEFAULT, AUDIO_DEVICE_BIT_IN | AUDIO_DEVICE_BIT_DEFAULT)
-// Some of the device enums have aliases. They can not appear in the 'to string'
-// converter as case values must be unique.
-#define AUDIO_DEVICE_LIST_DEF(V) \
-    AUDIO_DEVICE_LIST_UNIQUE_DEF(V) \
-    V(AUDIO_DEVICE_OUT_AUX_DIGITAL, AUDIO_DEVICE_OUT_HDMI) \
-    V(AUDIO_DEVICE_OUT_STUB, AUDIO_DEVICE_OUT_DEFAULT) \
-    V(AUDIO_DEVICE_IN_VOICE_CALL, AUDIO_DEVICE_IN_TELEPHONY_RX) \
-    V(AUDIO_DEVICE_IN_AUX_DIGITAL, AUDIO_DEVICE_IN_HDMI) \
-    V(AUDIO_DEVICE_IN_STUB, AUDIO_DEVICE_IN_DEFAULT)
-
-typedef enum {
-    AUDIO_DEVICE_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_devices_t;
-
-inline const char* audio_device_to_string(audio_devices_t t) {
-    switch (t) {
-    AUDIO_DEVICE_LIST_UNIQUE_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_device_from_string(const char* s, audio_devices_t* t) {
-    AUDIO_DEVICE_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_DEVICE_LIST_DEF
-#undef AUDIO_DEVICE_LIST_UNIQUE_DEF
-
-
-#define AUDIO_OUTPUT_FLAG_LIST_DEF(V) \
-    V(AUDIO_OUTPUT_FLAG_NONE, 0x0) \
-    V(AUDIO_OUTPUT_FLAG_DIRECT, 0x1) \
-    V(AUDIO_OUTPUT_FLAG_PRIMARY, 0x2) \
-    V(AUDIO_OUTPUT_FLAG_FAST, 0x4) \
-    V(AUDIO_OUTPUT_FLAG_DEEP_BUFFER, 0x8) \
-    V(AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD, 0x10) \
-    V(AUDIO_OUTPUT_FLAG_NON_BLOCKING, 0x20) \
-    V(AUDIO_OUTPUT_FLAG_HW_AV_SYNC, 0x40) \
-    V(AUDIO_OUTPUT_FLAG_TTS, 0x80) \
-    V(AUDIO_OUTPUT_FLAG_RAW, 0x100) \
-    V(AUDIO_OUTPUT_FLAG_SYNC, 0x200) \
-    V(AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO, 0x400) \
-    V(AUDIO_OUTPUT_FLAG_DIRECT_PCM, 0x2000) \
-    V(AUDIO_OUTPUT_FLAG_MMAP_NOIRQ, 0x4000) \
-    V(AUDIO_OUTPUT_FLAG_VOIP_RX, 0x8000) \
-    V(AUDIO_OUTPUT_FLAG_INCALL_MUSIC, 0x10000) \
-    V(AUDIO_OUTPUT_FLAG_GAPLESS_OFFLOAD, 0x20000)
-
-typedef enum {
-    AUDIO_OUTPUT_FLAG_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_output_flags_t;
-
-inline const char* audio_output_flag_to_string(audio_output_flags_t t) {
-    switch (t) {
-    AUDIO_OUTPUT_FLAG_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_output_flag_from_string(const char* s, audio_output_flags_t* t) {
-    AUDIO_OUTPUT_FLAG_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_OUTPUT_FLAG_LIST_DEF
-
-
-#define AUDIO_INPUT_FLAG_LIST_DEF(V) \
-    V(AUDIO_INPUT_FLAG_NONE, 0x0) \
-    V(AUDIO_INPUT_FLAG_FAST, 0x1) \
-    V(AUDIO_INPUT_FLAG_HW_HOTWORD, 0x2) \
-    V(AUDIO_INPUT_FLAG_RAW, 0x4) \
-    V(AUDIO_INPUT_FLAG_SYNC, 0x8) \
-    V(AUDIO_INPUT_FLAG_MMAP_NOIRQ, 0x10) \
-    V(AUDIO_INPUT_FLAG_VOIP_TX, 0x20) \
-    V(AUDIO_INPUT_FLAG_HW_AV_SYNC, 0x40) \
-    V(AUDIO_INPUT_FLAG_DIRECT, 0x80)
-
-typedef enum {
-    AUDIO_INPUT_FLAG_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_input_flags_t;
-
-inline const char* audio_input_flag_to_string(audio_input_flags_t t) {
-    switch (t) {
-    AUDIO_INPUT_FLAG_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_input_flag_from_string(const char* s, audio_input_flags_t* t) {
-    AUDIO_INPUT_FLAG_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_INPUT_FLAG_LIST_DEF
-
-
-// Anonymous enum that provides building blocks for audio format enums.
-// Because some of them are used on their own (e.g. masks), they retain 'AUDIO_FORMAT_' prefix.
-enum {
-    AUDIO_FORMAT_MAIN_MASK             = 0xFF000000u,
-    AUDIO_FORMAT_SUB_MASK              = 0x00FFFFFFu,
-
-    AUDIO_FORMAT_PCM_MAIN              = 0u,
-    AUDIO_FORMAT_PCM_SUB_16_BIT        = 0x1u,
-    AUDIO_FORMAT_PCM_SUB_8_BIT         = 0x2u,
-    AUDIO_FORMAT_PCM_SUB_32_BIT        = 0x3u,
-    AUDIO_FORMAT_PCM_SUB_8_24_BIT      = 0x4u,
-    AUDIO_FORMAT_PCM_SUB_FLOAT         = 0x5u,
-    AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED = 0x6u,
-
-    AUDIO_FORMAT_AAC_SUB_MAIN          = 0x1u,
-    AUDIO_FORMAT_AAC_SUB_LC            = 0x2u,
-    AUDIO_FORMAT_AAC_SUB_SSR           = 0x4u,
-    AUDIO_FORMAT_AAC_SUB_LTP           = 0x8u,
-    AUDIO_FORMAT_AAC_SUB_HE_V1         = 0x10u,
-    AUDIO_FORMAT_AAC_SUB_SCALABLE      = 0x20u,
-    AUDIO_FORMAT_AAC_SUB_ERLC          = 0x40u,
-    AUDIO_FORMAT_AAC_SUB_LD            = 0x80u,
-    AUDIO_FORMAT_AAC_SUB_HE_V2         = 0x100u,
-    AUDIO_FORMAT_AAC_SUB_ELD           = 0x200u,
-    AUDIO_FORMAT_AAC_SUB_XHE           = 0x300u,
-
-    AUDIO_FORMAT_E_AC3_SUB_JOC         = 0x1u,
-
-    AUDIO_FORMAT_MAT_SUB_1_0           = 0x1u,
-    AUDIO_FORMAT_MAT_SUB_2_0           = 0x2u,
-    AUDIO_FORMAT_MAT_SUB_2_1           = 0x3u,
-
-    AUDIO_FORMAT_MPEGH_SUB_BL_L3       = 0x13u,
-    AUDIO_FORMAT_MPEGH_SUB_BL_L4       = 0x14u,
-    AUDIO_FORMAT_MPEGH_SUB_LC_L3       = 0x23u,
-    AUDIO_FORMAT_MPEGH_SUB_LC_L4       = 0x24u,
-};
-
-#define AUDIO_FORMAT_LIST_UNIQUE_DEF(V) \
-    V(AUDIO_FORMAT_DEFAULT, AUDIO_FORMAT_PCM_MAIN) \
-    V(AUDIO_FORMAT_PCM_16_BIT, AUDIO_FORMAT_PCM_MAIN | AUDIO_FORMAT_PCM_SUB_16_BIT) \
-    V(AUDIO_FORMAT_PCM_8_BIT, AUDIO_FORMAT_PCM_MAIN | AUDIO_FORMAT_PCM_SUB_8_BIT) \
-    V(AUDIO_FORMAT_PCM_32_BIT, AUDIO_FORMAT_PCM_MAIN | AUDIO_FORMAT_PCM_SUB_32_BIT) \
-    V(AUDIO_FORMAT_PCM_8_24_BIT, AUDIO_FORMAT_PCM_MAIN | AUDIO_FORMAT_PCM_SUB_8_24_BIT) \
-    V(AUDIO_FORMAT_PCM_FLOAT, AUDIO_FORMAT_PCM_MAIN | AUDIO_FORMAT_PCM_SUB_FLOAT) \
-    V(AUDIO_FORMAT_PCM_24_BIT_PACKED, AUDIO_FORMAT_PCM_MAIN | AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED) \
-    V(AUDIO_FORMAT_MP3, 0x01000000u) \
-    V(AUDIO_FORMAT_AMR_NB, 0x02000000u) \
-    V(AUDIO_FORMAT_AMR_WB, 0x03000000u) \
-    V(AUDIO_FORMAT_AAC, 0x04000000u) \
-    V(AUDIO_FORMAT_AAC_MAIN, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_MAIN) \
-    V(AUDIO_FORMAT_AAC_LC, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_LC) \
-    V(AUDIO_FORMAT_AAC_SSR, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_SSR) \
-    V(AUDIO_FORMAT_AAC_LTP, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_LTP) \
-    V(AUDIO_FORMAT_AAC_HE_V1, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_HE_V1) \
-    V(AUDIO_FORMAT_AAC_SCALABLE, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_SCALABLE) \
-    V(AUDIO_FORMAT_AAC_ERLC, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_ERLC) \
-    V(AUDIO_FORMAT_AAC_LD, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_LD) \
-    V(AUDIO_FORMAT_AAC_HE_V2, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_HE_V2) \
-    V(AUDIO_FORMAT_AAC_ELD, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_ELD) \
-    V(AUDIO_FORMAT_AAC_XHE, AUDIO_FORMAT_AAC | AUDIO_FORMAT_AAC_SUB_XHE) \
-    V(AUDIO_FORMAT_HE_AAC_V1, 0x05000000u) \
-    V(AUDIO_FORMAT_HE_AAC_V2, 0x06000000u) \
-    V(AUDIO_FORMAT_VORBIS, 0x07000000u) \
-    V(AUDIO_FORMAT_OPUS, 0x08000000u) \
-    V(AUDIO_FORMAT_AC3, 0x09000000u) \
-    V(AUDIO_FORMAT_E_AC3, 0x0A000000u) \
-    V(AUDIO_FORMAT_E_AC3_JOC, AUDIO_FORMAT_E_AC3 | AUDIO_FORMAT_E_AC3_SUB_JOC) \
-    V(AUDIO_FORMAT_DTS, 0x0B000000u) \
-    V(AUDIO_FORMAT_DTS_HD, 0x0C000000u) \
-    V(AUDIO_FORMAT_IEC61937, 0x0D000000u) \
-    V(AUDIO_FORMAT_DOLBY_TRUEHD, 0x0E000000u) \
-    V(AUDIO_FORMAT_EVRC, 0x10000000u) \
-    V(AUDIO_FORMAT_EVRCB, 0x11000000u) \
-    V(AUDIO_FORMAT_EVRCWB, 0x12000000u) \
-    V(AUDIO_FORMAT_EVRCNW, 0x13000000u) \
-    V(AUDIO_FORMAT_AAC_ADIF, 0x14000000u) \
-    V(AUDIO_FORMAT_WMA, 0x15000000u) \
-    V(AUDIO_FORMAT_WMA_PRO, 0x16000000u) \
-    V(AUDIO_FORMAT_AMR_WB_PLUS, 0x17000000u) \
-    V(AUDIO_FORMAT_MP2, 0x18000000u) \
-    V(AUDIO_FORMAT_QCELP, 0x19000000u) \
-    V(AUDIO_FORMAT_DSD, 0x1A000000u) \
-    V(AUDIO_FORMAT_FLAC, 0x1B000000u) \
-    V(AUDIO_FORMAT_ALAC, 0x1C000000u) \
-    V(AUDIO_FORMAT_APE, 0x1D000000u) \
-    V(AUDIO_FORMAT_AAC_ADTS, 0x1E000000u) \
-    V(AUDIO_FORMAT_AAC_ADTS_MAIN, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_MAIN) \
-    V(AUDIO_FORMAT_AAC_ADTS_LC, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_LC) \
-    V(AUDIO_FORMAT_AAC_ADTS_SSR, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_SSR) \
-    V(AUDIO_FORMAT_AAC_ADTS_LTP, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_LTP) \
-    V(AUDIO_FORMAT_AAC_ADTS_HE_V1, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_HE_V1) \
-    V(AUDIO_FORMAT_AAC_ADTS_SCALABLE, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_SCALABLE) \
-    V(AUDIO_FORMAT_AAC_ADTS_ERLC, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_ERLC) \
-    V(AUDIO_FORMAT_AAC_ADTS_LD, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_LD) \
-    V(AUDIO_FORMAT_AAC_ADTS_HE_V2, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_HE_V2) \
-    V(AUDIO_FORMAT_AAC_ADTS_ELD, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_ELD) \
-    V(AUDIO_FORMAT_AAC_ADTS_XHE, AUDIO_FORMAT_AAC_ADTS | AUDIO_FORMAT_AAC_SUB_XHE) \
-    V(AUDIO_FORMAT_SBC, 0x1F000000u) \
-    V(AUDIO_FORMAT_APTX, 0x20000000u) \
-    V(AUDIO_FORMAT_APTX_HD, 0x21000000u) \
-    V(AUDIO_FORMAT_AC4, 0x22000000u) \
-    V(AUDIO_FORMAT_LDAC, 0x23000000u) \
-    V(AUDIO_FORMAT_MAT, 0x24000000u) \
-    V(AUDIO_FORMAT_MAT_1_0, AUDIO_FORMAT_MAT | AUDIO_FORMAT_MAT_SUB_1_0) \
-    V(AUDIO_FORMAT_MAT_2_0, AUDIO_FORMAT_MAT | AUDIO_FORMAT_MAT_SUB_2_0) \
-    V(AUDIO_FORMAT_MAT_2_1, AUDIO_FORMAT_MAT | AUDIO_FORMAT_MAT_SUB_2_1) \
-    V(AUDIO_FORMAT_AAC_LATM, 0x25000000u) \
-    V(AUDIO_FORMAT_AAC_LATM_LC, AUDIO_FORMAT_AAC_LATM | AUDIO_FORMAT_AAC_SUB_LC) \
-    V(AUDIO_FORMAT_AAC_LATM_HE_V1, AUDIO_FORMAT_AAC_LATM | AUDIO_FORMAT_AAC_SUB_HE_V1) \
-    V(AUDIO_FORMAT_AAC_LATM_HE_V2, AUDIO_FORMAT_AAC_LATM | AUDIO_FORMAT_AAC_SUB_HE_V2) \
-    V(AUDIO_FORMAT_CELT, 0x26000000u) \
-    V(AUDIO_FORMAT_APTX_ADAPTIVE, 0x27000000u) \
-    V(AUDIO_FORMAT_LHDC, 0x28000000u) \
-    V(AUDIO_FORMAT_LHDC_LL, 0x29000000u) \
-    V(AUDIO_FORMAT_APTX_TWSP, 0x2A000000u) \
-    V(AUDIO_FORMAT_LC3, 0x2B000000u) \
-    V(AUDIO_FORMAT_MPEGH, 0x2C000000u) \
-    V(AUDIO_FORMAT_MPEGH_BL_L3, AUDIO_FORMAT_MPEGH | AUDIO_FORMAT_MPEGH_SUB_BL_L3) \
-    V(AUDIO_FORMAT_MPEGH_BL_L4, AUDIO_FORMAT_MPEGH | AUDIO_FORMAT_MPEGH_SUB_BL_L4) \
-    V(AUDIO_FORMAT_MPEGH_LC_L3, AUDIO_FORMAT_MPEGH | AUDIO_FORMAT_MPEGH_SUB_LC_L3) \
-    V(AUDIO_FORMAT_MPEGH_LC_L4, AUDIO_FORMAT_MPEGH | AUDIO_FORMAT_MPEGH_SUB_LC_L4) \
-    V(AUDIO_FORMAT_IEC60958, 0x2D000000u) \
-    V(AUDIO_FORMAT_DTS_UHD, 0x2E000000u) \
-    V(AUDIO_FORMAT_DRA, 0x2F000000u)
-
-#define AUDIO_FORMAT_LIST_DEF(V) \
-    AUDIO_FORMAT_LIST_UNIQUE_DEF(V) \
-    V(VX_AUDIO_FORMAT_LC3, AUDIO_FORMAT_LC3)
-
-typedef enum {
-    AUDIO_FORMAT_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-    // These values must be part of the enum, but they are not valid formats,
-    // and thus don't participate in to/from string conversions.
-    AUDIO_FORMAT_INVALID = 0xFFFFFFFFu,
-    AUDIO_FORMAT_PCM = AUDIO_FORMAT_PCM_MAIN,
-} audio_format_t;
-
-inline const char* audio_format_to_string(audio_format_t t) {
-    switch (t) {
-    AUDIO_FORMAT_LIST_UNIQUE_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    default:
-        return "";
-    }
-}
-
-inline bool audio_format_from_string(const char* s, audio_format_t* t) {
-    AUDIO_FORMAT_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_FORMAT_LIST_DEF
-#undef AUDIO_FORMAT_LIST_UNIQUE_DEF
-
-#define AUDIO_GAIN_MODE_LIST_DEF(V) \
-    V(AUDIO_GAIN_MODE_JOINT, 1) \
-    V(AUDIO_GAIN_MODE_CHANNELS, 2) \
-    V(AUDIO_GAIN_MODE_RAMP, 4)
-
-typedef enum {
-    AUDIO_GAIN_MODE_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_gain_mode_t;
-
-inline const char* audio_gain_mode_to_string(audio_gain_mode_t t) {
-    switch (t) {
-    AUDIO_GAIN_MODE_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_gain_mode_from_string(const char* s, audio_gain_mode_t* t) {
-    AUDIO_GAIN_MODE_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_GAIN_MODE_LIST_DEF
-
-
-#define AUDIO_SOURCE_LIST_NO_SYS_DEF(V) \
-    V(AUDIO_SOURCE_DEFAULT, 0) \
-    V(AUDIO_SOURCE_MIC, 1) \
-    V(AUDIO_SOURCE_VOICE_UPLINK, 2) \
-    V(AUDIO_SOURCE_VOICE_DOWNLINK, 3) \
-    V(AUDIO_SOURCE_VOICE_CALL, 4) \
-    V(AUDIO_SOURCE_CAMCORDER, 5) \
-    V(AUDIO_SOURCE_VOICE_RECOGNITION, 6) \
-    V(AUDIO_SOURCE_VOICE_COMMUNICATION, 7) \
-    V(AUDIO_SOURCE_REMOTE_SUBMIX, 8) \
-    V(AUDIO_SOURCE_UNPROCESSED, 9) \
-    V(AUDIO_SOURCE_VOICE_PERFORMANCE, 10) \
-    V(AUDIO_SOURCE_ECHO_REFERENCE, 1997) \
-    V(AUDIO_SOURCE_FM_TUNER, 1998) \
-    V(AUDIO_SOURCE_HOTWORD, 1999)
-#ifdef AUDIO_NO_SYSTEM_DECLARATIONS
-#define AUDIO_SOURCE_LIST_DEF AUDIO_SOURCE_LIST_NO_SYS_DEF
-#else
-#define AUDIO_SOURCE_LIST_DEF(V) \
-    AUDIO_SOURCE_LIST_NO_SYS_DEF(V) \
-    V(AUDIO_SOURCE_INVALID, -1)
-#endif  // AUDIO_NO_SYSTEM_DECLARATIONS
-
-typedef enum {
-    AUDIO_SOURCE_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_source_t;
-
-inline const char* audio_source_to_string(audio_source_t t) {
-    switch (t) {
-    AUDIO_SOURCE_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_source_from_string(const char* s, audio_source_t* t) {
-    AUDIO_SOURCE_LIST_NO_SYS_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_SOURCE_LIST_DEF
-#undef AUDIO_SOURCE_LIST_NO_SYS_DEF
-
-#define AUDIO_STREAM_LIST_NO_SYS_DEF(V) \
-    V(AUDIO_STREAM_VOICE_CALL, 0) \
-    V(AUDIO_STREAM_SYSTEM, 1) \
-    V(AUDIO_STREAM_RING, 2) \
-    V(AUDIO_STREAM_MUSIC, 3) \
-    V(AUDIO_STREAM_ALARM, 4) \
-    V(AUDIO_STREAM_NOTIFICATION, 5) \
-    V(AUDIO_STREAM_BLUETOOTH_SCO, 6) \
-    V(AUDIO_STREAM_ENFORCED_AUDIBLE, 7) \
-    V(AUDIO_STREAM_DTMF, 8) \
-    V(AUDIO_STREAM_TTS, 9) \
-    V(AUDIO_STREAM_ACCESSIBILITY, 10) \
-    V(AUDIO_STREAM_ASSISTANT, 11) \
-    V(AUDIO_STREAM_REROUTING, 12) \
-    V(AUDIO_STREAM_PATCH, 13) \
-    V(AUDIO_STREAM_CALL_ASSISTANT, 14)
-#ifdef AUDIO_NO_SYSTEM_DECLARATIONS
-#define AUDIO_STREAM_LIST_DEF AUDIO_STREAM_LIST_NO_SYS_DEF
-#else
-#define AUDIO_STREAM_LIST_DEF(V) \
-    AUDIO_STREAM_LIST_NO_SYS_DEF(V) \
-    V(AUDIO_STREAM_DEFAULT, -1)
-#endif  // AUDIO_NO_SYSTEM_DECLARATIONS
-
-typedef enum {
-    AUDIO_STREAM_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_stream_type_t;
-
-inline const char* audio_stream_type_to_string(audio_stream_type_t t) {
-    switch (t) {
-    AUDIO_STREAM_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_stream_type_from_string(const char* s, audio_stream_type_t* t) {
-    AUDIO_STREAM_LIST_NO_SYS_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_STREAM_LIST_DEF
-#undef AUDIO_STREAM_LIST_NO_SYS_DEF
-
-
-#define AUDIO_USAGE_LIST_NO_SYS_DEF(V) \
-    V(AUDIO_USAGE_UNKNOWN, 0) \
-    V(AUDIO_USAGE_MEDIA, 1) \
-    V(AUDIO_USAGE_VOICE_COMMUNICATION, 2) \
-    V(AUDIO_USAGE_VOICE_COMMUNICATION_SIGNALLING, 3) \
-    V(AUDIO_USAGE_ALARM, 4) \
-    V(AUDIO_USAGE_NOTIFICATION, 5) \
-    V(AUDIO_USAGE_NOTIFICATION_TELEPHONY_RINGTONE, 6) \
-    V(AUDIO_USAGE_ASSISTANCE_ACCESSIBILITY, 11) \
-    V(AUDIO_USAGE_ASSISTANCE_NAVIGATION_GUIDANCE, 12) \
-    V(AUDIO_USAGE_ASSISTANCE_SONIFICATION, 13) \
-    V(AUDIO_USAGE_GAME, 14) \
-    V(AUDIO_USAGE_VIRTUAL_SOURCE, 15) \
-    V(AUDIO_USAGE_ASSISTANT, 16) \
-    V(AUDIO_USAGE_CALL_ASSISTANT, 17) \
-    V(AUDIO_USAGE_EMERGENCY, 1000) \
-    V(AUDIO_USAGE_SAFETY, 1001) \
-    V(AUDIO_USAGE_VEHICLE_STATUS, 1002) \
-    V(AUDIO_USAGE_ANNOUNCEMENT, 1003)
-#ifdef AUDIO_NO_SYSTEM_DECLARATIONS
-#define AUDIO_USAGE_LIST_DEF AUDIO_USAGE_LIST_NO_SYS_DEF
-#else
-#define AUDIO_USAGE_LIST_DEF(V) \
-    AUDIO_USAGE_LIST_NO_SYS_DEF(V) \
-    V(AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST, 7) \
-    V(AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT, 8) \
-    V(AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED, 9) \
-    V(AUDIO_USAGE_NOTIFICATION_EVENT, 10)
-#endif  // AUDIO_NO_SYSTEM_DECLARATIONS
-
-typedef enum {
-    AUDIO_USAGE_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_usage_t;
-
-inline const char* audio_usage_to_string(audio_usage_t t) {
-    switch (t) {
-    AUDIO_USAGE_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_usage_from_string(const char* s, audio_usage_t* t) {
-    AUDIO_USAGE_LIST_NO_SYS_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_USAGE_LIST_NO_SYS_DEF
-#undef AUDIO_USAGE_LIST_DEF
-
-#define AUDIO_ENCAPSULATION_TYPE_LIST_DEF(V) \
-    V(AUDIO_ENCAPSULATION_TYPE_NONE, 0) \
-    V(AUDIO_ENCAPSULATION_TYPE_IEC61937, 1)
-
-typedef enum {
-    AUDIO_ENCAPSULATION_TYPE_LIST_DEF(AUDIO_DEFINE_ENUM_SYMBOL_V)
-} audio_encapsulation_type_t;
-
-inline const char* audio_encapsulation_type_to_string(audio_encapsulation_type_t t) {
-    switch (t) {
-    AUDIO_ENCAPSULATION_TYPE_LIST_DEF(AUDIO_DEFINE_STRINGIFY_CASE_V)
-    }
-    return "";
-}
-
-inline bool audio_encapsulation_type_from_string(const char* s, audio_encapsulation_type_t* t) {
-    AUDIO_ENCAPSULATION_TYPE_LIST_DEF(AUDIO_DEFINE_PARSE_CASE_V)
-    return false;
-}
-
-#undef AUDIO_ENCAPSULATION_TYPE_LIST_DEF
-
-#undef AUDIO_DEFINE_PARSE_CASE_V
-#undef AUDIO_DEFINE_PARSE_CASE
-#undef AUDIO_DEFINE_STRINGIFY_CASE_V
-#undef AUDIO_DEFINE_STRINGIFY_CASE
-#undef AUDIO_DEFINE_BIT_MASK_V
-#undef AUDIO_DEFINE_BIT_MASK
-#undef AUDIO_DEFINE_ENUM_SYMBOL_V
-#undef AUDIO_DEFINE_ENUM_SYMBOL
-#undef AUDIO_ENUM_STRINGIFY
-#undef AUDIO_ENUM_QUOTE
-
-__END_DECLS
-
-#endif  // ANDROID_AUDIO_HAL_ENUMS_H
diff --git a/audio/include/system/audio.h b/audio/include/system/audio.h
index b411041..189f51b 100644
--- a/audio/include/system/audio.h
+++ b/audio/include/system/audio.h
@@ -21,14 +21,13 @@
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdio.h>
-#include <string.h>
 #include <sys/cdefs.h>
 #include <sys/types.h>
 
-#include "audio-base-utils.h"
+#include <cutils/bitops.h>
+
 #include "audio-base.h"
-#include "audio-hal-enums.h"
-#include "audio_common-base.h"
+#include "audio-base-utils.h"
 
 /*
  * Annotation to tell clang that we intend to fall through from one case to
@@ -59,34 +58,12 @@
 /* AudioFlinger and AudioPolicy services use I/O handles to identify audio sources and sinks */
 typedef int audio_io_handle_t;
 
-/* Null values for handles. */
-enum {
-    AUDIO_IO_HANDLE_NONE = 0,
-    AUDIO_MODULE_HANDLE_NONE = 0,
-    AUDIO_PORT_HANDLE_NONE = 0,
-    AUDIO_PATCH_HANDLE_NONE = 0,
-};
-
-typedef enum {
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    AUDIO_MODE_INVALID = -2, // (-2)
-    AUDIO_MODE_CURRENT = -1, // (-1)
-#endif // AUDIO_NO_SYSTEM_DECLARATIONS
-    AUDIO_MODE_NORMAL = HAL_AUDIO_MODE_NORMAL,
-    AUDIO_MODE_RINGTONE = HAL_AUDIO_MODE_RINGTONE,
-    AUDIO_MODE_IN_CALL = HAL_AUDIO_MODE_IN_CALL,
-    AUDIO_MODE_IN_COMMUNICATION = HAL_AUDIO_MODE_IN_COMMUNICATION,
-    AUDIO_MODE_CALL_SCREEN = HAL_AUDIO_MODE_CALL_SCREEN,
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    AUDIO_MODE_MAX            = AUDIO_MODE_CALL_SCREEN,
-    AUDIO_MODE_CNT            = AUDIO_MODE_MAX + 1,
-#endif // AUDIO_NO_SYSTEM_DECLARATIONS
-} audio_mode_t;
+typedef uint32_t audio_flags_mask_t;
 
 /* Do not change these values without updating their counterparts
  * in frameworks/base/media/java/android/media/AudioAttributes.java
  */
-typedef enum {
+enum {
     AUDIO_FLAG_NONE                       = 0x0,
     AUDIO_FLAG_AUDIBILITY_ENFORCED        = 0x1,
     AUDIO_FLAG_SECURE                     = 0x2,
@@ -102,7 +79,7 @@
     AUDIO_FLAG_MUTE_HAPTIC                = 0x800,
     AUDIO_FLAG_NO_SYSTEM_CAPTURE          = 0X1000,
     AUDIO_FLAG_CAPTURE_PRIVATE            = 0X2000,
-} audio_flags_mask_t;
+};
 
 /* Audio attributes */
 #define AUDIO_ATTRIBUTES_TAGS_MAX_SIZE 256
@@ -129,13 +106,6 @@
     return attributes;
 }
 
-static inline audio_attributes_t attributes_initializer_flags(audio_flags_mask_t flags)
-{
-    audio_attributes_t attributes = AUDIO_ATTRIBUTES_INITIALIZER;
-    attributes.flags = flags;
-    return attributes;
-}
-
 static inline void audio_flags_to_audio_output_flags(
                                            const audio_flags_mask_t audio_flags,
                                            audio_output_flags_t *flags)
@@ -188,16 +158,6 @@
     return (audio_unique_id_use_t) (id & AUDIO_UNIQUE_ID_USE_MASK);
 }
 
-typedef enum {
-    AUDIO_SESSION_DEVICE = HAL_AUDIO_SESSION_DEVICE,
-    AUDIO_SESSION_OUTPUT_STAGE = HAL_AUDIO_SESSION_OUTPUT_STAGE,
-    AUDIO_SESSION_OUTPUT_MIX = HAL_AUDIO_SESSION_OUTPUT_MIX,
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    AUDIO_SESSION_ALLOCATE = 0,
-    AUDIO_SESSION_NONE = 0,
-#endif
-} audio_session_t;
-
 /* Reserved audio_unique_id_t values.  FIXME: not a complete list. */
 #define AUDIO_UNIQUE_ID_ALLOCATE AUDIO_SESSION_ALLOCATE
 
@@ -208,23 +168,6 @@
     return session <= AUDIO_SESSION_OUTPUT_MIX;
 }
 
-/* These constants are used instead of "magic numbers" for
- * channel counts.
- */
-enum {
-    FCC_1 = 1,
-    FCC_2 = 2,
-    FCC_8 = 8,
-    FCC_12 = 12,
-    FCC_24 = 24,
-    // FCC_LIMIT is the maximum PCM channel count supported through
-    // the mixing pipeline to the audio HAL.
-    //
-    // This can be adjusted onto a value such as FCC_12 or FCC_24
-    // if the device HAL can support it.  Do not reduce below FCC_8.
-    FCC_LIMIT = FCC_12,
-};
-
 /* A channel mask per se only defines the presence or absence of a channel, not the order.
  * But see AUDIO_INTERLEAVE_* below for the platform convention of order.
  *
@@ -256,6 +199,7 @@
  * that is currently resolved by checking the channel mask, the implementer should look for ways to
  * fix it with additional information outside of the mask.
  */
+typedef uint32_t audio_channel_mask_t;
 
 /* log(2) of maximum number of representations, not part of public API */
 #define AUDIO_CHANNEL_REPRESENTATION_LOG2   2
@@ -266,10 +210,7 @@
     return channel & ((1 << AUDIO_CHANNEL_COUNT_MAX) - 1);
 }
 
-typedef enum {
-    AUDIO_CHANNEL_REPRESENTATION_POSITION   = 0x0u,
-    AUDIO_CHANNEL_REPRESENTATION_INDEX      = 0x2u,
-} audio_channel_representation_t;
+typedef uint32_t audio_channel_representation_t;
 
 /* The return value is undefined if the channel mask is invalid. */
 static inline audio_channel_representation_t audio_channel_mask_get_representation(
@@ -280,13 +221,6 @@
             ((channel >> AUDIO_CHANNEL_COUNT_MAX) & ((1 << AUDIO_CHANNEL_REPRESENTATION_LOG2) - 1));
 }
 
-#ifdef __cplusplus
-// Some effects use `int32_t` directly for channel mask.
-static inline uint32_t audio_channel_mask_get_representation(int32_t mask) {
-    return audio_channel_mask_get_representation(static_cast<audio_channel_mask_t>(mask));
-}
-#endif
-
 /* Returns true if the channel mask is valid,
  * or returns false for AUDIO_CHANNEL_NONE, AUDIO_CHANNEL_INVALID, and other invalid values.
  * This function is unable to determine whether a channel mask for position assignment
@@ -342,6 +276,18 @@
     AUDIO_IN_ACOUSTICS_TX_DISABLE    = 0,
 } audio_in_acoustics_t;
 
+typedef uint32_t audio_devices_t;
+/**
+ * Stub audio output device. Used in policy configuration file on platforms without audio outputs.
+ * This alias value to AUDIO_DEVICE_OUT_DEFAULT is only used in the audio policy context.
+ */
+#define AUDIO_DEVICE_OUT_STUB AUDIO_DEVICE_OUT_DEFAULT
+/**
+ * Stub audio input device. Used in policy configuration file on platforms without audio inputs.
+ * This alias value to AUDIO_DEVICE_IN_DEFAULT is only used in the audio policy context.
+ */
+#define AUDIO_DEVICE_IN_STUB AUDIO_DEVICE_IN_DEFAULT
+
 /* Additional information about compressed streams offloaded to
  * hardware playback
  * The version and size fields must be initialized by the caller by using
@@ -377,7 +323,7 @@
     /* .version = */ AUDIO_OFFLOAD_INFO_VERSION_CURRENT,
     /* .size = */ sizeof(audio_offload_info_t),
     /* .sample_rate = */ 0,
-    /* .channel_mask = */ AUDIO_CHANNEL_NONE,
+    /* .channel_mask = */ 0,
     /* .format = */ AUDIO_FORMAT_DEFAULT,
     /* .stream_type = */ AUDIO_STREAM_VOICE_CALL,
     /* .bit_rate = */ 0,
@@ -414,7 +360,7 @@
         /* .version = */ AUDIO_OFFLOAD_INFO_VERSION_CURRENT,
         /* .size = */ sizeof(audio_offload_info_t),
         /* .sample_rate = */ 0,
-        /* .channel_mask = */ AUDIO_CHANNEL_NONE,
+        /* .channel_mask = */ 0,
         /* .format = */ AUDIO_FORMAT_DEFAULT,
         /* .stream_type = */ AUDIO_STREAM_VOICE_CALL,
         /* .bit_rate = */ 0,
@@ -462,6 +408,9 @@
  * will then implement gain control functions that will use the following data
  * structures. */
 
+typedef uint32_t audio_gain_mode_t;
+
+
 /* An audio_gain struct is a representation of a gain stage.
  * A gain stage is always attached to an audio port. */
 struct audio_gain  {
@@ -489,7 +438,7 @@
     int                  values[sizeof(audio_channel_mask_t) * 8]; /* gain values in millibels
                                                for each channel ordered from LSb to MSb in
                                                channel mask. The number of values is 1 in joint
-                                               mode or __builtin_popcount(channel_mask) */
+                                               mode or popcount(channel_mask) */
     unsigned int         ramp_duration_ms; /* ramp duration in ms */
 };
 
@@ -545,38 +494,6 @@
     audio_session_t   session; /* audio session */
 };
 
-typedef enum {
-    AUDIO_PORT_ROLE_NONE = 0,
-    AUDIO_PORT_ROLE_SOURCE = 1,
-    AUDIO_PORT_ROLE_SINK = 2,
-} audio_port_role_t;
-
-typedef enum {
-    AUDIO_PORT_TYPE_NONE = 0,
-    AUDIO_PORT_TYPE_DEVICE = 1,
-    AUDIO_PORT_TYPE_MIX = 2,
-    AUDIO_PORT_TYPE_SESSION = 3,
-} audio_port_type_t;
-
-enum {
-    AUDIO_PORT_CONFIG_SAMPLE_RATE  = 0x1u,
-    AUDIO_PORT_CONFIG_CHANNEL_MASK = 0x2u,
-    AUDIO_PORT_CONFIG_FORMAT       = 0x4u,
-    AUDIO_PORT_CONFIG_GAIN         = 0x8u,
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    AUDIO_PORT_CONFIG_FLAGS        = 0x10u,
-#endif
-    AUDIO_PORT_CONFIG_ALL          = AUDIO_PORT_CONFIG_SAMPLE_RATE |
-                                     AUDIO_PORT_CONFIG_CHANNEL_MASK |
-                                     AUDIO_PORT_CONFIG_FORMAT |
-                                     AUDIO_PORT_CONFIG_GAIN,
-};
-
-typedef enum {
-    AUDIO_LATENCY_LOW = 0,
-    AUDIO_LATENCY_NORMAL = 1,
-} audio_mix_latency_class_t;
-
 /* audio port configuration structure used to specify a particular configuration of
  * an audio port */
 struct audio_port_config {
@@ -605,19 +522,8 @@
 #define AUDIO_PORT_MAX_CHANNEL_MASKS 32
 /* max number of audio formats in audio port */
 #define AUDIO_PORT_MAX_FORMATS 32
-/* max number of audio profiles in audio port. The audio profiles are used in
- * `struct audio_port_v7`. When converting between `struct audio_port` and
- * `struct audio_port_v7`, the number of audio profiles in `struct audio_port_v7`
- * must be the same as the number of formats in `struct audio_port`. Therefore,
- * the maximum number of audio profiles must be the same as the maximum number
- * of formats. */
-#define AUDIO_PORT_MAX_AUDIO_PROFILES AUDIO_PORT_MAX_FORMATS
-/* max number of extra audio descriptors in audio port. */
-#define AUDIO_PORT_MAX_EXTRA_AUDIO_DESCRIPTORS AUDIO_PORT_MAX_FORMATS
 /* max number of gain controls in audio port */
 #define AUDIO_PORT_MAX_GAINS 16
-/* max bytes of extra audio descriptor */
-#define EXTRA_AUDIO_DESCRIPTOR_SIZE 32
 
 /* extension for audio port structure when the audio port is a hardware device */
 struct audio_port_device_ext {
@@ -644,19 +550,19 @@
 };
 
 struct audio_port {
-    audio_port_handle_t      id;                 /* port unique ID */
-    audio_port_role_t        role;               /* sink or source */
-    audio_port_type_t        type;               /* device, mix ... */
+    audio_port_handle_t      id;                /* port unique ID */
+    audio_port_role_t        role;              /* sink or source */
+    audio_port_type_t        type;              /* device, mix ... */
     char                     name[AUDIO_PORT_MAX_NAME_LEN];
-    unsigned int             num_sample_rates;   /* number of sampling rates in following array */
+    unsigned int             num_sample_rates;  /* number of sampling rates in following array */
     unsigned int             sample_rates[AUDIO_PORT_MAX_SAMPLING_RATES];
-    unsigned int             num_channel_masks;  /* number of channel masks in following array */
+    unsigned int             num_channel_masks; /* number of channel masks in following array */
     audio_channel_mask_t     channel_masks[AUDIO_PORT_MAX_CHANNEL_MASKS];
-    unsigned int             num_formats;        /* number of formats in following array */
+    unsigned int             num_formats;       /* number of formats in following array */
     audio_format_t           formats[AUDIO_PORT_MAX_FORMATS];
-    unsigned int             num_gains;          /* number of gains in following array */
+    unsigned int             num_gains;         /* number of gains in following array */
     struct audio_gain        gains[AUDIO_PORT_MAX_GAINS];
-    struct audio_port_config active_config;      /* current audio port configuration */
+    struct audio_port_config active_config;     /* current audio port configuration */
     union {
         struct audio_port_device_ext  device;
         struct audio_port_mix_ext     mix;
@@ -664,409 +570,6 @@
     } ext;
 };
 
-typedef enum {
-    AUDIO_STANDARD_NONE = 0,
-    AUDIO_STANDARD_EDID = 1,
-} audio_standard_t;
-
-/**
- * Configuration described by hardware descriptor for a format that is unrecognized
- * by the platform.
- */
-struct audio_extra_audio_descriptor {
-    audio_standard_t standard;
-    unsigned int descriptor_length;
-    uint8_t descriptor[EXTRA_AUDIO_DESCRIPTOR_SIZE];
-    audio_encapsulation_type_t encapsulation_type;
-};
-
-/* configurations supported for a certain format */
-struct audio_profile {
-    audio_format_t format;
-    unsigned int num_sample_rates;  /* number of sampling rates in following array */
-    unsigned int sample_rates[AUDIO_PORT_MAX_SAMPLING_RATES];
-    unsigned int num_channel_masks; /* number of channel masks in following array */
-    audio_channel_mask_t channel_masks[AUDIO_PORT_MAX_CHANNEL_MASKS];
-    audio_encapsulation_type_t encapsulation_type;
-};
-
-struct audio_port_v7 {
-    audio_port_handle_t      id;                 /* port unique ID */
-    audio_port_role_t        role;               /* sink or source */
-    audio_port_type_t        type;               /* device, mix ... */
-    char                     name[AUDIO_PORT_MAX_NAME_LEN];
-    unsigned int             num_audio_profiles; /* number of audio profiles in the following
-                                                    array */
-    struct audio_profile     audio_profiles[AUDIO_PORT_MAX_AUDIO_PROFILES];
-    unsigned int             num_extra_audio_descriptors; /* number of extra audio descriptors in
-                                                             the following array */
-    struct audio_extra_audio_descriptor
-            extra_audio_descriptors[AUDIO_PORT_MAX_EXTRA_AUDIO_DESCRIPTORS];
-    unsigned int             num_gains;          /* number of gains in following array */
-    struct audio_gain        gains[AUDIO_PORT_MAX_GAINS];
-    struct audio_port_config active_config;      /* current audio port configuration */
-    union {
-        struct audio_port_device_ext  device;
-        struct audio_port_mix_ext     mix;
-        struct audio_port_session_ext session;
-    } ext;
-};
-
-/* Return true when a given uint8_t array is a valid short audio descriptor. This function just
- * does basic validation by checking if the first value is not zero.
- */
-static inline bool audio_is_valid_short_audio_descriptor(const uint8_t *shortAudioDescriptor,
-                                                         size_t length) {
-    return length != 0 && *shortAudioDescriptor != 0;
-}
-
-static inline void audio_populate_audio_port_v7(
-        const struct audio_port *port, struct audio_port_v7 *portV7) {
-    portV7->id = port->id;
-    portV7->role = port->role;
-    portV7->type = port->type;
-    strncpy(portV7->name, port->name, AUDIO_PORT_MAX_NAME_LEN);
-    portV7->name[AUDIO_PORT_MAX_NAME_LEN-1] = '\0';
-    portV7->num_audio_profiles =
-            port->num_formats > AUDIO_PORT_MAX_AUDIO_PROFILES ?
-            AUDIO_PORT_MAX_AUDIO_PROFILES : port->num_formats;
-    for (size_t i = 0; i < portV7->num_audio_profiles; ++i) {
-        portV7->audio_profiles[i].format = port->formats[i];
-        portV7->audio_profiles[i].num_sample_rates = port->num_sample_rates;
-        memcpy(portV7->audio_profiles[i].sample_rates, port->sample_rates,
-                port->num_sample_rates * sizeof(unsigned int));
-        portV7->audio_profiles[i].num_channel_masks = port->num_channel_masks;
-        memcpy(portV7->audio_profiles[i].channel_masks, port->channel_masks,
-                port->num_channel_masks * sizeof(audio_channel_mask_t));
-    }
-    portV7->num_gains = port->num_gains;
-    memcpy(portV7->gains, port->gains, port->num_gains * sizeof(struct audio_gain));
-    memcpy(&portV7->active_config, &port->active_config, sizeof(struct audio_port_config));
-    memcpy(&portV7->ext, &port->ext, sizeof(port->ext));
-}
-
-/* Populate the data in `struct audio_port` using data from `struct audio_port_v7`. As the
- * `struct audio_port_v7` use audio profiles to describe its capabilities, it may contain more
- * data for sample rates or channel masks than the data that can be held by `struct audio_port`.
- * Return true if all the data from `struct audio_port_v7` are converted to `struct audio_port`.
- * Otherwise, return false.
- */
-static inline bool audio_populate_audio_port(
-        const struct audio_port_v7 *portV7, struct audio_port *port) {
-    bool allDataConverted = true;
-    port->id = portV7->id;
-    port->role = portV7->role;
-    port->type = portV7->type;
-    strncpy(port->name, portV7->name, AUDIO_PORT_MAX_NAME_LEN);
-    port->name[AUDIO_PORT_MAX_NAME_LEN-1] = '\0';
-    port->num_formats =
-            portV7->num_audio_profiles > AUDIO_PORT_MAX_FORMATS ?
-            AUDIO_PORT_MAX_FORMATS : portV7->num_audio_profiles;
-    port->num_sample_rates = 0;
-    port->num_channel_masks = 0;
-    for (size_t i = 0; i < port->num_formats; ++i) {
-        port->formats[i] = portV7->audio_profiles[i].format;
-        for (size_t j = 0; j < portV7->audio_profiles[i].num_sample_rates; ++j) {
-            size_t k = 0;
-            for (; k < port->num_sample_rates; ++k) {
-                if (port->sample_rates[k] == portV7->audio_profiles[i].sample_rates[j]) {
-                    break;
-                }
-            }
-            if (k == port->num_sample_rates) {
-                if (port->num_sample_rates >= AUDIO_PORT_MAX_SAMPLING_RATES) {
-                    allDataConverted = false;
-                    break;
-                }
-                port->sample_rates[port->num_sample_rates++] =
-                        portV7->audio_profiles[i].sample_rates[j];
-            }
-        }
-        for (size_t j = 0; j < portV7->audio_profiles[i].num_channel_masks; ++j) {
-            size_t k = 0;
-            for (; k < port->num_channel_masks; ++k) {
-                if (port->channel_masks[k] == portV7->audio_profiles[i].channel_masks[j]) {
-                    break;
-                }
-            }
-            if (k == port->num_channel_masks) {
-                if (port->num_channel_masks >= AUDIO_PORT_MAX_CHANNEL_MASKS) {
-                    allDataConverted = false;
-                    break;
-                }
-                port->channel_masks[port->num_channel_masks++] =
-                        portV7->audio_profiles[i].channel_masks[j];
-            }
-        }
-    }
-    port->num_gains = portV7->num_gains;
-    memcpy(port->gains, portV7->gains, port->num_gains * sizeof(struct audio_gain));
-    memcpy(&port->active_config, &portV7->active_config, sizeof(struct audio_port_config));
-    memcpy(&port->ext, &portV7->ext, sizeof(port->ext));
-    return allDataConverted && portV7->num_extra_audio_descriptors == 0;
-}
-
-static inline bool audio_gain_config_are_equal(
-        const struct audio_gain_config *lhs, const struct audio_gain_config *rhs) {
-    if (lhs->mode != rhs->mode) return false;
-    if (lhs->mode & AUDIO_GAIN_MODE_JOINT) {
-        if (lhs->values[0] != rhs->values[0]) return false;
-    }
-    if (lhs->mode & (AUDIO_GAIN_MODE_CHANNELS | AUDIO_GAIN_MODE_RAMP)) {
-        if (lhs->channel_mask != rhs->channel_mask) return false;
-        for (int i = 0; i < __builtin_popcount(lhs->channel_mask); ++i) {
-            if (lhs->values[i] != rhs->values[i]) return false;
-        }
-    }
-    return lhs->ramp_duration_ms == rhs->ramp_duration_ms;
-}
-
-static inline bool audio_has_input_direction(audio_port_type_t type, audio_port_role_t role) {
-    switch (type) {
-    case AUDIO_PORT_TYPE_DEVICE:
-        switch (role) {
-        case AUDIO_PORT_ROLE_SOURCE: return true;
-        case AUDIO_PORT_ROLE_SINK: return false;
-        default: return false;
-        }
-    case AUDIO_PORT_TYPE_MIX:
-        switch (role) {
-        case AUDIO_PORT_ROLE_SOURCE: return false;
-        case AUDIO_PORT_ROLE_SINK: return true;
-        default: return false;
-        }
-    default: return false;
-    }
-}
-
-static inline bool audio_port_config_has_input_direction(const struct audio_port_config *port_cfg) {
-    return audio_has_input_direction(port_cfg->type, port_cfg->role);
-}
-
-static inline bool audio_port_configs_are_equal(
-        const struct audio_port_config *lhs, const struct audio_port_config *rhs) {
-    if (lhs->role != rhs->role || lhs->type != rhs->type) return false;
-    switch (lhs->type) {
-    case AUDIO_PORT_TYPE_NONE: break;
-    case AUDIO_PORT_TYPE_DEVICE:
-        if (lhs->ext.device.hw_module != rhs->ext.device.hw_module ||
-                lhs->ext.device.type != rhs->ext.device.type ||
-                strncmp(lhs->ext.device.address, rhs->ext.device.address,
-                        AUDIO_DEVICE_MAX_ADDRESS_LEN) != 0) {
-            return false;
-        }
-        break;
-    case AUDIO_PORT_TYPE_MIX:
-        if (lhs->ext.mix.hw_module != rhs->ext.mix.hw_module ||
-                lhs->ext.mix.handle != rhs->ext.mix.handle) return false;
-        if (lhs->role == AUDIO_PORT_ROLE_SOURCE &&
-                lhs->ext.mix.usecase.stream != rhs->ext.mix.usecase.stream) return false;
-        else if (lhs->role == AUDIO_PORT_ROLE_SINK &&
-                lhs->ext.mix.usecase.source != rhs->ext.mix.usecase.source) return false;
-        break;
-    case AUDIO_PORT_TYPE_SESSION:
-        if (lhs->ext.session.session != rhs->ext.session.session) return false;
-        break;
-    default: return false;
-    }
-    return
-            lhs->config_mask == rhs->config_mask &&
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-            ((lhs->config_mask & AUDIO_PORT_CONFIG_FLAGS) == 0 ||
-                    (audio_port_config_has_input_direction(lhs) ?
-                            lhs->flags.input == rhs->flags.input :
-                            lhs->flags.output == rhs->flags.output)) &&
-#endif
-            ((lhs->config_mask & AUDIO_PORT_CONFIG_SAMPLE_RATE) == 0 ||
-                    lhs->sample_rate == rhs->sample_rate) &&
-            ((lhs->config_mask & AUDIO_PORT_CONFIG_CHANNEL_MASK) == 0 ||
-                    lhs->channel_mask == rhs->channel_mask) &&
-            ((lhs->config_mask & AUDIO_PORT_CONFIG_FORMAT) == 0 ||
-                    lhs->format == rhs->format) &&
-            ((lhs->config_mask & AUDIO_PORT_CONFIG_GAIN) == 0 ||
-                    audio_gain_config_are_equal(&lhs->gain, &rhs->gain));
-}
-
-static inline bool audio_gains_are_equal(const struct audio_gain* lhs, const struct audio_gain* rhs) {
-    return lhs->mode == rhs->mode &&
-            ((lhs->mode & AUDIO_GAIN_MODE_CHANNELS) != AUDIO_GAIN_MODE_CHANNELS ||
-                    lhs->channel_mask == rhs->channel_mask) &&
-            lhs->min_value == rhs->min_value &&
-            lhs->max_value == rhs->max_value &&
-            lhs->default_value == rhs->default_value &&
-            lhs->step_value == rhs->step_value &&
-            lhs->min_ramp_ms == rhs->min_ramp_ms &&
-            lhs->max_ramp_ms == rhs->max_ramp_ms;
-}
-
-// Define the helper functions of compare two audio_port/audio_port_v7 only in
-// C++ as it is easier to compare the device capabilities.
-#ifdef __cplusplus
-extern "C++" {
-#include <map>
-#include <set>
-#include <type_traits>
-#include <utility>
-#include <vector>
-
-namespace {
-
-static inline bool audio_gain_array_contains_all_elements_from(
-        const struct audio_gain gains[], const size_t numGains,
-        const struct audio_gain from[], size_t numFromGains) {
-    for (size_t i = 0; i < numFromGains; ++i) {
-        size_t j = 0;
-        for (;j < numGains; ++j) {
-            if (audio_gains_are_equal(&from[i], &gains[j])) {
-                break;
-            }
-        }
-        if (j == numGains) {
-            return false;
-        }
-    }
-    return true;
-}
-
-template <typename T, std::enable_if_t<std::is_same<T, struct audio_port>::value
-                                    || std::is_same<T, struct audio_port_v7>::value, int> = 0>
-static inline bool audio_ports_base_are_equal(const T* lhs, const T* rhs) {
-    if (lhs->id != rhs->id || lhs->role != rhs->role || lhs->type != rhs->type ||
-            strncmp(lhs->name, rhs->name, AUDIO_PORT_MAX_NAME_LEN) != 0 ||
-            lhs->num_gains != rhs->num_gains) {
-        return false;
-    }
-    switch (lhs->type) {
-    case AUDIO_PORT_TYPE_NONE: break;
-    case AUDIO_PORT_TYPE_DEVICE:
-        if (
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-                lhs->ext.device.encapsulation_modes != rhs->ext.device.encapsulation_modes ||
-                lhs->ext.device.encapsulation_metadata_types !=
-                        rhs->ext.device.encapsulation_metadata_types ||
-#endif
-                lhs->ext.device.hw_module != rhs->ext.device.hw_module ||
-                lhs->ext.device.type != rhs->ext.device.type ||
-                strncmp(lhs->ext.device.address, rhs->ext.device.address,
-                        AUDIO_DEVICE_MAX_ADDRESS_LEN) != 0) {
-            return false;
-        }
-        break;
-    case AUDIO_PORT_TYPE_MIX:
-        if (lhs->ext.mix.hw_module != rhs->ext.mix.hw_module ||
-                lhs->ext.mix.handle != rhs->ext.mix.handle ||
-                lhs->ext.mix.latency_class != rhs->ext.mix.latency_class) {
-            return false;
-        }
-        break;
-    case AUDIO_PORT_TYPE_SESSION:
-        if (lhs->ext.session.session != rhs->ext.session.session) {
-            return false;
-        }
-        break;
-    default:
-        return false;
-    }
-    if (!audio_gain_array_contains_all_elements_from(
-            lhs->gains, lhs->num_gains, rhs->gains, rhs->num_gains) ||
-            !audio_gain_array_contains_all_elements_from(
-                    rhs->gains, rhs->num_gains, lhs->gains, lhs->num_gains)) {
-        return false;
-    }
-    return audio_port_configs_are_equal(&lhs->active_config, &rhs->active_config);
-}
-
-template <typename T, std::enable_if_t<std::is_same<T, audio_format_t>::value
-                                    || std::is_same<T, unsigned int>::value
-                                    || std::is_same<T, audio_channel_mask_t>::value, int> = 0>
-static inline bool audio_capability_arrays_are_equal(
-        const T lhs[], unsigned int lsize, const T rhs[], unsigned int rsize) {
-    std::set<T> lhsSet(lhs, lhs + lsize);
-    std::set<T> rhsSet(rhs, rhs + rsize);
-    return lhsSet == rhsSet;
-}
-
-using AudioProfileMap =
-        std::map<audio_format_t,
-                 std::pair<std::set<unsigned int>, std::set<audio_channel_mask_t>>>;
-static inline AudioProfileMap getAudioProfileMap(
-        const struct audio_profile profiles[], unsigned int size) {
-    AudioProfileMap audioProfiles;
-    for (size_t i = 0; i < size; ++i) {
-        std::set<unsigned int> sampleRates(
-                profiles[i].sample_rates, profiles[i].sample_rates + profiles[i].num_sample_rates);
-        std::set<audio_channel_mask_t> channelMasks(
-                profiles[i].channel_masks,
-                profiles[i].channel_masks + profiles[i].num_channel_masks);
-        audioProfiles.emplace(profiles[i].format, std::make_pair(sampleRates, channelMasks));
-    }
-    return audioProfiles;
-}
-
-static inline bool audio_profile_arrays_are_equal(
-        const struct audio_profile lhs[], unsigned int lsize,
-        const struct audio_profile rhs[], unsigned int rsize) {
-    return getAudioProfileMap(lhs, lsize) == getAudioProfileMap(rhs, rsize);
-}
-
-using ExtraAudioDescriptorMap =std::map<audio_standard_t,
-                                        std::map<audio_encapsulation_type_t,
-                                                 std::set<std::vector<uint8_t>>>>;
-
-static inline ExtraAudioDescriptorMap getExtraAudioDescriptorMap(
-        const struct audio_extra_audio_descriptor extraAudioDescriptors[],
-        unsigned int numExtraAudioDescriptors) {
-    ExtraAudioDescriptorMap extraAudioDescriptorMap;
-    for (unsigned int i = 0; i < numExtraAudioDescriptors; ++i) {
-        extraAudioDescriptorMap[extraAudioDescriptors[i].standard]
-                [extraAudioDescriptors[i].encapsulation_type].insert(
-                std::vector<uint8_t>(
-                        extraAudioDescriptors[i].descriptor,
-                        extraAudioDescriptors[i].descriptor
-                                + extraAudioDescriptors[i].descriptor_length));
-    }
-    return extraAudioDescriptorMap;
-}
-
-static inline bool audio_extra_audio_descriptor_are_equal(
-        const struct audio_extra_audio_descriptor lhs[], unsigned int lsize,
-        const struct audio_extra_audio_descriptor rhs[], unsigned int rsize) {
-    return getExtraAudioDescriptorMap(lhs, lsize) == getExtraAudioDescriptorMap(rhs, rsize);
-}
-
-} // namespace
-
-static inline bool audio_ports_are_equal(
-        const struct audio_port* lhs, const struct audio_port* rhs) {
-    if (!audio_ports_base_are_equal(lhs, rhs)) {
-        return false;
-    }
-    return audio_capability_arrays_are_equal(
-            lhs->formats, lhs->num_formats, rhs->formats, rhs->num_formats) &&
-            audio_capability_arrays_are_equal(
-                    lhs->sample_rates, lhs->num_sample_rates,
-                    rhs->sample_rates, rhs->num_sample_rates) &&
-            audio_capability_arrays_are_equal(
-                    lhs->channel_masks, lhs->num_channel_masks,
-                    rhs->channel_masks, rhs->num_channel_masks);
-}
-
-static inline bool audio_ports_v7_are_equal(
-        const struct audio_port_v7* lhs, const struct audio_port_v7* rhs) {
-    if (!audio_ports_base_are_equal(lhs, rhs)) {
-        return false;
-    }
-    return audio_profile_arrays_are_equal(
-            lhs->audio_profiles, lhs->num_audio_profiles,
-            rhs->audio_profiles, rhs->num_audio_profiles) &&
-           audio_extra_audio_descriptor_are_equal(
-                   lhs->extra_audio_descriptors, lhs->num_extra_audio_descriptors,
-                   rhs->extra_audio_descriptors, rhs->num_extra_audio_descriptors);
-}
-
-} // extern "C++"
-#endif // __cplusplus
-
 /* An audio patch represents a connection between one or more source ports and
  * one or more sink ports. Patches are connected and disconnected by audio policy manager or by
  * applications via framework APIs.
@@ -1159,43 +662,6 @@
     char dest_device_address[AUDIO_DEVICE_MAX_ADDRESS_LEN];
 } record_track_metadata_t;
 
-/** Metadata of a playback track for an in stream. */
-typedef struct playback_track_metadata_v7 {
-    struct playback_track_metadata base;
-    audio_channel_mask_t channel_mask;
-    char tags[AUDIO_ATTRIBUTES_TAGS_MAX_SIZE]; /* UTF8 */
-} playback_track_metadata_v7_t;
-
-/** Metadata of a record track for an out stream. */
-typedef struct record_track_metadata_v7 {
-    struct record_track_metadata base;
-    audio_channel_mask_t channel_mask;
-    char tags[AUDIO_ATTRIBUTES_TAGS_MAX_SIZE]; /* UTF8 */
-} record_track_metadata_v7_t;
-
-static inline void playback_track_metadata_to_v7(struct playback_track_metadata_v7 *dst,
-                                                 const struct playback_track_metadata *src) {
-    dst->base = *src;
-    dst->channel_mask = AUDIO_CHANNEL_NONE;
-    dst->tags[0] = '\0';
-}
-
-static inline void playback_track_metadata_from_v7(struct playback_track_metadata *dst,
-                                                   const struct playback_track_metadata_v7 *src) {
-    *dst = src->base;
-}
-
-static inline void record_track_metadata_to_v7(struct record_track_metadata_v7 *dst,
-                                               const struct record_track_metadata *src) {
-    dst->base = *src;
-    dst->channel_mask = AUDIO_CHANNEL_NONE;
-    dst->tags[0] = '\0';
-}
-
-static inline void record_track_metadata_from_v7(struct record_track_metadata *dst,
-                                                 const struct record_track_metadata_v7 *src) {
-    *dst = src->base;
-}
 
 /******************************
  *  Helper functions
@@ -1203,9 +669,8 @@
 
 // see also: std::binary_search
 // search range [left, right)
-static inline bool audio_binary_search_device_array(const audio_devices_t audio_array[],
-                                                    size_t left, size_t right,
-                                                    audio_devices_t target)
+static inline bool audio_binary_search_uint_array(const uint32_t audio_array[], size_t left,
+                                                  size_t right, uint32_t target)
 {
     if (right <= left || target < audio_array[left] || target > audio_array[right - 1]) {
         return false;
@@ -1242,7 +707,7 @@
         return true;
     default:
         // Binary seach all devices if the device is not a most common device.
-        return audio_binary_search_device_array(
+        return audio_binary_search_uint_array(
                 AUDIO_DEVICE_OUT_ALL_ARRAY, 0 /*left*/, AUDIO_DEVICE_OUT_CNT, device);
     }
 }
@@ -1263,24 +728,11 @@
         return true;
     default:
         // Binary seach all devices if the device is not a most common device.
-        return audio_binary_search_device_array(
+        return audio_binary_search_uint_array(
                 AUDIO_DEVICE_IN_ALL_ARRAY, 0 /*left*/, AUDIO_DEVICE_IN_CNT, device);
     }
 }
 
-#ifdef __cplusplus
-// Some effects use `uint32_t` directly for device.
-static inline bool audio_is_input_device(uint32_t device) {
-    return audio_is_input_device(static_cast<audio_devices_t>(device));
-}
-// This needs to be used when `audio_is_input_device` is passed
-// to an STL algorithm, as otherwise the compiler can't resolve
-// the overload at that point--the type of the container elements
-// doesn't appear in the predicate parameter type definition.
-const auto audio_call_is_input_device = [](auto x) { return audio_is_input_device(x); };
-#endif
-
-
 // TODO: this function expects a combination of audio device types as parameter. It should
 // be deprecated as audio device types should not be use as bit mask any more since R.
 static inline bool audio_is_output_devices(audio_devices_t device)
@@ -1295,7 +747,7 @@
 
 static inline bool audio_is_a2dp_out_device(audio_devices_t device)
 {
-    return audio_binary_search_device_array(
+    return audio_binary_search_uint_array(
             AUDIO_DEVICE_OUT_ALL_A2DP_ARRAY, 0 /*left*/, AUDIO_DEVICE_OUT_A2DP_CNT, device);
 }
 
@@ -1307,13 +759,13 @@
 
 static inline bool audio_is_bluetooth_out_sco_device(audio_devices_t device)
 {
-    return audio_binary_search_device_array(
+    return audio_binary_search_uint_array(
             AUDIO_DEVICE_OUT_ALL_SCO_ARRAY, 0 /*left*/, AUDIO_DEVICE_OUT_SCO_CNT, device);
 }
 
 static inline bool audio_is_bluetooth_in_sco_device(audio_devices_t device)
 {
-    return audio_binary_search_device_array(
+    return audio_binary_search_uint_array(
             AUDIO_DEVICE_IN_ALL_SCO_ARRAY, 0 /*left*/, AUDIO_DEVICE_IN_SCO_CNT, device);
 }
 
@@ -1330,13 +782,13 @@
 
 static inline bool audio_is_usb_out_device(audio_devices_t device)
 {
-    return audio_binary_search_device_array(
+    return audio_binary_search_uint_array(
             AUDIO_DEVICE_OUT_ALL_USB_ARRAY, 0 /*left*/, AUDIO_DEVICE_OUT_USB_CNT, device);
 }
 
 static inline bool audio_is_usb_in_device(audio_devices_t device)
 {
-    return audio_binary_search_device_array(
+    return audio_binary_search_uint_array(
             AUDIO_DEVICE_IN_ALL_USB_ARRAY, 0 /*left*/, AUDIO_DEVICE_IN_USB_CNT, device);
 }
 
@@ -1354,13 +806,13 @@
 
 static inline bool audio_is_digital_out_device(audio_devices_t device)
 {
-    return audio_binary_search_device_array(
+    return audio_binary_search_uint_array(
             AUDIO_DEVICE_OUT_ALL_DIGITAL_ARRAY, 0 /*left*/, AUDIO_DEVICE_OUT_DIGITAL_CNT, device);
 }
 
 static inline bool audio_is_digital_in_device(audio_devices_t device)
 {
-    return audio_binary_search_device_array(
+    return audio_binary_search_uint_array(
             AUDIO_DEVICE_IN_ALL_DIGITAL_ARRAY, 0 /*left*/, AUDIO_DEVICE_IN_DIGITAL_CNT, device);
 }
 
@@ -1369,23 +821,6 @@
            audio_is_digital_out_device(device);
 }
 
-static inline bool audio_is_ble_out_device(audio_devices_t device)
-{
-    return audio_binary_search_device_array(
-            AUDIO_DEVICE_OUT_ALL_BLE_ARRAY, 0 /*left*/, AUDIO_DEVICE_OUT_BLE_CNT, device);
-}
-
-static inline bool audio_is_ble_in_device(audio_devices_t device)
-{
-    return audio_binary_search_device_array(
-            AUDIO_DEVICE_IN_ALL_BLE_ARRAY, 0 /*left*/, AUDIO_DEVICE_IN_BLE_CNT, device);
-}
-
-static inline bool audio_is_ble_device(audio_devices_t device) {
-    return audio_is_ble_in_device(device) ||
-           audio_is_ble_out_device(device);
-}
-
 /* Returns true if:
  *  representation is valid, and
  *  there is at least one channel bit set which _could_ correspond to an input channel, and
@@ -1445,20 +880,12 @@
         bits &= AUDIO_CHANNEL_IN_ALL;
         FALLTHROUGH_INTENDED;
     case AUDIO_CHANNEL_REPRESENTATION_INDEX:
-        return __builtin_popcount(bits);
+        return popcount(bits);
     default:
         return 0;
     }
 }
 
-#ifdef __cplusplus
-// FIXME(b/169889714): buffer_config_t uses `uint32_t` for the mask.
-// A lot of effects code thus use `uint32_t` directly.
-static inline uint32_t audio_channel_count_from_in_mask(uint32_t mask) {
-    return audio_channel_count_from_in_mask(static_cast<audio_channel_mask_t>(mask));
-}
-#endif
-
 /* Returns the number of channels from an output channel mask,
  * used in the context of audio output or playback.
  * If a channel bit is set which could _not_ correspond to an output channel,
@@ -1474,20 +901,12 @@
         bits &= AUDIO_CHANNEL_OUT_ALL;
         FALLTHROUGH_INTENDED;
     case AUDIO_CHANNEL_REPRESENTATION_INDEX:
-        return __builtin_popcount(bits);
+        return popcount(bits);
     default:
         return 0;
     }
 }
 
-#ifdef __cplusplus
-// FIXME(b/169889714): buffer_config_t uses `uint32_t` for the mask.
-// A lot of effects code thus use `uint32_t` directly.
-static inline uint32_t audio_channel_count_from_out_mask(uint32_t mask) {
-    return audio_channel_count_from_out_mask(static_cast<audio_channel_mask_t>(mask));
-}
-#endif
-
 /* Derive a channel mask for index assignment from a channel count.
  * Returns the matching channel mask,
  * or AUDIO_CHANNEL_NONE if the channel count is zero,
@@ -1544,15 +963,10 @@
     case 7: // 6.1
         bits = AUDIO_CHANNEL_OUT_5POINT1 | AUDIO_CHANNEL_OUT_BACK_CENTER;
         break;
-    case FCC_8:
+    case 8:
         bits = AUDIO_CHANNEL_OUT_7POINT1;
         break;
-    case FCC_12:
-        bits = AUDIO_CHANNEL_OUT_7POINT1POINT4;
-        break;
-    case FCC_24:
-        bits = AUDIO_CHANNEL_OUT_22POINT2;
-        break;
+    // FIXME FCC_8
     default:
         return AUDIO_CHANNEL_INVALID;
     }
@@ -1579,10 +993,15 @@
     case 2:
         bits = AUDIO_CHANNEL_IN_STEREO;
         break;
+    case 3:
+    case 4:
+    case 5:
+    case 6:
+    case 7:
+    case 8:
+        // FIXME FCC_8
+        return audio_channel_mask_for_index_assignment_from_count(channel_count);
     default:
-        if (channel_count <= FCC_LIMIT) {
-            return audio_channel_mask_for_index_assignment_from_count(channel_count);
-        }
         return AUDIO_CHANNEL_INVALID;
     }
     return audio_channel_mask_from_representation_and_bits(
@@ -1656,11 +1075,10 @@
         return false;
     }
     const uint32_t audioChannelCount = audio_channel_count_from_out_mask(
-            (audio_channel_mask_t)(channelMask & ~AUDIO_CHANNEL_HAPTIC_ALL));
+            channelMask & ~AUDIO_CHANNEL_HAPTIC_ALL);
     const uint32_t hapticChannelCount = audio_channel_count_from_out_mask(
-            (audio_channel_mask_t)(channelMask & AUDIO_CHANNEL_HAPTIC_ALL));
-    return channelMask == (audio_channel_mask_t)(
-            audio_channel_out_mask_from_count(audioChannelCount) |
+            channelMask & AUDIO_CHANNEL_HAPTIC_ALL);
+    return channelMask == (audio_channel_out_mask_from_count(audioChannelCount) |
             haptic_channel_mask_from_count(hapticChannelCount));
 }
 
@@ -1720,7 +1138,6 @@
         /* not reached */
     case AUDIO_FORMAT_DTS:
     case AUDIO_FORMAT_DTS_HD:
-    case AUDIO_FORMAT_IEC60958:
     case AUDIO_FORMAT_IEC61937:
     case AUDIO_FORMAT_DOLBY_TRUEHD:
     case AUDIO_FORMAT_EVRC:
@@ -1790,21 +1207,6 @@
     case AUDIO_FORMAT_LHDC:
     case AUDIO_FORMAT_LHDC_LL:
     case AUDIO_FORMAT_APTX_TWSP:
-    case AUDIO_FORMAT_LC3:
-        return true;
-    case AUDIO_FORMAT_MPEGH:
-        switch (format) {
-        case AUDIO_FORMAT_MPEGH_BL_L3:
-        case AUDIO_FORMAT_MPEGH_BL_L4:
-        case AUDIO_FORMAT_MPEGH_LC_L3:
-        case AUDIO_FORMAT_MPEGH_LC_L4:
-            return true;
-        default:
-            return false;
-        }
-        /* not reached */
-    case AUDIO_FORMAT_DTS_UHD:
-    case AUDIO_FORMAT_DRA:
         return true;
     default:
         return false;
@@ -1814,18 +1216,14 @@
 static inline bool audio_is_iec61937_compatible(audio_format_t format)
 {
     switch (format) {
-    case AUDIO_FORMAT_AC3:         // IEC 61937-3:2017
-    case AUDIO_FORMAT_AC4:         // IEC 61937-14:2017
-    case AUDIO_FORMAT_E_AC3:       // IEC 61937-3:2017
-    case AUDIO_FORMAT_E_AC3_JOC:   // IEC 61937-3:2017
-    case AUDIO_FORMAT_MAT:         // IEC 61937-9:2017
-    case AUDIO_FORMAT_MAT_1_0:     // IEC 61937-9:2017
-    case AUDIO_FORMAT_MAT_2_0:     // IEC 61937-9:2017
-    case AUDIO_FORMAT_MAT_2_1:     // IEC 61937-9:2017
-    case AUDIO_FORMAT_MPEGH_BL_L3: // IEC 61937-13:2018
-    case AUDIO_FORMAT_MPEGH_BL_L4: // IEC 61937-13:2018
-    case AUDIO_FORMAT_MPEGH_LC_L3: // IEC 61937-13:2018
-    case AUDIO_FORMAT_MPEGH_LC_L4: // IEC 61937-13:2018
+    case AUDIO_FORMAT_AC3:       // IEC 61937-3:2017
+    case AUDIO_FORMAT_AC4:       // IEC 61937-14:2017
+    case AUDIO_FORMAT_E_AC3:     // IEC 61937-3:2017
+    case AUDIO_FORMAT_E_AC3_JOC: // IEC 61937-3:2017
+    case AUDIO_FORMAT_MAT:       // IEC 61937-9:2017
+    case AUDIO_FORMAT_MAT_1_0:   // IEC 61937-9:2017
+    case AUDIO_FORMAT_MAT_2_0:   // IEC 61937-9:2017
+    case AUDIO_FORMAT_MAT_2_1:   // IEC 61937-9:2017
         return true;
     default:
         return false;
@@ -1917,31 +1315,85 @@
     return strdup(param);
 }
 
-static inline bool audio_is_valid_audio_source(audio_source_t audioSource)
-{
-    switch (audioSource) {
-    case AUDIO_SOURCE_MIC:
-    case AUDIO_SOURCE_VOICE_UPLINK:
-    case AUDIO_SOURCE_VOICE_DOWNLINK:
-    case AUDIO_SOURCE_VOICE_CALL:
-    case AUDIO_SOURCE_CAMCORDER:
-    case AUDIO_SOURCE_VOICE_RECOGNITION:
-    case AUDIO_SOURCE_VOICE_COMMUNICATION:
-    case AUDIO_SOURCE_REMOTE_SUBMIX:
-    case AUDIO_SOURCE_UNPROCESSED:
-    case AUDIO_SOURCE_VOICE_PERFORMANCE:
-    case AUDIO_SOURCE_ECHO_REFERENCE:
-    case AUDIO_SOURCE_FM_TUNER:
 #ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    case AUDIO_SOURCE_HOTWORD:
-#endif // AUDIO_NO_SYSTEM_DECLARATIONS
-        return true;
-    default:
-        return false;
+
+static inline bool audio_gain_config_are_equal(
+        const struct audio_gain_config *lhs, const struct audio_gain_config *rhs) {
+    if (lhs->mode != rhs->mode) return false;
+    switch (lhs->mode) {
+    case AUDIO_GAIN_MODE_JOINT:
+        if (lhs->values[0] != rhs->values[0]) return false;
+        break;
+    case AUDIO_GAIN_MODE_CHANNELS:
+    case AUDIO_GAIN_MODE_RAMP:
+        if (lhs->channel_mask != rhs->channel_mask) return false;
+        for (int i = 0; i < popcount(lhs->channel_mask); ++i) {
+            if (lhs->values[i] != rhs->values[i]) return false;
+        }
+        break;
+    default: return false;
+    }
+    return lhs->ramp_duration_ms == rhs->ramp_duration_ms;
+}
+
+static inline bool audio_port_config_has_input_direction(const struct audio_port_config *port_cfg) {
+    switch (port_cfg->type) {
+    case AUDIO_PORT_TYPE_DEVICE:
+        switch (port_cfg->role) {
+        case AUDIO_PORT_ROLE_SOURCE: return true;
+        case AUDIO_PORT_ROLE_SINK: return false;
+        default: return false;
+        }
+    case AUDIO_PORT_TYPE_MIX:
+        switch (port_cfg->role) {
+        case AUDIO_PORT_ROLE_SOURCE: return false;
+        case AUDIO_PORT_ROLE_SINK: return true;
+        default: return false;
+        }
+    default: return false;
     }
 }
 
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
+static inline bool audio_port_configs_are_equal(
+        const struct audio_port_config *lhs, const struct audio_port_config *rhs) {
+    if (lhs->role != rhs->role || lhs->type != rhs->type) return false;
+    switch (lhs->type) {
+    case AUDIO_PORT_TYPE_NONE: break;
+    case AUDIO_PORT_TYPE_DEVICE:
+        if (lhs->ext.device.hw_module != rhs->ext.device.hw_module ||
+                lhs->ext.device.type != rhs->ext.device.type ||
+                strncmp(lhs->ext.device.address, rhs->ext.device.address,
+                        AUDIO_DEVICE_MAX_ADDRESS_LEN) != 0) {
+            return false;
+        }
+        break;
+    case AUDIO_PORT_TYPE_MIX:
+        if (lhs->ext.mix.hw_module != rhs->ext.mix.hw_module ||
+                lhs->ext.mix.handle != rhs->ext.mix.handle) return false;
+        if (lhs->role == AUDIO_PORT_ROLE_SOURCE &&
+                lhs->ext.mix.usecase.stream != rhs->ext.mix.usecase.stream) return false;
+        else if (lhs->role == AUDIO_PORT_ROLE_SINK &&
+                lhs->ext.mix.usecase.source != rhs->ext.mix.usecase.source) return false;
+        break;
+    case AUDIO_PORT_TYPE_SESSION:
+        if (lhs->ext.session.session != rhs->ext.session.session) return false;
+        break;
+    default: return false;
+    }
+    return lhs->config_mask == rhs->config_mask &&
+            ((lhs->config_mask & AUDIO_PORT_CONFIG_SAMPLE_RATE) == 0 ||
+                    lhs->sample_rate == rhs->sample_rate) &&
+            ((lhs->config_mask & AUDIO_PORT_CONFIG_CHANNEL_MASK) == 0 ||
+                    lhs->channel_mask == rhs->channel_mask) &&
+            ((lhs->config_mask & AUDIO_PORT_CONFIG_FORMAT) == 0 ||
+                    lhs->format == rhs->format) &&
+            ((lhs->config_mask & AUDIO_PORT_CONFIG_GAIN) == 0 ||
+                    audio_gain_config_are_equal(&lhs->gain, &rhs->gain)) &&
+            ((lhs->config_mask & AUDIO_PORT_CONFIG_FLAGS) == 0 ||
+                    (audio_port_config_has_input_direction(lhs) ?
+                            lhs->flags.input == rhs->flags.input :
+                            lhs->flags.output == rhs->flags.output));
+}
 
 static inline bool audio_port_config_has_hw_av_sync(const struct audio_port_config *port_cfg) {
     if (!(port_cfg->config_mask & AUDIO_PORT_CONFIG_FLAGS)) {
@@ -1996,6 +1448,26 @@
     uint8_t node[6];
 } audio_uuid_t;
 
+//TODO: audio_microphone_location_t need to move to HAL v4.0
+typedef enum {
+    AUDIO_MICROPHONE_LOCATION_UNKNOWN = 0,
+    AUDIO_MICROPHONE_LOCATION_MAINBODY = 1,
+    AUDIO_MICROPHONE_LOCATION_MAINBODY_MOVABLE = 2,
+    AUDIO_MICROPHONE_LOCATION_PERIPHERAL = 3,
+    AUDIO_MICROPHONE_LOCATION_CNT = 4,
+} audio_microphone_location_t;
+
+//TODO: audio_microphone_directionality_t need to move to HAL v4.0
+typedef enum {
+    AUDIO_MICROPHONE_DIRECTIONALITY_UNKNOWN = 0,
+    AUDIO_MICROPHONE_DIRECTIONALITY_OMNI = 1,
+    AUDIO_MICROPHONE_DIRECTIONALITY_BI_DIRECTIONAL = 2,
+    AUDIO_MICROPHONE_DIRECTIONALITY_CARDIOID = 3,
+    AUDIO_MICROPHONE_DIRECTIONALITY_HYPER_CARDIOID = 4,
+    AUDIO_MICROPHONE_DIRECTIONALITY_SUPER_CARDIOID = 5,
+    AUDIO_MICROPHONE_DIRECTIONALITY_CNT = 6,
+} audio_microphone_directionality_t;
+
 /* A 3D point which could be used to represent geometric location
  * or orientation of a microphone.
  */
@@ -2011,6 +1483,13 @@
  */
 typedef int audio_microphone_group_t;
 
+typedef enum {
+    AUDIO_MICROPHONE_CHANNEL_MAPPING_UNUSED = 0,
+    AUDIO_MICROPHONE_CHANNEL_MAPPING_DIRECT = 1,
+    AUDIO_MICROPHONE_CHANNEL_MAPPING_PROCESSED = 2,
+    AUDIO_MICROPHONE_CHANNEL_MAPPING_CNT = 3,
+} audio_microphone_channel_mapping_t;
+
 /* the maximum length for the microphone id */
 #define AUDIO_MICROPHONE_ID_MAX_LEN 32
 /* max number of frequency responses in a frequency response table */
@@ -2047,18 +1526,6 @@
     struct audio_microphone_coordinate orientation;
 };
 
-typedef enum {
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    AUDIO_TIMESTRETCH_FALLBACK_CUT_REPEAT = -1, // (framework only) for speed <1.0 will truncate
-                                                // frames, for speed > 1.0 will repeat frames
-    AUDIO_TIMESTRETCH_FALLBACK_DEFAULT    = 0,  // (framework only) system determines behavior
-#endif
-    /* Set all processed frames to zero. */
-    AUDIO_TIMESTRETCH_FALLBACK_MUTE       = HAL_AUDIO_TIMESTRETCH_FALLBACK_MUTE,
-    /* Stop processing and indicate an error. */
-    AUDIO_TIMESTRETCH_FALLBACK_FAIL       = HAL_AUDIO_TIMESTRETCH_FALLBACK_FAIL,
-} audio_timestretch_fallback_mode_t;
-
 // AUDIO_TIMESTRETCH_SPEED_MIN and AUDIO_TIMESTRETCH_SPEED_MAX define the min and max time stretch
 // speeds supported by the system. These are enforced by the system and values outside this range
 // will result in a runtime error.
@@ -2083,7 +1550,7 @@
 #define AUDIO_TIMESTRETCH_PITCH_NORMAL 1.0f
 #define AUDIO_TIMESTRETCH_PITCH_MIN_DELTA 0.0001f
 
-//Limits for AUDIO_TIMESTRETCH_STRETCH_VOICE mode
+//Limits for AUDIO_TIMESTRETCH_STRETCH_SPEECH mode
 #define TIMESTRETCH_SONIC_SPEED_MIN 0.1f
 #define TIMESTRETCH_SONIC_SPEED_MAX 6.0f
 
@@ -2103,14 +1570,6 @@
     /* .mFallbackMode = */ AUDIO_TIMESTRETCH_FALLBACK_FAIL
 };
 
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-typedef enum {
-    AUDIO_OFFLOAD_NOT_SUPPORTED = 0,
-    AUDIO_OFFLOAD_SUPPORTED = 1,
-    AUDIO_OFFLOAD_GAPLESS_SUPPORTED = 2
-} audio_offload_mode_t;
-#endif // AUDIO_NO_SYSTEM_DECLARATIONS
-
 __END_DECLS
 
 /**
@@ -2231,10 +1690,6 @@
 #define AUDIO_PARAMETER_DEVICE_SUP_ENCAPSULATION_MODES "supEncapsulationModes"
 #define AUDIO_PARAMETER_DEVICE_SUP_ENCAPSULATION_METADATA_TYPES "supEncapsulationMetadataTypes"
 
-/* Query additional delay in millisecond on each output device. */
-#define AUDIO_PARAMETER_DEVICE_ADDITIONAL_OUTPUT_DELAY "additional_output_device_delay"
-#define AUDIO_PARAMETER_DEVICE_MAX_ADDITIONAL_OUTPUT_DELAY "max_additional_output_device_delay"
-
 /**
  * audio codec parameters
  */
@@ -2252,5 +1707,4 @@
 #define AUDIO_OFFLOAD_CODEC_DELAY_SAMPLES  "delay_samples"
 #define AUDIO_OFFLOAD_CODEC_PADDING_SAMPLES  "padding_samples"
 
-
 #endif  // ANDROID_AUDIO_CORE_H
diff --git a/audio/include/system/audio_common-base.h b/audio/include/system/audio_common-base.h
deleted file mode 100644
index 830e0f7..0000000
--- a/audio/include/system/audio_common-base.h
+++ /dev/null
@@ -1,42 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.audio.common@7.0
-// Location: hardware/interfaces/audio/common/7.0/
-
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V7_0_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V7_0_EXPORTED_CONSTANTS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
-    HAL_AUDIO_SESSION_DEVICE = -2 /* -2 */,
-    HAL_AUDIO_SESSION_OUTPUT_STAGE = -1 /* -1 */,
-    HAL_AUDIO_SESSION_OUTPUT_MIX = 0,
-};
-
-enum {
-    HAL_AUDIO_MODE_NORMAL = 0,
-    HAL_AUDIO_MODE_RINGTONE = 1,
-    HAL_AUDIO_MODE_IN_CALL = 2,
-    HAL_AUDIO_MODE_IN_COMMUNICATION = 3,
-    HAL_AUDIO_MODE_CALL_SCREEN = 4,
-};
-
-typedef enum {
-    AUDIO_ENCAPSULATION_MODE_NONE = 0,
-    AUDIO_ENCAPSULATION_MODE_ELEMENTARY_STREAM = 1,
-    AUDIO_ENCAPSULATION_MODE_HANDLE = 2,
-} audio_encapsulation_mode_t;
-
-typedef enum {
-    AUDIO_ENCAPSULATION_METADATA_TYPE_NONE = 0,
-    AUDIO_ENCAPSULATION_METADATA_TYPE_FRAMEWORK_TUNER = 1,
-    AUDIO_ENCAPSULATION_METADATA_TYPE_DVB_AD_DESCRIPTOR = 2,
-} audio_encapsulation_metadata_type_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V7_0_EXPORTED_CONSTANTS_H_
diff --git a/audio/include/system/audio_config.h b/audio/include/system/audio_config.h
index 11b857c..5cb3ff5 100644
--- a/audio/include/system/audio_config.h
+++ b/audio/include/system/audio_config.h
@@ -20,7 +20,6 @@
 #ifdef __cplusplus
 
 #include <string>
-#include <unistd.h>
 #include <vector>
 
 #include <cutils/properties.h>
@@ -43,45 +42,6 @@
     return paths;
 }
 
-static inline std::string audio_find_readable_configuration_file(const char* fileName) {
-    for (const auto& path : audio_get_configuration_paths()) {
-        std::string tryPath = path + "/" + fileName;
-        if (access(tryPath.c_str(), R_OK) == 0) {
-            return tryPath;
-        }
-    }
-    return {};
-}
-
-static inline std::string audio_get_audio_policy_config_file() {
-    static constexpr const char *apmXmlConfigFileName = "audio_policy_configuration.xml";
-    static constexpr const char *apmA2dpOffloadDisabledXmlConfigFileName =
-            "audio_policy_configuration_a2dp_offload_disabled.xml";
-    static constexpr const char *apmBluetoothLegacyHalXmlConfigFileName =
-            "audio_policy_configuration_bluetooth_legacy_hal.xml";
-
-    std::string audioPolicyXmlConfigFile;
-    // First try alternative files if needed
-    if (property_get_bool("ro.bluetooth.a2dp_offload.supported", false)) {
-        if (property_get_bool("persist.bluetooth.bluetooth_audio_hal.disabled", false) &&
-            property_get_bool("persist.bluetooth.a2dp_offload.disabled", false)) {
-            // Both BluetoothAudio@2.0 and BluetoothA2dp@1.0 (Offload) are disabled, and uses
-            // the legacy hardware module for A2DP and hearing aid.
-            audioPolicyXmlConfigFile = audio_find_readable_configuration_file(
-                    apmBluetoothLegacyHalXmlConfigFileName);
-        } else if (property_get_bool("persist.bluetooth.a2dp_offload.disabled", false)) {
-            // A2DP offload supported but disabled: try to use special XML file
-            audioPolicyXmlConfigFile = audio_find_readable_configuration_file(
-                    apmA2dpOffloadDisabledXmlConfigFileName);
-        }
-    } else if (property_get_bool("persist.bluetooth.bluetooth_audio_hal.disabled", false)) {
-        audioPolicyXmlConfigFile = audio_find_readable_configuration_file(
-                apmBluetoothLegacyHalXmlConfigFileName);
-    }
-    return audioPolicyXmlConfigFile.empty() ?
-            audio_find_readable_configuration_file(apmXmlConfigFileName) : audioPolicyXmlConfigFile;
-}
-
 }  // namespace android
 
 #endif  // __cplusplus
diff --git a/audio/include/system/audio_effect-base.h b/audio/include/system/audio_effect-base.h
index 19c07b8..f613128 100644
--- a/audio/include/system/audio_effect-base.h
+++ b/audio/include/system/audio_effect-base.h
@@ -1,9 +1,9 @@
 // This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.audio.effect@7.0
-// Location: hardware/interfaces/audio/effect/7.0/
+// Source: android.hardware.audio.effect@4.0
+// Root: android.hardware:hardware/interfaces
 
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_EXPORTED_CONSTANTS_H_
+#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V4_0_EXPORTED_CONSTANTS_H_
+#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V4_0_EXPORTED_CONSTANTS_H_
 
 #ifdef __cplusplus
 extern "C" {
@@ -12,81 +12,89 @@
 enum {
     EFFECT_FLAG_TYPE_SHIFT = 0,
     EFFECT_FLAG_TYPE_SIZE = 3,
-    EFFECT_FLAG_TYPE_MASK = 7 /* ((1 << TYPE_SIZE) - 1) << TYPE_SHIFT */,
-    EFFECT_FLAG_TYPE_INSERT = 0 /* 0 << TYPE_SHIFT */,
-    EFFECT_FLAG_TYPE_AUXILIARY = 1 /* 1 << TYPE_SHIFT */,
-    EFFECT_FLAG_TYPE_REPLACE = 2 /* 2 << TYPE_SHIFT */,
-    EFFECT_FLAG_TYPE_PRE_PROC = 3 /* 3 << TYPE_SHIFT */,
-    EFFECT_FLAG_TYPE_POST_PROC = 4 /* 4 << TYPE_SHIFT */,
-    EFFECT_FLAG_INSERT_SHIFT = 3 /* TYPE_SHIFT + TYPE_SIZE */,
+    EFFECT_FLAG_TYPE_MASK = 7, // (((1 << TYPE_SIZE) - 1) << TYPE_SHIFT)
+    EFFECT_FLAG_TYPE_INSERT = 0, // (0 << TYPE_SHIFT)
+    EFFECT_FLAG_TYPE_AUXILIARY = 1, // (1 << TYPE_SHIFT)
+    EFFECT_FLAG_TYPE_REPLACE = 2, // (2 << TYPE_SHIFT)
+    EFFECT_FLAG_TYPE_PRE_PROC = 3, // (3 << TYPE_SHIFT)
+    EFFECT_FLAG_TYPE_POST_PROC = 4, // (4 << TYPE_SHIFT)
+    EFFECT_FLAG_INSERT_SHIFT = 3, // (TYPE_SHIFT + TYPE_SIZE)
     EFFECT_FLAG_INSERT_SIZE = 3,
-    EFFECT_FLAG_INSERT_MASK = 56 /* ((1 << INSERT_SIZE) - 1) << INSERT_SHIFT */,
-    EFFECT_FLAG_INSERT_ANY = 0 /* 0 << INSERT_SHIFT */,
-    EFFECT_FLAG_INSERT_FIRST = 8 /* 1 << INSERT_SHIFT */,
-    EFFECT_FLAG_INSERT_LAST = 16 /* 2 << INSERT_SHIFT */,
-    EFFECT_FLAG_INSERT_EXCLUSIVE = 24 /* 3 << INSERT_SHIFT */,
-    EFFECT_FLAG_VOLUME_SHIFT = 6 /* INSERT_SHIFT + INSERT_SIZE */,
+    EFFECT_FLAG_INSERT_MASK = 56, // (((1 << INSERT_SIZE) - 1) << INSERT_SHIFT)
+    EFFECT_FLAG_INSERT_ANY = 0, // (0 << INSERT_SHIFT)
+    EFFECT_FLAG_INSERT_FIRST = 8, // (1 << INSERT_SHIFT)
+    EFFECT_FLAG_INSERT_LAST = 16, // (2 << INSERT_SHIFT)
+    EFFECT_FLAG_INSERT_EXCLUSIVE = 24, // (3 << INSERT_SHIFT)
+    EFFECT_FLAG_VOLUME_SHIFT = 6, // (INSERT_SHIFT + INSERT_SIZE)
     EFFECT_FLAG_VOLUME_SIZE = 3,
-    EFFECT_FLAG_VOLUME_MASK = 448 /* ((1 << VOLUME_SIZE) - 1) << VOLUME_SHIFT */,
-    EFFECT_FLAG_VOLUME_CTRL = 64 /* 1 << VOLUME_SHIFT */,
-    EFFECT_FLAG_VOLUME_IND = 128 /* 2 << VOLUME_SHIFT */,
-    EFFECT_FLAG_VOLUME_MONITOR = 192 /* 3 << VOLUME_SHIFT */,
-    EFFECT_FLAG_VOLUME_NONE = 0 /* 0 << VOLUME_SHIFT */,
-    EFFECT_FLAG_DEVICE_SHIFT = 9 /* VOLUME_SHIFT + VOLUME_SIZE */,
+    EFFECT_FLAG_VOLUME_MASK = 448, // (((1 << VOLUME_SIZE) - 1) << VOLUME_SHIFT)
+    EFFECT_FLAG_VOLUME_CTRL = 64, // (1 << VOLUME_SHIFT)
+    EFFECT_FLAG_VOLUME_IND = 128, // (2 << VOLUME_SHIFT)
+    EFFECT_FLAG_VOLUME_MONITOR = 192, // (3 << VOLUME_SHIFT)
+    EFFECT_FLAG_VOLUME_NONE = 0, // (0 << VOLUME_SHIFT)
+    EFFECT_FLAG_DEVICE_SHIFT = 9, // (VOLUME_SHIFT + VOLUME_SIZE)
     EFFECT_FLAG_DEVICE_SIZE = 3,
-    EFFECT_FLAG_DEVICE_MASK = 3584 /* ((1 << DEVICE_SIZE) - 1) << DEVICE_SHIFT */,
-    EFFECT_FLAG_DEVICE_IND = 512 /* 1 << DEVICE_SHIFT */,
-    EFFECT_FLAG_DEVICE_NONE = 0 /* 0 << DEVICE_SHIFT */,
-    EFFECT_FLAG_INPUT_SHIFT = 12 /* DEVICE_SHIFT + DEVICE_SIZE */,
+    EFFECT_FLAG_DEVICE_MASK = 3584, // (((1 << DEVICE_SIZE) - 1) << DEVICE_SHIFT)
+    EFFECT_FLAG_DEVICE_IND = 512, // (1 << DEVICE_SHIFT)
+    EFFECT_FLAG_DEVICE_NONE = 0, // (0 << DEVICE_SHIFT)
+    EFFECT_FLAG_INPUT_SHIFT = 12, // (DEVICE_SHIFT + DEVICE_SIZE)
     EFFECT_FLAG_INPUT_SIZE = 2,
-    EFFECT_FLAG_INPUT_MASK = 12288 /* ((1 << INPUT_SIZE) - 1) << INPUT_SHIFT */,
-    EFFECT_FLAG_INPUT_DIRECT = 4096 /* 1 << INPUT_SHIFT */,
-    EFFECT_FLAG_INPUT_PROVIDER = 8192 /* 2 << INPUT_SHIFT */,
-    EFFECT_FLAG_INPUT_BOTH = 12288 /* 3 << INPUT_SHIFT */,
-    EFFECT_FLAG_OUTPUT_SHIFT = 14 /* INPUT_SHIFT + INPUT_SIZE */,
+    EFFECT_FLAG_INPUT_MASK = 12288, // (((1 << INPUT_SIZE) - 1) << INPUT_SHIFT)
+    EFFECT_FLAG_INPUT_DIRECT = 4096, // (1 << INPUT_SHIFT)
+    EFFECT_FLAG_INPUT_PROVIDER = 8192, // (2 << INPUT_SHIFT)
+    EFFECT_FLAG_INPUT_BOTH = 12288, // (3 << INPUT_SHIFT)
+    EFFECT_FLAG_OUTPUT_SHIFT = 14, // (INPUT_SHIFT + INPUT_SIZE)
     EFFECT_FLAG_OUTPUT_SIZE = 2,
-    EFFECT_FLAG_OUTPUT_MASK = 49152 /* ((1 << OUTPUT_SIZE) - 1) << OUTPUT_SHIFT */,
-    EFFECT_FLAG_OUTPUT_DIRECT = 16384 /* 1 << OUTPUT_SHIFT */,
-    EFFECT_FLAG_OUTPUT_PROVIDER = 32768 /* 2 << OUTPUT_SHIFT */,
-    EFFECT_FLAG_OUTPUT_BOTH = 49152 /* 3 << OUTPUT_SHIFT */,
-    EFFECT_FLAG_HW_ACC_SHIFT = 16 /* OUTPUT_SHIFT + OUTPUT_SIZE */,
+    EFFECT_FLAG_OUTPUT_MASK = 49152, // (((1 << OUTPUT_SIZE) - 1) << OUTPUT_SHIFT)
+    EFFECT_FLAG_OUTPUT_DIRECT = 16384, // (1 << OUTPUT_SHIFT)
+    EFFECT_FLAG_OUTPUT_PROVIDER = 32768, // (2 << OUTPUT_SHIFT)
+    EFFECT_FLAG_OUTPUT_BOTH = 49152, // (3 << OUTPUT_SHIFT)
+    EFFECT_FLAG_HW_ACC_SHIFT = 16, // (OUTPUT_SHIFT + OUTPUT_SIZE)
     EFFECT_FLAG_HW_ACC_SIZE = 2,
-    EFFECT_FLAG_HW_ACC_MASK = 196608 /* ((1 << HW_ACC_SIZE) - 1) << HW_ACC_SHIFT */,
-    EFFECT_FLAG_HW_ACC_SIMPLE = 65536 /* 1 << HW_ACC_SHIFT */,
-    EFFECT_FLAG_HW_ACC_TUNNEL = 131072 /* 2 << HW_ACC_SHIFT */,
-    EFFECT_FLAG_AUDIO_MODE_SHIFT = 18 /* HW_ACC_SHIFT + HW_ACC_SIZE */,
+    EFFECT_FLAG_HW_ACC_MASK = 196608, // (((1 << HW_ACC_SIZE) - 1) << HW_ACC_SHIFT)
+    EFFECT_FLAG_HW_ACC_SIMPLE = 65536, // (1 << HW_ACC_SHIFT)
+    EFFECT_FLAG_HW_ACC_TUNNEL = 131072, // (2 << HW_ACC_SHIFT)
+    EFFECT_FLAG_AUDIO_MODE_SHIFT = 18, // (HW_ACC_SHIFT + HW_ACC_SIZE)
     EFFECT_FLAG_AUDIO_MODE_SIZE = 2,
-    EFFECT_FLAG_AUDIO_MODE_MASK = 786432 /* ((1 << AUDIO_MODE_SIZE) - 1) << AUDIO_MODE_SHIFT */,
-    EFFECT_FLAG_AUDIO_MODE_IND = 262144 /* 1 << AUDIO_MODE_SHIFT */,
-    EFFECT_FLAG_AUDIO_MODE_NONE = 0 /* 0 << AUDIO_MODE_SHIFT */,
-    EFFECT_FLAG_AUDIO_SOURCE_SHIFT = 20 /* AUDIO_MODE_SHIFT + AUDIO_MODE_SIZE */,
+    EFFECT_FLAG_AUDIO_MODE_MASK = 786432, // (((1 << AUDIO_MODE_SIZE) - 1) << AUDIO_MODE_SHIFT)
+    EFFECT_FLAG_AUDIO_MODE_IND = 262144, // (1 << AUDIO_MODE_SHIFT)
+    EFFECT_FLAG_AUDIO_MODE_NONE = 0, // (0 << AUDIO_MODE_SHIFT)
+    EFFECT_FLAG_AUDIO_SOURCE_SHIFT = 20, // (AUDIO_MODE_SHIFT + AUDIO_MODE_SIZE)
     EFFECT_FLAG_AUDIO_SOURCE_SIZE = 2,
-    EFFECT_FLAG_AUDIO_SOURCE_MASK = 3145728 /* ((1 << AUDIO_SOURCE_SIZE) - 1) << AUDIO_SOURCE_SHIFT */,
-    EFFECT_FLAG_AUDIO_SOURCE_IND = 1048576 /* 1 << AUDIO_SOURCE_SHIFT */,
-    EFFECT_FLAG_AUDIO_SOURCE_NONE = 0 /* 0 << AUDIO_SOURCE_SHIFT */,
-    EFFECT_FLAG_OFFLOAD_SHIFT = 22 /* AUDIO_SOURCE_SHIFT + AUDIO_SOURCE_SIZE */,
+    EFFECT_FLAG_AUDIO_SOURCE_MASK = 3145728, // (((1 << AUDIO_SOURCE_SIZE) - 1) << AUDIO_SOURCE_SHIFT)
+    EFFECT_FLAG_AUDIO_SOURCE_IND = 1048576, // (1 << AUDIO_SOURCE_SHIFT)
+    EFFECT_FLAG_AUDIO_SOURCE_NONE = 0, // (0 << AUDIO_SOURCE_SHIFT)
+    EFFECT_FLAG_OFFLOAD_SHIFT = 22, // (AUDIO_SOURCE_SHIFT + AUDIO_SOURCE_SIZE)
     EFFECT_FLAG_OFFLOAD_SIZE = 1,
-    EFFECT_FLAG_OFFLOAD_MASK = 4194304 /* ((1 << OFFLOAD_SIZE) - 1) << OFFLOAD_SHIFT */,
-    EFFECT_FLAG_OFFLOAD_SUPPORTED = 4194304 /* 1 << OFFLOAD_SHIFT */,
-    EFFECT_FLAG_NO_PROCESS_SHIFT = 23 /* OFFLOAD_SHIFT + OFFLOAD_SIZE */,
+    EFFECT_FLAG_OFFLOAD_MASK = 4194304, // (((1 << OFFLOAD_SIZE) - 1) << OFFLOAD_SHIFT)
+    EFFECT_FLAG_OFFLOAD_SUPPORTED = 4194304, // (1 << OFFLOAD_SHIFT)
+    EFFECT_FLAG_NO_PROCESS_SHIFT = 23, // (OFFLOAD_SHIFT + OFFLOAD_SIZE)
     EFFECT_FLAG_NO_PROCESS_SIZE = 1,
-    EFFECT_FLAG_NO_PROCESS_MASK = 8388608 /* ((1 << NO_PROCESS_SIZE) - 1) << NO_PROCESS_SHIFT */,
-    EFFECT_FLAG_NO_PROCESS = 8388608 /* 1 << NO_PROCESS_SHIFT */,
+    EFFECT_FLAG_NO_PROCESS_MASK = 8388608, // (((1 << NO_PROCESS_SIZE) - 1) << NO_PROCESS_SHIFT)
+    EFFECT_FLAG_NO_PROCESS = 8388608, // (1 << NO_PROCESS_SHIFT)
 };
 
 typedef enum {
     EFFECT_BUFFER_ACCESS_WRITE = 0,
-    EFFECT_BUFFER_ACCESS_READ = 1 /* ::android::hardware::audio::effect::V7_0::EffectBufferAccess.ACCESS_WRITE implicitly + 1 */,
-    EFFECT_BUFFER_ACCESS_ACCUMULATE = 2 /* ::android::hardware::audio::effect::V7_0::EffectBufferAccess.ACCESS_READ implicitly + 1 */,
+    EFFECT_BUFFER_ACCESS_READ = 1, // (::android::hardware::audio::effect::V4_0::EffectBufferAccess.ACCESS_WRITE implicitly + 1)
+    EFFECT_BUFFER_ACCESS_ACCUMULATE = 2, // (::android::hardware::audio::effect::V4_0::EffectBufferAccess.ACCESS_READ implicitly + 1)
 } effect_buffer_access_e;
 
+enum {
+    EFFECT_CONFIG_BUFFER = 1,
+    EFFECT_CONFIG_SMP_RATE = 2,
+    EFFECT_CONFIG_CHANNELS = 4,
+    EFFECT_CONFIG_FORMAT = 8,
+    EFFECT_CONFIG_ACC_MODE = 16,
+};
+
 typedef enum {
     EFFECT_FEATURE_AUX_CHANNELS = 0,
-    EFFECT_FEATURE_CNT = 1 /* ::android::hardware::audio::effect::V7_0::EffectFeature.AUX_CHANNELS implicitly + 1 */,
+    EFFECT_FEATURE_CNT = 1, // (::android::hardware::audio::effect::V4_0::EffectFeature.AUX_CHANNELS implicitly + 1)
 } effect_feature_e;
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V7_0_EXPORTED_CONSTANTS_H_
+#endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V4_0_EXPORTED_CONSTANTS_H_
diff --git a/audio/include/system/audio_effect.h b/audio/include/system/audio_effect.h
index 9d589d1..3937543 100644
--- a/audio/include/system/audio_effect.h
+++ b/audio/include/system/audio_effect.h
@@ -60,6 +60,12 @@
     char    implementor[EFFECT_STRING_LEN_MAX];    // human readable effect implementor name
 } effect_descriptor_t;
 
+#define EFFECT_CONFIG_ALL (EFFECT_CONFIG_BUFFER | \
+                           EFFECT_CONFIG_SMP_RATE | \
+                           EFFECT_CONFIG_CHANNELS | \
+                           EFFECT_CONFIG_FORMAT | \
+                           EFFECT_CONFIG_ACC_MODE)
+
 /////////////////////////////////////////////////
 //      Effect control interface
 /////////////////////////////////////////////////
@@ -471,17 +477,6 @@
     void       *cookie;                // for use by client of buffer provider functions
 } buffer_provider_t;
 
-// Determines which fields of buffer_config_t need to be considered.
-enum {
-    EFFECT_CONFIG_BUFFER   = 1 << 0,
-    EFFECT_CONFIG_SMP_RATE = 1 << 1,
-    EFFECT_CONFIG_CHANNELS = 1 << 2,
-    EFFECT_CONFIG_FORMAT   = 1 << 3,
-    EFFECT_CONFIG_ACC_MODE = 1 << 4,
-    EFFECT_CONFIG_ALL      = EFFECT_CONFIG_BUFFER | EFFECT_CONFIG_SMP_RATE |
-                             EFFECT_CONFIG_CHANNELS | EFFECT_CONFIG_FORMAT | EFFECT_CONFIG_ACC_MODE
-};
-
 // The buffer_config_s structure specifies the input or output audio format
 // to be used by the effect engine.
 typedef struct buffer_config_s {
diff --git a/audio/include/system/audio_effects/effect_aec.h b/audio/include/system/audio_effects/effect_aec.h
index 260a4a2..e87471e 100644
--- a/audio/include/system/audio_effects/effect_aec.h
+++ b/audio/include/system/audio_effects/effect_aec.h
@@ -32,10 +32,7 @@
 typedef enum
 {
     AEC_PARAM_ECHO_DELAY,           // echo delay in microseconds
-    AEC_PARAM_PROPERTIES,
-#ifndef WEBRTC_LEGACY
-    AEC_PARAM_MOBILE_MODE,
-#endif
+    AEC_PARAM_PROPERTIES
 } t_aec_params;
 
 //t_equalizer_settings groups all current aec settings for backup and restore.
diff --git a/audio/include/system/audio_effects/effect_agc2.h b/audio/include/system/audio_effects/effect_agc2.h
deleted file mode 100644
index 2bba9f6..0000000
--- a/audio/include/system/audio_effects/effect_agc2.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_EFFECT_AGC2_CORE_H_
-#define ANDROID_EFFECT_AGC2_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-// The AGC type UUID is not defined by OpenSL ES and has been generated from
-// http://www.itu.int/ITU-T/asn1/uuid.html
-static const effect_uuid_t FX_IID_AGC2_ =
-    { 0xae3c653b, 0xbe18, 0x4ab8, 0x8938, { 0x41, 0x8f, 0x0a, 0x7f, 0x06, 0xac } };
-const effect_uuid_t * const FX_IID_AGC2 = &FX_IID_AGC2_;
-
-typedef enum
-{
-    AGC2_PARAM_FIXED_DIGITAL_GAIN,                 // fixed digital gain in millibel
-    AGC2_PARAM_ADAPT_DIGI_LEVEL_ESTIMATOR,         // adaptive digital level estimator
-    AGC2_PARAM_ADAPT_DIGI_EXTRA_SATURATION_MARGIN, // saturation margin in millibel
-    AGC2_PARAM_PROPERTIES
-} agc2_params_t;
-
-
-//t_agc2_settings groups all current agc2 settings for backup and restore.
-typedef struct {
-    float          fixedDigitalGain;
-    uint32_t       level_estimator;
-    float          extraSaturationMargin;
-} agc2_settings_t;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_AGC2_CORE_H_*/
diff --git a/audio/include/system/audio_effects/effect_hapticgenerator.h b/audio/include/system/audio_effects/effect_hapticgenerator.h
deleted file mode 100644
index 040533c..0000000
--- a/audio/include/system/audio_effects/effect_hapticgenerator.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_EFFECT_HAPTICGENERATOR_CORE_H_
-#define ANDROID_EFFECT_HAPTICGENERATOR_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-// The HapticGenerator type UUID is not defined by OpenSL ES and has been
-// generated from http://www.itu.int/ITU-T/asn1/uuid.html
-static const effect_uuid_t FX_IID_HAPTICGENERATOR_ = { 0x1411e6d6, 0xaecd, 0x4021, 0xa1cf,
-        { 0xa6, 0xac, 0xeb, 0x0d, 0x71, 0xe5 } };
-const effect_uuid_t * const FX_IID_HAPTICGENERATOR = &FX_IID_HAPTICGENERATOR_;
-
-/* enumerated parameter settings for haptic generator effect */
-typedef enum
-{
-    HG_PARAM_HAPTIC_INTENSITY, // haptic intensity
-    HG_PARAM_VIBRATOR_INFO, // vibrator information, e.g. resonant frequency, Q factor
-} t_hapticgenerator_params;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-
-#endif /*ANDROID_EFFECT_HAPTICGENERATOR_CORE_H_*/
diff --git a/audio/include/system/audio_policy.h b/audio/include/system/audio_policy.h
index 5176777..9071f5b 100644
--- a/audio/include/system/audio_policy.h
+++ b/audio/include/system/audio_policy.h
@@ -22,6 +22,8 @@
 #include <sys/cdefs.h>
 #include <sys/types.h>
 
+#include <cutils/bitops.h>
+
 __BEGIN_DECLS
 
 /* The enums were moved here mostly from
@@ -100,16 +102,6 @@
     APP_STATE_TOP, /* client has a visible UI: can capture and select use case */
 } app_state_t;
 
-/* The role indicates how the audio policy manager should consider particular
- * device(s) when making routing decisions for a particular strategy or audio
- * source. It is primarily used to override the default routing rules.
- */
-typedef enum {
-    DEVICE_ROLE_NONE = 0, /* default routing rules and priority apply */
-    DEVICE_ROLE_PREFERRED = 1, /* devices are specified as preferred devices */
-    DEVICE_ROLE_DISABLED = 2, /* devices cannot be used */
-} device_role_t;
-
 __END_DECLS
 
 #endif  // ANDROID_AUDIO_POLICY_CORE_H
diff --git a/audio_effects/Android.bp b/audio_effects/Android.bp
index beb9a8e..78d2abe 100644
--- a/audio_effects/Android.bp
+++ b/audio_effects/Android.bp
@@ -1,15 +1,6 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_library_headers {
     name: "libaudioeffects",
     vendor_available: true,
-    host_supported: true,
     header_libs: ["libhardware_headers"],
     export_header_lib_headers: ["libhardware_headers"],
     export_include_dirs: ["include"],
diff --git a/audio_effects/include/audio_effects/effect_agc2.h b/audio_effects/include/audio_effects/effect_agc2.h
deleted file mode 100644
index 8423e43..0000000
--- a/audio_effects/include/audio_effects/effect_agc2.h
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_EFFECT_AGC2_H_
-#define ANDROID_EFFECT_AGC2_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_agc2.h>
-
-#endif /*ANDROID_EFFECT_AGC2_H_*/
diff --git a/audio_effects/include/audio_effects/effect_hapticgenerator.h b/audio_effects/include/audio_effects/effect_hapticgenerator.h
deleted file mode 100644
index 00cc44e..0000000
--- a/audio_effects/include/audio_effects/effect_hapticgenerator.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * USAGE NOTE: Only include this header when _implementing_ a particular
- * effect. When access to UUID and properties is enough, include the
- * corresponding header from system/audio_effects/, which doesn't include
- * hardware/audio_effect.h.
- *
- * Only code that immediately calls into HAL or implements an effect
- * can import hardware/audio_effect.h.
- */
-
-#ifndef ANDROID_EFFECT_HAPTICGENERATOR_H_
-#define ANDROID_EFFECT_HAPTICGENERATOR_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_hapticgenerator.h>
-
-#endif /*ANDROID_EFFECT_HAPTICGENERATOR_H_*/
diff --git a/audio_route/Android.bp b/audio_route/Android.bp
index 412643a..d410754 100644
--- a/audio_route/Android.bp
+++ b/audio_route/Android.bp
@@ -1,42 +1,19 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
-cc_defaults {
-    name: "libaudioroute_defaults",
+cc_library_shared {
+    name: "libaudioroute",
     vendor_available: true,
+    vndk: {
+        enabled: true,
+    },
     srcs: ["audio_route.c"],
     shared_libs: [
         "liblog",
         "libcutils",
         "libutils",
         "libexpat",
+        "libtinyalsa",
     ],
     cflags: [
         "-Werror",
         "-Wall",
     ],
 }
-
-cc_library_shared {
-    name: "libaudioroute",
-    defaults: ["libaudioroute_defaults"],
-    vndk: {
-        enabled: true,
-    },
-    shared_libs: [
-        "libtinyalsa",
-    ],
-}
-
-cc_library_shared {
-    name: "libaudioroutev2",
-    defaults: ["libaudioroute_defaults"],
-    shared_libs: [
-        "libtinyalsav2",
-    ],
-}
diff --git a/audio_route/MODULE_LICENSE_BSD b/audio_route/MODULE_LICENSE_BSD
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/audio_route/MODULE_LICENSE_BSD
diff --git a/audio_route/NOTICE b/audio_route/NOTICE
new file mode 100644
index 0000000..91b6565
--- /dev/null
+++ b/audio_route/NOTICE
@@ -0,0 +1,25 @@
+Copyright 2013, The Android Open Source Project
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+    * Redistributions of source code must retain the above copyright
+      notice, this list of conditions and the following disclaimer.
+    * Redistributions in binary form must reproduce the above copyright
+      notice, this list of conditions and the following disclaimer in the
+      documentation and/or other materials provided with the distribution.
+    * Neither the name of The Android Open Source Project nor the names of
+      its contributors may be used to endorse or promote products derived
+      from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY The Android Open Source Project ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL The Android Open Source Project BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGE.
+
diff --git a/audio_route/audio_route.c b/audio_route/audio_route.c
index 6afa05c..597769a 100644
--- a/audio_route/audio_route.c
+++ b/audio_route/audio_route.c
@@ -65,13 +65,6 @@
     unsigned int ctl_index;
     int index;
     long value;
-    /*
-     memory pointed by this is allocated in start_tag during parsing ctl of
-     MIXER_CTL_TYPE_BYTE or MIXER_CTL_TYPE_INT, and is released after the
-     parsed values are updated to either setting value within a path,
-     or top level initial setting value
-     */
-    long *values;
 };
 
 struct mixer_path {
@@ -202,7 +195,7 @@
     struct mixer_path *new_mixer_path = NULL;
 
     if (path_get_by_name(ar, name)) {
-        ALOGW("Path name '%s' already exists", name);
+        ALOGE("Path name '%s' already exists", name);
         return NULL;
     }
 
@@ -355,13 +348,10 @@
     }
 
     if (mixer_value->index == -1) {
-        /* set all values the same except for CTL_TYPE_BYTE and CTL_TYPE_INT */
+        /* set all values the same */
         if (path->setting[path_index].type == MIXER_CTL_TYPE_BYTE) {
             for (i = 0; i < num_values; i++)
-                path->setting[path_index].value.bytes[i] = mixer_value->values[i];
-        } else if (path->setting[path_index].type == MIXER_CTL_TYPE_INT) {
-            for (i = 0; i < num_values; i++)
-                path->setting[path_index].value.integer[i] = mixer_value->values[i];
+                path->setting[path_index].value.bytes[i] = mixer_value->value;
         } else if (path->setting[path_index].type == MIXER_CTL_TYPE_ENUM) {
             for (i = 0; i < num_values; i++)
                 path->setting[path_index].value.enumerated[i] = mixer_value->value;
@@ -458,7 +448,7 @@
             break;
     }
     if (i == num_values) {
-        ALOGW("unknown enum value string %s for ctl %s",
+        ALOGE("unknown enum value string %s for ctl %s",
               string, mixer_ctl_get_name(ctl));
         return 0;
     }
@@ -480,13 +470,12 @@
     unsigned int id;
     struct mixer_value mixer_value;
     enum mixer_ctl_type type;
-    long* value_array = NULL;
 
     /* Get name, id and value attributes (these may be empty) */
     for (i = 0; attr[i]; i += 2) {
         if (strcmp(attr[i], "name") == 0)
             attr_name = attr[i + 1];
-        else if (strcmp(attr[i], "id") == 0)
+        if (strcmp(attr[i], "id") == 0)
             attr_id = attr[i + 1];
         else if (strcmp(attr[i], "value") == 0)
             attr_value = attr[i + 1];
@@ -501,71 +490,36 @@
                 /* top level path: create and stash the path */
                 state->path = path_create(ar, (char *)attr_name);
                 if (state->path == NULL)
-                    ALOGW("path creation failed, please check if the path exists");
+                    ALOGE("path created failed, please check the path if existed");
             } else {
                 /* nested path */
                 struct mixer_path *sub_path = path_get_by_name(ar, attr_name);
                 if (!sub_path) {
-                    ALOGW("unable to find sub path '%s'", attr_name);
+                    ALOGE("unable to find sub path '%s'", attr_name);
                 } else if (state->path != NULL) {
                     path_add_path(ar, state->path, sub_path);
                 }
             }
         }
-    } else if (strcmp(tag_name, "ctl") == 0) {
+    }
+
+    else if (strcmp(tag_name, "ctl") == 0) {
         /* Obtain the mixer ctl and value */
         ctl = mixer_get_ctl_by_name(ar->mixer, attr_name);
         if (ctl == NULL) {
-            ALOGW("Control '%s' doesn't exist - skipping", attr_name);
+            ALOGE("Control '%s' doesn't exist - skipping", attr_name);
             goto done;
         }
 
         switch (mixer_ctl_get_type(ctl)) {
         case MIXER_CTL_TYPE_BOOL:
-            if (attr_value == NULL) {
-                ALOGE("No value specified for ctl %s", attr_name);
-                goto done;
-            }
+        case MIXER_CTL_TYPE_INT:
             value = strtol((char *)attr_value, NULL, 0);
             break;
-        case MIXER_CTL_TYPE_INT:
-        case MIXER_CTL_TYPE_BYTE: {
-                char *attr_sub_value, *test_r;
-
-                if (attr_value == NULL) {
-                    ALOGE("No value specified for ctl %s", attr_name);
-                    goto done;
-                }
-                unsigned int num_values = mixer_ctl_get_num_values(ctl);
-                value_array = calloc(num_values, sizeof(long));
-                if (!value_array) {
-                    ALOGE("failed to allocate mem for ctl %s", attr_name);
-                    goto done;
-                }
-                for (i = 0; i < num_values; i++) {
-                    attr_sub_value = strtok_r((char *)attr_value, " ", &test_r);
-                    if (attr_sub_value == NULL) {
-                        ALOGE("expect %d values but only %d specified for ctl %s",
-                            num_values, i, attr_name);
-                        goto done;
-                    }
-                    if (mixer_ctl_get_type(ctl) == MIXER_CTL_TYPE_INT)
-                        value_array[i] = strtol((char *)attr_sub_value, NULL, 0);
-                    else
-                        value_array[i] =
-                           (unsigned char) strtol((char *)attr_sub_value, NULL, 16);
-
-                    if (attr_id)
-                        break;
-
-                    attr_value = NULL;
-                }
-            } break;
+        case MIXER_CTL_TYPE_BYTE:
+            value = (unsigned char) strtol((char *)attr_value, NULL, 16);
+            break;
         case MIXER_CTL_TYPE_ENUM:
-            if (attr_value == NULL) {
-                ALOGE("No value specified for ctl %s", attr_name);
-                goto done;
-            }
             value = mixer_enum_string_to_value(ctl, (char *)attr_value);
             break;
         default:
@@ -590,23 +544,19 @@
                     id = atoi((char *)attr_id);
                     if (id < ar->mixer_state[ctl_index].num_values)
                         if (type == MIXER_CTL_TYPE_BYTE)
-                            ar->mixer_state[ctl_index].new_value.bytes[id] = value_array[0];
-                        else if (type == MIXER_CTL_TYPE_INT)
-                            ar->mixer_state[ctl_index].new_value.integer[id] = value_array[0];
+                            ar->mixer_state[ctl_index].new_value.bytes[id] = value;
                         else if (type == MIXER_CTL_TYPE_ENUM)
                             ar->mixer_state[ctl_index].new_value.enumerated[id] = value;
                         else
                             ar->mixer_state[ctl_index].new_value.integer[id] = value;
                     else
-                        ALOGW("value id out of range for mixer ctl '%s'",
+                        ALOGE("value id out of range for mixer ctl '%s'",
                               mixer_ctl_get_name(ctl));
                 } else {
-                    /* set all values the same except for CTL_TYPE_BYTE and CTL_TYPE_INT */
+                    /* set all values the same */
                     for (i = 0; i < ar->mixer_state[ctl_index].num_values; i++)
                         if (type == MIXER_CTL_TYPE_BYTE)
-                            ar->mixer_state[ctl_index].new_value.bytes[i] = value_array[i];
-                        else if (type == MIXER_CTL_TYPE_INT)
-                            ar->mixer_state[ctl_index].new_value.integer[i] = value_array[i];
+                            ar->mixer_state[ctl_index].new_value.bytes[i] = value;
                         else if (type == MIXER_CTL_TYPE_ENUM)
                             ar->mixer_state[ctl_index].new_value.enumerated[i] = value;
                         else
@@ -616,13 +566,7 @@
         } else {
             /* nested ctl (within a path) */
             mixer_value.ctl_index = ctl_index;
-            if (mixer_ctl_get_type(ctl) == MIXER_CTL_TYPE_BYTE ||
-                mixer_ctl_get_type(ctl) == MIXER_CTL_TYPE_INT) {
-                mixer_value.values = value_array;
-                mixer_value.value = value_array[0];
-            } else {
-                mixer_value.value = value;
-            }
+            mixer_value.value = value;
             if (attr_id)
                 mixer_value.index = atoi((char *)attr_id);
             else
@@ -633,7 +577,6 @@
     }
 
 done:
-    free(value_array);
     state->level++;
 }
 
diff --git a/audio_utils/Android.bp b/audio_utils/Android.bp
index 9b4d096..5ffbb94 100644
--- a/audio_utils/Android.bp
+++ b/audio_utils/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 subdirs = ["tests"]
 
 cc_defaults {
@@ -24,17 +16,13 @@
     name: "libaudioutils_headers",
     host_supported: true,
     vendor_available: true,
-    product_available: true,
     export_include_dirs: ["include"],
-    // referenced from CTS/MTS test suite which must run on sdk 29, make sure it's compatible
-    // (revisit if/when we add features to this library that require newer sdk.
-    sdk_version: "29",
+    sdk_version: "current",
 }
 
 cc_library {
     name: "libaudioutils",
     vendor_available: true,
-    product_available: true,
     vndk: {
         enabled: true,
     },
@@ -44,7 +32,7 @@
 
     srcs: [
         "Balance.cpp",
-        "channels.cpp",
+        "channels.c",
         "ErrorLog.cpp",
         "fifo.cpp",
         "fifo_index.cpp",
@@ -98,7 +86,6 @@
 cc_library_static {
     name: "libaudioutils_fixedfft",
     vendor_available: true,
-    product_available: true,
     defaults: ["audio_utils_defaults"],
 
     arch: {
@@ -131,17 +118,10 @@
         "roundup.c",
     ],
     min_sdk_version: "29",
-    host_supported: true,
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
 }
 
 cc_library_shared {
     name: "libaudiospdif",
-    host_supported: true,
     defaults: ["audio_utils_defaults"],
 
     srcs: [
diff --git a/audio_utils/Balance.cpp b/audio_utils/Balance.cpp
index 56cf1ef..64769e6 100644
--- a/audio_utils/Balance.cpp
+++ b/audio_utils/Balance.cpp
@@ -20,8 +20,7 @@
 
 void Balance::setChannelMask(audio_channel_mask_t channelMask)
 {
-    using namespace ::android::audio_utils::channels;
-    channelMask = static_cast<audio_channel_mask_t>(channelMask & ~AUDIO_CHANNEL_HAPTIC_ALL);
+    channelMask &= ~ AUDIO_CHANNEL_HAPTIC_ALL;
     if (!audio_is_output_channel(channelMask) // invalid mask
             || mChannelMask == channelMask) { // no need to do anything
         return;
@@ -49,27 +48,47 @@
         return;
     }
 
+    // Implementation detail (may change):
+    // For implementation speed, we precompute the side (left, right, center),
+    // which is a fixed geometrical constant for a given channel mask.
+    // This assumes that the channel mask does not change frequently.
+    //
+    // For the channel mask spec, see system/media/audio/include/system/audio-base.h.
+    //
+    // The side is: 0 = left, 1 = right, 2 = center.
+    static constexpr int sideFromChannel[] = {
+        0, // AUDIO_CHANNEL_OUT_FRONT_LEFT            = 0x1u,
+        1, // AUDIO_CHANNEL_OUT_FRONT_RIGHT           = 0x2u,
+        2, // AUDIO_CHANNEL_OUT_FRONT_CENTER          = 0x4u,
+        2, // AUDIO_CHANNEL_OUT_LOW_FREQUENCY         = 0x8u,
+        0, // AUDIO_CHANNEL_OUT_BACK_LEFT             = 0x10u,
+        1, // AUDIO_CHANNEL_OUT_BACK_RIGHT            = 0x20u,
+        0, // AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER  = 0x40u,
+        1, // AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u,
+        2, // AUDIO_CHANNEL_OUT_BACK_CENTER           = 0x100u,
+        0, // AUDIO_CHANNEL_OUT_SIDE_LEFT             = 0x200u,
+        1, // AUDIO_CHANNEL_OUT_SIDE_RIGHT            = 0x400u,
+        2, // AUDIO_CHANNEL_OUT_TOP_CENTER            = 0x800u,
+        0, // AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT        = 0x1000u,
+        2, // AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER      = 0x2000u,
+        1, // AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT       = 0x4000u,
+        0, // AUDIO_CHANNEL_OUT_TOP_BACK_LEFT         = 0x8000u,
+        2, // AUDIO_CHANNEL_OUT_TOP_BACK_CENTER       = 0x10000u,
+        1, // AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT        = 0x20000u,
+        0, // AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT         = 0x40000u,
+        1, // AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT        = 0x80000u,
+     };
+
     mSides.resize(mChannelCount);
-    // If LFE and LFE2 both exist, it should be L and R in 22.2
-    int lfe = -1;
-    int lfe2 = -1;
-    constexpr unsigned LFE_CHANNEL_INDEX = 3;
-    constexpr unsigned LFE2_CHANNEL_INDEX = 23;
     for (unsigned i = 0, channel = channelMask; channel != 0; ++i) {
         const int index = __builtin_ctz(channel);
-        mSides[i] = sideFromChannelIdx(index);
-        // Keep track of LFE indices
-        if (index == LFE_CHANNEL_INDEX) {
-            lfe = i;
-        } else if (index == LFE2_CHANNEL_INDEX) {
-            lfe2 = i;
+        if (index < std::size(sideFromChannel)) {
+            mSides[i] = sideFromChannel[index];
+        } else {
+            mSides[i] = 2; // consider center
         }
         channel &= ~(1 << index);
     }
-    if (lfe >= 0 && lfe2 >= 0) { // if both LFEs exist assign to L and R.
-        mSides[lfe] = AUDIO_GEOMETRY_SIDE_LEFT;
-        mSides[lfe2] = AUDIO_GEOMETRY_SIDE_RIGHT;
-    }
     setBalance(balance); // recompute balance
 }
 
@@ -148,7 +167,6 @@
 
 void Balance::setBalance(float balance)
 {
-    using namespace ::android::audio_utils::channels;
     if (mBalance == balance                         // no change
         || isnan(balance) || fabs(balance) > 1.f) { // balance out of range
         return;
@@ -171,16 +189,9 @@
 
     // For position masks with more than 2 channels, we consider which side the
     // speaker position is on to figure the volume used.
-    float balanceVolumes[3]; // left, right, center (we don't care the order)
-    static_assert(AUDIO_GEOMETRY_SIDE_LEFT >= 0
-            && AUDIO_GEOMETRY_SIDE_LEFT <= std::size(balanceVolumes));
-    static_assert(AUDIO_GEOMETRY_SIDE_RIGHT >= 0
-            && AUDIO_GEOMETRY_SIDE_RIGHT <= std::size(balanceVolumes));
-    static_assert(AUDIO_GEOMETRY_SIDE_CENTER >= 0
-            && AUDIO_GEOMETRY_SIDE_CENTER <= std::size(balanceVolumes));
-    computeStereoBalance(balance, &balanceVolumes[AUDIO_GEOMETRY_SIDE_LEFT],
-            &balanceVolumes[AUDIO_GEOMETRY_SIDE_RIGHT]);
-    balanceVolumes[AUDIO_GEOMETRY_SIDE_CENTER] = 1.f; // center  TODO: consider center scaling.
+    float balanceVolumes[3]; // left, right, center
+    computeStereoBalance(balance, &balanceVolumes[0], &balanceVolumes[1]);
+    balanceVolumes[2] = 1.f; // center  TODO: consider center scaling.
 
     for (size_t i = 0; i < mVolumes.size(); ++i) {
         mVolumes[i] = balanceVolumes[mSides[i]];
diff --git a/audio_utils/Doxyfile b/audio_utils/Doxyfile
index cb4fba1..079e659 100644
--- a/audio_utils/Doxyfile
+++ b/audio_utils/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.8.16
+# Doxyfile 1.8.13
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for a project.
@@ -17,11 +17,11 @@
 # Project related configuration options
 #---------------------------------------------------------------------------
 
-# This tag specifies the encoding used for all characters in the configuration
-# file that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# https://www.gnu.org/software/libiconv/ for the list of possible encodings.
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
 # The default value is: UTF-8.
 
 DOXYFILE_ENCODING      = UTF-8
@@ -93,14 +93,6 @@
 
 OUTPUT_LANGUAGE        = English
 
-# The OUTPUT_TEXT_DIRECTION tag is used to specify the direction in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all generated output in the proper direction.
-# Possible values are: None, LTR, RTL and Context.
-# The default value is: None.
-
-OUTPUT_TEXT_DIRECTION  = None
-
 # If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
 # descriptions after the members that are listed in the file and class
 # documentation (similar to Javadoc). Set to NO to disable this.
@@ -187,16 +179,6 @@
 
 JAVADOC_AUTOBRIEF      = NO
 
-# If the JAVADOC_BANNER tag is set to YES then doxygen will interpret a line
-# such as
-# /***************
-# as being the beginning of a Javadoc-style comment "banner". If set to NO, the
-# Javadoc-style will behave just like regular comments and it will not be
-# interpreted by doxygen.
-# The default value is: NO.
-
-JAVADOC_BANNER         = NO
-
 # If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
 # line (until the first dot) of a Qt-style comment as the brief description. If
 # set to NO, the Qt-style will behave just like regular Qt-style comments (thus
@@ -244,12 +226,7 @@
 # will allow you to put the command \sideeffect (or @sideeffect) in the
 # documentation, which will result in a user-defined paragraph with heading
 # "Side Effects:". You can put \n's in the value part of an alias to insert
-# newlines (in the resulting output). You can put ^^ in the value part of an
-# alias to insert a newline as if a physical newline was in the original file.
-# When you need a literal { or } or , in the value part of an alias you have to
-# escape them by means of a backslash (\), this can lead to conflicts with the
-# commands \{ and \} for these it is advised to use the version @{ and @} or use
-# a double escape (\\{ and \\})
+# newlines.
 
 ALIASES                =
 
@@ -287,26 +264,17 @@
 
 OPTIMIZE_OUTPUT_VHDL   = NO
 
-# Set the OPTIMIZE_OUTPUT_SLICE tag to YES if your project consists of Slice
-# sources only. Doxygen will then generate output that is more tailored for that
-# language. For instance, namespaces will be presented as modules, types will be
-# separated into more groups, etc.
-# The default value is: NO.
-
-OPTIMIZE_OUTPUT_SLICE  = NO
-
 # Doxygen selects the parser to use depending on the extension of the files it
 # parses. With this tag you can assign which parser to use for a given
 # extension. Doxygen has a built-in mapping, but you can override or extend it
 # using this tag. The format is ext=language, where ext is a file extension, and
 # language is one of the parsers supported by doxygen: IDL, Java, Javascript,
-# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
-# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
-# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
-# tries to guess whether the code is fixed or free formatted code, this is the
-# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
-# .inc files as Fortran files (default is PHP), and .f files as C (default is
-# Fortran), use: inc=Fortran f=C.
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran:
+# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran:
+# Fortran. In the later case the parser tries to guess whether the code is fixed
+# or free formatted code, this is the default for Fortran type files), VHDL. For
+# instance to make doxygen treat .inc files as Fortran files (default is PHP),
+# and .f files as C (default is Fortran), use: inc=Fortran f=C.
 #
 # Note: For files without extension you can use no_extension as a placeholder.
 #
@@ -317,7 +285,7 @@
 
 # If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
 # according to the Markdown format, which allows for more readable
-# documentation. See https://daringfireball.net/projects/markdown/ for details.
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
 # The output of markdown processing is further processed by doxygen, so you can
 # mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
 # case of backward compatibilities issues.
@@ -329,7 +297,7 @@
 # to that level are automatically included in the table of contents, even if
 # they do not have an id attribute.
 # Note: This feature currently applies only to Markdown headings.
-# Minimum value: 0, maximum value: 99, default value: 5.
+# Minimum value: 0, maximum value: 99, default value: 0.
 # This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
 
 TOC_INCLUDE_HEADINGS   = 0
@@ -359,7 +327,7 @@
 CPP_CLI_SUPPORT        = NO
 
 # Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
-# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
 # will parse them like normal C++ but will assume all classes use public instead
 # of private inheritance when no explicit protection keyword is present.
 # The default value is: NO.
@@ -465,12 +433,6 @@
 
 EXTRACT_PRIVATE        = NO
 
-# If the EXTRACT_PRIV_VIRTUAL tag is set to YES, documented private virtual
-# methods of a class will be included in the documentation.
-# The default value is: NO.
-
-EXTRACT_PRIV_VIRTUAL   = NO
-
 # If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
 # scope will be included in the documentation.
 # The default value is: NO.
@@ -549,7 +511,7 @@
 # names in lower-case letters. If set to YES, upper-case letters are also
 # allowed. This is useful if you have classes or files whose names only differ
 # in case and if your file system supports case sensitive file names. Windows
-# (including Cygwin) ands Mac users are advised to set this option to NO.
+# and Mac users are advised to set this option to NO.
 # The default value is: system dependent.
 
 CASE_SENSE_NAMES       = YES
@@ -736,7 +698,7 @@
 # The CITE_BIB_FILES tag can be used to specify one or more bib files containing
 # the reference definitions. This must be a list of .bib files. The .bib
 # extension is automatically appended if omitted. This requires the bibtex tool
-# to be installed. See also https://en.wikipedia.org/wiki/BibTeX for more info.
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
 # For LaTeX the style of the bibliography can be controlled using
 # LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
 # search path. See also \cite for info how to create references.
@@ -781,8 +743,7 @@
 # This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
 # are documented, but have no documentation for their parameters or return
 # value. If set to NO, doxygen will only warn about wrong or incomplete
-# parameter documentation, but not about the absence of documentation. If
-# EXTRACT_ALL is set to YES then this flag will automatically be disabled.
+# parameter documentation, but not about the absence of documentation.
 # The default value is: NO.
 
 WARN_NO_PARAMDOC       = NO
@@ -825,7 +786,7 @@
 # This tag can be used to specify the character encoding of the source files
 # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
 # libiconv (or the iconv built into libc) for the transcoding. See the libiconv
-# documentation (see: https://www.gnu.org/software/libiconv/) for the list of
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
 # possible encodings.
 # The default value is: UTF-8.
 
@@ -843,7 +804,7 @@
 # *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
 # *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
 # *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
-# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, *.qsf and *.ice.
+# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
 
 FILE_PATTERNS          =
 
@@ -998,7 +959,7 @@
 STRIP_CODE_COMMENTS    = YES
 
 # If the REFERENCED_BY_RELATION tag is set to YES then for each documented
-# entity all documented functions referencing it will be listed.
+# function all documented functions referencing it will be listed.
 # The default value is: NO.
 
 REFERENCED_BY_RELATION = NO
@@ -1030,12 +991,12 @@
 # If the USE_HTAGS tag is set to YES then the references to source code will
 # point to the HTML generated by the htags(1) tool instead of doxygen built-in
 # source browser. The htags tool is part of GNU's global source tagging system
-# (see https://www.gnu.org/software/global/global.html). You will need version
+# (see http://www.gnu.org/software/global/global.html). You will need version
 # 4.8.6 or higher.
 #
 # To use it do the following:
 # - Install the latest version of global
-# - Enable SOURCE_BROWSER and USE_HTAGS in the configuration file
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
 # - Make sure the INPUT points to the root of the source tree
 # - Run doxygen as normal
 #
@@ -1063,7 +1024,7 @@
 # rich C++ code for which doxygen's built-in parser lacks the necessary type
 # information.
 # Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse_libclang=ON option for CMake.
+# generated with the -Duse-libclang=ON option for CMake.
 # The default value is: NO.
 
 CLANG_ASSISTED_PARSING = NO
@@ -1076,16 +1037,6 @@
 
 CLANG_OPTIONS          =
 
-# If clang assisted parsing is enabled you can provide the clang parser with the
-# path to the compilation database (see:
-# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
-# were built. This is equivalent to specifying the "-p" option to a clang tool,
-# such as clang-check. These options will then be passed to the parser.
-# Note: The availability of this option depends on whether or not doxygen was
-# generated with the -Duse_libclang=ON option for CMake.
-
-CLANG_DATABASE_PATH    =
-
 #---------------------------------------------------------------------------
 # Configuration options related to the alphabetical class index
 #---------------------------------------------------------------------------
@@ -1204,7 +1155,7 @@
 # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
 # will adjust the colors in the style sheet and background images according to
 # this color. Hue is specified as an angle on a colorwheel, see
-# https://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
 # 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
 # purple, and 360 is red again.
 # Minimum value: 0, maximum value: 359, default value: 220.
@@ -1240,17 +1191,6 @@
 
 HTML_TIMESTAMP         = YES
 
-# If the HTML_DYNAMIC_MENUS tag is set to YES then the generated HTML
-# documentation will contain a main index with vertical navigation menus that
-# are dynamically created via Javascript. If disabled, the navigation index will
-# consists of multiple levels of tabs that are statically embedded in every HTML
-# page. Disable this option to support browsers that do not have Javascript,
-# like the Qt help browser.
-# The default value is: YES.
-# This tag requires that the tag GENERATE_HTML is set to YES.
-
-HTML_DYNAMIC_MENUS     = YES
-
 # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
 # documentation will contain sections that can be hidden and shown after the
 # page has loaded.
@@ -1274,13 +1214,13 @@
 
 # If the GENERATE_DOCSET tag is set to YES, additional index files will be
 # generated that can be used as input for Apple's Xcode 3 integrated development
-# environment (see: https://developer.apple.com/xcode/), introduced with OSX
-# 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
 # Makefile in the HTML output directory. Running make will produce the docset in
 # that directory and running make install will install the docset in
 # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
-# startup. See https://developer.apple.com/library/archive/featuredarticles/Doxy
-# genXcode/_index.html for more information.
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
 # The default value is: NO.
 # This tag requires that the tag GENERATE_HTML is set to YES.
 
@@ -1319,7 +1259,7 @@
 # If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
 # additional HTML index files: index.hhp, index.hhc, and index.hhk. The
 # index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
-# (see: https://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
 # Windows.
 #
 # The HTML Help Workshop contains a compiler that can convert all HTML output
@@ -1395,7 +1335,7 @@
 
 # The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
 # Project output. For more information please see Qt Help Project / Namespace
-# (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#namespace).
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
 # The default value is: org.doxygen.Project.
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1403,7 +1343,7 @@
 
 # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
 # Help Project output. For more information please see Qt Help Project / Virtual
-# Folders (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#virtual-
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
 # folders).
 # The default value is: doc.
 # This tag requires that the tag GENERATE_QHP is set to YES.
@@ -1412,7 +1352,7 @@
 
 # If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
 # filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1420,7 +1360,7 @@
 
 # The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
 # custom filter to add. For more information please see Qt Help Project / Custom
-# Filters (see: https://doc.qt.io/archives/qt-4.8/qthelpproject.html#custom-
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
 # filters).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
@@ -1428,7 +1368,7 @@
 
 # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
 # project's filter section matches. Qt Help Project / Filter Attributes (see:
-# https://doc.qt.io/archives/qt-4.8/qthelpproject.html#filter-attributes).
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
 # This tag requires that the tag GENERATE_QHP is set to YES.
 
 QHP_SECT_FILTER_ATTRS  =
@@ -1521,7 +1461,7 @@
 
 FORMULA_FONTSIZE       = 10
 
-# Use the FORMULA_TRANSPARENT tag to determine whether or not the images
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
 # generated for formulas are transparent PNGs. Transparent PNGs are not
 # supported properly for IE 6.0, but are supported on all modern browsers.
 #
@@ -1533,7 +1473,7 @@
 FORMULA_TRANSPARENT    = YES
 
 # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
-# https://www.mathjax.org) which uses client side Javascript for the rendering
+# http://www.mathjax.org) which uses client side Javascript for the rendering
 # instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
 # installed or if you want to formulas look prettier in the HTML output. When
 # enabled you may also need to install MathJax separately and configure the path
@@ -1560,8 +1500,8 @@
 # MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
 # Content Delivery Network so you can quickly see the result without installing
 # MathJax. However, it is strongly recommended to install a local copy of
-# MathJax from https://www.mathjax.org before deployment.
-# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
 # This tag requires that the tag USE_MATHJAX is set to YES.
 
 MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
@@ -1622,7 +1562,7 @@
 #
 # Doxygen ships with an example indexer (doxyindexer) and search engine
 # (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: https://xapian.org/).
+# Xapian (see: http://xapian.org/).
 #
 # See the section "External Indexing and Searching" for details.
 # The default value is: NO.
@@ -1635,7 +1575,7 @@
 #
 # Doxygen ships with an example indexer (doxyindexer) and search engine
 # (doxysearch.cgi) which are based on the open source search engine library
-# Xapian (see: https://xapian.org/). See the section "External Indexing and
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
 # Searching" for details.
 # This tag requires that the tag SEARCHENGINE is set to YES.
 
@@ -1687,35 +1627,21 @@
 # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
 # invoked.
 #
-# Note that when not enabling USE_PDFLATEX the default is latex when enabling
-# USE_PDFLATEX the default is pdflatex and when in the later case latex is
-# chosen this is overwritten by pdflatex. For specific output languages the
-# default can have been set differently, this depends on the implementation of
-# the output language.
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 LATEX_CMD_NAME         = latex
 
 # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
 # index for LaTeX.
-# Note: This tag is used in the Makefile / make.bat.
-# See also: LATEX_MAKEINDEX_CMD for the part in the generated output file
-# (.tex).
 # The default file is: makeindex.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
 MAKEINDEX_CMD_NAME     = makeindex
 
-# The LATEX_MAKEINDEX_CMD tag can be used to specify the command name to
-# generate index for LaTeX. In case there is no backslash (\) as first character
-# it will be automatically added in the LaTeX code.
-# Note: This tag is used in the generated output file (.tex).
-# See also: MAKEINDEX_CMD_NAME for the part in the Makefile / make.bat.
-# The default value is: makeindex.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_MAKEINDEX_CMD    = makeindex
-
 # If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
 # documents. This may be useful for small projects and may help to save some
 # trees in general.
@@ -1836,7 +1762,7 @@
 
 # The LATEX_BIB_STYLE tag can be used to specify the style to use for the
 # bibliography, e.g. plainnat, or ieeetr. See
-# https://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
 # The default value is: plain.
 # This tag requires that the tag GENERATE_LATEX is set to YES.
 
@@ -1850,14 +1776,6 @@
 
 LATEX_TIMESTAMP        = NO
 
-# The LATEX_EMOJI_DIRECTORY tag is used to specify the (relative or absolute)
-# path from which the emoji images will be read. If a relative path is entered,
-# it will be relative to the LATEX_OUTPUT directory. If left blank the
-# LATEX_OUTPUT directory will be used.
-# This tag requires that the tag GENERATE_LATEX is set to YES.
-
-LATEX_EMOJI_DIRECTORY  =
-
 #---------------------------------------------------------------------------
 # Configuration options related to the RTF output
 #---------------------------------------------------------------------------
@@ -1897,9 +1815,9 @@
 
 RTF_HYPERLINKS         = NO
 
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# configuration file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
 #
 # See also section "Doxygen usage" for information on how to generate the
 # default style sheet that doxygen normally uses.
@@ -1908,8 +1826,8 @@
 RTF_STYLESHEET_FILE    =
 
 # Set optional variables used in the generation of an RTF document. Syntax is
-# similar to doxygen's configuration file. A template extensions file can be
-# generated using doxygen -e rtf extensionFile.
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
 # This tag requires that the tag GENERATE_RTF is set to YES.
 
 RTF_EXTENSIONS_FILE    =
@@ -1995,13 +1913,6 @@
 
 XML_PROGRAMLISTING     = YES
 
-# If the XML_NS_MEMB_FILE_SCOPE tag is set to YES, doxygen will include
-# namespace members in file scope as well, matching the HTML output.
-# The default value is: NO.
-# This tag requires that the tag GENERATE_XML is set to YES.
-
-XML_NS_MEMB_FILE_SCOPE = NO
-
 #---------------------------------------------------------------------------
 # Configuration options related to the DOCBOOK output
 #---------------------------------------------------------------------------
@@ -2034,9 +1945,9 @@
 #---------------------------------------------------------------------------
 
 # If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
-# AutoGen Definitions (see http://autogen.sourceforge.net/) file that captures
-# the structure of the code including all documentation. Note that this feature
-# is still experimental and incomplete at the moment.
+# AutoGen Definitions (see http://autogen.sf.net) file that captures the
+# structure of the code including all documentation. Note that this feature is
+# still experimental and incomplete at the moment.
 # The default value is: NO.
 
 GENERATE_AUTOGEN_DEF   = NO
@@ -2203,6 +2114,12 @@
 
 EXTERNAL_PAGES         = YES
 
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
 #---------------------------------------------------------------------------
 # Configuration options related to the dot tool
 #---------------------------------------------------------------------------
@@ -2216,6 +2133,15 @@
 
 CLASS_DIAGRAMS         = YES
 
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
 # You can include diagrams made with dia in doxygen documentation. Doxygen will
 # then run dia to produce the diagram and insert it in the documentation. The
 # DIA_PATH tag allows you to specify the directory where the dia binary resides.
diff --git a/audio_utils/Doxyfile.bak b/audio_utils/Doxyfile.bak
new file mode 100644
index 0000000..9826896
--- /dev/null
+++ b/audio_utils/Doxyfile.bak
@@ -0,0 +1,2303 @@
+# Doxyfile 1.8.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "My Project"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = YES
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  = include/audio_utils/ include/audio_utils/spdif/
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS          =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = NO
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
diff --git a/audio_utils/Doxyfile.orig b/audio_utils/Doxyfile.orig
new file mode 100644
index 0000000..137facb
--- /dev/null
+++ b/audio_utils/Doxyfile.orig
@@ -0,0 +1,2303 @@
+# Doxyfile 1.8.6
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project.
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
+PROJECT_NAME           = "My Project"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
+PROJECT_NUMBER         =
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
+# to the output directory.
+
+PROJECT_LOGO           =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese,
+# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States),
+# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian,
+# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian,
+# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian,
+# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish,
+# Ukrainian and Vietnamese.
+# The default value is: English.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
+# descriptions after the members that are listed in the file and class
+# documentation (similar to Javadoc). Set to NO to disable this.
+# The default value is: YES.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
+# description of a member or function before the detailed description
+#
+# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+# The default value is: YES.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator that is
+# used to form the text in various listings. Each string in this list, if found
+# as the leading text of the brief description, will be stripped from the text
+# and the result, after processing the whole list, is used as the annotated
+# text. Otherwise, the brief description is used as-is. If left blank, the
+# following values are used ($name is automatically replaced with the name of
+# the entity):The $name class, The $name widget, The $name file, is, provides,
+# specifies, contains, represents, a, an and the.
+
+ABBREVIATE_BRIEF       =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# doxygen will generate a detailed section even if there is only a brief
+# description.
+# The default value is: NO.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+# The default value is: NO.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
+# before files name in the file list and in the header files. If set to NO the
+# shortest path that makes the file name unique will be used
+# The default value is: YES.
+
+FULL_PATH_NAMES        = YES
+
+# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path.
+# Stripping is only done if one of the specified strings matches the left-hand
+# part of the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the path to
+# strip.
+#
+# Note that you can specify absolute paths here, but also relative paths, which
+# will be relative from the directory where doxygen is started.
+# This tag requires that the tag FULL_PATH_NAMES is set to YES.
+
+STRIP_FROM_PATH        =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the
+# path mentioned in the documentation of a class, which tells the reader which
+# header file to include in order to use a class. If left blank only the name of
+# the header file containing the class definition is used. Otherwise one should
+# specify the list of include paths that are normally passed to the compiler
+# using the -I flag.
+
+STRIP_FROM_INC_PATH    =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but
+# less readable) file names. This can be useful is your file systems doesn't
+# support long names like on DOS, Mac, or CD-ROM.
+# The default value is: NO.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the
+# first line (until the first dot) of a Javadoc-style comment as the brief
+# description. If set to NO, the Javadoc-style will behave just like regular Qt-
+# style comments (thus requiring an explicit @brief command for a brief
+# description.)
+# The default value is: NO.
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first
+# line (until the first dot) of a Qt-style comment as the brief description. If
+# set to NO, the Qt-style will behave just like regular Qt-style comments (thus
+# requiring an explicit \brief command for a brief description.)
+# The default value is: NO.
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a
+# multi-line C++ special comment block (i.e. a block of //! or /// comments) as
+# a brief description. This used to be the default behavior. The new default is
+# to treat a multi-line C++ comment block as a detailed description. Set this
+# tag to YES if you prefer the old behavior instead.
+#
+# Note that setting this tag to YES also means that rational rose comments are
+# not recognized any more.
+# The default value is: NO.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
+# documentation from any documented member that it re-implements.
+# The default value is: YES.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
+# new page for each member. If set to NO, the documentation of a member will be
+# part of the file/class/namespace that contains it.
+# The default value is: NO.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen
+# uses this value to replace tabs by spaces in code fragments.
+# Minimum value: 1, maximum value: 16, default value: 4.
+
+TAB_SIZE               = 4
+
+# This tag can be used to specify a number of aliases that act as commands in
+# the documentation. An alias has the form:
+# name=value
+# For example adding
+# "sideeffect=@par Side Effects:\n"
+# will allow you to put the command \sideeffect (or @sideeffect) in the
+# documentation, which will result in a user-defined paragraph with heading
+# "Side Effects:". You can put \n's in the value part of an alias to insert
+# newlines.
+
+ALIASES                =
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only).
+# A mapping has the form "name=value". For example adding "class=itcl::class"
+# will allow you to use the command class in the itcl::class meaning.
+
+TCL_SUBST              =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C. For
+# instance, some of the names that are used will be different. The list of all
+# members will be omitted, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or
+# Python sources only. Doxygen will then generate output that is more tailored
+# for that language. For instance, namespaces will be presented as packages,
+# qualified scopes will look different, etc.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources. Doxygen will then generate output that is tailored for Fortran.
+# The default value is: NO.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for VHDL.
+# The default value is: NO.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it
+# parses. With this tag you can assign which parser to use for a given
+# extension. Doxygen has a built-in mapping, but you can override or extend it
+# using this tag. The format is ext=language, where ext is a file extension, and
+# language is one of the parsers supported by doxygen: IDL, Java, Javascript,
+# C#, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL. For instance to make
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C
+# (default is Fortran), use: inc=Fortran f=C.
+#
+# Note For files without extension you can use no_extension as a placeholder.
+#
+# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
+# the files are not read by doxygen.
+
+EXTENSION_MAPPING      =
+
+# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments
+# according to the Markdown format, which allows for more readable
+# documentation. See http://daringfireball.net/projects/markdown/ for details.
+# The output of markdown processing is further processed by doxygen, so you can
+# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in
+# case of backward compatibilities issues.
+# The default value is: YES.
+
+MARKDOWN_SUPPORT       = YES
+
+# When enabled doxygen tries to link words that correspond to documented
+# classes, or namespaces to their corresponding documentation. Such a link can
+# be prevented in individual cases by by putting a % sign in front of the word
+# or globally by setting AUTOLINK_SUPPORT to NO.
+# The default value is: YES.
+
+AUTOLINK_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should set this
+# tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string);
+# versus func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+# The default value is: NO.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+# The default value is: NO.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
+# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen
+# will parse them like normal C++ but will assume all classes use public instead
+# of private inheritance when no explicit protection keyword is present.
+# The default value is: NO.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate
+# getter and setter methods for a property. Setting this option to YES will make
+# doxygen to replace the get and set methods by a property in the documentation.
+# This will only work if the methods are indeed getting or setting a simple
+# type. If this is not the case, or you want to show the methods anyway, you
+# should set this option to NO.
+# The default value is: YES.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+# The default value is: NO.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES to allow class member groups of the same type
+# (for instance a group of public functions) to be put as a subgroup of that
+# type (e.g. under the Public Functions section). Set it to NO to prevent
+# subgrouping. Alternatively, this can be done per class using the
+# \nosubgrouping command.
+# The default value is: YES.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions
+# are shown inside the group in which they are included (e.g. using \ingroup)
+# instead of on a separate page (for HTML and Man pages) or section (for LaTeX
+# and RTF).
+#
+# Note that this feature does not work in combination with
+# SEPARATE_MEMBER_PAGES.
+# The default value is: NO.
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions
+# with only public data fields or simple typedef fields will be shown inline in
+# the documentation of the scope in which they are defined (i.e. file,
+# namespace, or group documentation), provided this scope is documented. If set
+# to NO, structs, classes, and unions are shown on a separate page (for HTML and
+# Man pages) or section (for LaTeX and RTF).
+# The default value is: NO.
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or
+# enum is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically be
+# useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+# The default value is: NO.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This
+# cache is used to resolve symbols given their name and scope. Since this can be
+# an expensive process and often the same symbol appears multiple times in the
+# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small
+# doxygen will become slower. If the cache is too large, memory is wasted. The
+# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range
+# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536
+# symbols. At the end of a run doxygen will report the cache usage and suggest
+# the optimal cache size from a speed point of view.
+# Minimum value: 0, maximum value: 9, default value: 0.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available. Private
+# class members and static file members will be hidden unless the
+# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
+# Note: This will also disable the warnings about undocumented members that are
+# normally produced when WARNINGS is set to YES.
+# The default value is: NO.
+
+EXTRACT_ALL            = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
+# be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+# The default value is: NO.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
+# included in the documentation.
+# The default value is: NO.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
+# locally in source files will be included in the documentation. If set to NO
+# only classes defined in header files are included. Does not have any effect
+# for Java sources.
+# The default value is: YES.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local methods,
+# which are defined in the implementation section but not in the interface are
+# included in the documentation. If set to NO only methods in the interface are
+# included.
+# The default value is: NO.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base name of
+# the file that contains the anonymous namespace. By default anonymous namespace
+# are hidden.
+# The default value is: NO.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all
+# undocumented members inside documented classes or files. If set to NO these
+# members will be included in the various overviews, but no documentation
+# section is generated. This option has no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy. If set
+# to NO these classes will be included in the various overviews. This option has
+# no effect if EXTRACT_ALL is enabled.
+# The default value is: NO.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
+# (class|struct|union) declarations. If set to NO these declarations will be
+# included in the documentation.
+# The default value is: NO.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
+# documentation blocks found inside the body of a function. If set to NO these
+# blocks will be appended to the function's detailed documentation block.
+# The default value is: NO.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation that is typed after a
+# \internal command is included. If the tag is set to NO then the documentation
+# will be excluded. Set it to YES to include the internal documentation.
+# The default value is: NO.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
+# names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+# The default value is: system dependent.
+
+CASE_SENSE_NAMES       = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
+# their full class and namespace scopes in the documentation. If set to YES the
+# scope will be hidden.
+# The default value is: NO.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
+# the files that are included by a file in the documentation of that file.
+# The default value is: YES.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each
+# grouped member an include statement to the documentation, telling the reader
+# which file to include in order to use the member.
+# The default value is: NO.
+
+SHOW_GROUPED_MEMB_INC  = NO
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include
+# files with double quotes in the documentation rather than with sharp brackets.
+# The default value is: NO.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the
+# documentation for inline members.
+# The default value is: YES.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
+# (detailed) documentation of file and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order.
+# The default value is: YES.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
+# descriptions of file, namespace and class members alphabetically by member
+# name. If set to NO the members will appear in declaration order. Note that
+# this will also influence the order of the classes in the class list.
+# The default value is: NO.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the
+# (brief and detailed) documentation of class members so that constructors and
+# destructors are listed first. If set to NO the constructors will appear in the
+# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS.
+# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief
+# member documentation.
+# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting
+# detailed member documentation.
+# The default value is: NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy
+# of group names into alphabetical order. If set to NO the group names will
+# appear in their defined order.
+# The default value is: NO.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by
+# fully-qualified names, including namespaces. If set to NO, the class list will
+# be sorted only by class name, not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the alphabetical
+# list.
+# The default value is: NO.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper
+# type resolution of all parameters of a function it will reject a match between
+# the prototype and the implementation of a member function even if there is
+# only one candidate or it is obvious which candidate to choose by doing a
+# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still
+# accept a match between prototype and implementation in such cases.
+# The default value is: NO.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
+# todo list. This list is created by putting \todo commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
+# test list. This list is created by putting \test commands in the
+# documentation.
+# The default value is: YES.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug
+# list. This list is created by putting \bug commands in the documentation.
+# The default value is: YES.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO)
+# the deprecated list. This list is created by putting \deprecated commands in
+# the documentation.
+# The default value is: YES.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional documentation
+# sections, marked by \if <section_label> ... \endif and \cond <section_label>
+# ... \endcond blocks.
+
+ENABLED_SECTIONS       =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the
+# initial value of a variable or macro / define can have for it to appear in the
+# documentation. If the initializer consists of more lines than specified here
+# it will be hidden. Use a value of 0 to hide initializers completely. The
+# appearance of the value of individual variables and macros / defines can be
+# controlled using \showinitializer or \hideinitializer command in the
+# documentation regardless of this setting.
+# Minimum value: 0, maximum value: 10000, default value: 30.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
+# the bottom of the documentation of classes and structs. If set to YES the list
+# will mention the files that were used to generate the documentation.
+# The default value is: YES.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This
+# will remove the Files entry from the Quick Index and from the Folder Tree View
+# (if specified).
+# The default value is: YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces
+# page. This will remove the Namespaces entry from the Quick Index and from the
+# Folder Tree View (if specified).
+# The default value is: YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command command input-file, where command is the value of the
+# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided
+# by doxygen. Whatever the program writes to standard output is used as the file
+# version. For an example see the documentation.
+
+FILE_VERSION_FILTER    =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed
+# by doxygen. The layout file controls the global structure of the generated
+# output files in an output format independent way. To create the layout file
+# that represents doxygen's defaults, run doxygen with the -l option. You can
+# optionally specify a file name after the option, if omitted DoxygenLayout.xml
+# will be used as the name of the layout file.
+#
+# Note that if you run doxygen from a directory containing a file called
+# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE
+# tag is left empty.
+
+LAYOUT_FILE            =
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files containing
+# the reference definitions. This must be a list of .bib files. The .bib
+# extension is automatically appended if omitted. This requires the bibtex tool
+# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info.
+# For LaTeX the style of the bibliography can be controlled using
+# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the
+# search path. Do not use file names with spaces, bibtex cannot handle them. See
+# also \cite for info how to create references.
+
+CITE_BIB_FILES         =
+
+#---------------------------------------------------------------------------
+# Configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated to
+# standard output by doxygen. If QUIET is set to YES this implies that the
+# messages are off.
+# The default value is: NO.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES
+# this implies that the warnings are on.
+#
+# Tip: Turn warnings on while writing the documentation.
+# The default value is: YES.
+
+WARNINGS               = YES
+
+# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
+# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
+# will automatically be disabled.
+# The default value is: YES.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some parameters
+# in a documented function, or documenting parameters that don't exist or using
+# markup commands wrongly.
+# The default value is: YES.
+
+WARN_IF_DOC_ERROR      = YES
+
+# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
+# are documented, but have no documentation for their parameters or return
+# value. If set to NO doxygen will only warn about wrong or incomplete parameter
+# documentation, but not about the absence of documentation.
+# The default value is: NO.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that doxygen
+# can produce. The string should contain the $file, $line, and $text tags, which
+# will be replaced by the file and line number from which the warning originated
+# and the warning text. Optionally the format may contain $version, which will
+# be replaced by the version of the file (if it could be obtained via
+# FILE_VERSION_FILTER)
+# The default value is: $file:$line: $text.
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning and error
+# messages should be written. If left blank the output is written to standard
+# error (stderr).
+
+WARN_LOGFILE           =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag is used to specify the files and/or directories that contain
+# documented source files. You may enter file names like myfile.cpp or
+# directories like /usr/src/myproject. Separate the files or directories with
+# spaces.
+# Note: If this tag is empty the current directory is searched.
+
+INPUT                  =
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
+# libiconv (or the iconv built into libc) for the transcoding. See the libiconv
+# documentation (see: http://www.gnu.org/software/libiconv) for the list of
+# possible encodings.
+# The default value is: UTF-8.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank the
+# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
+# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
+# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
+# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
+# *.qsf, *.as and *.js.
+
+FILE_PATTERNS          =
+
+# The RECURSIVE tag can be used to specify whether or not subdirectories should
+# be searched for input files as well.
+# The default value is: NO.
+
+RECURSIVE              = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+#
+# Note that relative paths are relative to the directory from which doxygen is
+# run.
+
+EXCLUDE                =
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
+# directories that are symbolic links (a Unix file system feature) are excluded
+# from the input.
+# The default value is: NO.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+#
+# Note that the wildcards are matched against the file with absolute path, so to
+# exclude all test directories use the pattern */test/*
+
+EXCLUDE_SYMBOLS        =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or directories
+# that contain example code fragments that are included (see the \include
+# command).
+
+EXAMPLE_PATH           =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and
+# *.h) to filter out the source-files in the directories. If left blank all
+# files are included.
+
+EXAMPLE_PATTERNS       =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude commands
+# irrespective of the value of the RECURSIVE tag.
+# The default value is: NO.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or directories
+# that contain images that are to be included in the documentation (see the
+# \image command).
+
+IMAGE_PATH             =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command:
+#
+# <filter> <input-file>
+#
+# where <filter> is the value of the INPUT_FILTER tag, and <input-file> is the
+# name of an input file. Doxygen will then use the output that the filter
+# program writes to standard output. If FILTER_PATTERNS is specified, this tag
+# will be ignored.
+#
+# Note that the filter must not add or remove lines; it is applied before the
+# code is scanned, but not when the output code is generated. If lines are added
+# or removed, the anchors will not be placed correctly.
+
+INPUT_FILTER           =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form: pattern=filter
+# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
+# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
+# patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER ) will also be used to filter the input files that are used for
+# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES).
+# The default value is: NO.
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and
+# it is also possible to disable source filtering for a specific pattern using
+# *.ext= (so without naming a filter).
+# This tag requires that the tag FILTER_SOURCE_FILES is set to YES.
+
+FILTER_SOURCE_PATTERNS =
+
+# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that
+# is part of the input, its contents will be placed on the main page
+# (index.html). This can be useful if you have a project on for instance GitHub
+# and want to reuse the introduction page also for the doxygen output.
+
+USE_MDFILE_AS_MAINPAGE =
+
+#---------------------------------------------------------------------------
+# Configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will be
+# generated. Documented entities will be cross-referenced with these sources.
+#
+# Note: To get rid of all source code in the generated output, make sure that
+# also VERBATIM_HEADERS is set to NO.
+# The default value is: NO.
+
+SOURCE_BROWSER         = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body of functions,
+# classes and enums directly into the documentation.
+# The default value is: NO.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any
+# special comment blocks from generated source code fragments. Normal C, C++ and
+# Fortran comments will always remain visible.
+# The default value is: YES.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
+# function all documented functions referencing it will be listed.
+# The default value is: NO.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES then for each documented function
+# all documented entities called/used by that function will be listed.
+# The default value is: NO.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
+# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
+# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
+# link to the documentation.
+# The default value is: YES.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the
+# source code will show a tooltip with additional information such as prototype,
+# brief description and links to the definition and documentation. Since this
+# will make the HTML file larger and loading of large files a bit slower, you
+# can opt to disable this feature.
+# The default value is: YES.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+SOURCE_TOOLTIPS        = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code will
+# point to the HTML generated by the htags(1) tool instead of doxygen built-in
+# source browser. The htags tool is part of GNU's global source tagging system
+# (see http://www.gnu.org/software/global/global.html). You will need version
+# 4.8.6 or higher.
+#
+# To use it do the following:
+# - Install the latest version of global
+# - Enable SOURCE_BROWSER and USE_HTAGS in the config file
+# - Make sure the INPUT points to the root of the source tree
+# - Run doxygen as normal
+#
+# Doxygen will invoke htags (and that will in turn invoke gtags), so these
+# tools must be available from the command line (i.e. in the search path).
+#
+# The result: instead of the source browser generated by doxygen, the links to
+# source code will now point to the output of htags.
+# The default value is: NO.
+# This tag requires that the tag SOURCE_BROWSER is set to YES.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a
+# verbatim copy of the header file for each class for which an include is
+# specified. Set to NO to disable this.
+# See also: Section \class.
+# The default value is: YES.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all
+# compounds will be generated. Enable this if the project contains a lot of
+# classes, structs, unions or interfaces.
+# The default value is: YES.
+
+ALPHABETICAL_INDEX     = YES
+
+# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in
+# which the alphabetical index list will be split.
+# Minimum value: 1, maximum value: 20, default value: 5.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all classes will
+# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag
+# can be used to specify a prefix (or a list of prefixes) that should be ignored
+# while generating the index headers.
+# This tag requires that the tag ALPHABETICAL_INDEX is set to YES.
+
+IGNORE_PREFIX          =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
+# The default value is: YES.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each
+# generated HTML page (for example: .htm, .php, .asp).
+# The default value is: .html.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a user-defined HTML header file for
+# each generated HTML page. If the tag is left blank doxygen will generate a
+# standard header.
+#
+# To get valid HTML the header file that includes any scripts and style sheets
+# that doxygen needs, which is dependent on the configuration options used (e.g.
+# the setting GENERATE_TREEVIEW). It is highly recommended to start with a
+# default header using
+# doxygen -w html new_header.html new_footer.html new_stylesheet.css
+# YourConfigFile
+# and then modify the file new_header.html. See also section "Doxygen usage"
+# for information on how to generate the default header that doxygen normally
+# uses.
+# Note: The header is subject to change so you typically have to regenerate the
+# default header when upgrading to a newer version of doxygen. For a description
+# of the possible markers and block names see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_HEADER            =
+
+# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
+# generated HTML page. If the tag is left blank doxygen will generate a standard
+# footer. See HTML_HEADER for more information on how to generate a default
+# footer and what special commands can be used inside the footer. See also
+# section "Doxygen usage" for information on how to generate the default footer
+# that doxygen normally uses.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_FOOTER            =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
+# sheet that is used by each HTML page. It can be used to fine-tune the look of
+# the HTML output. If left blank doxygen will generate a default style sheet.
+# See also section "Doxygen usage" for information on how to generate the style
+# sheet that doxygen normally uses.
+# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as
+# it is more robust and this tag (HTML_STYLESHEET) will in the future become
+# obsolete.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_STYLESHEET        =
+
+# The HTML_EXTRA_STYLESHEET tag can be used to specify an additional user-
+# defined cascading style sheet that is included after the standard style sheets
+# created by doxygen. Using this option one can overrule certain style aspects.
+# This is preferred over using HTML_STYLESHEET since it does not replace the
+# standard style sheet and is therefor more robust against future updates.
+# Doxygen will copy the style sheet file to the output directory. For an example
+# see the documentation.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_STYLESHEET  =
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the HTML output directory. Note
+# that these files will be copied to the base HTML output directory. Use the
+# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that the
+# files will be copied as-is; there are no commands or markers available.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_EXTRA_FILES       =
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen
+# will adjust the colors in the stylesheet and background images according to
+# this color. Hue is specified as an angle on a colorwheel, see
+# http://en.wikipedia.org/wiki/Hue for more information. For instance the value
+# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300
+# purple, and 360 is red again.
+# Minimum value: 0, maximum value: 359, default value: 220.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors
+# in the HTML output. For a value of 0 the output will use grayscales only. A
+# value of 255 will produce the most vivid colors.
+# Minimum value: 0, maximum value: 255, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the
+# luminance component of the colors in the HTML output. Values below 100
+# gradually make the output lighter, whereas values above 100 make the output
+# darker. The value divided by 100 is the actual gamma applied, so 80 represents
+# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not
+# change the gamma.
+# Minimum value: 40, maximum value: 240, default value: 80.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
+# page will contain the date and time when the page was generated. Setting this
+# to NO can help when comparing the output of multiple runs.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries
+# shown in the various tree structured indices initially; the user can expand
+# and collapse entries dynamically later on. Doxygen will expand the tree to
+# such a level that at most the specified number of entries are visible (unless
+# a fully collapsed tree already exceeds this amount). So setting the number of
+# entries 1 will produce a full collapsed tree by default. 0 is a special value
+# representing an infinite number of entries and will result in a full expanded
+# tree by default.
+# Minimum value: 0, maximum value: 9999, default value: 100.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files will be
+# generated that can be used as input for Apple's Xcode 3 integrated development
+# environment (see: http://developer.apple.com/tools/xcode/), introduced with
+# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a
+# Makefile in the HTML output directory. Running make will produce the docset in
+# that directory and running make install will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at
+# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html
+# for more information.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_DOCSET        = NO
+
+# This tag determines the name of the docset feed. A documentation feed provides
+# an umbrella under which multiple documentation sets from a single provider
+# (such as a company or product suite) can be grouped.
+# The default value is: Doxygen generated docs.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# This tag specifies a string that should uniquely identify the documentation
+# set bundle. This should be a reverse domain-name style string, e.g.
+# com.mycompany.MyDocSet. Doxygen will append .docset to the name.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify
+# the documentation publisher. This should be a reverse domain-name style
+# string, e.g. com.mycompany.MyDocSet.documentation.
+# The default value is: org.doxygen.Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher.
+# The default value is: Publisher.
+# This tag requires that the tag GENERATE_DOCSET is set to YES.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three
+# additional HTML index files: index.hhp, index.hhc, and index.hhk. The
+# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop
+# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on
+# Windows.
+#
+# The HTML Help Workshop contains a compiler that can convert all HTML output
+# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML
+# files are now used as the Windows 98 help format, and will replace the old
+# Windows help format (.hlp) on all Windows platforms in the future. Compressed
+# HTML files also contain an index, a table of contents, and you can search for
+# words in the documentation. The HTML workshop also contains a viewer for
+# compressed HTML files.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_HTMLHELP      = NO
+
+# The CHM_FILE tag can be used to specify the file name of the resulting .chm
+# file. You can add a path in front of the file if the result should not be
+# written to the html output directory.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_FILE               =
+
+# The HHC_LOCATION tag can be used to specify the location (absolute path
+# including file name) of the HTML help compiler ( hhc.exe). If non-empty
+# doxygen will try to run the HTML help compiler on the generated index.hhp.
+# The file has to be specified with full path.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+HHC_LOCATION           =
+
+# The GENERATE_CHI flag controls if a separate .chi index file is generated (
+# YES) or that it should be included in the master .chm file ( NO).
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+GENERATE_CHI           = NO
+
+# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc)
+# and project file content.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+CHM_INDEX_ENCODING     =
+
+# The BINARY_TOC flag controls whether a binary table of contents is generated (
+# YES) or a normal table of contents ( NO) in the .chm file.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members to
+# the table of contents of the HTML help documentation and to the tree view.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
+# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help
+# (.qch) of the generated HTML documentation.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify
+# the file name of the resulting .qch file. The path specified is relative to
+# the HTML output folder.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QCH_FILE               =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help
+# Project output. For more information please see Qt Help Project / Namespace
+# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace).
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt
+# Help Project output. For more information please see Qt Help Project / Virtual
+# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual-
+# folders).
+# The default value is: doc.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom
+# filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_NAME   =
+
+# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the
+# custom filter to add. For more information please see Qt Help Project / Custom
+# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-
+# filters).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_CUST_FILTER_ATTRS  =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this
+# project's filter section matches. Qt Help Project / Filter Attributes (see:
+# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes).
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHP_SECT_FILTER_ATTRS  =
+
+# The QHG_LOCATION tag can be used to specify the location of Qt's
+# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the
+# generated .qhp file.
+# This tag requires that the tag GENERATE_QHP is set to YES.
+
+QHG_LOCATION           =
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be
+# generated, together with the HTML files, they form an Eclipse help plugin. To
+# install this plugin and make it available under the help contents menu in
+# Eclipse, the contents of the directory containing the HTML and XML files needs
+# to be copied into the plugins directory of eclipse. The name of the directory
+# within the plugins directory should be the same as the ECLIPSE_DOC_ID value.
+# After copying Eclipse needs to be restarted before the help appears.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the Eclipse help plugin. When installing the plugin
+# the directory name containing the HTML and XML files should also have this
+# name. Each documentation set should have its own identifier.
+# The default value is: org.doxygen.Project.
+# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# If you want full control over the layout of the generated HTML pages it might
+# be necessary to disable the index and replace it with your own. The
+# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top
+# of each HTML page. A value of NO enables the index and the value YES disables
+# it. Since the tabs in the index contain the same information as the navigation
+# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information. If the tag
+# value is set to YES, a side panel will be generated containing a tree-like
+# index structure (just like the one that is generated for HTML Help). For this
+# to work a browser that supports JavaScript, DHTML, CSS and frames is required
+# (i.e. any modern browser). Windows users are probably better off using the
+# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can
+# further fine-tune the look of the index. As an example, the default style
+# sheet generated by doxygen has an example that shows how to put an image at
+# the root of the tree instead of the PROJECT_NAME. Since the tree basically has
+# the same information as the tab index, you could consider setting
+# DISABLE_INDEX to YES when enabling this option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that
+# doxygen will group on one line in the generated HTML documentation.
+#
+# Note that a value of 0 will completely suppress the enum values from appearing
+# in the overview section.
+# Minimum value: 0, maximum value: 20, default value: 4.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used
+# to set the initial width (in pixels) of the frame in which the tree is shown.
+# Minimum value: 0, maximum value: 1500, default value: 250.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
+# external symbols imported via tag files in a separate window.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of LaTeX formulas included as images in
+# the HTML documentation. When you change the font size after a successful
+# doxygen run you need to manually remove any form_*.png images from the HTML
+# output directory to force them to be regenerated.
+# Minimum value: 8, maximum value: 50, default value: 10.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images
+# generated for formulas are transparent PNGs. Transparent PNGs are not
+# supported properly for IE 6.0, but are supported on all modern browsers.
+#
+# Note that when changing this option you need to delete any form_*.png files in
+# the HTML output directory before the changes have effect.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
+# http://www.mathjax.org) which uses client side Javascript for the rendering
+# instead of using prerendered bitmaps. Use this if you do not have LaTeX
+# installed or if you want to formulas look prettier in the HTML output. When
+# enabled you may also need to install MathJax separately and configure the path
+# to it using the MATHJAX_RELPATH option.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you can set the default output format to be used for
+# the MathJax output. See the MathJax site (see:
+# http://docs.mathjax.org/en/latest/output.html) for more details.
+# Possible values are: HTML-CSS (which is slower, but has the best
+# compatibility), NativeMML (i.e. MathML) and SVG.
+# The default value is: HTML-CSS.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_FORMAT         = HTML-CSS
+
+# When MathJax is enabled you need to specify the location relative to the HTML
+# output directory using the MATHJAX_RELPATH option. The destination directory
+# should contain the MathJax.js script. For instance, if the mathjax directory
+# is located at the same level as the HTML output directory, then
+# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax
+# Content Delivery Network so you can quickly see the result without installing
+# MathJax. However, it is strongly recommended to install a local copy of
+# MathJax from http://www.mathjax.org before deployment.
+# The default value is: http://cdn.mathjax.org/mathjax/latest.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax
+# extension names that should be enabled during MathJax rendering. For example
+# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_EXTENSIONS     =
+
+# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces
+# of code that will be used on startup of the MathJax code. See the MathJax site
+# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an
+# example see the documentation.
+# This tag requires that the tag USE_MATHJAX is set to YES.
+
+MATHJAX_CODEFILE       =
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box for
+# the HTML output. The underlying search engine uses javascript and DHTML and
+# should work on any modern browser. Note that when using HTML help
+# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET)
+# there is already a search function so this one should typically be disabled.
+# For large projects the javascript based search engine can be slow, then
+# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to
+# search using the keyboard; to jump to the search box use <access key> + S
+# (what the <access key> is depends on the OS and browser, but it is typically
+# <CTRL>, <ALT>/<option>, or both). Inside the search box use the <cursor down
+# key> to jump into the search results window, the results can be navigated
+# using the <cursor keys>. Press <Enter> to select an item or <escape> to cancel
+# the search. The filter options can be selected when the cursor is inside the
+# search box by pressing <Shift>+<cursor down>. Also here use the <cursor keys>
+# to select a filter and <Enter> or <escape> to activate or cancel the filter
+# option.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_HTML is set to YES.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be
+# implemented using a web server instead of a web client using Javascript. There
+# are two flavours of web server based searching depending on the
+# EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for
+# searching and an index file used by the script. When EXTERNAL_SEARCH is
+# enabled the indexing and searching needs to be provided by external tools. See
+# the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SERVER_BASED_SEARCH    = NO
+
+# When EXTERNAL_SEARCH tag is enabled doxygen will no longer generate the PHP
+# script for searching. Instead the search results are written to an XML file
+# which needs to be processed by an external indexer. Doxygen will invoke an
+# external search engine pointed to by the SEARCHENGINE_URL option to obtain the
+# search results.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/).
+#
+# See the section "External Indexing and Searching" for details.
+# The default value is: NO.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH        = NO
+
+# The SEARCHENGINE_URL should point to a search engine hosted by a web server
+# which will return the search results when EXTERNAL_SEARCH is enabled.
+#
+# Doxygen ships with an example indexer ( doxyindexer) and search engine
+# (doxysearch.cgi) which are based on the open source search engine library
+# Xapian (see: http://xapian.org/). See the section "External Indexing and
+# Searching" for details.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHENGINE_URL       =
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed
+# search data is written to a file for indexing by an external tool. With the
+# SEARCHDATA_FILE tag the name of this file can be specified.
+# The default file is: searchdata.xml.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+SEARCHDATA_FILE        = searchdata.xml
+
+# When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the
+# EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is
+# useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple
+# projects and redirect the results back to the right project.
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTERNAL_SEARCH_ID     =
+
+# The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen
+# projects other than the one defined by this configuration file, but that are
+# all added to the same external search index. Each project needs to have a
+# unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id of
+# to a relative location where the documentation can be found. The format is:
+# EXTRA_SEARCH_MAPPINGS = tagname1=loc1 tagname2=loc2 ...
+# This tag requires that the tag SEARCHENGINE is set to YES.
+
+EXTRA_SEARCH_MAPPINGS  =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
+# The default value is: YES.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked.
+#
+# Note that when enabling USE_PDFLATEX this option is only used for generating
+# bitmaps for formulas in the HTML output, but not in the Makefile that is
+# written to the output directory.
+# The default file is: latex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to generate
+# index for LaTeX.
+# The default file is: makeindex.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used by the
+# printer.
+# Possible values are: a4 (210 x 297 mm), letter (8.5 x 11 inches), legal (8.5 x
+# 14 inches) and executive (7.25 x 10.5 inches).
+# The default value is: a4.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
+# that should be included in the LaTeX output. To get the times font for
+# instance you can specify
+# EXTRA_PACKAGES=times
+# If left blank no extra packages will be included.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+EXTRA_PACKAGES         =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for the
+# generated LaTeX document. The header should contain everything until the first
+# chapter. If it is left blank doxygen will generate a standard header. See
+# section "Doxygen usage" for information on how to let doxygen write the
+# default header to a separate file.
+#
+# Note: Only use a user-defined header if you know what you are doing! The
+# following commands have a special meaning inside the header: $title,
+# $datetime, $date, $doxygenversion, $projectname, $projectnumber. Doxygen will
+# replace them by respectively the title of the page, the current date and time,
+# only the current date, the version number of doxygen, the project name (see
+# PROJECT_NAME), or the project number (see PROJECT_NUMBER).
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HEADER           =
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
+# generated LaTeX document. The footer should contain everything after the last
+# chapter. If it is left blank doxygen will generate a standard footer.
+#
+# Note: Only use a user-defined footer if you know what you are doing!
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_FOOTER           =
+
+# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
+# other source files which should be copied to the LATEX_OUTPUT output
+# directory. Note that the files will be copied as-is; there are no commands or
+# markers available.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_EXTRA_FILES      =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated is
+# prepared for conversion to PDF (using ps2pdf or pdflatex). The PDF file will
+# contain links (just like the HTML output) instead of page references. This
+# makes the output suitable for online browsing using a PDF viewer.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+PDF_HYPERLINKS         = YES
+
+# If the LATEX_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
+# the PDF file directly from the LaTeX files. Set this option to YES to get a
+# higher quality PDF documentation.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \batchmode
+# command to the generated LaTeX files. This will instruct LaTeX to keep running
+# if errors occur, instead of asking the user for help. This option is also used
+# when generating formulas in HTML.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BATCHMODE        = NO
+
+# If the LATEX_HIDE_INDICES tag is set to YES then doxygen will not include the
+# index chapters (such as File Index, Compound Index, etc.) in the output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_HIDE_INDICES     = NO
+
+# If the LATEX_SOURCE_CODE tag is set to YES then doxygen will include source
+# code with syntax highlighting in the LaTeX output.
+#
+# Note that which sources are shown also depends on other settings such as
+# SOURCE_BROWSER.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the
+# bibliography, e.g. plainnat, or ieeetr. See
+# http://en.wikipedia.org/wiki/BibTeX and \cite for more info.
+# The default value is: plain.
+# This tag requires that the tag GENERATE_LATEX is set to YES.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# Configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
+# RTF output is optimized for Word 97 and may not look too pretty with other RTF
+# readers/editors.
+# The default value is: NO.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: rtf.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
+# documents. This may be useful for small projects and may help to save some
+# trees in general.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated will
+# contain hyperlink fields. The RTF file will contain links (just like the HTML
+# output) instead of page references. This makes the output suitable for online
+# browsing using Word or some other Word compatible readers that support those
+# fields.
+#
+# Note: WordPad (write) and others do not support links.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_HYPERLINKS         = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's config
+# file, i.e. a series of assignments. You only have to provide replacements,
+# missing definitions are set to their default value.
+#
+# See also section "Doxygen usage" for information on how to generate the
+# default style sheet that doxygen normally uses.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_STYLESHEET_FILE    =
+
+# Set optional variables used in the generation of an RTF document. Syntax is
+# similar to doxygen's config file. A template extensions file can be generated
+# using doxygen -e rtf extensionFile.
+# This tag requires that the tag GENERATE_RTF is set to YES.
+
+RTF_EXTENSIONS_FILE    =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
+# classes and files.
+# The default value is: NO.
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it. A directory man3 will be created inside the directory specified by
+# MAN_OUTPUT.
+# The default directory is: man.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to the generated
+# man pages. In case the manual section does not start with a number, the number
+# 3 is prepended. The dot (.) at the beginning of the MAN_EXTENSION tag is
+# optional.
+# The default value is: .3.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and doxygen generates man output, then it
+# will generate one additional man file for each entity documented in the real
+# man page(s). These additional files only source the real man page, but without
+# them the man command would be unable to find the correct page.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_MAN is set to YES.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
+# captures the structure of the code including all documentation.
+# The default value is: NO.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. If a
+# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
+# it.
+# The default directory is: xml.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify a XML schema, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_SCHEMA             =
+
+# The XML_DTD tag can be used to specify a XML DTD, which can be used by a
+# validating XML parser to check the syntax of the XML files.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_DTD                =
+
+# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
+# listings (including syntax highlighting and cross-referencing information) to
+# the XML output. Note that enabling this will significantly increase the size
+# of the XML output.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_XML is set to YES.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to the DOCBOOK output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
+# that can be used to generate PDF.
+# The default value is: NO.
+
+GENERATE_DOCBOOK       = NO
+
+# The DOCBOOK_OUTPUT tag is used to specify where the Docbook pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be put in
+# front of it.
+# The default directory is: docbook.
+# This tag requires that the tag GENERATE_DOCBOOK is set to YES.
+
+DOCBOOK_OUTPUT         = docbook
+
+#---------------------------------------------------------------------------
+# Configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
+# Definitions (see http://autogen.sf.net) file that captures the structure of
+# the code including all documentation. Note that this feature is still
+# experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# Configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
+# file that captures the structure of the code including all documentation.
+#
+# Note that this feature is still experimental and incomplete at the moment.
+# The default value is: NO.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
+# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
+# output from the Perl module output.
+# The default value is: NO.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
+# formatted so it can be parsed by a human reader. This is useful if you want to
+# understand what is going on. On the other hand, if this tag is set to NO the
+# size of the Perl module output will be much smaller and Perl will parse it
+# just the same.
+# The default value is: YES.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file are
+# prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. This is useful
+# so different doxyrules.make files included by the same Makefile don't
+# overwrite each other's variables.
+# This tag requires that the tag GENERATE_PERLMOD is set to YES.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
+# C-preprocessor directives found in the sources and include files.
+# The default value is: YES.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
+# in the source code. If set to NO only conditional compilation will be
+# performed. Macro expansion can be done in a controlled way by setting
+# EXPAND_ONLY_PREDEF to YES.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES then
+# the macro expansion is limited to the macros specified with the PREDEFINED and
+# EXPAND_AS_DEFINED tags.
+# The default value is: NO.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES the includes files in the
+# INCLUDE_PATH will be searched if a #include is found.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by the
+# preprocessor.
+# This tag requires that the tag SEARCH_INCLUDES is set to YES.
+
+INCLUDE_PATH           =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will be
+# used.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+INCLUDE_FILE_PATTERNS  =
+
+# The PREDEFINED tag can be used to specify one or more macro names that are
+# defined before the preprocessor is started (similar to the -D option of e.g.
+# gcc). The argument of the tag is a list of macros of the form: name or
+# name=definition (no spaces). If the definition and the "=" are omitted, "=1"
+# is assumed. To prevent a macro definition from being undefined via #undef or
+# recursively expanded use the := operator instead of the = operator.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+PREDEFINED             =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
+# tag can be used to specify a list of macro names that should be expanded. The
+# macro definition that is found in the sources will be used. Use the PREDEFINED
+# tag if you want to use a different macro definition that overrules the
+# definition found in the source code.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+EXPAND_AS_DEFINED      =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES then doxygen's preprocessor will
+# remove all refrences to function-like macros that are alone on a line, have an
+# all uppercase name, and do not end with a semicolon. Such function macros are
+# typically used for boiler-plate code, and will confuse the parser if not
+# removed.
+# The default value is: YES.
+# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration options related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES tag can be used to specify one or more tag files. For each tag
+# file the location of the external documentation should be added. The format of
+# a tag file without this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where loc1 and loc2 can be relative or absolute paths or URLs. See the
+# section "Linking to external documentation" for more information about the use
+# of tag files.
+# Note: Each tag file must have an unique name (where the name does NOT include
+# the path). If a tag file is not located in the directory in which doxygen is
+# run, you must also specify the path to the tagfile here.
+
+TAGFILES               =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create a
+# tag file that is based on the input files it reads. See section "Linking to
+# external documentation" for more information about the usage of tag files.
+
+GENERATE_TAGFILE       =
+
+# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
+# class index. If set to NO only the inherited external classes will be listed.
+# The default value is: NO.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
+# the modules index. If set to NO, only the current project's groups will be
+# listed.
+# The default value is: YES.
+
+EXTERNAL_GROUPS        = YES
+
+# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
+# the related pages index. If set to NO, only the current project's pages will
+# be listed.
+# The default value is: YES.
+
+EXTERNAL_PAGES         = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of 'which perl').
+# The default file (with absolute path) is: /usr/bin/perl.
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
+# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
+# NO turns the diagrams off. Note that this option also works with HAVE_DOT
+# disabled, but it is recommended to install and use dot, since it yields more
+# powerful graphs.
+# The default value is: YES.
+
+CLASS_DIAGRAMS         = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see:
+# http://www.mcternan.me.uk/mscgen/)) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH            =
+
+# You can include diagrams made with dia in doxygen documentation. Doxygen will
+# then run dia to produce the diagram and insert it in the documentation. The
+# DIA_PATH tag allows you to specify the directory where the dia binary resides.
+# If left empty dia is assumed to be found in the default search path.
+
+DIA_PATH               =
+
+# If set to YES, the inheritance and collaboration graphs will hide inheritance
+# and usage relations if the target is undocumented or is not a class.
+# The default value is: YES.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz (see:
+# http://www.graphviz.org/), a graph visualization toolkit from AT&T and Lucent
+# Bell Labs. The other options in this section have no effect if this option is
+# set to NO
+# The default value is: NO.
+
+HAVE_DOT               = NO
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is allowed
+# to run in parallel. When set to 0 doxygen will base this on the number of
+# processors available in the system. You can set it explicitly to a value
+# larger than 0 to get control over the balance between CPU load and processing
+# speed.
+# Minimum value: 0, maximum value: 32, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_NUM_THREADS        = 0
+
+# When you want a differently looking font n the dot files that doxygen
+# generates you can specify the font name using DOT_FONTNAME. You need to make
+# sure dot is able to find the font, which can be done by putting it in a
+# standard location or by setting the DOTFONTPATH environment variable or by
+# setting DOT_FONTPATH to the directory containing the font.
+# The default value is: Helvetica.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size (in points) of the font of
+# dot graphs.
+# Minimum value: 4, maximum value: 24, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the default font as specified with
+# DOT_FONTNAME. If you specify a different font using DOT_FONTNAME you can set
+# the path where dot can find it using this tag.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_FONTPATH           =
+
+# If the CLASS_GRAPH tag is set to YES then doxygen will generate a graph for
+# each documented class showing the direct and indirect inheritance relations.
+# Setting this tag to YES will force the CLASS_DIAGRAMS tag to NO.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH tag is set to YES then doxygen will generate a
+# graph for each documented class showing the direct and indirect implementation
+# dependencies (inheritance, containment, and class references variables) of the
+# class with other documented classes.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS tag is set to YES then doxygen will generate a graph for
+# groups, showing the direct groups dependencies.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside the
+# class node. If there are many fields or methods and many nodes the graph may
+# become too big to be useful. The UML_LIMIT_NUM_FIELDS threshold limits the
+# number of items for each type to make the size more manageable. Set this to 0
+# for no limit. Note that the threshold may be exceeded by 50% before the limit
+# is enforced. So when you set the threshold to 10, up to 15 fields may appear,
+# but if the number exceeds 15, the total amount of fields shown is limited to
+# 10.
+# Minimum value: 0, maximum value: 100, default value: 10.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If the TEMPLATE_RELATIONS tag is set to YES then the inheritance and
+# collaboration graphs will show the relations between templates and their
+# instances.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the INCLUDE_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are set to
+# YES then doxygen will generate a graph for each documented file showing the
+# direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDE_GRAPH          = YES
+
+# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
+# set to YES then doxygen will generate a graph for each documented file showing
+# the direct and indirect include dependencies of the file with other documented
+# files.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH tag is set to YES then doxygen will generate a call
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALL_GRAPH             = NO
+
+# If the CALLER_GRAPH tag is set to YES then doxygen will generate a caller
+# dependency graph for every global function or class method.
+#
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable caller graphs for selected
+# functions only using the \callergraph command.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+CALLER_GRAPH           = NO
+
+# If the GRAPHICAL_HIERARCHY tag is set to YES then doxygen will graphical
+# hierarchy of all classes instead of a textual one.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH tag is set to YES then doxygen will show the
+# dependencies a directory has on other directories in a graphical way. The
+# dependency relations are determined by the #include relations between the
+# files in the directories.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot.
+# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
+# to make the SVG files visible in IE 9+ (other browsers do not have this
+# requirement).
+# Possible values are: png, jpg, gif and svg.
+# The default value is: png.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to
+# enable generation of interactive SVG images that allow zooming and panning.
+#
+# Note that this requires a modern browser other than Internet Explorer. Tested
+# and working are Firefox, Chrome, Safari, and Opera.
+# Note: For IE 9+ you need to set HTML_FILE_EXTENSION to xhtml in order to make
+# the SVG files visible. Older versions of IE do not have SVG support.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+INTERACTIVE_SVG        = NO
+
+# The DOT_PATH tag can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_PATH               =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the \dotfile
+# command).
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOTFILE_DIRS           =
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that
+# contain msc files that are included in the documentation (see the \mscfile
+# command).
+
+MSCFILE_DIRS           =
+
+# The DIAFILE_DIRS tag can be used to specify one or more directories that
+# contain dia files that are included in the documentation (see the \diafile
+# command).
+
+DIAFILE_DIRS           =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
+# that will be shown in the graph. If the number of nodes in a graph becomes
+# larger than this value, doxygen will truncate the graph, which is visualized
+# by representing a node as a red box. Note that doxygen if the number of direct
+# children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note that
+# the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+# Minimum value: 0, maximum value: 10000, default value: 50.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
+# generated by dot. A depth value of 3 means that only nodes reachable from the
+# root by following a path via at most 3 edges will be shown. Nodes that lay
+# further from the root node will be omitted. Note that setting this option to 1
+# or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+# Minimum value: 0, maximum value: 1000, default value: 0.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not seem
+# to support this out of the box.
+#
+# Warning: Depending on the platform used, enabling this option may lead to
+# badly anti-aliased labels on the edges of a graph (i.e. they become hard to
+# read).
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10) support
+# this, this feature is disabled by default.
+# The default value is: NO.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_MULTI_TARGETS      = YES
+
+# If the GENERATE_LEGEND tag is set to YES doxygen will generate a legend page
+# explaining the meaning of the various boxes and arrows in the dot generated
+# graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
+# files that are used to generate the various graphs.
+# The default value is: YES.
+# This tag requires that the tag HAVE_DOT is set to YES.
+
+DOT_CLEANUP            = YES
diff --git a/audio_utils/ErrorLog.cpp b/audio_utils/ErrorLog.cpp
index 71f8b32..54742e9 100644
--- a/audio_utils/ErrorLog.cpp
+++ b/audio_utils/ErrorLog.cpp
@@ -14,6 +14,10 @@
  * limitations under the License.
  */
 
+// #define LOG_NDEBUG 0
+#define LOG_TAG "audio_utils_ErrorLog"
+#include <log/log.h>
+
 #include <audio_utils/ErrorLog.h>
 
 using namespace android;
diff --git a/audio_utils/Metadata.cpp b/audio_utils/Metadata.cpp
index d580f4c..032498a 100644
--- a/audio_utils/Metadata.cpp
+++ b/audio_utils/Metadata.cpp
@@ -14,10 +14,14 @@
  * limitations under the License.
  */
 
+// #define LOG_NDEBUG 0
+#define LOG_TAG "audio_utils_Metadata"
+
 #include <string.h>
 #include <errno.h>
 
 #include <audio_utils/Metadata.h>
+#include <log/log.h>
 
 using namespace android::audio_utils::metadata;
 
@@ -75,7 +79,11 @@
     return 0;
 }
 
-// audio_metadata_put_unknown() is declared but not implemented
+int audio_metadata_put_unknown(
+        audio_metadata_t *metadata __unused, const char *key, const void *value __unused) {
+    ALOGW("Unknown data type to put with key: %s", key);
+    return -EINVAL;
+}
 
 int audio_metadata_get_int32(audio_metadata_t *metadata, const char *key, int32_t *value) {
     if (metadata == nullptr || key == nullptr || value == nullptr) {
@@ -152,7 +160,11 @@
     return *value == nullptr ? -ENOMEM : 0;
 }
 
-// audio_metadata_get_unknown() is declared but not implemented
+int audio_metadata_get_unknown(
+        audio_metadata_t *metadata __unused, const char *key, void *value __unused) {
+    ALOGW("Unknown data type to get with key: %s", key);
+    return -EINVAL;
+}
 
 ssize_t audio_metadata_erase(audio_metadata_t *metadata, const char *key) {
     if (metadata == nullptr || key == nullptr) {
@@ -185,7 +197,3 @@
     memcpy(*byteString, bs.c_str(), bs.size());
     return bs.size();
 }
-
-size_t audio_metadata_byte_string_len(const uint8_t *byteString) {
-    return dataByteStringLen(byteString);
-}
diff --git a/audio_utils/PowerLog.cpp b/audio_utils/PowerLog.cpp
index 730a046..01c60c9 100644
--- a/audio_utils/PowerLog.cpp
+++ b/audio_utils/PowerLog.cpp
@@ -107,8 +107,7 @@
     }
 }
 
-std::string PowerLog::dumpToString(
-        const char *prefix, size_t lines, int64_t limitNs, bool logPlot) const
+std::string PowerLog::dumpToString(const char *prefix, size_t lines, int64_t limitNs) const
 {
     std::lock_guard<std::mutex> guard(mLock);
 
@@ -126,8 +125,7 @@
     size_t nonzeros = 0;
     ssize_t offset; // TODO doesn't dump if # entries exceeds SSIZE_MAX
     for (offset = 0; offset < (ssize_t)numberOfEntries && count < lines; ++offset) {
-        const size_t idx = (mIdx + numberOfEntries - offset - 1) % numberOfEntries;
-                                                                                // reverse direction
+        const size_t idx = (mIdx + numberOfEntries - offset - 1) % numberOfEntries; // reverse direction
         const int64_t time = mEntries[idx].first;
         const float energy = mEntries[idx].second;
 
@@ -224,22 +222,19 @@
             // false indicates the value doesn't have a new series time stamp.
             plotEntries.emplace_back(power, false);
         }
-        if (logPlot) {
-            ss << "\n" << audio_utils_log_plot(plotEntries.begin(), plotEntries.end());
-        }
+        ss << "\n" << audio_utils_log_plot(plotEntries.begin(), plotEntries.end());
         ss << "\n";
     }
     return ss.str();
 }
 
-status_t PowerLog::dump(
-        int fd, const char *prefix, size_t lines, int64_t limitNs, bool logPlot) const
+status_t PowerLog::dump(int fd, const char *prefix, size_t lines, int64_t limitNs) const
 {
     // Since dumpToString and write are thread safe, this function
     // is conceptually thread-safe but simultaneous calls to dump
     // by different threads to the same file descriptor may not write
     // the two logs in time order.
-    const std::string s = dumpToString(prefix, lines, limitNs, logPlot);
+    const std::string s = dumpToString(prefix, lines, limitNs);
     if (s.size() > 0 && write(fd, s.c_str(), s.size()) < 0) {
         return -errno;
     }
diff --git a/audio_utils/README.md b/audio_utils/README.md
index 9fc345e..df78972 100644
--- a/audio_utils/README.md
+++ b/audio_utils/README.md
@@ -6,8 +6,3 @@
 * open in web browser
   http://localhost:8000/classaudio__utils__fifo.html
 * when done: rm -rf html
-
-Files with explicit Android dependencies:
- * echo\_reference.c
- * resampler.c
- * most C++
diff --git a/audio_utils/benchmarks/Android.bp b/audio_utils/benchmarks/Android.bp
deleted file mode 100644
index 0fb68b7..0000000
--- a/audio_utils/benchmarks/Android.bp
+++ /dev/null
@@ -1,77 +0,0 @@
-// Build the benchmarks for audio_utils
-
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
-cc_benchmark {
-    name: "biquad_filter_benchmark",
-    host_supported: true,
-
-    srcs: ["biquad_filter_benchmark.cpp"],
-    cflags: [
-        "-Werror",
-        "-Wall",
-        "-ffast-math",
-      //  "-fno-vectorize",      // (test only)
-      //  "-fno-slp-vectorize",  // (test only)
-    ],
-    static_libs: [
-        "libaudioutils",
-    ],
-}
-
-cc_benchmark {
-    name: "intrinsic_benchmark",
-    // No need to enable for host, as this is used to compare NEON which isn't supported by the host
-    host_supported: false,
-
-    srcs: ["intrinsic_benchmark.cpp"],
-    cflags: [
-        "-Werror",
-        "-Wall",
-        "-ffast-math",
-      //  "-fno-vectorize",      // (test only)
-      //  "-fno-slp-vectorize",  // (test only)
-    ],
-    static_libs: [
-        "libaudioutils",
-    ],
-}
-
-cc_benchmark {
-    name: "primitives_benchmark",
-    host_supported: true,
-    target: {
-        darwin: {
-            enabled: false,
-        },
-    },
-
-    srcs: ["primitives_benchmark.cpp"],
-    cflags: [
-        "-Werror",
-        "-Wall",
-    ],
-    static_libs: [
-        "libaudioutils",
-    ],
-}
-
-cc_benchmark {
-    name: "statistics_benchmark",
-    host_supported: true,
-
-    srcs: ["statistics_benchmark.cpp"],
-    cflags: [
-        "-Werror",
-        "-Wall",
-    ],
-    static_libs: [
-        "libaudioutils",
-    ],
-}
diff --git a/audio_utils/benchmarks/biquad_filter_benchmark.cpp b/audio_utils/benchmarks/biquad_filter_benchmark.cpp
deleted file mode 100644
index 0a61593..0000000
--- a/audio_utils/benchmarks/biquad_filter_benchmark.cpp
+++ /dev/null
@@ -1,308 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <array>
-#include <climits>
-#include <cstdlib>
-#include <random>
-#include <vector>
-
-#include <benchmark/benchmark.h>
-
-#include <audio_utils/BiquadFilter.h>
-#include <audio_utils/format.h>
-
-static constexpr size_t DATA_SIZE = 1024;
-// The coefficients is a HPF with sampling frequency as 48000, center frequency as 600,
-// and Q as 0.707. As all the coefficients are not zero, they can be used to benchmark
-// the non-zero optimization of BiquadFilter.
-// The benchmark test will iterate the channel count from 1 to 2. The occupancy will be
-// iterate from 1 to 31. In that case, it is possible to test the performance of cases
-// with different coefficients as zero.
-static constexpr float REF_COEFS[] = {0.9460f, -1.8919f, 0.9460f, -1.8890f, 0.8949f};
-
-static void BM_BiquadFilter1D(benchmark::State& state) {
-    using android::audio_utils::BiquadFilter;
-
-    bool doParallel = (state.range(0) == 1);
-    // const size_t channelCount = state.range(1);
-    const size_t filters = 1;
-
-    std::vector<float> input(DATA_SIZE);
-    std::array<float, android::audio_utils::kBiquadNumCoefs> coefs;
-
-    // Initialize input buffer and coefs with deterministic pseudo-random values
-    constexpr std::minstd_rand::result_type SEED = 42; // arbitrary choice.
-    std::minstd_rand gen(SEED);
-    constexpr float amplitude = 1.0f;
-    std::uniform_real_distribution<> dis(-amplitude, amplitude);
-    for (size_t i = 0; i < DATA_SIZE; ++i) {
-        input[i] = dis(gen);
-    }
-
-    android::audio_utils::BiquadFilter parallel(filters, coefs);
-    std::vector<std::unique_ptr<BiquadFilter<float>>> biquads(filters);
-    for (auto& biquad : biquads) {
-        biquad.reset(new BiquadFilter<float>(1, coefs));
-    }
-
-    // Run the test
-    float *data = input.data();
-    while (state.KeepRunning()) {
-        benchmark::DoNotOptimize(data);
-        if (doParallel) {
-            parallel.process1D(data, DATA_SIZE);
-        } else {
-            for (auto& biquad : biquads) {
-                biquad->process(data, data, DATA_SIZE);
-            }
-        }
-        benchmark::ClobberMemory();
-    }
-}
-
-static void BiquadFilter1DArgs(benchmark::internal::Benchmark* b) {
-    for (int k = 0; k < 2; k++) // 0 for normal random data, 1 for subnormal random data
-         b->Args({k});
-}
-
-BENCHMARK(BM_BiquadFilter1D)->Apply(BiquadFilter1DArgs);
-
-/*******************************************************************
- * A test result running on Pixel 4 for comparison.
- * The first parameter indicates the input data is subnormal or not.
- * 0 for normal input data, 1 for subnormal input data.
- * The second parameter indicates the channel count.
- * The third parameter indicates the occupancy of the coefficients.
- * -----------------------------------------------------------------
- * Benchmark                       Time             CPU   Iterations
- * -----------------------------------------------------------------
- * BM_BiquadFilter/0/1/1         734 ns          732 ns       740671
- * BM_BiquadFilter/0/1/2         554 ns          553 ns      1266836
- * BM_BiquadFilter/0/1/3         647 ns          645 ns      1085314
- * BM_BiquadFilter/0/1/4         834 ns          832 ns       841345
- * BM_BiquadFilter/0/1/5        1068 ns         1065 ns       657343
- * BM_BiquadFilter/0/1/6         767 ns          765 ns       915223
- * BM_BiquadFilter/0/1/7         929 ns          926 ns       756405
- * BM_BiquadFilter/0/1/8        2173 ns         2168 ns       322949
- * BM_BiquadFilter/0/1/9        1831 ns         1826 ns       383304
- * BM_BiquadFilter/0/1/10       1931 ns         1927 ns       363386
- * BM_BiquadFilter/0/1/11       2536 ns         2529 ns       276783
- * BM_BiquadFilter/0/1/12       2535 ns         2529 ns       276826
- * BM_BiquadFilter/0/1/13       2174 ns         2169 ns       322755
- * BM_BiquadFilter/0/1/14       3257 ns         3250 ns       215383
- * BM_BiquadFilter/0/1/15       2175 ns         2169 ns       322711
- * BM_BiquadFilter/0/1/16       1494 ns         1491 ns       469625
- * BM_BiquadFilter/0/1/17       2176 ns         2171 ns       322423
- * BM_BiquadFilter/0/1/18       1568 ns         1564 ns       447467
- * BM_BiquadFilter/0/1/19       1325 ns         1322 ns       529762
- * BM_BiquadFilter/0/1/20       1926 ns         1921 ns       364534
- * BM_BiquadFilter/0/1/21       2630 ns         2623 ns       266027
- * BM_BiquadFilter/0/1/22       1998 ns         1993 ns       351210
- * BM_BiquadFilter/0/1/23       1882 ns         1877 ns       373028
- * BM_BiquadFilter/0/1/24       2536 ns         2529 ns       276818
- * BM_BiquadFilter/0/1/25       2176 ns         2170 ns       322627
- * BM_BiquadFilter/0/1/26       3258 ns         3250 ns       215440
- * BM_BiquadFilter/0/1/27       2175 ns         2169 ns       322724
- * BM_BiquadFilter/0/1/28       2535 ns         2529 ns       276823
- * BM_BiquadFilter/0/1/29       2175 ns         2170 ns       322560
- * BM_BiquadFilter/0/1/30       3259 ns         3250 ns       215354
- * BM_BiquadFilter/0/1/31       2176 ns         2171 ns       322492
- * BM_BiquadFilter/0/2/1        1470 ns         1466 ns       477411
- * BM_BiquadFilter/0/2/2        1109 ns         1107 ns       632666
- * BM_BiquadFilter/0/2/3        1297 ns         1294 ns       540804
- * BM_BiquadFilter/0/2/4        1681 ns         1677 ns       417675
- * BM_BiquadFilter/0/2/5        2137 ns         2132 ns       328721
- * BM_BiquadFilter/0/2/6        1572 ns         1569 ns       447114
- * BM_BiquadFilter/0/2/7        1736 ns         1732 ns       385563
- * BM_BiquadFilter/0/2/8        4331 ns         4320 ns       162048
- * BM_BiquadFilter/0/2/9        3795 ns         3785 ns       184166
- * BM_BiquadFilter/0/2/10       3832 ns         3823 ns       183015
- * BM_BiquadFilter/0/2/11       5060 ns         5047 ns       138660
- * BM_BiquadFilter/0/2/12       5046 ns         5034 ns       139033
- * BM_BiquadFilter/0/2/13       4333 ns         4322 ns       161952
- * BM_BiquadFilter/0/2/14       6500 ns         6482 ns       108022
- * BM_BiquadFilter/0/2/15       4335 ns         4324 ns       161915
- * BM_BiquadFilter/0/2/16       2965 ns         2957 ns       236771
- * BM_BiquadFilter/0/2/17       4368 ns         4358 ns       160829
- * BM_BiquadFilter/0/2/18       3193 ns         3186 ns       219766
- * BM_BiquadFilter/0/2/19       2804 ns         2798 ns       250201
- * BM_BiquadFilter/0/2/20       3839 ns         3830 ns       182731
- * BM_BiquadFilter/0/2/21       5310 ns         5296 ns       133012
- * BM_BiquadFilter/0/2/22       3995 ns         3984 ns       175672
- * BM_BiquadFilter/0/2/23       3755 ns         3745 ns       186960
- * BM_BiquadFilter/0/2/24       5060 ns         5045 ns       138733
- * BM_BiquadFilter/0/2/25       4343 ns         4330 ns       161632
- * BM_BiquadFilter/0/2/26       6505 ns         6489 ns       107871
- * BM_BiquadFilter/0/2/27       4348 ns         4336 ns       161436
- * BM_BiquadFilter/0/2/28       5068 ns         5054 ns       138515
- * BM_BiquadFilter/0/2/29       4401 ns         4389 ns       158834
- * BM_BiquadFilter/0/2/30       6514 ns         6497 ns       107752
- * BM_BiquadFilter/0/2/31       4352 ns         4341 ns       161242
- * BM_BiquadFilter/1/1/1         734 ns          732 ns       955891
- * BM_BiquadFilter/1/1/2         554 ns          552 ns      1267096
- * BM_BiquadFilter/1/1/3         647 ns          645 ns      1084919
- * BM_BiquadFilter/1/1/4         834 ns          832 ns       841505
- * BM_BiquadFilter/1/1/5        1068 ns         1065 ns       657299
- * BM_BiquadFilter/1/1/6         767 ns          765 ns       915192
- * BM_BiquadFilter/1/1/7         927 ns          924 ns       761606
- * BM_BiquadFilter/1/1/8        2174 ns         2168 ns       322888
- * BM_BiquadFilter/1/1/9        1832 ns         1826 ns       383311
- * BM_BiquadFilter/1/1/10       1932 ns         1926 ns       363384
- * BM_BiquadFilter/1/1/11       2536 ns         2529 ns       276796
- * BM_BiquadFilter/1/1/12       2536 ns         2529 ns       276843
- * BM_BiquadFilter/1/1/13       2175 ns         2169 ns       322743
- * BM_BiquadFilter/1/1/14       3259 ns         3250 ns       215420
- * BM_BiquadFilter/1/1/15       2175 ns         2169 ns       322745
- * BM_BiquadFilter/1/1/16       1495 ns         1491 ns       469661
- * BM_BiquadFilter/1/1/17       2177 ns         2171 ns       322388
- * BM_BiquadFilter/1/1/18       1569 ns         1564 ns       447468
- * BM_BiquadFilter/1/1/19       1325 ns         1322 ns       529736
- * BM_BiquadFilter/1/1/20       1927 ns         1922 ns       363962
- * BM_BiquadFilter/1/1/21       2624 ns         2617 ns       267102
- * BM_BiquadFilter/1/1/22       1999 ns         1993 ns       351169
- * BM_BiquadFilter/1/1/23       1882 ns         1877 ns       372944
- * BM_BiquadFilter/1/1/24       2536 ns         2529 ns       276751
- * BM_BiquadFilter/1/1/25       2176 ns         2170 ns       322560
- * BM_BiquadFilter/1/1/26       3259 ns         3250 ns       215389
- * BM_BiquadFilter/1/1/27       2175 ns         2169 ns       322640
- * BM_BiquadFilter/1/1/28       2536 ns         2529 ns       276786
- * BM_BiquadFilter/1/1/29       2176 ns         2170 ns       322533
- * BM_BiquadFilter/1/1/30       3260 ns         3251 ns       215325
- * BM_BiquadFilter/1/1/31       2177 ns         2171 ns       322425
- * BM_BiquadFilter/1/2/1        1471 ns         1467 ns       477222
- * BM_BiquadFilter/1/2/2        1109 ns         1107 ns       632565
- * BM_BiquadFilter/1/2/3        1298 ns         1294 ns       541051
- * BM_BiquadFilter/1/2/4        1682 ns         1678 ns       417354
- * BM_BiquadFilter/1/2/5        2136 ns         2129 ns       328967
- * BM_BiquadFilter/1/2/6        1572 ns         1568 ns       446095
- * BM_BiquadFilter/1/2/7        1792 ns         1788 ns       399598
- * BM_BiquadFilter/1/2/8        4333 ns         4320 ns       162032
- * BM_BiquadFilter/1/2/9        3807 ns         3797 ns       184097
- * BM_BiquadFilter/1/2/10       3842 ns         3831 ns       182711
- * BM_BiquadFilter/1/2/11       5062 ns         5048 ns       138636
- * BM_BiquadFilter/1/2/12       5050 ns         5036 ns       139031
- * BM_BiquadFilter/1/2/13       4335 ns         4323 ns       161943
- * BM_BiquadFilter/1/2/14       6500 ns         6483 ns       108020
- * BM_BiquadFilter/1/2/15       4336 ns         4324 ns       161873
- * BM_BiquadFilter/1/2/16       2966 ns         2957 ns       236709
- * BM_BiquadFilter/1/2/17       4359 ns         4348 ns       160581
- * BM_BiquadFilter/1/2/18       3196 ns         3187 ns       219532
- * BM_BiquadFilter/1/2/19       2805 ns         2798 ns       250157
- * BM_BiquadFilter/1/2/20       3839 ns         3829 ns       182628
- * BM_BiquadFilter/1/2/21       5291 ns         5276 ns       131153
- * BM_BiquadFilter/1/2/22       3994 ns         3984 ns       175699
- * BM_BiquadFilter/1/2/23       3757 ns         3747 ns       186864
- * BM_BiquadFilter/1/2/24       5060 ns         5046 ns       138754
- * BM_BiquadFilter/1/2/25       4343 ns         4331 ns       161614
- * BM_BiquadFilter/1/2/26       6512 ns         6491 ns       107852
- * BM_BiquadFilter/1/2/27       4348 ns         4336 ns       161419
- * BM_BiquadFilter/1/2/28       5068 ns         5055 ns       138481
- * BM_BiquadFilter/1/2/29       4386 ns         4374 ns       159635
- * BM_BiquadFilter/1/2/30       6514 ns         6498 ns       107752
- * BM_BiquadFilter/1/2/31       4353 ns         4342 ns       161227
- *******************************************************************/
-
-template <typename F>
-static void BM_BiquadFilter(benchmark::State& state, bool optimized) {
-    bool isSubnormal = (state.range(0) == 1);
-    const size_t channelCount = state.range(1);
-    const size_t occupancy = state.range(2);
-
-    std::vector<F> input(DATA_SIZE * channelCount);
-    std::vector<F> output(DATA_SIZE * channelCount);
-    std::array<F, android::audio_utils::kBiquadNumCoefs> coefs;
-
-    // Initialize input buffer and coefs with deterministic pseudo-random values
-    std::minstd_rand gen(occupancy);
-    const F amplitude = isSubnormal ? std::numeric_limits<F>::min() * 0.1 : 1.;
-    std::uniform_real_distribution<> dis(-amplitude, amplitude);
-    for (size_t i = 0; i < DATA_SIZE * channelCount; ++i) {
-        input[i] = dis(gen);
-    }
-    for (size_t i = 0; i < coefs.size(); ++i) {
-        coefs[i] = (occupancy >> i & 1) * REF_COEFS[i];
-    }
-
-    android::audio_utils::BiquadFilter<F> biquadFilter(channelCount, coefs, optimized);
-
-    // Run the test
-    while (state.KeepRunning()) {
-        benchmark::DoNotOptimize(input.data());
-        benchmark::DoNotOptimize(output.data());
-        biquadFilter.process(output.data(), input.data(), DATA_SIZE);
-        benchmark::ClobberMemory();
-    }
-    state.SetComplexityN(state.range(1));  // O(channelCount)
-}
-
-static void BM_BiquadFilterFloatOptimized(benchmark::State& state) {
-    BM_BiquadFilter<float>(state, true /* optimized */);
-}
-
-static void BM_BiquadFilterFloatNonOptimized(benchmark::State& state) {
-    BM_BiquadFilter<float>(state, false /* optimized */);
-}
-
-static void BM_BiquadFilterDoubleOptimized(benchmark::State& state) {
-    BM_BiquadFilter<double>(state, true /* optimized */);
-}
-
-static void BM_BiquadFilterDoubleNonOptimized(benchmark::State& state) {
-    BM_BiquadFilter<double>(state, false /* optimized */);
-}
-
-static void BiquadFilterQuickArgs(benchmark::internal::Benchmark* b) {
-    constexpr int CHANNEL_COUNT_BEGIN = 1;
-    constexpr int CHANNEL_COUNT_END = 24;
-    for (int k = 0; k < 1; k++) { // 0 for normal random data, 1 for subnormal random data
-        for (int i = CHANNEL_COUNT_BEGIN; i <= CHANNEL_COUNT_END; ++i) {
-            int j = (1 << android::audio_utils::kBiquadNumCoefs) - 1; // Full
-            b->Args({k, i, j});
-        }
-    }
-}
-
-static void BiquadFilterFullArgs(benchmark::internal::Benchmark* b) {
-    constexpr int CHANNEL_COUNT_BEGIN = 1;
-    constexpr int CHANNEL_COUNT_END = 4;
-    for (int k = 0; k < 2; k++) { // 0 for normal random data, 1 for subnormal random data
-        for (int i = CHANNEL_COUNT_BEGIN; i <= CHANNEL_COUNT_END; ++i) {
-            for (int j = 1; j < (1 << android::audio_utils::kBiquadNumCoefs); ++j) { // Occupancy
-                b->Args({k, i, j});
-            }
-        }
-    }
-}
-
-static void BiquadFilterDoubleArgs(benchmark::internal::Benchmark* b) {
-    constexpr int CHANNEL_COUNT_BEGIN = 1;
-    constexpr int CHANNEL_COUNT_END = 4;
-    for (int k = 0; k < 1; k++) { // 0 for normal random data, 1 for subnormal random data
-        for (int i = CHANNEL_COUNT_BEGIN; i <= CHANNEL_COUNT_END; ++i) {
-            int j = (1 << android::audio_utils::kBiquadNumCoefs) - 1; // Full
-            b->Args({k, i, j});
-        }
-    }
-}
-
-BENCHMARK(BM_BiquadFilterDoubleOptimized)->Apply(BiquadFilterDoubleArgs);
-BENCHMARK(BM_BiquadFilterDoubleNonOptimized)->Apply(BiquadFilterDoubleArgs);
-BENCHMARK(BM_BiquadFilterFloatOptimized)->Apply(BiquadFilterQuickArgs);
-BENCHMARK(BM_BiquadFilterFloatNonOptimized)->Apply(BiquadFilterQuickArgs);
-BENCHMARK(BM_BiquadFilterFloatOptimized)->Apply(BiquadFilterFullArgs);
-
-BENCHMARK_MAIN();
diff --git a/audio_utils/benchmarks/intrinsic_benchmark.cpp b/audio_utils/benchmarks/intrinsic_benchmark.cpp
deleted file mode 100644
index b5aa7bc..0000000
--- a/audio_utils/benchmarks/intrinsic_benchmark.cpp
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <array>
-#include <climits>
-#include <cstdlib>
-#include <random>
-#include <vector>
-
-#include <benchmark/benchmark.h>
-
-#include <audio_utils/intrinsic_utils.h>
-#include <audio_utils/format.h>
-
-static void BM_Intrinsic(benchmark::State& state) {
-    using D = float;
-    using namespace android::audio_utils::intrinsics;
-    constexpr size_t SIMD_LENGTH = 4;
-
-    // Possible testing types:
-    using vec = android::audio_utils::intrinsics::internal_array_t<D, SIMD_LENGTH>;
-    //using vec = float32x4_t;
-    //using vec = float32x4x4_t;
-
-    constexpr size_t DATA_SIZE = 1024;
-    D a[DATA_SIZE];
-    D b[DATA_SIZE];
-    D c[DATA_SIZE];
-    D d[DATA_SIZE];
-
-    constexpr std::minstd_rand::result_type SEED = 42; // arbitrary choice.
-    std::minstd_rand gen(SEED);
-    const D amplitude = 1.0f;
-    std::uniform_real_distribution<> dis(-amplitude, amplitude);
-    for (size_t i = 0; i < DATA_SIZE; ++i) {
-        a[i] = dis(gen);
-        b[i] = dis(gen);
-        c[i] = dis(gen);
-    }
-
-    while (state.KeepRunning()) {
-        for (size_t i = 0; i < DATA_SIZE; i += sizeof(vec) / sizeof(D)) {
-            const vec av = vld1<vec>(a + i);
-            const vec bv = vld1<vec>(b + i);
-            const vec cv = vld1<vec>(c + i);
-            const vec dv = vmla(cv, av, bv);
-            vst1(d + i, dv);
-        }
-        benchmark::DoNotOptimize(d[0]);
-        benchmark::ClobberMemory();
-    }
-    //fprintf(stderr, "%f: %f %f\n %f", d[0], c[0], a[0], b[0]);
-    state.SetComplexityN(state.range(0));
-}
-
-// A simple test using the VMLA intrinsic.
-// One can alter either the intrinsic code or the compilation flags to see the benefit.
-// Recommend using objdump to view the assembly.
-static void BM_IntrinsicArgs(benchmark::internal::Benchmark* b) {
-    for (int k = 0; k < 2; k++) // 0 for normal random data, 1 for subnormal random data
-         b->Args({k});
-}
-
-BENCHMARK(BM_Intrinsic)->Apply(BM_IntrinsicArgs);
-
-BENCHMARK_MAIN();
diff --git a/audio_utils/channels.cpp b/audio_utils/channels.c
similarity index 99%
rename from audio_utils/channels.cpp
rename to audio_utils/channels.c
index a1bdec1..6747527 100644
--- a/audio_utils/channels.cpp
+++ b/audio_utils/channels.c
@@ -490,7 +490,7 @@
                               void* out_buff, size_t out_buff_chans,
                               unsigned sample_size_in_bytes, size_t num_in_bytes)
 {
-    static const uint8x3_t packed24_zero{}; /* zero 24 bit sample */
+    static const uint8x3_t packed24_zero; /* zero 24 bit sample */
 
     switch (sample_size_in_bytes) {
     case 1:
diff --git a/audio_utils/echo_reference.c b/audio_utils/echo_reference.c
index 6a9d8cb..b86b2b5 100644
--- a/audio_utils/echo_reference.c
+++ b/audio_utils/echo_reference.c
@@ -20,7 +20,6 @@
 #include <errno.h>
 #include <inttypes.h>
 #include <pthread.h>
-#include <stddef.h>
 #include <stdlib.h>
 
 #include <log/log.h>
@@ -206,13 +205,7 @@
             ALOGV("echo_reference_write() increasing write buffer size from %zu to %zu",
                     er->wr_buf_size, wrBufSize);
             er->wr_buf_size = wrBufSize;
-            void *new_buf = realloc(er->wr_buf, er->wr_buf_size * er->rd_frame_size);
-            if (new_buf == NULL) {
-                status = -ENOMEM;
-                goto exit;
-            } else {
-                er->wr_buf = new_buf;
-            }
+            er->wr_buf = realloc(er->wr_buf, er->wr_buf_size * er->rd_frame_size);
         }
 
         if (er->rd_channel_count != er->wr_channel_count) {
@@ -260,7 +253,7 @@
             er->resampler->resample_from_provider(er->resampler,
                                                      (int16_t *)er->wr_buf, &inFrames);
             ALOGV_IF(er->wr_frames_in != 0,
-                    "echo_reference_write() er->wr_frames_in not 0 (%zu) after resampler",
+                    "echo_reference_write() er->wr_frames_in not 0 (%d) after resampler",
                     er->wr_frames_in);
         }
         srcBuf = er->wr_buf;
@@ -272,14 +265,8 @@
     if (er->frames_in + inFrames > er->buf_size) {
         ALOGV("echo_reference_write() increasing buffer size from %zu to %zu",
                 er->buf_size, er->frames_in + inFrames);
-        er->buf_size = er->frames_in + inFrames;
-        void *new_buf = realloc(er->buffer, er->buf_size * er->rd_frame_size);
-        if (new_buf == NULL) {
-            status = -ENOMEM;
-            goto exit;
-        } else {
-            er->buffer = new_buf;
-        }
+                er->buf_size = er->frames_in + inFrames;
+                er->buffer = realloc(er->buffer, er->buf_size * er->rd_frame_size);
     }
     memcpy((char *)er->buffer + er->frames_in * er->rd_frame_size,
            srcBuf,
@@ -309,7 +296,6 @@
                          struct echo_reference_buffer *buffer)
 {
     struct echo_reference *er = (struct echo_reference *)echo_reference;
-    int status = 0;
 
     if (er == NULL) {
         return -EINVAL;
@@ -359,7 +345,7 @@
 
         ALOGV_IF((er->frames_in < buffer->frame_count),
                  "echo_reference_read() waited %d ms but still not enough frames"
-                 " er->frames_in: %zu, buffer->frame_count = %zu",
+                 " er->frames_in: %d, buffer->frame_count = %d",
                  timeoutMs, er->frames_in, buffer->frame_count);
     }
 
@@ -426,15 +412,9 @@
                         // Less data available in the reference buffer than expected
                         if (er->frames_in > er->buf_size) {
                             er->buf_size = er->frames_in;
+                            er->buffer  = realloc(er->buffer, er->buf_size * er->rd_frame_size);
                             ALOGV("echo_reference_read(): increasing buffer size to %zu",
                                   er->buf_size);
-                            void *new_buf = realloc(er->buffer, er->buf_size * er->rd_frame_size);
-                            if (new_buf == NULL) {
-                                status = -ENOMEM;
-                                goto exit;
-                            } else {
-                                er->buffer = new_buf;
-                            }
                         }
 
                         if (offset > 0) {
@@ -470,14 +450,8 @@
     if (er->frames_in < buffer->frame_count) {
         if (buffer->frame_count > er->buf_size) {
             er->buf_size = buffer->frame_count;
+            er->buffer  = realloc(er->buffer, er->buf_size * er->rd_frame_size);
             ALOGV("echo_reference_read(): increasing buffer size to %zu", er->buf_size);
-            void *new_buf  = realloc(er->buffer, er->buf_size * er->rd_frame_size);
-            if (new_buf == NULL) {
-                status = -ENOMEM;
-                goto exit;
-            } else {
-                er->buffer = new_buf;
-            }
         }
         // filling up the reference buffer with 0s to match the expected delay.
         memset((char *)er->buffer + er->frames_in * er->rd_frame_size,
@@ -504,7 +478,7 @@
 
 exit:
     pthread_mutex_unlock(&er->lock);
-    return status;
+    return 0;
 }
 
 
diff --git a/audio_utils/fifo.cpp b/audio_utils/fifo.cpp
index 3e5e667..a6dd545 100644
--- a/audio_utils/fifo.cpp
+++ b/audio_utils/fifo.cpp
@@ -31,14 +31,13 @@
 #include <utils/Errors.h>
 
 audio_utils_fifo_base::audio_utils_fifo_base(uint32_t frameCount,
-        audio_utils_fifo_index& writerRear, audio_utils_fifo_index *throttleFront,
-        audio_utils_fifo_sync sync)
+        audio_utils_fifo_index& writerRear, audio_utils_fifo_index *throttleFront)
         __attribute__((no_sanitize("integer"))) :
     mFrameCount(frameCount), mFrameCountP2(roundup(frameCount)),
     mFudgeFactor(mFrameCountP2 - mFrameCount),
     // FIXME need an API to configure the sync types
-    mWriterRear(writerRear), mWriterRearSync(sync),
-    mThrottleFront(throttleFront), mThrottleFrontSync(sync),
+    mWriterRear(writerRear), mWriterRearSync(AUDIO_UTILS_FIFO_SYNC_SHARED),
+    mThrottleFront(throttleFront), mThrottleFrontSync(AUDIO_UTILS_FIFO_SYNC_SHARED),
     mIsShutdown(false)
 {
     // actual upper bound on frameCount will depend on the frame size
@@ -131,7 +130,7 @@
 audio_utils_fifo::audio_utils_fifo(uint32_t frameCount, uint32_t frameSize, void *buffer,
         audio_utils_fifo_index& writerRear, audio_utils_fifo_index *throttleFront)
         __attribute__((no_sanitize("integer"))) :
-    audio_utils_fifo_base(frameCount, writerRear, throttleFront, AUDIO_UTILS_FIFO_SYNC_SHARED),
+    audio_utils_fifo_base(frameCount, writerRear, throttleFront),
     mFrameSize(frameSize), mBuffer(buffer)
 {
     // maximum value of frameCount * frameSize is INT32_MAX (2^31 - 1), not 2^31, because we need to
@@ -141,11 +140,10 @@
 }
 
 audio_utils_fifo::audio_utils_fifo(uint32_t frameCount, uint32_t frameSize, void *buffer,
-        bool throttlesWriter, audio_utils_fifo_sync sync) :
+        bool throttlesWriter) :
     audio_utils_fifo(frameCount, frameSize, buffer, mSingleProcessSharedRear,
         throttlesWriter ?  &mSingleProcessSharedFront : NULL)
 {
-    LOG_ALWAYS_FATAL_IF(sync == AUDIO_UTILS_FIFO_SYNC_SHARED);
 }
 
 audio_utils_fifo::~audio_utils_fifo()
@@ -205,10 +203,9 @@
     size_t availToWrite;
     if (mFifo.mThrottleFront != NULL) {
         int retries = kRetries;
+        uint32_t front;
         for (;;) {
-            uint32_t front = mFifo.mThrottleFrontSync == AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED ?
-                    mFifo.mThrottleFront->loadSingleThreaded() :
-                    mFifo.mThrottleFront->loadAcquire();
+            front = mFifo.mThrottleFront->loadAcquire();
             // returns -EIO if mIsShutdown
             int32_t filled = mFifo.diff(mLocalRear, front);
             if (filled < 0) {
@@ -230,9 +227,6 @@
             //      separate from the low level code (indexes, available, masking).
             int op = FUTEX_WAIT;
             switch (mFifo.mThrottleFrontSync) {
-            case AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED:
-                err = -ENOTSUP;
-                break;
             case AUDIO_UTILS_FIFO_SYNC_SLEEP:
                 err = audio_utils_clock_nanosleep(CLOCK_MONOTONIC, 0 /*flags*/, timeout,
                         NULL /*remain*/);
@@ -317,21 +311,14 @@
             return;
         }
         if (mFifo.mThrottleFront != NULL) {
-            uint32_t front = mFifo.mThrottleFrontSync == AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED ?
-                    mFifo.mThrottleFront->loadSingleThreaded() :
-                    mFifo.mThrottleFront->loadAcquire();
+            uint32_t front = mFifo.mThrottleFront->loadAcquire();
             // returns -EIO if mIsShutdown
             int32_t filled = mFifo.diff(mLocalRear, front);
             mLocalRear = mFifo.sum(mLocalRear, count);
-            if (mFifo.mWriterRearSync == AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED) {
-                mFifo.mWriterRear.storeSingleThreaded(mLocalRear);
-            } else {
-                mFifo.mWriterRear.storeRelease(mLocalRear);
-            }
+            mFifo.mWriterRear.storeRelease(mLocalRear);
             // TODO add comments
             int op = FUTEX_WAKE;
             switch (mFifo.mWriterRearSync) {
-            case AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED:
             case AUDIO_UTILS_FIFO_SYNC_SLEEP:
                 break;
             case AUDIO_UTILS_FIFO_SYNC_PRIVATE:
@@ -359,11 +346,7 @@
             }
         } else {
             mLocalRear = mFifo.sum(mLocalRear, count);
-            if (mFifo.mWriterRearSync == AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED) {
-                mFifo.mWriterRear.storeSingleThreaded(mLocalRear);
-            } else {
-                mFifo.mWriterRear.storeRelease(mLocalRear);
-            }
+            mFifo.mWriterRear.storeRelease(mLocalRear);
         }
         mObtained -= count;
         mTotalReleased += count;
@@ -434,7 +417,7 @@
     // current value of writer's rear.  This avoids an immediate -EOVERFLOW (overrun) in the case
     // where reader starts out more than one buffer behind writer.  The initial catch-up does not
     // contribute towards the totalLost, totalFlushed, or totalReleased counters.
-    mLocalFront(throttlesWriter ? 0 : mFifo.mWriterRear.loadAcquire()),
+    mLocalFront(throttlesWriter ? 0 : mFifo.mWriterRear.loadConsume()),
 
     mThrottleFront(throttlesWriter ? mFifo.mThrottleFront : NULL),
     mFlush(flush),
@@ -486,20 +469,14 @@
             return;
         }
         if (mThrottleFront != NULL) {
-            uint32_t rear = mFifo.mWriterRearSync == AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED ?
-                    mFifo.mWriterRear.loadSingleThreaded() : mFifo.mWriterRear.loadAcquire();
+            uint32_t rear = mFifo.mWriterRear.loadAcquire();
             // returns -EIO if mIsShutdown
             int32_t filled = mFifo.diff(rear, mLocalFront);
             mLocalFront = mFifo.sum(mLocalFront, count);
-            if (mFifo.mThrottleFrontSync == AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED) {
-                mThrottleFront->storeSingleThreaded(mLocalFront);
-            } else {
-                mThrottleFront->storeRelease(mLocalFront);
-            }
+            mThrottleFront->storeRelease(mLocalFront);
             // TODO add comments
             int op = FUTEX_WAKE;
             switch (mFifo.mThrottleFrontSync) {
-            case AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED:
             case AUDIO_UTILS_FIFO_SYNC_SLEEP:
                 break;
             case AUDIO_UTILS_FIFO_SYNC_PRIVATE:
@@ -542,8 +519,7 @@
     int retries = kRetries;
     uint32_t rear;
     for (;;) {
-        rear = mFifo.mWriterRearSync == AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED ?
-                mFifo.mWriterRear.loadSingleThreaded() : mFifo.mWriterRear.loadAcquire();
+        rear = mFifo.mWriterRear.loadAcquire();
         // TODO pull out "count == 0"
         if (count == 0 || rear != mLocalFront || timeout == NULL ||
                 (timeout->tv_sec == 0 && timeout->tv_nsec == 0)) {
@@ -552,9 +528,6 @@
         // TODO add comments
         int op = FUTEX_WAIT;
         switch (mFifo.mWriterRearSync) {
-        case AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED:
-            err = -ENOTSUP;
-            break;
         case AUDIO_UTILS_FIFO_SYNC_SLEEP:
             err = audio_utils_clock_nanosleep(CLOCK_MONOTONIC, 0 /*flags*/, timeout,
                     NULL /*remain*/);
diff --git a/audio_utils/fifo_index.cpp b/audio_utils/fifo_index.cpp
index 06deb36..54d9d3e 100644
--- a/audio_utils/fifo_index.cpp
+++ b/audio_utils/fifo_index.cpp
@@ -22,25 +22,12 @@
 // These are not implemented within <audio_utils/fifo_index.h>
 // so that we don't expose futex.
 
-// FIXME should inline these, so that writer_T can also inline it
-
-uint32_t audio_utils_fifo_index::loadSingleThreaded()
-{
-    // TODO Should be a read from simple non-atomic variable
-    return atomic_load_explicit(&mIndex, std::memory_order_relaxed);
-}
-
 uint32_t audio_utils_fifo_index::loadAcquire()
 {
     return atomic_load_explicit(&mIndex, std::memory_order_acquire);
 }
 
-void audio_utils_fifo_index::storeSingleThreaded(uint32_t value)
-{
-    // TODO Should be a write to simple non-atomic variable
-    atomic_store_explicit(&mIndex, value, std::memory_order_relaxed);
-}
-
+// FIXME should inline this, so that writer_T can also inline it
 void audio_utils_fifo_index::storeRelease(uint32_t value)
 {
     atomic_store_explicit(&mIndex, value, std::memory_order_release);
@@ -56,9 +43,12 @@
     return sys_futex(&mIndex, op, waiters, NULL, NULL, 0);
 }
 
-// ----------------------------------------------------------------------------
+uint32_t audio_utils_fifo_index::loadConsume()
+{
+    return atomic_load_explicit(&mIndex, std::memory_order_consume);
+}
 
-#if 0   // TODO not currently used, review this code later: bug 150627616
+////
 
 RefIndexDeferredStoreReleaseDeferredWake::RefIndexDeferredStoreReleaseDeferredWake(
         audio_utils_fifo_index& index)
@@ -171,5 +161,3 @@
     invalidate();
     return err;
 }
-
-#endif  // 0
diff --git a/audio_utils/fixedfft.cpp b/audio_utils/fixedfft.cpp
index 5e7b4ec..fb2c78e 100644
--- a/audio_utils/fixedfft.cpp
+++ b/audio_utils/fixedfft.cpp
@@ -146,8 +146,7 @@
     int scale = LOG_FFT_SIZE, m = n >> 1, i;
 
     fixed_fft(n, v);
-    for (i = 1; i <= n; i <<= 1, --scale)
-        ;
+    for (i = 1; i <= n; i <<= 1, --scale);
     v[0] = mult(~v[0], 0x80008000);
     v[m] = half(v[m]);
 
diff --git a/audio_utils/format.c b/audio_utils/format.c
index c407ffd..8097800 100644
--- a/audio_utils/format.c
+++ b/audio_utils/format.c
@@ -14,14 +14,18 @@
  * limitations under the License.
  */
 
-#include <assert.h>
+/* #define LOG_NDEBUG 0 */
+#define LOG_TAG "audio_utils_format"
+
+#include <log/log.h>
+
 #include <audio_utils/format.h>
 #include <audio_utils/primitives.h>
 
 void memcpy_by_audio_format(void *dst, audio_format_t dst_format,
         const void *src, audio_format_t src_format, size_t count)
 {
-    /* default cases for error falls through to assert(false) below. */
+    /* default cases for error falls through to fatal log below. */
     if (dst_format == src_format) {
         switch (dst_format) {
         case AUDIO_FORMAT_PCM_16_BIT:
@@ -156,8 +160,8 @@
     default:
         break;
     }
-    // invalid src format for dst format
-    assert(false);
+    LOG_ALWAYS_FATAL("invalid src format %#x for dst format %#x",
+            src_format, dst_format);
 }
 
 size_t memcpy_by_index_array_initialization_from_channel_mask(int8_t *idxary, size_t arysize,
diff --git a/audio_utils/fuzz/Android.bp b/audio_utils/fuzz/Android.bp
index 06ea447..b44c296 100644
--- a/audio_utils/fuzz/Android.bp
+++ b/audio_utils/fuzz/Android.bp
@@ -1,9 +1 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 subdirs = ["*"]
diff --git a/audio_utils/fuzz/ac3framescanner_fuzzer/Android.bp b/audio_utils/fuzz/ac3framescanner_fuzzer/Android.bp
index 11bd17b..468c6e2 100644
--- a/audio_utils/fuzz/ac3framescanner_fuzzer/Android.bp
+++ b/audio_utils/fuzz/ac3framescanner_fuzzer/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_fuzz {
     name: "ac3framescanner_fuzzer",
     srcs: [
@@ -20,3 +12,4 @@
     ],
     corpus: ["corpus/*"],
 }
+
diff --git a/audio_utils/fuzz/ac3framescanner_fuzzer/ac3framescanner_fuzzer.cpp b/audio_utils/fuzz/ac3framescanner_fuzzer/ac3framescanner_fuzzer.cpp
index 124a771..28f0c28 100644
--- a/audio_utils/fuzz/ac3framescanner_fuzzer/ac3framescanner_fuzzer.cpp
+++ b/audio_utils/fuzz/ac3framescanner_fuzzer/ac3framescanner_fuzzer.cpp
@@ -18,7 +18,7 @@
 #include <stddef.h>
 #include <audio_utils/spdif/SPDIFEncoder.h>
 #include <audio_utils/format.h>
-#include <system/audio.h>
+#include <system/audio-base.h>
 
 namespace android {
 
diff --git a/audio_utils/fuzz/audioutilsfiforeaderwriter_fuzzer/Android.bp b/audio_utils/fuzz/audioutilsfiforeaderwriter_fuzzer/Android.bp
deleted file mode 100644
index 046e220..0000000
--- a/audio_utils/fuzz/audioutilsfiforeaderwriter_fuzzer/Android.bp
+++ /dev/null
@@ -1,19 +0,0 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
-cc_fuzz {
-    name: "audio_utils_fifo_writer_fuzzer",
-    srcs: [
-        "audioutilsfiforeaderwriter_fuzzer.cpp",
-    ],
-    static_libs: [
-        "libaudioutils",
-        "liblog",
-    ],
-    host_supported: true,
-}
\ No newline at end of file
diff --git a/audio_utils/fuzz/audioutilsfiforeaderwriter_fuzzer/audioutilsfiforeaderwriter_fuzzer.cpp b/audio_utils/fuzz/audioutilsfiforeaderwriter_fuzzer/audioutilsfiforeaderwriter_fuzzer.cpp
deleted file mode 100644
index 677cbb3..0000000
--- a/audio_utils/fuzz/audioutilsfiforeaderwriter_fuzzer/audioutilsfiforeaderwriter_fuzzer.cpp
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <vector>
-#include <audio_utils/sndfile.h>
-#include <audio_utils/fifo.h>
-#include <fuzzer/FuzzedDataProvider.h>
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size){
-    if (data == nullptr || size < 6) {
-        return 0;
-    }
-
-    FuzzedDataProvider provider(data, size);
-
-    const bool throttleRead = provider.ConsumeBool();
-    const size_t frameSize = provider.ConsumeIntegralInRange<size_t>(1, 128);
-
-    size_t maxNumberFrames = provider.remaining_bytes() / frameSize;
-    if (maxNumberFrames >= ((uint32_t) INT32_MAX) / frameSize) {
-        maxNumberFrames = (((uint32_t) INT32_MAX) / frameSize) - 1;
-    }
-
-    if (maxNumberFrames == 0) {
-        // FrameSize is larger than bytes passed in
-        return 0;
-    }
-
-    // Get buffer size
-    size_t bufferMaxFrameCount = provider.ConsumeIntegralInRange<size_t>(1, maxNumberFrames);
-    uint8_t* fifoBuffer = new uint8_t[bufferMaxFrameCount * frameSize];
-
-
-    // Audio_utils_fifo to be shared across reader/writer
-    audio_utils_fifo fifo(bufferMaxFrameCount, frameSize, fifoBuffer, throttleRead);
-    audio_utils_fifo_writer writer(fifo);
-    audio_utils_fifo_reader reader(fifo);
-
-    bool error = false;
-    int32_t framesWritten = 0;
-    while (provider.remaining_bytes() > 4) {
-
-        //TODO use bufferMaxFrameCount?
-        int32_t loopMaxWrite = bufferMaxFrameCount - framesWritten;
-
-        int32_t framesToWrite = provider.ConsumeIntegralInRange<int32_t>(1, loopMaxWrite);
-        size_t maxFramesLeft = provider.remaining_bytes() / frameSize;
-
-        if (framesToWrite > maxFramesLeft) {
-            framesToWrite = maxFramesLeft;
-        }
-
-        if (framesToWrite == 0) {
-            // No more data to process after consuming Integral
-            break;
-        }
-
-        std::vector<uint8_t> bytesToWrite =
-            provider.ConsumeBytes<uint8_t>(framesToWrite * frameSize);
-        ssize_t actualFramesWritten = writer.write(&bytesToWrite[0], framesToWrite);
-
-        // Verify actualFramesWritten
-        if (actualFramesWritten != framesToWrite) {
-            error = true;
-            break;
-        }
-
-        // Add count of frames just written to framesWritten
-        framesWritten += actualFramesWritten;
-
-        // Init framesToRead to read all framesWritten.
-        // If another integral can be read from provider then update
-        int32_t framesToRead = framesWritten;
-        if (provider.remaining_bytes() >= 4) {
-            framesToRead = provider.ConsumeIntegralInRange<size_t>(1, framesToRead);
-        }
-
-        uint8_t * readBuffer = new uint8_t[framesToRead * frameSize];
-        ssize_t actualFramesRead = reader.read(readBuffer, framesToRead);
-
-        // Verify framesRead
-        if (actualFramesRead != framesToRead) {
-            error = true;
-            break;
-        }
-
-        framesWritten -= framesToRead;
-
-        delete[] readBuffer;
-        readBuffer = NULL;
-    }
-
-    if (error) {
-        abort();
-    }
-
-    delete[] fifoBuffer;
-    fifoBuffer = NULL;
-
-    return 0;
-}
\ No newline at end of file
diff --git a/audio_utils/fuzz/dtsframescanner_fuzzer/Android.bp b/audio_utils/fuzz/dtsframescanner_fuzzer/Android.bp
index 59b4133..798944a 100644
--- a/audio_utils/fuzz/dtsframescanner_fuzzer/Android.bp
+++ b/audio_utils/fuzz/dtsframescanner_fuzzer/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_fuzz {
     name: "dtsframescanner_fuzzer",
     srcs: [
@@ -20,3 +12,4 @@
     ],
     corpus: ["corpus/*"],
 }
+
diff --git a/audio_utils/fuzz/dtsframescanner_fuzzer/dtsframescanner_fuzzer.cpp b/audio_utils/fuzz/dtsframescanner_fuzzer/dtsframescanner_fuzzer.cpp
index 70e93b8..e48e86b 100644
--- a/audio_utils/fuzz/dtsframescanner_fuzzer/dtsframescanner_fuzzer.cpp
+++ b/audio_utils/fuzz/dtsframescanner_fuzzer/dtsframescanner_fuzzer.cpp
@@ -18,7 +18,7 @@
 #include <stddef.h>
 #include <audio_utils/spdif/SPDIFEncoder.h>
 #include <audio_utils/format.h>
-#include <system/audio.h>
+#include <system/audio-base.h>
 
 namespace android {
 
diff --git a/audio_utils/fuzz/fdtostring_fuzzer/Android.bp b/audio_utils/fuzz/fdtostring_fuzzer/Android.bp
index 954018f..f5e4a9c 100644
--- a/audio_utils/fuzz/fdtostring_fuzzer/Android.bp
+++ b/audio_utils/fuzz/fdtostring_fuzzer/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_fuzz {
     name: "fdtostring_fuzzer",
     srcs: [
@@ -18,3 +10,4 @@
         "libutils",
     ],
 }
+
diff --git a/audio_utils/fuzz/format_fuzzer/Android.bp b/audio_utils/fuzz/format_fuzzer/Android.bp
index 67a6f32..f70a34c 100644
--- a/audio_utils/fuzz/format_fuzzer/Android.bp
+++ b/audio_utils/fuzz/format_fuzzer/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_fuzz {
     name: "format_fuzzer",
     srcs: [
@@ -16,3 +8,4 @@
         "liblog",
     ],
 }
+
diff --git a/audio_utils/fuzz/format_fuzzer/format_fuzzer.cpp b/audio_utils/fuzz/format_fuzzer/format_fuzzer.cpp
index 117820c..74c555a 100644
--- a/audio_utils/fuzz/format_fuzzer/format_fuzzer.cpp
+++ b/audio_utils/fuzz/format_fuzzer/format_fuzzer.cpp
@@ -18,7 +18,7 @@
 #include <stdint.h>
 #include <stdlib.h>
 #include <audio_utils/format.h>
-#include <system/audio.h>
+#include <system/audio-base.h>
 
 /** returns true if the format is a common source or destination format.
     memcpy_by_audio_format() allows interchange between any PCM format and the
@@ -37,7 +37,7 @@
 AUDIO_FORMAT_PCM_8_BIT, AUDIO_FORMAT_PCM_24_BIT_PACKED, AUDIO_FORMAT_PCM_32_BIT,
 AUDIO_FORMAT_PCM_8_24_BIT};
 
-// Initialize PCM 16 bit ramp for basic data validation (generated from PCM 8 bit data).
+// Initialize PCM 16 bit ramp for basic data sanity check (generated from PCM 8 bit data).
 template<size_t size>
 static void fillBuffer(const uint8_t bytes[], int16_t(&buffer)[size], size_t input_size)
 {
diff --git a/audio_utils/fuzz/metadata_fuzzer/Android.bp b/audio_utils/fuzz/metadata_fuzzer/Android.bp
index 6b1cff7..d5af559 100644
--- a/audio_utils/fuzz/metadata_fuzzer/Android.bp
+++ b/audio_utils/fuzz/metadata_fuzzer/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_fuzz {
     name: "metadata_fuzzer",
     srcs: [
@@ -18,3 +10,4 @@
         "liblog",
     ],
 }
+
diff --git a/audio_utils/fuzz/monoblend_fuzzer/Android.bp b/audio_utils/fuzz/monoblend_fuzzer/Android.bp
deleted file mode 100644
index 2fc7ad0..0000000
--- a/audio_utils/fuzz/monoblend_fuzzer/Android.bp
+++ /dev/null
@@ -1,25 +0,0 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
-cc_fuzz {
-    name: "monoblend_fuzzer",
-    srcs: [
-        "monoblend_fuzzer.cpp",
-    ],
-    static_libs: [
-        "libaudioutils",
-        "liblog",
-    ],
-    sanitize: {
-        misc_undefined: [
-            "bounds",
-            "signed-integer-overflow",
-            "unsigned-integer-overflow",
-        ],
-    },
-}
diff --git a/audio_utils/fuzz/monoblend_fuzzer/monoblend_fuzzer.cpp b/audio_utils/fuzz/monoblend_fuzzer/monoblend_fuzzer.cpp
deleted file mode 100644
index ec696b6..0000000
--- a/audio_utils/fuzz/monoblend_fuzzer/monoblend_fuzzer.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-#include <stdlib.h>
-#include <stddef.h>
-#include <stdint.h>
-#include <algorithm>
-#include <audio_utils/limiter.h>
-#include <system/audio.h>
-#include <audio_utils/mono_blend.h>
-#include <fuzzer/FuzzedDataProvider.h>
-
-audio_format_t decideFormat(uint32_t num) {
-
- switch (num % 3) {
-    case 0:
-      return AUDIO_FORMAT_PCM_16_BIT; //  1st switch case in mono_blend()
-    case 1:
-      return AUDIO_FORMAT_PCM_FLOAT;  //  2nd switch case in mono_blend()
-    default:
-      return (audio_format_t) num;  //  default switch case in mono_blend()
- }
-
-}
-
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
-
-  /* Minimum size == 9 bytes
-   * 4 bytes: uint32_t audio_format_t
-   * 4 bytes: uint32_t channelCount
-   * 1 byte : bool limit
-   * Extra  : float *buf
-   */
-
-  if (data == nullptr || size < 9) {
-    return 0;
-  }
-
-  FuzzedDataProvider fuzzed_data(data, size);
-
-  // calculate size of buffer in floats
-  size_t samples = (size - 9) / sizeof(float);
-
-  // initialize the 5 parameters
-  float *buf = (float *) malloc(samples * sizeof(float));
-  audio_format_t format = decideFormat(fuzzed_data.ConsumeIntegral<uint32_t>());
-  size_t channelCount = samples / std::max(fuzzed_data.ConsumeIntegral<uint32_t>(), (uint32_t)1);
-  size_t frames = samples / std::max(channelCount, (size_t)1);
-  bool limit = fuzzed_data.ConsumeBool();
-
-  // fill buffer with floats
-  for (size_t i = 0; i < frames * channelCount; ++i) {
-    buf[i] = fuzzed_data.ConsumeFloatingPoint<float>();
-  }
-
-  mono_blend((void *) buf, format, channelCount, frames, limit);
-
-  free(buf);
-  return 0;
-}
diff --git a/audio_utils/fuzz/sndfile_fuzzer/Android.bp b/audio_utils/fuzz/sndfile_fuzzer/Android.bp
deleted file mode 100644
index afb85ae..0000000
--- a/audio_utils/fuzz/sndfile_fuzzer/Android.bp
+++ /dev/null
@@ -1,29 +0,0 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
-cc_fuzz {
-    name: "sndfile_fuzzer",
-    host_supported: true,
-    srcs: [
-        "sndfile_fuzzer.cpp",
-    ],
-    static_libs: [
-        "libaudioutils",
-        "libbase",
-        "libsndfile",
-    ],
-    target: {
-        android: {
-            cflags: ["-DSNDFILE_FUZZER_DEVICE"],
-        },
-        host: {
-            cflags: ["-DSNDFILE_FUZZER_HOST"],
-        },
-    },
-    corpus: ["corpus/*"],
-}
diff --git a/audio_utils/fuzz/sndfile_fuzzer/corpus/2020_06_10_15_56_20.wav b/audio_utils/fuzz/sndfile_fuzzer/corpus/2020_06_10_15_56_20.wav
deleted file mode 100644
index d653b26..0000000
--- a/audio_utils/fuzz/sndfile_fuzzer/corpus/2020_06_10_15_56_20.wav
+++ /dev/null
Binary files differ
diff --git a/audio_utils/fuzz/sndfile_fuzzer/corpus/merged_corpus b/audio_utils/fuzz/sndfile_fuzzer/corpus/merged_corpus
deleted file mode 100644
index a27bee0..0000000
--- a/audio_utils/fuzz/sndfile_fuzzer/corpus/merged_corpus
+++ /dev/null
Binary files differ
diff --git a/audio_utils/fuzz/sndfile_fuzzer/sndfile_fuzzer.cpp b/audio_utils/fuzz/sndfile_fuzzer/sndfile_fuzzer.cpp
deleted file mode 100644
index 5a0b554..0000000
--- a/audio_utils/fuzz/sndfile_fuzzer/sndfile_fuzzer.cpp
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <fstream>
-#include <memory>
-#include <stddef.h>
-#include <stdint.h>
-#include <stdlib.h>
-#include <string.h>
-#include <string>
-#include <sys/types.h>
-#include <unistd.h>
-#include "audio_utils/sndfile.h"
-#include <android-base/scopeguard.h>
-
-#define MAX_BUFFER_SIZE 0x00005000
-#define MAX_FRAME_READ_COUNT 100
-#define MAX_FRAME_COUNT 1000
-
-#ifdef SNDFILE_FUZZER_HOST
-// the path is located in shared memory, so it can accelerate fuzzing on host
-// however, the path is not supported on device
-#define TEMP_DATA_PATH "/dev/shm/sndfile_fuzzer.tmp"
-#else
-#define TEMP_DATA_PATH "/data/local/tmp/sndfile_fuzzer.tmp"
-#endif
-
-// create a unique path so that the fuzzer can be run parallelly
-std::string getUniquePath() {
-  pid_t pid = getpid();
-  std::string unique_path = TEMP_DATA_PATH + std::to_string(pid);
-  return unique_path;
-}
-
-int parseValue(const uint8_t *src, int index, void *dst, size_t size) {
-  memcpy(dst, &src[index], size);
-  return size;
-}
-
-size_t getSizeByType(uint32_t input_format) {
-  switch (input_format) {
-  case 0: return sizeof(short);
-  case 1: return sizeof(int);
-  case 2: return sizeof(float);
-  default: return sizeof(short);
-  }
-}
-
-sf_count_t sfReadfWithType(uint32_t input_format, SNDFILE *handle,
-                           const void *ptr, sf_count_t desired) {
-  switch (input_format) {
-  case 0: return sf_readf_short(handle, (short *)ptr, desired);
-  case 1: return sf_readf_int(handle, (int *)ptr, desired);
-  case 2: return sf_readf_float(handle, (float *)ptr, desired);
-  default: return 0;
-  }
-}
-
-// the corpus of this fuzzer is generated by :
-// printf "\x01\x00\x00\x00\x01\x00\x00\x00" | \
-// cat - 2020_06_10_15_56_20.wav > merged_corpus
-extern "C" int LLVMFuzzerTestOneInput(const uint8_t *bytes, size_t size) {
-  uint32_t desired_frame_count = 1;
-  uint32_t input_format = 0;
-
-  size_t metadata_size = sizeof(desired_frame_count) + sizeof(input_format);
-  if (size < metadata_size) {
-    return 0;
-  }
-
-  int idx = 0;
-  idx +=
-      parseValue(bytes, idx, &desired_frame_count, sizeof(desired_frame_count));
-  idx += parseValue(bytes, idx, &input_format, sizeof(input_format));
-
-  desired_frame_count %= MAX_FRAME_READ_COUNT;
-  input_format %= 3;
-
-  // write bytes to a file
-  std::string path = getUniquePath();
-  std::ofstream file;
-  file.open(path.c_str(), std::ios::trunc | std::ios::binary | std::ios::out);
-  if (!file.is_open()) {
-    return 0;
-  }
-
-  file.write((char *)(bytes + idx), size - idx);
-  file.close();
-  // ensure file is unlinked after use
-  auto scope_guard =
-      android::base::make_scope_guard([path] { remove(path.c_str()); });
-
-  SF_INFO info;
-  // when format is set to zero, all other field are filled in by the lib
-  info.format = 0;
-  std::unique_ptr<SNDFILE, decltype(&sf_close)> handle(
-      sf_open(path.c_str(), SFM_READ, &info), &sf_close);
-
-  if (handle == nullptr) {
-    return 0;
-  }
-
-  // sndfile support three different data types to read regardless the original
-  // data type in file. the library handles the data conversion. The size of
-  // input is parsed from file; malloc buffer by the size is risky, but it
-  // cannot be fuzzed at this level. Here, we only ensure the read APIs does not
-  // write memory outside the buffer.
-  size_t input_size =
-      getSizeByType(input_format) * desired_frame_count * info.channels;
-
-  if (input_size > MAX_BUFFER_SIZE) {
-    return 0;
-  }
-
-  void *dst_buffer = malloc(input_size);
-  if (dst_buffer == nullptr) {
-    return 0;
-  }
-
-  sf_count_t read_frame_count = 0;
-  sf_count_t frame_count = 0;
-  do {
-    read_frame_count = sfReadfWithType(input_format, handle.get(), dst_buffer,
-                                       desired_frame_count);
-    frame_count += read_frame_count;
-  } while (read_frame_count > 0 && frame_count < MAX_FRAME_COUNT);
-  free(dst_buffer);
-
-  return 0;
-}
\ No newline at end of file
diff --git a/audio_utils/include/audio_utils/Balance.h b/audio_utils/include/audio_utils/Balance.h
index c9d95e4..a1e678d 100644
--- a/audio_utils/include/audio_utils/Balance.h
+++ b/audio_utils/include/audio_utils/Balance.h
@@ -17,10 +17,9 @@
 #ifndef ANDROID_AUDIO_UTILS_BALANCE_H
 #define ANDROID_AUDIO_UTILS_BALANCE_H
 
-#include <audio_utils/channels.h>
-#include <functional>
 #include <math.h>       /* expf */
 #include <sstream>
+#include <system/audio.h>
 #include <vector>
 
 namespace android::audio_utils {
@@ -71,13 +70,6 @@
     }
 
     /**
-     * \brief Returns whether volume change is ramped.
-     */
-    bool getRamp() const {
-        return mRamp;
-    }
-
-    /**
      * \brief Sets the channel mask for data passed in.
      *
      * setChannelMask() must called before process() to set
@@ -102,13 +94,6 @@
     void setBalance(float balance);
 
     /**
-     * \brief Returns the current balance.
-     */
-    float getBalance() const {
-        return mBalance;
-    }
-
-    /**
      * \brief Processes balance for audio data.
      *
      * setChannelMask() should be called at least once before calling process()
@@ -177,7 +162,8 @@
     audio_channel_mask_t mChannelMask = AUDIO_CHANNEL_INVALID;
     size_t mChannelCount = 0;          // from mChannelMask, 0 means no processing done.
 
-    std::vector<android::audio_utils::channels::AUDIO_GEOMETRY_SIDE> mSides;
+    std::vector<int> mSides;           // per channel, the side (0 = left, 1 = right, 2 = center)
+                                       // only used for channel position masks.
 
     // Ramping variables
     bool mRamp;                       // whether ramp is enabled.
diff --git a/audio_utils/include/audio_utils/BiquadFilter.h b/audio_utils/include/audio_utils/BiquadFilter.h
deleted file mode 100644
index c2f481b..0000000
--- a/audio_utils/include/audio_utils/BiquadFilter.h
+++ /dev/null
@@ -1,866 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_AUDIO_UTILS_BIQUAD_FILTER_H
-#define ANDROID_AUDIO_UTILS_BIQUAD_FILTER_H
-
-#include "intrinsic_utils.h"
-
-#include <array>
-#include <cmath>
-#include <functional>
-#include <utility>
-#include <vector>
-
-#include <assert.h>
-
-// We conditionally include neon optimizations for ARM devices
-#pragma push_macro("USE_NEON")
-#undef USE_NEON
-
-#if defined(__ARM_NEON__) || defined(__aarch64__)
-#include <arm_neon.h>
-#define USE_NEON
-#endif
-
-namespace android::audio_utils {
-
-static constexpr size_t kBiquadNumCoefs  = 5;
-static constexpr size_t kBiquadNumDelays = 2;
-
-namespace details {
-// Helper methods for constructing a constexpr array of function pointers.
-// As function pointers are efficient and have no constructor/destructor
-// this is preferred over std::function.
-//
-// SC stands for SAME_COEF_PER_CHANNEL, a compile time boolean constant.
-template <template <size_t, bool, typename ...> typename F, bool SC, size_t... Is>
-static inline constexpr auto make_functional_array_from_index_sequence(std::index_sequence<Is...>) {
-    using first_t = decltype(&F<0, false>::func);  // type from function
-    using result_t = std::array<first_t, sizeof...(Is)>;   // type of array
-    return result_t{{F<Is, SC>::func...}};      // initialize with functions.
-}
-
-template <template <size_t, bool, typename ...> typename F, size_t M, bool SC>
-static inline constexpr auto make_functional_array() {
-    return make_functional_array_from_index_sequence<F, SC>(std::make_index_sequence<M>());
-}
-
-// Returns true if the poles are stable for a Biquad.
-template <typename D>
-static inline constexpr bool isStable(const D& a1, const D& a2) {
-    return fabs(a2) < D(1) && fabs(a1) < D(1) + a2;
-}
-
-// Simplifies Biquad coefficients.
-// TODO: consider matched pole/zero cancellation.
-//       consider subnormal elimination for Intel processors.
-template <typename D, typename T>
-std::array<D, kBiquadNumCoefs> reduceCoefficients(const T& coef) {
-    std::array<D, kBiquadNumCoefs> lcoef;
-    if (coef.size() == kBiquadNumCoefs + 1) {
-        // General form of Biquad.
-        // Remove matched z^-1 factors in top and bottom (e.g. coefs[0] == coefs[3] == 0).
-        size_t offset = 0;
-        for (; offset < 2 && coef[offset] == 0 && coef[offset + 3] == 0; ++offset);
-        assert(coefs[offset + 3] != 0); // hmm... shouldn't we be causal?
-
-        // Normalize 6 coefficients to 5 for storage.
-        lcoef[0] = coef[offset] / coef[offset + 3];
-        for (size_t i = 1; i + offset < 3; ++i) {
-            lcoef[i] = coef[i + offset] / coef[offset + 3];
-            lcoef[i + 2] = coef[i + offset + 3] / coef[offset + 3];
-         }
-    } else if (coef.size() == kBiquadNumCoefs) {
-        std::copy(coef.begin(), coef.end(), lcoef.begin());
-    } else {
-        assert(coef.size() == kBiquadNumCoefs + 1 || coef.size() == kBiquadNumCoefs);
-    }
-    return lcoef;
-}
-
-// Sets a container of coefficients to storage.
-template <typename D, typename T, typename DEST>
-static inline void setCoefficients(
-        DEST& dest, size_t offset, size_t stride, size_t channelCount, const T& coef) {
-    auto lcoef = reduceCoefficients<D, T>(coef);
-    // replicate as needed
-    for (size_t i = 0; i < kBiquadNumCoefs; ++i) {
-        for (size_t j = 0; j < channelCount; ++j) {
-            dest[i * stride + offset + j] = lcoef[i];
-        }
-    }
-}
-
-// For biquad_filter_fast, we template based on whether coef[i] is nonzero - this should be
-// determined in a constexpr fashion for optimization.
-
-// Helper which takes a stride to allow column processing of interleaved audio streams.
-template <size_t OCCUPANCY, bool SAME_COEF_PER_CHANNEL, typename D>
-void biquad_filter_1fast(D *out, const D *in, size_t frames, size_t stride,
-                         size_t channelCount, D *delays, const D *coefs, size_t localStride) {
-#if defined(__i386__) || defined(__x86_x64__)
-    D delta = std::numeric_limits<float>::min() * (1 << 24);
-#endif
-    D b0, b1, b2, negativeA1, negativeA2;
-
-    if constexpr (SAME_COEF_PER_CHANNEL) {
-        b0 = coefs[0];
-        b1 = coefs[1];
-        b2 = coefs[2];
-        negativeA1 = -coefs[3];
-        negativeA2 = -coefs[4];
-    }
-    for (size_t i = 0; i < channelCount; ++i) {
-        if constexpr (!SAME_COEF_PER_CHANNEL) {
-            b0 = coefs[0];
-            b1 = coefs[localStride];
-            b2 = coefs[2 * localStride];
-            negativeA1 = -coefs[3 * localStride];
-            negativeA2 = -coefs[4 * localStride];
-            ++coefs;
-        }
-
-        D s1n1 = delays[0];
-        D s2n1 = delays[localStride];
-        const D *input = &in[i];
-        D *output = &out[i];
-        for (size_t j = frames; j > 0; --j) {
-            // Adding a delta to avoid subnormal exception handling on the x86/x64 platform;
-            // this is not a problem with the ARM platform. The delta will not affect the
-            // precision of the result.
-#if defined(__i386__) || defined(__x86_x64__)
-            const D xn = *input + delta;
-#else
-            const D xn = *input;
-#endif
-            D yn = (OCCUPANCY >> 0 & 1) * b0 * xn + s1n1;
-            s1n1 = (OCCUPANCY >> 1 & 1) * b1 * xn + (OCCUPANCY >> 3 & 1) * negativeA1 * yn + s2n1;
-            s2n1 = (OCCUPANCY >> 2 & 1) * b2 * xn + (OCCUPANCY >> 4 & 1) * negativeA2 * yn;
-
-            input += stride;
-
-            *output = yn;
-            output += stride;
-
-#if defined(__i386__) || defined(__x86_x64__)
-            delta = -delta;
-#endif
-        }
-        delays[0] = s1n1;
-        delays[localStride] = s2n1;
-        ++delays;
-    }
-}
-
-// Helper function to zero channels in the input buffer.
-// This is used for the degenerate coefficient case which results in all zeroes.
-template <typename D>
-void zeroChannels(D *out, size_t frames, size_t stride, size_t channelCount) {
-    if (stride == channelCount) {
-        memset(out, 0, sizeof(float) * frames * channelCount);
-    } else {
-        for (size_t i = 0; i < frames; i++) {
-            memset(out, 0, sizeof(float) * channelCount);
-            out += stride;
-        }
-    }
-}
-
-template <size_t OCCUPANCY, bool SAME_COEF_PER_CHANNEL, typename D>
-void biquad_filter_fast(D *out, const D *in, size_t frames, size_t stride,
-        size_t channelCount, D *delays, const D *coefs, size_t localStride) {
-    if constexpr ((OCCUPANCY & 7) == 0) { // all b's are zero, output is zero.
-        zeroChannels(out, frames, stride, channelCount);
-        return;
-    }
-    biquad_filter_1fast<OCCUPANCY, SAME_COEF_PER_CHANNEL>(
-            out, in, frames, stride, channelCount, delays, coefs, localStride);
-}
-
-#ifdef USE_NEON
-
-template <size_t OCCUPANCY, bool SAME_COEF_PER_CHANNEL, typename T, typename F>
-void biquad_filter_neon_impl(F *out, const F *in, size_t frames, size_t stride,
-        size_t channelCount, F *delays, const F *coefs, size_t localStride) {
-    using namespace android::audio_utils::intrinsics;
-
-    constexpr size_t elements = sizeof(T) / sizeof(F); // how many float elements in T.
-    T b0, b1, b2, negativeA1, negativeA2;
-    if constexpr (SAME_COEF_PER_CHANNEL) {
-        b0 = vdupn<T>(coefs[0]);
-        b1 = vdupn<T>(coefs[1]);
-        b2 = vdupn<T>(coefs[2]);
-        negativeA1 = vneg(vdupn<T>(coefs[3]));
-        negativeA2 = vneg(vdupn<T>(coefs[4]));
-    }
-    for (size_t i = 0; i < channelCount; i += elements) {
-        if constexpr (!SAME_COEF_PER_CHANNEL) {
-            b0 = vld1<T>(coefs);
-            b1 = vld1<T>(coefs + localStride);
-            b2 = vld1<T>(coefs + localStride * 2);
-            negativeA1 = vneg(vld1<T>(coefs + localStride * 3));
-            negativeA2 = vneg(vld1<T>(coefs + localStride * 4));
-            coefs += elements;
-        }
-        T s1 = vld1<T>(&delays[0]);
-        T s2 = vld1<T>(&delays[localStride]);
-        const F *input = &in[i];
-        F *output = &out[i];
-        for (size_t j = frames; j > 0; --j) {
-            T xn = vld1<T>(input);
-            T yn = s1;
-
-            if constexpr (OCCUPANCY >> 0 & 1) {
-                yn = vmla(yn, b0, xn);
-            }
-            s1 = s2;
-            if constexpr (OCCUPANCY >> 3 & 1) {
-                s1 = vmla(s1, negativeA1, yn);
-            }
-            if constexpr (OCCUPANCY >> 1 & 1) {
-                s1 = vmla(s1, b1, xn);
-            }
-            if constexpr (OCCUPANCY >> 2 & 1) {
-                s2 = vmul(b2, xn);
-            } else {
-                s2 = vdupn<T>(0.f);
-            }
-            if constexpr (OCCUPANCY >> 4 & 1) {
-                s2 = vmla(s2, negativeA2, yn);
-            }
-
-            input += stride;
-            vst1(output, yn);
-            output += stride;
-        }
-        vst1(&delays[0], s1);
-        vst1(&delays[localStride], s2);
-        delays += elements;
-    }
-}
-
-#define BIQUAD_FILTER_CASE(N, ... /* type */) \
-            case N: { \
-                biquad_filter_neon_impl<OCCUPANCY, SAME_COEF_PER_CHANNEL, __VA_ARGS__>( \
-                        out + offset, in + offset, frames, stride, remaining, \
-                        delays + offset, c, localStride); \
-                goto exit; \
-            }
-
-template <size_t OCCUPANCY, bool SAME_COEF_PER_CHANNEL, typename D>
-void biquad_filter_neon(D *out, const D *in, size_t frames, size_t stride,
-        size_t channelCount, D *delays, const D *coefs, size_t localStride) {
-    if constexpr ((OCCUPANCY & 7) == 0) { // all b's are zero, output is zero.
-        zeroChannels(out, frames, stride, channelCount);
-        return;
-    }
-
-    // Possible alternative intrinsic types for 2, 9, 15 float elements.
-    // using alt_2_t = struct {struct { float a; float b; } s; };
-    // using alt_9_t = struct { struct { float32x4x2_t a; float b; } s; };
-    // using alt_15_t = struct { struct { float32x4x2_t a; struct { float v[7]; } b; } s; };
-
-    for (size_t offset = 0; offset < channelCount; ) {
-        size_t remaining = channelCount - offset;
-        auto *c = SAME_COEF_PER_CHANNEL ? coefs : coefs + offset;
-        if constexpr (std::is_same_v<D, float>) {
-            switch (remaining) {
-            default:
-                if (remaining >= 16) {
-                    remaining &= ~15;
-                    biquad_filter_neon_impl<OCCUPANCY, SAME_COEF_PER_CHANNEL, float32x4x4_t>(
-                            out + offset, in + offset, frames, stride, remaining,
-                            delays + offset, c, localStride);
-                    offset += remaining;
-                    continue;
-                }
-                break;  // case 1 handled at bottom.
-            BIQUAD_FILTER_CASE(15, intrinsics::internal_array_t<float, 15>)
-            BIQUAD_FILTER_CASE(14, intrinsics::internal_array_t<float, 14>)
-            BIQUAD_FILTER_CASE(13, intrinsics::internal_array_t<float, 13>)
-            BIQUAD_FILTER_CASE(12, intrinsics::internal_array_t<float, 12>)
-            BIQUAD_FILTER_CASE(11, intrinsics::internal_array_t<float, 11>)
-            BIQUAD_FILTER_CASE(10, intrinsics::internal_array_t<float, 10>)
-            BIQUAD_FILTER_CASE(9, intrinsics::internal_array_t<float, 9>)
-            // We choose the NEON intrinsic type over internal_array for 8 to
-            // check if there is any performance difference in benchmark (should be similar).
-            // BIQUAD_FILTER_CASE(8, intrinsics::internal_array_t<float, 8>)
-            BIQUAD_FILTER_CASE(8, float32x4x2_t)
-            BIQUAD_FILTER_CASE(7, intrinsics::internal_array_t<float, 7>)
-            BIQUAD_FILTER_CASE(6, intrinsics::internal_array_t<float, 6>)
-            BIQUAD_FILTER_CASE(5, intrinsics::internal_array_t<float, 5>)
-            BIQUAD_FILTER_CASE(4, float32x4_t)
-            // We choose the NEON intrinsic type over internal_array for 4 to
-            // check if there is any performance difference in benchmark (should be similar).
-            // BIQUAD_FILTER_CASE(4, intrinsics::internal_array_t<float, 4>)
-            BIQUAD_FILTER_CASE(3, intrinsics::internal_array_t<float, 3>)
-            BIQUAD_FILTER_CASE(2, intrinsics::internal_array_t<float, 2>)
-            }
-        } else if constexpr (std::is_same_v<D, double>) {
-#if defined(__aarch64__)
-            switch (remaining) {
-            default:
-                if (remaining >= 8) {
-                    remaining &= ~7;
-                    biquad_filter_neon_impl<OCCUPANCY, SAME_COEF_PER_CHANNEL,
-                              intrinsics::internal_array_t<double, 8>>(
-                            out + offset, in + offset, frames, stride, remaining,
-                            delays + offset, c, localStride);
-                    offset += remaining;
-                    continue;
-                }
-                break; // case 1 handled at bottom.
-            BIQUAD_FILTER_CASE(7, intrinsics::internal_array_t<double, 7>)
-            BIQUAD_FILTER_CASE(6, intrinsics::internal_array_t<double, 6>)
-            BIQUAD_FILTER_CASE(5, intrinsics::internal_array_t<double, 5>)
-            BIQUAD_FILTER_CASE(4, intrinsics::internal_array_t<double, 4>)
-            BIQUAD_FILTER_CASE(3, intrinsics::internal_array_t<double, 3>)
-            BIQUAD_FILTER_CASE(2, intrinsics::internal_array_t<double, 2>)
-            };
-#endif
-        }
-        // Essentially the code below is scalar, the same as
-        // biquad_filter_1fast<OCCUPANCY, SAME_COEF_PER_CHANNEL>,
-        // but formulated with NEON intrinsic-like call pattern.
-        biquad_filter_neon_impl<OCCUPANCY, SAME_COEF_PER_CHANNEL, D>(
-                out + offset, in + offset, frames, stride, remaining,
-                delays + offset, c, localStride);
-        offset += remaining;
-    }
-    exit:;
-}
-
-#endif // USE_NEON
-
-} // namespace details
-
-/**
- * BiquadFilter
- *
- * A multichannel Biquad filter implementation of the following transfer function.
- *
- * \f[
- *  H(z) = \frac { b_0 + b_1 z^{-1} + b_2 z^{-2} }
- *               { 1   + a_1 z^{-1} + a_2 z^{-2} }
- * \f]
- *
- * <!--
- *        b_0 + b_1 z^{-1} + b_2 z^{-2}
- *  H(z)= -----------------------------
- *        1 + a_1 z^{-1} + a_2 z^{-2}
- * -->
- *
- *  Details:
- *    1. The transposed direct type 2 implementation allows zeros to be computed
- *       before poles in the internal state for improved filter precision and
- *       better time-varying coefficient performance.
- *    2. We optimize for zero coefficients using a compile-time generated function table.
- *    3. We optimize for vector operations using column vector operations with stride
- *       into interleaved audio data.
- *    4. The denominator coefficients a_1 and a_2 are stored in positive form, despite the
- *       negated form being slightly simpler for optimization (addition is commutative but
- *       subtraction is not commutative).  This is to permit obtaining the coefficients
- *       as a const reference.
- *
- *       Compatibility issue: Some Biquad libraries store the denominator coefficients
- *       in negated form.  We explicitly negate before entering into the inner loop.
- *    5. The full 6 coefficient Biquad filter form with a_0 != 1 may be used for setting
- *       coefficients.  See setCoefficients() below.
- *
- * If SAME_COEFFICIENTS_PER_CHANNEL is false, then mCoefs is stored interleaved by channel.
- *
- * The Biquad filter update equation in transposed Direct form 2 is as follows:
- *
- * \f{eqnarray*}{
- * y[n] &=& b0 * x[n] + s1[n - 1] \\
- * s1[n] &=& s2[n - 1] + b1 * x[n] - a1 * y[n] \\
- * s2[n] &=& b2 * x[n] - a2 * y[n]
- * \f}
- *
- * For the transposed Direct form 2 update equation s1 and s2 represent the delay state
- * contained in the internal vector mDelays[].  This is stored interleaved by channel.
- *
- * Use -ffast-math` to permit associative math optimizations to get non-zero optimization as
- * we do not rely on strict C operator precedence and associativity here.
- * TODO(b/159373530): Use compound statement scoped pragmas instead of `-ffast-math`.
- *
- * \param D type variable representing the data type, one of float or double.
- *         The default is float.
- * \param SAME_COEF_PER_CHANNEL bool which is true if all the Biquad coefficients
- *         are shared between channels, or false if the Biquad coefficients
- *         may differ between channels. The default is true.
- */
-template <typename D = float, bool SAME_COEF_PER_CHANNEL = true>
-class BiquadFilter {
-public:
-    template <typename T = std::array<D, kBiquadNumCoefs>>
-    explicit BiquadFilter(size_t channelCount,
-            const T& coefs = {}, bool optimized = true)
-            : mChannelCount(channelCount)
-            , mCoefs(kBiquadNumCoefs * (SAME_COEF_PER_CHANNEL ? 1 : mChannelCount))
-            , mDelays(channelCount * kBiquadNumDelays) {
-        setCoefficients(coefs, optimized);
-    }
-
-    // copy constructors
-    BiquadFilter(const BiquadFilter<D, SAME_COEF_PER_CHANNEL>& other) {
-        *this = other;
-    }
-
-    BiquadFilter(BiquadFilter<D, SAME_COEF_PER_CHANNEL>&& other) {
-        *this = std::move(other);
-    }
-
-    // copy assignment
-    BiquadFilter<D, SAME_COEF_PER_CHANNEL>& operator=(
-            const BiquadFilter<D, SAME_COEF_PER_CHANNEL>& other) {
-        mChannelCount = other.mChannelCount;
-        mCoefs = other.mCoefs;
-        mDelays = other.mDelays;
-        return *this;
-    }
-
-    BiquadFilter<D, SAME_COEF_PER_CHANNEL>& operator=(
-            BiquadFilter<D, SAME_COEF_PER_CHANNEL>&& other) {
-        mChannelCount = other.mChannelCount;
-        mCoefs = std::move(other.mCoefs);
-        mDelays = std::move(other.mDelays);
-        return *this;
-    }
-
-    // operator overloads for equality tests
-    bool operator==(const BiquadFilter<D, SAME_COEF_PER_CHANNEL>& other) const {
-        return mChannelCount == other.mChannelCount
-                && mCoefs == other.mCoefs
-                && mDelays == other.mDelays;
-    }
-
-    bool operator!=(const BiquadFilter<D, SAME_COEF_PER_CHANNEL>& other) const {
-        return !operator==(other);
-    }
-
-    /**
-     * \brief Sets filter coefficients
-     *
-     * \param coefs  pointer to the filter coefficients array.
-     * \param optimized whether to use processor optimized function (optional, defaults true).
-     * \return true if the BiquadFilter is stable, otherwise, return false.
-     *
-     * The input coefficients are interpreted in the following manner:
-     *
-     * If size of container is 5 (normalized Biquad):
-     * coefs[0] is b0,
-     * coefs[1] is b1,
-     * coefs[2] is b2,
-     * coefs[3] is a1,
-     * coefs[4] is a2.
-     *
-     * \f[
-     *  H(z) = \frac { b_0 + b_1 z^{-1} + b_2 z^{-2} }
-     *               { 1   + a_1 z^{-1} + a_2 z^{-2} }
-     * \f]
-     * <!--
-     *        b_0 + b_1 z^{-1} + b_2 z^{-2}
-     *  H(z)= -----------------------------
-     *        1 + a_1 z^{-1} + a_2 z^{-2}
-     * -->
-     *
-     * If size of container is 6 (general Biquad):
-     * coefs[0] is b0,
-     * coefs[1] is b1,
-     * coefs[2] is b2,
-     * coefs[3] is a0,
-     * coefs[4] is a1,
-     * coefs[5] is a2.
-     *
-     * \f[
-     *  H(z) = \frac { b_0 + b_1 z^{-1} + b_2 z^{-2} }
-     *               { a_0 + a_1 z^{-1} + a_2 z^{-2} }
-     * \f]
-     * <!--
-     *        b_0 + b_1 z^{-1} + b_2 z^{-2}
-     *  H(z)= -----------------------------
-     *        a_0 + a_1 z^{-1} + a_2 z^{-2}
-     * -->
-     *
-     * The internal representation is a normalized Biquad.
-     */
-    template <typename T = std::array<D, kBiquadNumCoefs>>
-    bool setCoefficients(const T& coefs, bool optimized = true) {
-        if constexpr (SAME_COEF_PER_CHANNEL) {
-            details::setCoefficients<D, T>(
-                    mCoefs, 0 /* offset */, 1 /* stride */, 1 /* channelCount */, coefs);
-        } else {
-            if (coefs.size() == mCoefs.size()) {
-                std::copy(coefs.begin(), coefs.end(), mCoefs.begin());
-            } else {
-                details::setCoefficients<D, T>(
-                        mCoefs, 0 /* offset */, mChannelCount, mChannelCount, coefs);
-            }
-        }
-        setOptimization(optimized);
-        return isStable();
-    }
-
-    /**
-     * Sets coefficients for one of the filter channels, specified by channelIndex.
-     *
-     * This method is only available if SAME_COEF_PER_CHANNEL is false.
-     *
-     * \param coefs the coefficients to set.
-     * \param channelIndex the particular channel index to set.
-     * \param optimized whether to use optimized function (optional, defaults true).
-     */
-    template <typename T = std::array<D, kBiquadNumCoefs>>
-    bool setCoefficients(const T& coefs, size_t channelIndex, bool optimized = true) {
-        static_assert(!SAME_COEF_PER_CHANNEL);
-
-        details::setCoefficients<D, T>(
-                mCoefs, channelIndex, mChannelCount, 1 /* channelCount */, coefs);
-        setOptimization(optimized);
-        return isStable();
-    }
-
-    /**
-     * Returns the coefficients as a const vector reference.
-     *
-     * If multichannel and the template variable SAME_COEF_PER_CHANNEL is true,
-     * the coefficients are interleaved by channel.
-     */
-    const std::vector<D>& getCoefficients() const {
-        return mCoefs;
-    }
-
-    /**
-     * Returns true if the filter is stable.
-     *
-     * \param channelIndex ignored if SAME_COEF_PER_CHANNEL is true,
-     *        asserts if channelIndex >= channel count (zero based index).
-     */
-    bool isStable(size_t channelIndex = 0) const {
-        if constexpr (SAME_COEF_PER_CHANNEL) {
-            return details::isStable(mCoefs[3], mCoefs[4]);
-        } else {
-            assert(channelIndex < mChannelCount);
-            return details::isStable(
-                    mCoefs[3 * mChannelCount + channelIndex],
-                    mCoefs[4 * mChannelCount + channelIndex]);
-        }
-    }
-
-    /**
-     * Updates the filter function based on processor optimization.
-     *
-     * \param optimized if true, enables Processor based optimization.
-     */
-    void setOptimization(bool optimized) {
-        // Determine which coefficients are nonzero as a bit field.
-        size_t category = 0;
-        for (size_t i = 0; i < kBiquadNumCoefs; ++i) {
-            if constexpr (SAME_COEF_PER_CHANNEL) {
-                category |= (mCoefs[i] != 0) << i;
-            } else {
-                for (size_t j = 0; j < mChannelCount; ++j) {
-                    if (mCoefs[i * mChannelCount + j] != 0) {
-                        category |= 1 << i;
-                        break;
-                    }
-                }
-            }
-        }
-
-        // Select the proper filtering function from our array.
-        (void)optimized;                // avoid unused variable warning.
-        mFunc = mFilterFast[category];  // default if we don't have processor optimization.
-
-#ifdef USE_NEON
-        /* if constexpr (std::is_same_v<D, float>) */ {
-            if (optimized) {
-                mFunc = mFilterNeon[category];
-            }
-        }
-#endif
-    }
-
-    /**
-     * \brief Filters the input data
-     *
-     * \param out     pointer to the output data
-     * \param in      pointer to the input data
-     * \param frames  number of audio frames to be processed
-     */
-    void process(D* out, const D *in, size_t frames) {
-        process(out, in, frames, mChannelCount);
-    }
-
-    /**
-     * \brief Filters the input data with stride
-     *
-     * \param out     pointer to the output data
-     * \param in      pointer to the input data
-     * \param frames  number of audio frames to be processed
-     * \param stride  the total number of samples associated with a frame, if not channelCount.
-     */
-    void process(D* out, const D *in, size_t frames, size_t stride) {
-        assert(stride >= mChannelCount);
-        mFunc(out, in, frames, stride, mChannelCount, mDelays.data(),
-                mCoefs.data(), mChannelCount);
-    }
-
-    /**
-     * EXPERIMENTAL:
-     * Processes 1D input data, with mChannel Biquads, using sliding window parallelism.
-     *
-     * Instead of considering mChannel Biquads as one-per-input channel, this method treats
-     * the mChannel biquads as applied in sequence to a single 1D input stream,
-     * with the last channel count Biquad being applied first.
-     *
-     * input audio data -> BQ_{n-1} -> BQ{n-2} -> BQ_{n-3} -> BQ_{0} -> output
-     *
-     * TODO: Make this code efficient for NEON and split the destination from the source.
-     *
-     * Theoretically this code should be much faster for 1D input if one has 4+ Biquads to be
-     * sequentially applied, but in practice it is *MUCH* slower.
-     * On NEON, the data cannot be written then read in-place without incurring
-     * memory stall penalties.  A shifting NEON holding register is required to make this
-     * a practical improvement.
-     */
-    void process1D(D* inout, size_t frames) {
-        size_t remaining = mChannelCount;
-#ifdef USE_NEON
-        // We apply NEON acceleration striped with 4 filters (channels) at once.
-        // Filters operations commute, nevertheless we apply the filters in order.
-        if (frames >= 2 * mChannelCount) {
-            constexpr size_t channelBlock = 4;
-            for (; remaining >= channelBlock; remaining -= channelBlock) {
-                const size_t baseIdx = remaining - channelBlock;
-                // This is the 1D accelerated method.
-                // prime the data pipe.
-                for (size_t i = 0; i < channelBlock - 1; ++i) {
-                    size_t fromEnd = remaining - i - 1;
-                    auto coefs = mCoefs.data() + (SAME_COEF_PER_CHANNEL ? 0 : fromEnd);
-                    auto delays = mDelays.data() + fromEnd;
-                    mFunc(inout, inout, 1 /* frames */, 1 /* stride */, i + 1,
-                            delays, coefs, mChannelCount);
-                }
-
-                auto delays = mDelays.data() + baseIdx;
-                auto coefs = mCoefs.data() + (SAME_COEF_PER_CHANNEL ? 0 : baseIdx);
-                // Parallel processing - we use a sliding window doing channelBlock at once,
-                // sliding one audio sample at a time.
-                mFunc(inout, inout,
-                        frames - channelBlock + 1, 1 /* stride */, channelBlock,
-                        delays, coefs, mChannelCount);
-
-                // drain data pipe.
-                for (size_t i = 1; i < channelBlock; ++i) {
-                    mFunc(inout + frames - channelBlock + i, inout + frames - channelBlock + i,
-                            1 /* frames */, 1 /* stride */, channelBlock - i,
-                            delays, coefs, mChannelCount);
-                }
-            }
-        }
-#endif
-        // For short data sequences, we use the serial single channel logical equivalent
-        for (; remaining > 0; --remaining) {
-            size_t fromEnd = remaining - 1;
-            auto coefs = mCoefs.data() + (SAME_COEF_PER_CHANNEL ? 0 : fromEnd);
-            mFunc(inout, inout,
-                    frames, 1 /* stride */, 1 /* channelCount */,
-                    mDelays.data() + fromEnd, coefs, mChannelCount);
-        }
-    }
-
-    /**
-     * \brief Clears the delay elements
-     *
-     * This function clears the delay elements representing the filter state.
-     */
-    void clear() {
-        std::fill(mDelays.begin(), mDelays.end(), 0.f);
-    }
-
-    /**
-     * \brief Sets the internal delays from a vector
-     *
-     * For a multichannel stream, the delays are interleaved by channel:
-     * delays[2 * i + 0] is s1 of i-th channel,
-     * delays[2 * i + 1] is s2 of i-th channel,
-     * where index i runs from 0 to (mChannelCount - 1).
-     *
-     * \param delays reference to vector containing delays.
-     */
-    void setDelays(std::vector<D>& delays) {
-        assert(delays.size() == mDelays.size());
-        mDelays = std::move(delays);
-    }
-
-    /**
-     * \brief Gets delay elements as a vector
-     *
-     * For a multichannel stream, the delays are interleaved by channel:
-     * delays[2 * i + 0] is s1 of i-th channel,
-     * delays[2 * i + 1] is s2 of i-th channel,
-     * where index i runs from 0 to (mChannelCount - 1).
-     *
-     * \return a const vector reference of delays.
-     */
-    const std::vector<D>& getDelays() const {
-        return mDelays;
-    }
-
-private:
-    /* const */ size_t mChannelCount; // not const because we can assign to it on operator equals.
-
-    /*
-     * \var D mCoefs
-     * \brief Stores the filter coefficients
-     *
-     * If SAME_COEF_PER_CHANNEL is false, the filter coefficients are stored
-     * interleaved by channel.
-     */
-    std::vector<D> mCoefs;
-
-    /**
-     * \var D mDelays
-     * \brief The delay state.
-     *
-     * The delays are stored channel interleaved in the following manner,
-     * mDelays[2 * i + 0] is s1 of i-th channel
-     * mDelays[2 * i + 1] is s2 of i-th channel
-     * index i runs from 0 to (mChannelCount - 1).
-     */
-    std::vector<D> mDelays;
-
-    using filter_func = decltype(details::biquad_filter_fast<0, true, D>);
-
-    /**
-     * \var filter_func* mFunc
-     *
-     * The current filter function selected for the channel occupancy of the Biquad.
-     */
-    filter_func *mFunc;
-
-    // Create a functional wrapper to feed "biquad_filter_fast" to
-    // make_functional_array() to populate the array.
-    //
-    // OCCUPANCY is a bitmask corresponding to the presence of nonzero Biquad coefficients
-    // b0 b1 b2 a1 a2  (from lsb to msb)
-    template <size_t OCCUPANCY, bool SC> // note SC == SAME_COEF_PER_CHANNEL
-    struct FuncWrap {
-        template<typename T>
-        static constexpr size_t nearest() {
-            // Combine cases to both improve expected performance and reduce code space.
-            // Some occupancy masks provide worse performance than more occupied masks.
-            constexpr size_t required_occupancies[] = {
-                1,  // constant scale
-                3,  // single zero
-                7,  // double zero
-                9,  // single pole
-                // 11, // first order IIR (unnecessary optimization, close enough to 31).
-                27, // double pole + single zero
-                31, // second order IIR (full Biquad)
-            };
-            if constexpr (OCCUPANCY < 32) {
-                for (auto test : required_occupancies) {
-                    if ((OCCUPANCY & test) == OCCUPANCY) return test;
-                }
-            } else {
-                static_assert(intrinsics::dependent_false_v<T>);
-            }
-            return 0; // never gets here.
-        }
-
-        static void func(D* out, const D *in, size_t frames, size_t stride,
-                size_t channelCount, D *delays, const D *coef, size_t localStride) {
-            constexpr size_t NEAREST_OCCUPANCY = nearest<D>();
-            details::biquad_filter_fast<NEAREST_OCCUPANCY, SC>(
-                    out, in, frames, stride, channelCount, delays, coef, localStride);
-        }
-    };
-
-    /**
-     * \var mFilterFast
-     *
-     * std::array of functions based on coefficient occupancy.
-     *
-     *  static inline constexpr std::array<filter_func*, M> mArray = {
-     *     biquad_filter_fast<0>,
-     *     biquad_filter_fast<1>,
-     *     biquad_filter_fast<2>,
-     *      ...
-     *     biquad_filter_fast<(1 << kBiquadNumCoefs) - 1>,
-     *  };
-     *
-     * Every time the coefficients are changed, we select the processing function from
-     * this table.
-     */
-    static inline constexpr auto mFilterFast =
-            details::make_functional_array<
-                    FuncWrap, 1 << kBiquadNumCoefs, SAME_COEF_PER_CHANNEL>();
-
-#ifdef USE_NEON
-    // OCCUPANCY is a bitmask corresponding to the presence of nonzero Biquad coefficients
-    // b0 b1 b2 a1 a2  (from lsb to msb)
-
-    template <size_t OCCUPANCY, bool SC> // note SC == SAME_COEF_PER_CHANNEL
-    struct FuncWrapNeon {
-        template<typename T>
-        static constexpr size_t nearest() {
-            // combine cases to both improve expected performance and reduce code space.
-            //
-            // This lists the occupancies we will specialize functions for.
-            constexpr size_t required_occupancies[] = {
-                1,  // constant scale
-                3,  // single zero
-                7,  // double zero
-                9,  // single pole
-                11, // first order IIR
-                27, // double pole + single zero
-                31, // second order IIR (full Biquad)
-            };
-            if constexpr (OCCUPANCY < 32) {
-                for (auto test : required_occupancies) {
-                    if ((OCCUPANCY & test) == OCCUPANCY) return test;
-                }
-            } else {
-                static_assert(intrinsics::dependent_false_v<T>);
-            }
-            return 0; // never gets here.
-        }
-
-        static void func(D* out, const D *in, size_t frames, size_t stride,
-                size_t channelCount, D *delays, const D *coef, size_t localStride) {
-            constexpr size_t NEAREST_OCCUPANCY = nearest<D>();
-            details::biquad_filter_neon<NEAREST_OCCUPANCY, SC>(
-                    out, in, frames, stride, channelCount, delays, coef, localStride);
-        }
-    };
-
-    // Neon optimized array of functions.
-    static inline constexpr auto mFilterNeon =
-            details::make_functional_array<
-                    FuncWrapNeon, 1 << kBiquadNumCoefs, SAME_COEF_PER_CHANNEL>();
-#endif // USE_NEON
-
-};
-
-} // namespace android::audio_utils
-
-#pragma pop_macro("USE_NEON")
-
-#endif  // !ANDROID_AUDIO_UTILS_BIQUAD_FILTER_H
diff --git a/audio_utils/include/audio_utils/Histogram.h b/audio_utils/include/audio_utils/Histogram.h
index b88263c..b33b2cd 100644
--- a/audio_utils/include/audio_utils/Histogram.h
+++ b/audio_utils/include/audio_utils/Histogram.h
@@ -40,8 +40,7 @@
     void add(int32_t value) {
         int32_t binIndex = (value + mBinWidth) / mBinWidth;
         binIndex = std::max(binIndex, 0); // put values below range in bottom bin
-        binIndex = std::min(binIndex, (int32_t)mBins.size() - 1);
-                                          // put values below range in top bin
+        binIndex = std::min(binIndex, (int32_t)mBins.size() - 1);  // put values below range in top bin
         mBins[binIndex]++;
         mLastItemNumbers[binIndex] = mItemCount++;
     }
@@ -118,9 +117,9 @@
             result << "below range = " << count << std::endl;
         }
         result << "index, start, count, last" << std::endl;
-        for (size_t i = 1; i < mBins.size() - 1; i++) {
+        for (int32_t i = 1; i < mBins.size() - 1; i++) {
             if (mBins[i] > 0) {
-                size_t properIndex = i - 1;
+                int32_t properIndex = i - 1;
                 result << properIndex;
                 result << ", "<< (properIndex * mBinWidth);
                 result << ", " << mBins[i];
diff --git a/audio_utils/include/audio_utils/LinearMap.h b/audio_utils/include/audio_utils/LinearMap.h
index 9151931..2220a0c 100644
--- a/audio_utils/include/audio_utils/LinearMap.h
+++ b/audio_utils/include/audio_utils/LinearMap.h
@@ -307,7 +307,7 @@
             return startValue;  // nothing yet
         }
         ssize_t previous = 0;
-        int64_t diff = 0;
+        int32_t diff = 0;
         for (ssize_t i = 0; i < (ssize_t)mSamples; ++i) {
             size_t current = previousPosition(i);
 
@@ -333,7 +333,7 @@
                 T u = uStep <= 0 || vStep <= 0 ?  // we do not permit negative ustep or vstep
                         uArray[current]
                       : ((int64_t)diff * uStep + (vStep >> 1)) / vStep + uArray[current];
-                // ALOGD("u:%u  diff:%lld  uStep:%d  vStep:%d  u_current:%d",
+                // ALOGD("u:%u  diff:%d  uStep:%d  vStep:%d  u_current:%d",
                 //         u, diff, uStep, vStep, uArray[current]);
                 if (method != NULL) {
                     *method = (diff >= 0) ?
diff --git a/audio_utils/include/audio_utils/Metadata.h b/audio_utils/include/audio_utils/Metadata.h
index 2f1edb3..c872491 100644
--- a/audio_utils/include/audio_utils/Metadata.h
+++ b/audio_utils/include/audio_utils/Metadata.h
@@ -17,10 +17,6 @@
 #ifndef ANDROID_AUDIO_METADATA_H
 #define ANDROID_AUDIO_METADATA_H
 
-#include <stdint.h>
-#include <sys/cdefs.h>
-#include <unistd.h>
-
 #ifdef __cplusplus
 
 #include <any>
@@ -193,8 +189,7 @@
 
     // helper base class
     template <typename F, typename A>
-    static bool apply_impl(F f __attribute__((unused)), A *a __attribute__((unused)),
-            std::any *result __attribute__((unused))) {
+    static bool apply_impl(F f __unused, A *a __unused, std::any *result __unused) {
         return false;
     }
 };
@@ -651,11 +646,7 @@
     }
 }
 
-// TODO Consider moving to .cpp, but one advantage of keeping in the header
-// is that C++ invocations don't need to link with the shared library.
-
 // Datum
-inline
 bool copyToByteString(const Datum& datum, ByteString &bs) {
     bool success = false;
     return metadata_types::apply([&bs, &success](auto ptr) {
@@ -705,7 +696,7 @@
         bool
         >
 copyFromByteString(T *dest, const ByteString& bs, size_t& idx,
-        ByteStringUnknowns *unknowns __attribute__((unused))) {
+        ByteStringUnknowns *unknowns __unused) {
     if (idx + sizeof(T) > bs.size()) return false;
     bs.copy((uint8_t*)dest, sizeof(T), idx);
     idx += sizeof(T);
@@ -848,9 +839,6 @@
 
 } // namespace tedious_details
 
-// TODO Ditto about moving to .cpp.
-
-inline
 bool copyFromByteString(Datum *datum, const ByteString &bs, size_t& idx,
         ByteStringUnknowns *unknowns) {
     type_size_t type;
@@ -887,7 +875,6 @@
  * encountered during parsing, and a partial map will be returned excluding all
  * unknown types encountered.
  */
-inline
 Data dataFromByteString(const ByteString &bs,
         ByteStringUnknowns *unknowns = nullptr) {
     Data d;
@@ -898,50 +885,12 @@
     return d; // copy elision
 }
 
-inline
 ByteString byteStringFromData(const Data &data) {
     ByteString bs;
     copyToByteString(data, bs);
     return bs; // copy elision
 }
 
-/**
- * \brief Returns the length of the byte string buffer from the raw pointer.
- *
- * The raw pointer comes from the Data object's ByteString.data()
- * or from the C API byte_string_from_audio_metadata().
- * This is a helper method for C implementations which may pass the raw
- * byte string buffer pointer (which does not directly contain the length).
- * C++ methods should always use the ByteString object.
- *
- * \param byteString       byte string buffer raw pointer.
- * \return size in bytes of metadata in the buffer or 0 if something went wrong.
- */
-
-inline size_t dataByteStringLen(const uint8_t *ptr) {
-    index_size_t elements;
-    const uint8_t * const origPtr = ptr;
-    memcpy(&elements, ptr, sizeof(elements));
-    ptr += sizeof(elements);
-    for (index_size_t i = 0; i < elements; ++i) {
-        // get key (string)
-        index_size_t keyLen;
-        memcpy(&keyLen, ptr, sizeof(keyLen));
-        ptr += keyLen + sizeof(keyLen);
-        // get type
-        type_size_t type;
-        memcpy(&type, ptr, sizeof(type));
-        ptr += sizeof(type_size_t);
-        // Note: could check type validity.
-        // payload size
-        datum_size_t datumSize;
-        memcpy(&datumSize, ptr, sizeof(datumSize));
-        ptr += datumSize + sizeof(datumSize);
-    }
-    const ptrdiff_t size = ptr - origPtr;
-    return size < 0 ? 0 : size;
-}
-
 } // namespace android::audio_utils::metadata
 
 #endif // __cplusplus
@@ -954,10 +903,6 @@
 
 typedef struct audio_metadata_t audio_metadata_t;
 
-// Used by audio_metadata_put_unknown() and audio_metadata_get_unknown(), but not part of public API
-// The name and data structure representation discourage accidental use.
-typedef struct { char c; } audio_metadata_unknown_t;
-
 /**
  * \brief Creates a metadata object
  *
@@ -1033,34 +978,26 @@
 int audio_metadata_put_data(audio_metadata_t *metadata, const char *key, audio_metadata_t *value);
 
 /**
- * \brief Declared but not implemented, as any potential caller won't supply a correct value.
+ * \brief The type is not allowed in audio metadata. Only log the key and return -EINVAL here.
  */
-int audio_metadata_put_unknown(audio_metadata_t *metadata, const char *key,
-        audio_metadata_unknown_t value);
-
-#ifndef __cplusplus // Only C11 has _Generic; C++ uses overloaded declarations instead
+int audio_metadata_put_unknown(audio_metadata_t *metadata, const char *key, const void *value);
 
 // use C Generics to provide interfaces for put/get functions
 // See: https://en.cppreference.com/w/c/language/generic
 
 /**
  * A generic interface to put key value pair into the audio metadata.
- * Fails at compile-time if type isn't supported.
  */
 #define audio_metadata_put(metadata, key, value) _Generic((value), \
     int32_t: audio_metadata_put_int32,                             \
     int64_t: audio_metadata_put_int64,                             \
     float: audio_metadata_put_float,                               \
     double: audio_metadata_put_double,                             \
-    /* https://stackoverflow.com/questions/18857056/c11-generic-how-to-deal-with-string-literals */ \
     const char*: audio_metadata_put_string,                        \
-    char*: audio_metadata_put_string,                              \
     audio_metadata_t*: audio_metadata_put_data,                    \
     default: audio_metadata_put_unknown                            \
     )(metadata, key, value)
 
-#endif  // !__cplusplus
-
 /**
  * \brief Get mapped value whose type is int32_t by a given key from audio metadata.
  *
@@ -1144,17 +1081,13 @@
 int audio_metadata_get_data(audio_metadata_t *metadata, const char *key, audio_metadata_t **value);
 
 /**
- * \brief Declared but not implemented, as any potential caller won't supply a correct value.
+ * \brief The data type is not allowed in audio metadata. Only log the key and return -EINVAL here.
  */
-int audio_metadata_get_unknown(audio_metadata_t *metadata, const char *key,
-        audio_metadata_unknown_t *value);
-
-#ifndef __cplusplus // Only C11 has _Generic; C++ uses overloaded declarations instead
+int audio_metadata_get_unknown(audio_metadata_t *metadata, const char *key, void *value);
 
 /**
  * A generic interface to get mapped value by a given key from audio metadata. The value object
  * will remain the same if the key is not found in the audio metadata.
- * Fails at compile-time if type isn't supported.
  */
 #define audio_metadata_get(metadata, key, value) _Generic((value), \
     int32_t*: audio_metadata_get_int32,                            \
@@ -1166,8 +1099,6 @@
     default: audio_metadata_get_unknown                            \
     )(metadata, key, value)
 
-#endif  // !__cplusplus
-
 /**
  * \brief Remove item from audio metadata.
  *
@@ -1206,98 +1137,8 @@
  */
 ssize_t byte_string_from_audio_metadata(audio_metadata_t *metadata, uint8_t **byteString);
 
-/**
- * \brief Return the size in bytes of the metadata byte string
- *
- * Note: strlen() cannot be used as there are embedded 0's in the byte string.
- *
- * \param byteString       a valid byte string buffer from byte_string_from_audio_metadata().
- * \return size in bytes of metadata in the buffer or 0 if something went wrong.
- */
-size_t audio_metadata_byte_string_len(const uint8_t *byteString);
-
 /** \cond */
 __END_DECLS
 /** \endcond */
 
-#ifdef __cplusplus
-
-inline
-int audio_metadata_put(audio_metadata_t *metadata, const char *key, int32_t value)
-{
-    return audio_metadata_put_int32(metadata, key, value);
-}
-
-inline
-int audio_metadata_put(audio_metadata_t *metadata, const char *key, int64_t value)
-{
-    return audio_metadata_put_int64(metadata, key, value);
-}
-
-inline
-int audio_metadata_put(audio_metadata_t *metadata, const char *key, float value)
-{
-    return audio_metadata_put_float(metadata, key, value);
-}
-
-inline
-int audio_metadata_put(audio_metadata_t *metadata, const char *key, double value)
-{
-    return audio_metadata_put_double(metadata, key, value);
-}
-
-inline
-int audio_metadata_put(audio_metadata_t *metadata, const char *key, const char *value)
-{
-    return audio_metadata_put_string(metadata, key, value);
-}
-
-inline
-int audio_metadata_put(audio_metadata_t *metadata, const char *key, audio_metadata_t *value)
-{
-    return audio_metadata_put_data(metadata, key, value);
-}
-
-// No overload for default type
-
-inline
-int audio_metadata_get(audio_metadata_t *metadata, const char *key, int32_t *value)
-{
-    return audio_metadata_get_int32(metadata, key, value);
-}
-
-inline
-int audio_metadata_get(audio_metadata_t *metadata, const char *key, int64_t *value)
-{
-    return audio_metadata_get_int64(metadata, key, value);
-}
-
-inline
-int audio_metadata_get(audio_metadata_t *metadata, const char *key, float *value)
-{
-    return audio_metadata_get_float(metadata, key, value);
-}
-
-inline
-int audio_metadata_get(audio_metadata_t *metadata, const char *key, double *value)
-{
-    return audio_metadata_get_double(metadata, key, value);
-}
-
-inline
-int audio_metadata_get(audio_metadata_t *metadata, const char *key, char **value)
-{
-    return audio_metadata_get_string(metadata, key, value);
-}
-
-inline
-int audio_metadata_get(audio_metadata_t *metadata, const char *key, audio_metadata_t **value)
-{
-    return audio_metadata_get_data(metadata, key, value);
-}
-
-// No overload for default type
-
-#endif  // __cplusplus
-
 #endif // !ANDROID_AUDIO_METADATA_H
diff --git a/audio_utils/include/audio_utils/PowerLog.h b/audio_utils/include/audio_utils/PowerLog.h
index 6d82c99..8ff766b 100644
--- a/audio_utils/include/audio_utils/PowerLog.h
+++ b/audio_utils/include/audio_utils/PowerLog.h
@@ -71,12 +71,10 @@
      *
      * \param lines             maximum number of lines to output (0 disables).
      * \param limitNs           limit dump to data more recent than limitNs (0 disables).
-     * \param logPlot           true if a log plot is generated. This will result in
-     *                          additional 18 lines to be output.
      * \return the std::string for the log.
      */
-    std::string dumpToString(const char *prefix = "", size_t lines = 0, int64_t limitNs = 0,
-            bool logPlot = true) const;
+    std::string dumpToString(
+            const char *prefix = "", size_t lines = 0, int64_t limitNs = 0) const;
 
     /**
      * \brief Dumps the log to a raw file descriptor.
@@ -84,13 +82,10 @@
      * \param fd                file descriptor to use.
      * \param lines             maximum number of lines to output (0 disables).
      * \param limitNs           limit dump to data more recent than limitNs (0 disables).
-     * \param logPlot           true if a log plot is generated. This will result in
-     *                          additional 18 lines to be output.
      * \return
      *   NO_ERROR on success or a negative number (-errno) on failure of write().
      */
-    status_t dump(int fd, const char *prefix = "", size_t lines = 0, int64_t limitNs = 0,
-            bool logPlot = true) const;
+    status_t dump(int fd, const char *prefix = "", size_t lines = 0, int64_t limitNs = 0) const;
 
 private:
     mutable std::mutex mLock;     // monitor mutex
@@ -146,8 +141,6 @@
 /**
  * \brief Dumps the log to a raw file descriptor.
  *
- * A log plot is always generated, adding 18 more lines to the dump.
- *
  * \param power_log         object returned by create, if NULL nothing happens.
  * \param fd                file descriptor to use.
  * \param prefix            displayed at start of each line.
diff --git a/audio_utils/include/audio_utils/TimestampVerifier.h b/audio_utils/include/audio_utils/TimestampVerifier.h
index ed27cac..d453855 100644
--- a/audio_utils/include/audio_utils/TimestampVerifier.h
+++ b/audio_utils/include/audio_utils/TimestampVerifier.h
@@ -64,13 +64,6 @@
            ++mNotReady;
            return;
         }
-
-        // Reject timestamp if identical to last
-        if (mLastTimestamp.mFrames == frames && mLastTimestamp.mTimeNs == timeNs
-                && mSampleRate == sampleRate) {
-            return;
-        }
-
         if (mDiscontinuity || mSampleRate != sampleRate) {
             // ALOGD("disc:%d frames:%lld timeNs:%lld",
             //         mDiscontinuity, (long long)frames, (long long)timeNs);
@@ -159,12 +152,6 @@
         ++mTimestamps;
     }
 
-    // How a discontinuity affects frame position.
-    enum DiscontinuityMode : int32_t {
-        DISCONTINUITY_MODE_CONTINUOUS, // frame position is unaffected.
-        DISCONTINUITY_MODE_ZERO,       // frame position resets to zero.
-    };
-
     /** registers a discontinuity.
      *
      * The next timestamp added does not participate in any statistics with the last
@@ -172,19 +159,10 @@
      *
      * Consecutive discontinuities are treated as one for the purposes of counting.
      */
-    constexpr void discontinuity(DiscontinuityMode mode) {
-        assert(mode == DISCONTINUITY_MODE_CONTINUOUS || mode == DISCONTINUITY_MODE_ZERO);
-
-        // If there is a pending ZERO discontinuity, do not override with CONTINUOUS
-        if (mode == DISCONTINUITY_MODE_CONTINUOUS && mDiscontinuityMode == DISCONTINUITY_MODE_ZERO
-                && mDiscontinuity) {
-            return;
-        }
-
-        if (mode != mDiscontinuityMode || !mDiscontinuity) {
+    constexpr void discontinuity() {
+        if (!mDiscontinuity) {
             // ALOGD("discontinuity");
             mDiscontinuity = true;
-            mDiscontinuityMode = mode;
             mCold = true;
             ++mDiscontinuities;
         }
@@ -199,6 +177,18 @@
         ++mErrors;
     }
 
+    // How a discontinuity affects frame position.
+    enum DiscontinuityMode : int32_t {
+        DISCONTINUITY_MODE_CONTINUOUS, // frame position is unaffected.
+        DISCONTINUITY_MODE_ZERO,       // frame position resets to zero.
+    };
+
+    constexpr void setDiscontinuityMode(DiscontinuityMode mode) {
+        assert(mode == DISCONTINUITY_MODE_CONTINUOUS
+                || mode == DISCONTINUITY_MODE_ZERO);
+        mDiscontinuityMode = mode;
+    }
+
     constexpr DiscontinuityMode getDiscontinuityMode() const {
         return mDiscontinuityMode;
     }
diff --git a/audio_utils/include/audio_utils/channels.h b/audio_utils/include/audio_utils/channels.h
index 067345b..d710dca 100644
--- a/audio_utils/include/audio_utils/channels.h
+++ b/audio_utils/include/audio_utils/channels.h
@@ -17,230 +17,6 @@
 #ifndef ANDROID_AUDIO_CHANNELS_H
 #define ANDROID_AUDIO_CHANNELS_H
 
-#include <system/audio.h>
-
-#ifdef __cplusplus
-
-// New development in channels namespace.
-namespace android::audio_utils::channels {
-
-/**
- * Returns a particular side (left, right, center) associated
- * with a channel position mask bit index.
- * This is a fixed geometrical constant for a given channel mask.
- *
- * For the channel mask spec, see system/media/audio/include/system/audio*.h.
- *
- * Special Note: if there are two LFE speakers and bass management is used,
- * then AUDIO_CHANNEL_OUT_LOW_FREQUENCY speaker is on the left side and receives
- * all bass from left side speakers that they cannot reproduce,
- * likewise AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2 is used for the right side
- * (https://www.itu.int/dms_pub/itu-r/opb/rep/R-REP-BS.2159-4-2012-PDF-E.pdf#page=15).
- *
- * For simplicity, both AUDIO_CHANNEL_OUT_LOW_FREQUENCY and
- * AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2 are assigned to the center channel,
- * which is a safe approximation given the lack of directionality of LFE.
- * Specific handling for the presence of two LFE speakers must be handled
- * elsewhere.
- *
- * \param idx index of bit in the channel position mask.
- * \return    side constant.
- */
-enum AUDIO_GEOMETRY_SIDE {
-    AUDIO_GEOMETRY_SIDE_LEFT,
-    AUDIO_GEOMETRY_SIDE_CENTER,
-    AUDIO_GEOMETRY_SIDE_RIGHT,
-};
-// static constexpr arrays cannot be declared in block scope.
-// inline allows multiple definition, single object address.
-constexpr inline AUDIO_GEOMETRY_SIDE kSideFromChannelIdx[] = {
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_FRONT_LEFT            = 0x1u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_FRONT_RIGHT           = 0x2u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_FRONT_CENTER          = 0x4u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_LOW_FREQUENCY         = 0x8u,
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_BACK_LEFT             = 0x10u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_BACK_RIGHT            = 0x20u,
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER  = 0x40u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_BACK_CENTER           = 0x100u,
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_SIDE_LEFT             = 0x200u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_SIDE_RIGHT            = 0x400u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_TOP_CENTER            = 0x800u,
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT        = 0x1000u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER      = 0x2000u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT       = 0x4000u,
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_TOP_BACK_LEFT         = 0x8000u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_TOP_BACK_CENTER       = 0x10000u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT        = 0x20000u,
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT         = 0x40000u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT        = 0x80000u,
-    AUDIO_GEOMETRY_SIDE_LEFT,   // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_LEFT     = 0x100000u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_CENTER   = 0x200000u,
-    AUDIO_GEOMETRY_SIDE_RIGHT,  // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_RIGHT    = 0x400000u,
-    AUDIO_GEOMETRY_SIDE_CENTER, // AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2       = 0x800000u,
-};
-constexpr inline AUDIO_GEOMETRY_SIDE sideFromChannelIdx(size_t idx) {
-    static_assert(std::size(kSideFromChannelIdx) == FCC_24);
-    if (idx < std::size(kSideFromChannelIdx)) return kSideFromChannelIdx[idx];
-    return AUDIO_GEOMETRY_SIDE_CENTER;
-}
-
-/**
- * Returns a particular height (bottom, middle, top) associated
- * with a channel position mask bit index.
- * This is a fixed geometrical constant for a given channel mask.
- *
- * For the channel mask spec, see system/media/audio/include/system/audio*.h.
- *
- * \param idx index of bit in the channel position mask.
- * \return    height constant.
- */
-enum AUDIO_GEOMETRY_HEIGHT {
-    AUDIO_GEOMETRY_HEIGHT_BOTTOM,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE,
-    AUDIO_GEOMETRY_HEIGHT_TOP,
-};
-// static constexpr arrays cannot be declared in block scope.
-// inline allows multiple definition, single object address.
-constexpr inline AUDIO_GEOMETRY_HEIGHT kHeightFromChannelIdx [] = {
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_FRONT_LEFT            = 0x1u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_FRONT_RIGHT           = 0x2u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_FRONT_CENTER          = 0x4u,
-    AUDIO_GEOMETRY_HEIGHT_BOTTOM, // AUDIO_CHANNEL_OUT_LOW_FREQUENCY         = 0x8u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_BACK_LEFT             = 0x10u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_BACK_RIGHT            = 0x20u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER  = 0x40u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_BACK_CENTER           = 0x100u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_SIDE_LEFT             = 0x200u,
-    AUDIO_GEOMETRY_HEIGHT_MIDDLE, // AUDIO_CHANNEL_OUT_SIDE_RIGHT            = 0x400u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_CENTER            = 0x800u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT        = 0x1000u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER      = 0x2000u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT       = 0x4000u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_BACK_LEFT         = 0x8000u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_BACK_CENTER       = 0x10000u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT        = 0x20000u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT         = 0x40000u,
-    AUDIO_GEOMETRY_HEIGHT_TOP,    // AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT        = 0x80000u,
-    AUDIO_GEOMETRY_HEIGHT_BOTTOM, // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_LEFT     = 0x100000u,
-    AUDIO_GEOMETRY_HEIGHT_BOTTOM, // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_CENTER   = 0x200000u,
-    AUDIO_GEOMETRY_HEIGHT_BOTTOM, // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_RIGHT    = 0x400000u,
-    AUDIO_GEOMETRY_HEIGHT_BOTTOM, // AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2       = 0x800000u,
-};
-constexpr inline AUDIO_GEOMETRY_HEIGHT heightFromChannelIdx(size_t idx) {
-    static_assert(std::size(kHeightFromChannelIdx) == FCC_24);
-    if (idx < std::size(kHeightFromChannelIdx)) return kHeightFromChannelIdx[idx];
-    return AUDIO_GEOMETRY_HEIGHT_MIDDLE;
-}
-
-/**
- * Returns a particular depth (front, middle (aka side), back) associated
- * with a channel position mask bit index.
- * This is a fixed geometrical constant for a given channel mask.
- *
- * For the channel mask spec, see system/media/audio/include/system/audio*.h.
- *
- * \param idx index of bit in the channel position mask.
- * \return    depth constant.
- */
-enum AUDIO_GEOMETRY_DEPTH {
-    AUDIO_GEOMETRY_DEPTH_FRONT,
-    AUDIO_GEOMETRY_DEPTH_MIDDLE,
-    AUDIO_GEOMETRY_DEPTH_BACK,
-};
-// static constexpr arrays cannot be declared in block scope.
-// inline allows multiple definition, single object address.
-constexpr inline AUDIO_GEOMETRY_DEPTH kDepthFromChannelIdx[] = {
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_FRONT_LEFT            = 0x1u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_FRONT_RIGHT           = 0x2u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_FRONT_CENTER          = 0x4u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_LOW_FREQUENCY         = 0x8u,
-    AUDIO_GEOMETRY_DEPTH_BACK,   // AUDIO_CHANNEL_OUT_BACK_LEFT             = 0x10u,
-    AUDIO_GEOMETRY_DEPTH_BACK,   // AUDIO_CHANNEL_OUT_BACK_RIGHT            = 0x20u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER  = 0x40u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 0x80u,
-    AUDIO_GEOMETRY_DEPTH_BACK,   // AUDIO_CHANNEL_OUT_BACK_CENTER           = 0x100u,
-    AUDIO_GEOMETRY_DEPTH_MIDDLE, // AUDIO_CHANNEL_OUT_SIDE_LEFT             = 0x200u,
-    AUDIO_GEOMETRY_DEPTH_MIDDLE, // AUDIO_CHANNEL_OUT_SIDE_RIGHT            = 0x400u,
-    AUDIO_GEOMETRY_DEPTH_MIDDLE, // AUDIO_CHANNEL_OUT_TOP_CENTER            = 0x800u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT        = 0x1000u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER      = 0x2000u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT       = 0x4000u,
-    AUDIO_GEOMETRY_DEPTH_BACK,   // AUDIO_CHANNEL_OUT_TOP_BACK_LEFT         = 0x8000u,
-    AUDIO_GEOMETRY_DEPTH_BACK,   // AUDIO_CHANNEL_OUT_TOP_BACK_CENTER       = 0x10000u,
-    AUDIO_GEOMETRY_DEPTH_BACK,   // AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT        = 0x20000u,
-    AUDIO_GEOMETRY_DEPTH_MIDDLE, // AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT         = 0x40000u,
-    AUDIO_GEOMETRY_DEPTH_MIDDLE, // AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT        = 0x80000u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_LEFT     = 0x100000u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_CENTER   = 0x200000u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_RIGHT    = 0x400000u,
-    AUDIO_GEOMETRY_DEPTH_FRONT,  // AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2       = 0x800000u,
-};
-constexpr inline AUDIO_GEOMETRY_DEPTH depthFromChannelIdx(size_t idx) {
-    static_assert(std::size(kDepthFromChannelIdx) == FCC_24);
-    if (idx < std::size(kDepthFromChannelIdx)) return kDepthFromChannelIdx[idx];
-    return AUDIO_GEOMETRY_DEPTH_FRONT;
-}
-
-/**
- * Returns the pair channel position mask bit index as determined by
- * AUDIO_GEOMETRY_SIDE_LEFT and AUDIO_GEOMETRY_SIDE_RIGHT characteristics.
- *
- * For example a bit index of 0 (AUDIO_CHANNEL_OUT_FRONT_LEFT) returns
- * a pair bit index of 1 (AUDIO_CHANNEL_OUT_FRONT_RIGHT).
- *
- * If there is no left/right characteristic, then -1 is returned.
- * For example, a bit index of 2 (AUDIO_CHANNEL_OUT_FRONT_CENTER) returns
- * a pair bit index of -1 (doesn't exist).
- *
- * For the channel mask spec, see system/media/audio/include/system/audio*.h.
- *
- * \param idx index of bit in the channel position mask.
- * \return    index of bit of the pair if non-negative, or -1 if it doesn't exist.
- */
-
-#pragma push_macro("CHANNEL_ASSOCIATE")
-#undef CHANNEL_ASSOCIATE
-#define CHANNEL_ASSOCIATE(x, y) \
- [__builtin_ctz(x)] = __builtin_ctz(y), [__builtin_ctz(y)] = __builtin_ctz(x),
-
-#pragma GCC diagnostic push
-#pragma GCC diagnostic ignored "-Winitializer-overrides"  // we use override array assignment
-
-constexpr inline int kPairIdxFromChannelIdx[FCC_24] = {
-    [ 0 ... 23 ] = -1,  // everything defaults to -1 unless overridden below.
-    CHANNEL_ASSOCIATE(AUDIO_CHANNEL_OUT_FRONT_LEFT, AUDIO_CHANNEL_OUT_FRONT_RIGHT)
-    // AUDIO_CHANNEL_OUT_FRONT_CENTER          = 0x4u,
-    // AUDIO_CHANNEL_OUT_LOW_FREQUENCY         = 0x8u,
-    CHANNEL_ASSOCIATE(AUDIO_CHANNEL_OUT_BACK_LEFT, AUDIO_CHANNEL_OUT_BACK_RIGHT)
-    CHANNEL_ASSOCIATE(
-            AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER, AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER)
-    // AUDIO_CHANNEL_OUT_BACK_CENTER           = 0x100u,
-    CHANNEL_ASSOCIATE(AUDIO_CHANNEL_OUT_SIDE_LEFT, AUDIO_CHANNEL_OUT_SIDE_RIGHT)
-    // AUDIO_CHANNEL_OUT_TOP_CENTER            = 0x800u,
-    CHANNEL_ASSOCIATE(AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT, AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT)
-    // AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER      = 0x2000u,
-    CHANNEL_ASSOCIATE(AUDIO_CHANNEL_OUT_TOP_BACK_LEFT, AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT)
-    // AUDIO_CHANNEL_OUT_TOP_BACK_CENTER       = 0x10000u,
-    CHANNEL_ASSOCIATE(AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT, AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT)
-    CHANNEL_ASSOCIATE(AUDIO_CHANNEL_OUT_BOTTOM_FRONT_LEFT, AUDIO_CHANNEL_OUT_BOTTOM_FRONT_RIGHT)
-    // AUDIO_CHANNEL_OUT_BOTTOM_FRONT_CENTER   = 0x200000u,
-    // AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2       = 0x800000u,
-};
-#pragma GCC diagnostic pop
-#pragma pop_macro("CHANNEL_ASSOCIATE")
-
-constexpr inline ssize_t pairIdxFromChannelIdx(size_t idx) {
-    static_assert(std::size(kPairIdxFromChannelIdx) == FCC_24);
-    if (idx < std::size(kPairIdxFromChannelIdx)) return kPairIdxFromChannelIdx[idx];
-    return -1;
-}
-
-} // android::audio_utils::channels
-
-#endif // __cplusplus
-
 /** \cond */
 __BEGIN_DECLS
 /** \endcond */
diff --git a/audio_utils/include/audio_utils/fifo.h b/audio_utils/include/audio_utils/fifo.h
index aab4a1e..4bcd321 100644
--- a/audio_utils/include/audio_utils/fifo.h
+++ b/audio_utils/include/audio_utils/fifo.h
@@ -26,8 +26,6 @@
 
 /** Indicates whether index is multi-thread safe, and the synchronization technique. */
 enum audio_utils_fifo_sync {
-    /** Index is not multi-thread safe. No support for synchronization or timeouts. */
-    AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED,
     /** Index is multi-thread safe. Synchronization is by polling, timeouts by clock_nanosleep(). */
     AUDIO_UTILS_FIFO_SYNC_SLEEP,
     /** Index is multi-thread safe. Synchronization is by futex mapped in one process. */
@@ -66,12 +64,9 @@
      *  \param writerRear    Writer's rear index.  Passed by reference because it must be non-NULL.
      *  \param throttleFront Pointer to the front index of at most one reader that throttles the
      *                       writer, or NULL for no throttling.
-     *  \param sync          Index synchronization, defaults to AUDIO_UTILS_FIFO_SYNC_SHARED but can
-     *                       also be any other value.
      */
     audio_utils_fifo_base(uint32_t frameCount, audio_utils_fifo_index& writerRear,
-            audio_utils_fifo_index *throttleFront = NULL,
-            audio_utils_fifo_sync sync = AUDIO_UTILS_FIFO_SYNC_SHARED);
+            audio_utils_fifo_index *throttleFront = NULL);
     /*virtual*/ ~audio_utils_fifo_base();
 
     /** Return a new index as the sum of a validated index and a specified increment.
@@ -150,7 +145,6 @@
 
     /**
      * Construct a FIFO object: multi-process.
-     * Index synchronization is not configurable; it is always AUDIO_UTILS_FIFO_SYNC_SHARED.
      *
      *  \param frameCount  Maximum usable frames to be stored in the FIFO > 0 && <= INT32_MAX,
      *                     aka "capacity".
@@ -176,13 +170,9 @@
      *                     \p frameSize * \p frameCount <= INT32_MAX.
      *  \param buffer      Pointer to a non-NULL caller-allocated buffer of \p frameCount frames.
      *  \param throttlesWriter Whether there is one reader that throttles the writer.
-     *  \param sync        Index synchronization, defaults to AUDIO_UTILS_FIFO_SYNC_PRIVATE but can
-     *                     also be AUDIO_UTILS_FIFO_SYNC_SINGLE_THREADED or AUDIO_UTILS_FIFO_SYNC_SLEEP.
-     *                     AUDIO_UTILS_FIFO_SYNC_SHARED is not permitted.
      */
     audio_utils_fifo(uint32_t frameCount, uint32_t frameSize, void *buffer,
-            bool throttlesWriter = true,
-            audio_utils_fifo_sync sync = AUDIO_UTILS_FIFO_SYNC_PRIVATE);
+            bool throttlesWriter = true);
 
     /*virtual*/ ~audio_utils_fifo();
 
diff --git a/audio_utils/include/audio_utils/fifo_index.h b/audio_utils/include/audio_utils/fifo_index.h
index 35ea41e..2639f6f 100644
--- a/audio_utils/include/audio_utils/fifo_index.h
+++ b/audio_utils/include/audio_utils/fifo_index.h
@@ -34,13 +34,6 @@
     ~audio_utils_fifo_index() { }
 
     /**
-     * Load value of index by a simple non-atomic memory read.
-     *
-     * \return Index value
-     */
-    uint32_t loadSingleThreaded();
-
-    /**
      * Load value of index now with memory order 'acquire'.
      *
      * \return Index value
@@ -48,13 +41,6 @@
     uint32_t loadAcquire();
 
     /**
-     * Store new value into index by a simple non-atomic memory write.
-     *
-     * \param value New value to store into index
-     */
-    void storeSingleThreaded(uint32_t value);
-
-    /**
      * Store new value into index now with memory order 'release'.
      *
      * \param value New value to store into index
@@ -90,22 +76,20 @@
      */
     int wake(int op, int waiters = 1);
 
+    // specialized use only, prefer loadAcquire in most cases
+    uint32_t loadConsume();
+
 private:
     // Linux futex is 32 bits regardless of platform.
     // It would make more sense to declare this as atomic_uint32_t, but there is no such type name.
     // TODO Support 64-bit index with 32-bit futex in low-order bits.
     std::atomic_uint_least32_t  mIndex; // accessed by both sides using atomic operations
-    // TODO Should be a union with a simple non-atomic variable
     static_assert(sizeof(mIndex) == sizeof(uint32_t), "mIndex must be 32 bits");
 };
 
 static_assert(sizeof(audio_utils_fifo_index) == sizeof(uint32_t),
         "audio_utils_fifo_index must be 32 bits");
 
-// ----------------------------------------------------------------------------
-
-#if 0   // TODO not currently used, review this code later: bug 150627616
-
 // TODO
 // From a design POV, these next two classes should be related.
 // Extract a base class (that shares their property of being a reference to a fifo index)
@@ -205,6 +189,4 @@
     bool                    mLoaded;    // whether mValue is valid
 };
 
-#endif  // 0
-
 #endif  // !ANDROID_AUDIO_FIFO_INDEX_H
diff --git a/audio_utils/include/audio_utils/fifo_writer_T.h b/audio_utils/include/audio_utils/fifo_writer_T.h
index 0b85db8..10f7af3 100644
--- a/audio_utils/include/audio_utils/fifo_writer_T.h
+++ b/audio_utils/include/audio_utils/fifo_writer_T.h
@@ -39,7 +39,7 @@
  *  - construct an ordinary FIFO that follows the restrictions above
  *  - construct an ordinary reader based on that FIFO
  *  - construct a writer_T using the FIFO
- *  - use a sequence of write and write1, followed by storeSingleThreaded or storeRelease to commit
+ *  - use a sequence of write and write1, followed by storeRelease to commit
  */
 template <typename T>
 class audio_utils_fifo_writer_T /* : public audio_utils_fifo_provider */ {
@@ -70,14 +70,6 @@
 
     /**
      * Commit all previous write and write1 so that they are observable by reader(s),
-     * with a simple non-atomic memory write.
-     */
-    void storeSingleThreaded() {
-        mWriterRear.storeSingleThreaded(mLocalRear);
-    }
-
-    /**
-     * Commit all previous write and write1 so that they are observable by reader(s),
      * with memory order 'release'.
      */
     void storeRelease() {
diff --git a/audio_utils/include/audio_utils/fixedfft.h b/audio_utils/include/audio_utils/fixedfft.h
index 54e0cba..85483be 100644
--- a/audio_utils/include/audio_utils/fixedfft.h
+++ b/audio_utils/include/audio_utils/fixedfft.h
@@ -25,8 +25,7 @@
 /** \endcond */
 
 /** See description in fixedfft.cpp */
-void fixed_fft(int n, int32_t *v);
-void fixed_fft_real(int n, int32_t *v);
+extern void fixed_fft_real(int n, int32_t *v);
 
 /** \cond */
 __END_DECLS
diff --git a/audio_utils/include/audio_utils/intrinsic_utils.h b/audio_utils/include/audio_utils/intrinsic_utils.h
deleted file mode 100644
index ed2b2bb..0000000
--- a/audio_utils/include/audio_utils/intrinsic_utils.h
+++ /dev/null
@@ -1,315 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_AUDIO_UTILS_INTRINSIC_UTILS_H
-#define ANDROID_AUDIO_UTILS_INTRINSIC_UTILS_H
-
-#include <array>  // std::size
-#include <type_traits>
-
-/*
-  The intrinsics utility library contain helper functions for wide width DSP support.
-  We use templated types to allow testing from scalar to vector values.
-
-  See the Eigen project for general abstracted linear algebra acceleration.
-  http://eigen.tuxfamily.org/
-*/
-
-// We conditionally include neon optimizations for ARM devices
-#pragma push_macro("USE_NEON")
-#undef USE_NEON
-
-#if defined(__ARM_NEON__) || defined(__aarch64__)
-#include <arm_neon.h>
-#define USE_NEON
-#endif
-
-namespace android::audio_utils::intrinsics {
-
-// For static assert(false) we need a template version to avoid early failure.
-// See: https://stackoverflow.com/questions/51523965/template-dependent-false
-template <typename T>
-inline constexpr bool dependent_false_v = false;
-
-// Type of array embedded in a struct that is usable in the Neon template functions below.
-// This type must satisfy std::is_array_v<>.
-template<typename T, size_t N>
-struct internal_array_t {
-    T v[N];
-};
-
-/*
-  Generalized template functions for the Neon instruction set.
-
-  See here for some general comments from ARM.
-  https://developer.arm.com/documentation/dht0004/a/neon-support-in-compilation-tools/automatic-vectorization/floating-point-vectorization
-
-  Notes:
-  1) We provide scalar equivalents which are compilable even on non-ARM processors.
-  2) We use recursive calls to decompose array types, e.g. float32x4x4_t -> float32x4_t
-  3) NEON double SIMD acceleration is only available on 64 bit architectures.
-     On Pixel 3XL, NEON double x 2 SIMD is actually slightly slower than the FP unit.
-
-  We create a generic Neon acceleration to be applied to a composite type.
-
-  The type follows the following compositional rules for simplicity:
-      1) must be a primitive floating point type.
-      2) must be a NEON data type.
-      3) must be a struct with one member, either
-           a) an array of types 1-3.
-           b) a cons-pair struct of 2 possibly different members of types 1-3.
-
-  Examples of possible struct definitions:
-  using alternative_2_t = struct { struct { float a; float b; } s; };
-  using alternative_9_t = struct { struct { float32x4x2_t a; float b; } s; };
-  using alternative_15_t = struct { struct { float32x4x2_t a; struct { float v[7]; } b; } s; };
-*/
-
-// duplicate float into all elements.
-template<typename T, typename F>
-static inline T vdupn(F f) {
-    if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
-        return f;
-
-#ifdef USE_NEON
-    } else if constexpr (std::is_same_v<T, float32x2_t>) {
-        return vdup_n_f32(f);
-    } else if constexpr (std::is_same_v<T, float32x4_t>) {
-        return vdupq_n_f32(f);
-#if defined(__aarch64__)
-    } else if constexpr (std::is_same_v<T, float64x2_t>) {
-        return vdupq_n_f64(f);
-#endif
-#endif // USE_NEON
-
-    } else /* constexpr */ {
-        T ret;
-        auto &[retval] = ret;  // single-member struct
-        if constexpr (std::is_array_v<decltype(retval)>) {
-#pragma unroll
-            for (auto& val : retval) {
-                val = vdupn<std::decay_t<decltype(val)>>(f);
-            }
-            return ret;
-        } else /* constexpr */ {
-             auto &[r1, r2] = retval;
-             using r1_type = std::decay_t<decltype(r1)>;
-             using r2_type = std::decay_t<decltype(r2)>;
-             r1 = vdupn<r1_type>(f);
-             r2 = vdupn<r2_type>(f);
-             return ret;
-        }
-    }
-}
-
-// load from float pointer.
-template<typename T, typename F>
-static inline T vld1(const F *f) {
-    if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
-        return *f;
-
-#ifdef USE_NEON
-    } else if constexpr (std::is_same_v<T, float32x2_t>) {
-        return vld1_f32(f);
-    } else if constexpr (std::is_same_v<T, float32x4_t>) {
-        return vld1q_f32(f);
-#if defined(__aarch64__)
-    } else if constexpr (std::is_same_v<T, float64x2_t>) {
-        return vld1q_f64(f);
-#endif
-#endif // USE_NEON
-
-    } else /* constexpr */ {
-        T ret;
-        auto &[retval] = ret;  // single-member struct
-        if constexpr (std::is_array_v<decltype(retval)>) {
-            using element_type = std::decay_t<decltype(retval[0])>;
-            constexpr size_t subelements = sizeof(element_type) / sizeof(F);
-#pragma unroll
-            for (size_t i = 0; i < std::size(retval); ++i) {
-                retval[i] = vld1<element_type>(f);
-                f += subelements;
-            }
-            return ret;
-        } else /* constexpr */ {
-             auto &[r1, r2] = retval;
-             using r1_type = std::decay_t<decltype(r1)>;
-             using r2_type = std::decay_t<decltype(r2)>;
-             r1 = vld1<r1_type>(f);
-             f += sizeof(r1) / sizeof(F);
-             r2 = vld1<r2_type>(f);
-             return ret;
-        }
-    }
-}
-
-// fused multiply-add a + b * c
-template<typename T>
-static inline T vmla(T a, T b, T c) {
-    if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
-        return a + b * c;
-
-#ifdef USE_NEON
-    } else if constexpr (std::is_same_v<T, float32x2_t>) {
-        return vmla_f32(a, b, c);
-    } else if constexpr (std::is_same_v<T, float32x4_t>) {
-        return vmlaq_f32(a, b, c);
-#if defined(__aarch64__)
-    } else if constexpr (std::is_same_v<T, float64x2_t>) {
-        return vmlaq_f64(a, b, c);
-#endif
-#endif // USE_NEON
-
-    } else /* constexpr */ {
-        T ret;
-        auto &[retval] = ret;  // single-member struct
-        const auto &[aval] = a;
-        const auto &[bval] = b;
-        const auto &[cval] = c;
-        if constexpr (std::is_array_v<decltype(retval)>) {
-#pragma unroll
-            for (size_t i = 0; i < std::size(aval); ++i) {
-                retval[i] = vmla(aval[i], bval[i], cval[i]);
-            }
-            return ret;
-        } else /* constexpr */ {
-             auto &[r1, r2] = retval;
-             const auto &[a1, a2] = aval;
-             const auto &[b1, b2] = bval;
-             const auto &[c1, c2] = cval;
-             r1 = vmla(a1, b1, c1);
-             r2 = vmla(a2, b2, c2);
-             return ret;
-        }
-    }
-}
-
-// multiply a * b
-template<typename T>
-static inline T vmul(T a, T b) {
-    if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
-        return a * b;
-
-#ifdef USE_NEON
-    } else if constexpr (std::is_same_v<T, float32x2_t>) {
-        return vmul_f32(a, b);
-    } else if constexpr (std::is_same_v<T, float32x4_t>) {
-        return vmulq_f32(a, b);
-#if defined(__aarch64__)
-    } else if constexpr (std::is_same_v<T, float64x2_t>) {
-        return vmulq_f64(a, b);
-#endif
-#endif // USE_NEON
-
-    } else /* constexpr */ {
-        T ret;
-        auto &[retval] = ret;  // single-member struct
-        const auto &[aval] = a;
-        const auto &[bval] = b;
-        if constexpr (std::is_array_v<decltype(retval)>) {
-#pragma unroll
-            for (size_t i = 0; i < std::size(aval); ++i) {
-                retval[i] = vmul(aval[i], bval[i]);
-            }
-            return ret;
-        } else /* constexpr */ {
-             auto &[r1, r2] = retval;
-             const auto &[a1, a2] = aval;
-             const auto &[b1, b2] = bval;
-             r1 = vmul(a1, b1);
-             r2 = vmul(a2, b2);
-             return ret;
-        }
-    }
-}
-
-// negate
-template<typename T>
-static inline T vneg(T f) {
-    if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
-        return -f;
-
-#ifdef USE_NEON
-    } else if constexpr (std::is_same_v<T, float32x2_t>) {
-        return vneg_f32(f);
-    } else if constexpr (std::is_same_v<T, float32x4_t>) {
-        return vnegq_f32(f);
-#if defined(__aarch64__)
-    } else if constexpr (std::is_same_v<T, float64x2_t>) {
-        return vnegq_f64(f);
-#endif
-#endif // USE_NEON
-
-    } else /* constexpr */ {
-        T ret;
-        auto &[retval] = ret;  // single-member struct
-        const auto &[fval] = f;
-        if constexpr (std::is_array_v<decltype(retval)>) {
-#pragma unroll
-            for (size_t i = 0; i < std::size(fval); ++i) {
-                retval[i] = vneg(fval[i]);
-            }
-            return ret;
-        } else /* constexpr */ {
-             auto &[r1, r2] = retval;
-             const auto &[f1, f2] = fval;
-             r1 = vneg(f1);
-             r2 = vneg(f2);
-             return ret;
-        }
-    }
-}
-
-// store to float pointer.
-template<typename T, typename F>
-static inline void vst1(F *f, T a) {
-    if constexpr (std::is_same_v<T, float> || std::is_same_v<T, double>) {
-        *f = a;
-
-#ifdef USE_NEON
-    } else if constexpr (std::is_same_v<T, float32x2_t>) {
-        return vst1_f32(f, a);
-    } else if constexpr (std::is_same_v<T, float32x4_t>) {
-        return vst1q_f32(f, a);
-#if defined(__aarch64__)
-    } else if constexpr (std::is_same_v<T, float64x2_t>) {
-        return vst1q_f64(f, a);
-#endif
-#endif // USE_NEON
-
-    } else /* constexpr */ {
-        const auto &[aval] = a;
-        if constexpr (std::is_array_v<decltype(aval)>) {
-            constexpr size_t subelements = sizeof(std::decay_t<decltype(aval[0])>) / sizeof(F);
-#pragma unroll
-            for (size_t i = 0; i < std::size(aval); ++i) {
-                vst1(f, aval[i]);
-                f += subelements;
-            }
-        } else /* constexpr */ {
-             const auto &[a1, a2] = aval;
-             vst1(f, a1);
-             f += sizeof(std::decay_t<decltype(a1)>) / sizeof(F);
-             vst1(f, a2);
-        }
-    }
-}
-
-} // namespace android::audio_utils::intrinsics
-
-#pragma pop_macro("USE_NEON")
-
-#endif // !ANDROID_AUDIO_UTILS_INTRINSIC_UTILS_H
diff --git a/audio_utils/include/audio_utils/limiter.h b/audio_utils/include/audio_utils/limiter.h
index 2538fdf..eb57eba 100644
--- a/audio_utils/include/audio_utils/limiter.h
+++ b/audio_utils/include/audio_utils/limiter.h
@@ -23,15 +23,21 @@
 __BEGIN_DECLS
 /** \endcond */
 
-/**
- * This limiter function is the identity for [-sqrt(0.5), sqrt(0.5)]
- * and then approximates atan or spline.
- * \param in input in range [-sqrt(2), sqrt(2)]; out of range, inf, and NaN are not permitted
- * \return the limited output in range no larger than [-1.0, 1.0].
- * The implementation is permitted to limit the output to a slightly smaller range,
- * so the minimum and maximum outputs may not be achievable.
- */
-float limiter(float in);
+#ifdef __cplusplus
+extern "C" {
+#endif
+    /**
+     * This limiter function is the identity for [-sqrt(0.5), sqrt(0.5)]
+     * and then approximates atan or spline.
+     * \param in input in range [-sqrt(2), sqrt(2)]; out of range, inf, and NaN are not permitted
+     * \return the limited output in range no larger than [-1.0, 1.0].
+     * The implementation is permitted to limit the output to a slightly smaller range,
+     * so the minimum and maximum outputs may not be achievable.
+     */
+    extern float limiter(float in);
+#ifdef __cplusplus
+}
+#endif
 
 /** \cond */
 __END_DECLS
diff --git a/audio_utils/include/audio_utils/roundup.h b/audio_utils/include/audio_utils/roundup.h
index 70ed15c..5ee4607 100644
--- a/audio_utils/include/audio_utils/roundup.h
+++ b/audio_utils/include/audio_utils/roundup.h
@@ -17,17 +17,15 @@
 #ifndef ANDROID_AUDIO_ROUNDUP_H
 #define ANDROID_AUDIO_ROUNDUP_H
 
-#include <sys/cdefs.h>
-
-/** \cond */
-__BEGIN_DECLS
-/** \endcond */
+#ifdef __cplusplus
+extern "C" {
+#endif
 
 /** Round up to the next highest power of 2 */
 unsigned roundup(unsigned v);
 
-/** \cond */
-__END_DECLS
-/** \endcond */
+#ifdef __cplusplus
+}
+#endif
 
 #endif  // ANDROID_AUDIO_ROUNDUP_H
diff --git a/audio_utils/include/audio_utils/sndfile.h b/audio_utils/include/audio_utils/sndfile.h
index 9a78473..6889e1b 100644
--- a/audio_utils/include/audio_utils/sndfile.h
+++ b/audio_utils/include/audio_utils/sndfile.h
@@ -23,10 +23,9 @@
 // The API should be familiar to clients of similar libraries, but there is
 // no guarantee that it will stay exactly source-code compatible with other libraries.
 
-#include <stdint.h>
 #include <stdio.h>
 #include <sys/cdefs.h>
-#include <system/audio.h>
+#include <system/audio-base.h>
 
 /** \cond */
 __BEGIN_DECLS
diff --git a/audio_utils/include/audio_utils/spdif/FrameScanner.h b/audio_utils/include/audio_utils/spdif/FrameScanner.h
index 602dce6..6d391ee 100644
--- a/audio_utils/include/audio_utils/spdif/FrameScanner.h
+++ b/audio_utils/include/audio_utils/spdif/FrameScanner.h
@@ -127,5 +127,4 @@
 
 
 }  // namespace android
-
 #endif  // ANDROID_AUDIO_FRAME_SCANNER_H
diff --git a/audio_utils/include/audio_utils/spdif/OWNERS b/audio_utils/include/audio_utils/spdif/OWNERS
deleted file mode 100644
index f4d51f9..0000000
--- a/audio_utils/include/audio_utils/spdif/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-philburk@google.com
diff --git a/audio_utils/include/audio_utils/string.h b/audio_utils/include/audio_utils/string.h
index 5f04199..806fcf8 100644
--- a/audio_utils/include/audio_utils/string.h
+++ b/audio_utils/include/audio_utils/string.h
@@ -18,9 +18,6 @@
 #define ANDROID_AUDIO_STRING_H
 
 #include <string.h>
-#ifndef __ANDROID__
-#include <cutils/memory.h>
-#endif
 
 /** similar to strlcpy but also zero fills to end of string buffer, ensures no data leak
     in parceled data sent over binder.*/
diff --git a/audio_utils/include/audio_utils/variadic_utils.h b/audio_utils/include/audio_utils/variadic_utils.h
index 2f1788e..a6b7470 100644
--- a/audio_utils/include/audio_utils/variadic_utils.h
+++ b/audio_utils/include/audio_utils/variadic_utils.h
@@ -168,7 +168,7 @@
         std::index_sequence<I...>) {
     os << "(";
     // ((os << (I == 0 ? "" : ", ") << std::get<I>(t)), ...); is C++17
-    int temp[] __attribute__((unused)) = { (os << (I == 0 ? "" : ", ") << std::get<I>(t), 0) ... };
+    int dummy[] __unused = { (os << (I == 0 ? "" : ", ") << std::get<I>(t), 0) ... };
     return os << ")";
 }
 
@@ -188,7 +188,7 @@
 // helper
 template <size_t index, typename Op, typename T,
           std::enable_if_t<index == 0 && is_variadic<T>::value, int> = 0>
-constexpr auto fold(Op&& op __attribute__((unused)), T&& t) {
+constexpr auto fold(Op&& op __unused, T&& t) {
     return std::get<index>(std::forward<T>(t));
 }
 
@@ -257,8 +257,7 @@
 // variadic / scalar mismatch overload
 template <typename T1, typename T2,
           std::enable_if_t<is_variadic<T1>::value != is_variadic<T2>::value, int> = 0>
-constexpr bool equivalent(const T1& t1 __attribute__((unused)),
-        const T2& t2 __attribute__((unused))) {
+constexpr bool equivalent(const T1& t1 __unused, const T2& t2 __unused) {
     return false;
 }
 
@@ -428,7 +427,7 @@
 // helper
 template <typename T, typename Op, std::size_t... I >
 constexpr void for_each(T& t, Op op, std::index_sequence<I...>) {
-    int temp[] __attribute__((unused)) = {(op(std::get<I>(t)), 0)...};
+    int dummy[] __unused = {(op(std::get<I>(t)), 0)...};
 }
 
 // variadic
diff --git a/audio_utils/mono_blend.cpp b/audio_utils/mono_blend.cpp
index 8415109..33b46c2 100644
--- a/audio_utils/mono_blend.cpp
+++ b/audio_utils/mono_blend.cpp
@@ -14,8 +14,11 @@
  * limitations under the License.
  */
 
-#include <assert.h>
+//#define LOG_NDEBUG 0
+#define LOG_TAG "audio_utils_mono_blend"
+
 #include <math.h>
+#include <log/log.h>
 #include <audio_utils/limiter.h>
 #include <audio_utils/mono_blend.h>
 
@@ -59,7 +62,7 @@
         }
     } break;
     default:
-        assert(false);
+        ALOGE("mono_blend: invalid format %d", format);
         break;
     }
 }
diff --git a/audio_utils/primitives.c b/audio_utils/primitives.c
index dac2394..06812f0 100644
--- a/audio_utils/primitives.c
+++ b/audio_utils/primitives.c
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
+#include <cutils/bitops.h>  /* for popcount() */
 #include <audio_utils/primitives.h>
-#include <string.h>
 #include "private/private.h"
 
 void ditherAndClamp(int32_t *out, const int32_t *sums, size_t pairs)
@@ -428,14 +428,14 @@
 #if 0
     /* alternate way of handling memcpy_by_channel_mask by using the idxary */
     int8_t idxary[32];
-    uint32_t src_channels = __builtin_popcount(src_mask);
+    uint32_t src_channels = popcount(src_mask);
     uint32_t dst_channels =
             memcpy_by_index_array_initialization(idxary, 32, dst_mask, src_mask);
 
     memcpy_by_idxary(dst, dst_channels, src, src_channels, idxary, sample_size, count);
 #else
     if (dst_mask == src_mask) {
-        memcpy(dst, src, sample_size * __builtin_popcount(dst_mask) * count);
+        memcpy(dst, src, sample_size * popcount(dst_mask) * count);
         return;
     }
     switch (sample_size) {
@@ -543,12 +543,12 @@
             idxary[n++] = -1;
         }
     }
-    return n + __builtin_popcount(ormask & dst_mask);
+    return n + popcount(ormask & dst_mask);
 }
 
 size_t memcpy_by_index_array_initialization_src_index(int8_t *idxary, size_t idxcount,
         uint32_t dst_mask, uint32_t src_mask) {
-    size_t dst_count = __builtin_popcount(dst_mask);
+    size_t dst_count = popcount(dst_mask);
     if (idxcount == 0) {
         return dst_count;
     }
diff --git a/audio_utils/spdif/OWNERS b/audio_utils/spdif/OWNERS
deleted file mode 100644
index f4d51f9..0000000
--- a/audio_utils/spdif/OWNERS
+++ /dev/null
@@ -1 +0,0 @@
-philburk@google.com
diff --git a/audio_utils/spdif/SPDIFEncoder.cpp b/audio_utils/spdif/SPDIFEncoder.cpp
index 60b8425..4a8a02a 100644
--- a/audio_utils/spdif/SPDIFEncoder.cpp
+++ b/audio_utils/spdif/SPDIFEncoder.cpp
@@ -140,12 +140,6 @@
         clearBurstBuffer();
         return;
     }
-
-    // Avoid reading first word past end of mBurstBuffer.
-    if (numBytes == 0) {
-        return;
-    }
-    // Pack bytes into short buffer.
     uint16_t pad = mBurstBuffer[mByteCursor >> 1];
     for (size_t i = 0; i < numBytes; i++) {
         if (mByteCursor & 1 ) {
diff --git a/audio_utils/tests/Android.bp b/audio_utils/tests/Android.bp
index 4011dcf..5ba1ec2 100644
--- a/audio_utils/tests/Android.bp
+++ b/audio_utils/tests/Android.bp
@@ -1,80 +1,10 @@
 // Build the unit tests for audio_utils
 
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
-cc_test {
-    name: "balance_tests",
-    host_supported: true,
-
-    srcs: [
-        "balance_tests.cpp",
-    ],
-
-    static_libs: [
-        "libaudioutils",
-    ],
-
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wextra",
-    ],
-}
-
-cc_binary {
-    name: "biquad_filter",
-    host_supported: true,
-
-    srcs: [
-        "biquad_filter.cpp"
-    ],
-
-    shared_libs: [
-        "libaudioutils",
-    ],
-
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wextra",
-    ],
-}
-
-cc_test {
-    name: "biquad_filter_tests",
-    host_supported: true,
-
-    srcs: [
-        "biquad_filter_tests.cpp",
-    ],
-
-    header_libs: [
-        "libaudioutils_headers",
-    ],
-
-    static_libs: [
-        "libgmock",
-    ],
-
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wextra",
-    ],
-}
-
 cc_test {
     name: "fdtostring_tests",
-    host_supported: true,
+    host_supported: false,
 
     shared_libs: [
-        "libaudioutils",
         "libcutils",
         "liblog",
         "libutils", //for systemTime
@@ -85,25 +15,11 @@
         "-Werror",
         "-Wextra",
     ],
-}
-
-cc_test {
-    name: "intrinsic_tests",
-    host_supported: true,
-
-    srcs: [
-        "intrinsic_tests.cpp",
-    ],
-
-    header_libs: [
-        "libaudioutils_headers",
-    ],
-
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wextra",
-    ],
+    target: {
+        android: {
+            shared_libs: ["libaudioutils"],
+        },
+    }
 }
 
 cc_test {
@@ -130,6 +46,26 @@
 }
 
 cc_binary {
+    name: "primitives_benchmark",
+    host_supported: true,
+    target: {
+        darwin: {
+            enabled: false,
+        },
+    },
+
+    srcs: ["primitives_benchmark.cpp"],
+    cflags: [
+        "-Werror",
+        "-Wall",
+    ],
+    static_libs: [
+        "libgoogle-benchmark",
+        "libaudioutils",
+    ],
+}
+
+cc_binary {
     name: "fifo_tests",
     host_supported: true,
     srcs: ["fifo_tests.cpp"],
@@ -143,7 +79,7 @@
 
 cc_binary {
     name: "fifo_multiprocess",
-    host_supported: true,
+    host_supported: false,
     srcs: ["fifo_multiprocess.cpp"],
     shared_libs: ["libaudioutils", "libcutils"],
     static_libs: ["libsndfile"],
@@ -207,7 +143,7 @@
 
 cc_test {
     name: "errorlog_tests",
-    host_supported: true,
+    host_supported: false,
 
     shared_libs: [
         "libcutils",
@@ -253,21 +189,9 @@
     }
 }
 
-cc_binary {
-    name: "metadata_c_tests",
-    host_supported: true,
-    srcs: ["metadata_tests_c.c"],
-    cflags: [
-        "-Wall",
-        "-Werror",
-        "-Wextra",
-    ],
-    shared_libs: ["libaudioutils"],
-}
-
 cc_test {
     name: "powerlog_tests",
-    host_supported: true,
+    host_supported: false,
 
     shared_libs: [
         "libcutils",
@@ -291,7 +215,7 @@
 
 cc_test {
     name: "simplelog_tests",
-    host_supported: true,
+    host_supported: false,
 
     shared_libs: [
         "libcutils",
@@ -338,7 +262,7 @@
 
 cc_test {
     name: "string_tests",
-    host_supported: true,
+    host_supported: false,
 
     shared_libs: ["libaudioutils"],
     srcs: ["string_tests.cpp"],
@@ -346,11 +270,6 @@
         "-Wall",
         "-Werror",
     ],
-    target: {
-        host: {
-            shared_libs: ["libcutils"],
-        },
-    }
 }
 
 cc_test {
@@ -377,7 +296,7 @@
 
 cc_test {
     name: "statistics_tests",
-    host_supported: true,
+    host_supported: false,
 
     header_libs: ["libaudioutils_headers"],
     srcs: ["statistics_tests.cpp"],
@@ -390,7 +309,7 @@
 
 cc_test {
     name: "timestampverifier_tests",
-    host_supported: true,
+    host_supported: false,
 
     header_libs: ["libaudioutils_headers"],
     srcs: ["timestampverifier_tests.cpp"],
@@ -403,7 +322,7 @@
 
 cc_test {
     name: "variadic_tests",
-    host_supported: true,
+    host_supported: false,
 
     shared_libs: ["libaudioutils"],
     srcs: ["variadic_tests.cpp"],
@@ -423,7 +342,6 @@
         "libcutils",
     ],
     srcs: ["logplot_tests.cpp"],
-    gtest:false,
     cflags: [
         "-Werror",
         "-Wall",
@@ -438,6 +356,21 @@
     }
 }
 
+cc_binary {
+    name: "statistics_benchmark",
+    host_supported: false,
+
+    srcs: ["statistics_benchmark.cpp"],
+    cflags: [
+        "-Werror",
+        "-Wall",
+    ],
+    static_libs: [
+        "libgoogle-benchmark",
+        "libaudioutils",
+    ],
+}
+
 cc_test {
     name: "sample_tests",
     host_supported: true,
@@ -463,7 +396,6 @@
 
 cc_test {
     name: "spdif_tests",
-    host_supported: true,
 
     shared_libs: [
         "libaudioutils",
@@ -477,3 +409,4 @@
         "-Wall",
     ],
 }
+
diff --git a/audio_utils/tests/Makefile b/audio_utils/tests/Makefile
new file mode 100644
index 0000000..e2ec83b
--- /dev/null
+++ b/audio_utils/tests/Makefile
@@ -0,0 +1,9 @@
+# TODO Incorporate testing into audio_utils/tests/Android.bp and remove this file.
+
+INC=../include/audio_utils
+
+main : logplot_tests.cpp $(INC)/LogPlot.h
+	g++ -I$(INC) -o logplot_tests logplot_tests.cpp
+
+clean :
+	rm -f logplot_tests
diff --git a/audio_utils/tests/balance_tests.cpp b/audio_utils/tests/balance_tests.cpp
deleted file mode 100644
index aa115d7..0000000
--- a/audio_utils/tests/balance_tests.cpp
+++ /dev/null
@@ -1,124 +0,0 @@
-/*
- * Copyright (C) 2021 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <audio_utils/Balance.h>
-#include <gtest/gtest.h>
-#include <vector>
-
-TEST(audio_utils_balance, stereo) {
-  // disable ramping so we can check single frame processing.
-  android::audio_utils::Balance balance(false /* ramp */);
-  ASSERT_EQ(false, balance.getRamp());
-
-  balance.setChannelMask(AUDIO_CHANNEL_OUT_STEREO);
-  std::vector<float> buffer = {1.f, -1.f};
-
-  // balance of 0 is no change.
-  ASSERT_EQ(0.f, balance.getBalance());
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{1.f, -1.f}), buffer);
-
-  // balance of 1.f is right.
-  balance.setBalance(1.f);
-  ASSERT_EQ(1.f, balance.getBalance());
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{0.f, -1.f}), buffer);
-
-  // balance of -1.f is left.
-  buffer = {1.f, -1.f};
-  balance.setBalance(-1.f); // to left
-  ASSERT_EQ(-1.f, balance.getBalance());
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{1.f, 0.f}), buffer);
-}
-
-TEST(audio_utils_balance, 7point1) {
-  // disable ramping so we can check single frame processing.
-  android::audio_utils::Balance balance(false /* ramp */);
-  ASSERT_EQ(false, balance.getRamp());
-
-  balance.setChannelMask(AUDIO_CHANNEL_OUT_7POINT1);
-  // FL, FR, FC, LFE, BL, BR, SL, SR
-  std::vector<float> buffer = {1.f, -1.f, 0.5f, 0.25f, 0.75f, 0.75f, 0.125f, 0.125f};
-
-  // balance of 0 is no change.
-  ASSERT_EQ(0.f, balance.getBalance());
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{1.f, -1.f, 0.5f, 0.25f, 0.75f, 0.75f, 0.125f, 0.125f}), buffer);
-
-  // balance of 1.f is right.
-  balance.setBalance(1.f);
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{0.f, -1.f, 0.5f, 0.25f, 0.f, 0.75f, 0.f, 0.125f}), buffer);
-
-  // balance of -1.f is left.
-  buffer = {1.f, -1.f, 0.5f, 0.25f, 0.75f, 0.75f, 0.125f, 0.125f};
-  balance.setBalance(-1.f); // to left
-  ASSERT_EQ(-1.f, balance.getBalance());
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{1.f, 0.f, 0.5f, 0.25f, 0.75f, 0.f, 0.125f, 0.f}), buffer);
-}
-
-TEST(audio_utils_balance, lfe) {
-  // disable ramping so we can check single frame processing.
-  android::audio_utils::Balance balance(false /* ramp */);
-  ASSERT_EQ(false, balance.getRamp());
-  std::vector<float> buffer = {1.f, -1.f};
-
-  // NOTE: single channel falls under mono exception (we ignore balance)
-  // so we pair with another "center" channel.
-  // LFE by itself is considered "center".
-  for (auto channelMask : {
-        (AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY),
-        (AUDIO_CHANNEL_OUT_FRONT_CENTER | AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2),
-      }) {
-    balance.setChannelMask((audio_channel_mask_t)channelMask);
-
-      // balance of 0 is no change.
-      balance.setBalance(0.f);
-      balance.process(buffer.data(), 1 /* frames */);
-      ASSERT_EQ((std::vector<float>{1.f, -1.f}), buffer);
-
-      // balance of 1.f is right. (center unaffected)
-      balance.setBalance(1.f);
-      balance.process(buffer.data(), 1 /* frames */);
-      ASSERT_EQ((std::vector<float>{1.f, -1.f}), buffer);
-
-      // balance of -1.f is left. (center unaffected)
-      balance.setBalance(-1.f);
-      balance.process(buffer.data(), 1 /* frames */);
-      ASSERT_EQ((std::vector<float>{1.f, -1.f}), buffer);
-  }
-
-  // If both LFE and LFE2 are present, we assume L/R.
-  balance.setChannelMask((audio_channel_mask_t)
-      (AUDIO_CHANNEL_OUT_LOW_FREQUENCY | AUDIO_CHANNEL_OUT_LOW_FREQUENCY_2));
-  // balance of 0 is no change.
-  balance.setBalance(0.f); // to left
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{1.f, -1.f}), buffer);
-
-  // balance of 1.f is right.
-  balance.setBalance(1.f);
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{0.f, -1.f}), buffer);
-
-  // balance of -1.f is left.
-  buffer = {1.f, -1.f};
-  balance.setBalance(-1.f); // to left
-  balance.process(buffer.data(), 1 /* frames */);
-  ASSERT_EQ((std::vector<float>{1.f, 0.f}), buffer);
-}
diff --git a/audio_utils/tests/biquad_filter.cpp b/audio_utils/tests/biquad_filter.cpp
deleted file mode 100644
index 81fd5a1..0000000
--- a/audio_utils/tests/biquad_filter.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- *
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <cstdio>
-#include <memory>
-
-#include <stdlib.h>
-
-#include <audio_utils/BiquadFilter.h>
-#include <audio_utils/channels.h>
-#include <audio_utils/primitives.h>
-
-using namespace android::audio_utils;
-
-// Random a coefficients here for the test.
-static constexpr std::array<float, kBiquadNumCoefs> biquadCoefs = {
-        0.983097f, -1.966194f, 0.983097f, -1.988931f, 0.988992f};
-
-void printUsage() {
-    printf("\nUsage:");
-    printf("\n     <executable> -ch:<process_channels> -fch:<file_channels> "
-        "<input_file> <out_file>");
-    printf("\nwhere,\n     <process_channels> (1 through 8) default 2");
-    printf("\n     <file_channels> (1 through 8) default 2\n");
-    printf("\n     <inputfile>  is the input file name");
-    printf("\n                  on which filtering is applied");
-    printf("\n     <outputfile> processed output file\n");
-
-}
-
-int main(int argc, const char *argv[]) {
-
-    if (argc < 3) {
-        printUsage();
-        return EXIT_FAILURE;
-    }
-
-    int fileChannelCount = 2;
-    int procChannelCount = 2;
-
-    if (argc < 3) {
-        printf("Error: missing input/output files\n");
-        printUsage();
-        return EXIT_FAILURE;
-    }
-
-    const char *infile = argv[argc - 2];
-    const char *outfile = argv[argc - 1];
-
-    if (infile == nullptr || outfile == nullptr) {
-        printf("Error: missing input/output files\n");
-        printUsage();
-        return EXIT_FAILURE;
-    }
-
-    printf("%s ", infile);
-    printf("%s ", outfile);
-
-    for (int i = 1; i < argc - 2; i++) {
-        printf("%s ", argv[i]);
-        if (!strncmp(argv[i], "-ch:", 4)) {
-            procChannelCount = atoi(argv[i] + 4);
-            if (procChannelCount < 1 || procChannelCount > 8) {
-                printf("\nNumber of channels to process exceeds limit\n");
-                return EXIT_FAILURE;
-            }
-        } else if (!strncmp(argv[i], "-fch:", 5)) {
-            fileChannelCount = atoi(argv[i] + 5);
-            if (fileChannelCount < 1 || fileChannelCount > 8) {
-                printf("\nNumber of channels in the file exceeds limit\n");
-                return EXIT_FAILURE;
-            }
-        }
-    }
-
-    std::unique_ptr<std::FILE, decltype(&std::fclose)> finp(
-            std::fopen(infile, "rb"), &std::fclose);
-    if (finp == nullptr) {
-        printf("Cannot open input file %s\n", infile);
-        return EXIT_FAILURE;
-    }
-
-    std::unique_ptr<std::FILE, decltype(&std::fclose)> fout(
-            std::fopen(outfile, "wb"), &std::fclose);
-    if (fout == nullptr) {
-        printf("Cannot open output file %s\n", outfile);
-        fclose(finp.get());
-        return EXIT_FAILURE;
-    }
-
-    const size_t frameLength = 256;
-    const int maxChannelCount = std::max(fileChannelCount, procChannelCount);
-
-    std::vector<short> in(frameLength * maxChannelCount);
-    std::vector<short> out(frameLength * maxChannelCount);
-    std::vector<float> floatIn(frameLength * procChannelCount);
-    std::vector<float> floatOut(frameLength * procChannelCount);
-    const size_t ioFrameSize = fileChannelCount * sizeof(short);
-
-    BiquadFilter biquadFilter(procChannelCount);
-    biquadFilter.clear();
-    biquadFilter.setCoefficients(biquadCoefs);
-
-    size_t frameCounter = 0;
-
-    while (fread(in.data(), ioFrameSize, frameLength, finp.get()) ==
-           frameLength) {
-        if (fileChannelCount != procChannelCount) {
-            adjust_channels(in.data(), fileChannelCount, in.data(),
-                            procChannelCount, sizeof(short),
-                            frameLength * ioFrameSize);
-        }
-        memcpy_to_float_from_i16(floatIn.data(), in.data(),
-                                 frameLength * procChannelCount);
-
-        biquadFilter.process(floatOut.data(), floatIn.data(), frameLength);
-
-        memcpy_to_i16_from_float(out.data(), floatOut.data(),
-                                 frameLength * procChannelCount);
-        frameCounter += frameLength;
-        adjust_channels(out.data(), procChannelCount, out.data(),
-                        fileChannelCount, sizeof(short),
-                        frameLength * procChannelCount * sizeof(short));
-        fwrite(out.data(), ioFrameSize, frameLength, fout.get());
-    }
-    printf("frameCounter: [%zu]\n", frameCounter);
-
-    return EXIT_SUCCESS;
-}
diff --git a/audio_utils/tests/biquad_filter_tests.cpp b/audio_utils/tests/biquad_filter_tests.cpp
deleted file mode 100644
index 3be2a5d..0000000
--- a/audio_utils/tests/biquad_filter_tests.cpp
+++ /dev/null
@@ -1,319 +0,0 @@
-/*
- * Copyright 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <array>
-#include <random>
-#include <vector>
-
-#include <gmock/gmock.h>
-#include <gtest/gtest.h>
-
-#include <audio_utils/BiquadFilter.h>
-
-using ::testing::Pointwise;
-using ::testing::FloatNear;
-using namespace android::audio_utils;
-
-/************************************************************************************
- * Reference data, must not change.
- * The reference output data is from running in matlab y = filter(b, a, x), where
- *     b = [2.0f, 3.0f]
- *     a = [1.0f, 0.2f]
- *     x = [-0.1f, -0.2f, -0.3f, -0.4f, -0.5f, 0.1f, 0.2f, 0.3f, 0.4f, 0.5f]
- * The output y = [-0.2f, -0.66f, -1.068f, -1.4864f, -1.9027f,
- *                 -0.9195f, 0.8839f, 1.0232f, 1.4954f, 1.9009f].
- * The reference data construct the input and output as 2D array so that it can be
- * use to practice calling BiquadFilter::process multiple times.
- ************************************************************************************/
-constexpr size_t FRAME_COUNT = 5;
-constexpr size_t PERIOD = 2;
-constexpr float INPUT[PERIOD][FRAME_COUNT] = {
-        {-0.1f, -0.2f, -0.3f, -0.4f, -0.5f},
-        {0.1f, 0.2f, 0.3f, 0.4f, 0.5f}};
-constexpr std::array<float, kBiquadNumCoefs> COEFS = {
-        2.0f, 3.0f, 0.0f, 0.2f, 0.0f };
-constexpr float OUTPUT[PERIOD][FRAME_COUNT] = {
-        {-0.2f, -0.66f, -1.068f, -1.4864f, -1.9027f},
-        {-0.9195f, 0.8839f, 1.0232f, 1.4954f, 1.9009f}};
-constexpr float EPS = 1e-4f;
-
-template <typename S, typename D>
-static void populateBuffer(const S *singleChannelBuffer, size_t frameCount,
-        size_t channelCount, size_t zeroChannels, D *buffer) {
-    const size_t stride = channelCount + zeroChannels;
-    for (size_t i = 0; i < frameCount; ++i) {
-        size_t j = 0;
-        for (; j < channelCount; ++j) {
-            buffer[i * stride + j] = singleChannelBuffer[i];
-        }
-        for (; j < stride; ++j) {
-            buffer[i * stride + j] = D{};
-        }
-    }
-}
-
-template <typename D>
-static void randomBuffer(D *buffer, size_t frameCount, size_t channelCount) {
-    static std::minstd_rand gen(42);
-    constexpr float amplitude = 1.0f;
-    std::uniform_real_distribution<> dis(-amplitude, amplitude);
-    for (size_t i = 0; i < frameCount * channelCount; ++i) {
-        buffer[i] = dis(gen);
-    }
-}
-
-template <typename D>
-static std::array<D, 5> randomFilter() {
-    static std::minstd_rand gen(42);
-    constexpr float amplitude = 0.9f;
-    std::uniform_real_distribution<> dis(-amplitude, amplitude);
-    const D p1 = (D)dis(gen);
-    const D p2 = (D)dis(gen);
-    return {(D)dis(gen), (D)dis(gen), (D)dis(gen), -(p1 + p2), p1 * p2};
-}
-
-template <typename D>
-static std::array<D, 5> randomUnstableFilter() {
-    static std::minstd_rand gen(42);
-    constexpr float amplitude = 3.;
-    std::uniform_real_distribution<> dis(-amplitude, amplitude);
-    // symmetric in p1 and p2.
-    const D p1 = (D)dis(gen);
-    D p2;
-    while (true) {
-        p2 = (D)dis(gen);
-        if (fabs(p2) > 1.1) break;
-    }
-    return {(D)dis(gen), (D)dis(gen), (D)dis(gen), -(p1 + p2), p1 * p2};
-}
-
-// The BiquadFilterTest is parameterized on channel count.
-class BiquadFilterTest : public ::testing::TestWithParam<size_t> {
-protected:
-    template <typename T>
-    static void testProcess(size_t zeroChannels = 0) {
-        const size_t channelCount = static_cast<size_t>(GetParam());
-        const size_t stride = channelCount + zeroChannels;
-        const size_t sampleCount = FRAME_COUNT * stride;
-        T inputBuffer[PERIOD][sampleCount];
-        T outputBuffer[sampleCount];
-        T expectedOutputBuffer[PERIOD][sampleCount];
-        for (size_t i = 0; i < PERIOD; ++i) {
-            populateBuffer(INPUT[i], FRAME_COUNT, channelCount, zeroChannels, inputBuffer[i]);
-            populateBuffer(
-                    OUTPUT[i], FRAME_COUNT, channelCount, zeroChannels, expectedOutputBuffer[i]);
-        }
-        BiquadFilter<T> filter(channelCount, COEFS);
-
-        for (size_t i = 0; i < PERIOD; ++i) {
-            filter.process(outputBuffer, inputBuffer[i], FRAME_COUNT, stride);
-            EXPECT_THAT(std::vector<float>(outputBuffer, outputBuffer + sampleCount),
-                        Pointwise(FloatNear(EPS), std::vector<float>(
-                                expectedOutputBuffer[i], expectedOutputBuffer[i] + sampleCount)));
-        }
-
-        // After clear, the previous delays should be cleared.
-        filter.clear();
-        filter.process(outputBuffer, inputBuffer[0], FRAME_COUNT, stride);
-        EXPECT_THAT(std::vector<float>(outputBuffer, outputBuffer + sampleCount),
-                    Pointwise(FloatNear(EPS), std::vector<float>(
-                            expectedOutputBuffer[0], expectedOutputBuffer[0] + sampleCount)));
-    }
-};
-
-TEST_P(BiquadFilterTest, ConstructAndProcessFilterFloat) {
-    testProcess<float>();
-}
-
-TEST_P(BiquadFilterTest, ConstructAndProcessFilterDouble) {
-    testProcess<double>();
-}
-
-TEST_P(BiquadFilterTest, ConstructAndProcessFilterFloatZero3) {
-    testProcess<float>(3 /* zeroChannels */);
-}
-
-TEST_P(BiquadFilterTest, ConstructAndProcessFilterDoubleZero5) {
-    testProcess<double>(5 /* zeroChannels */);
-}
-
-INSTANTIATE_TEST_CASE_P(
-        CstrAndRunBiquadFilter,
-        BiquadFilterTest,
-        ::testing::Values(1, 2, 3, 4, 5, 6, 7, 8,
-                9, 10, 11, 12, 13, 14, 15, 16,
-                17, 18, 19, 20, 21, 22, 23, 24)
-        );
-
-// Test the experimental 1D mode.
-TEST(BiquadBasicTest, OneDee) {
-    using D = float;
-    constexpr size_t TEST_LENGTH = 1024;
-    constexpr size_t FILTERS = 3;
-    std::vector<D> reference(TEST_LENGTH);
-    randomBuffer(reference.data(), TEST_LENGTH, 1 /* channelCount */);
-
-    BiquadFilter<D, true> parallel(FILTERS, COEFS);
-    std::vector<std::unique_ptr<BiquadFilter<D>>> biquads(FILTERS);
-    for (auto& biquad : biquads) {
-        biquad.reset(new BiquadFilter<D>(1, COEFS));
-    }
-
-    auto test1 = reference;
-    parallel.process1D(test1.data(), TEST_LENGTH);
-
-    auto test2 = reference;
-    for (auto& biquad : biquads) {
-        biquad->process(test2.data(), test2.data(), TEST_LENGTH);
-    }
-    EXPECT_THAT(test1, Pointwise(FloatNear(EPS), test2));
-}
-
-// The BiquadBasicTest is parameterized on floating point type (float or double).
-template <typename D>
-class BiquadBasicTest : public ::testing::Test {
-protected:
-
-    // Multichannel biquad test where each channel has different filter coefficients.
-    static void testDifferentFiltersPerChannel() {
-        constexpr size_t FILTERS = 3;
-        constexpr size_t TEST_LENGTH = 1024;
-        std::vector<D> reference(TEST_LENGTH * FILTERS);
-        randomBuffer(reference.data(), TEST_LENGTH, FILTERS);
-
-        std::array<std::array<D, 5>, FILTERS> filters;
-        for (auto &filter : filters) {
-            filter = randomFilter<D>();
-        }
-
-        BiquadFilter<D, false> multichannel(FILTERS);
-        std::vector<std::unique_ptr<BiquadFilter<D>>> biquads(FILTERS);
-        for (size_t i = 0; i < filters.size(); ++i) {
-            ASSERT_TRUE(multichannel.setCoefficients(filters[i], i));
-            biquads[i].reset(new BiquadFilter<D>(1 /* channels */, filters[i]));
-        }
-
-        // Single multichannel Biquad with different filters per channel.
-        auto test1 = reference;
-        multichannel.process(test1.data(), test1.data(), TEST_LENGTH);
-
-        // Multiple different single channel Biquads applied to the test data, with a stride.
-        auto test2 = reference;
-        for (size_t i = 0; i < biquads.size(); ++i) {
-            biquads[i]->process(test2.data() + i, test2.data() + i, TEST_LENGTH, FILTERS);
-        }
-
-        // Must be equivalent.
-        EXPECT_THAT(test1, Pointwise(FloatNear(EPS), test2));
-    }
-
-    // Test zero fill with coefficients all zero.
-    static void testZeroFill() {
-        constexpr size_t TEST_LENGTH = 1024;
-
-        // Randomize input and output.
-        std::vector<D> reference(TEST_LENGTH);
-        randomBuffer(reference.data(), TEST_LENGTH, 1);
-        std::vector<D> output(TEST_LENGTH);
-        randomBuffer(output.data(), TEST_LENGTH, 1);
-
-        // Single channel Biquad
-        BiquadFilter<D> bqf(1 /* channelCount */, {} /* coefs */);
-
-
-        bqf.process(output.data(), reference.data(), TEST_LENGTH);
-
-        // Result is zero.
-        const std::vector<D> zero(TEST_LENGTH);
-        ASSERT_EQ(zero, output);
-        ASSERT_NE(zero, reference);
-    }
-
-    // Stability check
-    static void testStability() {
-        BiquadFilter<D> bqf(1 /* channels */);
-        constexpr size_t TRIALS = 1000;
-        for (size_t i = 0; i < TRIALS; ++i) {
-            ASSERT_TRUE(bqf.setCoefficients(randomFilter<D>()));
-            ASSERT_FALSE(bqf.setCoefficients(randomUnstableFilter<D>()));
-        }
-    }
-
-    // Constructor, assignment equivalence check
-    static void testEquivalence() {
-        for (size_t channelCount = 1; channelCount < 3; ++channelCount) {
-            BiquadFilter<D> bqf1(channelCount);
-            BiquadFilter<D> bqf2(channelCount);
-            ASSERT_TRUE(bqf1.setCoefficients(randomFilter<D>()));
-            ASSERT_FALSE(bqf2.setCoefficients(randomUnstableFilter<D>()));
-            ASSERT_NE(bqf1, bqf2); // one is stable one isn't, can't be the same.
-            constexpr size_t TRIALS = 10;  // try a few different filters, just to be sure.
-            for (size_t i = 0; i < TRIALS; ++i) {
-                ASSERT_TRUE(bqf1.setCoefficients(randomFilter<D>()));
-                // Copy construction/assignment is equivalent.
-                const auto bqf3 = bqf1;
-                ASSERT_EQ(bqf1, bqf3);
-                const auto bqf4(bqf1);
-                ASSERT_EQ(bqf1, bqf4);
-
-                BiquadFilter<D> bqf5(channelCount);
-                bqf5.setCoefficients(bqf1.getCoefficients());
-                ASSERT_EQ(bqf1, bqf5);
-            }
-        }
-    }
-
-    // Test that 6 coefficient definition reduces to same 5 coefficient definition
-    static void testCoefReductionEquivalence() {
-        std::array<D, 5> coef5 = randomFilter<D>();
-        // The 6 coefficient version has a0.
-        // This should be a power of 2 to be exact for IEEE binary float
-        for (size_t shift = 0; shift < 4; ++shift) {
-            const D a0 = 1 << shift;
-            std::array<D, 6> coef6 = { coef5[0] * a0, coef5[1] * a0, coef5[2] * a0,
-                a0, coef5[3] * a0, coef5[4] * a0
-            };
-            for (size_t channelCount = 1; channelCount < 2; ++channelCount) {
-                BiquadFilter<D> bqf1(channelCount, coef5);
-                BiquadFilter<D> bqf2(channelCount, coef6);
-                ASSERT_EQ(bqf1, bqf2);
-            }
-        }
-    }
-};
-
-using FloatTypes = ::testing::Types<float, double>;
-TYPED_TEST_CASE(BiquadBasicTest, FloatTypes);
-
-TYPED_TEST(BiquadBasicTest, DifferentFiltersPerChannel) {
-    this->testDifferentFiltersPerChannel();
-}
-
-TYPED_TEST(BiquadBasicTest, ZeroFill) {
-    this->testZeroFill();
-}
-
-TYPED_TEST(BiquadBasicTest, Stability) {
-    this->testStability();
-}
-
-TYPED_TEST(BiquadBasicTest, Equivalence) {
-    this->testEquivalence();
-}
-
-TYPED_TEST(BiquadBasicTest, CoefReductionEquivalence) {
-    this->testCoefReductionEquivalence();
-}
diff --git a/audio_utils/tests/build_and_run_biquad_filter.sh b/audio_utils/tests/build_and_run_biquad_filter.sh
deleted file mode 100755
index 5964eaf..0000000
--- a/audio_utils/tests/build_and_run_biquad_filter.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/bash
-#
-# Run tests in this directory.
-#
-
-if [ -z "$ANDROID_BUILD_TOP" ]; then
-    echo "Android build environment not set"
-        exit -1
-fi
-
-# ensure we have mm
-. $ANDROID_BUILD_TOP/build/envsetup.sh
-
-mmma system/media -j
-
-echo "waiting for device"
-
-adb root && adb wait-for-device remount
-
-# location of test files
-testdir="/data/local/tmp/biquadTest"
-
-echo "========================================"
-echo "testing biquad filter"
-adb shell mkdir -p $testdir
-adb push $ANDROID_BUILD_TOP/cts/tests/tests/media/res/raw/sinesweepraw.raw $testdir
-
-adb push $OUT/system/bin/biquad_filter $testdir
-for ch in {1..8}
-    do
-    adb shell $testdir/biquad_filter -ch:$ch $testdir/sinesweepraw.raw \
-        $testdir/sinesweep_$((ch)).raw
-
-    # two channel files should be identical to higher channel
-    # computation (first 2 channels).
-    if [[ "$ch" -gt 2 ]]
-    then
-        adb shell cmp $testdir/sinesweep_2.raw \
-                $testdir/sinesweep_$((ch)).raw
-    fi
-done
-
-adb shell rm -r $testdir
diff --git a/audio_utils/tests/channels_tests.cpp b/audio_utils/tests/channels_tests.cpp
index 9930a77..f454dd2 100644
--- a/audio_utils/tests/channels_tests.cpp
+++ b/audio_utils/tests/channels_tests.cpp
@@ -14,10 +14,14 @@
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "audio_utils_channels_tests"
+
 #include <math.h>
 #include <vector>
 
 #include <gtest/gtest.h>
+#include <log/log.h>
 
 #include <audio_utils/channels.h>
 
@@ -51,60 +55,6 @@
     EXPECT_EQ(0, memcmp(c1.data(), c2.data(), sizeof(c1[0]) * std::min(c1.size(), c2.size())));
 }
 
-TEST(audio_utils_channels, geometry_constexpr) {
-    using namespace android::audio_utils::channels;
-    // fails to compile if not const.
-    constexpr size_t RIGHT_IDX = 1;  // bit position of AUDIO_CHANNEL_OUT_FRONT_RIGHT;
-    static constexpr AUDIO_GEOMETRY_SIDE checkConstexprSide = sideFromChannelIdx(RIGHT_IDX);
-    static constexpr AUDIO_GEOMETRY_HEIGHT checkConstexprHeight = heightFromChannelIdx(RIGHT_IDX);
-    static constexpr AUDIO_GEOMETRY_DEPTH checkConstexprDepth = depthFromChannelIdx(RIGHT_IDX);
-    (void) checkConstexprSide;
-    (void) checkConstexprHeight;
-    (void) checkConstexprDepth;
-
-    static constexpr ssize_t leftIdx = pairIdxFromChannelIdx(RIGHT_IDX);
-    ASSERT_EQ(0, leftIdx);
-}
-
-TEST(audio_utils_channels, geometry_range) {
-    using namespace android::audio_utils::channels;
-    for (size_t i = 0; i < FCC_24 + 2 /* sic */; ++i) {
-        const AUDIO_GEOMETRY_SIDE side = sideFromChannelIdx(i);
-        const AUDIO_GEOMETRY_HEIGHT height = heightFromChannelIdx(i);
-        const AUDIO_GEOMETRY_DEPTH depth = depthFromChannelIdx(i);
-        ASSERT_TRUE(side == AUDIO_GEOMETRY_SIDE_LEFT
-                || side == AUDIO_GEOMETRY_SIDE_RIGHT
-                || side == AUDIO_GEOMETRY_SIDE_CENTER);
-        ASSERT_TRUE(height == AUDIO_GEOMETRY_HEIGHT_BOTTOM
-                || height == AUDIO_GEOMETRY_HEIGHT_MIDDLE
-                || height == AUDIO_GEOMETRY_HEIGHT_TOP);
-        ASSERT_TRUE(depth == AUDIO_GEOMETRY_DEPTH_FRONT
-                || depth == AUDIO_GEOMETRY_DEPTH_MIDDLE
-                || depth == AUDIO_GEOMETRY_DEPTH_BACK);
-    }
-}
-
-TEST(audio_utils_channels, array_lr_pair_matching) {
-    using namespace android::audio_utils::channels;
-    for (size_t i = 0; i < FCC_24; ++i) {
-        const AUDIO_GEOMETRY_SIDE side = sideFromChannelIdx(i);
-        const ssize_t pairIdx = pairIdxFromChannelIdx(i);
-        switch (side) {
-        case AUDIO_GEOMETRY_SIDE_LEFT:
-        case AUDIO_GEOMETRY_SIDE_RIGHT: {
-            ASSERT_GE(pairIdx, 0);
-            ASSERT_LT(pairIdx, FCC_24);
-            const AUDIO_GEOMETRY_SIDE pairSide = side == AUDIO_GEOMETRY_SIDE_LEFT
-                    ? AUDIO_GEOMETRY_SIDE_RIGHT : AUDIO_GEOMETRY_SIDE_LEFT;
-            ASSERT_EQ(pairSide, sideFromChannelIdx(pairIdx));
-        } break;
-        case AUDIO_GEOMETRY_SIDE_CENTER:
-            ASSERT_EQ(-1, pairIdx);
-            break;
-        }
-    }
-}
-
 TEST(audio_utils_channels, adjust_channels) {
     constexpr size_t size = 65536;
     std::vector<uint16_t> u16ref(size);
diff --git a/audio_utils/tests/errorlog_tests.cpp b/audio_utils/tests/errorlog_tests.cpp
index 8909691..491d43b 100644
--- a/audio_utils/tests/errorlog_tests.cpp
+++ b/audio_utils/tests/errorlog_tests.cpp
@@ -89,7 +89,7 @@
     error_log_t *error_log =
             error_log_create(100 /* lines */, 1000000000 /* one second aggregation */);
 
-    // just a soundness test
+    // just a sanity test
     error_log_log(error_log, 2 /* code */, 1 /* now_ns */);
     error_log_dump(error_log, 0 /* fd */, "  " /* prefix */, 0 /* lines */, 0 /* limit_ns */);
     error_log_destroy(error_log);
diff --git a/audio_utils/tests/fifo_multiprocess.cpp b/audio_utils/tests/fifo_multiprocess.cpp
index f62dc8f..212bf78 100644
--- a/audio_utils/tests/fifo_multiprocess.cpp
+++ b/audio_utils/tests/fifo_multiprocess.cpp
@@ -31,7 +31,7 @@
 #define FRAME_SIZE sizeof(int16_t)
 #define BUFFER_SIZE (FRAME_COUNT * FRAME_SIZE)
 
-int main(int argc __attribute__((unused)), char **argv __attribute__((unused)))
+int main(int argc __unused, char **argv __unused)
 {
     // TODO Add error checking for ashmem_create_region and mmap
 
diff --git a/audio_utils/tests/fifo_threads.cpp b/audio_utils/tests/fifo_threads.cpp
index 8eb44f0..83a0cdf 100644
--- a/audio_utils/tests/fifo_threads.cpp
+++ b/audio_utils/tests/fifo_threads.cpp
@@ -19,7 +19,6 @@
 #include <stdio.h>
 #include <unistd.h>
 #include <audio_utils/fifo.h>
-
 extern "C" {
 #include "getch.h"
 }
diff --git a/audio_utils/tests/format_tests.cpp b/audio_utils/tests/format_tests.cpp
index bf2d490..c21a89e 100644
--- a/audio_utils/tests/format_tests.cpp
+++ b/audio_utils/tests/format_tests.cpp
@@ -34,7 +34,7 @@
             || format == AUDIO_FORMAT_PCM_FLOAT;
 }
 
-// Initialize PCM 16 bit ramp for basic data validation (generated from PCM 8 bit data).
+// Initialize PCM 16 bit ramp for basic data sanity check (generated from PCM 8 bit data).
 // TODO: consider creating fillPseudoRandomValue().
 template<size_t size>
 static void fillRamp(int16_t(&buffer)[size])
diff --git a/audio_utils/tests/intrinsic_tests.cpp b/audio_utils/tests/intrinsic_tests.cpp
deleted file mode 100644
index 6a16747..0000000
--- a/audio_utils/tests/intrinsic_tests.cpp
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <audio_utils/intrinsic_utils.h>
-
-#include <gtest/gtest.h>
-
-template <typename D>
-class IntrisicUtilsTest : public ::testing::Test { };
-
-// Basic intrinsic tests which are run on the simple scalar types (no NEON SIMD vector registers).
-using FloatTypes = ::testing::Types<float, double>;
-TYPED_TEST_CASE(IntrisicUtilsTest, FloatTypes);
-
-TYPED_TEST(IntrisicUtilsTest, vdupn) {
-    constexpr TypeParam value = 1.f;
-    ASSERT_EQ(value, android::audio_utils::intrinsics::vdupn<TypeParam>(value));
-}
-
-TYPED_TEST(IntrisicUtilsTest, vld1) {
-    constexpr TypeParam value = 2.f;
-    ASSERT_EQ(value, android::audio_utils::intrinsics::vld1<TypeParam>(&value));
-}
-
-TYPED_TEST(IntrisicUtilsTest, vmla) {
-    constexpr TypeParam a = 2.125f;
-    constexpr TypeParam b = 2.25f;
-    constexpr TypeParam c = 2.5f;
-    constexpr TypeParam result = c + a * b;
-    ASSERT_EQ(result, android::audio_utils::intrinsics::vmla(c, a, b));
-}
-
-TYPED_TEST(IntrisicUtilsTest, vmul) {
-    constexpr TypeParam a = 2.25f;
-    constexpr TypeParam b = 2.5f;
-    constexpr TypeParam result = a * b;
-    ASSERT_EQ(result, android::audio_utils::intrinsics::vmul(a, b));
-}
-
-TYPED_TEST(IntrisicUtilsTest, vneg) {
-    constexpr TypeParam value = 3.125f;
-    ASSERT_EQ(-value, android::audio_utils::intrinsics::vneg(value));
-}
-
-TYPED_TEST(IntrisicUtilsTest, vst1) {
-    constexpr TypeParam value = 2.f;
-    TypeParam destination = 1.f;
-    android::audio_utils::intrinsics::vst1(
-            &destination, android::audio_utils::intrinsics::vdupn<TypeParam>(value));
-    ASSERT_EQ(value, destination);
-}
diff --git a/audio_utils/tests/metadata_tests.cpp b/audio_utils/tests/metadata_tests.cpp
index 3856dc0..c9603cf 100644
--- a/audio_utils/tests/metadata_tests.cpp
+++ b/audio_utils/tests/metadata_tests.cpp
@@ -14,11 +14,14 @@
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "audio_utils_metadata_tests"
+
 #define METADATA_TESTING
 
 #include <audio_utils/Metadata.h>
 #include <gtest/gtest.h>
-#include <stdio.h>
+#include <log/log.h>
 
 #include <error.h>
 #include <iostream>
@@ -100,7 +103,7 @@
         arg = dummy{}; // not an expected type, apply will fail with false.
         std::any result;
 
-        ASSERT_FALSE(primitive_metadata_types::apply([&](auto *t __attribute__((unused))) {
+        ASSERT_FALSE(primitive_metadata_types::apply([&](auto *t __unused) {
                 value++;
             }, &arg, &result));
 
@@ -110,7 +113,7 @@
         // try to apply with a valid argument.
         arg = (int)1;
 
-        ASSERT_TRUE(primitive_metadata_types::apply([&](auto *t __attribute__((unused))) {
+        ASSERT_TRUE(primitive_metadata_types::apply([&](auto *t __unused) {
                 value++;
             }, &arg, &result));
 
@@ -124,7 +127,7 @@
         arg = (int)1;
         std::any result;
 
-        ASSERT_TRUE(primitive_metadata_types::apply([&](auto *t __attribute__((unused))) {
+        ASSERT_TRUE(primitive_metadata_types::apply([&](auto *t __unused) {
                 value++;
                 return (int32_t)2;
             }, &arg, &result));
@@ -295,7 +298,7 @@
     d.emplace("data", s);
 
     ByteString bs = byteStringFromData(d);
-    printf("%s\n", toString(bs).c_str());
+    ALOGD("%s", toString(bs).c_str());
 
     // Since we use a map instead of a hashmap
     // layout order of elements is precisely defined.
@@ -366,14 +369,14 @@
     ByteString bs;
 
     copyToByteString((int32_t)123, bs);
-    printf("123 -> %s\n", toString(bs).c_str());
+    ALOGD("123 -> %s", toString(bs).c_str());
     const ByteString ref1{ 0x7b, 0x00, 0x00, 0x00 };
     ASSERT_EQ(ref1, bs);
 
     bs.clear();
     // for copyToByteString use std::string instead of char array.
     copyToByteString(std::string("hi"), bs);
-    printf("\"hi\" -> %s\n", toString(bs).c_str());
+    ALOGD("\"hi\" -> %s", toString(bs).c_str());
     const ByteString ref2{ 0x02, 0x00, 0x00, 0x00, 0x68, 0x69 };
     ASSERT_EQ(ref2, bs);
 
@@ -382,7 +385,7 @@
     d.emplace("hello", "world");
     d.emplace("value", (int32_t)1000);
     copyToByteString(d, bs);
-    printf("{{\"hello\", \"world\"}, {\"value\", 1000}} -> %s\n", toString(bs).c_str());
+    ALOGD("{{\"hello\", \"world\"}, {\"value\", 1000}} -> %s", toString(bs).c_str());
     const ByteString ref3{
         0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00,
         0x68, 0x65, 0x6c, 0x6c, 0x6f, 0x05, 0x00, 0x00,
@@ -394,7 +397,7 @@
     ASSERT_EQ(ref3, bs);
 };
 
-// Test C API from C++
+// Test C API
 TEST(metadata_tests, c) {
     audio_metadata_t *metadata = audio_metadata_create();
     Data d;
@@ -413,15 +416,6 @@
     audio_metadata_t *data = audio_metadata_create();
     audio_metadata_put(data, "string", "hello");
     audio_metadata_put(metadata, "data", data);
-#if 0   // candidate function not viable: no known conversion
-    {
-        static const struct complex {
-            float re;
-            float im;
-        } prime = { -5.0, -4.0 };
-        audio_metadata_put(metadata, "complex", prime);
-    }
-#endif
     audio_metadata_destroy(data);
 
     int32_t i32Val;
@@ -454,19 +448,13 @@
     ASSERT_EQ(-EINVAL, audio_metadata_get(metadata, "i32", nullI32Val));
 
     uint8_t *bs = nullptr;
-    ssize_t length = byte_string_from_audio_metadata(metadata, &bs);
-    ASSERT_GT(length, 0); // if gt 0, the bs has been updated to a new value.
-    ASSERT_EQ((size_t)length, audio_metadata_byte_string_len(bs));
-    ASSERT_EQ((size_t)length, dataByteStringLen(bs));
+    size_t length = byte_string_from_audio_metadata(metadata, &bs);
     ASSERT_EQ(byteStringFromData(d).size(), ByteString(bs, length).size());
     audio_metadata_t *metadataFromBs = audio_metadata_from_byte_string(bs, length);
     free(bs);
     bs = nullptr;
     length = byte_string_from_audio_metadata(metadataFromBs, &bs);
-    ASSERT_GT(length, 0); // if gt 0, the bs has been updated to a new value.
     ASSERT_EQ(byteStringFromData(d), ByteString(bs, length));
-    ASSERT_EQ((size_t)length, audio_metadata_byte_string_len(bs));
-    ASSERT_EQ((size_t)length, dataByteStringLen(bs));
     free(bs);
     bs = nullptr;
     audio_metadata_destroy(metadataFromBs);
@@ -475,11 +463,7 @@
     ASSERT_EQ(-EINVAL, byte_string_from_audio_metadata(metadata, nullBs));
 
     ASSERT_EQ(1, audio_metadata_erase(metadata, "data"));
-    // initialize to a known invalid pointer
-    dataVal = reinterpret_cast<audio_metadata_t *>(reinterpret_cast<intptr_t>(nullptr) + 1);
-    ASSERT_EQ(-ENOENT, audio_metadata_get(metadata, "data", &dataVal));
-    // confirm that a failed get will assign nullptr; be sure to
-    // update test if API behavior is changed to not assign nullptr on error
+    audio_metadata_get(metadata, "data", dataVal);
     ASSERT_EQ(nullptr, dataVal);
     ASSERT_EQ(0, audio_metadata_erase(metadata, "data"));
     ASSERT_EQ(-EINVAL, audio_metadata_erase(nullMetadata, "key"));
@@ -487,25 +471,3 @@
 
     audio_metadata_destroy(metadata);
 };
-
-TEST(metadata_tests, empty_data_c) {
-    std::unique_ptr<audio_metadata_t, decltype(&audio_metadata_destroy)>
-        metadata{audio_metadata_create(), audio_metadata_destroy};  // empty metadata container.
-    uint8_t *bs = nullptr;
-    ssize_t length = byte_string_from_audio_metadata(metadata.get(), &bs);
-    ASSERT_GT(length, 0); // if gt 0, the bs has been updated to a new value.
-    std::unique_ptr<uint8_t, decltype(&free)> bs_scoped_deleter{bs, free};
-    ASSERT_EQ((size_t)length, audio_metadata_byte_string_len(bs));
-    ASSERT_EQ((size_t)length, dataByteStringLen(bs));
-
-    Data d;  // empty metadata container.
-    ASSERT_EQ(byteStringFromData(d).size(), ByteString(bs, length).size());
-    std::unique_ptr<audio_metadata_t, decltype(&audio_metadata_destroy)>
-            metadataFromBs{audio_metadata_from_byte_string(bs, length), audio_metadata_destroy};
-    length = byte_string_from_audio_metadata(metadataFromBs.get(), &bs);
-    ASSERT_GT(length, 0); // if gt 0, the bs has been updated to a new value.
-    bs_scoped_deleter.reset(bs);
-    ASSERT_EQ(byteStringFromData(d), ByteString(bs, length));
-    ASSERT_EQ((size_t)length, audio_metadata_byte_string_len(bs));
-    ASSERT_EQ((size_t)length, dataByteStringLen(bs));
-};
diff --git a/audio_utils/tests/metadata_tests_c.c b/audio_utils/tests/metadata_tests_c.c
deleted file mode 100644
index 4689c85..0000000
--- a/audio_utils/tests/metadata_tests_c.c
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// Separate test for Metadata C API called from C, as gtest doesn't support that
-
-#include <stdlib.h>
-#include <audio_utils/Metadata.h>
-
-int main(int argc, char **argv)
-{
-    (void) argc;
-    (void) argv;
-
-    audio_metadata_t *metadata = audio_metadata_create();
-    audio_metadata_put(metadata, "i32", (int32_t)1);
-    audio_metadata_put(metadata, "i64", (int64_t)2);
-    audio_metadata_put(metadata, "float", (float)3.1f);
-    audio_metadata_put(metadata, "double", (double)4.11);
-    audio_metadata_t *data = audio_metadata_create();
-    audio_metadata_put(data, "string", "hello");
-    audio_metadata_put(metadata, "data", data);
-#if 0   // change to 1 for compile error: use of undeclared identifier 'audio_metadata_put_unknown'
-    {
-        static const struct complex {
-            float re;
-            float im;
-        } prime = { -5.0, -4.0 };
-        audio_metadata_put(metadata, "complex", prime);
-    }
-#endif
-    audio_metadata_destroy(data);
-
-    // TODO Test audio_metadata_get()
-
-    audio_metadata_destroy(metadata);
-    return EXIT_SUCCESS;
-}
diff --git a/audio_utils/tests/powerlog_tests.cpp b/audio_utils/tests/powerlog_tests.cpp
index 6a84134..2a7988d 100644
--- a/audio_utils/tests/powerlog_tests.cpp
+++ b/audio_utils/tests/powerlog_tests.cpp
@@ -47,60 +47,33 @@
     plog->log(&half, 1 /* frame */, 2 /* nowNs */);
 
     // one line / signal
-    EXPECT_EQ((size_t)2, countNewLines(plog->dumpToString(
-            "" /* prefix */, 0 /* lines */, 0 /* limitNs */, false /* logPlot */)));
-
-    // one line / signal + logplot
-    EXPECT_EQ((size_t)20, countNewLines(plog->dumpToString()));
+    EXPECT_EQ((size_t)2, countNewLines(plog->dumpToString()));
 
     plog->log(&zero, 1 /* frame */, 3 /* nowNs */);
     // zero termination doesn't change this.
-    EXPECT_EQ((size_t)20, countNewLines(plog->dumpToString()));
+    EXPECT_EQ((size_t)2, countNewLines(plog->dumpToString()));
 
     // but adding next line does.
     plog->log(&half, 1 /* frame */, 4 /* nowNs */);
-    EXPECT_EQ((size_t)21, countNewLines(plog->dumpToString()));
+    EXPECT_EQ((size_t)3, countNewLines(plog->dumpToString()));
 
-    // truncating on lines (this does not include the logplot).
-    EXPECT_EQ((size_t)20, countNewLines(plog->dumpToString(
+    // truncating on lines
+    EXPECT_EQ((size_t)2, countNewLines(plog->dumpToString(
             "" /* prefix */, 2 /* lines */)));
 
-    // truncating on time as well.
-    EXPECT_EQ((size_t)21, countNewLines(plog->dumpToString(
+    // truncating on time
+    EXPECT_EQ((size_t)3, countNewLines(plog->dumpToString(
             "" /* prefix */, 0 /* lines */, 2 /* limitNs */)));
-    // truncating on different time limit.
-    EXPECT_EQ((size_t)20, countNewLines(plog->dumpToString(
+    EXPECT_EQ((size_t)2, countNewLines(plog->dumpToString(
             "" /* prefix */, 0 /* lines */, 3 /* limitNs */)));
-
-    // truncating on a larger line count (this doesn't include the logplot).
-    EXPECT_EQ((size_t)21, countNewLines(plog->dumpToString(
-            "" /* prefix */, 3 /* lines */, 2 /* limitNs */)));
-
     plog->dump(0 /* fd (stdout) */);
 
     // The output below depends on the local time zone.
     // The indentation below is exact, check alignment.
     /*
 Signal power history:
-01-01 00:00:00.000: [   -6.0   -6.0   -6.0 ] sum(-1.2)
-01-01 00:00:00.000: [   -6.0
-
--0.0 -|   |
--1.0 -|   |
--2.0 -|   |
--3.0 -|   |
--4.0 -|   |
--5.0 -|   |
--6.0 -|***|
--7.0 -|   |
--8.0 -|   |
--9.0 -|   |
--10.0 -|   |
--11.0 -|   |
--12.0 -|   |
--13.0 -|   |
-|____
-
+ 12-31 16:00:00.000: [   -6.0   -6.0   -6.0 ] sum(-1.2)
+ 12-31 16:00:00.000: [   -6.0
      */
 }
 
@@ -112,7 +85,7 @@
             100 /* entries */,
             1 /* frames_per_entry */);
 
-    // soundness test
+    // sanity test
     const int16_t zero = 0;
     const int16_t quarter = 0x2000;
 
diff --git a/audio_utils/benchmarks/primitives_benchmark.cpp b/audio_utils/tests/primitives_benchmark.cpp
similarity index 100%
rename from audio_utils/benchmarks/primitives_benchmark.cpp
rename to audio_utils/tests/primitives_benchmark.cpp
diff --git a/audio_utils/tests/primitives_tests.cpp b/audio_utils/tests/primitives_tests.cpp
index 46fb8ff..7eebb06 100644
--- a/audio_utils/tests/primitives_tests.cpp
+++ b/audio_utils/tests/primitives_tests.cpp
@@ -14,10 +14,14 @@
  * limitations under the License.
  */
 
+//#define LOG_NDEBUG 0
+#define LOG_TAG "audio_utils_primitives_tests"
+
 #include <math.h>
 #include <vector>
 
 #include <gtest/gtest.h>
+#include <log/log.h>
 
 #include <audio_utils/primitives.h>
 #include <audio_utils/format.h>
@@ -47,6 +51,7 @@
     uint8_t uval = clamp8_from_float((f - 128) / (1 << 7));
 
     // test clamping
+    ALOGV("clamp8_from_float(%f) = %u\n", f, uval);
     if (f > lim8pos) {
         EXPECT_EQ(lim8pos, uval);
     } else if (f < lim8neg) {
@@ -66,6 +71,7 @@
     int16_t ival = clamp16_from_float(f / (1 << 15));
 
     // test clamping
+    ALOGV("clamp16_from_float(%f) = %d\n", f, ival);
     if (f > lim16pos) {
         EXPECT_EQ(lim16pos, ival);
     } else if (f < lim16neg) {
@@ -85,6 +91,7 @@
     int32_t ival = clamp24_from_float(f / (1 << 23));
 
     // test clamping
+    ALOGV("clamp24_from_float(%f) = %d\n", f, ival);
     if (f > lim24pos) {
         EXPECT_EQ(lim24pos, ival);
     } else if (f < lim24neg) {
@@ -374,7 +381,7 @@
     dst_mask = 0x8d;
     memset(u16ary, 0x99, 65536 * sizeof(u16ref[0]));
     memcpy_by_channel_mask(u16ary, dst_mask, u16ref, src_mask, sizeof(u16ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     EXPECT_EQ((size_t)0, nonZeroMono16((int16_t*)u16ary, 65530));
 
     // Test when dst_mask is 0.  Nothing should be copied.
@@ -389,7 +396,7 @@
     src_mask = dst_mask = 0x8d;
     memset(u16ary, 0x99, 65536 * sizeof(u16ref[0]));
     memcpy_by_channel_mask(u16ary, dst_mask, u16ref, src_mask, sizeof(u16ref[0]), 555);
-    EXPECT_EQ(0, memcmp(u16ary, u16ref, 555 * sizeof(u16ref[0]) * __builtin_popcount(dst_mask)));
+    EXPECT_EQ(0, memcmp(u16ary, u16ref, 555 * sizeof(u16ref[0]) * popcount(dst_mask)));
 
     // Test with a gap in source:
     // Input 3 samples, output 4 samples, one zero inserted.
@@ -397,7 +404,7 @@
     dst_mask = 0x8d;
     memset(u16ary, 0x9, 65536 * sizeof(u16ary[0]));
     memcpy_by_channel_mask(u16ary, dst_mask, u16ref, src_mask, sizeof(u16ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     checkMonotoneOrZero(u16ary, 65536);
     EXPECT_EQ((size_t)(65536 * 3 / 4 - 1), nonZeroMono16((int16_t*)u16ary, 65536));
 
@@ -407,7 +414,7 @@
     dst_mask = 0x8c;
     memset(u16ary, 0x9, 65536 * sizeof(u16ary[0]));
     memcpy_by_channel_mask(u16ary, dst_mask, u16ref, src_mask, sizeof(u16ref[0]),
-            65536 / __builtin_popcount(src_mask));
+            65536 / popcount(src_mask));
     checkMonotone(u16ary, 65536 * 3 / 4);
 
     delete[] u16ref;
@@ -418,7 +425,7 @@
         const void *src, uint32_t src_mask, size_t sample_size, size_t count)
 {
     int8_t idxary[32];
-    uint32_t src_channels = __builtin_popcount(src_mask);
+    uint32_t src_channels = popcount(src_mask);
     uint32_t dst_channels =
             memcpy_by_index_array_initialization(idxary, 32, dst_mask, src_mask);
 
@@ -452,7 +459,7 @@
     dst_mask = 0x8d;
     memset(u24ary, 0x99, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask2(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     EXPECT_EQ((size_t)0, nonZeroMono16((int16_t*)u16ary, 65530));
 
@@ -469,7 +476,7 @@
     src_mask = dst_mask = 0x8d;
     memset(u24ary, 0x99, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask2(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]), 555);
-    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * __builtin_popcount(dst_mask)));
+    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * popcount(dst_mask)));
 
     // Test with a gap in source:
     // Input 3 samples, output 4 samples, one zero inserted.
@@ -477,7 +484,7 @@
     dst_mask = 0x8d;
     memset(u24ary, 0x9, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask2(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     checkMonotoneOrZero(u16ary, 65536);
     EXPECT_EQ((size_t)(65536 * 3 / 4 - 1), nonZeroMono16((int16_t*)u16ary, 65536));
@@ -488,7 +495,7 @@
     dst_mask = 0x8c;
     memset(u24ary, 0x9, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask2(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(src_mask));
+            65536 / popcount(src_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     checkMonotone(u16ary, 65536 * 3 / 4);
 
@@ -502,7 +509,7 @@
         const void *src, uint32_t src_mask, size_t sample_size, size_t count)
 {
     int8_t idxary[32];
-    uint32_t src_channels = __builtin_popcount(src_mask);
+    uint32_t src_channels = popcount(src_mask);
     uint32_t dst_channels =
             memcpy_by_index_array_initialization_dst_index(idxary, 32, dst_mask, src_mask);
 
@@ -536,7 +543,7 @@
     dst_mask = 0x8d;
     memset(u24ary, 0x99, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_dst_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     EXPECT_EQ((size_t)0, nonZeroMono16((int16_t*)u16ary, 65530));
 
@@ -554,7 +561,7 @@
     dst_mask = 0x0f;
     memset(u24ary, 0x99, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_dst_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]), 555);
-    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * __builtin_popcount(dst_mask)));
+    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * popcount(dst_mask)));
 
     // Test with a gap in source:
     // Input 3 samples, output 4 samples, one zero inserted.
@@ -562,7 +569,7 @@
     dst_mask = 0x0f;
     memset(u24ary, 0x9, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_dst_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     checkMonotoneOrZero(u16ary, 65536);
     EXPECT_EQ((size_t)(65536 * 3 / 4 - 1), nonZeroMono16((int16_t*)u16ary, 65536));
@@ -573,7 +580,7 @@
     dst_mask = 0x07;
     memset(u24ary, 0x9, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_dst_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(src_mask));
+            65536 / popcount(src_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     checkMonotone(u16ary, 65536 * 3 / 4);
 
@@ -587,7 +594,7 @@
         const void *src, uint32_t src_mask, size_t sample_size, size_t count)
 {
     int8_t idxary[32];
-    uint32_t src_channels = __builtin_popcount(src_mask);
+    uint32_t src_channels = popcount(src_mask);
     uint32_t dst_channels =
             memcpy_by_index_array_initialization_src_index(idxary, 32, dst_mask, src_mask);
 
@@ -621,7 +628,7 @@
     dst_mask = 0x8d;
     memset(u24ary, 0x99, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_src_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     EXPECT_EQ((size_t)0, nonZeroMono16((int16_t*)u16ary, 65530));
 
@@ -639,14 +646,14 @@
     dst_mask = 0xf;
     memset(u24ary, 0x99, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_src_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]), 555);
-    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * __builtin_popcount(dst_mask)));
+    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * popcount(dst_mask)));
 
     // Test when source mask must copy to dst mask.  One to one copy.
     src_mask = 0xf;
     dst_mask = 0x8d;
     memset(u24ary, 0x99, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_src_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]), 555);
-    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * __builtin_popcount(dst_mask)));
+    EXPECT_EQ(0, memcmp(u24ary, u24ref, 555 * sizeof(u24ref[0]) * popcount(dst_mask)));
 
     // Test with a gap in source:
     // Input 3 samples, output 4 samples, one zero inserted.
@@ -654,7 +661,7 @@
     dst_mask = 0x8d;
     memset(u24ary, 0x9, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_src_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(dst_mask));
+            65536 / popcount(dst_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     checkMonotoneOrZero(u16ary, 65536);
     EXPECT_EQ((size_t)(65536 * 3 / 4 - 1), nonZeroMono16((int16_t*)u16ary, 65536));
@@ -665,7 +672,7 @@
     dst_mask = 0x8c;
     memset(u24ary, 0x9, 65536 * sizeof(u24ary[0]));
     memcpy_by_channel_mask_src_index(u24ary, dst_mask, u24ref, src_mask, sizeof(u24ref[0]),
-            65536 / __builtin_popcount(src_mask));
+            65536 / popcount(src_mask));
     memcpy_to_i16_from_p24((int16_t*)u16ary, (uint8_t*)u24ary, 65536);
     checkMonotone(u16ary, 65536 * 3 / 4);
 
diff --git a/audio_utils/benchmarks/statistics_benchmark.cpp b/audio_utils/tests/statistics_benchmark.cpp
similarity index 100%
rename from audio_utils/benchmarks/statistics_benchmark.cpp
rename to audio_utils/tests/statistics_benchmark.cpp
diff --git a/audio_utils/tests/timestampverifier_tests.cpp b/audio_utils/tests/timestampverifier_tests.cpp
index a811823..f2e6543 100644
--- a/audio_utils/tests/timestampverifier_tests.cpp
+++ b/audio_utils/tests/timestampverifier_tests.cpp
@@ -36,7 +36,7 @@
         t += (int64_t)1e9;
     }
     for (size_t i = 0; i < discontinuities; ++i) {
-        tv.discontinuity(tv.DISCONTINUITY_MODE_CONTINUOUS);
+        tv.discontinuity();
     }
     for (size_t i = 0; i < errors; ++i) {
         tv.error();
@@ -103,6 +103,7 @@
 TEST(TimestampVerifier, discontinuity_zero)
 {
     android::TimestampVerifier<int64_t, int64_t> tv;
+    tv.setDiscontinuityMode(tv.DISCONTINUITY_MODE_ZERO);
 
     // Add timestamps advancing at normal rate over 2 seconds
     tv.add(0, 0, 48000);
@@ -110,7 +111,7 @@
     tv.add(96000, 2000000000, 48000);
 
     // Raise (mode zero) discontinuity at "3 seconds"
-    tv.discontinuity(tv.DISCONTINUITY_MODE_ZERO);
+    tv.discontinuity();
     // Add timestamp where frame count has reset to zero (and not advancing)
     tv.add(0, 3000000000, 48000);
 
diff --git a/audio_utils/tinysndfile.c b/audio_utils/tinysndfile.c
index 73b27a5..e94bb65 100644
--- a/audio_utils/tinysndfile.c
+++ b/audio_utils/tinysndfile.c
@@ -182,7 +182,7 @@
                 fseek(stream, (long) (chunkSize - minSize), SEEK_CUR);
             }
             unsigned channels = little2u(&fmt[2]);
-            if ((channels < 1) || (channels > FCC_LIMIT)) {
+            if ((channels < 1) || (channels > FCC_8)) {
 #ifdef HAVE_STDERR
                 fprintf(stderr, "unsupported channels %u\n", channels);
 #endif
diff --git a/camera/Android.bp b/camera/Android.bp
index 02808c2..fdd9b0f 100644
--- a/camera/Android.bp
+++ b/camera/Android.bp
@@ -1,20 +1,10 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 subdirs = ["tests"]
 
 cc_library_shared {
     name: "libcamera_metadata",
     vendor_available: true,
-    product_available: true,
     // TODO(b/153609531): remove when no longer needed.
     native_bridge_supported: true,
-    host_supported: true,
     vndk: {
         enabled: true,
     },
@@ -55,8 +45,3 @@
         },
     },
 }
-
-filegroup {
-    name: "libcamera_metadata_tags_file",
-    srcs: ["include/system/camera_metadata_tags.h"],
-}
diff --git a/camera/docs/ACameraMetadata.mako b/camera/docs/ACameraMetadata.mako
index effa5ea..b65efc1 100644
--- a/camera/docs/ACameraMetadata.mako
+++ b/camera/docs/ACameraMetadata.mako
@@ -67,7 +67,7 @@
 // System tags that should be hidden from users
 std::unordered_set<uint32_t> ACameraMetadata::sSystemTags ({
     % for sec in find_all_sections(metadata):
-      % for entry in remove_synthetic_or_fwk_only(find_unique_entries(sec)):
+      % for entry in remove_synthetic(find_unique_entries(sec)):
         % if entry.applied_visibility == "system":
     ${entry.name | csym},
         % endif
diff --git a/camera/docs/CameraMetadataEnums.mako b/camera/docs/CameraMetadataEnums.mako
index 0541804..30d3940 100644
--- a/camera/docs/CameraMetadataEnums.mako
+++ b/camera/docs/CameraMetadataEnums.mako
@@ -29,7 +29,7 @@
     // Enumeration values for ${target_class}#${entry.name | jkey_identifier}
     //
 
-  % for value in [v for v in entry.enum.values if v.visibility != 'system']:
+  % for value in entry.enum.values:
     /**
     % if value.notes:
 ${value.notes | javadoc(metadata)}\
@@ -48,9 +48,6 @@
     % if value.deprecated:
     @Deprecated
     % endif
-    % if value.visibility == 'test':
-    @TestApi
-    % endif
     public static final int ${jenum_value(entry, value)} = ${enum_calculate_value_string(value)};
 
   % endfor
diff --git a/camera/docs/CameraMetadataKeys.mako b/camera/docs/CameraMetadataKeys.mako
index ac3a920..c53f5d6 100644
--- a/camera/docs/CameraMetadataKeys.mako
+++ b/camera/docs/CameraMetadataKeys.mako
@@ -54,7 +54,7 @@
      * @deprecated
 ${entry.deprecation_description | javadoc(metadata)}
   % endif
-  % if entry.applied_visibility in ('hidden', 'ndk_public', 'fwk_only'):
+  % if entry.applied_visibility in ('hidden', 'ndk_public'):
      * @hide
   % endif
      */
@@ -77,17 +77,17 @@
 % for outer_namespace in metadata.outer_namespaces: ## assumes single 'android' namespace
   % for section in outer_namespace.sections:
     % if section.find_first(lambda x: isinstance(x, metadata_model.Entry) and x.kind == xml_name) and \
-         any_visible(section, xml_name, ('public','hidden','ndk_public','java_public','fwk_only') ):
+         any_visible(section, xml_name, ('public','hidden','ndk_public','java_public') ):
       % for inner_namespace in get_children_by_filtering_kind(section, xml_name, 'namespaces'):
 ## We only support 1 level of inner namespace, i.e. android.a.b and android.a.b.c works, but not android.a.b.c.d
 ## If we need to support more, we should use a recursive function here instead.. but the indentation gets trickier.
-        % for entry in filter_visibility(inner_namespace.merged_entries, ('hidden','public', 'ndk_public', 'java_public ', 'fwk_only')):
+        % for entry in filter_visibility(inner_namespace.merged_entries, ('hidden','public', 'ndk_public', 'java_public')):
 ${generate_key(entry)}
        % endfor
     % endfor
     % for entry in filter_visibility( \
         get_children_by_filtering_kind(section, xml_name, 'merged_entries'), \
-                                         ('hidden', 'public', 'ndk_public', 'java_public', 'fwk_only')):
+                                         ('hidden', 'public', 'ndk_public', 'java_public')):
 ${generate_key(entry)}
     % endfor
     % endif
diff --git a/camera/docs/HidlMetadata.mako b/camera/docs/HidlMetadata.mako
index da69588..2677021 100644
--- a/camera/docs/HidlMetadata.mako
+++ b/camera/docs/HidlMetadata.mako
@@ -1,6 +1,6 @@
 ## -*- coding: utf-8 -*-
 /*
- * Copyright (C) ${copyright_year()} The Android Open Source Project
+ * Copyright (C) 2017 The Android Open Source Project
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -97,7 +97,7 @@
 enum CameraMetadataTag : ${'uint32_t' if first_hal_minor_version(hal_major_version()) == hal_minor_version() else '@%d.%d::CameraMetadataTag' % (hal_major_version(), hal_minor_version()-1)} {
     % for sec in find_all_sections(metadata):
 <%    gotEntries = False %>\
-      % for idx,entry in enumerate(filter_added_in_hal_version(remove_synthetic_or_fwk_only(find_unique_entries(sec)), hal_major_version(), hal_minor_version())):
+      % for idx,entry in enumerate(filter_added_in_hal_version(remove_synthetic(find_unique_entries(sec)), hal_major_version(), hal_minor_version())):
 <%      gotEntries = True %>\
     /** ${entry.name} [${entry.kind}, ${annotated_type(entry)}, ${entry.applied_visibility}]
         % if entry.description:
@@ -128,7 +128,7 @@
  * Enumeration definitions for the various entries that need them
  */
 % for sec in find_all_sections(metadata):
-  % for entry in filter_has_enum_values_added_in_hal_version(remove_synthetic_or_fwk_only(find_unique_entries(sec)), hal_major_version(), hal_minor_version()):
+  % for entry in filter_has_enum_values_added_in_hal_version(remove_synthetic(find_unique_entries(sec)), hal_major_version(), hal_minor_version()):
     % if entry.enum:
 
 <%    isFirstValue = True %>\
diff --git a/camera/docs/camera_device_info.mako b/camera/docs/camera_device_info.mako
index c4eba63..a98a9ae 100644
--- a/camera/docs/camera_device_info.mako
+++ b/camera/docs/camera_device_info.mako
@@ -77,37 +77,26 @@
         repeated int32 black_level_pattern = 1;
     }
 
-    message MultiResolutionStreamConfigurations {
-        message MultiResolutionStreamConfig {
-            optional int32 format = 1;
-            optional int32 width = 2;
-            optional int32 height = 3;
-            optional string cameraId = 4;
-            optional bool input = 5;
-        }
-        repeated MultiResolutionStreamConfig availableMultiResolutionConfigurations = 1;
-    }
-
     optional string cameraId = 1;
 
     // Start of codegen fields
-<%
+<%\
   section_idx = 1
 %>\
 % for sec in find_all_sections(metadata):
 ## Reserve 2^16 tag id space for each section
-<%
+<%\
   idx = section_idx * pow(2,16)
 %>\
 % for entry in find_unique_entries(sec):
 % if entry.kind == 'static' and entry.visibility in ("public", "java_public"):
     ${protobuf_type(entry)} ${protobuf_name(entry)} = ${idx};
-<%
-    idx += 1
+<%\
+  idx += 1
 %>\
 % endif
 % endfor
-<%
+<%\
   section_idx += 1
 %>\
 % endfor
diff --git a/camera/docs/camera_device_info.proto b/camera/docs/camera_device_info.proto
index 33fa962..618f883 100644
--- a/camera/docs/camera_device_info.proto
+++ b/camera/docs/camera_device_info.proto
@@ -77,17 +77,6 @@
         repeated int32 black_level_pattern = 1;
     }
 
-    message MultiResolutionStreamConfigurations {
-        message MultiResolutionStreamConfig {
-            optional int32 format = 1;
-            optional int32 width = 2;
-            optional int32 height = 3;
-            optional string cameraId = 4;
-            optional bool input = 5;
-        }
-        repeated MultiResolutionStreamConfig availableMultiResolutionConfigurations = 1;
-    }
-
     optional string cameraId = 1;
 
     // Start of codegen fields
@@ -117,8 +106,6 @@
     repeated Size android_jpeg_availableThumbnailSizes = 524288;
     optional int32 android_lens_facing = 589824;
     optional int32 android_lens_poseReference = 589825;
-    optional float android_lens_distortionMaximumResolution = 589826;
-    optional float android_lens_intrinsicCalibrationMaximumResolution = 589827;
     repeated float android_lens_info_availableApertures = 655360;
     repeated float android_lens_info_availableFilterDensities = 655361;
     repeated float android_lens_info_availableFocalLengths = 655362;
@@ -139,11 +126,6 @@
     optional int32 android_scaler_croppingType = 917506;
     repeated MandatoryStreamCombination android_scaler_mandatoryStreamCombinations = 917507;
     repeated MandatoryStreamCombination android_scaler_mandatoryConcurrentStreamCombinations = 917508;
-    repeated int32 android_scaler_availableRotateAndCropModes = 917509;
-    optional Size android_scaler_defaultSecureImageSize = 917510;
-    optional MultiResolutionStreamConfigurations android_scaler_multiResolutionStreamConfigurationMap = 917511;
-    optional StreamConfigurations android_scaler_streamConfigurationMapMaximumResolution = 917512;
-    repeated MandatoryStreamCombination android_scaler_mandatoryMaximumResolutionStreamCombinations = 917513;
     optional int32 android_sensor_referenceIlluminant1 = 983040;
     optional int32 android_sensor_referenceIlluminant2 = 983041;
     optional ColorSpaceTransform android_sensor_calibrationTransform1 = 983042;
@@ -168,10 +150,6 @@
     optional int32 android_sensor_info_timestampSource = 1048584;
     optional bool android_sensor_info_lensShadingApplied = 1048585;
     optional Rect android_sensor_info_preCorrectionActiveArraySize = 1048586;
-    optional Rect android_sensor_info_activeArraySizeMaximumResolution = 1048587;
-    optional Size android_sensor_info_pixelArraySizeMaximumResolution = 1048588;
-    optional Rect android_sensor_info_preCorrectionActiveArraySizeMaximumResolution = 1048589;
-    optional Size android_sensor_info_binningFactor = 1048590;
     repeated int32 android_shading_availableModes = 1114112;
     repeated int32 android_statistics_info_availableFaceDetectModes = 1245184;
     optional int32 android_statistics_info_maxFaceCount = 1245185;
diff --git a/camera/docs/camera_metadata_tags.mako b/camera/docs/camera_metadata_tags.mako
index e7515a8..7e951a2 100644
--- a/camera/docs/camera_metadata_tags.mako
+++ b/camera/docs/camera_metadata_tags.mako
@@ -77,10 +77,10 @@
     % for sec in find_all_sections(metadata):
       % for idx,entry in enumerate(remove_synthetic(find_unique_entries(sec))):
         % if idx == 0:
-    ${entry.name + " = " | csym,ljust(50)}// ${annotated_type(entry) | ljust(12)} | ${entry.hidl_comment_string}
+    ${entry.name + " = " | csym,ljust(50)}// ${annotated_type(entry) | ljust(12)} | ${entry.applied_visibility | ljust(12)} | HIDL v${entry.hal_major_version}.${entry.hal_minor_version}
             ${path_name(find_parent_section(entry)) | csym}_START,
         % else:
-    ${entry.name + "," | csym,ljust(50)}// ${annotated_type(entry) | ljust(12)} | ${entry.hidl_comment_string}
+    ${entry.name + "," | csym,ljust(50)}// ${annotated_type(entry) | ljust(12)} | ${entry.applied_visibility | ljust(12)} | HIDL v${entry.hal_major_version}.${entry.hal_minor_version}
         % endif
       % endfor
     ${path_name(sec) | csym}_END,
@@ -99,9 +99,9 @@
 typedef enum camera_metadata_enum_${csym(entry.name).lower()} {
       % for val in entry.enum.values:
         % if val.id is None:
-    ${entry.name | csym}_${val.name | pad(70)}${val.hidl_comment_string}
+    ${entry.name | csym}_${val.name | pad(70)}, // HIDL v${val.hal_major_version}.${val.hal_minor_version}
         % else:
-    ${'%s_%s'%(csym(entry.name), val.name) | pad(70)} = ${val.id}${val.hidl_comment_string}
+    ${'%s_%s'%(csym(entry.name), val.name) | pad(70)} = ${val.id}, // HIDL v${val.hal_major_version}.${val.hal_minor_version}
         % endif
       % endfor
 } camera_metadata_enum_${csym(entry.name).lower()}_t;
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index fa707ed..64b533a 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -197,12 +197,6 @@
             ><a href="#controls_android.control.extendedSceneMode">android.control.extendedSceneMode</a></li>
             <li
             ><a href="#controls_android.control.zoomRatio">android.control.zoomRatio</a></li>
-            <li
-            ><a href="#controls_android.control.afRegionsSet">android.control.afRegionsSet</a></li>
-            <li
-            ><a href="#controls_android.control.aeRegionsSet">android.control.aeRegionsSet</a></li>
-            <li
-            ><a href="#controls_android.control.awbRegionsSet">android.control.awbRegionsSet</a></li>
           </ul>
         </li>
         <li>
@@ -256,8 +250,6 @@
             ><a href="#static_android.control.availableExtendedSceneModeCapabilities">android.control.availableExtendedSceneModeCapabilities</a></li>
             <li
             ><a href="#static_android.control.zoomRatioRange">android.control.zoomRatioRange</a></li>
-            <li
-            ><a href="#static_android.control.availableHighSpeedVideoConfigurationsMaximumResolution">android.control.availableHighSpeedVideoConfigurationsMaximumResolution</a></li>
           </ul>
         </li>
         <li>
@@ -547,10 +539,6 @@
             ><a href="#static_android.lens.poseReference">android.lens.poseReference</a></li>
             <li
             ><a href="#static_android.lens.distortion">android.lens.distortion</a></li>
-            <li
-            ><a href="#static_android.lens.distortionMaximumResolution">android.lens.distortionMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.lens.intrinsicCalibrationMaximumResolution">android.lens.intrinsicCalibrationMaximumResolution</a></li>
           </ul>
         </li>
         <li>
@@ -732,8 +720,6 @@
             ><a href="#controls_android.scaler.cropRegion">android.scaler.cropRegion</a></li>
             <li
             ><a href="#controls_android.scaler.rotateAndCrop">android.scaler.rotateAndCrop</a></li>
-            <li
-            ><a href="#controls_android.scaler.cropRegionSet">android.scaler.cropRegionSet</a></li>
           </ul>
         </li>
         <li>
@@ -784,26 +770,6 @@
             ><a href="#static_android.scaler.mandatoryConcurrentStreamCombinations">android.scaler.mandatoryConcurrentStreamCombinations</a></li>
             <li
             ><a href="#static_android.scaler.availableRotateAndCropModes">android.scaler.availableRotateAndCropModes</a></li>
-            <li
-            ><a href="#static_android.scaler.defaultSecureImageSize">android.scaler.defaultSecureImageSize</a></li>
-            <li
-            ><a href="#static_android.scaler.physicalCameraMultiResolutionStreamConfigurations">android.scaler.physicalCameraMultiResolutionStreamConfigurations</a></li>
-            <li
-            ><a href="#static_android.scaler.multiResolutionStreamConfigurationMap">android.scaler.multiResolutionStreamConfigurationMap</a></li>
-            <li
-            ><a href="#static_android.scaler.availableStreamConfigurationsMaximumResolution">android.scaler.availableStreamConfigurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.scaler.availableMinFrameDurationsMaximumResolution">android.scaler.availableMinFrameDurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.scaler.availableStallDurationsMaximumResolution">android.scaler.availableStallDurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.scaler.streamConfigurationMapMaximumResolution">android.scaler.streamConfigurationMapMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.scaler.availableInputOutputFormatsMapMaximumResolution">android.scaler.availableInputOutputFormatsMapMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.scaler.mandatoryMaximumResolutionStreamCombinations">android.scaler.mandatoryMaximumResolutionStreamCombinations</a></li>
-            <li
-            ><a href="#static_android.scaler.multiResolutionStreamSupported">android.scaler.multiResolutionStreamSupported</a></li>
           </ul>
         </li>
         <li>
@@ -833,8 +799,6 @@
             ><a href="#controls_android.sensor.testPatternData">android.sensor.testPatternData</a></li>
             <li
             ><a href="#controls_android.sensor.testPatternMode">android.sensor.testPatternMode</a></li>
-            <li
-            ><a href="#controls_android.sensor.pixelMode">android.sensor.pixelMode</a></li>
           </ul>
         </li>
         <li>
@@ -863,14 +827,6 @@
             ><a href="#static_android.sensor.info.lensShadingApplied">android.sensor.info.lensShadingApplied</a></li>
             <li
             ><a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.sensor.info.preCorrectionActiveArraySize</a></li>
-            <li
-            ><a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.sensor.info.activeArraySizeMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.sensor.info.pixelArraySizeMaximumResolution">android.sensor.info.pixelArraySizeMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.sensor.info.preCorrectionActiveArraySizeMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.sensor.info.binningFactor">android.sensor.info.binningFactor</a></li>
 
             <li
             ><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a></li>
@@ -904,8 +860,6 @@
             ><a href="#static_android.sensor.opticalBlackRegions">android.sensor.opticalBlackRegions</a></li>
             <li
             ><a href="#static_android.sensor.opaqueRawSize">android.sensor.opaqueRawSize</a></li>
-            <li
-            ><a href="#static_android.sensor.opaqueRawSizeMaximumResolution">android.sensor.opaqueRawSizeMaximumResolution</a></li>
           </ul>
         </li>
         <li>
@@ -941,10 +895,6 @@
             ><a href="#dynamic_android.sensor.dynamicBlackLevel">android.sensor.dynamicBlackLevel</a></li>
             <li
             ><a href="#dynamic_android.sensor.dynamicWhiteLevel">android.sensor.dynamicWhiteLevel</a></li>
-            <li
-            ><a href="#dynamic_android.sensor.pixelMode">android.sensor.pixelMode</a></li>
-            <li
-            ><a href="#dynamic_android.sensor.rawBinningFactorUsed">android.sensor.rawBinningFactorUsed</a></li>
           </ul>
         </li>
       </ul> <!-- toc_section -->
@@ -1259,18 +1209,6 @@
             ><a href="#static_android.depth.availableDynamicDepthMinFrameDurations">android.depth.availableDynamicDepthMinFrameDurations</a></li>
             <li
             ><a href="#static_android.depth.availableDynamicDepthStallDurations">android.depth.availableDynamicDepthStallDurations</a></li>
-            <li
-            ><a href="#static_android.depth.availableDepthStreamConfigurationsMaximumResolution">android.depth.availableDepthStreamConfigurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.depth.availableDepthMinFrameDurationsMaximumResolution">android.depth.availableDepthMinFrameDurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.depth.availableDepthStallDurationsMaximumResolution">android.depth.availableDepthStallDurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution">android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.depth.availableDynamicDepthMinFrameDurationsMaximumResolution">android.depth.availableDynamicDepthMinFrameDurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.depth.availableDynamicDepthStallDurationsMaximumResolution">android.depth.availableDynamicDepthStallDurationsMaximumResolution</a></li>
           </ul>
         </li>
       </ul> <!-- toc_section -->
@@ -1340,12 +1278,6 @@
             ><a href="#static_android.heic.availableHeicMinFrameDurations">android.heic.availableHeicMinFrameDurations</a></li>
             <li
             ><a href="#static_android.heic.availableHeicStallDurations">android.heic.availableHeicStallDurations</a></li>
-            <li
-            ><a href="#static_android.heic.availableHeicStreamConfigurationsMaximumResolution">android.heic.availableHeicStreamConfigurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.heic.availableHeicMinFrameDurationsMaximumResolution">android.heic.availableHeicMinFrameDurationsMaximumResolution</a></li>
-            <li
-            ><a href="#static_android.heic.availableHeicStallDurationsMaximumResolution">android.heic.availableHeicStallDurationsMaximumResolution</a></li>
           </ul>
         </li>
       </ul> <!-- toc_section -->
@@ -2821,13 +2753,6 @@
 scene as they do before.<wbr/> See <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/> Whether to use
 activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
 mode.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/>
-<a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -3320,12 +3245,6 @@
 scene as they do before.<wbr/> See <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/> Whether to use
 activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
 mode.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/> <a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -3687,7 +3606,7 @@
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
               <p>This control is only effective if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> is AUTO.<wbr/></p>
-<p>When set to the AUTO mode,<wbr/> the camera device's auto-white balance
+<p>When set to the ON mode,<wbr/> the camera device's auto-white balance
 routine is enabled,<wbr/> overriding the application's selected
 <a href="#controls_android.colorCorrection.transform">android.<wbr/>color<wbr/>Correction.<wbr/>transform</a>,<wbr/> <a href="#controls_android.colorCorrection.gains">android.<wbr/>color<wbr/>Correction.<wbr/>gains</a> and
 <a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a>.<wbr/> Note that when <a href="#controls_android.control.aeMode">android.<wbr/>control.<wbr/>ae<wbr/>Mode</a>
@@ -3816,12 +3735,6 @@
 the scene as they do before.<wbr/> See <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/> Whether to use
 activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
 mode.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/> <a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -4331,7 +4244,6 @@
                     <span class="entry_type_enum_name">HIGH_SPEED_VIDEO (v3.2)</span>
                     <span class="entry_type_enum_deprecated">[deprecated]</span>
                     <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_hidden">[java_public]</span>
                     <span class="entry_type_enum_notes"><p>This is deprecated,<wbr/> please use <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createConstrainedHighSpeedCaptureSession">CameraDevice#createConstrainedHighSpeedCaptureSession</a>
 and <a href="https://developer.android.com/reference/android/hardware/camera2/CameraConstrainedHighSpeedCaptureSession.html#createHighSpeedRequestList">CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList</a>
 for high speed video recording.<wbr/></p>
@@ -5005,20 +4917,7 @@
 explicitly set <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a>,<wbr/> its value defaults to 1.<wbr/>0.<wbr/></p>
 <p>One limitation of controlling zoom using zoomRatio is that the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>
 must only be used for letterboxing or pillarboxing of the sensor active array,<wbr/> and no
-FREEFORM cropping can be used with <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> other than 1.<wbr/>0.<wbr/> If
-<a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> is not 1.<wbr/>0,<wbr/> and <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> is set to be
-windowboxing,<wbr/> the camera framework will override the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> to be
-the active array.<wbr/></p>
-<p>In the capture request,<wbr/> if the application sets <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> to a
-value != 1.<wbr/>0,<wbr/> the <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> tag in the capture result reflects the
-effective zoom ratio achieved by the camera device,<wbr/> and the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>
-adjusts for additional crops that are not zoom related.<wbr/> Otherwise,<wbr/> if the application
-sets <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> to 1.<wbr/>0,<wbr/> or does not set it at all,<wbr/> the
-<a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> tag in the result metadata will also be 1.<wbr/>0.<wbr/></p>
-<p>When the application requests a physical stream for a logical multi-camera,<wbr/> the
-<a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> in the physical camera result metadata will be 1.<wbr/>0,<wbr/> and
-the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> tag reflects the amount of zoom and crop done by the
-physical camera device.<wbr/></p>
+FREEFORM cropping can be used with <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> other than 1.<wbr/>0.<wbr/></p>
             </td>
           </tr>
 
@@ -5035,192 +4934,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="controls_android.control.afRegionsSet">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>control.<wbr/>af<wbr/>Regions<wbr/>Set
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [fwk_only as boolean]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">TRUE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>AF regions (<a href="#controls_android.control.afRegions">android.<wbr/>control.<wbr/>af<wbr/>Regions</a>) have been set by the camera client.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FALSE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>AF regions (<a href="#controls_android.control.afRegions">android.<wbr/>control.<wbr/>af<wbr/>Regions</a>) have not been set by the camera client.<wbr/></p></span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Framework-only private key which informs camera fwk that the AF regions has been set
-by the client and those regions need not be corrected when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is
-set to MAXIMUM_<wbr/>RESOLUTION.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>2</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This must be set to TRUE by the camera2 java fwk when the camera client sets
-<a href="#controls_android.control.afRegions">android.<wbr/>control.<wbr/>af<wbr/>Regions</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="controls_android.control.aeRegionsSet">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>control.<wbr/>ae<wbr/>Regions<wbr/>Set
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [fwk_only as boolean]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">TRUE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>AE regions (<a href="#controls_android.control.aeRegions">android.<wbr/>control.<wbr/>ae<wbr/>Regions</a>) have been set by the camera client.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FALSE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>AE regions (<a href="#controls_android.control.aeRegions">android.<wbr/>control.<wbr/>ae<wbr/>Regions</a>) have not been set by the camera client.<wbr/></p></span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Framework-only private key which informs camera fwk that the AE regions has been set
-by the client and those regions need not be corrected when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is
-set to MAXIMUM_<wbr/>RESOLUTION.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>2</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This must be set to TRUE by the camera2 java fwk when the camera client sets
-<a href="#controls_android.control.aeRegions">android.<wbr/>control.<wbr/>ae<wbr/>Regions</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="controls_android.control.awbRegionsSet">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>control.<wbr/>awb<wbr/>Regions<wbr/>Set
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [fwk_only as boolean]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">TRUE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>AWB regions (<a href="#controls_android.control.awbRegions">android.<wbr/>control.<wbr/>awb<wbr/>Regions</a>) have been set by the camera client.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FALSE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>AWB regions (<a href="#controls_android.control.awbRegions">android.<wbr/>control.<wbr/>awb<wbr/>Regions</a>) have not been set by the camera client.<wbr/></p></span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Framework-only private key which informs camera fwk that the AF regions has been set
-by the client and those regions need not be corrected when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is
-set to MAXIMUM_<wbr/>RESOLUTION.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>2</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This must be set to TRUE by the camera2 java fwk when the camera client sets
-<a href="#controls_android.control.awbRegions">android.<wbr/>control.<wbr/>awb<wbr/>Regions</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -6835,7 +6548,7 @@
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
-              <p>For DISABLED mode,<wbr/> the camera behaves normally with no extended scene mode enabled.<wbr/></p>
+              <p>For DISABLED mode,<wbr/> the camera behaves normally with no extended scene mdoe enabled.<wbr/></p>
 <p>For BOKEH_<wbr/>STILL_<wbr/>CAPTURE mode,<wbr/> the maximum streaming dimension specifies the limit
 under which bokeh is effective when capture intent is PREVIEW.<wbr/> Note that when capture
 intent is PREVIEW,<wbr/> the bokeh effect may not be as high quality compared to STILL_<wbr/>CAPTURE
@@ -6936,77 +6649,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="static_android.control.availableHighSpeedVideoConfigurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>control.<wbr/>available<wbr/>High<wbr/>Speed<wbr/>Video<wbr/>Configurations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  5 x n
-                </span>
-              <span class="entry_type_visibility"> [hidden as highSpeedVideoConfiguration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>List of available high speed video size,<wbr/> fps range and max batch size configurations
-supported by the camera device,<wbr/> in the format of
-(width,<wbr/> height,<wbr/> fps_<wbr/>min,<wbr/> fps_<wbr/>max,<wbr/> batch_<wbr/>size_<wbr/>max),<wbr/>
-when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-              <p>For each configuration,<wbr/> the fps_<wbr/>max &gt;= 120fps.<wbr/></p>
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_V1">V1</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.control.availableHighSpeedVideoConfigurations">android.<wbr/>control.<wbr/>available<wbr/>High<wbr/>Speed<wbr/>Video<wbr/>Configurations</a>,<wbr/> for configurations
-which are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to hal details for <a href="#static_android.control.availableHighSpeedVideoConfigurations">android.<wbr/>control.<wbr/>available<wbr/>High<wbr/>Speed<wbr/>Video<wbr/>Configurations</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -7637,13 +7279,6 @@
 scene as they do before.<wbr/> See <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/> Whether to use
 activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
 mode.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/>
-<a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -8443,12 +8078,6 @@
 scene as they do before.<wbr/> See <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/> Whether to use
 activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
 mode.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/> <a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -9356,7 +8985,7 @@
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
               <p>This control is only effective if <a href="#controls_android.control.mode">android.<wbr/>control.<wbr/>mode</a> is AUTO.<wbr/></p>
-<p>When set to the AUTO mode,<wbr/> the camera device's auto-white balance
+<p>When set to the ON mode,<wbr/> the camera device's auto-white balance
 routine is enabled,<wbr/> overriding the application's selected
 <a href="#controls_android.colorCorrection.transform">android.<wbr/>color<wbr/>Correction.<wbr/>transform</a>,<wbr/> <a href="#controls_android.colorCorrection.gains">android.<wbr/>color<wbr/>Correction.<wbr/>gains</a> and
 <a href="#controls_android.colorCorrection.mode">android.<wbr/>color<wbr/>Correction.<wbr/>mode</a>.<wbr/> Note that when <a href="#controls_android.control.aeMode">android.<wbr/>control.<wbr/>ae<wbr/>Mode</a>
@@ -9485,12 +9114,6 @@
 the scene as they do before.<wbr/> See <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/> Whether to use
 activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
 mode.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/> <a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -10190,7 +9813,6 @@
                     <span class="entry_type_enum_name">HIGH_SPEED_VIDEO (v3.2)</span>
                     <span class="entry_type_enum_deprecated">[deprecated]</span>
                     <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_hidden">[java_public]</span>
                     <span class="entry_type_enum_notes"><p>This is deprecated,<wbr/> please use <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createConstrainedHighSpeedCaptureSession">CameraDevice#createConstrainedHighSpeedCaptureSession</a>
 and <a href="https://developer.android.com/reference/android/hardware/camera2/CameraConstrainedHighSpeedCaptureSession.html#createHighSpeedRequestList">CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList</a>
 for high speed video recording.<wbr/></p>
@@ -10929,20 +10551,7 @@
 explicitly set <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a>,<wbr/> its value defaults to 1.<wbr/>0.<wbr/></p>
 <p>One limitation of controlling zoom using zoomRatio is that the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>
 must only be used for letterboxing or pillarboxing of the sensor active array,<wbr/> and no
-FREEFORM cropping can be used with <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> other than 1.<wbr/>0.<wbr/> If
-<a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> is not 1.<wbr/>0,<wbr/> and <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> is set to be
-windowboxing,<wbr/> the camera framework will override the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> to be
-the active array.<wbr/></p>
-<p>In the capture request,<wbr/> if the application sets <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> to a
-value != 1.<wbr/>0,<wbr/> the <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> tag in the capture result reflects the
-effective zoom ratio achieved by the camera device,<wbr/> and the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>
-adjusts for additional crops that are not zoom related.<wbr/> Otherwise,<wbr/> if the application
-sets <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> to 1.<wbr/>0,<wbr/> or does not set it at all,<wbr/> the
-<a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> tag in the result metadata will also be 1.<wbr/>0.<wbr/></p>
-<p>When the application requests a physical stream for a logical multi-camera,<wbr/> the
-<a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> in the physical camera result metadata will be 1.<wbr/>0,<wbr/> and
-the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> tag reflects the amount of zoom and crop done by the
-physical camera device.<wbr/></p>
+FREEFORM cropping can be used with <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> other than 1.<wbr/>0.<wbr/></p>
             </td>
           </tr>
 
@@ -13271,7 +12880,7 @@
 
             <td class="entry_description">
               <p>Maximum size in bytes for the compressed
-JPEG buffer,<wbr/> in default sensor pixel mode (see <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a>)</p>
+JPEG buffer</p>
             </td>
 
             <td class="entry_units">
@@ -15475,133 +15084,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="static_android.lens.distortionMaximumResolution">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>lens.<wbr/>distortion<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">float</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  5
-                </span>
-              <span class="entry_type_visibility"> [public]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The correction coefficients to correct for this camera device's
-radial and tangential lens distortion for a
-CaptureRequest with <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              
-            Unitless coefficients.<wbr/>
-          
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.lens.distortion">android.<wbr/>lens.<wbr/>distortion</a>,<wbr/> when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.lens.intrinsicCalibrationMaximumResolution">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>lens.<wbr/>intrinsic<wbr/>Calibration<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">float</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  5
-                </span>
-              <span class="entry_type_visibility"> [public]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The parameters for this camera device's intrinsic
-calibration when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              
-            Pixels in the
-            android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution
-            coordinate system.<wbr/>
-          
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.lens.intrinsicCalibration">android.<wbr/>lens.<wbr/>intrinsic<wbr/>Calibration</a>,<wbr/> when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -18594,7 +18076,6 @@
                   <li>
                     <span class="entry_type_enum_name">PRIVATE_REPROCESSING (v3.2)</span>
                     <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_hidden">[java_public]</span>
                     <span class="entry_type_enum_notes"><p>The camera device supports the Zero Shutter Lag reprocessing use case.<wbr/></p>
 <ul>
 <li>One input stream is supported,<wbr/> that is,<wbr/> <code><a href="#static_android.request.maxNumInputStreams">android.<wbr/>request.<wbr/>max<wbr/>Num<wbr/>Input<wbr/>Streams</a> == 1</code>.<wbr/></li>
@@ -18602,7 +18083,7 @@
   that is,<wbr/> <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#PRIVATE">ImageFormat#PRIVATE</a> is included in the lists of
   formats returned by <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputFormats">StreamConfigurationMap#getInputFormats</a> and <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputFormats">StreamConfigurationMap#getOutputFormats</a>.<wbr/></li>
 <li><a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getValidOutputFormatsForInput">StreamConfigurationMap#getValidOutputFormatsForInput</a>
-  returns non-empty int[] for each supported input format returned by <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputFormats">StreamConfigurationMap#getInputFormats</a>.<wbr/></li>
+  returns non empty int[] for each supported input format returned by <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputFormats">StreamConfigurationMap#getInputFormats</a>.<wbr/></li>
 <li>Each size returned by <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputSizes">getInputSizes(ImageFormat.<wbr/>PRIVATE)</a> is also included in <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputSizes">getOutputSizes(ImageFormat.<wbr/>PRIVATE)</a></li>
 <li>Using <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#PRIVATE">ImageFormat#PRIVATE</a> does not cause a frame rate drop
   relative to the sensor's maximum capture rate (at that resolution).<wbr/></li>
@@ -18665,7 +18146,6 @@
                   <li>
                     <span class="entry_type_enum_name">YUV_REPROCESSING (v3.2)</span>
                     <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_hidden">[java_public]</span>
                     <span class="entry_type_enum_notes"><p>The camera device supports the YUV_<wbr/>420_<wbr/>888 reprocessing use case,<wbr/> similar as
 PRIVATE_<wbr/>REPROCESSING,<wbr/> This capability requires the camera device to support the
 following:</p>
@@ -18735,7 +18215,6 @@
                   <li>
                     <span class="entry_type_enum_name">CONSTRAINED_HIGH_SPEED_VIDEO (v3.2)</span>
                     <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_hidden">[java_public]</span>
                     <span class="entry_type_enum_notes"><p>The device supports constrained high speed video recording (frame rate &gt;=120fps) use
 case.<wbr/> The camera device will support high speed capture session created by <a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createConstrainedHighSpeedCaptureSession">CameraDevice#createConstrainedHighSpeedCaptureSession</a>,<wbr/> which
 only accepts high speed request lists created by <a href="https://developer.android.com/reference/android/hardware/camera2/CameraConstrainedHighSpeedCaptureSession.html#createHighSpeedRequestList">CameraConstrainedHighSpeedCaptureSession#createHighSpeedRequestList</a>.<wbr/></p>
@@ -18930,27 +18409,13 @@
 camera's crop region is set to maximum size,<wbr/> the FOV of the physical streams for the
 ultrawide lens will be the same as the logical stream,<wbr/> by making the crop region
 smaller than its active array size to compensate for the smaller focal length.<wbr/></p>
-<p>There are two ways for the application to capture RAW images from a logical camera
-with RAW capability:</p>
-<ul>
-<li>Because the underlying physical cameras may have different RAW capabilities (such
-as resolution or CFA pattern),<wbr/> to maintain backward compatibility,<wbr/> when a RAW stream
-is configured,<wbr/> the camera device makes sure the default active physical camera remains
-active and does not switch to other physical cameras.<wbr/> (One exception is that,<wbr/> if the
-logical camera consists of identical image sensors and advertises multiple focalLength
-due to different lenses,<wbr/> the camera device may generate RAW images from different
-physical cameras based on the focalLength being set by the application.<wbr/>) This
-backward-compatible approach usually results in loss of optical zoom,<wbr/> to telephoto
-lens or to ultrawide lens.<wbr/></li>
-<li>Alternatively,<wbr/> to take advantage of the full zoomRatio range of the logical camera,<wbr/>
-the application should use <a href="https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader.html">MultiResolutionImageReader</a>
-to capture RAW images from the currently active physical camera.<wbr/> Because different
-physical camera may have different RAW characteristics,<wbr/> the application needs to use
-the characteristics and result metadata of the active physical camera for the
-relevant RAW metadata.<wbr/></li>
-</ul>
+<p>Even if the underlying physical cameras have different RAW characteristics (such as
+size or CFA pattern),<wbr/> a logical camera can still advertise RAW capability.<wbr/> In this
+case,<wbr/> when the application configures a RAW stream,<wbr/> the camera device will make sure
+the active physical camera will remain active to ensure consistent RAW output
+behavior,<wbr/> and not switch to other physical cameras.<wbr/></p>
 <p>The capture request and result metadata tags required for backward compatible camera
-functionalities will be solely based on the logical camera capability.<wbr/> On the other
+functionalities will be solely based on the logical camera capabiltity.<wbr/> On the other
 hand,<wbr/> the use of manual capture controls (sensor or post-processing) with a
 logical camera may result in unexpected behavior when the HAL decides to switch
 between physical cameras with different characteristics under the hood.<wbr/> For example,<wbr/>
@@ -18989,7 +18454,6 @@
                   <li>
                     <span class="entry_type_enum_name">OFFLINE_PROCESSING (v3.5)</span>
                     <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_hidden">[java_public]</span>
                     <span class="entry_type_enum_notes"><p>The camera device supports the OFFLINE_<wbr/>PROCESSING use case.<wbr/></p>
 <p>With OFFLINE_<wbr/>PROCESSING capability,<wbr/> the application can switch an ongoing
 capture session to offline mode by calling the
@@ -19032,57 +18496,6 @@
 </li>
 </ul></span>
                   </li>
-                  <li>
-                    <span class="entry_type_enum_name">ULTRA_HIGH_RESOLUTION_SENSOR (v3.6)</span>
-                    <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_notes"><p>This camera device is capable of producing ultra high resolution images in
-addition to the image sizes described in the
-<a href="#static_android.scaler.streamConfigurationMap">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map</a>.<wbr/>
-It can operate in 'default' mode and 'max resolution' mode.<wbr/> It generally does this
-by binning pixels in 'default' mode and not binning them in 'max resolution' mode.<wbr/>
-<code><a href="#static_android.scaler.streamConfigurationMap">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map</a></code> describes the streams supported in 'default'
-mode.<wbr/>
-The stream configurations supported in 'max resolution' mode are described by
-<code><a href="#static_android.scaler.streamConfigurationMapMaximumResolution">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a></code>.<wbr/>
-The maximum resolution mode pixel array size of a camera device
-(<code><a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a></code>) with this capability,<wbr/>
-will be at least 24 megapixels.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">REMOSAIC_REPROCESSING (v3.6)</span>
-                    <span class="entry_type_enum_optional">[optional]</span>
-                    <span class="entry_type_enum_hidden">[java_public]</span>
-                    <span class="entry_type_enum_notes"><p>The device supports reprocessing from the <code>RAW_<wbr/>SENSOR</code> format with a bayer pattern
-given by <a href="#static_android.sensor.info.binningFactor">android.<wbr/>sensor.<wbr/>info.<wbr/>binning<wbr/>Factor</a> (m x n group of pixels with the same
-color filter) to a remosaiced regular bayer pattern.<wbr/></p>
-<p>This capability will only be present for devices with
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability.<wbr/> When
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-devices do not advertise this capability,<wbr/>
-<a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#RAW_SENSOR">ImageFormat#RAW_<wbr/>SENSOR</a> images will already have a
-regular bayer pattern.<wbr/></p>
-<p>If a <code>RAW_<wbr/>SENSOR</code> stream is requested along with another non-RAW stream in a
-<a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html">CaptureRequest</a> (if multiple streams are supported
-when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>),<wbr/>
-the <code>RAW_<wbr/>SENSOR</code> stream will have a regular bayer pattern.<wbr/></p>
-<p>This capability requires the camera device to support the following :
-* The <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html">StreamConfigurationMap</a> mentioned below
-  refers to the one,<wbr/> described by
-  <code><a href="#static_android.scaler.streamConfigurationMapMaximumResolution">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a></code>.<wbr/>
-* One input stream is supported,<wbr/> that is,<wbr/> <code><a href="#static_android.request.maxNumInputStreams">android.<wbr/>request.<wbr/>max<wbr/>Num<wbr/>Input<wbr/>Streams</a> == 1</code>.<wbr/>
-* <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#RAW_SENSOR">ImageFormat#RAW_<wbr/>SENSOR</a> is supported as an output/<wbr/>input
-  format,<wbr/> that is,<wbr/> <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#RAW_SENSOR">ImageFormat#RAW_<wbr/>SENSOR</a> is included in the
-  lists of formats returned by <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputFormats">StreamConfigurationMap#getInputFormats</a> and <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputFormats">StreamConfigurationMap#getOutputFormats</a>.<wbr/>
-* <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getValidOutputFormatsForInput">StreamConfigurationMap#getValidOutputFormatsForInput</a>
-  returns non-empty int[] for each supported input format returned by <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputFormats">StreamConfigurationMap#getInputFormats</a>.<wbr/>
-* Each size returned by <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getInputSizes">getInputSizes(ImageFormat.<wbr/>RAW_<wbr/>SENSOR)</a> is also included in <a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html#getOutputSizes">getOutputSizes(ImageFormat.<wbr/>RAW_<wbr/>SENSOR)</a>
-* Using <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#RAW_SENSOR">ImageFormat#RAW_<wbr/>SENSOR</a> does not cause a frame rate
-  drop relative to the sensor's maximum capture rate (at that resolution).<wbr/>
-* No CaptureRequest controls will be applicable when a request has an input target
-  with <a href="https://developer.android.com/reference/android/graphics/ImageFormat.html#RAW_SENSOR">ImageFormat#RAW_<wbr/>SENSOR</a> format.<wbr/></p></span>
-                  </li>
                 </ul>
 
             </td> <!-- entry_type -->
@@ -20249,12 +19662,6 @@
 coordinate system is post-zoom,<wbr/> meaning that the activeArraySize or
 preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.<wbr/>  See
 <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/> <a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -20271,6 +19678,45 @@
 rounded to nearest larger supportable width,<wbr/> especially
 for raw output,<wbr/> where only a few fixed scales may be
 possible.<wbr/></p>
+<p>For a set of output streams configured,<wbr/> if the sensor output is cropped to a smaller
+size than pre-correction active array size,<wbr/> the HAL need follow below cropping rules:</p>
+<ul>
+<li>
+<p>The HAL need to handle the cropRegion as if the sensor crop size is the effective
+pre-correction active array size.<wbr/> More specifically,<wbr/> the HAL must transform the request
+cropRegion from <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> to the sensor cropped
+pixel area size in this way:</p>
+<ol>
+<li>If <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> is set to value x,<wbr/> scale the requested cropRegion
+with 1.<wbr/>0/<wbr/>x in relation to its center as the origin.<wbr/> For example,<wbr/> say the requested
+cropRegion is (crX,<wbr/> crY,<wbr/> crWidth,<wbr/> crHeight),<wbr/> override it with
+    <code>crX' = crX + crWidth * (1.<wbr/>0 - 1.<wbr/>0 /<wbr/> x) /<wbr/> 2</code>,<wbr/>
+    <code>crY' = crY + crHeight * (1.<wbr/>0 - 1.<wbr/>0 /<wbr/> x) /<wbr/> 2</code>,<wbr/>
+    <code>crWidth' = crWidth /<wbr/> x</code>,<wbr/> and
+    <code>crHeight' = crHeight /<wbr/> x</code>.<wbr/></li>
+<li>Translate the requested cropRegion w.<wbr/>r.<wbr/>t.,<wbr/> the left top corner of the sensor
+cropped pixel area by (tx,<wbr/> ty),<wbr/>
+where <code>ty = sensorCrop.<wbr/>top * (sensorCrop.<wbr/>height /<wbr/> preCorrectionActiveArraySize.<wbr/>height)</code>
+and <code>tx = sensorCrop.<wbr/>left * (sensorCrop.<wbr/>width /<wbr/> preCorrectionActiveArraySize.<wbr/>width)</code>.<wbr/>
+The (sensorCrop.<wbr/>top,<wbr/> sensorCrop.<wbr/>left) is the coordinate based off the
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></li>
+<li>Scale the width and height of requested cropRegion with scaling factor of
+sensor<wbr/>Crop.<wbr/>width/<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size.<wbr/>width and sensor<wbr/>Crop.<wbr/>height/<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size.<wbr/>height
+respectively.<wbr/>
+Once this new cropRegion is calculated,<wbr/> the HAL must use this region to crop the image
+with regard to the sensor crop size (effective pre-correction active array size).<wbr/> The
+HAL still need follow the general cropping rule for this new cropRegion and effective
+pre-correction active array size.<wbr/></li>
+</ol>
+</li>
+<li>
+<p>The HAL must report the cropRegion with regard to <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a>.<wbr/>
+The HAL need convert the new cropRegion generated above w.<wbr/>r.<wbr/>t.,<wbr/> full pre-correction
+active array size.<wbr/> The reported cropRegion may be slightly different with the requested
+cropRegion since the HAL may adjust the crop region to account for rounding,<wbr/> conversion
+error,<wbr/> or other hardware limitations.<wbr/></p>
+</li>
+</ul>
 <p>If <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> is supported by the HAL,<wbr/> the HAL must report the zoom
 ratio via <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a>,<wbr/> and change the coordinate system such that
 <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> or <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>(depending on whether <a href="#controls_android.distortionCorrection.mode">android.<wbr/>distortion<wbr/>Correction.<wbr/>mode</a> is supported) is used to
@@ -20292,7 +19738,7 @@
             <td class="entry_type">
                 <span class="entry_type_name entry_type_name_enum">byte</span>
 
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -20432,7 +19878,8 @@
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
-              <p>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>AUTO will never be sent to the HAL,<wbr/> though it must be set as the default
+              <p>Not ready for use in Android 11.<wbr/></p>
+<p>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>AUTO will never be sent to the HAL,<wbr/> though it must be set as the default
 value in all the capture request templates by the HAL.<wbr/>  The camera service will
 translate AUTO to a specific rotation value based on the current application's
 multi-window state and its support of resizability.<wbr/></p>
@@ -20446,70 +19893,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="controls_android.scaler.cropRegionSet">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>scaler.<wbr/>crop<wbr/>Region<wbr/>Set
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [fwk_only as boolean]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">TRUE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>Crop region (<a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>) has been set by the
-camera client.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FALSE (v3.2)</span>
-                    <span class="entry_type_enum_notes"><p>Scaler crop regions (<a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>) has not been set by the camera
-client.<wbr/></p></span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Framework-only private key which informs camera fwk that the scaler crop region
-(<a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>) has been set by the client and it need
-not be corrected when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to MAXIMUM_<wbr/>RESOLUTION.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>2</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This must be set to TRUE by the camera2 java fwk when the camera client sets
-<a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -20698,7 +20081,7 @@
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
               <p>These format values are from HAL_<wbr/>PIXEL_<wbr/>FORMAT_<wbr/>* in
-system/<wbr/>core/<wbr/>libsystem/<wbr/>include/<wbr/>system/<wbr/>graphics-base.<wbr/>h.<wbr/></p>
+system/<wbr/>core/<wbr/>include/<wbr/>system/<wbr/>graphics.<wbr/>h.<wbr/></p>
 <p>When IMPLEMENTATION_<wbr/>DEFINED is used,<wbr/> the platform
 gralloc module will select a format based on the usage flags provided
 by the camera HAL device and the other endpoint of the stream.<wbr/> It is
@@ -20922,8 +20305,8 @@
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
-              <p>If the HAL supports <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a>,<wbr/> this value must be equal to or less than
-the maximum supported zoomRatio specified in <a href="#static_android.control.zoomRatioRange">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio<wbr/>Range</a>.<wbr/></p>
+              <p>If the HAL supports <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a>,<wbr/> this value must be equal to the maximum
+supported zoomRatio specified in <a href="#static_android.control.zoomRatioRange">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio<wbr/>Range</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -21326,8 +20709,8 @@
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
-              <p>For the formats,<wbr/> see <code>system/<wbr/>core/<wbr/>libsystem/<wbr/>include/<wbr/>system/<wbr/>graphics-base.<wbr/>h</code> for a
-definition of the image format enumerations.<wbr/> The PRIVATE format refers to the
+              <p>For the formats,<wbr/> see <code>system/<wbr/>core/<wbr/>include/<wbr/>system/<wbr/>graphics.<wbr/>h</code> for a definition
+of the image format enumerations.<wbr/> The PRIVATE format refers to the
 HAL_<wbr/>PIXEL_<wbr/>FORMAT_<wbr/>IMPLEMENTATION_<wbr/>DEFINED format.<wbr/> The HAL could determine
 the actual format by using the gralloc usage flags.<wbr/>
 For ZSL use case in particular,<wbr/> the HAL could choose appropriate format (partially
@@ -21438,8 +20821,8 @@
 <p>Not all output formats may be supported in a configuration with
 an input stream of a particular format.<wbr/> For more details,<wbr/> see
 <a href="#static_android.scaler.availableInputOutputFormatsMap">android.<wbr/>scaler.<wbr/>available<wbr/>Input<wbr/>Output<wbr/>Formats<wbr/>Map</a>.<wbr/></p>
-<p>For applications targeting SDK version older than 31,<wbr/> the following table
-describes the minimum required output stream configurations based on the hardware level
+<p>The following table describes the minimum required output stream
+configurations based on the hardware level
 (<a href="#static_android.info.supportedHardwareLevel">android.<wbr/>info.<wbr/>supported<wbr/>Hardware<wbr/>Level</a>):</p>
 <table>
 <thead>
@@ -21501,83 +20884,6 @@
 </tr>
 </tbody>
 </table>
-<p>For applications targeting SDK version 31 or newer,<wbr/> if the mobile device declares to be
-<a href="https://developer.android.com/reference/android/os/Build/VERSION_CDOES/MEDIA_PERFORMANCE_CLASS.html">media performance class</a> S,<wbr/>
-the primary camera devices (first rear/<wbr/>front camera in the camera ID list) will not
-support JPEG sizes smaller than 1080p.<wbr/> If the application configures a JPEG stream
-smaller than 1080p,<wbr/> the camera device will round up the JPEG image size to at least
-1080p.<wbr/> The requirements for IMPLEMENTATION_<wbr/>DEFINED and YUV_<wbr/>420_<wbr/>888 stay the same.<wbr/>
-This new minimum required output stream configurations are illustrated by the table below:</p>
-<table>
-<thead>
-<tr>
-<th align="center">Format</th>
-<th align="center">Size</th>
-<th align="center">Hardware Level</th>
-<th align="center">Notes</th>
-</tr>
-</thead>
-<tbody>
-<tr>
-<td align="center">JPEG</td>
-<td align="center"><a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a></td>
-<td align="center">Any</td>
-<td align="center"></td>
-</tr>
-<tr>
-<td align="center">JPEG</td>
-<td align="center">1920x1080 (1080p)</td>
-<td align="center">Any</td>
-<td align="center">if 1080p &lt;= activeArraySize</td>
-</tr>
-<tr>
-<td align="center">YUV_<wbr/>420_<wbr/>888</td>
-<td align="center"><a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a></td>
-<td align="center">FULL</td>
-<td align="center"></td>
-</tr>
-<tr>
-<td align="center">YUV_<wbr/>420_<wbr/>888</td>
-<td align="center">1920x1080 (1080p)</td>
-<td align="center">FULL</td>
-<td align="center">if 1080p &lt;= activeArraySize</td>
-</tr>
-<tr>
-<td align="center">YUV_<wbr/>420_<wbr/>888</td>
-<td align="center">1280x720 (720)</td>
-<td align="center">FULL</td>
-<td align="center">if 720p &lt;= activeArraySize</td>
-</tr>
-<tr>
-<td align="center">YUV_<wbr/>420_<wbr/>888</td>
-<td align="center">640x480 (480p)</td>
-<td align="center">FULL</td>
-<td align="center">if 480p &lt;= activeArraySize</td>
-</tr>
-<tr>
-<td align="center">YUV_<wbr/>420_<wbr/>888</td>
-<td align="center">320x240 (240p)</td>
-<td align="center">FULL</td>
-<td align="center">if 240p &lt;= activeArraySize</td>
-</tr>
-<tr>
-<td align="center">YUV_<wbr/>420_<wbr/>888</td>
-<td align="center">all output sizes available for FULL hardware level,<wbr/> up to the maximum video size</td>
-<td align="center">LIMITED</td>
-<td align="center"></td>
-</tr>
-<tr>
-<td align="center">IMPLEMENTATION_<wbr/>DEFINED</td>
-<td align="center">same as YUV_<wbr/>420_<wbr/>888</td>
-<td align="center">Any</td>
-<td align="center"></td>
-</tr>
-</tbody>
-</table>
-<p>For applications targeting SDK version 31 or newer,<wbr/> if the mobile device doesn't declare
-to be media performance class S,<wbr/> or if the camera device isn't a primary rear/<wbr/>front
-camera,<wbr/> the minimum required output stream configurations are the same as for applications
-targeting SDK version older than 31.<wbr/></p>
 <p>Refer to <a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> for additional
 mandatory stream configurations on a per-capability basis.<wbr/></p>
 <p>Exception on 176x144 (QCIF) resolution: camera devices usually have a fixed capability for
@@ -21626,10 +20932,6 @@
 <li>720p (1280 x 720)</li>
 <li>1080p (1920 x 1080)</li>
 </ul>
-<p>Note that for Performance Class 12 primary cameras (first rear/<wbr/>front facing camera in the
-camera ID list),<wbr/> camera framework filters out JPEG sizes smaller than 1080p depending on
-applications' targetSdkLevel.<wbr/> The camera HAL must still support the smaller JPEG sizes
-to maintain backward comopatibility.<wbr/></p>
 <p>For LIMITED capability devices
 (<code><a href="#static_android.info.supportedHardwareLevel">android.<wbr/>info.<wbr/>supported<wbr/>Hardware<wbr/>Level</a> == LIMITED</code>),<wbr/>
 the HAL only has to list up to the maximum video size
@@ -21703,6 +21005,8 @@
 set to either OFF or FAST.<wbr/></p>
 <p>When multiple streams are used in a request,<wbr/> the minimum frame
 duration will be max(individual stream min durations).<wbr/></p>
+<p>The minimum frame duration of a stream (of a particular format,<wbr/> size)
+is the same regardless of whether the stream is input or output.<wbr/></p>
 <p>See <a href="#controls_android.sensor.frameDuration">android.<wbr/>sensor.<wbr/>frame<wbr/>Duration</a> and
 <a href="#static_android.scaler.availableStallDurations">android.<wbr/>scaler.<wbr/>available<wbr/>Stall<wbr/>Durations</a> for more details about
 calculating the max frame rate.<wbr/></p>
@@ -22101,9 +21405,7 @@
 </ol>
 </li>
 <li>Setting <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> to values different than 1.<wbr/>0 and
-<a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> to be windowboxing at the same time are not supported.<wbr/> In this
-case,<wbr/> the camera framework will override the <a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> to be the active
-array.<wbr/></li>
+<a href="#controls_android.scaler.cropRegion">android.<wbr/>scaler.<wbr/>crop<wbr/>Region</a> to be windowboxing at the same time is undefined behavior.<wbr/></li>
 </ul>
 <p>LEGACY capability devices will only support CENTER_<wbr/>ONLY cropping.<wbr/></p>
             </td>
@@ -22518,7 +21820,7 @@
                 <span class="entry_type_array">
                   n
                 </span>
-              <span class="entry_type_visibility"> [public as enumList]</span>
+              <span class="entry_type_visibility"> [hidden as enumList]</span>
 
 
 
@@ -22553,7 +21855,7 @@
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
               <p>This entry lists the valid modes for <a href="#controls_android.scaler.rotateAndCrop">android.<wbr/>scaler.<wbr/>rotate<wbr/>And<wbr/>Crop</a> for this camera device.<wbr/></p>
-<p>Starting with API level 30,<wbr/> all devices will list at least <code>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>NONE</code>.<wbr/>
+<p>Starting at some future API level,<wbr/> all devices will list at least <code>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>NONE</code>.<wbr/>
 Devices with support for rotate-and-crop will additionally list at least
 <code>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>AUTO</code> and <code>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>90</code>.<wbr/></p>
             </td>
@@ -22563,768 +21865,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="static_android.scaler.defaultSecureImageSize">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>scaler.<wbr/>default<wbr/>Secure<wbr/>Image<wbr/>Size
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  2
-                </span>
-              <span class="entry_type_visibility"> [public as size]</span>
-
-
-
-
-                <div class="entry_type_notes">width/<wbr/>height for the default secure image data size</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Default YUV/<wbr/>PRIVATE size to use for requesting secure image buffers.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              Pixels
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This entry lists the default size supported in the secure camera mode.<wbr/> This entry is
-optional on devices support the SECURE_<wbr/>IMAGE_<wbr/>DATA capability.<wbr/> This entry will be null
-if the camera device does not list SECURE_<wbr/>IMAGE_<wbr/>DATA capability.<wbr/></p>
-<p>When the key is present,<wbr/> only a PRIVATE/<wbr/>YUV output of the specified size is guaranteed
-to be supported by the camera HAL in the secure camera mode.<wbr/> Any other format or
-resolutions might not be supported.<wbr/> Use
-<a href="https://developer.android.com/reference/CameraDevice.html#isSessionConfigurationSupported">CameraDevice#isSessionConfigurationSupported</a>
-API to query if a secure session configuration is supported if the device supports this
-API.<wbr/></p>
-<p>If this key returns null on a device with SECURE_<wbr/>IMAGE_<wbr/>DATA capability,<wbr/> the application
-can assume all output sizes listed in the
-<a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html">StreamConfigurationMap</a>
-are supported.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.physicalCameraMultiResolutionStreamConfigurations">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>physical<wbr/>Camera<wbr/>Multi<wbr/>Resolution<wbr/>Stream<wbr/>Configurations
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  n x 4
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfiguration]</span>
-
-
-              <span class="entry_type_hwlevel">[limited] </span>
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">OUTPUT (v3.6)</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">INPUT (v3.6)</span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The available multi-resolution stream configurations that this
-physical camera device supports
-(i.<wbr/>e.<wbr/> format,<wbr/> width,<wbr/> height,<wbr/> output/<wbr/>input stream).<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This list contains a subset of the parent logical camera's multi-resolution stream
-configurations which belong to this physical camera,<wbr/> and it will advertise and will only
-advertise the maximum supported resolutions for a particular format.<wbr/></p>
-<p>If this camera device isn't a physical camera device constituting a logical camera,<wbr/>
-but a standalone <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-camera,<wbr/> this field represents the multi-resolution input/<wbr/>output stream configurations of
-default mode and max resolution modes.<wbr/> The sizes will be the maximum resolution of a
-particular format for default mode and max resolution mode.<wbr/></p>
-<p>This field will only be advertised if the device is a physical camera of a
-logical multi-camera device or an ultra high resolution sensor camera.<wbr/> For a logical
-multi-camera,<wbr/> the camera API will derive the logical camera’s multi-resolution stream
-configurations from all physical cameras.<wbr/> For an ultra high resolution sensor camera,<wbr/> this
-is used directly as the camera’s multi-resolution stream configurations.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>If this field contains input stream configurations,<wbr/> and the camera device is a physical
-camera (not a standalone ultra-high resolution camera),<wbr/> the
-<a href="#dynamic_android.logicalMultiCamera.activePhysicalId">android.<wbr/>logical<wbr/>Multi<wbr/>Camera.<wbr/>active<wbr/>Physical<wbr/>Id</a> tag must be set to the physical camera Id in
-the physical camera result metadata.<wbr/> This is to make sure during multi-resolution
-reprocessing,<wbr/> the camera HAL is notified of which physical camera the reprocessing
-request comes from.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.multiResolutionStreamConfigurationMap">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>multi<wbr/>Resolution<wbr/>Stream<wbr/>Configuration<wbr/>Map
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-
-              <span class="entry_type_visibility"> [java_public as multiResolutionStreamConfigurationMap]</span>
-
-              <span class="entry_type_synthetic">[synthetic] </span>
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The multi-resolution stream configurations supported by this logical camera
-or ultra high resolution sensor camera device.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>2</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Multi-resolution streams can be used by a LOGICAL_<wbr/>MULTI_<wbr/>CAMERA or an
-ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR camera where the images sent or received can vary in
-resolution per frame.<wbr/> This is useful in cases where the camera device's effective full
-resolution changes depending on factors such as the current zoom level,<wbr/> lighting
-condition,<wbr/> focus distance,<wbr/> or pixel mode.<wbr/></p>
-<ul>
-<li>For a logical multi-camera implementing optical zoom,<wbr/> at different zoom level,<wbr/> a
-different physical camera may be active,<wbr/> resulting in different full-resolution image
-sizes.<wbr/></li>
-<li>For an ultra high resolution camera,<wbr/> depending on whether the camera operates in default
-mode,<wbr/> or maximum resolution mode,<wbr/> the output full-size images may be of either binned
-resolution or maximum resolution.<wbr/></li>
-</ul>
-<p>To use multi-resolution output streams,<wbr/> the supported formats can be queried by <a href="https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap.html#getOutputFormats">MultiResolutionStreamConfigurationMap#getOutputFormats</a>.<wbr/>
-A <a href="https://developer.android.com/reference/android/hardware/camera2/MultiResolutionImageReader.html">MultiResolutionImageReader</a> can then be created for a
-supported format with the MultiResolutionStreamInfo group queried by <a href="https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap.html#getOutputInfo">MultiResolutionStreamConfigurationMap#getOutputInfo</a>.<wbr/></p>
-<p>If a camera device supports multi-resolution output streams for a particular format,<wbr/> for
-each of its mandatory stream combinations,<wbr/> the camera device will support using a
-MultiResolutionImageReader for the MAXIMUM stream of supported formats.<wbr/> Refer to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureSession">CameraDevice#createCaptureSession</a> for additional details.<wbr/></p>
-<p>To use multi-resolution input streams,<wbr/> the supported formats can be queried by <a href="https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap.html#getInputFormats">MultiResolutionStreamConfigurationMap#getInputFormats</a>.<wbr/>
-A reprocessable CameraCaptureSession can then be created using an <a href="https://developer.android.com/reference/android/hardware/camera2/params/InputConfiguration.html">InputConfiguration</a> constructed with
-the input MultiResolutionStreamInfo group,<wbr/> queried by <a href="https://developer.android.com/reference/android/hardware/camera2/params/MultiResolutionStreamConfigurationMap.html#getInputInfo">MultiResolutionStreamConfigurationMap#getInputInfo</a>.<wbr/></p>
-<p>If a camera device supports multi-resolution {@code YUV} input and multi-resolution
-{@code YUV} output,<wbr/> or multi-resolution {@code PRIVATE} input and multi-resolution
-{@code PRIVATE} output,<wbr/> {@code JPEG} and {@code YUV} are guaranteed to be supported
-multi-resolution output stream formats.<wbr/> Refer to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureSession">CameraDevice#createCaptureSession</a> for
-details about the additional mandatory stream combinations in this case.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly
-(it is synthetic and will not be available at the HAL layer).<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.availableStreamConfigurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>available<wbr/>Stream<wbr/>Configurations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  n x 4
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfiguration]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">OUTPUT (v3.6)</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">INPUT (v3.6)</span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The available stream configurations that this
-camera device supports (i.<wbr/>e.<wbr/> format,<wbr/> width,<wbr/> height,<wbr/> output/<wbr/>input stream) for a
-CaptureRequest with <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.scaler.availableStreamConfigurations">android.<wbr/>scaler.<wbr/>available<wbr/>Stream<wbr/>Configurations</a>,<wbr/> for configurations
-which are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-<p>Not all output formats may be supported in a configuration with
-an input stream of a particular format.<wbr/> For more details,<wbr/> see
-<a href="#static_android.scaler.availableInputOutputFormatsMapMaximumResolution">android.<wbr/>scaler.<wbr/>available<wbr/>Input<wbr/>Output<wbr/>Formats<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to hal_<wbr/>details for <a href="#static_android.scaler.availableStreamConfigurations">android.<wbr/>scaler.<wbr/>available<wbr/>Stream<wbr/>Configurations</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.availableMinFrameDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>scaler.<wbr/>available<wbr/>Min<wbr/>Frame<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the minimum frame duration for each
-format/<wbr/>size combination when the camera device is sent a CaptureRequest with
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.scaler.availableMinFrameDurations">android.<wbr/>scaler.<wbr/>available<wbr/>Min<wbr/>Frame<wbr/>Durations</a>,<wbr/> for configurations
-which are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-<p>When multiple streams are used in a request (if supported,<wbr/> when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a>
-is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>),<wbr/> the
-minimum frame duration will be max(individual stream min durations).<wbr/></p>
-<p>See <a href="#controls_android.sensor.frameDuration">android.<wbr/>sensor.<wbr/>frame<wbr/>Duration</a> and
-<a href="#static_android.scaler.availableStallDurationsMaximumResolution">android.<wbr/>scaler.<wbr/>available<wbr/>Stall<wbr/>Durations<wbr/>Maximum<wbr/>Resolution</a> for more details about
-calculating the max frame rate.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.availableStallDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>available<wbr/>Stall<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the maximum stall duration for each
-output format/<wbr/>size combination when CaptureRequests are submitted with
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.scaler.availableMinFrameDurations">android.<wbr/>scaler.<wbr/>available<wbr/>Min<wbr/>Frame<wbr/>Durations</a>,<wbr/> for configurations
-which are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>If possible,<wbr/> it is recommended that all non-JPEG formats
-(such as RAW16) should not have a stall duration.<wbr/> RAW10,<wbr/> RAW12,<wbr/> RAW_<wbr/>OPAQUE
-and IMPLEMENTATION_<wbr/>DEFINED must not have stall durations.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.streamConfigurationMapMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-
-              <span class="entry_type_visibility"> [java_public as streamConfigurationMap]</span>
-
-              <span class="entry_type_synthetic">[synthetic] </span>
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The available stream configurations that this
-camera device supports when given a CaptureRequest with <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a>
-set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>;
-also includes the minimum frame durations
-and the stall durations for each format/<wbr/>size combination.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>2</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.scaler.streamConfigurationMap">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map</a> for CaptureRequests where
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly
-(it is synthetic and will not be available at the HAL layer);
-set the <a href="#static_android.scaler.availableStreamConfigurationsMaximumResolution">android.<wbr/>scaler.<wbr/>available<wbr/>Stream<wbr/>Configurations<wbr/>Maximum<wbr/>Resolution</a> instead.<wbr/></p>
-<p>Not all output formats may be supported in a configuration with
-an input stream of a particular format.<wbr/> For more details,<wbr/> see
-<a href="#static_android.scaler.availableInputOutputFormatsMapMaximumResolution">android.<wbr/>scaler.<wbr/>available<wbr/>Input<wbr/>Output<wbr/>Formats<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.availableInputOutputFormatsMapMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>available<wbr/>Input<wbr/>Output<wbr/>Formats<wbr/>Map<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-
-              <span class="entry_type_visibility"> [hidden as reprocessFormatsMap]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The mapping of image formats that are supported by this
-camera device for input streams,<wbr/> to their corresponding output formats,<wbr/> when
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_REPROC">REPROC</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.scaler.availableInputOutputFormatsMap">android.<wbr/>scaler.<wbr/>available<wbr/>Input<wbr/>Output<wbr/>Formats<wbr/>Map</a> for CaptureRequests where
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to hal details for <a href="#static_android.scaler.availableInputOutputFormatsMapMaximumResolution">android.<wbr/>scaler.<wbr/>available<wbr/>Input<wbr/>Output<wbr/>Formats<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.mandatoryMaximumResolutionStreamCombinations">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>mandatory<wbr/>Maximum<wbr/>Resolution<wbr/>Stream<wbr/>Combinations
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  n
-                </span>
-              <span class="entry_type_visibility"> [java_public as mandatoryStreamCombination]</span>
-
-              <span class="entry_type_synthetic">[synthetic] </span>
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>An array of mandatory stream combinations which are applicable when
-<a href="https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html">CaptureRequest</a> has <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> set
-to <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/>
-This is an app-readable conversion of the maximum resolution mandatory stream combination
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureSession">tables</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>2</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>The array of
-<a href="https://developer.android.com/reference/android/hardware/camera2/params/MandatoryStreamCombination.html">combinations</a> is
-generated according to the documented
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraDevice.html#createCaptureSession">guideline</a> for each
-device which has the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability.<wbr/>
-Clients can use the array as a quick reference to find an appropriate camera stream
-combination.<wbr/>
-The mandatory stream combination array will be {@code null} in case the device is not an
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-device.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly
-(it is synthetic and will not be available at the HAL layer).<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.scaler.multiResolutionStreamSupported">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>scaler.<wbr/>multi<wbr/>Resolution<wbr/>Stream<wbr/>Supported
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [ndk_public as boolean]</span>
-
-
-              <span class="entry_type_hwlevel">[limited] </span>
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">FALSE (v3.6)</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">TRUE (v3.6)</span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Whether the camera device supports multi-resolution input or output streams</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>A logical multi-camera or an ultra high resolution camera may support multi-resolution
-input or output streams.<wbr/> With multi-resolution output streams,<wbr/> the camera device is able
-to output different resolution images depending on the current active physical camera or
-pixel mode.<wbr/> With multi-resolution input streams,<wbr/> the camera device can reprocess images
-of different resolutions from different physical cameras or sensor pixel modes.<wbr/></p>
-<p>When set to TRUE:
-* For a logical multi-camera,<wbr/> the camera framework derives
-<a href="#static_android.scaler.multiResolutionStreamConfigurationMap">android.<wbr/>scaler.<wbr/>multi<wbr/>Resolution<wbr/>Stream<wbr/>Configuration<wbr/>Map</a> by combining the
-<a href="#static_android.scaler.physicalCameraMultiResolutionStreamConfigurations">android.<wbr/>scaler.<wbr/>physical<wbr/>Camera<wbr/>Multi<wbr/>Resolution<wbr/>Stream<wbr/>Configurations</a> from its physical
-cameras.<wbr/>
-* For an ultra-high resolution sensor camera,<wbr/> the camera framework directly copies
-the value of <a href="#static_android.scaler.physicalCameraMultiResolutionStreamConfigurations">android.<wbr/>scaler.<wbr/>physical<wbr/>Camera<wbr/>Multi<wbr/>Resolution<wbr/>Stream<wbr/>Configurations</a> to
-<a href="#static_android.scaler.multiResolutionStreamConfigurationMap">android.<wbr/>scaler.<wbr/>multi<wbr/>Resolution<wbr/>Stream<wbr/>Configuration<wbr/>Map</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>For the HAL to claim support for multi-resolution streams:
-* The HAL must support the buffer management API by setting
-supportedBufferManagementVersion to HIDL_<wbr/>DEVICE_<wbr/>3_<wbr/>5.<wbr/>
-* For a logical multi-camera,<wbr/> when combined from all its physical cameras,<wbr/> there must be
-at a minimum one input or output stream format with at least two different
-physicalCameraMultiResolutionStreamConfigurations entries for that format.<wbr/>
-* For an ultra high resolution sensor camera,<wbr/> for each supported multi-resolution format,<wbr/>
-the physicalCameraMultiResolutionStreamConfigurations must contain both the largest stream
-configuration within the <a href="#static_android.scaler.streamConfigurationMap">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map</a> and the largest stream
-configuration within the <a href="#static_android.scaler.streamConfigurationMapMaximumResolution">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a>.<wbr/>
-* If the HAL advertises multi-resolution input stream support for a particular format
-(namely PRIVATE,<wbr/> or YUV),<wbr/> the logical multi-camera or ultra high resolution sensor camera
-must have the corresponding reprocessing capabilities (PRIVATE_<wbr/>REPROCESSING,<wbr/>
-or YUV_<wbr/>REPROCESSING respectively).<wbr/> The camera HAL must support reprocessing the
-multi-resolution input stream to the output formats specified in the camera's
-<a href="#static_android.scaler.availableInputOutputFormatsMap">android.<wbr/>scaler.<wbr/>available<wbr/>Input<wbr/>Output<wbr/>Formats<wbr/>Map</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -23501,12 +22041,6 @@
 coordinate system is post-zoom,<wbr/> meaning that the activeArraySize or
 preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.<wbr/>  See
 <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> for details.<wbr/></p>
-<p>For camera devices with the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability,<wbr/> <a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> /<wbr/>
-<a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a> must be used as the
-coordinate system for requests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
             </td>
           </tr>
 
@@ -23523,6 +22057,45 @@
 rounded to nearest larger supportable width,<wbr/> especially
 for raw output,<wbr/> where only a few fixed scales may be
 possible.<wbr/></p>
+<p>For a set of output streams configured,<wbr/> if the sensor output is cropped to a smaller
+size than pre-correction active array size,<wbr/> the HAL need follow below cropping rules:</p>
+<ul>
+<li>
+<p>The HAL need to handle the cropRegion as if the sensor crop size is the effective
+pre-correction active array size.<wbr/> More specifically,<wbr/> the HAL must transform the request
+cropRegion from <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> to the sensor cropped
+pixel area size in this way:</p>
+<ol>
+<li>If <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> is set to value x,<wbr/> scale the requested cropRegion
+with 1.<wbr/>0/<wbr/>x in relation to its center as the origin.<wbr/> For example,<wbr/> say the requested
+cropRegion is (crX,<wbr/> crY,<wbr/> crWidth,<wbr/> crHeight),<wbr/> override it with
+    <code>crX' = crX + crWidth * (1.<wbr/>0 - 1.<wbr/>0 /<wbr/> x) /<wbr/> 2</code>,<wbr/>
+    <code>crY' = crY + crHeight * (1.<wbr/>0 - 1.<wbr/>0 /<wbr/> x) /<wbr/> 2</code>,<wbr/>
+    <code>crWidth' = crWidth /<wbr/> x</code>,<wbr/> and
+    <code>crHeight' = crHeight /<wbr/> x</code>.<wbr/></li>
+<li>Translate the requested cropRegion w.<wbr/>r.<wbr/>t.,<wbr/> the left top corner of the sensor
+cropped pixel area by (tx,<wbr/> ty),<wbr/>
+where <code>ty = sensorCrop.<wbr/>top * (sensorCrop.<wbr/>height /<wbr/> preCorrectionActiveArraySize.<wbr/>height)</code>
+and <code>tx = sensorCrop.<wbr/>left * (sensorCrop.<wbr/>width /<wbr/> preCorrectionActiveArraySize.<wbr/>width)</code>.<wbr/>
+The (sensorCrop.<wbr/>top,<wbr/> sensorCrop.<wbr/>left) is the coordinate based off the
+<a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></li>
+<li>Scale the width and height of requested cropRegion with scaling factor of
+sensor<wbr/>Crop.<wbr/>width/<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size.<wbr/>width and sensor<wbr/>Crop.<wbr/>height/<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size.<wbr/>height
+respectively.<wbr/>
+Once this new cropRegion is calculated,<wbr/> the HAL must use this region to crop the image
+with regard to the sensor crop size (effective pre-correction active array size).<wbr/> The
+HAL still need follow the general cropping rule for this new cropRegion and effective
+pre-correction active array size.<wbr/></li>
+</ol>
+</li>
+<li>
+<p>The HAL must report the cropRegion with regard to <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a>.<wbr/>
+The HAL need convert the new cropRegion generated above w.<wbr/>r.<wbr/>t.,<wbr/> full pre-correction
+active array size.<wbr/> The reported cropRegion may be slightly different with the requested
+cropRegion since the HAL may adjust the crop region to account for rounding,<wbr/> conversion
+error,<wbr/> or other hardware limitations.<wbr/></p>
+</li>
+</ul>
 <p>If <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a> is supported by the HAL,<wbr/> the HAL must report the zoom
 ratio via <a href="#controls_android.control.zoomRatio">android.<wbr/>control.<wbr/>zoom<wbr/>Ratio</a>,<wbr/> and change the coordinate system such that
 <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a> or <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>(depending on whether <a href="#controls_android.distortionCorrection.mode">android.<wbr/>distortion<wbr/>Correction.<wbr/>mode</a> is supported) is used to
@@ -23544,7 +22117,7 @@
             <td class="entry_type">
                 <span class="entry_type_name entry_type_name_enum">byte</span>
 
-              <span class="entry_type_visibility"> [public]</span>
+              <span class="entry_type_visibility"> [hidden]</span>
 
 
 
@@ -23684,7 +22257,8 @@
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
-              <p>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>AUTO will never be sent to the HAL,<wbr/> though it must be set as the default
+              <p>Not ready for use in Android 11.<wbr/></p>
+<p>ROTATE_<wbr/>AND_<wbr/>CROP_<wbr/>AUTO will never be sent to the HAL,<wbr/> though it must be set as the default
 value in all the capture request templates by the HAL.<wbr/>  The camera service will
 translate AUTO to a specific rotation value based on the current application's
 multi-window state and its support of resizability.<wbr/></p>
@@ -24091,10 +22665,10 @@
 respective color channel provided in
 <a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a>.<wbr/></p>
 <p>For example:</p>
-<pre><code><a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a> = [0,<wbr/> 0xFFFFFFFF,<wbr/> 0xFFFFFFFF,<wbr/> 0]
+<pre><code>android.<wbr/>testPatternData = [0,<wbr/> 0xFFFFFFFF,<wbr/> 0xFFFFFFFF,<wbr/> 0]
 </code></pre>
 <p>All green pixels are 100% green.<wbr/> All red/<wbr/>blue pixels are black.<wbr/></p>
-<pre><code><a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a> = [0xFFFFFFFF,<wbr/> 0,<wbr/> 0xFFFFFFFF,<wbr/> 0]
+<pre><code>android.<wbr/>testPatternData = [0xFFFFFFFF,<wbr/> 0,<wbr/> 0xFFFFFFFF,<wbr/> 0]
 </code></pre>
 <p>All red pixels are 100% red.<wbr/> Only the odd green pixels
 are 100% green.<wbr/> All blue pixels are 100% black.<wbr/></p></span>
@@ -24160,15 +22734,6 @@
 be exactly the same as the last.<wbr/></p></span>
                   </li>
                   <li>
-                    <span class="entry_type_enum_name">BLACK (v3.6)</span>
-                    <span class="entry_type_enum_hidden">[test]</span>
-                    <span class="entry_type_enum_notes"><p>All pixel data is replaced by 0% intensity (black) values.<wbr/></p>
-<p>This test pattern is identical to SOLID_<wbr/>COLOR with a value of <code>[0,<wbr/> 0,<wbr/> 0,<wbr/> 0]</code> for
-<a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a>.<wbr/>  It is recommended that devices implement full
-SOLID_<wbr/>COLOR support instead,<wbr/> but BLACK can be used to provide minimal support for a
-test pattern suitable for privacy use cases.<wbr/></p></span>
-                  </li>
-                  <li>
                     <span class="entry_type_enum_name">CUSTOM1 (v3.2)</span>
                     <span class="entry_type_enum_value">256</span>
                     <span class="entry_type_enum_notes"><p>The first custom test pattern.<wbr/> All custom patterns that are
@@ -24232,96 +22797,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="controls_android.sensor.pixelMode">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [public]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">DEFAULT (v3.6)</span>
-                    <span class="entry_type_enum_notes"><p>This is the default sensor pixel mode.<wbr/> This is the only sensor pixel mode
-supported unless a camera device advertises
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">MAXIMUM_RESOLUTION (v3.6)</span>
-                    <span class="entry_type_enum_notes"><p>This sensor pixel mode is offered by devices with capability
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>.<wbr/>
-In this mode,<wbr/> sensors typically do not bin pixels,<wbr/> as a result can offer larger
-image sizes.<wbr/></p></span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Switches sensor pixel mode between maximum resolution mode and default mode.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This key controls whether the camera sensor operates in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>
-mode or not.<wbr/> By default,<wbr/> all camera devices operate in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>DEFAULT</a> mode.<wbr/>
-When operating in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>DEFAULT</a> mode,<wbr/> sensors
-with <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability would typically perform pixel binning in order to improve low light
-performance,<wbr/> noise reduction etc.<wbr/> However,<wbr/> in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>
-mode (supported only
-by <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-sensors),<wbr/> sensors typically operate in unbinned mode allowing for a larger image size.<wbr/>
-The stream configurations supported in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>
-mode are also different from those of
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>DEFAULT</a> mode.<wbr/>
-They can be queried through
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> with
-<a href="https://developer.android.com/reference/CameraCharacteristics.html#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)">Camera<wbr/>Characteristics#SCALER_<wbr/>STREAM_<wbr/>CONFIGURATION_<wbr/>MAP_<wbr/>MAXIMUM_<wbr/>RESOLUTION)</a>.<wbr/>
-Unless reported by both
-<a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html">StreamConfigurationMap</a>s,<wbr/> the outputs from
-<code><a href="#static_android.scaler.streamConfigurationMapMaximumResolution">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a></code> and
-<code><a href="#static_android.scaler.streamConfigurationMap">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map</a></code>
-must not be mixed in the same CaptureRequest.<wbr/> In other words,<wbr/> these outputs are
-exclusive to each other.<wbr/>
-This key does not need to be set for reprocess requests.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -25189,7 +23664,7 @@
 rectangle,<wbr/> and cropping to the rectangle given in <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>.<wbr/></p>
 <p>E.<wbr/>g.<wbr/> to calculate position of a pixel,<wbr/> (x,<wbr/>y),<wbr/> in a processed YUV output image with the
 dimensions in <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a> given the position of a pixel,<wbr/>
-(x',<wbr/> y'),<wbr/> in the raw pixel array with dimensions given in
+(x',<wbr/> y'),<wbr/> in the raw pixel array with dimensions give in
 <a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>:</p>
 <ol>
 <li>Choose a pixel (x',<wbr/> y') within the active array region of the raw buffer given in
@@ -25244,297 +23719,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="static_android.sensor.info.activeArraySizeMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4
-                </span>
-              <span class="entry_type_visibility"> [public as rectangle]</span>
-
-
-
-
-                <div class="entry_type_notes">Four ints defining the active pixel rectangle</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The area of the image sensor which corresponds to active pixels after any geometric
-distortion correction has been applied,<wbr/> when the sensor runs in maximum resolution mode.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              Pixel coordinates on the image sensor
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_RAW">RAW</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a>,<wbr/> when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a>
-is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/>
-Refer to <a href="#static_android.sensor.info.activeArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size</a> for details,<wbr/> with sensor array related keys
-replaced with their
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>
-counterparts.<wbr/>
-This key will only be present for devices which advertise the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This array contains <code>(xmin,<wbr/> ymin,<wbr/> width,<wbr/> height)</code>.<wbr/> The <code>(xmin,<wbr/> ymin)</code> must be
-&gt;= <code>(0,<wbr/>0)</code>.<wbr/>
-The <code>(width,<wbr/> height)</code> must be &lt;= <code><a href="#static_android.sensor.info.pixelArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a></code>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.info.pixelArraySizeMaximumResolution">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  2
-                </span>
-              <span class="entry_type_visibility"> [public as size]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Dimensions of the full pixel array,<wbr/> possibly
-including black calibration pixels,<wbr/> when the sensor runs in maximum resolution mode.<wbr/>
-Analogous to <a href="#static_android.sensor.info.pixelArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size</a>,<wbr/> when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is
-set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              Pixels
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_RAW">RAW</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>The pixel count of the full pixel array of the image sensor,<wbr/> which covers
-<a href="#static_android.sensor.info.physicalSize">android.<wbr/>sensor.<wbr/>info.<wbr/>physical<wbr/>Size</a> area.<wbr/> This represents the full pixel dimensions of
-the raw buffers produced by this sensor,<wbr/> when it runs in maximum resolution mode.<wbr/> That
-is,<wbr/> when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/>
-This key will only be present for devices which advertise the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4
-                </span>
-              <span class="entry_type_visibility"> [public as rectangle]</span>
-
-
-
-
-                <div class="entry_type_notes">Four ints defining the active pixel rectangle</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The area of the image sensor which corresponds to active pixels prior to the
-application of any geometric distortion correction,<wbr/> when the sensor runs in maximum
-resolution mode.<wbr/> This key must be used for crop /<wbr/> metering regions,<wbr/> only when
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              Pixel coordinates on the image sensor
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_RAW">RAW</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.<wbr/>sensor.<wbr/>info.<wbr/>pre<wbr/>Correction<wbr/>Active<wbr/>Array<wbr/>Size</a>,<wbr/>
-when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/>
-This key will only be present for devices which advertise the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This array contains <code>(xmin,<wbr/> ymin,<wbr/> width,<wbr/> height)</code>.<wbr/> The <code>(xmin,<wbr/> ymin)</code> must be
-&gt;= <code>(0,<wbr/>0)</code>.<wbr/>
-The <code>(width,<wbr/> height)</code> must be &lt;= <code><a href="#static_android.sensor.info.pixelArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>pixel<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a></code>.<wbr/></p>
-<p>If omitted by the HAL implementation,<wbr/> the camera framework will assume that this is
-the same as the post-correction active array region given in
-<a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.<wbr/>sensor.<wbr/>info.<wbr/>active<wbr/>Array<wbr/>Size<wbr/>Maximum<wbr/>Resolution</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.info.binningFactor">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>sensor.<wbr/>info.<wbr/>binning<wbr/>Factor
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  2
-                </span>
-              <span class="entry_type_visibility"> [public as size]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Dimensions of the group of pixels which are under the same color filter.<wbr/>
-This specifies the width and height (pair of integers) of the group of pixels which fall
-under the same color filter for ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION sensors.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              Pixels
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Sensors can have pixels grouped together under the same color filter in order
-to improve various aspects of imaging such as noise reduction,<wbr/> low light
-performance etc.<wbr/> These groups can be of various sizes such as 2X2 (quad bayer),<wbr/>
-3X3 (nona-bayer).<wbr/> This key specifies the length and width of the pixels grouped under
-the same color filter.<wbr/></p>
-<p>This key will not be present if REMOSAIC_<wbr/>REPROCESSING is not supported,<wbr/> since RAW images
-will have a regular bayer pattern.<wbr/></p>
-<p>This key will not be present for sensors which don't have the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
         
 
@@ -26720,71 +24904,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="static_android.sensor.opaqueRawSizeMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>sensor.<wbr/>opaque<wbr/>Raw<wbr/>Size<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  n x 3
-                </span>
-              <span class="entry_type_visibility"> [system]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Size in bytes for all the listed opaque RAW buffer sizes when
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-              <p>Must be large enough to fit the opaque RAW of corresponding size produced by
-the camera</p>
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to <a href="#static_android.sensor.opaqueRawSize">android.<wbr/>sensor.<wbr/>opaque<wbr/>Raw<wbr/>Size</a> for details.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to <a href="#static_android.sensor.opaqueRawSize">android.<wbr/>sensor.<wbr/>opaque<wbr/>Raw<wbr/>Size</a> for details.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -27690,10 +25809,10 @@
 respective color channel provided in
 <a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a>.<wbr/></p>
 <p>For example:</p>
-<pre><code><a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a> = [0,<wbr/> 0xFFFFFFFF,<wbr/> 0xFFFFFFFF,<wbr/> 0]
+<pre><code>android.<wbr/>testPatternData = [0,<wbr/> 0xFFFFFFFF,<wbr/> 0xFFFFFFFF,<wbr/> 0]
 </code></pre>
 <p>All green pixels are 100% green.<wbr/> All red/<wbr/>blue pixels are black.<wbr/></p>
-<pre><code><a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a> = [0xFFFFFFFF,<wbr/> 0,<wbr/> 0xFFFFFFFF,<wbr/> 0]
+<pre><code>android.<wbr/>testPatternData = [0xFFFFFFFF,<wbr/> 0,<wbr/> 0xFFFFFFFF,<wbr/> 0]
 </code></pre>
 <p>All red pixels are 100% red.<wbr/> Only the odd green pixels
 are 100% green.<wbr/> All blue pixels are 100% black.<wbr/></p></span>
@@ -27759,15 +25878,6 @@
 be exactly the same as the last.<wbr/></p></span>
                   </li>
                   <li>
-                    <span class="entry_type_enum_name">BLACK (v3.6)</span>
-                    <span class="entry_type_enum_hidden">[test]</span>
-                    <span class="entry_type_enum_notes"><p>All pixel data is replaced by 0% intensity (black) values.<wbr/></p>
-<p>This test pattern is identical to SOLID_<wbr/>COLOR with a value of <code>[0,<wbr/> 0,<wbr/> 0,<wbr/> 0]</code> for
-<a href="#controls_android.sensor.testPatternData">android.<wbr/>sensor.<wbr/>test<wbr/>Pattern<wbr/>Data</a>.<wbr/>  It is recommended that devices implement full
-SOLID_<wbr/>COLOR support instead,<wbr/> but BLACK can be used to provide minimal support for a
-test pattern suitable for privacy use cases.<wbr/></p></span>
-                  </li>
-                  <li>
                     <span class="entry_type_enum_name">CUSTOM1 (v3.2)</span>
                     <span class="entry_type_enum_value">256</span>
                     <span class="entry_type_enum_notes"><p>The first custom test pattern.<wbr/> All custom patterns that are
@@ -28074,160 +26184,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="dynamic_android.sensor.pixelMode">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [public]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">DEFAULT (v3.6)</span>
-                    <span class="entry_type_enum_notes"><p>This is the default sensor pixel mode.<wbr/> This is the only sensor pixel mode
-supported unless a camera device advertises
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">MAXIMUM_RESOLUTION (v3.6)</span>
-                    <span class="entry_type_enum_notes"><p>This sensor pixel mode is offered by devices with capability
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>.<wbr/>
-In this mode,<wbr/> sensors typically do not bin pixels,<wbr/> as a result can offer larger
-image sizes.<wbr/></p></span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Switches sensor pixel mode between maximum resolution mode and default mode.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This key controls whether the camera sensor operates in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>
-mode or not.<wbr/> By default,<wbr/> all camera devices operate in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>DEFAULT</a> mode.<wbr/>
-When operating in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>DEFAULT</a> mode,<wbr/> sensors
-with <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability would typically perform pixel binning in order to improve low light
-performance,<wbr/> noise reduction etc.<wbr/> However,<wbr/> in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>
-mode (supported only
-by <a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-sensors),<wbr/> sensors typically operate in unbinned mode allowing for a larger image size.<wbr/>
-The stream configurations supported in
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>
-mode are also different from those of
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_DEFAULT">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>DEFAULT</a> mode.<wbr/>
-They can be queried through
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraCharacteristics.html#get">CameraCharacteristics#get</a> with
-<a href="https://developer.android.com/reference/CameraCharacteristics.html#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)">Camera<wbr/>Characteristics#SCALER_<wbr/>STREAM_<wbr/>CONFIGURATION_<wbr/>MAP_<wbr/>MAXIMUM_<wbr/>RESOLUTION)</a>.<wbr/>
-Unless reported by both
-<a href="https://developer.android.com/reference/android/hardware/camera2/params/StreamConfigurationMap.html">StreamConfigurationMap</a>s,<wbr/> the outputs from
-<code><a href="#static_android.scaler.streamConfigurationMapMaximumResolution">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map<wbr/>Maximum<wbr/>Resolution</a></code> and
-<code><a href="#static_android.scaler.streamConfigurationMap">android.<wbr/>scaler.<wbr/>stream<wbr/>Configuration<wbr/>Map</a></code>
-must not be mixed in the same CaptureRequest.<wbr/> In other words,<wbr/> these outputs are
-exclusive to each other.<wbr/>
-This key does not need to be set for reprocess requests.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="dynamic_android.sensor.rawBinningFactorUsed">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>sensor.<wbr/>raw<wbr/>Binning<wbr/>Factor<wbr/>Used
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [public as boolean]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">TRUE (v3.6)</span>
-                    <span class="entry_type_enum_notes"><p>The <code>RAW</code> targets in this capture have <a href="#static_android.sensor.info.binningFactor">android.<wbr/>sensor.<wbr/>info.<wbr/>binning<wbr/>Factor</a> as the
-bayer pattern.<wbr/></p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FALSE (v3.6)</span>
-                    <span class="entry_type_enum_notes"><p>The <code>RAW</code> targets have a regular bayer pattern in this capture.<wbr/></p></span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Whether <code>RAW</code> images requested have their bayer pattern as described by
-<a href="#static_android.sensor.info.binningFactor">android.<wbr/>sensor.<wbr/>info.<wbr/>binning<wbr/>Factor</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>This key will only be present in devices advertisting the
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR">Camera<wbr/>Metadata#REQUEST_<wbr/>AVAILABLE_<wbr/>CAPABILITIES_<wbr/>ULTRA_<wbr/>HIGH_<wbr/>RESOLUTION_<wbr/>SENSOR</a>
-capability which also advertise <code>REMOSAIC_<wbr/>REPROCESSING</code> capability.<wbr/> On all other devices
-RAW targets will have a regular bayer pattern.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -29027,7 +26983,7 @@
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
               <p>Since optical image stabilization generally involves motion much faster than the duration
-of individual image exposure,<wbr/> multiple OIS samples can be included for a single capture
+of individualq image exposure,<wbr/> multiple OIS samples can be included for a single capture
 result.<wbr/> For example,<wbr/> if the OIS reporting operates at 200 Hz,<wbr/> a typical camera operating
 at 30fps may have 6-7 OIS samples per capture result.<wbr/> This information can be combined
 with the rolling shutter skew to account for lens motion during image exposure in
@@ -30980,7 +28936,7 @@
           <tr class="entry_cont">
             <td class="entry_details" colspan="6">
               <p>Since optical image stabilization generally involves motion much faster than the duration
-of individual image exposure,<wbr/> multiple OIS samples can be included for a single capture
+of individualq image exposure,<wbr/> multiple OIS samples can be included for a single capture
 result.<wbr/> For example,<wbr/> if the OIS reporting operates at 200 Hz,<wbr/> a typical camera operating
 at 30fps may have 6-7 OIS samples per capture result.<wbr/> This information can be combined
 with the rolling shutter skew to account for lens motion during image exposure in
@@ -34795,426 +32751,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="static_android.depth.availableDepthStreamConfigurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>depth.<wbr/>available<wbr/>Depth<wbr/>Stream<wbr/>Configurations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  n x 4
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfiguration]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">OUTPUT (v3.6)</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">INPUT (v3.6)</span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The available depth dataspace stream
-configurations that this camera device supports
-(i.<wbr/>e.<wbr/> format,<wbr/> width,<wbr/> height,<wbr/> output/<wbr/>input stream) when a CaptureRequest is submitted with
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.depth.availableDepthStreamConfigurations">android.<wbr/>depth.<wbr/>available<wbr/>Depth<wbr/>Stream<wbr/>Configurations</a>,<wbr/> for configurations which
-are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.depth.availableDepthMinFrameDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>depth.<wbr/>available<wbr/>Depth<wbr/>Min<wbr/>Frame<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the minimum frame duration for each
-format/<wbr/>size combination for depth output formats when a CaptureRequest is submitted with
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.depth.availableDepthMinFrameDurations">android.<wbr/>depth.<wbr/>available<wbr/>Depth<wbr/>Min<wbr/>Frame<wbr/>Durations</a>,<wbr/> for configurations which
-are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-<p>See <a href="#controls_android.sensor.frameDuration">android.<wbr/>sensor.<wbr/>frame<wbr/>Duration</a> and
-<a href="#static_android.scaler.availableStallDurationsMaximumResolution">android.<wbr/>scaler.<wbr/>available<wbr/>Stall<wbr/>Durations<wbr/>Maximum<wbr/>Resolution</a> for more details about
-calculating the max frame rate.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.depth.availableDepthStallDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="3">
-              android.<wbr/>depth.<wbr/>available<wbr/>Depth<wbr/>Stall<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the maximum stall duration for each
-output format/<wbr/>size combination for depth streams for CaptureRequests where
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.depth.availableDepthStallDurations">android.<wbr/>depth.<wbr/>available<wbr/>Depth<wbr/>Stall<wbr/>Durations</a>,<wbr/> for configurations which
-are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>depth.<wbr/>available<wbr/>Dynamic<wbr/>Depth<wbr/>Stream<wbr/>Configurations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  n x 4
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfiguration]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">OUTPUT (v3.6)</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">INPUT (v3.6)</span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The available dynamic depth dataspace stream
-configurations that this camera device supports (i.<wbr/>e.<wbr/> format,<wbr/> width,<wbr/> height,<wbr/>
-output/<wbr/>input stream) for CaptureRequests where <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.depth.availableDynamicDepthStreamConfigurations">android.<wbr/>depth.<wbr/>available<wbr/>Dynamic<wbr/>Depth<wbr/>Stream<wbr/>Configurations</a>,<wbr/> for configurations
-which are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly.<wbr/>
-It is populated by camera framework and must not be set
-at the HAL layer.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.depth.availableDynamicDepthMinFrameDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>depth.<wbr/>available<wbr/>Dynamic<wbr/>Depth<wbr/>Min<wbr/>Frame<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the minimum frame duration for each
-format/<wbr/>size combination for dynamic depth output streams  for CaptureRequests where
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.depth.availableDynamicDepthMinFrameDurations">android.<wbr/>depth.<wbr/>available<wbr/>Dynamic<wbr/>Depth<wbr/>Min<wbr/>Frame<wbr/>Durations</a>,<wbr/> for configurations
-which are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly.<wbr/>
-It is populated by camera framework and must not be set
-at the HAL layer.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.depth.availableDynamicDepthStallDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>depth.<wbr/>available<wbr/>Dynamic<wbr/>Depth<wbr/>Stall<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the maximum stall duration for each
-output format/<wbr/>size combination for dynamic depth streams for CaptureRequests where
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DEPTH">DEPTH</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Analogous to <a href="#static_android.depth.availableDynamicDepthStallDurations">android.<wbr/>depth.<wbr/>available<wbr/>Dynamic<wbr/>Depth<wbr/>Stall<wbr/>Durations</a>,<wbr/> for configurations
-which are applicable when <a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly.<wbr/>
-It is populated by camera framework and must not be set
-at the HAL layer.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -36300,220 +33836,6 @@
           <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
            <!-- end of entry -->
         
-                
-          <tr class="entry" id="static_android.heic.availableHeicStreamConfigurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>heic.<wbr/>available<wbr/>Heic<wbr/>Stream<wbr/>Configurations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">int32</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  n x 4
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfiguration]</span>
-
-
-
-
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">OUTPUT (v3.6)</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">INPUT (v3.6)</span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>The available HEIC (ISO/<wbr/>IEC 23008-12) stream
-configurations that this camera device supports
-(i.<wbr/>e.<wbr/> format,<wbr/> width,<wbr/> height,<wbr/> output/<wbr/>input stream).<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_HEIC">HEIC</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to <a href="#static_android.heic.availableHeicStreamConfigurations">android.<wbr/>heic.<wbr/>available<wbr/>Heic<wbr/>Stream<wbr/>Configurations</a> for details.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>These are output stream configurations for use with dataSpace HAL_<wbr/>DATASPACE_<wbr/>HEIF.<wbr/></p>
-<p>Do not set this property directly.<wbr/> It is populated by camera framework and must not be
-set by the HAL layer.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.heic.availableHeicMinFrameDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>heic.<wbr/>available<wbr/>Heic<wbr/>Min<wbr/>Frame<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the minimum frame duration for each
-format/<wbr/>size combination for HEIC output formats for CaptureRequests where
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_HEIC">HEIC</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to <a href="#static_android.heic.availableHeicMinFrameDurations">android.<wbr/>heic.<wbr/>available<wbr/>Heic<wbr/>Min<wbr/>Frame<wbr/>Durations</a> for details.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly.<wbr/> It is populated by camera framework and must not be
-set by the HAL layer.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.heic.availableHeicStallDurationsMaximumResolution">
-            <td class="entry_name
-             " rowspan="5">
-              android.<wbr/>heic.<wbr/>available<wbr/>Heic<wbr/>Stall<wbr/>Durations<wbr/>Maximum<wbr/>Resolution
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">int64</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  4 x n
-                </span>
-              <span class="entry_type_visibility"> [ndk_public as streamConfigurationDuration]</span>
-
-
-
-
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>This lists the maximum stall duration for each
-output format/<wbr/>size combination for HEIC streams for CaptureRequests where
-<a href="#controls_android.sensor.pixelMode">android.<wbr/>sensor.<wbr/>pixel<wbr/>Mode</a> is set to
-<a href="https://developer.android.com/reference/android/hardware/camera2/CameraMetadata.html#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION">Camera<wbr/>Metadata#SENSOR_<wbr/>PIXEL_<wbr/>MODE_<wbr/>MAXIMUM_<wbr/>RESOLUTION</a>.<wbr/></p>
-            </td>
-
-            <td class="entry_units">
-              (format,<wbr/> width,<wbr/> height,<wbr/> ns) x n
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_hal_version">
-              <p>3.<wbr/>6</p>
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_HEIC">HEIC</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Refer to <a href="#static_android.heic.availableHeicStallDurations">android.<wbr/>heic.<wbr/>available<wbr/>Heic<wbr/>Stall<wbr/>Durations</a> for details.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entries_header">
-            <th class="th_details" colspan="6">HAL Implementation Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="6">
-              <p>Do not set this property directly.<wbr/> It is populated by camera framework and must not be
-set by the HAL layer.<wbr/></p>
-            </td>
-          </tr>
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="7"></td></tr>
-           <!-- end of entry -->
-        
         
 
       <!-- end of kind -->
@@ -36605,7 +33927,6 @@
         <ul class="tags_entries">
           <li><a href="#static_android.colorCorrection.availableAberrationModes">android.colorCorrection.availableAberrationModes</a> (static)</li>
           <li><a href="#static_android.control.availableHighSpeedVideoConfigurations">android.control.availableHighSpeedVideoConfigurations</a> (static)</li>
-          <li><a href="#static_android.control.availableHighSpeedVideoConfigurationsMaximumResolution">android.control.availableHighSpeedVideoConfigurationsMaximumResolution</a> (static)</li>
           <li><a href="#controls_android.edge.mode">android.edge.mode</a> (controls)</li>
           <li><a href="#static_android.edge.availableEdgeModes">android.edge.availableEdgeModes</a> (static)</li>
           <li><a href="#controls_android.hotPixel.mode">android.hotPixel.mode</a> (controls)</li>
@@ -36663,9 +33984,6 @@
           <li><a href="#static_android.sensor.info.pixelArraySize">android.sensor.info.pixelArraySize</a> (static)</li>
           <li><a href="#static_android.sensor.info.whiteLevel">android.sensor.info.whiteLevel</a> (static)</li>
           <li><a href="#static_android.sensor.info.preCorrectionActiveArraySize">android.sensor.info.preCorrectionActiveArraySize</a> (static)</li>
-          <li><a href="#static_android.sensor.info.activeArraySizeMaximumResolution">android.sensor.info.activeArraySizeMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.sensor.info.pixelArraySizeMaximumResolution">android.sensor.info.pixelArraySizeMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.sensor.info.preCorrectionActiveArraySizeMaximumResolution">android.sensor.info.preCorrectionActiveArraySizeMaximumResolution</a> (static)</li>
           <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
           <li><a href="#static_android.sensor.referenceIlluminant2">android.sensor.referenceIlluminant2</a> (static)</li>
           <li><a href="#static_android.sensor.calibrationTransform1">android.sensor.calibrationTransform1</a> (static)</li>
@@ -36717,8 +34035,6 @@
           <li><a href="#static_android.lens.intrinsicCalibration">android.lens.intrinsicCalibration</a> (static)</li>
           <li><a href="#static_android.lens.radialDistortion">android.lens.radialDistortion</a> (static)</li>
           <li><a href="#static_android.lens.distortion">android.lens.distortion</a> (static)</li>
-          <li><a href="#static_android.lens.distortionMaximumResolution">android.lens.distortionMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.lens.intrinsicCalibrationMaximumResolution">android.lens.intrinsicCalibrationMaximumResolution</a> (static)</li>
           <li><a href="#static_android.depth.maxDepthSamples">android.depth.maxDepthSamples</a> (static)</li>
           <li><a href="#static_android.depth.availableDepthStreamConfigurations">android.depth.availableDepthStreamConfigurations</a> (static)</li>
           <li><a href="#static_android.depth.availableDepthMinFrameDurations">android.depth.availableDepthMinFrameDurations</a> (static)</li>
@@ -36726,12 +34042,6 @@
           <li><a href="#static_android.depth.availableDynamicDepthStreamConfigurations">android.depth.availableDynamicDepthStreamConfigurations</a> (static)</li>
           <li><a href="#static_android.depth.availableDynamicDepthMinFrameDurations">android.depth.availableDynamicDepthMinFrameDurations</a> (static)</li>
           <li><a href="#static_android.depth.availableDynamicDepthStallDurations">android.depth.availableDynamicDepthStallDurations</a> (static)</li>
-          <li><a href="#static_android.depth.availableDepthStreamConfigurationsMaximumResolution">android.depth.availableDepthStreamConfigurationsMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.depth.availableDepthMinFrameDurationsMaximumResolution">android.depth.availableDepthMinFrameDurationsMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.depth.availableDepthStallDurationsMaximumResolution">android.depth.availableDepthStallDurationsMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution">android.depth.availableDynamicDepthStreamConfigurationsMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.depth.availableDynamicDepthMinFrameDurationsMaximumResolution">android.depth.availableDynamicDepthMinFrameDurationsMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.depth.availableDynamicDepthStallDurationsMaximumResolution">android.depth.availableDynamicDepthStallDurationsMaximumResolution</a> (static)</li>
         </ul>
       </li> <!-- tag_DEPTH -->
       <li id="tag_REPROC">REPROC - 
@@ -36745,7 +34055,6 @@
           <li><a href="#static_android.request.maxNumInputStreams">android.request.maxNumInputStreams</a> (static)</li>
           <li><a href="#static_android.scaler.availableInputOutputFormatsMap">android.scaler.availableInputOutputFormatsMap</a> (static)</li>
           <li><a href="#static_android.scaler.availableRecommendedInputOutputFormatsMap">android.scaler.availableRecommendedInputOutputFormatsMap</a> (static)</li>
-          <li><a href="#static_android.scaler.availableInputOutputFormatsMapMaximumResolution">android.scaler.availableInputOutputFormatsMapMaximumResolution</a> (static)</li>
           <li><a href="#controls_android.reprocess.effectiveExposureFactor">android.reprocess.effectiveExposureFactor</a> (controls)</li>
           <li><a href="#static_android.reprocess.maxCaptureStall">android.reprocess.maxCaptureStall</a> (static)</li>
           <li><a href="#static_android.distortionCorrection.availableModes">android.distortionCorrection.availableModes</a> (static)</li>
@@ -36771,9 +34080,6 @@
           <li><a href="#static_android.heic.availableHeicStreamConfigurations">android.heic.availableHeicStreamConfigurations</a> (static)</li>
           <li><a href="#static_android.heic.availableHeicMinFrameDurations">android.heic.availableHeicMinFrameDurations</a> (static)</li>
           <li><a href="#static_android.heic.availableHeicStallDurations">android.heic.availableHeicStallDurations</a> (static)</li>
-          <li><a href="#static_android.heic.availableHeicStreamConfigurationsMaximumResolution">android.heic.availableHeicStreamConfigurationsMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.heic.availableHeicMinFrameDurationsMaximumResolution">android.heic.availableHeicMinFrameDurationsMaximumResolution</a> (static)</li>
-          <li><a href="#static_android.heic.availableHeicStallDurationsMaximumResolution">android.heic.availableHeicStallDurationsMaximumResolution</a> (static)</li>
         </ul>
       </li> <!-- tag_HEIC -->
       <li id="tag_FUTURE">FUTURE - 
diff --git a/camera/docs/html.mako b/camera/docs/html.mako
index aaca5db..3ba191b 100644
--- a/camera/docs/html.mako
+++ b/camera/docs/html.mako
@@ -308,8 +308,8 @@
                   % if value.optional:
                     <span class="entry_type_enum_optional">[optional]</span>
                   % endif:
-                  % if value.applied_visibility != 'public':
-                    <span class="entry_type_enum_hidden">[${value.visibility}]</span>
+                  % if value.hidden:
+                    <span class="entry_type_enum_hidden">[hidden]</span>
                   % endif:
                   % if value.id is not None:
                     <span class="entry_type_enum_value">${value.id}</span>
diff --git a/camera/docs/metadata-generate b/camera/docs/metadata-generate
index 0576e16..72e54e0 100755
--- a/camera/docs/metadata-generate
+++ b/camera/docs/metadata-generate
@@ -64,10 +64,9 @@
     local out="$2"
     local intermediates="$3"
     local hal_version="${4:-3.2}"
-    local copyright_year="${5:-2021}"
     local spec_file=$thisdir/metadata_definitions.xml
 
-    python3 $thisdir/metadata_parser_xml.py $spec_file $in $out $hal_version $copyright_year
+    python3 $thisdir/metadata_parser_xml.py $spec_file $in $out $hal_version
 
     local succ=$?
 
@@ -204,15 +203,13 @@
 
 # Generate HIDL metadata modules - new versions need to be added here manually
 mkdir -p "${hidldir}/3.2"
-gen_file_abs HidlMetadata.mako "$hidldir/3.2/types.hal" yes 3.2 2017 || exit 1
+gen_file_abs HidlMetadata.mako "$hidldir/3.2/types.hal" yes 3.2 || exit 1
 mkdir -p "${hidldir}/3.3"
-gen_file_abs HidlMetadata.mako "$hidldir/3.3/types.hal" yes 3.3 2017 || exit 1
+gen_file_abs HidlMetadata.mako "$hidldir/3.3/types.hal" yes 3.3 || exit 1
 mkdir -p "${hidldir}/3.4"
-gen_file_abs HidlMetadata.mako "$hidldir/3.4/types.hal" yes 3.4 2017 || exit 1
+gen_file_abs HidlMetadata.mako "$hidldir/3.4/types.hal" yes 3.4 || exit 1
 mkdir -p "${hidldir}/3.5"
-gen_file_abs HidlMetadata.mako "$hidldir/3.5/types.hal" yes 3.5 2017 || exit 1
-mkdir -p "${hidldir}/3.6"
-gen_file_abs HidlMetadata.mako "$hidldir/3.6/types.hal" yes 3.6 2021 || exit 1
+gen_file_abs HidlMetadata.mako "$hidldir/3.5/types.hal" yes 3.5 || exit 1
 
 #Generate NDK header
 gen_file_abs ndk_camera_metadata_tags.mako "$ndk_header_dir/NdkCameraMetadataTags.h" yes || exit 1
diff --git a/camera/docs/metadata-parser-validity-check b/camera/docs/metadata-parser-validity-check
index 949a4b0..fc97b7c 100755
--- a/camera/docs/metadata-parser-validity-check
+++ b/camera/docs/metadata-parser-validity-check
@@ -17,7 +17,7 @@
 #
 
 #
-# Validate the XML parser by making sure it's generating the same data
+# Sanity check the XML parser by making sure it's generating the same data
 # as the original parsed data.
 #
 
diff --git a/camera/docs/metadata_definitions.xml b/camera/docs/metadata_definitions.xml
index c23bd46..965bc75 100644
--- a/camera/docs/metadata_definitions.xml
+++ b/camera/docs/metadata_definitions.xml
@@ -143,9 +143,6 @@
     <typedef name="capability">
       <language name="java">android.hardware.camera2.params.Capability</language>
     </typedef>
-    <typedef name="multiResolutionStreamConfigurationMap">
-      <language name="java">android.hardware.camera2.params.MultiResolutionStreamConfigurationMap</language>
-    </typedef>
   </types>
 
   <namespace name="android">
@@ -766,14 +763,6 @@
               scene as they do before. See android.control.zoomRatio for details. Whether to use
               activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
               mode.
-
-              For camera devices with the
-              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-              capability,
-              android.sensor.info.activeArraySizeMaximumResolution /
-              android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
-              coordinate system for requests where android.sensor.pixelMode is set to
-              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
           </details>
           <ndk_details>
               The data representation is `int[5 * area_count]`.
@@ -1091,13 +1080,6 @@
               scene as they do before. See android.control.zoomRatio for details. Whether to use
               activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
               mode.
-
-              For camera devices with the
-              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-              capability, android.sensor.info.activeArraySizeMaximumResolution /
-              android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
-              coordinate system for requests where android.sensor.pixelMode is set to
-              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
           </details>
           <ndk_details>
               The data representation is `int[5 * area_count]`.
@@ -1344,7 +1326,7 @@
           <details>
           This control is only effective if android.control.mode is AUTO.
 
-          When set to the AUTO mode, the camera device's auto-white balance
+          When set to the ON mode, the camera device's auto-white balance
           routine is enabled, overriding the application's selected
           android.colorCorrection.transform, android.colorCorrection.gains and
           android.colorCorrection.mode. Note that when android.control.aeMode
@@ -1439,13 +1421,6 @@
               the scene as they do before. See android.control.zoomRatio for details. Whether to use
               activeArraySize or preCorrectionActiveArraySize still depends on distortion correction
               mode.
-
-              For camera devices with the
-              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-              capability, android.sensor.info.activeArraySizeMaximumResolution /
-              android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
-              coordinate system for requests where android.sensor.pixelMode is set to
-              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
           </details>
           <ndk_details>
               The data representation is `int[5 * area_count]`.
@@ -1802,7 +1777,7 @@
               barcode value.
               </notes>
             </value>
-            <value deprecated="true" optional="true" visibility="java_public">HIGH_SPEED_VIDEO
+            <value deprecated="true" optional="true" ndk_hidden="true">HIGH_SPEED_VIDEO
               <notes>
               This is deprecated, please use {@link
               android.hardware.camera2.CameraDevice#createConstrainedHighSpeedCaptureSession}
@@ -1926,7 +1901,7 @@
               the SCENE_MODE was not enabled at all.
               </notes>
             </value>
-            <value optional="true" visibility="hidden">FACE_PRIORITY_LOW_LIGHT
+            <value optional="true" hidden="true">FACE_PRIORITY_LOW_LIGHT
               <notes>Same as FACE_PRIORITY scene mode, except that the camera
               device will choose higher sensitivity values (android.sensor.sensitivity)
               under low light conditions.
@@ -1952,14 +1927,14 @@
               remain active when FACE_PRIORITY_LOW_LIGHT is set.
               </notes>
             </value>
-            <value optional="true" visibility="hidden" id="100">DEVICE_CUSTOM_START
+            <value optional="true" hidden="true" id="100">DEVICE_CUSTOM_START
               <notes>
                 Scene mode values within the range of
                 `[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific
                 customized scene modes.
               </notes>
             </value>
-            <value optional="true" visibility="hidden" id="127">DEVICE_CUSTOM_END
+            <value optional="true" hidden="true" id="127">DEVICE_CUSTOM_END
               <notes>
                 Scene mode values within the range of
                 `[DEVICE_CUSTOM_START, DEVICE_CUSTOM_END]` are reserved for device specific
@@ -3155,7 +3130,7 @@
             are supported by this camera device, and each extended scene mode's capabilities such
             as maximum streaming size, and supported zoom ratio ranges.</description>
           <details>
-            For DISABLED mode, the camera behaves normally with no extended scene mode enabled.
+            For DISABLED mode, the camera behaves normally with no extended scene mdoe enabled.
 
             For BOKEH_STILL_CAPTURE mode, the maximum streaming dimension specifies the limit
             under which bokeh is effective when capture intent is PREVIEW. Note that when capture
@@ -3200,7 +3175,7 @@
               priority, such as video recording.
               </notes>
             </value>
-            <value visibility="hidden" id="0x40">VENDOR_START
+            <value hidden="true" id="0x40">VENDOR_START
               <notes>
                 Vendor defined extended scene modes. These depend on vendor implementation.
               </notes>
@@ -3221,7 +3196,7 @@
           * If the camera device has BURST_CAPTURE capability, the frame rate requirement of
           BURST_CAPTURE must still be met.
           * All streams not larger than the maximum streaming dimension for BOKEH_STILL_CAPTURE mode
-          (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES|ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_MAX_SIZES})
+          (queried via {@link android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES|ACAMERA_CONTROL_AVAILABLE_EXTENDED_SCENE_MODE_CAPABILITIES})
           will have preview bokeh effect applied.
 
           When set to BOKEH_CONTINUOUS mode, configured streams dimension should not exceed this mode's
@@ -3346,22 +3321,7 @@
 
             One limitation of controlling zoom using zoomRatio is that the android.scaler.cropRegion
             must only be used for letterboxing or pillarboxing of the sensor active array, and no
-            FREEFORM cropping can be used with android.control.zoomRatio other than 1.0. If
-            android.control.zoomRatio is not 1.0, and android.scaler.cropRegion is set to be
-            windowboxing, the camera framework will override the android.scaler.cropRegion to be
-            the active array.
-
-            In the capture request, if the application sets android.control.zoomRatio to a
-            value != 1.0, the android.control.zoomRatio tag in the capture result reflects the
-            effective zoom ratio achieved by the camera device, and the android.scaler.cropRegion
-            adjusts for additional crops that are not zoom related. Otherwise, if the application
-            sets android.control.zoomRatio to 1.0, or does not set it at all, the
-            android.control.zoomRatio tag in the result metadata will also be 1.0.
-
-            When the application requests a physical stream for a logical multi-camera, the
-            android.control.zoomRatio in the physical camera result metadata will be 1.0, and
-            the android.scaler.cropRegion tag reflects the amount of zoom and crop done by the
-            physical camera device.
+            FREEFORM cropping can be used with android.control.zoomRatio other than 1.0.
           </details>
           <hal_details>
             For all capture request templates, this field must be set to 1.0 in order to have
@@ -3373,106 +3333,6 @@
         <clone entry="android.control.zoomRatio" kind="controls">
         </clone>
       </dynamic>
-    <static>
-      <entry name="availableHighSpeedVideoConfigurationsMaximumResolution" type="int32"
-        visibility="hidden" container="array" typedef="highSpeedVideoConfiguration"
-        hal_version="3.6">
-        <array>
-          <size>5</size>
-          <size>n</size>
-        </array>
-        <description>
-        List of available high speed video size, fps range and max batch size configurations
-        supported by the camera device, in the format of
-        (width, height, fps_min, fps_max, batch_size_max),
-        when android.sensor.pixelMode is set to
-        {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-        </description>
-        <range>
-        For each configuration, the fps_max &amp;gt;= 120fps.
-        </range>
-        <details>
-        Analogous to android.control.availableHighSpeedVideoConfigurations, for configurations
-        which are applicable when android.sensor.pixelMode is set to
-        {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-        </details>
-        <hal_details>
-        Refer to hal details for android.control.availableHighSpeedVideoConfigurations.
-        </hal_details>
-        <tag id="V1" />
-      </entry>
-    </static>
-    <controls>
-        <entry name="afRegionsSet" type="byte" visibility="fwk_only"
-               enum="true" typedef="boolean">
-          <enum>
-            <value>TRUE
-            <notes>AF regions (android.control.afRegions) have been set by the camera client.
-            </notes>
-            </value>
-            <value>FALSE
-            <notes>
-              AF regions (android.control.afRegions) have not been set by the camera client.
-            </notes>
-            </value>
-          </enum>
-          <description>
-            Framework-only private key which informs camera fwk that the AF regions has been set
-            by the client and those regions need not be corrected when android.sensor.pixelMode is
-            set to MAXIMUM_RESOLUTION.
-          </description>
-          <details>
-            This must be set to TRUE by the camera2 java fwk when the camera client sets
-            android.control.afRegions.
-          </details>
-        </entry>
-        <entry name="aeRegionsSet" type="byte" visibility="fwk_only"
-          enum="true" typedef="boolean">
-          <enum>
-            <value>TRUE
-            <notes> AE regions (android.control.aeRegions) have been set by the camera client.
-            </notes>
-            </value>
-            <value>FALSE
-            <notes>
-              AE regions (android.control.aeRegions) have not been set by the camera client.
-            </notes>
-            </value>
-          </enum>
-          <description>
-            Framework-only private key which informs camera fwk that the AE regions has been set
-            by the client and those regions need not be corrected when android.sensor.pixelMode is
-            set to MAXIMUM_RESOLUTION.
-          </description>
-          <details>
-            This must be set to TRUE by the camera2 java fwk when the camera client sets
-            android.control.aeRegions.
-          </details>
-        </entry>
-        <entry name="awbRegionsSet" type="byte" visibility="fwk_only"
-          enum="true" typedef="boolean">
-          <enum>
-            <value>TRUE
-            <notes> AWB regions (android.control.awbRegions) have been set by the camera client.
-            </notes>
-            </value>
-            <value>FALSE
-            <notes>
-              AWB regions (android.control.awbRegions) have not been set by the camera client.
-            </notes>
-            </value>
-          </enum>
-          <description>
-            Framework-only private key which informs camera fwk that the AF regions has been set
-            by the client and those regions need not be corrected when android.sensor.pixelMode is
-            set to MAXIMUM_RESOLUTION.
-          </description>
-          <details>
-            This must be set to TRUE by the camera2 java fwk when the camera client sets
-            android.control.awbRegions.
-          </details>
-        </entry>
-    </controls>
     </section>
     <section name="demosaic">
       <controls>
@@ -4012,7 +3872,7 @@
         </entry>
         <entry name="maxSize" type="int32" visibility="system">
           <description>Maximum size in bytes for the compressed
-          JPEG buffer, in default sensor pixel mode (see android.sensor.pixelMode)</description>
+          JPEG buffer</description>
           <range>Must be large enough to fit any JPEG produced by
           the camera</range>
           <details>This is used for sizing the gralloc buffers for
@@ -4807,47 +4667,6 @@
           </details>
           <tag id="DEPTH" />
         </entry>
-        <entry name="distortionMaximumResolution" type="float" visibility="public" container="array"
-               permission_needed="true" hal_version="3.6" >
-          <array>
-            <size>5</size>
-          </array>
-          <description>
-            The correction coefficients to correct for this camera device's
-            radial and tangential lens distortion for a
-            CaptureRequest with android.sensor.pixelMode set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>
-            Unitless coefficients.
-          </units>
-          <details>
-            Analogous to android.lens.distortion, when android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <tag id="DEPTH" />
-        </entry>
-        <entry name="intrinsicCalibrationMaximumResolution" type="float" visibility="public"
-               container="array" permission_needed="true" hal_version="3.6">
-          <array>
-            <size>5</size>
-          </array>
-          <description>
-            The parameters for this camera device's intrinsic
-            calibration when android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>
-            Pixels in the
-            android.sensor.info.preCorrectionActiveArraySizeMaximumResolution
-            coordinate system.
-          </units>
-          <details>
-            Analogous to android.lens.intrinsicCalibration, when android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <tag id="DEPTH" />
-        </entry>
       </static>
       <dynamic>
         <clone entry="android.lens.distortion" kind="static">
@@ -5581,7 +5400,7 @@
                 by the camera device.
               </notes>
             </value>
-            <value optional="true" visibility="java_public">PRIVATE_REPROCESSING
+            <value optional="true" ndk_hidden="true">PRIVATE_REPROCESSING
               <notes>
               The camera device supports the Zero Shutter Lag reprocessing use case.
 
@@ -5592,7 +5411,7 @@
                 android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link
                 android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}.
               * {@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput}
-                returns non-empty int[] for each supported input format returned by {@link
+                returns non empty int[] for each supported input format returned by {@link
                 android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}.
               * Each size returned by {@link
                 android.hardware.camera2.params.StreamConfigurationMap#getInputSizes
@@ -5709,7 +5528,7 @@
               consistent image output.
               </ndk_notes>
             </value>
-            <value optional="true" visibility="java_public">YUV_REPROCESSING
+            <value optional="true" ndk_hidden="true">YUV_REPROCESSING
               <notes>
               The camera device supports the YUV_420_888 reprocessing use case, similar as
               PRIVATE_REPROCESSING, This capability requires the camera device to support the
@@ -5789,7 +5608,7 @@
               rate, including depth stall time.
               </notes>
             </value>
-            <value optional="true" visibility="java_public">CONSTRAINED_HIGH_SPEED_VIDEO
+            <value optional="true" ndk_hidden="true">CONSTRAINED_HIGH_SPEED_VIDEO
               <notes>
               The device supports constrained high speed video recording (frame rate >=120fps) use
               case. The camera device will support high speed capture session created by {@link
@@ -6005,27 +5824,14 @@
               ultrawide lens will be the same as the logical stream, by making the crop region
               smaller than its active array size to compensate for the smaller focal length.
 
-              There are two ways for the application to capture RAW images from a logical camera
-              with RAW capability:
-
-              * Because the underlying physical cameras may have different RAW capabilities (such
-              as resolution or CFA pattern), to maintain backward compatibility, when a RAW stream
-              is configured, the camera device makes sure the default active physical camera remains
-              active and does not switch to other physical cameras. (One exception is that, if the
-              logical camera consists of identical image sensors and advertises multiple focalLength
-              due to different lenses, the camera device may generate RAW images from different
-              physical cameras based on the focalLength being set by the application.) This
-              backward-compatible approach usually results in loss of optical zoom, to telephoto
-              lens or to ultrawide lens.
-              * Alternatively, to take advantage of the full zoomRatio range of the logical camera,
-              the application should use {@link android.hardware.camera2.MultiResolutionImageReader}
-              to capture RAW images from the currently active physical camera. Because different
-              physical camera may have different RAW characteristics, the application needs to use
-              the characteristics and result metadata of the active physical camera for the
-              relevant RAW metadata.
+              Even if the underlying physical cameras have different RAW characteristics (such as
+              size or CFA pattern), a logical camera can still advertise RAW capability. In this
+              case, when the application configures a RAW stream, the camera device will make sure
+              the active physical camera will remain active to ensure consistent RAW output
+              behavior, and not switch to other physical cameras.
 
               The capture request and result metadata tags required for backward compatible camera
-              functionalities will be solely based on the logical camera capability. On the other
+              functionalities will be solely based on the logical camera capabiltity. On the other
               hand, the use of manual capture controls (sensor or post-processing) with a
               logical camera may result in unexpected behavior when the HAL decides to switch
               between physical cameras with different characteristics under the hood. For example,
@@ -6065,7 +5871,7 @@
                 addition to android.permission.CAMERA in order to connect to this camera device.
               </notes>
             </value>
-            <value optional="true" visibility="java_public" hal_version="3.5">OFFLINE_PROCESSING
+            <value optional="true" ndk_hidden="true" hal_version="3.5">OFFLINE_PROCESSING
               <notes>
               The camera device supports the OFFLINE_PROCESSING use case.
 
@@ -6107,66 +5913,6 @@
                       session.
               </notes>
             </value>
-            <value optional="true" hal_version="3.6" >ULTRA_HIGH_RESOLUTION_SENSOR
-              <notes>
-                This camera device is capable of producing ultra high resolution images in
-                addition to the image sizes described in the
-                android.scaler.streamConfigurationMap.
-                It can operate in 'default' mode and 'max resolution' mode. It generally does this
-                by binning pixels in 'default' mode and not binning them in 'max resolution' mode.
-                `android.scaler.streamConfigurationMap` describes the streams supported in 'default'
-                mode.
-                The stream configurations supported in 'max resolution' mode are described by
-                `android.scaler.streamConfigurationMapMaximumResolution`.
-                The maximum resolution mode pixel array size of a camera device
-                (`android.sensor.info.pixelArraySize`) with this capability,
-                will be at least 24 megapixels.
-              </notes>
-            </value>
-            <value optional="true" visibility="java_public" hal_version="3.6">REMOSAIC_REPROCESSING
-              <notes>
-              The device supports reprocessing from the `RAW_SENSOR` format with a bayer pattern
-              given by android.sensor.info.binningFactor (m x n group of pixels with the same
-              color filter) to a remosaiced regular bayer pattern.
-
-              This capability will only be present for devices with
-              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-              capability. When
-              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-              devices do not advertise this capability,
-              {@link android.graphics.ImageFormat#RAW_SENSOR} images will already have a
-              regular bayer pattern.
-
-              If a `RAW_SENSOR` stream is requested along with another non-RAW stream in a
-              {@link android.hardware.camera2.CaptureRequest} (if multiple streams are supported
-              when android.sensor.pixelMode is set to
-              {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}),
-              the `RAW_SENSOR` stream will have a regular bayer pattern.
-
-              This capability requires the camera device to support the following :
-              * The {@link android.hardware.camera2.params.StreamConfigurationMap} mentioned below
-                refers to the one, described by
-                `android.scaler.streamConfigurationMapMaximumResolution`.
-              * One input stream is supported, that is, `android.request.maxNumInputStreams == 1`.
-              * {@link android.graphics.ImageFormat#RAW_SENSOR} is supported as an output/input
-                format, that is, {@link android.graphics.ImageFormat#RAW_SENSOR} is included in the
-                lists of formats returned by {@link
-                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats} and {@link
-                android.hardware.camera2.params.StreamConfigurationMap#getOutputFormats}.
-              * {@link android.hardware.camera2.params.StreamConfigurationMap#getValidOutputFormatsForInput}
-                returns non-empty int[] for each supported input format returned by {@link
-                android.hardware.camera2.params.StreamConfigurationMap#getInputFormats}.
-              * Each size returned by {@link
-                android.hardware.camera2.params.StreamConfigurationMap#getInputSizes
-                getInputSizes(ImageFormat.RAW_SENSOR)} is also included in {@link
-                android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes
-                getOutputSizes(ImageFormat.RAW_SENSOR)}
-              * Using {@link android.graphics.ImageFormat#RAW_SENSOR} does not cause a frame rate
-                drop relative to the sensor's maximum capture rate (at that resolution).
-              * No CaptureRequest controls will be applicable when a request has an input target
-                with {@link android.graphics.ImageFormat#RAW_SENSOR} format.
-              </notes>
-            </value>
           </enum>
           <description>List of capabilities that this camera device
           advertises as fully supporting.</description>
@@ -6641,13 +6387,6 @@
             coordinate system is post-zoom, meaning that the activeArraySize or
             preCorrectionActiveArraySize covers the camera device's field of view "after" zoom.  See
             android.control.zoomRatio for details.
-
-            For camera devices with the
-            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            capability, android.sensor.info.activeArraySizeMaximumResolution /
-            android.sensor.info.preCorrectionActiveArraySizeMaximumResolution must be used as the
-            coordinate system for requests where android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
           </details>
           <ndk_details>
             The data representation is int[4], which maps to (left, top, width, height).
@@ -6662,6 +6401,40 @@
             for raw output, where only a few fixed scales may be
             possible.
 
+            For a set of output streams configured, if the sensor output is cropped to a smaller
+            size than pre-correction active array size, the HAL need follow below cropping rules:
+
+            * The HAL need to handle the cropRegion as if the sensor crop size is the effective
+            pre-correction active array size. More specifically, the HAL must transform the request
+            cropRegion from android.sensor.info.preCorrectionActiveArraySize to the sensor cropped
+            pixel area size in this way:
+                1. If android.control.zoomRatio is set to value x, scale the requested cropRegion
+                with 1.0/x in relation to its center as the origin. For example, say the requested
+                cropRegion is (crX, crY, crWidth, crHeight), override it with
+                    `crX' = crX + crWidth * (1.0 - 1.0 / x) / 2`,
+                    `crY' = crY + crHeight * (1.0 - 1.0 / x) / 2`,
+                    `crWidth' = crWidth / x`, and
+                    `crHeight' = crHeight / x`.
+                2. Translate the requested cropRegion w.r.t., the left top corner of the sensor
+                cropped pixel area by (tx, ty),
+                where `ty = sensorCrop.top * (sensorCrop.height / preCorrectionActiveArraySize.height)`
+                and `tx = sensorCrop.left * (sensorCrop.width / preCorrectionActiveArraySize.width)`.
+                The (sensorCrop.top, sensorCrop.left) is the coordinate based off the
+                android.sensor.info.activeArraySize.
+                3. Scale the width and height of requested cropRegion with scaling factor of
+                sensorCrop.width/preCorrectionActiveArraySize.width and sensorCrop.height/preCorrectionActiveArraySize.height
+                respectively.
+            Once this new cropRegion is calculated, the HAL must use this region to crop the image
+            with regard to the sensor crop size (effective pre-correction active array size). The
+            HAL still need follow the general cropping rule for this new cropRegion and effective
+            pre-correction active array size.
+
+            * The HAL must report the cropRegion with regard to android.sensor.info.preCorrectionActiveArraySize.
+            The HAL need convert the new cropRegion generated above w.r.t., full pre-correction
+            active array size. The reported cropRegion may be slightly different with the requested
+            cropRegion since the HAL may adjust the crop region to account for rounding, conversion
+            error, or other hardware limitations.
+
             If android.control.zoomRatio is supported by the HAL, the HAL must report the zoom
             ratio via android.control.zoomRatio, and change the coordinate system such that
             android.sensor.info.preCorrectionActiveArraySize or android.sensor.info.activeArraySize
@@ -6776,7 +6549,7 @@
           </details>
           <hal_details>
           These format values are from HAL_PIXEL_FORMAT_* in
-          system/core/libsystem/include/system/graphics-base.h.
+          system/core/include/system/graphics.h.
 
           When IMPLEMENTATION_DEFINED is used, the platform
           gralloc module will select a format based on the usage flags provided
@@ -6864,8 +6637,8 @@
           maximum zoom ratio.
           </details>
           <hal_details>
-          If the HAL supports android.control.zoomRatio, this value must be equal to or less than
-          the maximum supported zoomRatio specified in android.control.zoomRatioRange.
+          If the HAL supports android.control.zoomRatio, this value must be equal to the maximum
+          supported zoomRatio specified in android.control.zoomRatioRange.
           </hal_details>
           <tag id="BC" />
         </entry>
@@ -7020,8 +6793,8 @@
 
           </details>
           <hal_details>
-          For the formats, see `system/core/libsystem/include/system/graphics-base.h` for a
-          definition of the image format enumerations. The PRIVATE format refers to the
+          For the formats, see `system/core/include/system/graphics.h` for a definition
+          of the image format enumerations. The PRIVATE format refers to the
           HAL_PIXEL_FORMAT_IMPLEMENTATION_DEFINED format. The HAL could determine
           the actual format by using the gralloc usage flags.
           For ZSL use case in particular, the HAL could choose appropriate format (partially
@@ -7095,8 +6868,8 @@
           an input stream of a particular format. For more details, see
           android.scaler.availableInputOutputFormatsMap.
 
-          For applications targeting SDK version older than 31, the following table
-          describes the minimum required output stream configurations based on the hardware level
+          The following table describes the minimum required output stream
+          configurations based on the hardware level
           (android.info.supportedHardwareLevel):
 
           Format         | Size                                         | Hardware Level | Notes
@@ -7110,31 +6883,6 @@
           YUV_420_888    | all output sizes available for JPEG, up to the maximum video size | LIMITED        |
           IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |
 
-          For applications targeting SDK version 31 or newer, if the mobile device declares to be
-          {@link android.os.Build.VERSION_CDOES.MEDIA_PERFORMANCE_CLASS media performance class} S,
-          the primary camera devices (first rear/front camera in the camera ID list) will not
-          support JPEG sizes smaller than 1080p. If the application configures a JPEG stream
-          smaller than 1080p, the camera device will round up the JPEG image size to at least
-          1080p. The requirements for IMPLEMENTATION_DEFINED and YUV_420_888 stay the same.
-          This new minimum required output stream configurations are illustrated by the table below:
-
-          Format         | Size                                         | Hardware Level | Notes
-          :-------------:|:--------------------------------------------:|:--------------:|:--------------:
-          JPEG           | android.sensor.info.activeArraySize          | Any            |
-          JPEG           | 1920x1080 (1080p)                            | Any            | if 1080p &lt;= activeArraySize
-          YUV_420_888    | android.sensor.info.activeArraySize          | FULL           |
-          YUV_420_888    | 1920x1080 (1080p)                            | FULL           | if 1080p &lt;= activeArraySize
-          YUV_420_888    | 1280x720 (720)                               | FULL           | if 720p &lt;= activeArraySize
-          YUV_420_888    | 640x480 (480p)                               | FULL           | if 480p &lt;= activeArraySize
-          YUV_420_888    | 320x240 (240p)                               | FULL           | if 240p &lt;= activeArraySize
-          YUV_420_888    | all output sizes available for FULL hardware level, up to the maximum video size | LIMITED        |
-          IMPLEMENTATION_DEFINED | same as YUV_420_888                  | Any            |
-
-          For applications targeting SDK version 31 or newer, if the mobile device doesn't declare
-          to be media performance class S, or if the camera device isn't a primary rear/front
-          camera, the minimum required output stream configurations are the same as for applications
-          targeting SDK version older than 31.
-
           Refer to android.request.availableCapabilities for additional
           mandatory stream configurations on a per-capability basis.
 
@@ -7183,11 +6931,6 @@
           * 720p (1280 x 720)
           * 1080p (1920 x 1080)
 
-          Note that for Performance Class 12 primary cameras (first rear/front facing camera in the
-          camera ID list), camera framework filters out JPEG sizes smaller than 1080p depending on
-          applications' targetSdkLevel. The camera HAL must still support the smaller JPEG sizes
-          to maintain backward comopatibility.
-
           For LIMITED capability devices
           (`android.info.supportedHardwareLevel == LIMITED`),
           the HAL only has to list up to the maximum video size
@@ -7220,6 +6963,9 @@
           When multiple streams are used in a request, the minimum frame
           duration will be max(individual stream min durations).
 
+          The minimum frame duration of a stream (of a particular format, size)
+          is the same regardless of whether the stream is input or output.
+
           See android.sensor.frameDuration and
           android.scaler.availableStallDurations for more details about
           calculating the max frame rate.
@@ -7455,9 +7201,7 @@
               the field of view vertically (letterboxing) or horizontally (pillarboxing), but not
               windowboxing.
           * Setting android.control.zoomRatio to values different than 1.0 and
-          android.scaler.cropRegion to be windowboxing at the same time are not supported. In this
-          case, the camera framework will override the android.scaler.cropRegion to be the active
-          array.
+          android.scaler.cropRegion to be windowboxing at the same time is undefined behavior.
 
           LEGACY capability devices will only support CENTER_ONLY cropping.
           </details>
@@ -7696,7 +7440,8 @@
           (it is synthetic and will not be available at the HAL layer).
           </hal_details>
         </entry>
-        <entry name="availableRotateAndCropModes" type="byte" visibility="public"
+
+        <entry name="availableRotateAndCropModes" type="byte" visibility="hidden"
                type_notes="list of enums" container="array" typedef="enumList"
                hal_version="3.5">
           <array>
@@ -7709,14 +7454,14 @@
           <details>
             This entry lists the valid modes for android.scaler.rotateAndCrop for this camera device.
 
-            Starting with API level 30, all devices will list at least `ROTATE_AND_CROP_NONE`.
+            Starting at some future API level, all devices will list at least `ROTATE_AND_CROP_NONE`.
             Devices with support for rotate-and-crop will additionally list at least
             `ROTATE_AND_CROP_AUTO` and `ROTATE_AND_CROP_90`.
           </details>
         </entry>
       </static>
       <controls>
-        <entry name="rotateAndCrop" type="byte" visibility="public" enum="true"
+        <entry name="rotateAndCrop" type="byte" visibility="hidden" enum="true"
                hal_version="3.5">
           <enum>
             <value>NONE
@@ -7828,6 +7573,8 @@
             * 1280x720 stream: top-left: `(711, 375)` on active array, size: `(1280, 720)`, upscaled 1.71x from sensor pixels
           </details>
           <hal_details>
+            Not ready for use in Android 11.
+
             ROTATE_AND_CROP_AUTO will never be sent to the HAL, though it must be set as the default
             value in all the capture request templates by the HAL.  The camera service will
             translate AUTO to a specific rotation value based on the current application's
@@ -7844,349 +7591,6 @@
         <clone entry="android.scaler.rotateAndCrop" kind="controls" hal_version="3.5">
         </clone>
       </dynamic>
-      <static>
-        <entry name="defaultSecureImageSize" type="int32" visibility="public"
-               type_notes="width/height for the default secure image data size" container="array"
-               typedef="size" hal_version="3.6">
-          <array>
-            <size>2</size>
-          </array>
-          <description>
-            Default YUV/PRIVATE size to use for requesting secure image buffers.
-          </description>
-          <units>Pixels</units>
-          <details>
-            This entry lists the default size supported in the secure camera mode. This entry is
-            optional on devices support the SECURE_IMAGE_DATA capability. This entry will be null
-            if the camera device does not list SECURE_IMAGE_DATA capability.
-
-            When the key is present, only a PRIVATE/YUV output of the specified size is guaranteed
-            to be supported by the camera HAL in the secure camera mode. Any other format or
-            resolutions might not be supported. Use
-            {@link CameraDevice#isSessionConfigurationSupported|ACameraDevice_isSessionConfigurationSupported}
-            API to query if a secure session configuration is supported if the device supports this
-            API.
-
-            If this key returns null on a device with SECURE_IMAGE_DATA capability, the application
-            can assume all output sizes listed in the
-            {@link
-            android.hardware.camera2.params.StreamConfigurationMap|ACAMERA_SCALER_AVAILABLE_MIN_FRAME_DURATIONS}
-            are supported.
-          </details>
-        </entry>
-        <entry name="physicalCameraMultiResolutionStreamConfigurations" type="int32"
-               visibility="ndk_public" optional="true" enum="true" container="array"
-               typedef="streamConfiguration" hwlevel="limited" hal_version="3.6">
-          <array>
-            <size>n</size>
-            <size>4</size>
-          </array>
-          <enum>
-            <value>OUTPUT</value>
-            <value>INPUT</value>
-          </enum>
-          <description>The available multi-resolution stream configurations that this
-          physical camera device supports
-          (i.e. format, width, height, output/input stream).
-          </description>
-          <details>
-          This list contains a subset of the parent logical camera's multi-resolution stream
-          configurations which belong to this physical camera, and it will advertise and will only
-          advertise the maximum supported resolutions for a particular format.
-
-          If this camera device isn't a physical camera device constituting a logical camera,
-          but a standalone {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-          camera, this field represents the multi-resolution input/output stream configurations of
-          default mode and max resolution modes. The sizes will be the maximum resolution of a
-          particular format for default mode and max resolution mode.
-
-          This field will only be advertised if the device is a physical camera of a
-          logical multi-camera device or an ultra high resolution sensor camera. For a logical
-          multi-camera, the camera API will derive the logical camera’s multi-resolution stream
-          configurations from all physical cameras. For an ultra high resolution sensor camera, this
-          is used directly as the camera’s multi-resolution stream configurations.
-          </details>
-          <hal_details>
-          If this field contains input stream configurations, and the camera device is a physical
-          camera (not a standalone ultra-high resolution camera), the
-          android.logicalMultiCamera.activePhysicalId tag must be set to the physical camera Id in
-          the physical camera result metadata. This is to make sure during multi-resolution
-          reprocessing, the camera HAL is notified of which physical camera the reprocessing
-          request comes from.
-          </hal_details>
-        </entry>
-        <entry name="multiResolutionStreamConfigurationMap" type="int32" visibility="java_public"
-               synthetic="true" optional="true" typedef="multiResolutionStreamConfigurationMap">
-          <description>The multi-resolution stream configurations supported by this logical camera
-          or ultra high resolution sensor camera device.
-          </description>
-          <details>
-          Multi-resolution streams can be used by a LOGICAL_MULTI_CAMERA or an
-          ULTRA_HIGH_RESOLUTION_SENSOR camera where the images sent or received can vary in
-          resolution per frame. This is useful in cases where the camera device's effective full
-          resolution changes depending on factors such as the current zoom level, lighting
-          condition, focus distance, or pixel mode.
-
-          * For a logical multi-camera implementing optical zoom, at different zoom level, a
-          different physical camera may be active, resulting in different full-resolution image
-          sizes.
-          * For an ultra high resolution camera, depending on whether the camera operates in default
-          mode, or maximum resolution mode, the output full-size images may be of either binned
-          resolution or maximum resolution.
-
-          To use multi-resolution output streams, the supported formats can be queried by {@link
-          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputFormats}.
-          A {@link android.hardware.camera2.MultiResolutionImageReader} can then be created for a
-          supported format with the MultiResolutionStreamInfo group queried by {@link
-          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getOutputInfo}.
-
-          If a camera device supports multi-resolution output streams for a particular format, for
-          each of its mandatory stream combinations, the camera device will support using a
-          MultiResolutionImageReader for the MAXIMUM stream of supported formats. Refer to
-          {@link android.hardware.camera2.CameraDevice#createCaptureSession} for additional details.
-
-          To use multi-resolution input streams, the supported formats can be queried by {@link
-          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputFormats}.
-          A reprocessable CameraCaptureSession can then be created using an {@link
-          android.hardware.camera2.params.InputConfiguration InputConfiguration} constructed with
-          the input MultiResolutionStreamInfo group, queried by {@link
-          android.hardware.camera2.params.MultiResolutionStreamConfigurationMap#getInputInfo}.
-
-          If a camera device supports multi-resolution {@code YUV} input and multi-resolution
-          {@code YUV} output, or multi-resolution {@code PRIVATE} input and multi-resolution
-          {@code PRIVATE} output, {@code JPEG} and {@code YUV} are guaranteed to be supported
-          multi-resolution output stream formats. Refer to
-          {@link android.hardware.camera2.CameraDevice#createCaptureSession} for
-          details about the additional mandatory stream combinations in this case.
-          </details>
-          <hal_details>
-          Do not set this property directly
-          (it is synthetic and will not be available at the HAL layer).
-          </hal_details>
-        </entry>
-        <entry name="availableStreamConfigurationsMaximumResolution" type="int32"
-              visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
-              hal_version="3.6">
-          <array>
-            <size>n</size>
-            <size>4</size>
-          </array>
-          <enum>
-            <value>OUTPUT</value>
-            <value>INPUT</value>
-          </enum>
-          <description>The available stream configurations that this
-            camera device supports (i.e. format, width, height, output/input stream) for a
-            CaptureRequest with android.sensor.pixelMode set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <details>
-          Analogous to android.scaler.availableStreamConfigurations, for configurations
-          which are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-
-          Not all output formats may be supported in a configuration with
-          an input stream of a particular format. For more details, see
-          android.scaler.availableInputOutputFormatsMapMaximumResolution.
-          </details>
-          <hal_details>
-            Refer to hal_details for android.scaler.availableStreamConfigurations.
-          </hal_details>
-        </entry>
-        <entry name="availableMinFrameDurationsMaximumResolution" type="int64" visibility="ndk_public"
-               container="array" typedef="streamConfigurationDuration" hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the minimum frame duration for each
-            format/size combination when the camera device is sent a CaptureRequest with
-            android.sensor.pixelMode set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Analogous to android.scaler.availableMinFrameDurations, for configurations
-          which are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-
-          When multiple streams are used in a request (if supported, when android.sensor.pixelMode
-          is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}), the
-          minimum frame duration will be max(individual stream min durations).
-
-          See android.sensor.frameDuration and
-          android.scaler.availableStallDurationsMaximumResolution for more details about
-          calculating the max frame rate.
-          </details>
-        </entry>
-        <entry name="availableStallDurationsMaximumResolution" type="int64" visibility="ndk_public"
-               container="array" typedef="streamConfigurationDuration" hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the maximum stall duration for each
-            output format/size combination when CaptureRequests are submitted with
-            android.sensor.pixelMode set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Analogous to android.scaler.availableMinFrameDurations, for configurations
-          which are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <hal_details>
-          If possible, it is recommended that all non-JPEG formats
-          (such as RAW16) should not have a stall duration. RAW10, RAW12, RAW_OPAQUE
-          and IMPLEMENTATION_DEFINED must not have stall durations.
-          </hal_details>
-        </entry>
-        <entry name="streamConfigurationMapMaximumResolution" type="int32" visibility="java_public"
-               synthetic="true" typedef="streamConfigurationMap">
-          <description>The available stream configurations that this
-            camera device supports when given a CaptureRequest with android.sensor.pixelMode
-            set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION};
-            also includes the minimum frame durations
-            and the stall durations for each format/size combination.
-          </description>
-          <details>
-          Analogous to android.scaler.streamConfigurationMap for CaptureRequests where
-          android.sensor.pixelMode is
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <hal_details>
-          Do not set this property directly
-          (it is synthetic and will not be available at the HAL layer);
-          set the android.scaler.availableStreamConfigurationsMaximumResolution instead.
-
-          Not all output formats may be supported in a configuration with
-          an input stream of a particular format. For more details, see
-          android.scaler.availableInputOutputFormatsMapMaximumResolution.
-          </hal_details>
-        </entry>
-        <entry name="availableInputOutputFormatsMapMaximumResolution" type="int32"
-          visibility="hidden" typedef="reprocessFormatsMap" hal_version="3.6">
-          <description>The mapping of image formats that are supported by this
-          camera device for input streams, to their corresponding output formats, when
-          android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <details>
-          Analogous to android.scaler.availableInputOutputFormatsMap for CaptureRequests where
-          android.sensor.pixelMode is
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <hal_details>
-          Refer to hal details for android.scaler.availableInputOutputFormatsMapMaximumResolution.
-          </hal_details>
-          <tag id="REPROC" />
-        </entry>
-        <entry name="mandatoryMaximumResolutionStreamCombinations" type="int32"
-          visibility="java_public" synthetic="true" container="array"
-          typedef="mandatoryStreamCombination">
-          <array>
-            <size>n</size>
-          </array>
-          <description>
-          An array of mandatory stream combinations which are applicable when
-          {@link android.hardware.camera2.CaptureRequest} has android.sensor.pixelMode set
-          to {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          This is an app-readable conversion of the maximum resolution mandatory stream combination
-          {@link android.hardware.camera2.CameraDevice#createCaptureSession tables}.
-          </description>
-          <details>
-          The array of
-          {@link android.hardware.camera2.params.MandatoryStreamCombination combinations} is
-          generated according to the documented
-          {@link android.hardware.camera2.CameraDevice#createCaptureSession guideline} for each
-          device which has the
-          {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-          capability.
-          Clients can use the array as a quick reference to find an appropriate camera stream
-          combination.
-          The mandatory stream combination array will be {@code null} in case the device is not an
-          {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-          device.
-          </details>
-          <hal_details>
-          Do not set this property directly
-          (it is synthetic and will not be available at the HAL layer).
-          </hal_details>
-        </entry>
-        <entry name="multiResolutionStreamSupported" type="byte" visibility="ndk_public" enum="true"
-          typedef="boolean" hwlevel="limited" hal_version="3.6">
-          <enum>
-            <value>FALSE</value>
-            <value>TRUE</value>
-          </enum>
-          <description>Whether the camera device supports multi-resolution input or output streams
-          </description>
-          <details>
-          A logical multi-camera or an ultra high resolution camera may support multi-resolution
-          input or output streams. With multi-resolution output streams, the camera device is able
-          to output different resolution images depending on the current active physical camera or
-          pixel mode. With multi-resolution input streams, the camera device can reprocess images
-          of different resolutions from different physical cameras or sensor pixel modes.
-
-          When set to TRUE:
-          * For a logical multi-camera, the camera framework derives
-          android.scaler.multiResolutionStreamConfigurationMap by combining the
-          android.scaler.physicalCameraMultiResolutionStreamConfigurations from its physical
-          cameras.
-          * For an ultra-high resolution sensor camera, the camera framework directly copies
-          the value of android.scaler.physicalCameraMultiResolutionStreamConfigurations to
-          android.scaler.multiResolutionStreamConfigurationMap.
-          </details>
-          <hal_details>
-          For the HAL to claim support for multi-resolution streams:
-          * The HAL must support the buffer management API by setting
-          supportedBufferManagementVersion to HIDL_DEVICE_3_5.
-          * For a logical multi-camera, when combined from all its physical cameras, there must be
-          at a minimum one input or output stream format with at least two different
-          physicalCameraMultiResolutionStreamConfigurations entries for that format.
-          * For an ultra high resolution sensor camera, for each supported multi-resolution format,
-          the physicalCameraMultiResolutionStreamConfigurations must contain both the largest stream
-          configuration within the android.scaler.streamConfigurationMap and the largest stream
-          configuration within the android.scaler.streamConfigurationMapMaximumResolution.
-          * If the HAL advertises multi-resolution input stream support for a particular format
-          (namely PRIVATE, or YUV), the logical multi-camera or ultra high resolution sensor camera
-          must have the corresponding reprocessing capabilities (PRIVATE_REPROCESSING,
-          or YUV_REPROCESSING respectively). The camera HAL must support reprocessing the
-          multi-resolution input stream to the output formats specified in the camera's
-          android.scaler.availableInputOutputFormatsMap.
-          </hal_details>
-        </entry>
-      </static>
-      <controls>
-        <entry name="cropRegionSet" type="byte" visibility="fwk_only"
-               enum="true" typedef="boolean">
-          <enum>
-            <value>TRUE
-            <notes>Crop region (android.scaler.cropRegion) has been set by the
-              camera client.
-            </notes>
-            </value>
-            <value>FALSE
-            <notes>
-              Scaler crop regions (android.scaler.cropRegion) has not been set by the camera
-              client.
-            </notes>
-            </value>
-          </enum>
-          <description>
-            Framework-only private key which informs camera fwk that the scaler crop region
-            (android.scaler.cropRegion) has been set by the client and it need
-            not be corrected when android.sensor.pixelMode is set to MAXIMUM_RESOLUTION.
-          </description>
-          <details>
-            This must be set to TRUE by the camera2 java fwk when the camera client sets
-            android.scaler.cropRegion.
-          </details>
-        </entry>
-      </controls>
     </section>
     <section name="sensor">
       <controls>
@@ -8657,7 +8061,7 @@
 
             E.g. to calculate position of a pixel, (x,y), in a processed YUV output image with the
             dimensions in android.sensor.info.activeArraySize given the position of a pixel,
-            (x', y'), in the raw pixel array with dimensions given in
+            (x', y'), in the raw pixel array with dimensions give in
             android.sensor.info.pixelArraySize:
 
             1. Choose a pixel (x', y') within the active array region of the raw buffer given in
@@ -8710,123 +8114,6 @@
             </hal_details>
             <tag id="RAW" />
           </entry>
-          <entry name="activeArraySizeMaximumResolution" type="int32" visibility="public"
-            type_notes="Four ints defining the active pixel rectangle"
-            container="array" typedef="rectangle" hal_version="3.6">
-            <array>
-              <size>4</size>
-            </array>
-            <description>
-            The area of the image sensor which corresponds to active pixels after any geometric
-            distortion correction has been applied, when the sensor runs in maximum resolution mode.
-            </description>
-            <units>Pixel coordinates on the image sensor</units>
-            <details>
-            Analogous to android.sensor.info.activeArraySize, when android.sensor.pixelMode
-            is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-            Refer to android.sensor.info.activeArraySize for details, with sensor array related keys
-            replaced with their
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
-            counterparts.
-            This key will only be present for devices which advertise the
-            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            capability.
-            </details>
-            <ndk_details>
-            The data representation is `int[4]`, which maps to `(left, top, width, height)`.
-            </ndk_details>
-            <hal_details>
-            This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
-            &amp;gt;= `(0,0)`.
-            The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySizeMaximumResolution`.
-            </hal_details>
-            <tag id="RAW" />
-          </entry>
-          <entry name="pixelArraySizeMaximumResolution" type="int32" visibility="public"
-            container="array" typedef="size" hal_version="3.6">
-            <array>
-              <size>2</size>
-            </array>
-            <description>Dimensions of the full pixel array, possibly
-            including black calibration pixels, when the sensor runs in maximum resolution mode.
-            Analogous to android.sensor.info.pixelArraySize, when android.sensor.pixelMode is
-            set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-            </description>
-            <units>Pixels</units>
-            <details>
-            The pixel count of the full pixel array of the image sensor, which covers
-            android.sensor.info.physicalSize area. This represents the full pixel dimensions of
-            the raw buffers produced by this sensor, when it runs in maximum resolution mode. That
-            is, when android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-            This key will only be present for devices which advertise the
-            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            capability.
-            </details>
-            <tag id="RAW" />
-          </entry>
-          <entry name="preCorrectionActiveArraySizeMaximumResolution" type="int32"
-            visibility="public" type_notes="Four ints defining the active pixel rectangle"
-            container="array" typedef="rectangle" hal_version="3.6">
-            <array>
-              <size>4</size>
-            </array>
-            <description>
-            The area of the image sensor which corresponds to active pixels prior to the
-            application of any geometric distortion correction, when the sensor runs in maximum
-            resolution mode. This key must be used for crop / metering regions, only when
-            android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-            </description>
-            <units>Pixel coordinates on the image sensor</units>
-            <details>
-            Analogous to android.sensor.info.preCorrectionActiveArraySize,
-            when android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-            This key will only be present for devices which advertise the
-            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            capability.
-            </details>
-            <ndk_details>
-            The data representation is `int[4]`, which maps to `(left, top, width, height)`.
-            </ndk_details>
-            <hal_details>
-            This array contains `(xmin, ymin, width, height)`. The `(xmin, ymin)` must be
-            &amp;gt;= `(0,0)`.
-            The `(width, height)` must be &amp;lt;= `android.sensor.info.pixelArraySizeMaximumResolution`.
-
-            If omitted by the HAL implementation, the camera framework will assume that this is
-            the same as the post-correction active array region given in
-            android.sensor.info.activeArraySizeMaximumResolution.
-            </hal_details>
-            <tag id="RAW" />
-          </entry>
-          <entry name="binningFactor" type="int32" visibility="public"
-                container="array" typedef="size" hal_version="3.6">
-          <array>
-            <size>2</size>
-          </array>
-          <description> Dimensions of the group of pixels which are under the same color filter.
-            This specifies the width and height (pair of integers) of the group of pixels which fall
-            under the same color filter for ULTRA_HIGH_RESOLUTION sensors.
-          </description>
-          <units>Pixels</units>
-          <details> Sensors can have pixels grouped together under the same color filter in order
-            to improve various aspects of imaging such as noise reduction, low light
-            performance etc. These groups can be of various sizes such as 2X2 (quad bayer),
-            3X3 (nona-bayer). This key specifies the length and width of the pixels grouped under
-            the same color filter.
-
-            This key will not be present if REMOSAIC_REPROCESSING is not supported, since RAW images
-            will have a regular bayer pattern.
-
-            This key will not be present for sensors which don't have the
-            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            capability.
-          </details>
-        </entry>
         </namespace>
         <entry name="referenceIlluminant1" type="byte" visibility="public"
                enum="true" permission_needed="true" >
@@ -9497,11 +8784,11 @@
 
               For example:
 
-                  android.sensor.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
+                  android.testPatternData = [0, 0xFFFFFFFF, 0xFFFFFFFF, 0]
 
               All green pixels are 100% green. All red/blue pixels are black.
 
-                  android.sensor.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
+                  android.testPatternData = [0xFFFFFFFF, 0, 0xFFFFFFFF, 0]
 
               All red pixels are 100% red. Only the odd green pixels
               are 100% green. All blue pixels are 100% black.
@@ -9579,16 +8866,6 @@
               be exactly the same as the last.
               </notes>
             </value>
-            <value visibility="test" hal_version="3.6">BLACK
-              <notes>
-              All pixel data is replaced by 0% intensity (black) values.
-
-              This test pattern is identical to SOLID_COLOR with a value of `[0, 0, 0, 0]` for
-              android.sensor.testPatternData.  It is recommended that devices implement full
-              SOLID_COLOR support instead, but BLACK can be used to provide minimal support for a
-              test pattern suitable for privacy use cases.
-              </notes>
-            </value>
             <value id="256">CUSTOM1
               <notes>The first custom test pattern. All custom patterns that are
               available only on this camera device are at least this numeric
@@ -9827,106 +9104,7 @@
           between rows.
           </hal_details>
         </entry>
-        <entry name="opaqueRawSizeMaximumResolution" type="int32" visibility="system"
-          container="array" hal_version="3.6">
-          <array>
-            <size>n</size>
-            <size>3</size>
-          </array>
-          <description>Size in bytes for all the listed opaque RAW buffer sizes when
-            android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <range>Must be large enough to fit the opaque RAW of corresponding size produced by
-          the camera</range>
-          <details>
-          Refer to android.sensor.opaqueRawSize for details.
-          </details>
-          <hal_details>
-          Refer to android.sensor.opaqueRawSize for details.
-          </hal_details>
-        </entry>
       </static>
-      <controls>
-        <entry name="pixelMode" type="byte" visibility="public" enum="true"
-               hal_version="3.6">
-          <enum>
-            <value>DEFAULT
-            <notes> This is the default sensor pixel mode. This is the only sensor pixel mode
-              supported unless a camera device advertises
-              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}.
-              </notes>
-            </value>
-            <value>MAXIMUM_RESOLUTION
-            <notes> This sensor pixel mode is offered by devices with capability
-              {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}.
-              In this mode, sensors typically do not bin pixels, as a result can offer larger
-              image sizes.
-            </notes>
-            </value>
-          </enum>
-          <description>
-           Switches sensor pixel mode between maximum resolution mode and default mode.
-          </description>
-          <details>
-            This key controls whether the camera sensor operates in
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
-            mode or not. By default, all camera devices operate in
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT} mode.
-            When operating in
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT} mode, sensors
-            with {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            capability would typically perform pixel binning in order to improve low light
-            performance, noise reduction etc. However, in
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
-            mode (supported only
-            by {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            sensors), sensors typically operate in unbinned mode allowing for a larger image size.
-            The stream configurations supported in
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}
-            mode are also different from those of
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_DEFAULT} mode.
-            They can be queried through
-            {@link android.hardware.camera2.CameraCharacteristics#get} with
-            {@link CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP_MAXIMUM_RESOLUTION)}.
-            Unless reported by both
-            {@link android.hardware.camera2.params.StreamConfigurationMap}s, the outputs from
-            `android.scaler.streamConfigurationMapMaximumResolution` and
-            `android.scaler.streamConfigurationMap`
-            must not be mixed in the same CaptureRequest. In other words, these outputs are
-            exclusive to each other.
-            This key does not need to be set for reprocess requests.
-          </details>
-        </entry>
-      </controls>
-      <dynamic>
-        <clone entry="android.sensor.pixelMode" kind="controls">
-        </clone>
-        <entry name="rawBinningFactorUsed" type="byte" visibility="public" enum="true"
-          typedef="boolean" hal_version="3.6">
-          <enum>
-            <value>TRUE
-            <notes> The `RAW` targets in this capture have android.sensor.info.binningFactor as the
-              bayer pattern.
-              </notes>
-            </value>
-            <value>FALSE
-            <notes> The `RAW` targets have a regular bayer pattern in this capture.
-            </notes>
-            </value>
-          </enum>
-          <description>
-            Whether `RAW` images requested have their bayer pattern as described by
-            android.sensor.info.binningFactor.
-          </description>
-          <details>
-            This key will only be present in devices advertisting the
-            {@link android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR}
-            capability which also advertise `REMOSAIC_REPROCESSING` capability. On all other devices
-            RAW targets will have a regular bayer pattern.
-          </details>
-        </entry>
-      </dynamic>
     </section>
     <section name="shading">
       <controls>
@@ -10717,7 +9895,7 @@
           <range>android.statistics.info.availableOisDataModes</range>
           <details>
           Since optical image stabilization generally involves motion much faster than the duration
-          of individual image exposure, multiple OIS samples can be included for a single capture
+          of individualq image exposure, multiple OIS samples can be included for a single capture
           result. For example, if the OIS reporting operates at 200 Hz, a typical camera operating
           at 30fps may have 6-7 OIS samples per capture result. This information can be combined
           with the rolling shutter skew to account for lens motion during image exposure in
@@ -12062,152 +11240,6 @@
           </hal_details>
           <tag id="DEPTH" />
         </entry>
-        <entry name="availableDepthStreamConfigurationsMaximumResolution" type="int32"
-          visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
-          hal_version="3.6">
-          <array>
-            <size>n</size>
-            <size>4</size>
-          </array>
-          <enum>
-            <value>OUTPUT</value>
-            <value>INPUT</value>
-          </enum>
-          <description>The available depth dataspace stream
-          configurations that this camera device supports
-          (i.e. format, width, height, output/input stream) when a CaptureRequest is submitted with
-          android.sensor.pixelMode set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <details>
-            Analogous to android.depth.availableDepthStreamConfigurations, for configurations which
-            are applicable when android.sensor.pixelMode is set to
-            {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <tag id="DEPTH" />
-        </entry>
-        <entry name="availableDepthMinFrameDurationsMaximumResolution" type="int64"
-          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
-          hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the minimum frame duration for each
-          format/size combination for depth output formats when a CaptureRequest is submitted with
-          android.sensor.pixelMode set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Analogous to android.depth.availableDepthMinFrameDurations, for configurations which
-          are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-
-          See android.sensor.frameDuration and
-          android.scaler.availableStallDurationsMaximumResolution for more details about
-          calculating the max frame rate.
-          </details>
-          <tag id="DEPTH" />
-        </entry>
-        <entry name="availableDepthStallDurationsMaximumResolution" type="int64"
-          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
-          hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the maximum stall duration for each
-          output format/size combination for depth streams for CaptureRequests where
-          android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Analogous to android.depth.availableDepthStallDurations, for configurations which
-          are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <tag id="DEPTH" />
-        </entry>
-        <entry name="availableDynamicDepthStreamConfigurationsMaximumResolution" type="int32"
-          visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
-          hal_version="3.6">
-          <array>
-            <size>n</size>
-            <size>4</size>
-          </array>
-          <enum>
-            <value>OUTPUT</value>
-            <value>INPUT</value>
-          </enum>
-          <description>The available dynamic depth dataspace stream
-          configurations that this camera device supports (i.e. format, width, height,
-          output/input stream) for CaptureRequests where android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <details>
-          Analogous to android.depth.availableDynamicDepthStreamConfigurations, for configurations
-          which are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <hal_details>
-            Do not set this property directly.
-            It is populated by camera framework and must not be set
-            at the HAL layer.
-          </hal_details>
-          <tag id="DEPTH" />
-        </entry>
-        <entry name="availableDynamicDepthMinFrameDurationsMaximumResolution" type="int64"
-          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
-          hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the minimum frame duration for each
-          format/size combination for dynamic depth output streams  for CaptureRequests where
-          android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Analogous to android.depth.availableDynamicDepthMinFrameDurations, for configurations
-          which are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <hal_details>
-            Do not set this property directly.
-            It is populated by camera framework and must not be set
-            at the HAL layer.
-          </hal_details>
-          <tag id="DEPTH" />
-        </entry>
-        <entry name="availableDynamicDepthStallDurationsMaximumResolution" type="int64"
-               visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
-               hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the maximum stall duration for each
-          output format/size combination for dynamic depth streams for CaptureRequests where
-          android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Analogous to android.depth.availableDynamicDepthStallDurations, for configurations
-          which are applicable when android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </details>
-          <hal_details>
-            Do not set this property directly.
-            It is populated by camera framework and must not be set
-            at the HAL layer.
-          </hal_details>
-          <tag id="DEPTH" />
-        </entry>
       </static>
     </section>
     <section name="logicalMultiCamera">
@@ -12581,80 +11613,6 @@
           </hal_details>
           <tag id="HEIC" />
         </entry>
-        <entry name="availableHeicStreamConfigurationsMaximumResolution" type="int32"
-          visibility="ndk_public" enum="true" container="array" typedef="streamConfiguration"
-          hal_version="3.6">
-          <array>
-            <size>n</size>
-            <size>4</size>
-          </array>
-          <enum>
-            <value>OUTPUT</value>
-            <value>INPUT</value>
-          </enum>
-          <description>The available HEIC (ISO/IEC 23008-12) stream
-          configurations that this camera device supports
-          (i.e. format, width, height, output/input stream).
-          </description>
-          <details>
-          Refer to android.heic.availableHeicStreamConfigurations for details.
-          </details>
-          <ndk_details>
-          All the configuration tuples `(format, width, height, input?)` will contain
-          AIMAGE_FORMAT_HEIC format as OUTPUT only.
-          </ndk_details>
-          <hal_details>
-          These are output stream configurations for use with dataSpace HAL_DATASPACE_HEIF.
-
-          Do not set this property directly. It is populated by camera framework and must not be
-          set by the HAL layer.
-          </hal_details>
-         <tag id="HEIC" />
-        </entry>
-        <entry name="availableHeicMinFrameDurationsMaximumResolution" type="int64"
-          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
-          hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the minimum frame duration for each
-          format/size combination for HEIC output formats for CaptureRequests where
-          android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Refer to android.heic.availableHeicMinFrameDurations for details.
-          </details>
-          <hal_details>
-          Do not set this property directly. It is populated by camera framework and must not be
-          set by the HAL layer.
-          </hal_details>
-          <tag id="HEIC" />
-        </entry>
-        <entry name="availableHeicStallDurationsMaximumResolution" type="int64"
-          visibility="ndk_public" container="array" typedef="streamConfigurationDuration"
-          hal_version="3.6">
-          <array>
-            <size>4</size>
-            <size>n</size>
-          </array>
-          <description>This lists the maximum stall duration for each
-          output format/size combination for HEIC streams for CaptureRequests where
-          android.sensor.pixelMode is set to
-          {@link android.hardware.camera2.CameraMetadata#SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION}.
-          </description>
-          <units>(format, width, height, ns) x n</units>
-          <details>
-          Refer to android.heic.availableHeicStallDurations for details.
-          </details>
-          <hal_details>
-          Do not set this property directly. It is populated by camera framework and must not be
-          set by the HAL layer.
-          </hal_details>
-          <tag id="HEIC" />
-        </entry>
       </static>
     </section>
   </namespace>
diff --git a/camera/docs/metadata_definitions.xsd b/camera/docs/metadata_definitions.xsd
index 6df5813..d938417 100644
--- a/camera/docs/metadata_definitions.xsd
+++ b/camera/docs/metadata_definitions.xsd
@@ -205,7 +205,6 @@
                     <enumeration value="ndk_public" /> <!-- public in NDK. @hide in java -->
                     <enumeration value="hidden" /> <!-- java as @hide. Not included in NDK -->
                     <enumeration value="public" /> <!-- public to both java and NDK -->
-                    <enumeration value="fwk_only" /> <!-- java as @hide. Not included in NDK. Not included in hal interfaces. -->
                 </restriction>
             </simpleType>
         </attribute>
@@ -312,18 +311,6 @@
                 </restriction>
             </simpleType>
         </attribute>
-        <attribute name="visibility">
-            <simpleType>
-                <restriction base="string">
-                    <enumeration value="system" /> <!-- do not expose to java/NDK API -->
-                    <enumeration value="java_public" /> <!-- java as public SDK. Not included in NDK -->
-                    <enumeration value="ndk_public" /> <!-- public in NDK. @hide in java -->
-                    <enumeration value="hidden" /> <!-- java as @hide. Not included in NDK -->
-                    <enumeration value="test" /> <!-- java as @TestApi. Not included in NDK -->
-                    <enumeration value="public" /> <!-- public to both java and NDK -->
-                </restriction>
-            </simpleType>
-        </attribute>
         <attribute name="id" type="string" />
         <attribute name="hal_version" type="decimal" default="3.2" />
     </complexType>
diff --git a/camera/docs/metadata_helpers.py b/camera/docs/metadata_helpers.py
index 5039828..b9aee3f 100644
--- a/camera/docs/metadata_helpers.py
+++ b/camera/docs/metadata_helpers.py
@@ -180,8 +180,7 @@
     "int64"                  : "int64",
     "enumList"               : "int32",
     "string"                 : "string",
-    "capability"             : "Capability",
-    "multiResolutionStreamConfigurationMap" : "MultiResolutionStreamConfigurations"
+    "capability"             : "Capability"
   }
 
   if typeName not in typename_to_protobuftype:
@@ -1347,18 +1346,6 @@
   """
   return (e for e in entries if e.applied_visibility in visibilities)
 
-def remove_synthetic_or_fwk_only(entries):
-  """
-  Filter the given entries by removing those that are synthetic or fwk_only.
-
-  Args:
-    entries: An iterable of Entry nodes
-
-  Yields:
-    An iterable of Entry nodes
-  """
-  return (e for e in entries if not (e.synthetic or e.visibility == 'fwk_only'))
-
 def remove_synthetic(entries):
   """
   Filter the given entries by removing those that are synthetic.
@@ -1412,7 +1399,7 @@
   """
   ret = 0
   for sec in find_all_sections(root):
-      ret += len(list(filter_has_permission_needed(remove_synthetic_or_fwk_only(find_unique_entries(sec)))))
+      ret += len(list(filter_has_permission_needed(remove_synthetic(find_unique_entries(sec)))))
 
   return ret
 
@@ -1500,9 +1487,6 @@
 
   return soup.decode()
 
-def copyright_year():
-  return _copyright_year
-
 def hal_major_version():
   return _hal_major_version
 
@@ -1534,7 +1518,7 @@
   for section in all_sections:
     min_major_version = None
     min_minor_version = None
-    for entry in remove_synthetic_or_fwk_only(find_unique_entries(section)):
+    for entry in remove_synthetic(find_unique_entries(section)):
       min_major_version = (min_major_version or entry.hal_major_version)
       min_minor_version = (min_minor_version or entry.hal_minor_version)
       if entry.hal_major_version < min_major_version or \
diff --git a/camera/docs/metadata_model.py b/camera/docs/metadata_model.py
index 31a8c74..48c085e 100644
--- a/camera/docs/metadata_model.py
+++ b/camera/docs/metadata_model.py
@@ -977,7 +977,8 @@
     id: An optional numeric string, e.g. '0' or '0xFF'
     deprecated: A boolean, True if the enum should be deprecated.
     optional: A boolean
-    visibility: A string, one of "system", "java_public", "ndk_public", "hidden", "public"
+    hidden: A boolean, True if the enum should be hidden.
+    ndk_hidden: A boolean, True if the enum should be hidden in NDK
     notes: A string describing the notes, or None.
     sdk_notes: A string describing extra notes for public SDK only
     ndk_notes: A string describing extra notes for public NDK only
@@ -986,12 +987,13 @@
     hal_minor_version: The minor HIDL HAL version this value was first added in
   """
   def __init__(self, name, parent,
-               id=None, deprecated=False, optional=False, visibility=None, notes=None, sdk_notes=None, ndk_notes=None, hal_version='3.2'):
+      id=None, deprecated=False, optional=False, hidden=False, notes=None, sdk_notes=None, ndk_notes=None, ndk_hidden=False, hal_version='3.2'):
     self._name = name                    # str, e.g. 'ON' or 'OFF'
     self._id = id                        # int, e.g. '0'
     self._deprecated = deprecated        # bool
     self._optional = optional            # bool
-    self._visibility = visibility        # None or str; None is same as public
+    self._hidden = hidden                # bool
+    self._ndk_hidden = ndk_hidden        # bool
     self._notes = notes                  # None or str
     self._sdk_notes = sdk_notes          # None or str
     self._ndk_notes = ndk_notes          # None or str
@@ -1020,29 +1022,12 @@
     return self._optional
 
   @property
-  def visibility(self):
-    return self._visibility
-
-  @property
-  def applied_visibility(self):
-    return self._visibility or 'public'
-
-  @property
-  def hidl_comment_string(self):
-    parent_enum = None
-    if (self.parent is not None and self.parent.parent is not None):
-      parent_enum = self.parent.parent
-    if parent_enum is not None and parent_enum.visibility == 'fwk_only' or self._visibility == 'fwk_only':
-      return ','
-    return ', // HIDL v' + str(self._hal_major_version) + '.' + str(self.hal_minor_version)
-
-  @property
   def hidden(self):
-    return self.visibility in {'hidden', 'ndk_public', 'test'}
+    return self._hidden
 
   @property
   def ndk_hidden(self):
-    return self._visibility in {'hidden', 'java_public', 'test'}
+    return self._ndk_hidden
 
   @property
   def notes(self):
@@ -1078,12 +1063,12 @@
         non-empty id property.
   """
   def __init__(self, parent, values, ids={}, deprecateds=[],
-               optionals=[], visibilities={}, notes={}, sdk_notes={}, ndk_notes={}, hal_versions={}):
+      optionals=[], hiddens=[], notes={}, sdk_notes={}, ndk_notes={}, ndk_hiddens=[], hal_versions={}):
     self._parent = parent
     self._name = None
     self._values =                                                             \
-      [ EnumValue(val, self, ids.get(val), val in deprecateds, val in optionals, visibilities.get(val), \
-                  notes.get(val), sdk_notes.get(val), ndk_notes.get(val), hal_versions.get(val))        \
+      [ EnumValue(val, self, ids.get(val), val in deprecateds, val in optionals, val in hiddens,  \
+                  notes.get(val), sdk_notes.get(val), ndk_notes.get(val), val in ndk_hiddens, hal_versions.get(val))     \
         for val in values ]
 
   @property
@@ -1248,13 +1233,6 @@
     return self._visibility or 'system'
 
   @property
-  def hidl_comment_string(self):
-    if self._visibility == 'fwk_only':
-      return 'fwk_only'
-    visibility_lj = str(self.applied_visibility).ljust(12)
-    return visibility_lj + ' | HIDL v' + str(self._hal_major_version) + '.' + str(self._hal_minor_version)
-
-  @property
   def applied_ndk_visible(self):
     if self._visibility in ("public", "ndk_public"):
       return "true"
@@ -1403,7 +1381,8 @@
     enum_values = kwargs.get('enum_values')
     enum_deprecateds = kwargs.get('enum_deprecateds')
     enum_optionals = kwargs.get('enum_optionals')
-    enum_visibilities = kwargs.get('enum_visibilities')
+    enum_hiddens = kwargs.get('enum_hiddens')
+    enum_ndk_hiddens = kwargs.get('enum_ndk_hiddens')
     enum_notes = kwargs.get('enum_notes')  # { value => notes }
     enum_sdk_notes = kwargs.get('enum_sdk_notes')  # { value => sdk_notes }
     enum_ndk_notes = kwargs.get('enum_ndk_notes')  # { value => ndk_notes }
@@ -1428,7 +1407,7 @@
 
     if kwargs.get('enum', False):
       self._enum = Enum(self, enum_values, enum_ids, enum_deprecateds, enum_optionals,
-                        enum_visibilities, enum_notes, enum_sdk_notes, enum_ndk_notes, enum_hal_versions)
+                        enum_hiddens, enum_notes, enum_sdk_notes, enum_ndk_notes, enum_ndk_hiddens, enum_hal_versions)
     else:
       self._enum = None
 
diff --git a/camera/docs/metadata_parser_xml.py b/camera/docs/metadata_parser_xml.py
index dbd3db6..686073f 100755
--- a/camera/docs/metadata_parser_xml.py
+++ b/camera/docs/metadata_parser_xml.py
@@ -219,7 +219,8 @@
       enum_values = []
       enum_deprecateds = []
       enum_optionals = []
-      enum_visibilities = {}
+      enum_hiddens = []
+      enum_ndk_hiddens = []
       enum_notes = {}
       enum_sdk_notes = {}
       enum_ndk_notes = {}
@@ -236,9 +237,11 @@
         if value.attrs.get('optional', 'false') == 'true':
           enum_optionals.append(value_body)
 
-        visibility = value.attrs.get('visibility')
-        if visibility is not None:
-          enum_visibilities[value_body] = visibility
+        if value.attrs.get('hidden', 'false') == 'true':
+          enum_hiddens.append(value_body)
+
+        if value.attrs.get('ndk_hidden', 'false') == 'true':
+          enum_ndk_hiddens.append(value_body)
 
         notes = value.find('notes')
         if notes is not None:
@@ -261,7 +264,8 @@
       d['enum_values'] = enum_values
       d['enum_deprecateds'] = enum_deprecateds
       d['enum_optionals'] = enum_optionals
-      d['enum_visibilities'] = enum_visibilities
+      d['enum_hiddens'] = enum_hiddens
+      d['enum_ndk_hiddens'] = enum_ndk_hiddens
       d['enum_notes'] = enum_notes
       d['enum_sdk_notes'] = enum_sdk_notes
       d['enum_ndk_notes'] = enum_ndk_notes
@@ -313,7 +317,7 @@
 
     return d
 
-  def render(self, template, output_name=None, hal_version="3.2", copyright_year="2021"):
+  def render(self, template, output_name=None, hal_version="3.2"):
     """
     Render the metadata model using a Mako template as the view.
 
@@ -327,13 +331,11 @@
       output_name: path to the output file, or None to use stdout
       hal_version: target HAL version, used when generating HIDL HAL outputs.
                    Must be a string of form "X.Y" where X and Y are integers.
-      copyright_year: the year in the copyright section of output file
     """
     buf = StringIO()
     metadata_helpers._context_buf = buf
     metadata_helpers._hal_major_version = int(hal_version.partition('.')[0])
     metadata_helpers._hal_minor_version = int(hal_version.partition('.')[2])
-    metadata_helpers._copyright_year = copyright_year
 
     helpers = [(i, getattr(metadata_helpers, i))
                 for i in dir(metadata_helpers) if not i.startswith('_')]
@@ -359,8 +361,7 @@
 
 if __name__ == "__main__":
   if len(sys.argv) <= 2:
-    print("Usage: %s <filename.xml> <template.mako> [<output_file>]"\
-          " [<hal_version>] [<copyright_year>]" \
+    print("Usage: %s <filename.xml> <template.mako> [<output_file>] [<hal_version>]"          \
           % (sys.argv[0]), file=sys.stderr)
     sys.exit(0)
 
@@ -368,9 +369,8 @@
   template_name = sys.argv[2]
   output_name = sys.argv[3] if len(sys.argv) > 3 else None
   hal_version = sys.argv[4] if len(sys.argv) > 4 else "3.2"
-  copyright_year = sys.argv[5] if len(sys.argv) > 5 else "2021"
 
   parser = MetadataParserXml.create_from_file(file_name)
-  parser.render(template_name, output_name, hal_version, copyright_year)
+  parser.render(template_name, output_name, hal_version)
 
   sys.exit(0)
diff --git a/camera/docs/metadata_template.mako b/camera/docs/metadata_template.mako
index a673065..09922d0 100644
--- a/camera/docs/metadata_template.mako
+++ b/camera/docs/metadata_template.mako
@@ -156,8 +156,11 @@
                     % if value.optional:
                              optional="true"
                     % endif:
-                    % if value.visibility is not None:
-                             visibility="${value.visibility}"
+                    % if value.hidden:
+                             hidden="true"
+                    % endif:
+                    % if value.ndk_hidden:
+                             ndk_hidden="true"
                     % endif:
                     % if value.id is not None:
                              id="${value.id}"
diff --git a/camera/docs/ndk_camera_metadata_tags.mako b/camera/docs/ndk_camera_metadata_tags.mako
index c079820..7811f99 100644
--- a/camera/docs/ndk_camera_metadata_tags.mako
+++ b/camera/docs/ndk_camera_metadata_tags.mako
@@ -41,6 +41,7 @@
 
 __BEGIN_DECLS
 
+#if __ANDROID_API__ >= 24
 <%!
   from metadata_helpers import csym
   def annotated_type(entry):
@@ -79,12 +80,12 @@
 typedef enum acamera_metadata_tag {
     % for sec in find_all_sections(metadata):
 <%
-      entries = remove_synthetic_or_fwk_only(find_unique_entries(sec))
+      entries = remove_synthetic(find_unique_entries(sec))
       skip_sec = all(e.applied_ndk_visible == "false" for e in entries)
       if skip_sec:
         continue
 %>\
-      % for idx,entry in enumerate(remove_synthetic_or_fwk_only(find_unique_entries(sec))):
+      % for idx,entry in enumerate(remove_synthetic(find_unique_entries(sec))):
         % if entry.applied_ndk_visible == "true":
           % if entry.deprecated:
     ${ndk(entry.name) + " = " | csym,ljust(60)}// Deprecated! DO NOT USE
@@ -134,7 +135,7 @@
  */
 
 % for sec in find_all_sections(metadata):
-  % for entry in filter_ndk_visible(remove_synthetic_or_fwk_only(find_unique_entries(sec))):
+  % for entry in filter_ndk_visible(remove_synthetic(find_unique_entries(sec))):
     % if entry.enum:
 // ${ndk(entry.name) | csym}
 typedef enum acamera_metadata_enum_${csym(ndk(entry.name)).lower()} {
@@ -194,6 +195,7 @@
   % endfor
 
 % endfor
+#endif /* __ANDROID_API__ >= 24 */
 
 __END_DECLS
 
diff --git a/camera/fuzz/Android.bp b/camera/fuzz/Android.bp
index c42bb93..35b32e6 100644
--- a/camera/fuzz/Android.bp
+++ b/camera/fuzz/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_fuzz {
   name: "libcamera_metadata_fuzzer",
   srcs: [
@@ -16,4 +8,4 @@
     "libcamera_metadata",
   ],
   include_dirs: ["system/media/private/camera/include"],
-}
+}
\ No newline at end of file
diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h
index 2b3dfc2..ac25b76 100644
--- a/camera/include/system/camera_metadata_tags.h
+++ b/camera/include/system/camera_metadata_tags.h
@@ -181,11 +181,6 @@
     ANDROID_CONTROL_EXTENDED_SCENE_MODE,              // enum         | public       | HIDL v3.5
     ANDROID_CONTROL_ZOOM_RATIO_RANGE,                 // float[]      | public       | HIDL v3.5
     ANDROID_CONTROL_ZOOM_RATIO,                       // float        | public       | HIDL v3.5
-    ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int32[]      | hidden       | HIDL v3.6
-    ANDROID_CONTROL_AF_REGIONS_SET,                   // enum         | fwk_only
-    ANDROID_CONTROL_AE_REGIONS_SET,                   // enum         | fwk_only
-    ANDROID_CONTROL_AWB_REGIONS_SET,                  // enum         | fwk_only
     ANDROID_CONTROL_END,
 
     ANDROID_DEMOSAIC_MODE =                           // enum         | system       | HIDL v3.2
@@ -245,9 +240,6 @@
     ANDROID_LENS_RADIAL_DISTORTION,                   // float[]      | public       | HIDL v3.2
     ANDROID_LENS_POSE_REFERENCE,                      // enum         | public       | HIDL v3.3
     ANDROID_LENS_DISTORTION,                          // float[]      | public       | HIDL v3.3
-    ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION,       // float[]      | public       | HIDL v3.6
-    ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION,
-                                                      // float[]      | public       | HIDL v3.6
     ANDROID_LENS_END,
 
     ANDROID_LENS_INFO_AVAILABLE_APERTURES =           // float[]      | public       | HIDL v3.2
@@ -319,21 +311,8 @@
                                                       // enum[]       | ndk_public   | HIDL v3.4
     ANDROID_SCALER_AVAILABLE_RECOMMENDED_INPUT_OUTPUT_FORMATS_MAP,
                                                       // int32        | ndk_public   | HIDL v3.4
-    ANDROID_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES,   // byte[]       | public       | HIDL v3.5
-    ANDROID_SCALER_ROTATE_AND_CROP,                   // enum         | public       | HIDL v3.5
-    ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE,         // int32[]      | public       | HIDL v3.6
-    ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS,
-                                                      // enum[]       | ndk_public   | HIDL v3.6
-    ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
-                                                      // enum[]       | ndk_public   | HIDL v3.6
-    ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
-    ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
-    ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION,
-                                                      // int32        | hidden       | HIDL v3.6
-    ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED, // enum         | ndk_public   | HIDL v3.6
-    ANDROID_SCALER_CROP_REGION_SET,                   // enum         | fwk_only
+    ANDROID_SCALER_AVAILABLE_ROTATE_AND_CROP_MODES,   // byte[]       | hidden       | HIDL v3.5
+    ANDROID_SCALER_ROTATE_AND_CROP,                   // enum         | hidden       | HIDL v3.5
     ANDROID_SCALER_END,
 
     ANDROID_SENSOR_EXPOSURE_TIME =                    // int64        | public       | HIDL v3.2
@@ -368,9 +347,6 @@
     ANDROID_SENSOR_DYNAMIC_BLACK_LEVEL,               // float[]      | public       | HIDL v3.2
     ANDROID_SENSOR_DYNAMIC_WHITE_LEVEL,               // int32        | public       | HIDL v3.2
     ANDROID_SENSOR_OPAQUE_RAW_SIZE,                   // int32[]      | system       | HIDL v3.2
-    ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION,// int32[]      | system       | HIDL v3.6
-    ANDROID_SENSOR_PIXEL_MODE,                        // enum         | public       | HIDL v3.6
-    ANDROID_SENSOR_RAW_BINNING_FACTOR_USED,           // enum         | public       | HIDL v3.6
     ANDROID_SENSOR_END,
 
     ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE =           // int32[]      | public       | HIDL v3.2
@@ -386,13 +362,6 @@
     ANDROID_SENSOR_INFO_LENS_SHADING_APPLIED,         // enum         | public       | HIDL v3.2
     ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE,
                                                       // int32[]      | public       | HIDL v3.2
-    ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION,
-                                                      // int32[]      | public       | HIDL v3.6
-    ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION,
-                                                      // int32[]      | public       | HIDL v3.6
-    ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION,
-                                                      // int32[]      | public       | HIDL v3.6
-    ANDROID_SENSOR_INFO_BINNING_FACTOR,               // int32[]      | public       | HIDL v3.6
     ANDROID_SENSOR_INFO_END,
 
     ANDROID_SHADING_MODE =                            // enum         | public       | HIDL v3.2
@@ -491,18 +460,6 @@
                                                       // int64[]      | ndk_public   | HIDL v3.4
     ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS,
                                                       // int64[]      | ndk_public   | HIDL v3.4
-    ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
-                                                      // enum[]       | ndk_public   | HIDL v3.6
-    ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
-    ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
-    ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
-                                                      // enum[]       | ndk_public   | HIDL v3.6
-    ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
-    ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
     ANDROID_DEPTH_END,
 
     ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS =       // byte[]       | ndk_public   | HIDL v3.3
@@ -521,12 +478,6 @@
             ANDROID_HEIC_START,
     ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS,  // int64[]      | ndk_public   | HIDL v3.4
     ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS,      // int64[]      | ndk_public   | HIDL v3.4
-    ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION,
-                                                      // enum[]       | ndk_public   | HIDL v3.6
-    ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
-    ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION,
-                                                      // int64[]      | ndk_public   | HIDL v3.6
     ANDROID_HEIC_END,
 
     ANDROID_HEIC_INFO_SUPPORTED =                     // enum         | system       | HIDL v3.4
@@ -749,24 +700,6 @@
     ANDROID_CONTROL_EXTENDED_SCENE_MODE_VENDOR_START                 = 0x40, // HIDL v3.5
 } camera_metadata_enum_android_control_extended_scene_mode_t;
 
-// ANDROID_CONTROL_AF_REGIONS_SET
-typedef enum camera_metadata_enum_android_control_af_regions_set {
-    ANDROID_CONTROL_AF_REGIONS_SET_TRUE                             ,
-    ANDROID_CONTROL_AF_REGIONS_SET_FALSE                            ,
-} camera_metadata_enum_android_control_af_regions_set_t;
-
-// ANDROID_CONTROL_AE_REGIONS_SET
-typedef enum camera_metadata_enum_android_control_ae_regions_set {
-    ANDROID_CONTROL_AE_REGIONS_SET_TRUE                             ,
-    ANDROID_CONTROL_AE_REGIONS_SET_FALSE                            ,
-} camera_metadata_enum_android_control_ae_regions_set_t;
-
-// ANDROID_CONTROL_AWB_REGIONS_SET
-typedef enum camera_metadata_enum_android_control_awb_regions_set {
-    ANDROID_CONTROL_AWB_REGIONS_SET_TRUE                            ,
-    ANDROID_CONTROL_AWB_REGIONS_SET_FALSE                           ,
-} camera_metadata_enum_android_control_awb_regions_set_t;
-
 
 // ANDROID_DEMOSAIC_MODE
 typedef enum camera_metadata_enum_android_demosaic_mode {
@@ -900,9 +833,6 @@
     ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SECURE_IMAGE_DATA        , // HIDL v3.4
     ANDROID_REQUEST_AVAILABLE_CAPABILITIES_SYSTEM_CAMERA            , // HIDL v3.5
     ANDROID_REQUEST_AVAILABLE_CAPABILITIES_OFFLINE_PROCESSING       , // HIDL v3.5
-    ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR
-                                                                     , // HIDL v3.6
-    ANDROID_REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING    , // HIDL v3.6
 } camera_metadata_enum_android_request_available_capabilities_t;
 
 
@@ -961,34 +891,6 @@
     ANDROID_SCALER_ROTATE_AND_CROP_AUTO                             , // HIDL v3.5
 } camera_metadata_enum_android_scaler_rotate_and_crop_t;
 
-// ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS
-typedef enum camera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations {
-    ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT
-                                                                     , // HIDL v3.6
-    ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT
-                                                                     , // HIDL v3.6
-} camera_metadata_enum_android_scaler_physical_camera_multi_resolution_stream_configurations_t;
-
-// ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
-typedef enum camera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution {
-    ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
-                                                                     , // HIDL v3.6
-    ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
-                                                                     , // HIDL v3.6
-} camera_metadata_enum_android_scaler_available_stream_configurations_maximum_resolution_t;
-
-// ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED
-typedef enum camera_metadata_enum_android_scaler_multi_resolution_stream_supported {
-    ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE          , // HIDL v3.6
-    ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE           , // HIDL v3.6
-} camera_metadata_enum_android_scaler_multi_resolution_stream_supported_t;
-
-// ANDROID_SCALER_CROP_REGION_SET
-typedef enum camera_metadata_enum_android_scaler_crop_region_set {
-    ANDROID_SCALER_CROP_REGION_SET_TRUE                             ,
-    ANDROID_SCALER_CROP_REGION_SET_FALSE                            ,
-} camera_metadata_enum_android_scaler_crop_region_set_t;
-
 
 // ANDROID_SENSOR_REFERENCE_ILLUMINANT1
 typedef enum camera_metadata_enum_android_sensor_reference_illuminant1 {
@@ -1020,22 +922,9 @@
     ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS                     , // HIDL v3.2
     ANDROID_SENSOR_TEST_PATTERN_MODE_COLOR_BARS_FADE_TO_GRAY        , // HIDL v3.2
     ANDROID_SENSOR_TEST_PATTERN_MODE_PN9                            , // HIDL v3.2
-    ANDROID_SENSOR_TEST_PATTERN_MODE_BLACK                          , // HIDL v3.6
     ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1                         = 256, // HIDL v3.2
 } camera_metadata_enum_android_sensor_test_pattern_mode_t;
 
-// ANDROID_SENSOR_PIXEL_MODE
-typedef enum camera_metadata_enum_android_sensor_pixel_mode {
-    ANDROID_SENSOR_PIXEL_MODE_DEFAULT                               , // HIDL v3.6
-    ANDROID_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION                    , // HIDL v3.6
-} camera_metadata_enum_android_sensor_pixel_mode_t;
-
-// ANDROID_SENSOR_RAW_BINNING_FACTOR_USED
-typedef enum camera_metadata_enum_android_sensor_raw_binning_factor_used {
-    ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_TRUE                     , // HIDL v3.6
-    ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_FALSE                    , // HIDL v3.6
-} camera_metadata_enum_android_sensor_raw_binning_factor_used_t;
-
 
 // ANDROID_SENSOR_INFO_COLOR_FILTER_ARRANGEMENT
 typedef enum camera_metadata_enum_android_sensor_info_color_filter_arrangement {
@@ -1199,22 +1088,6 @@
                                                                      , // HIDL v3.4
 } camera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_t;
 
-// ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
-typedef enum camera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution {
-    ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
-                                                                     , // HIDL v3.6
-    ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
-                                                                     , // HIDL v3.6
-} camera_metadata_enum_android_depth_available_depth_stream_configurations_maximum_resolution_t;
-
-// ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
-typedef enum camera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution {
-    ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
-                                                                     , // HIDL v3.6
-    ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
-                                                                     , // HIDL v3.6
-} camera_metadata_enum_android_depth_available_dynamic_depth_stream_configurations_maximum_resolution_t;
-
 
 // ANDROID_LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
 typedef enum camera_metadata_enum_android_logical_multi_camera_sensor_sync_type {
@@ -1237,14 +1110,6 @@
     ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_INPUT         , // HIDL v3.4
 } camera_metadata_enum_android_heic_available_heic_stream_configurations_t;
 
-// ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION
-typedef enum camera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution {
-    ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT
-                                                                     , // HIDL v3.6
-    ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT
-                                                                     , // HIDL v3.6
-} camera_metadata_enum_android_heic_available_heic_stream_configurations_maximum_resolution_t;
-
 
 // ANDROID_HEIC_INFO_SUPPORTED
 typedef enum camera_metadata_enum_android_heic_info_supported {
diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c
index 94bead3..b407335 100644
--- a/camera/src/camera_metadata_tag_info.c
+++ b/camera/src/camera_metadata_tag_info.c
@@ -246,15 +246,6 @@
     { "zoomRatioRange",                TYPE_FLOAT  },
     [ ANDROID_CONTROL_ZOOM_RATIO - ANDROID_CONTROL_START ] =
     { "zoomRatio",                     TYPE_FLOAT  },
-    [ ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION - ANDROID_CONTROL_START ] =
-    { "availableHighSpeedVideoConfigurationsMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_CONTROL_AF_REGIONS_SET - ANDROID_CONTROL_START ] =
-    { "afRegionsSet",                  TYPE_BYTE   },
-    [ ANDROID_CONTROL_AE_REGIONS_SET - ANDROID_CONTROL_START ] =
-    { "aeRegionsSet",                  TYPE_BYTE   },
-    [ ANDROID_CONTROL_AWB_REGIONS_SET - ANDROID_CONTROL_START ] =
-    { "awbRegionsSet",                 TYPE_BYTE   },
 };
 
 static tag_info_t android_demosaic[ANDROID_DEMOSAIC_END -
@@ -359,11 +350,6 @@
     { "poseReference",                 TYPE_BYTE   },
     [ ANDROID_LENS_DISTORTION - ANDROID_LENS_START ] =
     { "distortion",                    TYPE_FLOAT  },
-    [ ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION - ANDROID_LENS_START ] =
-    { "distortionMaximumResolution",   TYPE_FLOAT  },
-    [ ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION - ANDROID_LENS_START ] =
-    { "intrinsicCalibrationMaximumResolution",
-                                        TYPE_FLOAT  },
 };
 
 static tag_info_t android_lens_info[ANDROID_LENS_INFO_END -
@@ -496,28 +482,6 @@
     { "availableRotateAndCropModes",   TYPE_BYTE   },
     [ ANDROID_SCALER_ROTATE_AND_CROP - ANDROID_SCALER_START ] =
     { "rotateAndCrop",                 TYPE_BYTE   },
-    [ ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE - ANDROID_SCALER_START ] =
-    { "defaultSecureImageSize",        TYPE_INT32  },
-    [ ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS - ANDROID_SCALER_START ] =
-    { "physicalCameraMultiResolutionStreamConfigurations",
-                                        TYPE_INT32  },
-    [ ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION - ANDROID_SCALER_START ] =
-    { "availableStreamConfigurationsMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_SCALER_START ] =
-    { "availableMinFrameDurationsMaximumResolution",
-                                        TYPE_INT64  },
-    [ ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_SCALER_START ] =
-    { "availableStallDurationsMaximumResolution",
-                                        TYPE_INT64  },
-    [ ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION - ANDROID_SCALER_START ] =
-    { "availableInputOutputFormatsMapMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED - ANDROID_SCALER_START ] =
-    { "multiResolutionStreamSupported",
-                                        TYPE_BYTE   },
-    [ ANDROID_SCALER_CROP_REGION_SET - ANDROID_SCALER_START ] =
-    { "cropRegionSet",                 TYPE_BYTE   },
 };
 
 static tag_info_t android_sensor[ANDROID_SENSOR_END -
@@ -592,13 +556,6 @@
     { "dynamicWhiteLevel",             TYPE_INT32  },
     [ ANDROID_SENSOR_OPAQUE_RAW_SIZE - ANDROID_SENSOR_START ] =
     { "opaqueRawSize",                 TYPE_INT32  },
-    [ ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION - ANDROID_SENSOR_START ] =
-    { "opaqueRawSizeMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_SENSOR_PIXEL_MODE - ANDROID_SENSOR_START ] =
-    { "pixelMode",                     TYPE_BYTE   },
-    [ ANDROID_SENSOR_RAW_BINNING_FACTOR_USED - ANDROID_SENSOR_START ] =
-    { "rawBinningFactorUsed",          TYPE_BYTE   },
 };
 
 static tag_info_t android_sensor_info[ANDROID_SENSOR_INFO_END -
@@ -625,17 +582,6 @@
     { "lensShadingApplied",            TYPE_BYTE   },
     [ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE - ANDROID_SENSOR_INFO_START ] =
     { "preCorrectionActiveArraySize",  TYPE_INT32  },
-    [ ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION - ANDROID_SENSOR_INFO_START ] =
-    { "activeArraySizeMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION - ANDROID_SENSOR_INFO_START ] =
-    { "pixelArraySizeMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION - ANDROID_SENSOR_INFO_START ] =
-    { "preCorrectionActiveArraySizeMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_SENSOR_INFO_BINNING_FACTOR - ANDROID_SENSOR_INFO_START ] =
-    { "binningFactor",                 TYPE_INT32  },
 };
 
 static tag_info_t android_shading[ANDROID_SHADING_END -
@@ -804,24 +750,6 @@
     [ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS - ANDROID_DEPTH_START ] =
     { "availableDynamicDepthStallDurations",
                                         TYPE_INT64  },
-    [ ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION - ANDROID_DEPTH_START ] =
-    { "availableDepthStreamConfigurationsMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_DEPTH_START ] =
-    { "availableDepthMinFrameDurationsMaximumResolution",
-                                        TYPE_INT64  },
-    [ ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_DEPTH_START ] =
-    { "availableDepthStallDurationsMaximumResolution",
-                                        TYPE_INT64  },
-    [ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION - ANDROID_DEPTH_START ] =
-    { "availableDynamicDepthStreamConfigurationsMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_DEPTH_START ] =
-    { "availableDynamicDepthMinFrameDurationsMaximumResolution",
-                                        TYPE_INT64  },
-    [ ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_DEPTH_START ] =
-    { "availableDynamicDepthStallDurationsMaximumResolution",
-                                        TYPE_INT64  },
 };
 
 static tag_info_t android_logical_multi_camera[ANDROID_LOGICAL_MULTI_CAMERA_END -
@@ -852,15 +780,6 @@
                                         TYPE_INT64  },
     [ ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS - ANDROID_HEIC_START ] =
     { "availableHeicStallDurations",   TYPE_INT64  },
-    [ ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION - ANDROID_HEIC_START ] =
-    { "availableHeicStreamConfigurationsMaximumResolution",
-                                        TYPE_INT32  },
-    [ ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_HEIC_START ] =
-    { "availableHeicMinFrameDurationsMaximumResolution",
-                                        TYPE_INT64  },
-    [ ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION - ANDROID_HEIC_START ] =
-    { "availableHeicStallDurationsMaximumResolution",
-                                        TYPE_INT64  },
 };
 
 static tag_info_t android_heic_info[ANDROID_HEIC_INFO_END -
@@ -905,15 +824,13 @@
     android_heic_info,
 };
 
-static int32_t tag_permission_needed[18] = {
+static int32_t tag_permission_needed[16] = {
     ANDROID_LENS_POSE_ROTATION,
     ANDROID_LENS_POSE_TRANSLATION,
     ANDROID_LENS_INTRINSIC_CALIBRATION,
     ANDROID_LENS_RADIAL_DISTORTION,
     ANDROID_LENS_POSE_REFERENCE,
     ANDROID_LENS_DISTORTION,
-    ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION,
-    ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION,
     ANDROID_LENS_INFO_HYPERFOCAL_DISTANCE,
     ANDROID_LENS_INFO_MINIMUM_FOCUS_DISTANCE,
     ANDROID_SENSOR_REFERENCE_ILLUMINANT1,
@@ -1650,54 +1567,6 @@
         case ANDROID_CONTROL_ZOOM_RATIO: {
             break;
         }
-        case ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_CONTROL_AF_REGIONS_SET: {
-            switch (value) {
-                case ANDROID_CONTROL_AF_REGIONS_SET_TRUE:
-                    msg = "TRUE";
-                    ret = 0;
-                    break;
-                case ANDROID_CONTROL_AF_REGIONS_SET_FALSE:
-                    msg = "FALSE";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_CONTROL_AE_REGIONS_SET: {
-            switch (value) {
-                case ANDROID_CONTROL_AE_REGIONS_SET_TRUE:
-                    msg = "TRUE";
-                    ret = 0;
-                    break;
-                case ANDROID_CONTROL_AE_REGIONS_SET_FALSE:
-                    msg = "FALSE";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_CONTROL_AWB_REGIONS_SET: {
-            switch (value) {
-                case ANDROID_CONTROL_AWB_REGIONS_SET_TRUE:
-                    msg = "TRUE";
-                    ret = 0;
-                    break;
-                case ANDROID_CONTROL_AWB_REGIONS_SET_FALSE:
-                    msg = "FALSE";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
 
         case ANDROID_DEMOSAIC_MODE: {
             switch (value) {
@@ -1975,12 +1844,6 @@
         case ANDROID_LENS_DISTORTION: {
             break;
         }
-        case ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION: {
-            break;
-        }
 
         case ANDROID_LENS_INFO_AVAILABLE_APERTURES: {
             break;
@@ -2211,14 +2074,6 @@
                     msg = "OFFLINE_PROCESSING";
                     ret = 0;
                     break;
-                case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR:
-                    msg = "ULTRA_HIGH_RESOLUTION_SENSOR";
-                    ret = 0;
-                    break;
-                case ANDROID_REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING:
-                    msg = "REMOSAIC_REPROCESSING";
-                    ret = 0;
-                    break;
                 default:
                     msg = "error: enum value out of range";
             }
@@ -2429,78 +2284,6 @@
             }
             break;
         }
-        case ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE: {
-            break;
-        }
-        case ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS: {
-            switch (value) {
-                case ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT:
-                    msg = "OUTPUT";
-                    ret = 0;
-                    break;
-                case ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT:
-                    msg = "INPUT";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-            switch (value) {
-                case ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT:
-                    msg = "OUTPUT";
-                    ret = 0;
-                    break;
-                case ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT:
-                    msg = "INPUT";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED: {
-            switch (value) {
-                case ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE:
-                    msg = "FALSE";
-                    ret = 0;
-                    break;
-                case ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE:
-                    msg = "TRUE";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_SCALER_CROP_REGION_SET: {
-            switch (value) {
-                case ANDROID_SCALER_CROP_REGION_SET_TRUE:
-                    msg = "TRUE";
-                    ret = 0;
-                    break;
-                case ANDROID_SCALER_CROP_REGION_SET_FALSE:
-                    msg = "FALSE";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
 
         case ANDROID_SENSOR_EXPOSURE_TIME: {
             break;
@@ -2676,10 +2459,6 @@
                     msg = "PN9";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_TEST_PATTERN_MODE_BLACK:
-                    msg = "BLACK";
-                    ret = 0;
-                    break;
                 case ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1:
                     msg = "CUSTOM1";
                     ret = 0;
@@ -2707,39 +2486,6 @@
         case ANDROID_SENSOR_OPAQUE_RAW_SIZE: {
             break;
         }
-        case ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_PIXEL_MODE: {
-            switch (value) {
-                case ANDROID_SENSOR_PIXEL_MODE_DEFAULT:
-                    msg = "DEFAULT";
-                    ret = 0;
-                    break;
-                case ANDROID_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION:
-                    msg = "MAXIMUM_RESOLUTION";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_SENSOR_RAW_BINNING_FACTOR_USED: {
-            switch (value) {
-                case ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_TRUE:
-                    msg = "TRUE";
-                    ret = 0;
-                    break;
-                case ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_FALSE:
-                    msg = "FALSE";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
 
         case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE: {
             break;
@@ -2830,18 +2576,6 @@
         case ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE: {
             break;
         }
-        case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_INFO_BINNING_FACTOR: {
-            break;
-        }
 
         case ANDROID_SHADING_MODE: {
             switch (value) {
@@ -3300,48 +3034,6 @@
         case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS: {
             break;
         }
-        case ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-            switch (value) {
-                case ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT:
-                    msg = "OUTPUT";
-                    ret = 0;
-                    break;
-                case ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT:
-                    msg = "INPUT";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-            switch (value) {
-                case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT:
-                    msg = "OUTPUT";
-                    ret = 0;
-                    break;
-                case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT:
-                    msg = "INPUT";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
 
         case ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS: {
             break;
@@ -3409,27 +3101,6 @@
         case ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS: {
             break;
         }
-        case ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-            switch (value) {
-                case ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT:
-                    msg = "OUTPUT";
-                    ret = 0;
-                    break;
-                case ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT:
-                    msg = "INPUT";
-                    ret = 0;
-                    break;
-                default:
-                    msg = "error: enum value out of range";
-            }
-            break;
-        }
-        case ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
 
         case ANDROID_HEIC_INFO_SUPPORTED: {
             switch (value) {
@@ -4326,54 +3997,6 @@
         case ANDROID_CONTROL_ZOOM_RATIO: {
             break;
         }
-        case ANDROID_CONTROL_AVAILABLE_HIGH_SPEED_VIDEO_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_CONTROL_AF_REGIONS_SET: {
-                enumName = "TRUE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_CONTROL_AF_REGIONS_SET_TRUE;
-                    ret = 0;
-                    break;
-                }
-                enumName = "FALSE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_CONTROL_AF_REGIONS_SET_FALSE;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_CONTROL_AE_REGIONS_SET: {
-                enumName = "TRUE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_CONTROL_AE_REGIONS_SET_TRUE;
-                    ret = 0;
-                    break;
-                }
-                enumName = "FALSE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_CONTROL_AE_REGIONS_SET_FALSE;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_CONTROL_AWB_REGIONS_SET: {
-                enumName = "TRUE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_CONTROL_AWB_REGIONS_SET_TRUE;
-                    ret = 0;
-                    break;
-                }
-                enumName = "FALSE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_CONTROL_AWB_REGIONS_SET_FALSE;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
 
         case ANDROID_DEMOSAIC_MODE: {
                 enumName = "FAST";
@@ -4669,12 +4292,6 @@
         case ANDROID_LENS_DISTORTION: {
             break;
         }
-        case ANDROID_LENS_DISTORTION_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_LENS_INTRINSIC_CALIBRATION_MAXIMUM_RESOLUTION: {
-            break;
-        }
 
         case ANDROID_LENS_INFO_AVAILABLE_APERTURES: {
             break;
@@ -4944,18 +4561,6 @@
                     ret = 0;
                     break;
                 }
-                enumName = "ULTRA_HIGH_RESOLUTION_SENSOR";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_REQUEST_AVAILABLE_CAPABILITIES_ULTRA_HIGH_RESOLUTION_SENSOR;
-                    ret = 0;
-                    break;
-                }
-                enumName = "REMOSAIC_REPROCESSING";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_REQUEST_AVAILABLE_CAPABILITIES_REMOSAIC_REPROCESSING;
-                    ret = 0;
-                    break;
-                }
             break;
         }
         case ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS: {
@@ -5199,78 +4804,6 @@
                 }
             break;
         }
-        case ANDROID_SCALER_DEFAULT_SECURE_IMAGE_SIZE: {
-            break;
-        }
-        case ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS: {
-                enumName = "OUTPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_OUTPUT;
-                    ret = 0;
-                    break;
-                }
-                enumName = "INPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_PHYSICAL_CAMERA_MULTI_RESOLUTION_STREAM_CONFIGURATIONS_INPUT;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-                enumName = "OUTPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT;
-                    ret = 0;
-                    break;
-                }
-                enumName = "INPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_AVAILABLE_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SCALER_AVAILABLE_INPUT_OUTPUT_FORMATS_MAP_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED: {
-                enumName = "FALSE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_FALSE;
-                    ret = 0;
-                    break;
-                }
-                enumName = "TRUE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_MULTI_RESOLUTION_STREAM_SUPPORTED_TRUE;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_SCALER_CROP_REGION_SET: {
-                enumName = "TRUE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_CROP_REGION_SET_TRUE;
-                    ret = 0;
-                    break;
-                }
-                enumName = "FALSE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SCALER_CROP_REGION_SET_FALSE;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
 
         case ANDROID_SENSOR_EXPOSURE_TIME: {
             break;
@@ -5489,12 +5022,6 @@
                     ret = 0;
                     break;
                 }
-                enumName = "BLACK";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SENSOR_TEST_PATTERN_MODE_BLACK;
-                    ret = 0;
-                    break;
-                }
                 enumName = "CUSTOM1";
                 if (strncmp(name, enumName, size) == 0) {
                     *value = ANDROID_SENSOR_TEST_PATTERN_MODE_CUSTOM1;
@@ -5521,39 +5048,6 @@
         case ANDROID_SENSOR_OPAQUE_RAW_SIZE: {
             break;
         }
-        case ANDROID_SENSOR_OPAQUE_RAW_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_PIXEL_MODE: {
-                enumName = "DEFAULT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SENSOR_PIXEL_MODE_DEFAULT;
-                    ret = 0;
-                    break;
-                }
-                enumName = "MAXIMUM_RESOLUTION";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SENSOR_PIXEL_MODE_MAXIMUM_RESOLUTION;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_SENSOR_RAW_BINNING_FACTOR_USED: {
-                enumName = "TRUE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_TRUE;
-                    ret = 0;
-                    break;
-                }
-                enumName = "FALSE";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_SENSOR_RAW_BINNING_FACTOR_USED_FALSE;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
 
         case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE: {
             break;
@@ -5654,18 +5148,6 @@
         case ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE: {
             break;
         }
-        case ANDROID_SENSOR_INFO_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_INFO_PIXEL_ARRAY_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_SENSOR_INFO_BINNING_FACTOR: {
-            break;
-        }
 
         case ANDROID_SHADING_MODE: {
                 enumName = "OFF";
@@ -6138,48 +5620,6 @@
         case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS: {
             break;
         }
-        case ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-                enumName = "OUTPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT;
-                    ret = 0;
-                    break;
-                }
-                enumName = "INPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_DEPTH_AVAILABLE_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-                enumName = "OUTPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT;
-                    ret = 0;
-                    break;
-                }
-                enumName = "INPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_DEPTH_AVAILABLE_DYNAMIC_DEPTH_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
 
         case ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS: {
             break;
@@ -6249,27 +5689,6 @@
         case ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS: {
             break;
         }
-        case ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION: {
-                enumName = "OUTPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_OUTPUT;
-                    ret = 0;
-                    break;
-                }
-                enumName = "INPUT";
-                if (strncmp(name, enumName, size) == 0) {
-                    *value = ANDROID_HEIC_AVAILABLE_HEIC_STREAM_CONFIGURATIONS_MAXIMUM_RESOLUTION_INPUT;
-                    ret = 0;
-                    break;
-                }
-            break;
-        }
-        case ANDROID_HEIC_AVAILABLE_HEIC_MIN_FRAME_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
-        case ANDROID_HEIC_AVAILABLE_HEIC_STALL_DURATIONS_MAXIMUM_RESOLUTION: {
-            break;
-        }
 
         case ANDROID_HEIC_INFO_SUPPORTED: {
                 enumName = "FALSE";
diff --git a/camera/tests/Android.bp b/camera/tests/Android.bp
index b922f10..58db12c 100644
--- a/camera/tests/Android.bp
+++ b/camera/tests/Android.bp
@@ -1,12 +1,4 @@
 // Build the unit tests.
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_test {
     name: "camera_metadata_tests",
     srcs: ["camera_metadata_tests.cpp"],
diff --git a/radio/Android.bp b/radio/Android.bp
index d526162..1ee4485 100644
--- a/radio/Android.bp
+++ b/radio/Android.bp
@@ -1,11 +1,3 @@
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_library_shared {
     name: "libradio_metadata",
     vendor_available: true,
diff --git a/tests/Android.bp b/tests/Android.bp
index 34e6f82..c6976b6 100644
--- a/tests/Android.bp
+++ b/tests/Android.bp
@@ -1,13 +1,5 @@
 // system/audio.h utilities test
 
-package {
-    // http://go/android-license-faq
-    // A large-scale-change added 'default_applicable_licenses' to import
-    // the below license kinds from "system_media_license":
-    //   SPDX-license-identifier-Apache-2.0
-    default_applicable_licenses: ["system_media_license"],
-}
-
 cc_test {
     name: "systemaudio_tests",
 
@@ -21,11 +13,7 @@
 
     header_libs: ["libmedia_headers"],
 
-    srcs: [
-        "static_checks_c.c",
-        "static_checks.cpp",
-        "systemaudio_tests.cpp",
-    ],
+    srcs: ["systemaudio_tests.cpp"],
 
     cflags: [
         "-Werror",
diff --git a/tests/static_checks.cpp b/tests/static_checks.cpp
deleted file mode 100644
index 06a505d..0000000
--- a/tests/static_checks.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include "static_checks.h"
-
-// No run time code, just needs to compile.
diff --git a/tests/static_checks.h b/tests/static_checks.h
deleted file mode 100644
index 7ee6d65..0000000
--- a/tests/static_checks.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#include <assert.h>
-#include <stdint.h>
-
-#include <system/audio.h>
-
-// Ensure that bit mask enum types have 32-bit size.
-// There is a lot of code that assumes this.
-
-// Note that audio_devices_t is not a pure mask type since R,
-// however there is legacy code which can mix its usage with uint32_t.
-
-#define AUDIO_ENUM_MASKS_LIST(V)                \
-    V(audio_channel_mask_t)                     \
-    V(audio_channel_representation_t)           \
-    V(audio_devices_t)                          \
-    V(audio_flags_mask_t)                       \
-    V(audio_gain_mode_t)                        \
-    V(audio_input_flags_t)                      \
-    V(audio_output_flags_t)
-
-#define AUDIO_ASSERT_ENUM_MASK_SIZE(t)                                  \
-    static_assert(sizeof(t) == sizeof(uint32_t), "The size of \'" #t "\' type must be 32 bits");
-AUDIO_ENUM_MASKS_LIST(AUDIO_ASSERT_ENUM_MASK_SIZE);
-#undef AUDIO_ASSERT_ENUM_MASK_SIZE
-#undef AUDIO_ENUM_MASKS_LIST
diff --git a/tests/static_checks_c.c b/tests/static_checks_c.c
deleted file mode 100644
index 33ac292..0000000
--- a/tests/static_checks_c.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2020 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-// 'static_assert' was introduced in C11,
-// surprisingly, Android might not have enabled it yet.
-#ifndef static_assert
-#define static_assert _Static_assert
-#endif
-
-#include "static_checks.h"
-
-// No run time code, just needs to compile.
diff --git a/tests/systemaudio_tests.cpp b/tests/systemaudio_tests.cpp
index be2be5f..1e4d07f 100644
--- a/tests/systemaudio_tests.cpp
+++ b/tests/systemaudio_tests.cpp
@@ -14,11 +14,6 @@
  * limitations under the License.
  */
 
-#include <algorithm>
-#include <cstdlib>
-#include <cstring>
-#include <functional>
-#include <string>
 #include <unordered_set>
 
 #include <gtest/gtest.h>
@@ -199,586 +194,4 @@
               std::begin(digitalDevices) + AUDIO_DEVICE_OUT_DIGITAL_CNT);
     runAudioDeviceTypeHelperFunction(allDeviceTypes, digitalDevices,
               std::size(digitalDevices), "digital", audio_device_is_digital);
-    runAudioDeviceTypeHelperFunction(allDeviceTypes, AUDIO_DEVICE_OUT_ALL_BLE_ARRAY,
-            std::size(AUDIO_DEVICE_OUT_ALL_BLE_ARRAY), "ble out",
-            audio_is_ble_out_device);
-    runAudioDeviceTypeHelperFunction(allDeviceTypes, AUDIO_DEVICE_IN_ALL_BLE_ARRAY,
-            std::size(AUDIO_DEVICE_IN_ALL_BLE_ARRAY), "ble in",
-            audio_is_ble_in_device);
 }
-
-
-// An array whose length is AUDIO_PORT_MAX_CHANNEL_MASKS for generating audio port information.
-static constexpr audio_channel_mask_t OUT_CHANNEL_MASKS[AUDIO_PORT_MAX_CHANNEL_MASKS] = {
-    AUDIO_CHANNEL_OUT_FRONT_LEFT,
-    AUDIO_CHANNEL_OUT_FRONT_RIGHT,
-    AUDIO_CHANNEL_OUT_FRONT_CENTER,
-    AUDIO_CHANNEL_OUT_LOW_FREQUENCY,
-    AUDIO_CHANNEL_OUT_BACK_LEFT,
-    AUDIO_CHANNEL_OUT_BACK_RIGHT,
-    AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER,
-    AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER,
-    AUDIO_CHANNEL_OUT_BACK_CENTER,
-    AUDIO_CHANNEL_OUT_SIDE_LEFT,
-    AUDIO_CHANNEL_OUT_SIDE_RIGHT,
-    AUDIO_CHANNEL_OUT_TOP_CENTER,
-    AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT,
-    AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER,
-    AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT,
-    AUDIO_CHANNEL_OUT_TOP_BACK_LEFT,
-    AUDIO_CHANNEL_OUT_TOP_BACK_CENTER,
-    AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT,
-    AUDIO_CHANNEL_OUT_TOP_SIDE_LEFT,
-    AUDIO_CHANNEL_OUT_TOP_SIDE_RIGHT,
-    AUDIO_CHANNEL_OUT_HAPTIC_A,
-    AUDIO_CHANNEL_OUT_HAPTIC_B,
-    AUDIO_CHANNEL_OUT_MONO,
-    AUDIO_CHANNEL_OUT_STEREO,
-    AUDIO_CHANNEL_OUT_2POINT1,
-    AUDIO_CHANNEL_OUT_TRI,
-    AUDIO_CHANNEL_OUT_TRI_BACK,
-    AUDIO_CHANNEL_OUT_3POINT1,
-    AUDIO_CHANNEL_OUT_2POINT0POINT2,
-    AUDIO_CHANNEL_OUT_2POINT1POINT2,
-    AUDIO_CHANNEL_OUT_3POINT0POINT2,
-    AUDIO_CHANNEL_OUT_QUAD
-};
-
-// An array whose length is AUDIO_PORT_MAX_CHANNEL_MASKS for generating audio port information.
-static constexpr audio_channel_mask_t IN_CHANNEL_MASKS[AUDIO_PORT_MAX_CHANNEL_MASKS] = {
-    AUDIO_CHANNEL_IN_LEFT,
-    AUDIO_CHANNEL_IN_RIGHT,
-    AUDIO_CHANNEL_IN_FRONT,
-    AUDIO_CHANNEL_IN_BACK,
-    AUDIO_CHANNEL_IN_LEFT_PROCESSED,
-    AUDIO_CHANNEL_IN_RIGHT_PROCESSED,
-    AUDIO_CHANNEL_IN_FRONT_PROCESSED,
-    AUDIO_CHANNEL_IN_BACK_PROCESSED,
-    AUDIO_CHANNEL_IN_PRESSURE,
-    AUDIO_CHANNEL_IN_X_AXIS,
-    AUDIO_CHANNEL_IN_Y_AXIS,
-    AUDIO_CHANNEL_IN_Z_AXIS,
-    AUDIO_CHANNEL_IN_BACK_LEFT,
-    AUDIO_CHANNEL_IN_BACK_RIGHT,
-    AUDIO_CHANNEL_IN_CENTER,
-    AUDIO_CHANNEL_IN_LOW_FREQUENCY,
-    AUDIO_CHANNEL_IN_TOP_LEFT,
-    AUDIO_CHANNEL_IN_TOP_RIGHT,
-    AUDIO_CHANNEL_IN_VOICE_UPLINK,
-    AUDIO_CHANNEL_IN_VOICE_DNLINK,
-    AUDIO_CHANNEL_IN_MONO,
-    AUDIO_CHANNEL_IN_STEREO,
-    AUDIO_CHANNEL_IN_FRONT_BACK,
-    AUDIO_CHANNEL_IN_6,
-    AUDIO_CHANNEL_IN_2POINT0POINT2,
-    AUDIO_CHANNEL_IN_2POINT1POINT2,
-    AUDIO_CHANNEL_IN_3POINT0POINT2,
-    AUDIO_CHANNEL_IN_3POINT1POINT2,
-    AUDIO_CHANNEL_IN_5POINT1,
-    AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO,
-    AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO,
-    AUDIO_CHANNEL_IN_VOICE_CALL_MONO
-};
-
-static constexpr unsigned int SHORT_AUDIO_DESCRIPTOR_LENGTH = 3;
-
-using SystemAudioPortTestParams = std::tuple<audio_port_role_t, audio_port_type_t>;
-
-class SystemAudioPortTest : public testing::TestWithParam<SystemAudioPortTestParams> {
-protected:
-    const struct audio_gain_config mGainConfig = {
-            .index = 0,
-            .mode = AUDIO_GAIN_MODE_JOINT,
-            .channel_mask = AUDIO_CHANNEL_OUT_FRONT_LEFT,
-            .values = {1, 2},
-            .ramp_duration_ms = 10
-    };
-    const struct audio_gain mGain = {
-            .mode = AUDIO_GAIN_MODE_JOINT,
-            .channel_mask = AUDIO_CHANNEL_OUT_FRONT_LEFT,
-            .min_value = 10,
-            .max_value = 100,
-            .default_value = 42,
-            .step_value = 2,
-            .min_ramp_ms = 10,
-            .max_ramp_ms = 20
-    };
-    const std::string mName = "SystemAudioPortTestName";
-    const size_t mLastFormat = 0x7f;
-    const audio_input_flags_t mInputFlag = AUDIO_INPUT_FLAG_FAST;
-    const audio_output_flags_t mOutputFlag = AUDIO_OUTPUT_FLAG_FAST;
-    const audio_module_handle_t mHwModule = 1;
-    const std::string mAddress = "SystemAudioPortTestAddress";
-    const audio_devices_t mInputDeviceType = AUDIO_DEVICE_IN_BUILTIN_MIC;
-    const audio_devices_t mOutputDeviceType = AUDIO_DEVICE_OUT_SPEAKER;
-    const audio_io_handle_t mIoHandle = 1;
-    const audio_stream_type_t mStream = AUDIO_STREAM_MUSIC;
-    const audio_source_t mSource = AUDIO_SOURCE_MIC;
-    const audio_session_t mSession = AUDIO_SESSION_DEVICE;
-
-    size_t fillFakeFormats(audio_format_t formats[], size_t numFormats);
-    void fillFakeAudioPortConfigInfo(struct audio_port_config* config);
-    void fillFakeAudioPortInfo(struct audio_port* audioPort);
-    void fillFakeAudioPortV7Info(struct audio_port_v7* portV7, bool containsExtraAudioDescriptor);
-
-    template <typename T, typename U, typename Func>
-    void updateFieldAndCompare(const T updatedValue, T U::*field, U* lhs, U* rhs, Func p) {
-        lhs->*field = updatedValue;
-        ASSERT_FALSE(p(lhs, rhs));
-        lhs->*field = rhs->*field;
-        ASSERT_TRUE(p(lhs, rhs));
-    }
-
-    template <typename T, typename Func>
-    void updateConfigFieldAndCompare(const T updatedValue, T audio_port_config::*field,
-            struct audio_port_config* lhs, struct audio_port_config* rhs,
-            unsigned int configMask, Func p) {
-        lhs->*field = updatedValue;
-        ASSERT_FALSE(p(lhs, rhs));
-        unsigned int savedConfigMask = lhs->config_mask;
-        lhs->config_mask &= ~configMask;
-        rhs->config_mask = lhs->config_mask;
-        ASSERT_TRUE(p(lhs, rhs));
-        lhs->config_mask = savedConfigMask;
-        rhs->config_mask = savedConfigMask;
-        lhs->*field = rhs->*field;
-        ASSERT_TRUE(p(lhs, rhs));
-    }
-
-    template <typename T>
-    void fillFakeAudioPortBaseInfo(T* port) {
-        port->id = 1;
-        port->role = std::get<0>(GetParam());
-        port->type = std::get<1>(GetParam());
-        // Intentionally make a name that is not ended with '\0' to test the conversion function.
-        strncpy(port->name, mName.c_str(), AUDIO_PORT_MAX_NAME_LEN);
-        port->num_gains = AUDIO_PORT_MAX_GAINS;
-        for (size_t i = 0; i < port->num_gains; ++i) {
-            port->gains[i] = mGain;
-            port->gains[i].max_ramp_ms *= (i + 1);
-        }
-        fillFakeAudioPortConfigInfo(&port->active_config);
-        switch (port->type) {
-        case AUDIO_PORT_TYPE_DEVICE:
-            port->ext.device.hw_module = mHwModule;
-            port->ext.device.type = port->role == AUDIO_PORT_ROLE_SINK ? mOutputDeviceType
-                                                                       : mInputDeviceType;
-            strncpy(port->ext.device.address, mAddress.c_str(), AUDIO_DEVICE_MAX_ADDRESS_LEN);
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-            port->ext.device.encapsulation_modes = AUDIO_ENCAPSULATION_MODE_ELEMENTARY_STREAM;
-            port->ext.device.encapsulation_metadata_types =
-                    AUDIO_ENCAPSULATION_METADATA_TYPE_FRAMEWORK_TUNER;
-#endif
-            break;
-        case AUDIO_PORT_TYPE_MIX:
-            port->ext.mix = {
-                    mHwModule,
-                    mIoHandle,
-                    AUDIO_LATENCY_NORMAL
-            };
-            break;
-        case AUDIO_PORT_TYPE_SESSION:
-            port->ext.session.session = mSession;
-            break;
-        default:
-            // Must not happen
-            FAIL() << "Unknown port type " << port->type;
-        }
-    }
-
-    template <typename T, typename Func>
-    void testAudioPortExtBaseEquivalent(T* lhs, T* rhs, Func p) {
-        switch (lhs->type) {
-        case AUDIO_PORT_TYPE_DEVICE:
-            lhs->ext.device.hw_module = rhs->ext.device.hw_module + 1;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.device.hw_module = rhs->ext.device.hw_module;
-            ASSERT_TRUE(p(lhs, rhs));
-            lhs->ext.device.type = AUDIO_DEVICE_NONE;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.device.type = rhs->ext.device.type;
-            ASSERT_TRUE(p(lhs, rhs));
-            memset(lhs->ext.device.address, 0, sizeof(lhs->ext.device.address));
-            ASSERT_FALSE(p(lhs, rhs));
-            strncpy(lhs->ext.device.address, rhs->ext.device.address, AUDIO_DEVICE_MAX_ADDRESS_LEN);
-            ASSERT_TRUE(p(lhs, rhs));
-            break;
-        case AUDIO_PORT_TYPE_MIX:
-            lhs->ext.mix.hw_module = rhs->ext.mix.hw_module + 1;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.mix.hw_module = rhs->ext.mix.hw_module;
-            ASSERT_TRUE(p(lhs, rhs));
-            lhs->ext.mix.handle = rhs->ext.mix.handle + 1;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.mix.handle = rhs->ext.mix.handle;
-            ASSERT_TRUE(p(lhs, rhs));
-            break;
-        case AUDIO_PORT_TYPE_SESSION:
-            lhs->ext.session.session = AUDIO_SESSION_NONE;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.session.session = rhs->ext.session.session;
-            ASSERT_TRUE(p(lhs, rhs));
-            break;
-        default:
-            break;
-        }
-    }
-
-    template <typename T, typename Func>
-    void testAudioPortEquivalent(T* lhs, T* rhs, Func p) {
-        updateFieldAndCompare(rhs->id + 1, &T::id, lhs, rhs, p);
-        updateFieldAndCompare(AUDIO_PORT_ROLE_NONE, &T::role, lhs, rhs, p);
-        updateFieldAndCompare(AUDIO_PORT_TYPE_NONE, &T::type, lhs, rhs, p);
-        memset(lhs->name, 0, sizeof(lhs->name));
-        ASSERT_FALSE(p(lhs, rhs));
-        strncpy(lhs->name, rhs->name, AUDIO_PORT_MAX_NAME_LEN);
-        ASSERT_TRUE(p(lhs, rhs));
-        updateFieldAndCompare(rhs->num_gains + 1, &T::num_gains, lhs, rhs, p);
-
-        lhs->gains[0] = {};
-        ASSERT_FALSE(p(lhs, rhs));
-        lhs->gains[0] = rhs->gains[0];
-        ASSERT_TRUE(p(lhs, rhs));
-
-        testAudioPortExtBaseEquivalent(lhs, rhs, p);
-        switch (lhs->type) {
-        case AUDIO_PORT_TYPE_DEVICE:
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-            lhs->ext.device.encapsulation_modes = AUDIO_ENCAPSULATION_MODE_NONE;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.device.encapsulation_modes = rhs->ext.device.encapsulation_modes;
-            ASSERT_TRUE(p(lhs, rhs));
-            lhs->ext.device.encapsulation_metadata_types = AUDIO_ENCAPSULATION_METADATA_TYPE_NONE;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.device.encapsulation_metadata_types =
-                    rhs->ext.device.encapsulation_metadata_types;
-            ASSERT_TRUE(p(lhs, rhs));
-#endif
-            break;
-        case AUDIO_PORT_TYPE_MIX:
-            lhs->ext.mix.latency_class = AUDIO_LATENCY_LOW;
-            ASSERT_FALSE(p(lhs, rhs));
-            lhs->ext.mix.latency_class = rhs->ext.mix.latency_class;
-            ASSERT_TRUE(p(lhs, rhs));
-            break;
-        default:
-            break;
-        }
-    }
-
-    template <typename T, typename U, typename Func>
-    void testAudioPortCapabilityArraysEquivalent(T values[], size_t size, const T& replacedValue,
-            U* lhs, U* rhs, Func p) {
-        ASSERT_GT(size, 1);
-        std::swap(values[0], values[1]);
-        ASSERT_TRUE(p(lhs, rhs));
-        T savedValue = values[0];
-        values[0] = replacedValue;
-        ASSERT_FALSE(p(lhs, rhs));
-        values[0] = savedValue;
-        ASSERT_TRUE(p(lhs, rhs));
-    }
-};
-
-void SystemAudioPortTest::fillFakeAudioPortConfigInfo(struct audio_port_config* config) {
-    config->id = 0;
-    config->role = std::get<0>(GetParam());
-    config->type = std::get<1>(GetParam());
-    config->config_mask = AUDIO_PORT_CONFIG_ALL;
-    config->sample_rate = 48000;
-    config->channel_mask = audio_port_config_has_input_direction(config) ?
-            AUDIO_CHANNEL_IN_MONO : AUDIO_CHANNEL_OUT_MONO;
-    config->format = AUDIO_FORMAT_PCM_16_BIT;
-    config->gain = mGainConfig;
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    if (audio_port_config_has_input_direction(config)) {
-        config->flags.input = mInputFlag;
-    } else {
-        config->flags.output = mOutputFlag;
-    }
-#endif
-    switch (config->type) {
-    case AUDIO_PORT_TYPE_DEVICE:
-        config->ext.device.hw_module = mHwModule;
-        config->ext.device.type =
-                config->role == AUDIO_PORT_ROLE_SINK ? mOutputDeviceType : mInputDeviceType;
-        strncpy(config->ext.device.address, mAddress.c_str(), AUDIO_DEVICE_MAX_ADDRESS_LEN);
-        break;
-    case AUDIO_PORT_TYPE_MIX:
-        config->ext.mix.hw_module = mHwModule;
-        config->ext.mix.handle = mIoHandle;
-        if (config->role == AUDIO_PORT_ROLE_SOURCE) {
-            config->ext.mix.usecase.stream = mStream;
-        } else {
-            config->ext.mix.usecase.source = mSource;
-        }
-        break;
-    case AUDIO_PORT_TYPE_SESSION:
-        config->ext.session.session = mSession;
-        break;
-    default:
-        // Must not happen
-        FAIL() << "Unknown port type " << config->type;
-    }
-}
-
-size_t SystemAudioPortTest::fillFakeFormats(audio_format_t formats[], size_t numFormats) {
-    size_t j = 0;
-    size_t format = 0x1;
-    while (j < numFormats) {
-        while (format <= mLastFormat) {
-            if (audio_is_valid_format(static_cast<audio_format_t>(format << 24))) {
-                break;
-            }
-            format++;
-        }
-        if (format > mLastFormat) {
-            break;
-        }
-        formats[j++] = static_cast<audio_format_t>((format++) << 24);
-    }
-    return j;
-}
-
-void SystemAudioPortTest::fillFakeAudioPortInfo(struct audio_port* audioPort) {
-    fillFakeAudioPortBaseInfo(audioPort);
-    // Use the maximum number of sample rates, formats, channel masks and gains for test
-    audioPort->num_sample_rates = AUDIO_PORT_MAX_SAMPLING_RATES;
-    for (size_t i = 0; i < audioPort->num_sample_rates; ++i) {
-        // The numbers doesn't make any difference.
-        audioPort->sample_rates[i] = (i + 1) * 1000;
-    }
-    audioPort->num_channel_masks = AUDIO_PORT_MAX_CHANNEL_MASKS;
-    auto channelMasks = audioPort->role == AUDIO_PORT_ROLE_SINK ? OUT_CHANNEL_MASKS
-                                                                : IN_CHANNEL_MASKS;
-    std::copy(channelMasks, channelMasks+audioPort->num_channel_masks,
-            std::begin(audioPort->channel_masks));
-    audioPort->num_formats = AUDIO_PORT_MAX_FORMATS;
-    audioPort->num_formats = fillFakeFormats(audioPort->formats, audioPort->num_formats);
-}
-
-void SystemAudioPortTest::fillFakeAudioPortV7Info(struct audio_port_v7* portV7,
-                                                  bool containsExtraAudioDescriptor) {
-    fillFakeAudioPortBaseInfo(portV7);
-    audio_format_t formats[AUDIO_PORT_MAX_FORMATS];
-    portV7->num_audio_profiles = fillFakeFormats(formats, AUDIO_PORT_MAX_FORMATS);
-    for (size_t i = 0; i < portV7->num_audio_profiles; ++i) {
-        portV7->audio_profiles[i].format = formats[i];
-        // Use the maximum number of sample rates, formats, channel masks and gains for test
-        portV7->audio_profiles[i].num_sample_rates = AUDIO_PORT_MAX_SAMPLING_RATES;
-        for (size_t j = 0; j < portV7->audio_profiles[i].num_sample_rates; ++j) {
-            // The numbers doesn't make any difference.
-            portV7->audio_profiles[i].sample_rates[j] = rand();
-        }
-        portV7->audio_profiles[i].num_channel_masks = AUDIO_PORT_MAX_CHANNEL_MASKS;
-        auto channelMasks = portV7->role == AUDIO_PORT_ROLE_SINK ? OUT_CHANNEL_MASKS
-                                                                 : IN_CHANNEL_MASKS;
-        std::copy(channelMasks, channelMasks+portV7->audio_profiles[i].num_channel_masks,
-                std::begin(portV7->audio_profiles[i].channel_masks));
-    }
-    if (containsExtraAudioDescriptor) {
-        portV7->num_extra_audio_descriptors = AUDIO_PORT_MAX_EXTRA_AUDIO_DESCRIPTORS;
-        for (size_t i = 0; i < portV7->num_extra_audio_descriptors; ++i) {
-            portV7->extra_audio_descriptors[i].standard = AUDIO_STANDARD_EDID;
-            portV7->extra_audio_descriptors[i].descriptor_length = SHORT_AUDIO_DESCRIPTOR_LENGTH;
-            for (unsigned int j = 0; j < SHORT_AUDIO_DESCRIPTOR_LENGTH; ++j) {
-                portV7->extra_audio_descriptors[i].descriptor[j] = rand() % 254 + 1;
-            }
-            portV7->extra_audio_descriptors[i].encapsulation_type =
-                    AUDIO_ENCAPSULATION_TYPE_IEC61937;
-        }
-    }
-}
-
-TEST_F(SystemAudioPortTest, AudioGainConfigEquivalentTest) {
-    struct audio_gain_config lhs = mGainConfig;
-    struct audio_gain_config rhs = mGainConfig;
-    ASSERT_TRUE(audio_gain_config_are_equal(&lhs, &rhs));
-    lhs.index = rhs.index + 1;
-    ASSERT_TRUE(audio_gain_config_are_equal(&lhs, &rhs));
-    lhs.index = rhs.index;
-    lhs.values[0] = rhs.values[0] + 1;
-    ASSERT_FALSE(audio_gain_config_are_equal(&lhs, &rhs));
-    lhs.values[0] = rhs.values[0];
-    updateFieldAndCompare(rhs.ramp_duration_ms + 10, &audio_gain_config::ramp_duration_ms,
-            &lhs, &rhs, audio_gain_config_are_equal);
-    for (const audio_gain_mode_t mode : {AUDIO_GAIN_MODE_CHANNELS, AUDIO_GAIN_MODE_RAMP}) {
-        lhs.mode = mode;
-        ASSERT_FALSE(audio_gain_config_are_equal(&lhs, &rhs));
-        rhs.mode = lhs.mode;
-        ASSERT_TRUE(audio_gain_config_are_equal(&lhs, &rhs));
-        lhs.values[2] = rhs.values[2] + 1;
-        ASSERT_TRUE(audio_gain_config_are_equal(&lhs, &rhs));
-        lhs.values[2] = rhs.values[2];
-        lhs.values[0] = rhs.values[0] + 1;
-        ASSERT_FALSE(audio_gain_config_are_equal(&lhs, &rhs));
-        lhs.values[0] = rhs.values[0];
-    }
-}
-
-TEST_F(SystemAudioPortTest, AudioGainEquivalentTest) {
-    struct audio_gain lhs = mGain;
-    struct audio_gain rhs = mGain;
-    ASSERT_TRUE(audio_gains_are_equal(&lhs, &rhs));
-
-    lhs.mode = AUDIO_GAIN_MODE_CHANNELS;
-    ASSERT_FALSE(audio_gains_are_equal(&lhs, &rhs));
-    rhs.mode = lhs.mode;
-    ASSERT_TRUE(audio_gains_are_equal(&lhs, &rhs));
-    updateFieldAndCompare(static_cast<audio_channel_mask_t>(rhs.channel_mask << 1),
-            &audio_gain::channel_mask, &lhs, &rhs, audio_gains_are_equal);
-
-    updateFieldAndCompare(rhs.min_value + 10, &audio_gain::min_value,
-            &lhs, &rhs, audio_gains_are_equal);
-    updateFieldAndCompare(rhs.max_value + 10, &audio_gain::max_value,
-            &lhs, &rhs, audio_gains_are_equal);
-    updateFieldAndCompare(rhs.default_value + 10, &audio_gain::default_value,
-            &lhs, &rhs, audio_gains_are_equal);
-    updateFieldAndCompare(rhs.step_value + 10, &audio_gain::step_value,
-            &lhs, &rhs, audio_gains_are_equal);
-    updateFieldAndCompare(rhs.min_ramp_ms + 10, &audio_gain::min_ramp_ms,
-            &lhs, &rhs, audio_gains_are_equal);
-    updateFieldAndCompare(rhs.max_ramp_ms + 10, &audio_gain::max_ramp_ms,
-            &lhs, &rhs, audio_gains_are_equal);
-}
-
-TEST_P(SystemAudioPortTest, AudioPortConfigEquivalentTest) {
-    struct audio_port_config lhs;
-    struct audio_port_config rhs;
-    ASSERT_NO_FATAL_FAILURE(fillFakeAudioPortConfigInfo(&lhs));
-    ASSERT_NO_FATAL_FAILURE(fillFakeAudioPortConfigInfo(&rhs));
-    ASSERT_TRUE(audio_port_configs_are_equal(&lhs, &rhs));
-
-    updateFieldAndCompare(AUDIO_PORT_ROLE_NONE, &audio_port_config::role,
-            &lhs, &rhs, audio_port_configs_are_equal);
-    updateFieldAndCompare(AUDIO_PORT_TYPE_NONE, &audio_port_config::type,
-            &lhs, &rhs, audio_port_configs_are_equal);
-
-    updateConfigFieldAndCompare(rhs.sample_rate * 2, &audio_port_config::sample_rate,
-            &lhs, &rhs, AUDIO_PORT_CONFIG_SAMPLE_RATE, audio_port_configs_are_equal);
-    updateConfigFieldAndCompare(AUDIO_CHANNEL_NONE, &audio_port_config::channel_mask,
-            &lhs, &rhs, AUDIO_PORT_CONFIG_CHANNEL_MASK, audio_port_configs_are_equal);
-    updateConfigFieldAndCompare(AUDIO_FORMAT_DEFAULT, &audio_port_config::format,
-            &lhs, &rhs, AUDIO_PORT_CONFIG_FORMAT, audio_port_configs_are_equal);
-    lhs.gain.ramp_duration_ms = rhs.gain.ramp_duration_ms * 2;
-    ASSERT_FALSE(audio_port_configs_are_equal(&lhs, &rhs));
-    lhs.config_mask &= ~AUDIO_PORT_CONFIG_GAIN;
-    rhs.config_mask = lhs.config_mask;
-    ASSERT_TRUE(audio_port_configs_are_equal(&lhs, &rhs));
-
-#ifndef AUDIO_NO_SYSTEM_DECLARATIONS
-    lhs.config_mask |= AUDIO_PORT_CONFIG_FLAGS;
-    rhs.config_mask = lhs.config_mask;
-    ASSERT_TRUE(audio_port_configs_are_equal(&lhs, &rhs));
-    if (audio_port_config_has_input_direction(&lhs)) {
-        lhs.flags.input = AUDIO_INPUT_FLAG_NONE;
-    } else {
-        lhs.flags.output = AUDIO_OUTPUT_FLAG_NONE;
-    }
-    ASSERT_FALSE(audio_port_configs_are_equal(&lhs, &rhs));
-    lhs.config_mask &= ~AUDIO_PORT_CONFIG_FLAGS;
-    rhs.config_mask = lhs.config_mask;
-    ASSERT_TRUE(audio_port_configs_are_equal(&lhs, &rhs));
-#endif
-
-    testAudioPortExtBaseEquivalent(&lhs, &rhs, audio_port_configs_are_equal);
-    if (lhs.type == AUDIO_PORT_TYPE_MIX) {
-        if (lhs.role == AUDIO_PORT_ROLE_SINK) {
-            lhs.ext.mix.usecase.source = AUDIO_SOURCE_DEFAULT;
-            ASSERT_FALSE(audio_port_configs_are_equal(&lhs, &rhs));
-            lhs.ext.mix.usecase.source = rhs.ext.mix.usecase.source;
-            ASSERT_TRUE(audio_port_configs_are_equal(&lhs, &rhs));
-        } else if (lhs.role == AUDIO_PORT_ROLE_SOURCE) {
-            lhs.ext.mix.usecase.stream = AUDIO_STREAM_DEFAULT;
-            ASSERT_FALSE(audio_port_configs_are_equal(&lhs, &rhs));
-            lhs.ext.mix.usecase.stream = rhs.ext.mix.usecase.stream;
-            ASSERT_TRUE(audio_port_configs_are_equal(&lhs, &rhs));
-        }
-    }
-}
-
-TEST_P(SystemAudioPortTest, AudioPortEquivalentTest) {
-    struct audio_port lhs;
-    ASSERT_NO_FATAL_FAILURE(fillFakeAudioPortInfo(&lhs));
-    struct audio_port rhs = lhs;
-    ASSERT_TRUE(audio_ports_are_equal(&lhs, &rhs));
-
-    testAudioPortEquivalent(&lhs, &rhs, audio_ports_are_equal);
-
-    testAudioPortCapabilityArraysEquivalent(lhs.formats, lhs.num_formats,
-            AUDIO_FORMAT_DEFAULT, &lhs, &rhs, audio_ports_are_equal);
-    testAudioPortCapabilityArraysEquivalent(lhs.channel_masks, lhs.num_channel_masks,
-            AUDIO_CHANNEL_NONE, &lhs, &rhs, audio_ports_are_equal);
-    testAudioPortCapabilityArraysEquivalent(lhs.sample_rates, lhs.num_sample_rates,
-            (unsigned int) 0 /*replacedValue*/, &lhs, &rhs, audio_ports_are_equal);
-}
-
-TEST_P(SystemAudioPortTest, AudioPortV7EquivalentTest) {
-    struct audio_port_v7 lhs;
-    ASSERT_NO_FATAL_FAILURE(fillFakeAudioPortV7Info(&lhs, true /*containsExtraAudioDescriptor*/));
-    struct audio_port_v7 rhs = lhs;
-    ASSERT_TRUE(audio_ports_v7_are_equal(&lhs, &rhs));
-
-    testAudioPortEquivalent(&lhs, &rhs, audio_ports_v7_are_equal);
-
-    struct audio_profile emptyProfile = {};
-    testAudioPortCapabilityArraysEquivalent(lhs.audio_profiles, lhs.num_audio_profiles,
-            emptyProfile, &lhs, &rhs, audio_ports_v7_are_equal);
-    auto& firstProfile = lhs.audio_profiles[0];
-    testAudioPortCapabilityArraysEquivalent(firstProfile.sample_rates,
-            firstProfile.num_sample_rates, (unsigned int) 0 /*replacedValue*/,
-            &lhs, &rhs, audio_ports_v7_are_equal);
-    testAudioPortCapabilityArraysEquivalent(firstProfile.channel_masks,
-            firstProfile.num_channel_masks, AUDIO_CHANNEL_NONE,
-            &lhs, &rhs, audio_ports_v7_are_equal);
-
-    struct audio_extra_audio_descriptor emptyDesc = {};
-    testAudioPortCapabilityArraysEquivalent(lhs.extra_audio_descriptors,
-            lhs.num_extra_audio_descriptors, emptyDesc, &lhs, &rhs, audio_ports_v7_are_equal);
-}
-
-TEST_P(SystemAudioPortTest, AudioPortV7ConversionTest) {
-    struct audio_port srcPort, dstPort = {};
-    struct audio_port_v7 portV7;
-    ASSERT_NO_FATAL_FAILURE(fillFakeAudioPortInfo(&srcPort));
-    audio_populate_audio_port_v7(&srcPort, &portV7);
-    ASSERT_TRUE(audio_populate_audio_port(&portV7, &dstPort));
-    ASSERT_TRUE(audio_ports_are_equal(&srcPort, &dstPort));
-
-    struct audio_port_v7 srcPortV7, dstPortV7 = {};
-    struct audio_port audioPort;
-    ASSERT_NO_FATAL_FAILURE(
-            fillFakeAudioPortV7Info(&srcPortV7, false /*containsExtraAudioDescriptor*/));
-    ASSERT_EQ(srcPortV7.num_audio_profiles, AUDIO_PORT_MAX_AUDIO_PROFILES);
-    auto& profile = srcPortV7.audio_profiles[0];
-    ASSERT_EQ(profile.num_channel_masks, AUDIO_PORT_MAX_CHANNEL_MASKS);
-    // Set a channel mask that is not present in the list
-    profile.channel_masks[0] = AUDIO_CHANNEL_NONE;
-    ASSERT_FALSE(audio_populate_audio_port(&srcPortV7, &audioPort));
-    audio_populate_audio_port_v7(&audioPort, &dstPortV7);
-    ASSERT_EQ(dstPortV7.num_audio_profiles, AUDIO_PORT_MAX_AUDIO_PROFILES);
-    // Do not compare audio profiles' information as the audio profiles will not be the
-    // same after conversion from audio_port_v7->audio_port and audio_port->audio_port_v7
-    srcPortV7.num_audio_profiles = 0;
-    dstPortV7.num_audio_profiles = 0;
-    ASSERT_TRUE(audio_ports_v7_are_equal(&srcPortV7, &dstPortV7));
-}
-
-TEST_P(SystemAudioPortTest, AudioPortV7ContainingExtraAudioDescriptorConversionTest) {
-    struct audio_port_v7 srcPortV7, dstPortV7 = {};
-    struct audio_port audioPort;
-    ASSERT_NO_FATAL_FAILURE(
-            fillFakeAudioPortV7Info(&srcPortV7, true /*containsExtraAudioDescriptor*/));
-    ASSERT_FALSE(audio_populate_audio_port(&srcPortV7, &audioPort));
-    audio_populate_audio_port_v7(&audioPort, &dstPortV7);
-    ASSERT_FALSE(audio_ports_v7_are_equal(&srcPortV7, &dstPortV7));
-}
-
-INSTANTIATE_TEST_CASE_P(SystemAudioPortTest, SystemAudioPortTest,
-        testing::Combine(
-                testing::Values(AUDIO_PORT_ROLE_SOURCE,
-                                AUDIO_PORT_ROLE_SINK),
-                testing::Values(AUDIO_PORT_TYPE_DEVICE,
-                                AUDIO_PORT_TYPE_MIX,
-                                AUDIO_PORT_TYPE_SESSION))
-        );