Revert "Audio V4: Split system and vendor Audio.h"

This reverts commit 49c56de516b4e9556ae1b0af0ccfa7d695f5807b.

Reason for revert: Breaks the build of multiple devices

Change-Id: Iebd868467948b8afa5907462ccc0720cd9c4871e
diff --git a/audio/common/2.0/default/Android.bp b/audio/common/2.0/default/Android.bp
index 123f8b3..ac66479 100644
--- a/audio/common/2.0/default/Android.bp
+++ b/audio/common/2.0/default/Android.bp
@@ -16,7 +16,10 @@
 cc_library_shared {
     name: "android.hardware.audio.common@2.0-util",
     defaults: ["hidl_defaults"],
-    vendor: true,
+    vendor_available: true,
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "HidlUtils.cpp",
     ],
@@ -38,7 +41,7 @@
     ],
 
     header_libs: [
-        "android.hardware.audio.common.legacy@2.0",
+        "libaudio_system_headers",
         "libhardware_headers",
     ],
 }
diff --git a/audio/common/2.0/legacy/Android.bp b/audio/common/2.0/legacy/Android.bp
deleted file mode 100644
index 2888c96..0000000
--- a/audio/common/2.0/legacy/Android.bp
+++ /dev/null
@@ -1,15 +0,0 @@
-cc_library_headers {
-    name: "android.hardware.audio.common.legacy@2.0",
-    vendor: true,
-    header_libs: [
-        "libhardware_headers",
-        "android.hardware.audio.common.legacy@all-versions",
-    ],
-    export_header_lib_headers: [
-        "libhardware_headers",
-        "android.hardware.audio.common.legacy@all-versions",
-    ],
-
-    export_include_dirs: ["include"],
-}
-
diff --git a/audio/common/2.0/legacy/OWNERS b/audio/common/2.0/legacy/OWNERS
deleted file mode 100644
index 6fdc97c..0000000
--- a/audio/common/2.0/legacy/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-elaurent@google.com
-krocard@google.com
-mnaganov@google.com
diff --git a/audio/common/2.0/legacy/include/hardware/audio.h b/audio/common/2.0/legacy/include/hardware/audio.h
deleted file mode 100644
index 1ad3e0e..0000000
--- a/audio/common/2.0/legacy/include/hardware/audio.h
+++ /dev/null
@@ -1,709 +0,0 @@
-/*
- * Copyright (C) 2011 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_HAL_INTERFACE_H
-#define ANDROID_AUDIO_HAL_INTERFACE_H
-
-#include <stdint.h>
-#include <strings.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-#include <time.h>
-
-#include <cutils/bitops.h>
-
-#include <hardware/audio_effect.h>
-#include <hardware/hardware.h>
-#include <system/audio.h>
-
-__BEGIN_DECLS
-
-/**
- * The id of this module
- */
-#define AUDIO_HARDWARE_MODULE_ID "audio"
-
-/**
- * Name of the audio devices to open
- */
-#define AUDIO_HARDWARE_INTERFACE "audio_hw_if"
-
-/* Use version 0.1 to be compatible with first generation of audio hw module with version_major
- * hardcoded to 1. No audio module API change.
- */
-#define AUDIO_MODULE_API_VERSION_0_1 HARDWARE_MODULE_API_VERSION(0, 1)
-#define AUDIO_MODULE_API_VERSION_CURRENT AUDIO_MODULE_API_VERSION_0_1
-
-/* First generation of audio devices had version hardcoded to 0. all devices with versions < 1.0
- * will be considered of first generation API.
- */
-#define AUDIO_DEVICE_API_VERSION_0_0 HARDWARE_DEVICE_API_VERSION(0, 0)
-#define AUDIO_DEVICE_API_VERSION_1_0 HARDWARE_DEVICE_API_VERSION(1, 0)
-#define AUDIO_DEVICE_API_VERSION_2_0 HARDWARE_DEVICE_API_VERSION(2, 0)
-#define AUDIO_DEVICE_API_VERSION_3_0 HARDWARE_DEVICE_API_VERSION(3, 0)
-#define AUDIO_DEVICE_API_VERSION_CURRENT AUDIO_DEVICE_API_VERSION_3_0
-/* Minimal audio HAL version supported by the audio framework */
-#define AUDIO_DEVICE_API_VERSION_MIN AUDIO_DEVICE_API_VERSION_2_0
-
-/**************************************/
-
-/**
- *  standard audio parameters that the HAL may need to handle
- */
-
-/**
- *  audio device parameters
- */
-
-/* TTY mode selection */
-#define AUDIO_PARAMETER_KEY_TTY_MODE "tty_mode"
-#define AUDIO_PARAMETER_VALUE_TTY_OFF "tty_off"
-#define AUDIO_PARAMETER_VALUE_TTY_VCO "tty_vco"
-#define AUDIO_PARAMETER_VALUE_TTY_HCO "tty_hco"
-#define AUDIO_PARAMETER_VALUE_TTY_FULL "tty_full"
-
-/* Hearing Aid Compatibility - Telecoil (HAC-T) mode on/off */
-#define AUDIO_PARAMETER_KEY_HAC "HACSetting"
-#define AUDIO_PARAMETER_VALUE_HAC_ON "ON"
-#define AUDIO_PARAMETER_VALUE_HAC_OFF "OFF"
-
-/* A2DP sink address set by framework */
-#define AUDIO_PARAMETER_A2DP_SINK_ADDRESS "a2dp_sink_address"
-
-/* A2DP source address set by framework */
-#define AUDIO_PARAMETER_A2DP_SOURCE_ADDRESS "a2dp_source_address"
-
-/* Bluetooth SCO wideband */
-#define AUDIO_PARAMETER_KEY_BT_SCO_WB "bt_wbs"
-
-/**
- *  audio stream parameters
- */
-
-/* Enable AANC */
-#define AUDIO_PARAMETER_KEY_AANC "aanc_enabled"
-
-/**************************************/
-
-/* common audio stream parameters and operations */
-struct audio_stream {
-    /**
-     * Return the sampling rate in Hz - eg. 44100.
-     */
-    uint32_t (*get_sample_rate)(const struct audio_stream* stream);
-
-    /* currently unused - use set_parameters with key
-     *    AUDIO_PARAMETER_STREAM_SAMPLING_RATE
-     */
-    int (*set_sample_rate)(struct audio_stream* stream, uint32_t rate);
-
-    /**
-     * Return size of input/output buffer in bytes for this stream - eg. 4800.
-     * It should be a multiple of the frame size.  See also get_input_buffer_size.
-     */
-    size_t (*get_buffer_size)(const struct audio_stream* stream);
-
-    /**
-     * Return the channel mask -
-     *  e.g. AUDIO_CHANNEL_OUT_STEREO or AUDIO_CHANNEL_IN_STEREO
-     */
-    audio_channel_mask_t (*get_channels)(const struct audio_stream* stream);
-
-    /**
-     * Return the audio format - e.g. AUDIO_FORMAT_PCM_16_BIT
-     */
-    audio_format_t (*get_format)(const struct audio_stream* stream);
-
-    /* currently unused - use set_parameters with key
-     *     AUDIO_PARAMETER_STREAM_FORMAT
-     */
-    int (*set_format)(struct audio_stream* stream, audio_format_t format);
-
-    /**
-     * Put the audio hardware input/output into standby mode.
-     * Driver should exit from standby mode at the next I/O operation.
-     * Returns 0 on success and <0 on failure.
-     */
-    int (*standby)(struct audio_stream* stream);
-
-    /** dump the state of the audio input/output device */
-    int (*dump)(const struct audio_stream* stream, int fd);
-
-    /** Return the set of device(s) which this stream is connected to */
-    audio_devices_t (*get_device)(const struct audio_stream* stream);
-
-    /**
-     * Currently unused - set_device() corresponds to set_parameters() with key
-     * AUDIO_PARAMETER_STREAM_ROUTING for both input and output.
-     * AUDIO_PARAMETER_STREAM_INPUT_SOURCE is an additional information used by
-     * input streams only.
-     */
-    int (*set_device)(struct audio_stream* stream, audio_devices_t device);
-
-    /**
-     * set/get audio stream parameters. The function accepts a list of
-     * parameter key value pairs in the form: key1=value1;key2=value2;...
-     *
-     * Some keys are reserved for standard parameters (See AudioParameter class)
-     *
-     * If the implementation does not accept a parameter change while
-     * the output is active but the parameter is acceptable otherwise, it must
-     * return -ENOSYS.
-     *
-     * The audio flinger will put the stream in standby and then change the
-     * parameter value.
-     */
-    int (*set_parameters)(struct audio_stream* stream, const char* kv_pairs);
-
-    /*
-     * Returns a pointer to a heap allocated string. The caller is responsible
-     * for freeing the memory for it using free().
-     */
-    char* (*get_parameters)(const struct audio_stream* stream, const char* keys);
-    int (*add_audio_effect)(const struct audio_stream* stream, effect_handle_t effect);
-    int (*remove_audio_effect)(const struct audio_stream* stream, effect_handle_t effect);
-};
-typedef struct audio_stream audio_stream_t;
-
-/* type of asynchronous write callback events. Mutually exclusive */
-typedef enum {
-    STREAM_CBK_EVENT_WRITE_READY, /* non blocking write completed */
-    STREAM_CBK_EVENT_DRAIN_READY, /* drain completed */
-    STREAM_CBK_EVENT_ERROR,       /* stream hit some error, let AF take action */
-} stream_callback_event_t;
-
-typedef int (*stream_callback_t)(stream_callback_event_t event, void* param, void* cookie);
-
-/* type of drain requested to audio_stream_out->drain(). Mutually exclusive */
-typedef enum {
-    AUDIO_DRAIN_ALL,         /* drain() returns when all data has been played */
-    AUDIO_DRAIN_EARLY_NOTIFY /* drain() returns a short time before all data
-                                from the current track has been played to
-                                give time for gapless track switch */
-} audio_drain_type_t;
-
-/**
- * audio_stream_out is the abstraction interface for the audio output hardware.
- *
- * It provides information about various properties of the audio output
- * hardware driver.
- */
-
-struct audio_stream_out {
-    /**
-     * Common methods of the audio stream out.  This *must* be the first member of audio_stream_out
-     * as users of this structure will cast a audio_stream to audio_stream_out pointer in contexts
-     * where it's known the audio_stream references an audio_stream_out.
-     */
-    struct audio_stream common;
-
-    /**
-     * Return the audio hardware driver estimated latency in milliseconds.
-     */
-    uint32_t (*get_latency)(const struct audio_stream_out* stream);
-
-    /**
-     * Use this method in situations where audio mixing is done in the
-     * hardware. This method serves as a direct interface with hardware,
-     * allowing you to directly set the volume as apposed to via the framework.
-     * This method might produce multiple PCM outputs or hardware accelerated
-     * codecs, such as MP3 or AAC.
-     */
-    int (*set_volume)(struct audio_stream_out* stream, float left, float right);
-
-    /**
-     * Write audio buffer to driver. Returns number of bytes written, or a
-     * negative status_t. If at least one frame was written successfully prior to the error,
-     * it is suggested that the driver return that successful (short) byte count
-     * and then return an error in the subsequent call.
-     *
-     * If set_callback() has previously been called to enable non-blocking mode
-     * the write() is not allowed to block. It must write only the number of
-     * bytes that currently fit in the driver/hardware buffer and then return
-     * this byte count. If this is less than the requested write size the
-     * callback function must be called when more space is available in the
-     * driver/hardware buffer.
-     */
-    ssize_t (*write)(struct audio_stream_out* stream, const void* buffer, size_t bytes);
-
-    /* return the number of audio frames written by the audio dsp to DAC since
-     * the output has exited standby
-     */
-    int (*get_render_position)(const struct audio_stream_out* stream, uint32_t* dsp_frames);
-
-    /**
-     * get the local time at which the next write to the audio driver will be presented.
-     * The units are microseconds, where the epoch is decided by the local audio HAL.
-     */
-    int (*get_next_write_timestamp)(const struct audio_stream_out* stream, int64_t* timestamp);
-
-    /**
-     * set the callback function for notifying completion of non-blocking
-     * write and drain.
-     * Calling this function implies that all future write() and drain()
-     * must be non-blocking and use the callback to signal completion.
-     */
-    int (*set_callback)(struct audio_stream_out* stream, stream_callback_t callback, void* cookie);
-
-    /**
-     * Notifies to the audio driver to stop playback however the queued buffers are
-     * retained by the hardware. Useful for implementing pause/resume. Empty implementation
-     * if not supported however should be implemented for hardware with non-trivial
-     * latency. In the pause state audio hardware could still be using power. User may
-     * consider calling suspend after a timeout.
-     *
-     * Implementation of this function is mandatory for offloaded playback.
-     */
-    int (*pause)(struct audio_stream_out* stream);
-
-    /**
-     * Notifies to the audio driver to resume playback following a pause.
-     * Returns error if called without matching pause.
-     *
-     * Implementation of this function is mandatory for offloaded playback.
-     */
-    int (*resume)(struct audio_stream_out* stream);
-
-    /**
-     * Requests notification when data buffered by the driver/hardware has
-     * been played. If set_callback() has previously been called to enable
-     * non-blocking mode, the drain() must not block, instead it should return
-     * quickly and completion of the drain is notified through the callback.
-     * If set_callback() has not been called, the drain() must block until
-     * completion.
-     * If type==AUDIO_DRAIN_ALL, the drain completes when all previously written
-     * data has been played.
-     * If type==AUDIO_DRAIN_EARLY_NOTIFY, the drain completes shortly before all
-     * data for the current track has played to allow time for the framework
-     * to perform a gapless track switch.
-     *
-     * Drain must return immediately on stop() and flush() call
-     *
-     * Implementation of this function is mandatory for offloaded playback.
-     */
-    int (*drain)(struct audio_stream_out* stream, audio_drain_type_t type);
-
-    /**
-     * Notifies to the audio driver to flush the queued data. Stream must already
-     * be paused before calling flush().
-     *
-     * Implementation of this function is mandatory for offloaded playback.
-     */
-    int (*flush)(struct audio_stream_out* stream);
-
-    /**
-     * Return a recent count of the number of audio frames presented to an external observer.
-     * This excludes frames which have been written but are still in the pipeline.
-     * The count is not reset to zero when output enters standby.
-     * Also returns the value of CLOCK_MONOTONIC as of this presentation count.
-     * The returned count is expected to be 'recent',
-     * but does not need to be the most recent possible value.
-     * However, the associated time should correspond to whatever count is returned.
-     * Example:  assume that N+M frames have been presented, where M is a 'small' number.
-     * Then it is permissible to return N instead of N+M,
-     * and the timestamp should correspond to N rather than N+M.
-     * The terms 'recent' and 'small' are not defined.
-     * They reflect the quality of the implementation.
-     *
-     * 3.0 and higher only.
-     */
-    int (*get_presentation_position)(const struct audio_stream_out* stream, uint64_t* frames,
-                                     struct timespec* timestamp);
-
-    /**
-     * Called by the framework to start a stream operating in mmap mode.
-     * create_mmap_buffer must be called before calling start()
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \return 0 in case of success.
-     *         -ENOSYS if called out of sequence or on non mmap stream
-     */
-    int (*start)(const struct audio_stream_out* stream);
-
-    /**
-     * Called by the framework to stop a stream operating in mmap mode.
-     * Must be called after start()
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \return 0 in case of success.
-     *         -ENOSYS if called out of sequence or on non mmap stream
-     */
-    int (*stop)(const struct audio_stream_out* stream);
-
-    /**
-     * Called by the framework to retrieve information on the mmap buffer used for audio
-     * samples transfer.
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \param[in] min_size_frames minimum buffer size requested. The actual buffer
-     *        size returned in struct audio_mmap_buffer_info can be larger.
-     * \param[out] info address at which the mmap buffer information should be returned.
-     *
-     * \return 0 if the buffer was allocated.
-     *         -ENODEV in case of initialization error
-     *         -EINVAL if the requested buffer size is too large
-     *         -ENOSYS if called out of sequence (e.g. buffer already allocated)
-     */
-    int (*create_mmap_buffer)(const struct audio_stream_out* stream, int32_t min_size_frames,
-                              struct audio_mmap_buffer_info* info);
-
-    /**
-     * Called by the framework to read current read/write position in the mmap buffer
-     * with associated time stamp.
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \param[out] position address at which the mmap read/write position should be returned.
-     *
-     * \return 0 if the position is successfully returned.
-     *         -ENODATA if the position cannot be retrieved
-     *         -ENOSYS if called before create_mmap_buffer()
-     */
-    int (*get_mmap_position)(const struct audio_stream_out* stream,
-                             struct audio_mmap_position* position);
-};
-typedef struct audio_stream_out audio_stream_out_t;
-
-struct audio_stream_in {
-    /**
-     * Common methods of the audio stream in.  This *must* be the first member of audio_stream_in
-     * as users of this structure will cast a audio_stream to audio_stream_in pointer in contexts
-     * where it's known the audio_stream references an audio_stream_in.
-     */
-    struct audio_stream common;
-
-    /** set the input gain for the audio driver. This method is for
-     *  for future use */
-    int (*set_gain)(struct audio_stream_in* stream, float gain);
-
-    /** Read audio buffer in from audio driver. Returns number of bytes read, or a
-     *  negative status_t. If at least one frame was read prior to the error,
-     *  read should return that byte count and then return an error in the subsequent call.
-     */
-    ssize_t (*read)(struct audio_stream_in* stream, void* buffer, size_t bytes);
-
-    /**
-     * Return the amount of input frames lost in the audio driver since the
-     * last call of this function.
-     * Audio driver is expected to reset the value to 0 and restart counting
-     * upon returning the current value by this function call.
-     * Such loss typically occurs when the user space process is blocked
-     * longer than the capacity of audio driver buffers.
-     *
-     * Unit: the number of input audio frames
-     */
-    uint32_t (*get_input_frames_lost)(struct audio_stream_in* stream);
-
-    /**
-     * Return a recent count of the number of audio frames received and
-     * the clock time associated with that frame count.
-     *
-     * frames is the total frame count received. This should be as early in
-     *     the capture pipeline as possible. In general,
-     *     frames should be non-negative and should not go "backwards".
-     *
-     * time is the clock MONOTONIC time when frames was measured. In general,
-     *     time should be a positive quantity and should not go "backwards".
-     *
-     * The status returned is 0 on success, -ENOSYS if the device is not
-     * ready/available, or -EINVAL if the arguments are null or otherwise invalid.
-     */
-    int (*get_capture_position)(const struct audio_stream_in* stream, int64_t* frames,
-                                int64_t* time);
-
-    /**
-     * Called by the framework to start a stream operating in mmap mode.
-     * create_mmap_buffer must be called before calling start()
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \return 0 in case off success.
-     *         -ENOSYS if called out of sequence or on non mmap stream
-     */
-    int (*start)(const struct audio_stream_in* stream);
-
-    /**
-     * Called by the framework to stop a stream operating in mmap mode.
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \return 0 in case of success.
-     *         -ENOSYS if called out of sequence or on non mmap stream
-     */
-    int (*stop)(const struct audio_stream_in* stream);
-
-    /**
-     * Called by the framework to retrieve information on the mmap buffer used for audio
-     * samples transfer.
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \param[in] min_size_frames minimum buffer size requested. The actual buffer
-     *        size returned in struct audio_mmap_buffer_info can be larger.
-     * \param[out] info address at which the mmap buffer information should be returned.
-     *
-     * \return 0 if the buffer was allocated.
-     *         -ENODEV in case of initialization error
-     *         -EINVAL if the requested buffer size is too large
-     *         -ENOSYS if called out of sequence (e.g. buffer already allocated)
-     */
-    int (*create_mmap_buffer)(const struct audio_stream_in* stream, int32_t min_size_frames,
-                              struct audio_mmap_buffer_info* info);
-
-    /**
-     * Called by the framework to read current read/write position in the mmap buffer
-     * with associated time stamp.
-     *
-     * \note Function only implemented by streams operating in mmap mode.
-     *
-     * \param[in] stream the stream object.
-     * \param[out] position address at which the mmap read/write position should be returned.
-     *
-     * \return 0 if the position is successfully returned.
-     *         -ENODATA if the position cannot be retreived
-     *         -ENOSYS if called before mmap_read_position()
-     */
-    int (*get_mmap_position)(const struct audio_stream_in* stream,
-                             struct audio_mmap_position* position);
-};
-typedef struct audio_stream_in audio_stream_in_t;
-
-/**
- * return the frame size (number of bytes per sample).
- *
- * Deprecated: use audio_stream_out_frame_size() or audio_stream_in_frame_size() instead.
- */
-__attribute__((__deprecated__)) static inline size_t audio_stream_frame_size(
-    const struct audio_stream* s) {
-    size_t chan_samp_sz;
-    audio_format_t format = s->get_format(s);
-
-    if (audio_has_proportional_frames(format)) {
-        chan_samp_sz = audio_bytes_per_sample(format);
-        return popcount(s->get_channels(s)) * chan_samp_sz;
-    }
-
-    return sizeof(int8_t);
-}
-
-/**
- * return the frame size (number of bytes per sample) of an output stream.
- */
-static inline size_t audio_stream_out_frame_size(const struct audio_stream_out* s) {
-    size_t chan_samp_sz;
-    audio_format_t format = s->common.get_format(&s->common);
-
-    if (audio_has_proportional_frames(format)) {
-        chan_samp_sz = audio_bytes_per_sample(format);
-        return audio_channel_count_from_out_mask(s->common.get_channels(&s->common)) * chan_samp_sz;
-    }
-
-    return sizeof(int8_t);
-}
-
-/**
- * return the frame size (number of bytes per sample) of an input stream.
- */
-static inline size_t audio_stream_in_frame_size(const struct audio_stream_in* s) {
-    size_t chan_samp_sz;
-    audio_format_t format = s->common.get_format(&s->common);
-
-    if (audio_has_proportional_frames(format)) {
-        chan_samp_sz = audio_bytes_per_sample(format);
-        return audio_channel_count_from_in_mask(s->common.get_channels(&s->common)) * chan_samp_sz;
-    }
-
-    return sizeof(int8_t);
-}
-
-/**********************************************************************/
-
-/**
- * Every hardware module must have a data structure named HAL_MODULE_INFO_SYM
- * and the fields of this data structure must begin with hw_module_t
- * followed by module specific information.
- */
-struct audio_module {
-    struct hw_module_t common;
-};
-
-struct audio_hw_device {
-    /**
-     * Common methods of the audio device.  This *must* be the first member of audio_hw_device
-     * as users of this structure will cast a hw_device_t to audio_hw_device pointer in contexts
-     * where it's known the hw_device_t references an audio_hw_device.
-     */
-    struct hw_device_t common;
-
-    /**
-     * used by audio flinger to enumerate what devices are supported by
-     * each audio_hw_device implementation.
-     *
-     * Return value is a bitmask of 1 or more values of audio_devices_t
-     *
-     * NOTE: audio HAL implementations starting with
-     * AUDIO_DEVICE_API_VERSION_2_0 do not implement this function.
-     * All supported devices should be listed in audio_policy.conf
-     * file and the audio policy manager must choose the appropriate
-     * audio module based on information in this file.
-     */
-    uint32_t (*get_supported_devices)(const struct audio_hw_device* dev);
-
-    /**
-     * check to see if the audio hardware interface has been initialized.
-     * returns 0 on success, -ENODEV on failure.
-     */
-    int (*init_check)(const struct audio_hw_device* dev);
-
-    /** set the audio volume of a voice call. Range is between 0.0 and 1.0 */
-    int (*set_voice_volume)(struct audio_hw_device* dev, float volume);
-
-    /**
-     * set the audio volume for all audio activities other than voice call.
-     * Range between 0.0 and 1.0. If any value other than 0 is returned,
-     * the software mixer will emulate this capability.
-     */
-    int (*set_master_volume)(struct audio_hw_device* dev, float volume);
-
-    /**
-     * Get the current master volume value for the HAL, if the HAL supports
-     * master volume control.  AudioFlinger will query this value from the
-     * primary audio HAL when the service starts and use the value for setting
-     * the initial master volume across all HALs.  HALs which do not support
-     * this method may leave it set to NULL.
-     */
-    int (*get_master_volume)(struct audio_hw_device* dev, float* volume);
-
-    /**
-     * set_mode is called when the audio mode changes. AUDIO_MODE_NORMAL mode
-     * is for standard audio playback, AUDIO_MODE_RINGTONE when a ringtone is
-     * playing, and AUDIO_MODE_IN_CALL when a call is in progress.
-     */
-    int (*set_mode)(struct audio_hw_device* dev, audio_mode_t mode);
-
-    /* mic mute */
-    int (*set_mic_mute)(struct audio_hw_device* dev, bool state);
-    int (*get_mic_mute)(const struct audio_hw_device* dev, bool* state);
-
-    /* set/get global audio parameters */
-    int (*set_parameters)(struct audio_hw_device* dev, const char* kv_pairs);
-
-    /*
-     * Returns a pointer to a heap allocated string. The caller is responsible
-     * for freeing the memory for it using free().
-     */
-    char* (*get_parameters)(const struct audio_hw_device* dev, const char* keys);
-
-    /* Returns audio input buffer size according to parameters passed or
-     * 0 if one of the parameters is not supported.
-     * See also get_buffer_size which is for a particular stream.
-     */
-    size_t (*get_input_buffer_size)(const struct audio_hw_device* dev,
-                                    const struct audio_config* config);
-
-    /** This method creates and opens the audio hardware output stream.
-     * The "address" parameter qualifies the "devices" audio device type if needed.
-     * The format format depends on the device type:
-     * - Bluetooth devices use the MAC address of the device in the form "00:11:22:AA:BB:CC"
-     * - USB devices use the ALSA card and device numbers in the form  "card=X;device=Y"
-     * - Other devices may use a number or any other string.
-     */
-
-    int (*open_output_stream)(struct audio_hw_device* dev, audio_io_handle_t handle,
-                              audio_devices_t devices, audio_output_flags_t flags,
-                              struct audio_config* config, struct audio_stream_out** stream_out,
-                              const char* address);
-
-    void (*close_output_stream)(struct audio_hw_device* dev, struct audio_stream_out* stream_out);
-
-    /** This method creates and opens the audio hardware input stream */
-    int (*open_input_stream)(struct audio_hw_device* dev, audio_io_handle_t handle,
-                             audio_devices_t devices, struct audio_config* config,
-                             struct audio_stream_in** stream_in, audio_input_flags_t flags,
-                             const char* address, audio_source_t source);
-
-    void (*close_input_stream)(struct audio_hw_device* dev, struct audio_stream_in* stream_in);
-
-    /** This method dumps the state of the audio hardware */
-    int (*dump)(const struct audio_hw_device* dev, int fd);
-
-    /**
-     * set the audio mute status for all audio activities.  If any value other
-     * than 0 is returned, the software mixer will emulate this capability.
-     */
-    int (*set_master_mute)(struct audio_hw_device* dev, bool mute);
-
-    /**
-     * Get the current master mute status for the HAL, if the HAL supports
-     * master mute control.  AudioFlinger will query this value from the primary
-     * audio HAL when the service starts and use the value for setting the
-     * initial master mute across all HALs.  HALs which do not support this
-     * method may leave it set to NULL.
-     */
-    int (*get_master_mute)(struct audio_hw_device* dev, bool* mute);
-
-    /**
-     * Routing control
-     */
-
-    /* Creates an audio patch between several source and sink ports.
-     * The handle is allocated by the HAL and should be unique for this
-     * audio HAL module. */
-    int (*create_audio_patch)(struct audio_hw_device* dev, unsigned int num_sources,
-                              const struct audio_port_config* sources, unsigned int num_sinks,
-                              const struct audio_port_config* sinks, audio_patch_handle_t* handle);
-
-    /* Release an audio patch */
-    int (*release_audio_patch)(struct audio_hw_device* dev, audio_patch_handle_t handle);
-
-    /* Fills the list of supported attributes for a given audio port.
-     * As input, "port" contains the information (type, role, address etc...)
-     * needed by the HAL to identify the port.
-     * As output, "port" contains possible attributes (sampling rates, formats,
-     * channel masks, gain controllers...) for this port.
-     */
-    int (*get_audio_port)(struct audio_hw_device* dev, struct audio_port* port);
-
-    /* Set audio port configuration */
-    int (*set_audio_port_config)(struct audio_hw_device* dev,
-                                 const struct audio_port_config* config);
-};
-typedef struct audio_hw_device audio_hw_device_t;
-
-/** convenience API for opening and closing a supported device */
-
-static inline int audio_hw_device_open(const struct hw_module_t* module,
-                                       struct audio_hw_device** device) {
-    return module->methods->open(module, AUDIO_HARDWARE_INTERFACE, TO_HW_DEVICE_T_OPEN(device));
-}
-
-static inline int audio_hw_device_close(struct audio_hw_device* device) {
-    return device->common.close(&device->common);
-}
-
-__END_DECLS
-
-#endif  // ANDROID_AUDIO_INTERFACE_H
diff --git a/audio/common/2.0/legacy/include/system/audio-base.h b/audio/common/2.0/legacy/include/system/audio-base.h
deleted file mode 100644
index 53e524b..0000000
--- a/audio/common/2.0/legacy/include/system/audio-base.h
+++ /dev/null
@@ -1,434 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.audio.common@2.0
-// Root: android.hardware:hardware/interfaces
-
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V2_0_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V2_0_EXPORTED_CONSTANTS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-enum {
-    AUDIO_IO_HANDLE_NONE = 0,
-    AUDIO_MODULE_HANDLE_NONE = 0,
-    AUDIO_PORT_HANDLE_NONE = 0,
-    AUDIO_PATCH_HANDLE_NONE = 0,
-};
-
-typedef enum {
-    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_REROUTING = 11,
-    AUDIO_STREAM_PATCH = 12,
-    AUDIO_STREAM_PUBLIC_CNT = 11,      // (ACCESSIBILITY + 1)
-    AUDIO_STREAM_FOR_POLICY_CNT = 12,  // PATCH
-    AUDIO_STREAM_CNT = 13,             // (PATCH + 1)
-} audio_stream_type_t;
-
-typedef enum {
-    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_CNT = 10,
-    AUDIO_SOURCE_MAX = 9,  // (CNT - 1)
-    AUDIO_SOURCE_FM_TUNER = 1998,
-    AUDIO_SOURCE_HOTWORD = 1999,
-} audio_source_t;
-
-typedef enum {
-    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 = 4294967295u,           // 0xFFFFFFFFUL
-    AUDIO_FORMAT_DEFAULT = 0u,                    // 0
-    AUDIO_FORMAT_PCM = 0u,                        // 0x00000000UL
-    AUDIO_FORMAT_MP3 = 16777216u,                 // 0x01000000UL
-    AUDIO_FORMAT_AMR_NB = 33554432u,              // 0x02000000UL
-    AUDIO_FORMAT_AMR_WB = 50331648u,              // 0x03000000UL
-    AUDIO_FORMAT_AAC = 67108864u,                 // 0x04000000UL
-    AUDIO_FORMAT_HE_AAC_V1 = 83886080u,           // 0x05000000UL
-    AUDIO_FORMAT_HE_AAC_V2 = 100663296u,          // 0x06000000UL
-    AUDIO_FORMAT_VORBIS = 117440512u,             // 0x07000000UL
-    AUDIO_FORMAT_OPUS = 134217728u,               // 0x08000000UL
-    AUDIO_FORMAT_AC3 = 150994944u,                // 0x09000000UL
-    AUDIO_FORMAT_E_AC3 = 167772160u,              // 0x0A000000UL
-    AUDIO_FORMAT_DTS = 184549376u,                // 0x0B000000UL
-    AUDIO_FORMAT_DTS_HD = 201326592u,             // 0x0C000000UL
-    AUDIO_FORMAT_IEC61937 = 218103808u,           // 0x0D000000UL
-    AUDIO_FORMAT_DOLBY_TRUEHD = 234881024u,       // 0x0E000000UL
-    AUDIO_FORMAT_EVRC = 268435456u,               // 0x10000000UL
-    AUDIO_FORMAT_EVRCB = 285212672u,              // 0x11000000UL
-    AUDIO_FORMAT_EVRCWB = 301989888u,             // 0x12000000UL
-    AUDIO_FORMAT_EVRCNW = 318767104u,             // 0x13000000UL
-    AUDIO_FORMAT_AAC_ADIF = 335544320u,           // 0x14000000UL
-    AUDIO_FORMAT_WMA = 352321536u,                // 0x15000000UL
-    AUDIO_FORMAT_WMA_PRO = 369098752u,            // 0x16000000UL
-    AUDIO_FORMAT_AMR_WB_PLUS = 385875968u,        // 0x17000000UL
-    AUDIO_FORMAT_MP2 = 402653184u,                // 0x18000000UL
-    AUDIO_FORMAT_QCELP = 419430400u,              // 0x19000000UL
-    AUDIO_FORMAT_DSD = 436207616u,                // 0x1A000000UL
-    AUDIO_FORMAT_FLAC = 452984832u,               // 0x1B000000UL
-    AUDIO_FORMAT_ALAC = 469762048u,               // 0x1C000000UL
-    AUDIO_FORMAT_APE = 486539264u,                // 0x1D000000UL
-    AUDIO_FORMAT_AAC_ADTS = 503316480u,           // 0x1E000000UL
-    AUDIO_FORMAT_SBC = 520093696u,                // 0x1F000000UL
-    AUDIO_FORMAT_APTX = 536870912u,               // 0x20000000UL
-    AUDIO_FORMAT_APTX_HD = 553648128u,            // 0x21000000UL
-    AUDIO_FORMAT_AC4 = 570425344u,                // 0x22000000UL
-    AUDIO_FORMAT_LDAC = 587202560u,               // 0x23000000UL
-    AUDIO_FORMAT_MAIN_MASK = 4278190080u,         // 0xFF000000UL
-    AUDIO_FORMAT_SUB_MASK = 16777215u,            // 0x00FFFFFFUL
-    AUDIO_FORMAT_PCM_SUB_16_BIT = 1u,             // 0x1
-    AUDIO_FORMAT_PCM_SUB_8_BIT = 2u,              // 0x2
-    AUDIO_FORMAT_PCM_SUB_32_BIT = 3u,             // 0x3
-    AUDIO_FORMAT_PCM_SUB_8_24_BIT = 4u,           // 0x4
-    AUDIO_FORMAT_PCM_SUB_FLOAT = 5u,              // 0x5
-    AUDIO_FORMAT_PCM_SUB_24_BIT_PACKED = 6u,      // 0x6
-    AUDIO_FORMAT_MP3_SUB_NONE = 0u,               // 0x0
-    AUDIO_FORMAT_AMR_SUB_NONE = 0u,               // 0x0
-    AUDIO_FORMAT_AAC_SUB_MAIN = 1u,               // 0x1
-    AUDIO_FORMAT_AAC_SUB_LC = 2u,                 // 0x2
-    AUDIO_FORMAT_AAC_SUB_SSR = 4u,                // 0x4
-    AUDIO_FORMAT_AAC_SUB_LTP = 8u,                // 0x8
-    AUDIO_FORMAT_AAC_SUB_HE_V1 = 16u,             // 0x10
-    AUDIO_FORMAT_AAC_SUB_SCALABLE = 32u,          // 0x20
-    AUDIO_FORMAT_AAC_SUB_ERLC = 64u,              // 0x40
-    AUDIO_FORMAT_AAC_SUB_LD = 128u,               // 0x80
-    AUDIO_FORMAT_AAC_SUB_HE_V2 = 256u,            // 0x100
-    AUDIO_FORMAT_AAC_SUB_ELD = 512u,              // 0x200
-    AUDIO_FORMAT_VORBIS_SUB_NONE = 0u,            // 0x0
-    AUDIO_FORMAT_PCM_16_BIT = 1u,                 // (PCM | PCM_SUB_16_BIT)
-    AUDIO_FORMAT_PCM_8_BIT = 2u,                  // (PCM | PCM_SUB_8_BIT)
-    AUDIO_FORMAT_PCM_32_BIT = 3u,                 // (PCM | PCM_SUB_32_BIT)
-    AUDIO_FORMAT_PCM_8_24_BIT = 4u,               // (PCM | PCM_SUB_8_24_BIT)
-    AUDIO_FORMAT_PCM_FLOAT = 5u,                  // (PCM | PCM_SUB_FLOAT)
-    AUDIO_FORMAT_PCM_24_BIT_PACKED = 6u,          // (PCM | PCM_SUB_24_BIT_PACKED)
-    AUDIO_FORMAT_AAC_MAIN = 67108865u,            // (AAC | AAC_SUB_MAIN)
-    AUDIO_FORMAT_AAC_LC = 67108866u,              // (AAC | AAC_SUB_LC)
-    AUDIO_FORMAT_AAC_SSR = 67108868u,             // (AAC | AAC_SUB_SSR)
-    AUDIO_FORMAT_AAC_LTP = 67108872u,             // (AAC | AAC_SUB_LTP)
-    AUDIO_FORMAT_AAC_HE_V1 = 67108880u,           // (AAC | AAC_SUB_HE_V1)
-    AUDIO_FORMAT_AAC_SCALABLE = 67108896u,        // (AAC | AAC_SUB_SCALABLE)
-    AUDIO_FORMAT_AAC_ERLC = 67108928u,            // (AAC | AAC_SUB_ERLC)
-    AUDIO_FORMAT_AAC_LD = 67108992u,              // (AAC | AAC_SUB_LD)
-    AUDIO_FORMAT_AAC_HE_V2 = 67109120u,           // (AAC | AAC_SUB_HE_V2)
-    AUDIO_FORMAT_AAC_ELD = 67109376u,             // (AAC | AAC_SUB_ELD)
-    AUDIO_FORMAT_AAC_ADTS_MAIN = 503316481u,      // (AAC_ADTS | AAC_SUB_MAIN)
-    AUDIO_FORMAT_AAC_ADTS_LC = 503316482u,        // (AAC_ADTS | AAC_SUB_LC)
-    AUDIO_FORMAT_AAC_ADTS_SSR = 503316484u,       // (AAC_ADTS | AAC_SUB_SSR)
-    AUDIO_FORMAT_AAC_ADTS_LTP = 503316488u,       // (AAC_ADTS | AAC_SUB_LTP)
-    AUDIO_FORMAT_AAC_ADTS_HE_V1 = 503316496u,     // (AAC_ADTS | AAC_SUB_HE_V1)
-    AUDIO_FORMAT_AAC_ADTS_SCALABLE = 503316512u,  // (AAC_ADTS | AAC_SUB_SCALABLE)
-    AUDIO_FORMAT_AAC_ADTS_ERLC = 503316544u,      // (AAC_ADTS | AAC_SUB_ERLC)
-    AUDIO_FORMAT_AAC_ADTS_LD = 503316608u,        // (AAC_ADTS | AAC_SUB_LD)
-    AUDIO_FORMAT_AAC_ADTS_HE_V2 = 503316736u,     // (AAC_ADTS | AAC_SUB_HE_V2)
-    AUDIO_FORMAT_AAC_ADTS_ELD = 503316992u,       // (AAC_ADTS | AAC_SUB_ELD)
-} audio_format_t;
-
-enum {
-    FCC_2 = 2,
-    FCC_8 = 8,
-};
-
-enum {
-    AUDIO_CHANNEL_REPRESENTATION_POSITION = 0u,      // 0
-    AUDIO_CHANNEL_REPRESENTATION_INDEX = 2u,         // 2
-    AUDIO_CHANNEL_NONE = 0u,                         // 0x0
-    AUDIO_CHANNEL_INVALID = 3221225472u,             // 0xC0000000
-    AUDIO_CHANNEL_OUT_FRONT_LEFT = 1u,               // 0x1
-    AUDIO_CHANNEL_OUT_FRONT_RIGHT = 2u,              // 0x2
-    AUDIO_CHANNEL_OUT_FRONT_CENTER = 4u,             // 0x4
-    AUDIO_CHANNEL_OUT_LOW_FREQUENCY = 8u,            // 0x8
-    AUDIO_CHANNEL_OUT_BACK_LEFT = 16u,               // 0x10
-    AUDIO_CHANNEL_OUT_BACK_RIGHT = 32u,              // 0x20
-    AUDIO_CHANNEL_OUT_FRONT_LEFT_OF_CENTER = 64u,    // 0x40
-    AUDIO_CHANNEL_OUT_FRONT_RIGHT_OF_CENTER = 128u,  // 0x80
-    AUDIO_CHANNEL_OUT_BACK_CENTER = 256u,            // 0x100
-    AUDIO_CHANNEL_OUT_SIDE_LEFT = 512u,              // 0x200
-    AUDIO_CHANNEL_OUT_SIDE_RIGHT = 1024u,            // 0x400
-    AUDIO_CHANNEL_OUT_TOP_CENTER = 2048u,            // 0x800
-    AUDIO_CHANNEL_OUT_TOP_FRONT_LEFT = 4096u,        // 0x1000
-    AUDIO_CHANNEL_OUT_TOP_FRONT_CENTER = 8192u,      // 0x2000
-    AUDIO_CHANNEL_OUT_TOP_FRONT_RIGHT = 16384u,      // 0x4000
-    AUDIO_CHANNEL_OUT_TOP_BACK_LEFT = 32768u,        // 0x8000
-    AUDIO_CHANNEL_OUT_TOP_BACK_CENTER = 65536u,      // 0x10000
-    AUDIO_CHANNEL_OUT_TOP_BACK_RIGHT = 131072u,      // 0x20000
-    AUDIO_CHANNEL_OUT_MONO = 1u,                     // OUT_FRONT_LEFT
-    AUDIO_CHANNEL_OUT_STEREO = 3u,                   // (OUT_FRONT_LEFT | OUT_FRONT_RIGHT)
-    AUDIO_CHANNEL_OUT_2POINT1 = 11u,  // ((OUT_FRONT_LEFT | OUT_FRONT_RIGHT) | OUT_LOW_FREQUENCY)
-    AUDIO_CHANNEL_OUT_QUAD =
-        51u,  // (((OUT_FRONT_LEFT | OUT_FRONT_RIGHT) | OUT_BACK_LEFT) | OUT_BACK_RIGHT)
-    AUDIO_CHANNEL_OUT_QUAD_BACK = 51u,  // OUT_QUAD
-    AUDIO_CHANNEL_OUT_QUAD_SIDE =
-        1539u,  // (((OUT_FRONT_LEFT | OUT_FRONT_RIGHT) | OUT_SIDE_LEFT) | OUT_SIDE_RIGHT)
-    AUDIO_CHANNEL_OUT_SURROUND =
-        263u,  // (((OUT_FRONT_LEFT | OUT_FRONT_RIGHT) | OUT_FRONT_CENTER) | OUT_BACK_CENTER)
-    AUDIO_CHANNEL_OUT_PENTA = 55u,    // (OUT_QUAD | OUT_FRONT_CENTER)
-    AUDIO_CHANNEL_OUT_5POINT1 = 63u,  // (((((OUT_FRONT_LEFT | OUT_FRONT_RIGHT) | OUT_FRONT_CENTER)
-                                      // | OUT_LOW_FREQUENCY) | OUT_BACK_LEFT) | OUT_BACK_RIGHT)
-    AUDIO_CHANNEL_OUT_5POINT1_BACK = 63u,    // OUT_5POINT1
-    AUDIO_CHANNEL_OUT_5POINT1_SIDE = 1551u,  // (((((OUT_FRONT_LEFT | OUT_FRONT_RIGHT) |
-                                             // OUT_FRONT_CENTER) | OUT_LOW_FREQUENCY) |
-                                             // OUT_SIDE_LEFT) | OUT_SIDE_RIGHT)
-    AUDIO_CHANNEL_OUT_6POINT1 = 319u,        // ((((((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 = 1599u,  // (((((((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_ALL =
-        262143u,  // (((((((((((((((((OUT_FRONT_LEFT | OUT_FRONT_RIGHT) | OUT_FRONT_CENTER) |
-                  // OUT_LOW_FREQUENCY) | OUT_BACK_LEFT) | OUT_BACK_RIGHT) |
-                  // OUT_FRONT_LEFT_OF_CENTER) | OUT_FRONT_RIGHT_OF_CENTER) | OUT_BACK_CENTER) |
-                  // OUT_SIDE_LEFT) | OUT_SIDE_RIGHT) | OUT_TOP_CENTER) | OUT_TOP_FRONT_LEFT) |
-                  // OUT_TOP_FRONT_CENTER) | OUT_TOP_FRONT_RIGHT) | OUT_TOP_BACK_LEFT) |
-                  // OUT_TOP_BACK_CENTER) | OUT_TOP_BACK_RIGHT)
-    AUDIO_CHANNEL_IN_LEFT = 4u,               // 0x4
-    AUDIO_CHANNEL_IN_RIGHT = 8u,              // 0x8
-    AUDIO_CHANNEL_IN_FRONT = 16u,             // 0x10
-    AUDIO_CHANNEL_IN_BACK = 32u,              // 0x20
-    AUDIO_CHANNEL_IN_LEFT_PROCESSED = 64u,    // 0x40
-    AUDIO_CHANNEL_IN_RIGHT_PROCESSED = 128u,  // 0x80
-    AUDIO_CHANNEL_IN_FRONT_PROCESSED = 256u,  // 0x100
-    AUDIO_CHANNEL_IN_BACK_PROCESSED = 512u,   // 0x200
-    AUDIO_CHANNEL_IN_PRESSURE = 1024u,        // 0x400
-    AUDIO_CHANNEL_IN_X_AXIS = 2048u,          // 0x800
-    AUDIO_CHANNEL_IN_Y_AXIS = 4096u,          // 0x1000
-    AUDIO_CHANNEL_IN_Z_AXIS = 8192u,          // 0x2000
-    AUDIO_CHANNEL_IN_VOICE_UPLINK = 16384u,   // 0x4000
-    AUDIO_CHANNEL_IN_VOICE_DNLINK = 32768u,   // 0x8000
-    AUDIO_CHANNEL_IN_MONO = 16u,              // IN_FRONT
-    AUDIO_CHANNEL_IN_STEREO = 12u,            // (IN_LEFT | IN_RIGHT)
-    AUDIO_CHANNEL_IN_FRONT_BACK = 48u,        // (IN_FRONT | IN_BACK)
-    AUDIO_CHANNEL_IN_6 = 252u,                // (((((IN_LEFT | IN_RIGHT) | IN_FRONT) | IN_BACK) |
-                                              // IN_LEFT_PROCESSED) | IN_RIGHT_PROCESSED)
-    AUDIO_CHANNEL_IN_VOICE_UPLINK_MONO = 16400u,  // (IN_VOICE_UPLINK | IN_MONO)
-    AUDIO_CHANNEL_IN_VOICE_DNLINK_MONO = 32784u,  // (IN_VOICE_DNLINK | IN_MONO)
-    AUDIO_CHANNEL_IN_VOICE_CALL_MONO = 49168u,    // (IN_VOICE_UPLINK_MONO | IN_VOICE_DNLINK_MONO)
-    AUDIO_CHANNEL_IN_ALL =
-        65532u,  // (((((((((((((IN_LEFT | IN_RIGHT) | IN_FRONT) | IN_BACK) | IN_LEFT_PROCESSED) |
-                 // IN_RIGHT_PROCESSED) | IN_FRONT_PROCESSED) | IN_BACK_PROCESSED) | IN_PRESSURE) |
-                 // IN_X_AXIS) | IN_Y_AXIS) | IN_Z_AXIS) | IN_VOICE_UPLINK) | IN_VOICE_DNLINK)
-    AUDIO_CHANNEL_COUNT_MAX = 30u,             // 30
-    AUDIO_CHANNEL_INDEX_HDR = 2147483648u,     // (REPRESENTATION_INDEX << COUNT_MAX)
-    AUDIO_CHANNEL_INDEX_MASK_1 = 2147483649u,  // (INDEX_HDR | ((1 << 1) - 1))
-    AUDIO_CHANNEL_INDEX_MASK_2 = 2147483651u,  // (INDEX_HDR | ((1 << 2) - 1))
-    AUDIO_CHANNEL_INDEX_MASK_3 = 2147483655u,  // (INDEX_HDR | ((1 << 3) - 1))
-    AUDIO_CHANNEL_INDEX_MASK_4 = 2147483663u,  // (INDEX_HDR | ((1 << 4) - 1))
-    AUDIO_CHANNEL_INDEX_MASK_5 = 2147483679u,  // (INDEX_HDR | ((1 << 5) - 1))
-    AUDIO_CHANNEL_INDEX_MASK_6 = 2147483711u,  // (INDEX_HDR | ((1 << 6) - 1))
-    AUDIO_CHANNEL_INDEX_MASK_7 = 2147483775u,  // (INDEX_HDR | ((1 << 7) - 1))
-    AUDIO_CHANNEL_INDEX_MASK_8 = 2147483903u,  // (INDEX_HDR | ((1 << 8) - 1))
-};
-
-enum {
-    AUDIO_INTERLEAVE_LEFT = 0,
-    AUDIO_INTERLEAVE_RIGHT = 1,
-};
-
-typedef enum {
-    AUDIO_MODE_INVALID = -2,  // (-2)
-    AUDIO_MODE_CURRENT = -1,  // (-1)
-    AUDIO_MODE_NORMAL = 0,
-    AUDIO_MODE_RINGTONE = 1,
-    AUDIO_MODE_IN_CALL = 2,
-    AUDIO_MODE_IN_COMMUNICATION = 3,
-    AUDIO_MODE_CNT = 4,
-    AUDIO_MODE_MAX = 3,  // (CNT - 1)
-} audio_mode_t;
-
-enum {
-    AUDIO_DEVICE_NONE = 0u,                             // 0x0
-    AUDIO_DEVICE_BIT_IN = 2147483648u,                  // 0x80000000
-    AUDIO_DEVICE_BIT_DEFAULT = 1073741824u,             // 0x40000000
-    AUDIO_DEVICE_OUT_EARPIECE = 1u,                     // 0x1
-    AUDIO_DEVICE_OUT_SPEAKER = 2u,                      // 0x2
-    AUDIO_DEVICE_OUT_WIRED_HEADSET = 4u,                // 0x4
-    AUDIO_DEVICE_OUT_WIRED_HEADPHONE = 8u,              // 0x8
-    AUDIO_DEVICE_OUT_BLUETOOTH_SCO = 16u,               // 0x10
-    AUDIO_DEVICE_OUT_BLUETOOTH_SCO_HEADSET = 32u,       // 0x20
-    AUDIO_DEVICE_OUT_BLUETOOTH_SCO_CARKIT = 64u,        // 0x40
-    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP = 128u,             // 0x80
-    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_HEADPHONES = 256u,  // 0x100
-    AUDIO_DEVICE_OUT_BLUETOOTH_A2DP_SPEAKER = 512u,     // 0x200
-    AUDIO_DEVICE_OUT_AUX_DIGITAL = 1024u,               // 0x400
-    AUDIO_DEVICE_OUT_HDMI = 1024u,                      // OUT_AUX_DIGITAL
-    AUDIO_DEVICE_OUT_ANLG_DOCK_HEADSET = 2048u,         // 0x800
-    AUDIO_DEVICE_OUT_DGTL_DOCK_HEADSET = 4096u,         // 0x1000
-    AUDIO_DEVICE_OUT_USB_ACCESSORY = 8192u,             // 0x2000
-    AUDIO_DEVICE_OUT_USB_DEVICE = 16384u,               // 0x4000
-    AUDIO_DEVICE_OUT_REMOTE_SUBMIX = 32768u,            // 0x8000
-    AUDIO_DEVICE_OUT_TELEPHONY_TX = 65536u,             // 0x10000
-    AUDIO_DEVICE_OUT_LINE = 131072u,                    // 0x20000
-    AUDIO_DEVICE_OUT_HDMI_ARC = 262144u,                // 0x40000
-    AUDIO_DEVICE_OUT_SPDIF = 524288u,                   // 0x80000
-    AUDIO_DEVICE_OUT_FM = 1048576u,                     // 0x100000
-    AUDIO_DEVICE_OUT_AUX_LINE = 2097152u,               // 0x200000
-    AUDIO_DEVICE_OUT_SPEAKER_SAFE = 4194304u,           // 0x400000
-    AUDIO_DEVICE_OUT_IP = 8388608u,                     // 0x800000
-    AUDIO_DEVICE_OUT_BUS = 16777216u,                   // 0x1000000
-    AUDIO_DEVICE_OUT_PROXY = 33554432u,                 // 0x2000000
-    AUDIO_DEVICE_OUT_USB_HEADSET = 67108864u,           // 0x4000000
-    AUDIO_DEVICE_OUT_DEFAULT = 1073741824u,             // BIT_DEFAULT
-    AUDIO_DEVICE_OUT_ALL =
-        1207959551u,  // (((((((((((((((((((((((((((OUT_EARPIECE | OUT_SPEAKER) | OUT_WIRED_HEADSET)
-                      // | OUT_WIRED_HEADPHONE) | OUT_BLUETOOTH_SCO) | OUT_BLUETOOTH_SCO_HEADSET) |
-                      // OUT_BLUETOOTH_SCO_CARKIT) | OUT_BLUETOOTH_A2DP) |
-                      // OUT_BLUETOOTH_A2DP_HEADPHONES) | OUT_BLUETOOTH_A2DP_SPEAKER) | OUT_HDMI) |
-                      // OUT_ANLG_DOCK_HEADSET) | OUT_DGTL_DOCK_HEADSET) | OUT_USB_ACCESSORY) |
-                      // OUT_USB_DEVICE) | OUT_REMOTE_SUBMIX) | OUT_TELEPHONY_TX) | OUT_LINE) |
-                      // OUT_HDMI_ARC) | OUT_SPDIF) | OUT_FM) | OUT_AUX_LINE) | OUT_SPEAKER_SAFE) |
-                      // OUT_IP) | OUT_BUS) | OUT_PROXY) | OUT_USB_HEADSET) | OUT_DEFAULT)
-    AUDIO_DEVICE_OUT_ALL_A2DP = 896u,  // ((OUT_BLUETOOTH_A2DP | OUT_BLUETOOTH_A2DP_HEADPHONES) |
-                                       // OUT_BLUETOOTH_A2DP_SPEAKER)
-    AUDIO_DEVICE_OUT_ALL_SCO =
-        112u,  // ((OUT_BLUETOOTH_SCO | OUT_BLUETOOTH_SCO_HEADSET) | OUT_BLUETOOTH_SCO_CARKIT)
-    AUDIO_DEVICE_OUT_ALL_USB =
-        67133440u,  // ((OUT_USB_ACCESSORY | OUT_USB_DEVICE) | OUT_USB_HEADSET)
-    AUDIO_DEVICE_IN_COMMUNICATION = 2147483649u,          // (BIT_IN | 0x1)
-    AUDIO_DEVICE_IN_AMBIENT = 2147483650u,                // (BIT_IN | 0x2)
-    AUDIO_DEVICE_IN_BUILTIN_MIC = 2147483652u,            // (BIT_IN | 0x4)
-    AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET = 2147483656u,  // (BIT_IN | 0x8)
-    AUDIO_DEVICE_IN_WIRED_HEADSET = 2147483664u,          // (BIT_IN | 0x10)
-    AUDIO_DEVICE_IN_AUX_DIGITAL = 2147483680u,            // (BIT_IN | 0x20)
-    AUDIO_DEVICE_IN_HDMI = 2147483680u,                   // IN_AUX_DIGITAL
-    AUDIO_DEVICE_IN_VOICE_CALL = 2147483712u,             // (BIT_IN | 0x40)
-    AUDIO_DEVICE_IN_TELEPHONY_RX = 2147483712u,           // IN_VOICE_CALL
-    AUDIO_DEVICE_IN_BACK_MIC = 2147483776u,               // (BIT_IN | 0x80)
-    AUDIO_DEVICE_IN_REMOTE_SUBMIX = 2147483904u,          // (BIT_IN | 0x100)
-    AUDIO_DEVICE_IN_ANLG_DOCK_HEADSET = 2147484160u,      // (BIT_IN | 0x200)
-    AUDIO_DEVICE_IN_DGTL_DOCK_HEADSET = 2147484672u,      // (BIT_IN | 0x400)
-    AUDIO_DEVICE_IN_USB_ACCESSORY = 2147485696u,          // (BIT_IN | 0x800)
-    AUDIO_DEVICE_IN_USB_DEVICE = 2147487744u,             // (BIT_IN | 0x1000)
-    AUDIO_DEVICE_IN_FM_TUNER = 2147491840u,               // (BIT_IN | 0x2000)
-    AUDIO_DEVICE_IN_TV_TUNER = 2147500032u,               // (BIT_IN | 0x4000)
-    AUDIO_DEVICE_IN_LINE = 2147516416u,                   // (BIT_IN | 0x8000)
-    AUDIO_DEVICE_IN_SPDIF = 2147549184u,                  // (BIT_IN | 0x10000)
-    AUDIO_DEVICE_IN_BLUETOOTH_A2DP = 2147614720u,         // (BIT_IN | 0x20000)
-    AUDIO_DEVICE_IN_LOOPBACK = 2147745792u,               // (BIT_IN | 0x40000)
-    AUDIO_DEVICE_IN_IP = 2148007936u,                     // (BIT_IN | 0x80000)
-    AUDIO_DEVICE_IN_BUS = 2148532224u,                    // (BIT_IN | 0x100000)
-    AUDIO_DEVICE_IN_PROXY = 2164260864u,                  // (BIT_IN | 0x1000000)
-    AUDIO_DEVICE_IN_USB_HEADSET = 2181038080u,            // (BIT_IN | 0x2000000)
-    AUDIO_DEVICE_IN_DEFAULT = 3221225472u,                // (BIT_IN | BIT_DEFAULT)
-    AUDIO_DEVICE_IN_ALL =
-        3273654271u,  // (((((((((((((((((((((((IN_COMMUNICATION | IN_AMBIENT) | IN_BUILTIN_MIC) |
-                      // IN_BLUETOOTH_SCO_HEADSET) | IN_WIRED_HEADSET) | IN_HDMI) | IN_TELEPHONY_RX)
-                      // | IN_BACK_MIC) | IN_REMOTE_SUBMIX) | IN_ANLG_DOCK_HEADSET) |
-                      // IN_DGTL_DOCK_HEADSET) | IN_USB_ACCESSORY) | IN_USB_DEVICE) | IN_FM_TUNER) |
-                      // IN_TV_TUNER) | IN_LINE) | IN_SPDIF) | IN_BLUETOOTH_A2DP) | IN_LOOPBACK) |
-                      // IN_IP) | IN_BUS) | IN_PROXY) | IN_USB_HEADSET) | IN_DEFAULT)
-    AUDIO_DEVICE_IN_ALL_SCO = 2147483656u,  // IN_BLUETOOTH_SCO_HEADSET
-    AUDIO_DEVICE_IN_ALL_USB = 2181044224u,  // ((IN_USB_ACCESSORY | IN_USB_DEVICE) | IN_USB_HEADSET)
-};
-
-typedef enum {
-    AUDIO_OUTPUT_FLAG_NONE = 0,                // 0x0
-    AUDIO_OUTPUT_FLAG_DIRECT = 1,              // 0x1
-    AUDIO_OUTPUT_FLAG_PRIMARY = 2,             // 0x2
-    AUDIO_OUTPUT_FLAG_FAST = 4,                // 0x4
-    AUDIO_OUTPUT_FLAG_DEEP_BUFFER = 8,         // 0x8
-    AUDIO_OUTPUT_FLAG_COMPRESS_OFFLOAD = 16,   // 0x10
-    AUDIO_OUTPUT_FLAG_NON_BLOCKING = 32,       // 0x20
-    AUDIO_OUTPUT_FLAG_HW_AV_SYNC = 64,         // 0x40
-    AUDIO_OUTPUT_FLAG_TTS = 128,               // 0x80
-    AUDIO_OUTPUT_FLAG_RAW = 256,               // 0x100
-    AUDIO_OUTPUT_FLAG_SYNC = 512,              // 0x200
-    AUDIO_OUTPUT_FLAG_IEC958_NONAUDIO = 1024,  // 0x400
-    AUDIO_OUTPUT_FLAG_DIRECT_PCM = 8192,       // 0x2000
-    AUDIO_OUTPUT_FLAG_MMAP_NOIRQ = 16384,      // 0x4000
-    AUDIO_OUTPUT_FLAG_VOIP_RX = 32768,         // 0x8000
-} audio_output_flags_t;
-
-typedef enum {
-    AUDIO_INPUT_FLAG_NONE = 0,         // 0x0
-    AUDIO_INPUT_FLAG_FAST = 1,         // 0x1
-    AUDIO_INPUT_FLAG_HW_HOTWORD = 2,   // 0x2
-    AUDIO_INPUT_FLAG_RAW = 4,          // 0x4
-    AUDIO_INPUT_FLAG_SYNC = 8,         // 0x8
-    AUDIO_INPUT_FLAG_MMAP_NOIRQ = 16,  // 0x10
-    AUDIO_INPUT_FLAG_VOIP_TX = 32,     // 0x20
-} 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,
-    AUDIO_USAGE_NOTIFICATION_COMMUNICATION_REQUEST = 7,
-    AUDIO_USAGE_NOTIFICATION_COMMUNICATION_INSTANT = 8,
-    AUDIO_USAGE_NOTIFICATION_COMMUNICATION_DELAYED = 9,
-    AUDIO_USAGE_NOTIFICATION_EVENT = 10,
-    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_CNT = 17,
-    AUDIO_USAGE_MAX = 16,  // (CNT - 1)
-} audio_usage_t;
-
-enum {
-    AUDIO_GAIN_MODE_JOINT = 1u,     // 0x1
-    AUDIO_GAIN_MODE_CHANNELS = 2u,  // 0x2
-    AUDIO_GAIN_MODE_RAMP = 4u,      // 0x4
-};
-
-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 = 1u,   // 0x1
-    AUDIO_PORT_CONFIG_CHANNEL_MASK = 2u,  // 0x2
-    AUDIO_PORT_CONFIG_FORMAT = 4u,        // 0x4
-    AUDIO_PORT_CONFIG_GAIN = 8u,          // 0x8
-    AUDIO_PORT_CONFIG_ALL = 15u,          // (((SAMPLE_RATE | CHANNEL_MASK) | FORMAT) | GAIN)
-};
-
-typedef enum {
-    AUDIO_LATENCY_LOW = 0,
-    AUDIO_LATENCY_NORMAL = 1,
-} audio_mix_latency_class_t;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_COMMON_V2_0_EXPORTED_CONSTANTS_H_
diff --git a/audio/common/2.0/legacy/include/system/audio_effect-base.h b/audio/common/2.0/legacy/include/system/audio_effect-base.h
deleted file mode 100644
index cd17f55..0000000
--- a/audio/common/2.0/legacy/include/system/audio_effect-base.h
+++ /dev/null
@@ -1,101 +0,0 @@
-// This file is autogenerated by hidl-gen. Do not edit manually.
-// Source: android.hardware.audio.effect@2.0
-// Root: android.hardware:hardware/interfaces
-
-#ifndef HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EXPORTED_CONSTANTS_H_
-#define HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EXPORTED_CONSTANTS_H_
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-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_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_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_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_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_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_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_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_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_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_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)
-};
-
-typedef enum {
-    EFFECT_BUFFER_ACCESS_WRITE = 0,
-    EFFECT_BUFFER_ACCESS_READ = 1,
-    EFFECT_BUFFER_ACCESS_ACCUMULATE = 2,
-} effect_buffer_access_e;
-
-enum {
-    EFFECT_CONFIG_BUFFER = 1,     // 0x0001
-    EFFECT_CONFIG_SMP_RATE = 2,   // 0x0002
-    EFFECT_CONFIG_CHANNELS = 4,   // 0x0004
-    EFFECT_CONFIG_FORMAT = 8,     // 0x0008
-    EFFECT_CONFIG_ACC_MODE = 16,  // 0x0010
-    EFFECT_CONFIG_ALL = 31,       // ((((BUFFER | SMP_RATE) | CHANNELS) | FORMAT) | ACC_MODE)
-};
-
-typedef enum {
-    EFFECT_FEATURE_AUX_CHANNELS = 0,
-    EFFECT_FEATURE_CNT = 1,
-} effect_feature_e;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif  // HIDL_GENERATED_ANDROID_HARDWARE_AUDIO_EFFECT_V2_0_EXPORTED_CONSTANTS_H_