diff --git a/audio/README b/audio/README
index f4b8555..2b81450 100644
--- a/audio/README
+++ b/audio/README
@@ -7,18 +7,15 @@
 |-- common           <== code common to audio core and effect API
 |   |-- 2.0
 |   |   |-- default  <== code that wraps the legacy API
-|   |   |-- legacy   <== legacy API compatible with 2.0
 |   |   `-- vts      <== vts of 2.0 core and effect API common code
 |   |-- 4.0
 |   |   |-- default
-|   |   |-- legacy
 |   |   `-- vts
 |   |-- ...          <== The future versions should continue this structure
 |   |   |-- default
 |   |   `-- vts
 |   `-- all_versions <== code common to all version of both core and effect API
 |       |-- default
-|   |   |-- legacy   <== legacy API compatible with all versions
 |       `-- vts      <== vts of core and effect API common version independent code
 |
 |-- core           <== code relative to the core API
@@ -38,17 +35,13 @@
 `-- effect           <== idem for the effect API
     |-- 2.0
     |   |-- default
-    |   |-- legacy   <== legacy effect API compatible with 2.0
     |   `-- vts
     |-- 4.0
     |   |-- default
-    |   |-- legacy
     |   `-- vts
     |-- ...
     |   |-- default
-    |   |-- default
     |   `-- vts
     `-- all_versions
         |-- default
-        |-- legacy
         `-- vts
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_
diff --git a/audio/common/all-versions/default/Android.bp b/audio/common/all-versions/default/Android.bp
index 9b82f05..8f6b74c 100644
--- a/audio/common/all-versions/default/Android.bp
+++ b/audio/common/all-versions/default/Android.bp
@@ -16,7 +16,10 @@
 cc_library_shared {
     name: "android.hardware.audio.common-util",
     defaults: ["hidl_defaults"],
-    vendor: true,
+    vendor_available: true,
+    vndk: {
+        enabled: true,
+    },
     srcs: [
         "EffectMap.cpp",
     ],
@@ -30,7 +33,7 @@
     ],
 
     header_libs: [
-        "android.hardware.audio.common.legacy@2.0",
+        "libaudio_system_headers",
         "libhardware_headers",
     ],
 }
diff --git a/audio/common/all-versions/legacy/Android.bp b/audio/common/all-versions/legacy/Android.bp
deleted file mode 100644
index 2fb01dd..0000000
--- a/audio/common/all-versions/legacy/Android.bp
+++ /dev/null
@@ -1,8 +0,0 @@
-cc_library_headers {
-    name: "android.hardware.audio.common.legacy@all-versions",
-    vendor: true,
-    export_include_dirs: ["include"],
-    header_libs: ["libcutils_headers"],
-    export_header_lib_headers: ["libcutils_headers"],
-}
-
diff --git a/audio/common/all-versions/legacy/OWNERS b/audio/common/all-versions/legacy/OWNERS
deleted file mode 100644
index 6fdc97c..0000000
--- a/audio/common/all-versions/legacy/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-elaurent@google.com
-krocard@google.com
-mnaganov@google.com
diff --git a/audio/common/all-versions/legacy/include/hardware/audio.h b/audio/common/all-versions/legacy/include/hardware/audio.h
deleted file mode 100644
index 1ad3e0e..0000000
--- a/audio/common/all-versions/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/all-versions/legacy/include/hardware/audio_alsaops.h b/audio/common/all-versions/legacy/include/hardware/audio_alsaops.h
deleted file mode 100644
index aa16654..0000000
--- a/audio/common/all-versions/legacy/include/hardware/audio_alsaops.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (C) 2014 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 file contains shared utility functions to handle the tinyalsa
- * implementation for Android internal audio, generally in the hardware layer.
- * Some routines may log a fatal error on failure, as noted.
- */
-
-#ifndef ANDROID_AUDIO_ALSAOPS_H
-#define ANDROID_AUDIO_ALSAOPS_H
-
-#include <log/log.h>
-
-#include <system/audio.h>
-#include <tinyalsa/asoundlib.h>
-
-__BEGIN_DECLS
-
-/* Converts audio_format to pcm_format.
- * Parameters:
- *  format  the audio_format_t to convert
- *
- * Logs a fatal error if format is not a valid convertible audio_format_t.
- */
-static inline enum pcm_format pcm_format_from_audio_format(audio_format_t format) {
-    switch (format) {
-#if HAVE_BIG_ENDIAN
-        case AUDIO_FORMAT_PCM_16_BIT:
-            return PCM_FORMAT_S16_BE;
-        case AUDIO_FORMAT_PCM_24_BIT_PACKED:
-            return PCM_FORMAT_S24_3BE;
-        case AUDIO_FORMAT_PCM_32_BIT:
-            return PCM_FORMAT_S32_BE;
-        case AUDIO_FORMAT_PCM_8_24_BIT:
-            return PCM_FORMAT_S24_BE;
-#else
-        case AUDIO_FORMAT_PCM_16_BIT:
-            return PCM_FORMAT_S16_LE;
-        case AUDIO_FORMAT_PCM_24_BIT_PACKED:
-            return PCM_FORMAT_S24_3LE;
-        case AUDIO_FORMAT_PCM_32_BIT:
-            return PCM_FORMAT_S32_LE;
-        case AUDIO_FORMAT_PCM_8_24_BIT:
-            return PCM_FORMAT_S24_LE;
-#endif
-        case AUDIO_FORMAT_PCM_FLOAT: /* there is no equivalent for float */
-        default:
-            LOG_ALWAYS_FATAL("pcm_format_from_audio_format: invalid audio format %#x", format);
-            return 0;
-    }
-}
-
-/* Converts pcm_format to audio_format.
- * Parameters:
- *  format  the pcm_format to convert
- *
- * Logs a fatal error if format is not a valid convertible pcm_format.
- */
-static inline audio_format_t audio_format_from_pcm_format(enum pcm_format format) {
-    switch (format) {
-#if HAVE_BIG_ENDIAN
-        case PCM_FORMAT_S16_BE:
-            return AUDIO_FORMAT_PCM_16_BIT;
-        case PCM_FORMAT_S24_3BE:
-            return AUDIO_FORMAT_PCM_24_BIT_PACKED;
-        case PCM_FORMAT_S24_BE:
-            return AUDIO_FORMAT_PCM_8_24_BIT;
-        case PCM_FORMAT_S32_BE:
-            return AUDIO_FORMAT_PCM_32_BIT;
-#else
-        case PCM_FORMAT_S16_LE:
-            return AUDIO_FORMAT_PCM_16_BIT;
-        case PCM_FORMAT_S24_3LE:
-            return AUDIO_FORMAT_PCM_24_BIT_PACKED;
-        case PCM_FORMAT_S24_LE:
-            return AUDIO_FORMAT_PCM_8_24_BIT;
-        case PCM_FORMAT_S32_LE:
-            return AUDIO_FORMAT_PCM_32_BIT;
-#endif
-        default:
-            LOG_ALWAYS_FATAL("audio_format_from_pcm_format: invalid pcm format %#x", format);
-            return 0;
-    }
-}
-
-__END_DECLS
-
-#endif /* ANDROID_AUDIO_ALSAOPS_H */
diff --git a/audio/common/all-versions/legacy/include/hardware/audio_effect.h b/audio/common/all-versions/legacy/include/hardware/audio_effect.h
deleted file mode 100644
index b91c60a..0000000
--- a/audio/common/all-versions/legacy/include/hardware/audio_effect.h
+++ /dev/null
@@ -1,295 +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_EFFECT_H
-#define ANDROID_AUDIO_EFFECT_H
-
-#include <errno.h>
-#include <stdint.h>
-#include <strings.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <cutils/bitops.h>
-
-#include <system/audio_effect.h>
-
-__BEGIN_DECLS
-
-/////////////////////////////////////////////////
-//      Common Definitions
-/////////////////////////////////////////////////
-
-#define EFFECT_MAKE_API_VERSION(M, m) (((M) << 16) | ((m)&0xFFFF))
-#define EFFECT_API_VERSION_MAJOR(v) ((v) >> 16)
-#define EFFECT_API_VERSION_MINOR(v) ((m)&0xFFFF)
-
-/////////////////////////////////////////////////
-//      Effect control interface
-/////////////////////////////////////////////////
-
-// Effect control interface version 2.0
-#define EFFECT_CONTROL_API_VERSION EFFECT_MAKE_API_VERSION(2, 0)
-
-// Effect control interface structure: effect_interface_s
-// The effect control interface is exposed by each effect engine implementation. It consists of
-// a set of functions controlling the configuration, activation and process of the engine.
-// The functions are grouped in a structure of type effect_interface_s.
-//
-// Effect control interface handle: effect_handle_t
-// The effect_handle_t serves two purposes regarding the implementation of the effect engine:
-// - 1 it is the address of a pointer to an effect_interface_s structure where the functions
-// of the effect control API for a particular effect are located.
-// - 2 it is the address of the context of a particular effect instance.
-// A typical implementation in the effect library would define a structure as follows:
-// struct effect_module_s {
-//        const struct effect_interface_s *itfe;
-//        effect_config_t config;
-//        effect_context_t context;
-// }
-// The implementation of EffectCreate() function would then allocate a structure of this
-// type and return its address as effect_handle_t
-typedef struct effect_interface_s** effect_handle_t;
-
-// Effect control interface definition
-struct effect_interface_s {
-    ////////////////////////////////////////////////////////////////////////////////
-    //
-    //    Function:       process
-    //
-    //    Description:    Effect process function. Takes input samples as specified
-    //          (count and location) in input buffer descriptor and output processed
-    //          samples as specified in output buffer descriptor. If the buffer descriptor
-    //          is not specified the function must use either the buffer or the
-    //          buffer provider function installed by the EFFECT_CMD_SET_CONFIG command.
-    //          The effect framework will call the process() function after the EFFECT_CMD_ENABLE
-    //          command is received and until the EFFECT_CMD_DISABLE is received. When the engine
-    //          receives the EFFECT_CMD_DISABLE command it should turn off the effect gracefully
-    //          and when done indicate that it is OK to stop calling the process() function by
-    //          returning the -ENODATA status.
-    //
-    //    NOTE: the process() function implementation should be "real-time safe" that is
-    //      it should not perform blocking calls: malloc/free, sleep, read/write/open/close,
-    //      pthread_cond_wait/pthread_mutex_lock...
-    //
-    //    Input:
-    //          self:       handle to the effect interface this function
-    //              is called on.
-    //          inBuffer:   buffer descriptor indicating where to read samples to process.
-    //              If NULL, use the configuration passed by EFFECT_CMD_SET_CONFIG command.
-    //
-    //          outBuffer:   buffer descriptor indicating where to write processed samples.
-    //              If NULL, use the configuration passed by EFFECT_CMD_SET_CONFIG command.
-    //
-    //    Output:
-    //        returned value:    0 successful operation
-    //                          -ENODATA the engine has finished the disable phase and the framework
-    //                                  can stop calling process()
-    //                          -EINVAL invalid interface handle or
-    //                                  invalid input/output buffer description
-    ////////////////////////////////////////////////////////////////////////////////
-    int32_t (*process)(effect_handle_t self, audio_buffer_t* inBuffer, audio_buffer_t* outBuffer);
-    ////////////////////////////////////////////////////////////////////////////////
-    //
-    //    Function:       command
-    //
-    //    Description:    Send a command and receive a response to/from effect engine.
-    //
-    //    Input:
-    //          self:       handle to the effect interface this function
-    //              is called on.
-    //          cmdCode:    command code: the command can be a standardized command defined in
-    //              effect_command_e (see below) or a proprietary command.
-    //          cmdSize:    size of command in bytes
-    //          pCmdData:   pointer to command data
-    //          pReplyData: pointer to reply data
-    //
-    //    Input/Output:
-    //          replySize: maximum size of reply data as input
-    //                      actual size of reply data as output
-    //
-    //    Output:
-    //          returned value: 0       successful operation
-    //                          -EINVAL invalid interface handle or
-    //                                  invalid command/reply size or format according to
-    //                                  command code
-    //              The return code should be restricted to indicate problems related to this API
-    //              specification. Status related to the execution of a particular command should be
-    //              indicated as part of the reply field.
-    //
-    //          *pReplyData updated with command response
-    //
-    ////////////////////////////////////////////////////////////////////////////////
-    int32_t (*command)(effect_handle_t self, uint32_t cmdCode, uint32_t cmdSize, void* pCmdData,
-                       uint32_t* replySize, void* pReplyData);
-    ////////////////////////////////////////////////////////////////////////////////
-    //
-    //    Function:        get_descriptor
-    //
-    //    Description:    Returns the effect descriptor
-    //
-    //    Input:
-    //          self:       handle to the effect interface this function
-    //              is called on.
-    //
-    //    Input/Output:
-    //          pDescriptor:    address where to return the effect descriptor.
-    //
-    //    Output:
-    //        returned value:    0          successful operation.
-    //                          -EINVAL     invalid interface handle or invalid pDescriptor
-    //        *pDescriptor:     updated with the effect descriptor.
-    //
-    ////////////////////////////////////////////////////////////////////////////////
-    int32_t (*get_descriptor)(effect_handle_t self, effect_descriptor_t* pDescriptor);
-    ////////////////////////////////////////////////////////////////////////////////
-    //
-    //    Function:       process_reverse
-    //
-    //    Description:    Process reverse stream function. This function is used to pass
-    //          a reference stream to the effect engine. If the engine does not need a reference
-    //          stream, this function pointer can be set to NULL.
-    //          This function would typically implemented by an Echo Canceler.
-    //
-    //    Input:
-    //          self:       handle to the effect interface this function
-    //              is called on.
-    //          inBuffer:   buffer descriptor indicating where to read samples to process.
-    //              If NULL, use the configuration passed by EFFECT_CMD_SET_CONFIG_REVERSE command.
-    //
-    //          outBuffer:   buffer descriptor indicating where to write processed samples.
-    //              If NULL, use the configuration passed by EFFECT_CMD_SET_CONFIG_REVERSE command.
-    //              If the buffer and buffer provider in the configuration received by
-    //              EFFECT_CMD_SET_CONFIG_REVERSE are also NULL, do not return modified reverse
-    //              stream data
-    //
-    //    Output:
-    //        returned value:    0 successful operation
-    //                          -ENODATA the engine has finished the disable phase and the framework
-    //                                  can stop calling process_reverse()
-    //                          -EINVAL invalid interface handle or
-    //                                  invalid input/output buffer description
-    ////////////////////////////////////////////////////////////////////////////////
-    int32_t (*process_reverse)(effect_handle_t self, audio_buffer_t* inBuffer,
-                               audio_buffer_t* outBuffer);
-};
-
-/////////////////////////////////////////////////
-//      Effect library interface
-/////////////////////////////////////////////////
-
-// Effect library interface version 3.0
-// Note that EffectsFactory.c only checks the major version component, so changes to the minor
-// number can only be used for fully backwards compatible changes
-#define EFFECT_LIBRARY_API_VERSION EFFECT_MAKE_API_VERSION(3, 0)
-
-#define AUDIO_EFFECT_LIBRARY_TAG ((('A') << 24) | (('E') << 16) | (('L') << 8) | ('T'))
-
-// Every effect library must have a data structure named AUDIO_EFFECT_LIBRARY_INFO_SYM
-// and the fields of this data structure must begin with audio_effect_library_t
-
-typedef struct audio_effect_library_s {
-    // tag must be initialized to AUDIO_EFFECT_LIBRARY_TAG
-    uint32_t tag;
-    // Version of the effect library API : 0xMMMMmmmm MMMM: Major, mmmm: minor
-    uint32_t version;
-    // Name of this library
-    const char* name;
-    // Author/owner/implementor of the library
-    const char* implementor;
-
-    ////////////////////////////////////////////////////////////////////////////////
-    //
-    //    Function:        create_effect
-    //
-    //    Description:    Creates an effect engine of the specified implementation uuid and
-    //          returns an effect control interface on this engine. The function will allocate the
-    //          resources for an instance of the requested effect engine and return
-    //          a handle on the effect control interface.
-    //
-    //    Input:
-    //          uuid:    pointer to the effect uuid.
-    //          sessionId:  audio session to which this effect instance will be attached.
-    //              All effects created with the same session ID are connected in series and process
-    //              the same signal stream. Knowing that two effects are part of the same effect
-    //              chain can help the library implement some kind of optimizations.
-    //          ioId:   identifies the output or input stream this effect is directed to in
-    //              audio HAL.
-    //              For future use especially with tunneled HW accelerated effects
-    //
-    //    Input/Output:
-    //          pHandle:        address where to return the effect interface handle.
-    //
-    //    Output:
-    //        returned value:    0          successful operation.
-    //                          -ENODEV     library failed to initialize
-    //                          -EINVAL     invalid pEffectUuid or pHandle
-    //                          -ENOENT     no effect with this uuid found
-    //        *pHandle:         updated with the effect interface handle.
-    //
-    ////////////////////////////////////////////////////////////////////////////////
-    int32_t (*create_effect)(const effect_uuid_t* uuid, int32_t sessionId, int32_t ioId,
-                             effect_handle_t* pHandle);
-
-    ////////////////////////////////////////////////////////////////////////////////
-    //
-    //    Function:        release_effect
-    //
-    //    Description:    Releases the effect engine whose handle is given as argument.
-    //          All resources allocated to this particular instance of the effect are
-    //          released.
-    //
-    //    Input:
-    //          handle:         handle on the effect interface to be released.
-    //
-    //    Output:
-    //        returned value:    0          successful operation.
-    //                          -ENODEV     library failed to initialize
-    //                          -EINVAL     invalid interface handle
-    //
-    ////////////////////////////////////////////////////////////////////////////////
-    int32_t (*release_effect)(effect_handle_t handle);
-
-    ////////////////////////////////////////////////////////////////////////////////
-    //
-    //    Function:        get_descriptor
-    //
-    //    Description:    Returns the descriptor of the effect engine which implementation UUID is
-    //          given as argument.
-    //
-    //    Input/Output:
-    //          uuid:           pointer to the effect uuid.
-    //          pDescriptor:    address where to return the effect descriptor.
-    //
-    //    Output:
-    //        returned value:    0          successful operation.
-    //                          -ENODEV     library failed to initialize
-    //                          -EINVAL     invalid pDescriptor or uuid
-    //        *pDescriptor:     updated with the effect descriptor.
-    //
-    ////////////////////////////////////////////////////////////////////////////////
-    int32_t (*get_descriptor)(const effect_uuid_t* uuid, effect_descriptor_t* pDescriptor);
-} audio_effect_library_t;
-
-// Name of the hal_module_info
-#define AUDIO_EFFECT_LIBRARY_INFO_SYM AELI
-
-// Name of the hal_module_info as a string
-#define AUDIO_EFFECT_LIBRARY_INFO_SYM_AS_STR "AELI"
-
-__END_DECLS
-
-#endif  // ANDROID_AUDIO_EFFECT_H
diff --git a/audio/common/all-versions/legacy/include/hardware/audio_policy.h b/audio/common/all-versions/legacy/include/hardware/audio_policy.h
deleted file mode 100644
index 8cc79df..0000000
--- a/audio/common/all-versions/legacy/include/hardware/audio_policy.h
+++ /dev/null
@@ -1,391 +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_POLICY_INTERFACE_H
-#define ANDROID_AUDIO_POLICY_INTERFACE_H
-
-#include <stdint.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <hardware/hardware.h>
-
-#include <system/audio.h>
-#include <system/audio_policy.h>
-
-__BEGIN_DECLS
-
-/**
- * The id of this module
- */
-#define AUDIO_POLICY_HARDWARE_MODULE_ID "audio_policy"
-
-/**
- * Name of the audio devices to open
- */
-#define AUDIO_POLICY_INTERFACE "policy"
-
-/* ---------------------------------------------------------------------------- */
-
-/*
- * The audio_policy and audio_policy_service_ops structs define the
- * communication interfaces between the platform specific audio policy manager
- * and Android generic audio policy manager.
- * The platform specific audio policy manager must implement methods of the
- * audio_policy struct.
- * This implementation makes use of the audio_policy_service_ops to control
- * the activity and configuration of audio input and output streams.
- *
- * The platform specific audio policy manager is in charge of the audio
- * routing and volume control policies for a given platform.
- * The main roles of this module are:
- *   - keep track of current system state (removable device connections, phone
- *     state, user requests...).
- *   System state changes and user actions are notified to audio policy
- *   manager with methods of the audio_policy.
- *
- *   - process get_output() queries received when AudioTrack objects are
- *     created: Those queries return a handler on an output that has been
- *     selected, configured and opened by the audio policy manager and that
- *     must be used by the AudioTrack when registering to the AudioFlinger
- *     with the createTrack() method.
- *   When the AudioTrack object is released, a release_output() query
- *   is received and the audio policy manager can decide to close or
- *   reconfigure the output depending on other streams using this output and
- *   current system state.
- *
- *   - similarly process get_input() and release_input() queries received from
- *     AudioRecord objects and configure audio inputs.
- *   - process volume control requests: the stream volume is converted from
- *     an index value (received from UI) to a float value applicable to each
- *     output as a function of platform specific settings and current output
- *     route (destination device). It also make sure that streams are not
- *     muted if not allowed (e.g. camera shutter sound in some countries).
- */
-
-/* XXX: this should be defined OUTSIDE of frameworks/base */
-struct effect_descriptor_s;
-
-struct audio_policy {
-    /*
-     * configuration functions
-     */
-
-    /* indicate a change in device connection status */
-    int (*set_device_connection_state)(struct audio_policy* pol, audio_devices_t device,
-                                       audio_policy_dev_state_t state, const char* device_address);
-
-    /* retrieve a device connection status */
-    audio_policy_dev_state_t (*get_device_connection_state)(const struct audio_policy* pol,
-                                                            audio_devices_t device,
-                                                            const char* device_address);
-
-    /* indicate a change in phone state. Valid phones states are defined
-     * by audio_mode_t */
-    void (*set_phone_state)(struct audio_policy* pol, audio_mode_t state);
-
-    /* deprecated, never called (was "indicate a change in ringer mode") */
-    void (*set_ringer_mode)(struct audio_policy* pol, uint32_t mode, uint32_t mask);
-
-    /* force using a specific device category for the specified usage */
-    void (*set_force_use)(struct audio_policy* pol, audio_policy_force_use_t usage,
-                          audio_policy_forced_cfg_t config);
-
-    /* retrieve current device category forced for a given usage */
-    audio_policy_forced_cfg_t (*get_force_use)(const struct audio_policy* pol,
-                                               audio_policy_force_use_t usage);
-
-    /* if can_mute is true, then audio streams that are marked ENFORCED_AUDIBLE
-     * can still be muted. */
-    void (*set_can_mute_enforced_audible)(struct audio_policy* pol, bool can_mute);
-
-    /* check proper initialization */
-    int (*init_check)(const struct audio_policy* pol);
-
-    /*
-     * Audio routing query functions
-     */
-
-    /* request an output appropriate for playback of the supplied stream type and
-     * parameters */
-    audio_io_handle_t (*get_output)(struct audio_policy* pol, audio_stream_type_t stream,
-                                    uint32_t samplingRate, audio_format_t format,
-                                    audio_channel_mask_t channelMask, audio_output_flags_t flags,
-                                    const audio_offload_info_t* offloadInfo);
-
-    /* indicates to the audio policy manager that the output starts being used
-     * by corresponding stream. */
-    int (*start_output)(struct audio_policy* pol, audio_io_handle_t output,
-                        audio_stream_type_t stream, audio_session_t session);
-
-    /* indicates to the audio policy manager that the output stops being used
-     * by corresponding stream. */
-    int (*stop_output)(struct audio_policy* pol, audio_io_handle_t output,
-                       audio_stream_type_t stream, audio_session_t session);
-
-    /* releases the output. */
-    void (*release_output)(struct audio_policy* pol, audio_io_handle_t output);
-
-    /* request an input appropriate for record from the supplied device with
-     * supplied parameters. */
-    audio_io_handle_t (*get_input)(struct audio_policy* pol, audio_source_t inputSource,
-                                   uint32_t samplingRate, audio_format_t format,
-                                   audio_channel_mask_t channelMask,
-                                   audio_in_acoustics_t acoustics);
-
-    /* indicates to the audio policy manager that the input starts being used */
-    int (*start_input)(struct audio_policy* pol, audio_io_handle_t input);
-
-    /* indicates to the audio policy manager that the input stops being used. */
-    int (*stop_input)(struct audio_policy* pol, audio_io_handle_t input);
-
-    /* releases the input. */
-    void (*release_input)(struct audio_policy* pol, audio_io_handle_t input);
-
-    /*
-     * volume control functions
-     */
-
-    /* initialises stream volume conversion parameters by specifying volume
-     * index range. The index range for each stream is defined by AudioService. */
-    void (*init_stream_volume)(struct audio_policy* pol, audio_stream_type_t stream, int index_min,
-                               int index_max);
-
-    /* sets the new stream volume at a level corresponding to the supplied
-     * index. The index is within the range specified by init_stream_volume() */
-    int (*set_stream_volume_index)(struct audio_policy* pol, audio_stream_type_t stream, int index);
-
-    /* retrieve current volume index for the specified stream */
-    int (*get_stream_volume_index)(const struct audio_policy* pol, audio_stream_type_t stream,
-                                   int* index);
-
-    /* sets the new stream volume at a level corresponding to the supplied
-     * index for the specified device.
-     * The index is within the range specified by init_stream_volume() */
-    int (*set_stream_volume_index_for_device)(struct audio_policy* pol, audio_stream_type_t stream,
-                                              int index, audio_devices_t device);
-
-    /* retrieve current volume index for the specified stream for the specified device */
-    int (*get_stream_volume_index_for_device)(const struct audio_policy* pol,
-                                              audio_stream_type_t stream, int* index,
-                                              audio_devices_t device);
-
-    /* return the strategy corresponding to a given stream type */
-    uint32_t (*get_strategy_for_stream)(const struct audio_policy* pol, audio_stream_type_t stream);
-
-    /* return the enabled output devices for the given stream type */
-    audio_devices_t (*get_devices_for_stream)(const struct audio_policy* pol,
-                                              audio_stream_type_t stream);
-
-    /* Audio effect management */
-    audio_io_handle_t (*get_output_for_effect)(struct audio_policy* pol,
-                                               const struct effect_descriptor_s* desc);
-
-    int (*register_effect)(struct audio_policy* pol, const struct effect_descriptor_s* desc,
-                           audio_io_handle_t output, uint32_t strategy, audio_session_t session,
-                           int id);
-
-    int (*unregister_effect)(struct audio_policy* pol, int id);
-
-    int (*set_effect_enabled)(struct audio_policy* pol, int id, bool enabled);
-
-    bool (*is_stream_active)(const struct audio_policy* pol, audio_stream_type_t stream,
-                             uint32_t in_past_ms);
-
-    bool (*is_stream_active_remotely)(const struct audio_policy* pol, audio_stream_type_t stream,
-                                      uint32_t in_past_ms);
-
-    bool (*is_source_active)(const struct audio_policy* pol, audio_source_t source);
-
-    /* dump state */
-    int (*dump)(const struct audio_policy* pol, int fd);
-
-    /* check if offload is possible for given sample rate, bitrate, duration, ... */
-    bool (*is_offload_supported)(const struct audio_policy* pol, const audio_offload_info_t* info);
-};
-
-struct audio_policy_service_ops {
-    /*
-     * Audio output Control functions
-     */
-
-    /* Opens an audio output with the requested parameters.
-     *
-     * The parameter values can indicate to use the default values in case the
-     * audio policy manager has no specific requirements for the output being
-     * opened.
-     *
-     * When the function returns, the parameter values reflect the actual
-     * values used by the audio hardware output stream.
-     *
-     * The audio policy manager can check if the proposed parameters are
-     * suitable or not and act accordingly.
-     */
-    audio_io_handle_t (*open_output)(void* service, audio_devices_t* pDevices,
-                                     uint32_t* pSamplingRate, audio_format_t* pFormat,
-                                     audio_channel_mask_t* pChannelMask, uint32_t* pLatencyMs,
-                                     audio_output_flags_t flags);
-
-    /* creates a special output that is duplicated to the two outputs passed as
-     * arguments. The duplication is performed by
-     * a special mixer thread in the AudioFlinger.
-     */
-    audio_io_handle_t (*open_duplicate_output)(void* service, audio_io_handle_t output1,
-                                               audio_io_handle_t output2);
-
-    /* closes the output stream */
-    int (*close_output)(void* service, audio_io_handle_t output);
-
-    /* suspends the output.
-     *
-     * When an output is suspended, the corresponding audio hardware output
-     * stream is placed in standby and the AudioTracks attached to the mixer
-     * thread are still processed but the output mix is discarded.
-     */
-    int (*suspend_output)(void* service, audio_io_handle_t output);
-
-    /* restores a suspended output. */
-    int (*restore_output)(void* service, audio_io_handle_t output);
-
-    /* */
-    /* Audio input Control functions */
-    /* */
-
-    /* opens an audio input
-     * deprecated - new implementations should use open_input_on_module,
-     * and the acoustics parameter is ignored
-     */
-    audio_io_handle_t (*open_input)(void* service, audio_devices_t* pDevices,
-                                    uint32_t* pSamplingRate, audio_format_t* pFormat,
-                                    audio_channel_mask_t* pChannelMask,
-                                    audio_in_acoustics_t acoustics);
-
-    /* closes an audio input */
-    int (*close_input)(void* service, audio_io_handle_t input);
-
-    /* */
-    /* misc control functions */
-    /* */
-
-    /* set a stream volume for a particular output.
-     *
-     * For the same user setting, a given stream type can have different
-     * volumes for each output (destination device) it is attached to.
-     */
-    int (*set_stream_volume)(void* service, audio_stream_type_t stream, float volume,
-                             audio_io_handle_t output, int delay_ms);
-
-    /* invalidate a stream type, causing a reroute to an unspecified new output */
-    int (*invalidate_stream)(void* service, audio_stream_type_t stream);
-
-    /* function enabling to send proprietary informations directly from audio
-     * policy manager to audio hardware interface. */
-    void (*set_parameters)(void* service, audio_io_handle_t io_handle, const char* kv_pairs,
-                           int delay_ms);
-
-    /* function enabling to receive proprietary informations directly from
-     * audio hardware interface to audio policy manager.
-     *
-     * Returns a pointer to a heap allocated string. The caller is responsible
-     * for freeing the memory for it using free().
-     */
-
-    char* (*get_parameters)(void* service, audio_io_handle_t io_handle, const char* keys);
-
-    /* request the playback of a tone on the specified stream.
-     * used for instance to replace notification sounds when playing over a
-     * telephony device during a phone call.
-     */
-    int (*start_tone)(void* service, audio_policy_tone_t tone, audio_stream_type_t stream);
-
-    int (*stop_tone)(void* service);
-
-    /* set down link audio volume. */
-    int (*set_voice_volume)(void* service, float volume, int delay_ms);
-
-    /* move effect to the specified output */
-    int (*move_effects)(void* service, audio_session_t session, audio_io_handle_t src_output,
-                        audio_io_handle_t dst_output);
-
-    /* loads an audio hw module.
-     *
-     * The module name passed is the base name of the HW module library, e.g "primary" or "a2dp".
-     * The function returns a handle on the module that will be used to specify a particular
-     * module when calling open_output_on_module() or open_input_on_module()
-     */
-    audio_module_handle_t (*load_hw_module)(void* service, const char* name);
-
-    /* Opens an audio output on a particular HW module.
-     *
-     * Same as open_output() but specifying a specific HW module on which the output must be opened.
-     */
-    audio_io_handle_t (*open_output_on_module)(void* service, audio_module_handle_t module,
-                                               audio_devices_t* pDevices, uint32_t* pSamplingRate,
-                                               audio_format_t* pFormat,
-                                               audio_channel_mask_t* pChannelMask,
-                                               uint32_t* pLatencyMs, audio_output_flags_t flags,
-                                               const audio_offload_info_t* offloadInfo);
-
-    /* Opens an audio input on a particular HW module.
-     *
-     * Same as open_input() but specifying a specific HW module on which the input must be opened.
-     * Also removed deprecated acoustics parameter
-     */
-    audio_io_handle_t (*open_input_on_module)(void* service, audio_module_handle_t module,
-                                              audio_devices_t* pDevices, uint32_t* pSamplingRate,
-                                              audio_format_t* pFormat,
-                                              audio_channel_mask_t* pChannelMask);
-};
-
-/**********************************************************************/
-
-/**
- * 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.
- */
-typedef struct audio_policy_module { struct hw_module_t common; } audio_policy_module_t;
-
-struct audio_policy_device {
-    /**
-     * Common methods of the audio policy device.  This *must* be the first member of
-     * audio_policy_device as users of this structure will cast a hw_device_t to
-     * audio_policy_device pointer in contexts where it's known the hw_device_t references an
-     * audio_policy_device.
-     */
-    struct hw_device_t common;
-
-    int (*create_audio_policy)(const struct audio_policy_device* device,
-                               struct audio_policy_service_ops* aps_ops, void* service,
-                               struct audio_policy** ap);
-
-    int (*destroy_audio_policy)(const struct audio_policy_device* device, struct audio_policy* ap);
-};
-
-/** convenience API for opening and closing a supported device */
-
-static inline int audio_policy_dev_open(const hw_module_t* module,
-                                        struct audio_policy_device** device) {
-    return module->methods->open(module, AUDIO_POLICY_INTERFACE, (hw_device_t**)device);
-}
-
-static inline int audio_policy_dev_close(struct audio_policy_device* device) {
-    return device->common.close(&device->common);
-}
-
-__END_DECLS
-
-#endif  // ANDROID_AUDIO_POLICY_INTERFACE_H
diff --git a/audio/common/all-versions/legacy/include/system/audio.h b/audio/common/all-versions/legacy/include/system/audio.h
deleted file mode 100644
index 7afa6c4..0000000
--- a/audio/common/all-versions/legacy/include/system/audio.h
+++ /dev/null
@@ -1,1038 +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_CORE_H
-#define ANDROID_AUDIO_CORE_H
-
-#include <stdbool.h>
-#include <stdint.h>
-#include <stdio.h>
-#include <sys/cdefs.h>
-#include <sys/types.h>
-
-#include <cutils/bitops.h>
-
-#include "system/audio-base.h"
-
-__BEGIN_DECLS
-
-/* The enums were moved here mostly from
- * frameworks/base/include/media/AudioSystem.h
- */
-
-/* represents an invalid uid for tracks; the calling or client uid is often substituted. */
-#define AUDIO_UID_INVALID ((uid_t)-1)
-
-/* device address used to refer to the standard remote submix */
-#define AUDIO_REMOTE_SUBMIX_DEVICE_ADDRESS "0"
-
-/* AudioFlinger and AudioPolicy services use I/O handles to identify audio sources and sinks */
-typedef int audio_io_handle_t;
-
-/* Do not change these values without updating their counterparts
- * in frameworks/base/media/java/android/media/AudioAttributes.java
- */
-typedef enum {
-    AUDIO_CONTENT_TYPE_UNKNOWN = 0,
-    AUDIO_CONTENT_TYPE_SPEECH = 1,
-    AUDIO_CONTENT_TYPE_MUSIC = 2,
-    AUDIO_CONTENT_TYPE_MOVIE = 3,
-    AUDIO_CONTENT_TYPE_SONIFICATION = 4,
-
-    AUDIO_CONTENT_TYPE_CNT,
-    AUDIO_CONTENT_TYPE_MAX = AUDIO_CONTENT_TYPE_CNT - 1,
-} audio_content_type_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
- */
-enum {
-    AUDIO_FLAG_NONE = 0x0,
-    AUDIO_FLAG_AUDIBILITY_ENFORCED = 0x1,
-    AUDIO_FLAG_SECURE = 0x2,
-    AUDIO_FLAG_SCO = 0x4,
-    AUDIO_FLAG_BEACON = 0x8,
-    AUDIO_FLAG_HW_AV_SYNC = 0x10,
-    AUDIO_FLAG_HW_HOTWORD = 0x20,
-    AUDIO_FLAG_BYPASS_INTERRUPTION_POLICY = 0x40,
-    AUDIO_FLAG_BYPASS_MUTE = 0x80,
-    AUDIO_FLAG_LOW_LATENCY = 0x100,
-    AUDIO_FLAG_DEEP_BUFFER = 0x200,
-};
-
-/* Audio attributes */
-#define AUDIO_ATTRIBUTES_TAGS_MAX_SIZE 256
-typedef struct {
-    audio_content_type_t content_type;
-    audio_usage_t usage;
-    audio_source_t source;
-    audio_flags_mask_t flags;
-    char tags[AUDIO_ATTRIBUTES_TAGS_MAX_SIZE]; /* UTF8 */
-} __attribute__((packed)) audio_attributes_t;  // sent through Binder;
-
-/* a unique ID allocated by AudioFlinger for use as an audio_io_handle_t, audio_session_t,
- * effect ID (int), audio_module_handle_t, and audio_patch_handle_t.
- * Audio port IDs (audio_port_handle_t) are allocated by AudioPolicy
- * in a different namespace than AudioFlinger unique IDs.
- */
-typedef int audio_unique_id_t;
-
-/* Possible uses for an audio_unique_id_t */
-typedef enum {
-    AUDIO_UNIQUE_ID_USE_UNSPECIFIED = 0,
-    AUDIO_UNIQUE_ID_USE_SESSION = 1,  // for allocated sessions, not special AUDIO_SESSION_*
-    AUDIO_UNIQUE_ID_USE_MODULE = 2,
-    AUDIO_UNIQUE_ID_USE_EFFECT = 3,
-    AUDIO_UNIQUE_ID_USE_PATCH = 4,
-    AUDIO_UNIQUE_ID_USE_OUTPUT = 5,
-    AUDIO_UNIQUE_ID_USE_INPUT = 6,
-    AUDIO_UNIQUE_ID_USE_PLAYER = 7,
-    AUDIO_UNIQUE_ID_USE_MAX = 8,  // must be a power-of-two
-    AUDIO_UNIQUE_ID_USE_MASK = AUDIO_UNIQUE_ID_USE_MAX - 1
-} audio_unique_id_use_t;
-
-/* Return the use of an audio_unique_id_t */
-static inline audio_unique_id_use_t audio_unique_id_get_use(audio_unique_id_t id) {
-    return (audio_unique_id_use_t)(id & AUDIO_UNIQUE_ID_USE_MASK);
-}
-
-/* Reserved audio_unique_id_t values.  FIXME: not a complete list. */
-#define AUDIO_UNIQUE_ID_ALLOCATE AUDIO_SESSION_ALLOCATE
-
-/* 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.
- *
- * audio_channel_mask_t is an opaque type and its internal layout should not
- * be assumed as it may change in the future.
- * Instead, always use the functions declared in this header to examine.
- *
- * These are the current representations:
- *
- *   AUDIO_CHANNEL_REPRESENTATION_POSITION
- *     is a channel mask representation for position assignment.
- *     Each low-order bit corresponds to the spatial position of a transducer (output),
- *     or interpretation of channel (input).
- *     The user of a channel mask needs to know the context of whether it is for output or input.
- *     The constants AUDIO_CHANNEL_OUT_* or AUDIO_CHANNEL_IN_* apply to the bits portion.
- *     It is not permitted for no bits to be set.
- *
- *   AUDIO_CHANNEL_REPRESENTATION_INDEX
- *     is a channel mask representation for index assignment.
- *     Each low-order bit corresponds to a selected channel.
- *     There is no platform interpretation of the various bits.
- *     There is no concept of output or input.
- *     It is not permitted for no bits to be set.
- *
- * All other representations are reserved for future use.
- *
- * Warning: current representation distinguishes between input and output, but this will not the be
- * case in future revisions of the platform. Wherever there is an ambiguity between input and output
- * 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
-
-/* The return value is undefined if the channel mask is invalid. */
-static inline uint32_t audio_channel_mask_get_bits(audio_channel_mask_t channel) {
-    return channel & ((1 << AUDIO_CHANNEL_COUNT_MAX) - 1);
-}
-
-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(
-    audio_channel_mask_t channel) {
-    // The right shift should be sufficient, but also "and" for safety in case mask is not 32 bits
-    return (audio_channel_representation_t)((channel >> AUDIO_CHANNEL_COUNT_MAX) &
-                                            ((1 << AUDIO_CHANNEL_REPRESENTATION_LOG2) - 1));
-}
-
-/* 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
- * is invalid because an output mask has an invalid output bit set,
- * or because an input mask has an invalid input bit set.
- * All other APIs that take a channel mask assume that it is valid.
- */
-static inline bool audio_channel_mask_is_valid(audio_channel_mask_t channel) {
-    uint32_t bits = audio_channel_mask_get_bits(channel);
-    audio_channel_representation_t representation = audio_channel_mask_get_representation(channel);
-    switch (representation) {
-        case AUDIO_CHANNEL_REPRESENTATION_POSITION:
-        case AUDIO_CHANNEL_REPRESENTATION_INDEX:
-            break;
-        default:
-            bits = 0;
-            break;
-    }
-    return bits != 0;
-}
-
-/* Not part of public API */
-static inline audio_channel_mask_t audio_channel_mask_from_representation_and_bits(
-    audio_channel_representation_t representation, uint32_t bits) {
-    return (audio_channel_mask_t)((representation << AUDIO_CHANNEL_COUNT_MAX) | bits);
-}
-
-/* This enum is deprecated */
-typedef enum {
-    AUDIO_IN_ACOUSTICS_NONE = 0,
-    AUDIO_IN_ACOUSTICS_AGC_ENABLE = 0x0001,
-    AUDIO_IN_ACOUSTICS_AGC_DISABLE = 0,
-    AUDIO_IN_ACOUSTICS_NS_ENABLE = 0x0002,
-    AUDIO_IN_ACOUSTICS_NS_DISABLE = 0,
-    AUDIO_IN_ACOUSTICS_TX_IIR_ENABLE = 0x0004,
-    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
- * one of the constants defined here.
- * Must be aligned to transmit as raw memory through Binder.
- */
-typedef struct {
-    uint16_t version;                   // version of the info structure
-    uint16_t size;                      // total size of the structure including version and size
-    uint32_t sample_rate;               // sample rate in Hz
-    audio_channel_mask_t channel_mask;  // channel mask
-    audio_format_t format;              // audio format
-    audio_stream_type_t stream_type;    // stream type
-    uint32_t bit_rate;                  // bit rate in bits per second
-    int64_t duration_us;                // duration in microseconds, -1 if unknown
-    bool has_video;                     // true if stream is tied to a video stream
-    bool is_streaming;                  // true if streaming, false if local playback
-    uint32_t bit_width;
-    uint32_t offload_buffer_size;  // offload fragment size
-    audio_usage_t usage;
-} __attribute__((aligned(8))) audio_offload_info_t;
-
-#define AUDIO_MAKE_OFFLOAD_INFO_VERSION(maj, min) ((((maj)&0xff) << 8) | ((min)&0xff))
-
-#define AUDIO_OFFLOAD_INFO_VERSION_0_1 AUDIO_MAKE_OFFLOAD_INFO_VERSION(0, 1)
-#define AUDIO_OFFLOAD_INFO_VERSION_CURRENT AUDIO_OFFLOAD_INFO_VERSION_0_1
-
-static const audio_offload_info_t AUDIO_INFO_INITIALIZER = {
-    /* .version = */ AUDIO_OFFLOAD_INFO_VERSION_CURRENT,
-    /* .size = */ sizeof(audio_offload_info_t),
-    /* .sample_rate = */ 0,
-    /* .channel_mask = */ 0,
-    /* .format = */ AUDIO_FORMAT_DEFAULT,
-    /* .stream_type = */ AUDIO_STREAM_VOICE_CALL,
-    /* .bit_rate = */ 0,
-    /* .duration_us = */ 0,
-    /* .has_video = */ false,
-    /* .is_streaming = */ false,
-    /* .bit_width = */ 16,
-    /* .offload_buffer_size = */ 0,
-    /* .usage = */ AUDIO_USAGE_UNKNOWN};
-
-/* common audio stream configuration parameters
- * You should memset() the entire structure to zero before use to
- * ensure forward compatibility
- * Must be aligned to transmit as raw memory through Binder.
- */
-struct __attribute__((aligned(8))) audio_config {
-    uint32_t sample_rate;
-    audio_channel_mask_t channel_mask;
-    audio_format_t format;
-    audio_offload_info_t offload_info;
-    uint32_t frame_count;
-};
-typedef struct audio_config audio_config_t;
-
-static const audio_config_t AUDIO_CONFIG_INITIALIZER = {
-    /* .sample_rate = */ 0,
-    /* .channel_mask = */ AUDIO_CHANNEL_NONE,
-    /* .format = */ AUDIO_FORMAT_DEFAULT,
-    /* .offload_info = */
-    {/* .version = */ AUDIO_OFFLOAD_INFO_VERSION_CURRENT,
-     /* .size = */ sizeof(audio_offload_info_t),
-     /* .sample_rate = */ 0,
-     /* .channel_mask = */ 0,
-     /* .format = */ AUDIO_FORMAT_DEFAULT,
-     /* .stream_type = */ AUDIO_STREAM_VOICE_CALL,
-     /* .bit_rate = */ 0,
-     /* .duration_us = */ 0,
-     /* .has_video = */ false,
-     /* .is_streaming = */ false,
-     /* .bit_width = */ 16,
-     /* .offload_buffer_size = */ 0,
-     /* .usage = */ AUDIO_USAGE_UNKNOWN},
-    /* .frame_count = */ 0,
-};
-
-struct audio_config_base {
-    uint32_t sample_rate;
-    audio_channel_mask_t channel_mask;
-    audio_format_t format;
-};
-
-typedef struct audio_config_base audio_config_base_t;
-
-static const audio_config_base_t AUDIO_CONFIG_BASE_INITIALIZER = {
-    /* .sample_rate = */ 0,
-    /* .channel_mask = */ AUDIO_CHANNEL_NONE,
-    /* .format = */ AUDIO_FORMAT_DEFAULT};
-
-/* audio hw module handle functions or structures referencing a module */
-typedef int audio_module_handle_t;
-
-/******************************
- *  Volume control
- *****************************/
-
-/** 3 dB headroom are allowed on float samples (3db = 10^(3/20) = 1.412538).
- * See: https://developer.android.com/reference/android/media/AudioTrack.html#write(float[], int,
- * int, int)
- */
-#define FLOAT_NOMINAL_RANGE_HEADROOM 1.412538
-
-/* If the audio hardware supports gain control on some audio paths,
- * the platform can expose them in the audio_policy.conf file. The audio HAL
- * 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 {
-    audio_gain_mode_t mode;            /* e.g. AUDIO_GAIN_MODE_JOINT */
-    audio_channel_mask_t channel_mask; /* channels which gain an be controlled.
-                                          N/A if AUDIO_GAIN_MODE_CHANNELS is not supported */
-    int min_value;                     /* minimum gain value in millibels */
-    int max_value;                     /* maximum gain value in millibels */
-    int default_value;                 /* default gain value in millibels */
-    unsigned int step_value;           /* gain step in millibels */
-    unsigned int min_ramp_ms;          /* minimum ramp duration in ms */
-    unsigned int max_ramp_ms;          /* maximum ramp duration in ms */
-};
-
-/* The gain configuration structure is used to get or set the gain values of a
- * given port */
-struct audio_gain_config {
-    int index;                         /* index of the corresponding audio_gain in the
-                                          audio_port gains[] table */
-    audio_gain_mode_t mode;            /* mode requested for this command */
-    audio_channel_mask_t channel_mask; /* channels which gain value follows.
-                                          N/A in joint mode */
-
-    // note this "8" is not FCC_8, so it won't need to be changed for > 8 channels
-    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 popcount(channel_mask) */
-    unsigned int ramp_duration_ms;                /* ramp duration in ms */
-};
-
-/******************************
- *  Routing control
- *****************************/
-
-/* Types defined here are used to describe an audio source or sink at internal
- * framework interfaces (audio policy, patch panel) or at the audio HAL.
- * Sink and sources are grouped in a concept of “audio port” representing an
- * audio end point at the edge of the system managed by the module exposing
- * the interface. */
-
-/* Each port has a unique ID or handle allocated by policy manager */
-typedef int audio_port_handle_t;
-
-/* the maximum length for the human-readable device name */
-#define AUDIO_PORT_MAX_NAME_LEN 128
-
-/* maximum audio device address length */
-#define AUDIO_DEVICE_MAX_ADDRESS_LEN 32
-
-/* extension for audio port configuration structure when the audio port is a
- * hardware device */
-struct audio_port_config_device_ext {
-    audio_module_handle_t hw_module;            /* module the device is attached to */
-    audio_devices_t type;                       /* device type (e.g AUDIO_DEVICE_OUT_SPEAKER) */
-    char address[AUDIO_DEVICE_MAX_ADDRESS_LEN]; /* device address. "" if N/A */
-};
-
-/* extension for audio port configuration structure when the audio port is a
- * sub mix */
-struct audio_port_config_mix_ext {
-    audio_module_handle_t hw_module; /* module the stream is attached to */
-    audio_io_handle_t handle;        /* I/O handle of the input/output stream */
-    union {
-        // TODO: change use case for output streams: use strategy and mixer attributes
-        audio_stream_type_t stream;
-        audio_source_t source;
-    } usecase;
-};
-
-/* extension for audio port configuration structure when the audio port is an
- * audio session */
-struct audio_port_config_session_ext {
-    audio_session_t session; /* audio session */
-};
-
-/* audio port configuration structure used to specify a particular configuration of
- * an audio port */
-struct audio_port_config {
-    audio_port_handle_t id;            /* port unique ID */
-    audio_port_role_t role;            /* sink or source */
-    audio_port_type_t type;            /* device, mix ... */
-    unsigned int config_mask;          /* e.g AUDIO_PORT_CONFIG_ALL */
-    unsigned int sample_rate;          /* sampling rate in Hz */
-    audio_channel_mask_t channel_mask; /* channel mask if applicable */
-    audio_format_t format;             /* format if applicable */
-    struct audio_gain_config gain;     /* gain to apply if applicable */
-    union {
-        struct audio_port_config_device_ext device;   /* device specific info */
-        struct audio_port_config_mix_ext mix;         /* mix specific info */
-        struct audio_port_config_session_ext session; /* session specific info */
-    } ext;
-};
-
-/* max number of sampling rates in audio port */
-#define AUDIO_PORT_MAX_SAMPLING_RATES 32
-/* max number of channel masks in audio port */
-#define AUDIO_PORT_MAX_CHANNEL_MASKS 32
-/* max number of audio formats in audio port */
-#define AUDIO_PORT_MAX_FORMATS 32
-/* max number of gain controls in audio port */
-#define AUDIO_PORT_MAX_GAINS 16
-
-/* extension for audio port structure when the audio port is a hardware device */
-struct audio_port_device_ext {
-    audio_module_handle_t hw_module; /* module the device is attached to */
-    audio_devices_t type;            /* device type (e.g AUDIO_DEVICE_OUT_SPEAKER) */
-    char address[AUDIO_DEVICE_MAX_ADDRESS_LEN];
-};
-
-/* extension for audio port structure when the audio port is a sub mix */
-struct audio_port_mix_ext {
-    audio_module_handle_t hw_module;         /* module the stream is attached to */
-    audio_io_handle_t handle;                /* I/O handle of the input.output stream */
-    audio_mix_latency_class_t latency_class; /* latency class */
-    // other attributes: routing strategies
-};
-
-/* extension for audio port structure when the audio port is an audio session */
-struct audio_port_session_ext {
-    audio_session_t session; /* audio session */
-};
-
-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 ... */
-    char name[AUDIO_PORT_MAX_NAME_LEN];
-    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];
-    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 */
-    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;
-};
-
-/* 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.
- * Each patch is identified by a handle at the interface used to create that patch. For instance,
- * when a patch is created by the audio HAL, the HAL allocates and returns a handle.
- * This handle is unique to a given audio HAL hardware module.
- * But the same patch receives another system wide unique handle allocated by the framework.
- * This unique handle is used for all transactions inside the framework.
- */
-typedef int audio_patch_handle_t;
-
-#define AUDIO_PATCH_PORTS_MAX 16
-
-struct audio_patch {
-    audio_patch_handle_t id;  /* patch unique ID */
-    unsigned int num_sources; /* number of sources in following array */
-    struct audio_port_config sources[AUDIO_PATCH_PORTS_MAX];
-    unsigned int num_sinks; /* number of sinks in following array */
-    struct audio_port_config sinks[AUDIO_PATCH_PORTS_MAX];
-};
-
-/* a HW synchronization source returned by the audio HAL */
-typedef uint32_t audio_hw_sync_t;
-
-/* an invalid HW synchronization source indicating an error */
-#define AUDIO_HW_SYNC_INVALID 0
-
-/**
- * Mmap buffer descriptor returned by audio_stream->create_mmap_buffer().
- * note\ Used by streams opened in mmap mode.
- */
-struct audio_mmap_buffer_info {
-    void* shared_memory_address; /**< base address of mmap memory buffer.
-                                      For use by local process only */
-    int32_t shared_memory_fd;    /**< FD for mmap memory buffer */
-    int32_t buffer_size_frames;  /**< total buffer size in frames */
-    int32_t burst_size_frames;   /**< transfer size granularity in frames */
-};
-
-/**
- * Mmap buffer read/write position returned by audio_stream->get_mmap_position().
- * note\ Used by streams opened in mmap mode.
- */
-struct audio_mmap_position {
-    int64_t time_nanoseconds; /**< timestamp in ns, CLOCK_MONOTONIC */
-    int32_t position_frames;  /**< increasing 32 bit frame count reset when stream->stop()
-                                   is called */
-};
-
-static inline bool audio_is_output_device(audio_devices_t device) {
-    if (((device & AUDIO_DEVICE_BIT_IN) == 0) && (popcount(device) == 1) &&
-        ((device & ~AUDIO_DEVICE_OUT_ALL) == 0))
-        return true;
-    else
-        return false;
-}
-
-static inline bool audio_is_input_device(audio_devices_t device) {
-    if ((device & AUDIO_DEVICE_BIT_IN) != 0) {
-        device &= ~AUDIO_DEVICE_BIT_IN;
-        if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_IN_ALL) == 0)) return true;
-    }
-    return false;
-}
-
-static inline bool audio_is_output_devices(audio_devices_t device) {
-    return (device & AUDIO_DEVICE_BIT_IN) == 0;
-}
-
-static inline bool audio_is_a2dp_in_device(audio_devices_t device) {
-    if ((device & AUDIO_DEVICE_BIT_IN) != 0) {
-        device &= ~AUDIO_DEVICE_BIT_IN;
-        if ((popcount(device) == 1) && (device & AUDIO_DEVICE_IN_BLUETOOTH_A2DP)) return true;
-    }
-    return false;
-}
-
-static inline bool audio_is_a2dp_out_device(audio_devices_t device) {
-    if ((popcount(device) == 1) && (device & AUDIO_DEVICE_OUT_ALL_A2DP))
-        return true;
-    else
-        return false;
-}
-
-// Deprecated - use audio_is_a2dp_out_device() instead
-static inline bool audio_is_a2dp_device(audio_devices_t device) {
-    return audio_is_a2dp_out_device(device);
-}
-
-static inline bool audio_is_bluetooth_sco_device(audio_devices_t device) {
-    if ((device & AUDIO_DEVICE_BIT_IN) == 0) {
-        if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_OUT_ALL_SCO) == 0)) return true;
-    } else {
-        device &= ~AUDIO_DEVICE_BIT_IN;
-        if ((popcount(device) == 1) && ((device & ~AUDIO_DEVICE_IN_BLUETOOTH_SCO_HEADSET) == 0))
-            return true;
-    }
-
-    return false;
-}
-
-static inline bool audio_is_usb_out_device(audio_devices_t device) {
-    return ((popcount(device) == 1) && (device & AUDIO_DEVICE_OUT_ALL_USB));
-}
-
-static inline bool audio_is_usb_in_device(audio_devices_t device) {
-    if ((device & AUDIO_DEVICE_BIT_IN) != 0) {
-        device &= ~AUDIO_DEVICE_BIT_IN;
-        if (popcount(device) == 1 && (device & AUDIO_DEVICE_IN_ALL_USB) != 0) return true;
-    }
-    return false;
-}
-
-/* OBSOLETE - use audio_is_usb_out_device() instead. */
-static inline bool audio_is_usb_device(audio_devices_t device) {
-    return audio_is_usb_out_device(device);
-}
-
-static inline bool audio_is_remote_submix_device(audio_devices_t device) {
-    if ((audio_is_output_devices(device) &&
-         (device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX) == AUDIO_DEVICE_OUT_REMOTE_SUBMIX) ||
-        (!audio_is_output_devices(device) &&
-         (device & AUDIO_DEVICE_IN_REMOTE_SUBMIX) == AUDIO_DEVICE_IN_REMOTE_SUBMIX))
-        return true;
-    else
-        return false;
-}
-
-/* Returns true if:
- *  representation is valid, and
- *  there is at least one channel bit set which _could_ correspond to an input channel, and
- *  there are no channel bits set which could _not_ correspond to an input channel.
- * Otherwise returns false.
- */
-static inline bool audio_is_input_channel(audio_channel_mask_t channel) {
-    uint32_t bits = audio_channel_mask_get_bits(channel);
-    switch (audio_channel_mask_get_representation(channel)) {
-        case AUDIO_CHANNEL_REPRESENTATION_POSITION:
-            if (bits & ~AUDIO_CHANNEL_IN_ALL) {
-                bits = 0;
-            }
-        // fall through
-        case AUDIO_CHANNEL_REPRESENTATION_INDEX:
-            return bits != 0;
-        default:
-            return false;
-    }
-}
-
-/* Returns true if:
- *  representation is valid, and
- *  there is at least one channel bit set which _could_ correspond to an output channel, and
- *  there are no channel bits set which could _not_ correspond to an output channel.
- * Otherwise returns false.
- */
-static inline bool audio_is_output_channel(audio_channel_mask_t channel) {
-    uint32_t bits = audio_channel_mask_get_bits(channel);
-    switch (audio_channel_mask_get_representation(channel)) {
-        case AUDIO_CHANNEL_REPRESENTATION_POSITION:
-            if (bits & ~AUDIO_CHANNEL_OUT_ALL) {
-                bits = 0;
-            }
-        // fall through
-        case AUDIO_CHANNEL_REPRESENTATION_INDEX:
-            return bits != 0;
-        default:
-            return false;
-    }
-}
-
-/* Returns the number of channels from an input channel mask,
- * used in the context of audio input or recording.
- * If a channel bit is set which could _not_ correspond to an input channel,
- * it is excluded from the count.
- * Returns zero if the representation is invalid.
- */
-static inline uint32_t audio_channel_count_from_in_mask(audio_channel_mask_t channel) {
-    uint32_t bits = audio_channel_mask_get_bits(channel);
-    switch (audio_channel_mask_get_representation(channel)) {
-        case AUDIO_CHANNEL_REPRESENTATION_POSITION:
-            // TODO: We can now merge with from_out_mask and remove anding
-            bits &= AUDIO_CHANNEL_IN_ALL;
-        // fall through
-        case AUDIO_CHANNEL_REPRESENTATION_INDEX:
-            return popcount(bits);
-        default:
-            return 0;
-    }
-}
-
-/* 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,
- * it is excluded from the count.
- * Returns zero if the representation is invalid.
- */
-static inline uint32_t audio_channel_count_from_out_mask(audio_channel_mask_t channel) {
-    uint32_t bits = audio_channel_mask_get_bits(channel);
-    switch (audio_channel_mask_get_representation(channel)) {
-        case AUDIO_CHANNEL_REPRESENTATION_POSITION:
-            // TODO: We can now merge with from_in_mask and remove anding
-            bits &= AUDIO_CHANNEL_OUT_ALL;
-        // fall through
-        case AUDIO_CHANNEL_REPRESENTATION_INDEX:
-            return popcount(bits);
-        default:
-            return 0;
-    }
-}
-
-/* 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,
- * or AUDIO_CHANNEL_INVALID if the channel count exceeds AUDIO_CHANNEL_COUNT_MAX.
- */
-static inline audio_channel_mask_t audio_channel_mask_for_index_assignment_from_count(
-    uint32_t channel_count) {
-    if (channel_count == 0) {
-        return AUDIO_CHANNEL_NONE;
-    }
-    if (channel_count > AUDIO_CHANNEL_COUNT_MAX) {
-        return AUDIO_CHANNEL_INVALID;
-    }
-    uint32_t bits = (1 << channel_count) - 1;
-    return audio_channel_mask_from_representation_and_bits(AUDIO_CHANNEL_REPRESENTATION_INDEX,
-                                                           bits);
-}
-
-/* Derive an output channel mask for position assignment from a channel count.
- * This is to be used when the content channel mask is unknown. The 1, 2, 4, 5, 6, 7 and 8 channel
- * cases are mapped to the standard game/home-theater layouts, but note that 4 is mapped to quad,
- * and not stereo + FC + mono surround. A channel count of 3 is arbitrarily mapped to stereo + FC
- * for continuity with stereo.
- * Returns the matching channel mask,
- * or AUDIO_CHANNEL_NONE if the channel count is zero,
- * or AUDIO_CHANNEL_INVALID if the channel count exceeds that of the
- * configurations for which a default output channel mask is defined.
- */
-static inline audio_channel_mask_t audio_channel_out_mask_from_count(uint32_t channel_count) {
-    uint32_t bits;
-    switch (channel_count) {
-        case 0:
-            return AUDIO_CHANNEL_NONE;
-        case 1:
-            bits = AUDIO_CHANNEL_OUT_MONO;
-            break;
-        case 2:
-            bits = AUDIO_CHANNEL_OUT_STEREO;
-            break;
-        case 3:
-            bits = AUDIO_CHANNEL_OUT_STEREO | AUDIO_CHANNEL_OUT_FRONT_CENTER;
-            break;
-        case 4:  // 4.0
-            bits = AUDIO_CHANNEL_OUT_QUAD;
-            break;
-        case 5:  // 5.0
-            bits = AUDIO_CHANNEL_OUT_QUAD | AUDIO_CHANNEL_OUT_FRONT_CENTER;
-            break;
-        case 6:  // 5.1
-            bits = AUDIO_CHANNEL_OUT_5POINT1;
-            break;
-        case 7:  // 6.1
-            bits = AUDIO_CHANNEL_OUT_5POINT1 | AUDIO_CHANNEL_OUT_BACK_CENTER;
-            break;
-        case 8:
-            bits = AUDIO_CHANNEL_OUT_7POINT1;
-            break;
-        // FIXME FCC_8
-        default:
-            return AUDIO_CHANNEL_INVALID;
-    }
-    return audio_channel_mask_from_representation_and_bits(AUDIO_CHANNEL_REPRESENTATION_POSITION,
-                                                           bits);
-}
-
-/* Derive a default input channel mask from a channel count.
- * Assumes a position mask for mono and stereo, or an index mask for channel counts > 2.
- * Returns the matching channel mask,
- * or AUDIO_CHANNEL_NONE if the channel count is zero,
- * or AUDIO_CHANNEL_INVALID if the channel count exceeds that of the
- * configurations for which a default input channel mask is defined.
- */
-static inline audio_channel_mask_t audio_channel_in_mask_from_count(uint32_t channel_count) {
-    uint32_t bits;
-    switch (channel_count) {
-        case 0:
-            return AUDIO_CHANNEL_NONE;
-        case 1:
-            bits = AUDIO_CHANNEL_IN_MONO;
-            break;
-        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:
-            return AUDIO_CHANNEL_INVALID;
-    }
-    return audio_channel_mask_from_representation_and_bits(AUDIO_CHANNEL_REPRESENTATION_POSITION,
-                                                           bits);
-}
-
-static inline bool audio_is_valid_format(audio_format_t format) {
-    switch (format & AUDIO_FORMAT_MAIN_MASK) {
-        case AUDIO_FORMAT_PCM:
-            switch (format) {
-                case AUDIO_FORMAT_PCM_16_BIT:
-                case AUDIO_FORMAT_PCM_8_BIT:
-                case AUDIO_FORMAT_PCM_32_BIT:
-                case AUDIO_FORMAT_PCM_8_24_BIT:
-                case AUDIO_FORMAT_PCM_FLOAT:
-                case AUDIO_FORMAT_PCM_24_BIT_PACKED:
-                    return true;
-                default:
-                    return false;
-            }
-        /* not reached */
-        case AUDIO_FORMAT_MP3:
-        case AUDIO_FORMAT_AMR_NB:
-        case AUDIO_FORMAT_AMR_WB:
-        case AUDIO_FORMAT_AAC:
-        case AUDIO_FORMAT_AAC_ADTS:
-        case AUDIO_FORMAT_HE_AAC_V1:
-        case AUDIO_FORMAT_HE_AAC_V2:
-        case AUDIO_FORMAT_VORBIS:
-        case AUDIO_FORMAT_OPUS:
-        case AUDIO_FORMAT_AC3:
-        case AUDIO_FORMAT_E_AC3:
-        case AUDIO_FORMAT_DTS:
-        case AUDIO_FORMAT_DTS_HD:
-        case AUDIO_FORMAT_IEC61937:
-        case AUDIO_FORMAT_DOLBY_TRUEHD:
-        case AUDIO_FORMAT_QCELP:
-        case AUDIO_FORMAT_EVRC:
-        case AUDIO_FORMAT_EVRCB:
-        case AUDIO_FORMAT_EVRCWB:
-        case AUDIO_FORMAT_AAC_ADIF:
-        case AUDIO_FORMAT_AMR_WB_PLUS:
-        case AUDIO_FORMAT_MP2:
-        case AUDIO_FORMAT_EVRCNW:
-        case AUDIO_FORMAT_FLAC:
-        case AUDIO_FORMAT_ALAC:
-        case AUDIO_FORMAT_APE:
-        case AUDIO_FORMAT_WMA:
-        case AUDIO_FORMAT_WMA_PRO:
-        case AUDIO_FORMAT_DSD:
-        case AUDIO_FORMAT_AC4:
-        case AUDIO_FORMAT_LDAC:
-            return true;
-        default:
-            return false;
-    }
-}
-
-/**
- * Extract the primary format, eg. PCM, AC3, etc.
- */
-static inline audio_format_t audio_get_main_format(audio_format_t format) {
-    return (audio_format_t)(format & AUDIO_FORMAT_MAIN_MASK);
-}
-
-/**
- * Is the data plain PCM samples that can be scaled and mixed?
- */
-static inline bool audio_is_linear_pcm(audio_format_t format) {
-    return (audio_get_main_format(format) == AUDIO_FORMAT_PCM);
-}
-
-/**
- * For this format, is the number of PCM audio frames directly proportional
- * to the number of data bytes?
- *
- * In other words, is the format transported as PCM audio samples,
- * but not necessarily scalable or mixable.
- * This returns true for real PCM, but also for AUDIO_FORMAT_IEC61937,
- * which is transported as 16 bit PCM audio, but where the encoded data
- * cannot be mixed or scaled.
- */
-static inline bool audio_has_proportional_frames(audio_format_t format) {
-    audio_format_t mainFormat = audio_get_main_format(format);
-    return (mainFormat == AUDIO_FORMAT_PCM || mainFormat == AUDIO_FORMAT_IEC61937);
-}
-
-static inline size_t audio_bytes_per_sample(audio_format_t format) {
-    size_t size = 0;
-
-    switch (format) {
-        case AUDIO_FORMAT_PCM_32_BIT:
-        case AUDIO_FORMAT_PCM_8_24_BIT:
-            size = sizeof(int32_t);
-            break;
-        case AUDIO_FORMAT_PCM_24_BIT_PACKED:
-            size = sizeof(uint8_t) * 3;
-            break;
-        case AUDIO_FORMAT_PCM_16_BIT:
-        case AUDIO_FORMAT_IEC61937:
-            size = sizeof(int16_t);
-            break;
-        case AUDIO_FORMAT_PCM_8_BIT:
-            size = sizeof(uint8_t);
-            break;
-        case AUDIO_FORMAT_PCM_FLOAT:
-            size = sizeof(float);
-            break;
-        default:
-            break;
-    }
-    return size;
-}
-
-/* converts device address to string sent to audio HAL via set_parameters */
-static inline char* audio_device_address_to_parameter(audio_devices_t device, const char* address) {
-    const size_t kSize = AUDIO_DEVICE_MAX_ADDRESS_LEN + sizeof("a2dp_sink_address=");
-    char param[kSize];
-
-    if (device & AUDIO_DEVICE_OUT_ALL_A2DP)
-        snprintf(param, kSize, "%s=%s", "a2dp_sink_address", address);
-    else if (device & AUDIO_DEVICE_OUT_REMOTE_SUBMIX)
-        snprintf(param, kSize, "%s=%s", "mix", address);
-    else
-        snprintf(param, kSize, "%s", address);
-
-    return strdup(param);
-}
-
-static inline bool audio_device_is_digital(audio_devices_t device) {
-    if ((device & AUDIO_DEVICE_BIT_IN) != 0) {
-        // input
-        return (~AUDIO_DEVICE_BIT_IN & device &
-                (AUDIO_DEVICE_IN_ALL_USB | AUDIO_DEVICE_IN_HDMI | AUDIO_DEVICE_IN_SPDIF |
-                 AUDIO_DEVICE_IN_IP | AUDIO_DEVICE_IN_BUS)) != 0;
-    } else {
-        // output
-        return (device &
-                (AUDIO_DEVICE_OUT_ALL_USB | AUDIO_DEVICE_OUT_HDMI | AUDIO_DEVICE_OUT_HDMI_ARC |
-                 AUDIO_DEVICE_OUT_SPDIF | AUDIO_DEVICE_OUT_IP | AUDIO_DEVICE_OUT_BUS)) != 0;
-    }
-}
-
-// Unique effect ID (can be generated from the following site:
-//  http://www.itu.int/ITU-T/asn1/uuid.html)
-// This struct is used for effects identification and in soundtrigger.
-typedef struct audio_uuid_s {
-    uint32_t timeLow;
-    uint16_t timeMid;
-    uint16_t timeHiAndVersion;
-    uint16_t clockSeq;
-    uint8_t node[6];
-} audio_uuid_t;
-
-__END_DECLS
-
-/**
- * List of known audio HAL modules. This is the base name of the audio HAL
- * library composed of the "audio." prefix, one of the base names below and
- * a suffix specific to the device.
- * e.g: audio.primary.goldfish.so or audio.a2dp.default.so
- *
- * The same module names are used in audio policy configuration files.
- */
-
-#define AUDIO_HARDWARE_MODULE_ID_PRIMARY "primary"
-#define AUDIO_HARDWARE_MODULE_ID_A2DP "a2dp"
-#define AUDIO_HARDWARE_MODULE_ID_USB "usb"
-#define AUDIO_HARDWARE_MODULE_ID_REMOTE_SUBMIX "r_submix"
-#define AUDIO_HARDWARE_MODULE_ID_CODEC_OFFLOAD "codec_offload"
-#define AUDIO_HARDWARE_MODULE_ID_STUB "stub"
-
-/**
- * Multi-Stream Decoder (MSD) HAL service name. MSD HAL is used to mix
- * encoded streams together with PCM streams, producing re-encoded
- * streams or PCM streams.
- *
- * The service must register itself using this name, and audioserver
- * tries to instantiate a device factory using this name as well.
- * Note that the HIDL implementation library file name *must* have the
- * suffix "msd" in order to be picked up by HIDL that is:
- *
- *   android.hardware.audio@x.x-implmsd.so
- */
-#define AUDIO_HAL_SERVICE_NAME_MSD "msd"
-
-/**
- * Parameter definitions.
- * Note that in the framework code it's recommended to use AudioParameter.h
- * instead of these preprocessor defines, and for sure avoid just copying
- * the constant values.
- */
-
-#define AUDIO_PARAMETER_VALUE_ON "on"
-#define AUDIO_PARAMETER_VALUE_OFF "off"
-
-/**
- *  audio device parameters
- */
-
-/* BT SCO Noise Reduction + Echo Cancellation parameters */
-#define AUDIO_PARAMETER_KEY_BT_NREC "bt_headset_nrec"
-
-/* Get a new HW synchronization source identifier.
- * Return a valid source (positive integer) or AUDIO_HW_SYNC_INVALID if an error occurs
- * or no HW sync is available. */
-#define AUDIO_PARAMETER_HW_AV_SYNC "hw_av_sync"
-
-/* Screen state */
-#define AUDIO_PARAMETER_KEY_SCREEN_STATE "screen_state"
-
-/**
- *  audio stream parameters
- */
-
-#define AUDIO_PARAMETER_STREAM_ROUTING "routing"             /* audio_devices_t */
-#define AUDIO_PARAMETER_STREAM_FORMAT "format"               /* audio_format_t */
-#define AUDIO_PARAMETER_STREAM_CHANNELS "channels"           /* audio_channel_mask_t */
-#define AUDIO_PARAMETER_STREAM_FRAME_COUNT "frame_count"     /* size_t */
-#define AUDIO_PARAMETER_STREAM_INPUT_SOURCE "input_source"   /* audio_source_t */
-#define AUDIO_PARAMETER_STREAM_SAMPLING_RATE "sampling_rate" /* uint32_t */
-
-#define AUDIO_PARAMETER_DEVICE_CONNECT "connect"       /* audio_devices_t */
-#define AUDIO_PARAMETER_DEVICE_DISCONNECT "disconnect" /* audio_devices_t */
-
-/* Enable mono audio playback if 1, else should be 0. */
-#define AUDIO_PARAMETER_MONO_OUTPUT "mono_output"
-
-/* Set the HW synchronization source for an output stream. */
-#define AUDIO_PARAMETER_STREAM_HW_AV_SYNC "hw_av_sync"
-
-/* Query supported formats. The response is a '|' separated list of strings from
- * audio_format_t enum e.g: "sup_formats=AUDIO_FORMAT_PCM_16_BIT" */
-#define AUDIO_PARAMETER_STREAM_SUP_FORMATS "sup_formats"
-/* Query supported channel masks. The response is a '|' separated list of strings from
- * audio_channel_mask_t enum e.g: "sup_channels=AUDIO_CHANNEL_OUT_STEREO|AUDIO_CHANNEL_OUT_MONO" */
-#define AUDIO_PARAMETER_STREAM_SUP_CHANNELS "sup_channels"
-/* Query supported sampling rates. The response is a '|' separated list of integer values e.g:
- * "sup_sampling_rates=44100|48000" */
-#define AUDIO_PARAMETER_STREAM_SUP_SAMPLING_RATES "sup_sampling_rates"
-
-#define AUDIO_PARAMETER_VALUE_LIST_SEPARATOR "|"
-
-/**
- * audio codec parameters
- */
-
-#define AUDIO_OFFLOAD_CODEC_PARAMS "music_offload_codec_param"
-#define AUDIO_OFFLOAD_CODEC_BIT_PER_SAMPLE "music_offload_bit_per_sample"
-#define AUDIO_OFFLOAD_CODEC_BIT_RATE "music_offload_bit_rate"
-#define AUDIO_OFFLOAD_CODEC_AVG_BIT_RATE "music_offload_avg_bit_rate"
-#define AUDIO_OFFLOAD_CODEC_ID "music_offload_codec_id"
-#define AUDIO_OFFLOAD_CODEC_BLOCK_ALIGN "music_offload_block_align"
-#define AUDIO_OFFLOAD_CODEC_SAMPLE_RATE "music_offload_sample_rate"
-#define AUDIO_OFFLOAD_CODEC_ENCODE_OPTION "music_offload_encode_option"
-#define AUDIO_OFFLOAD_CODEC_NUM_CHANNEL "music_offload_num_channels"
-#define AUDIO_OFFLOAD_CODEC_DOWN_SAMPLING "music_offload_down_sampling"
-#define AUDIO_OFFLOAD_CODEC_DELAY_SAMPLES "delay_samples"
-#define AUDIO_OFFLOAD_CODEC_PADDING_SAMPLES "padding_samples"
-
-// FIXME: a temporary declaration for the incall music flag, will be removed when
-// declared in types.hal for audio HAL V4.0 and auto imported to audio-base.h
-#define AUDIO_OUTPUT_FLAG_INCALL_MUSIC 0x10000
-
-#endif  // ANDROID_AUDIO_CORE_H
diff --git a/audio/common/all-versions/legacy/include/system/audio_effect.h b/audio/common/all-versions/legacy/include/system/audio_effect.h
deleted file mode 100644
index f99f604..0000000
--- a/audio/common/all-versions/legacy/include/system/audio_effect.h
+++ /dev/null
@@ -1,528 +0,0 @@
-/*
- * Copyright (C) 2016 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_EFFECT_CORE_H
-#define ANDROID_AUDIO_EFFECT_CORE_H
-
-#include "system/audio.h"
-#include "system/audio_effect-base.h"
-
-__BEGIN_DECLS
-
-/////////////////////////////////////////////////
-//      Common Definitions
-/////////////////////////////////////////////////
-
-//
-//--- Effect descriptor structure effect_descriptor_t
-//
-
-// This format is used for both "type" and "uuid" fields of the effect descriptor structure.
-// - When used for effect type and the engine is implementing and effect corresponding to a standard
-// OpenSL ES interface, this ID must be the one defined in OpenSLES_IID.h for that interface.
-// - When used as uuid, it should be a unique UUID for this particular implementation.
-typedef audio_uuid_t effect_uuid_t;
-
-// Maximum length of character strings in structures defines by this API.
-#define EFFECT_STRING_LEN_MAX 64
-
-// NULL UUID definition (matches SL_IID_NULL_)
-#define EFFECT_UUID_INITIALIZER                                                    \
-    {                                                                              \
-        0xec7178ec, 0xe5e1, 0x4432, 0xa3f4, { 0x46, 0x57, 0xe6, 0x79, 0x52, 0x10 } \
-    }
-static const effect_uuid_t EFFECT_UUID_NULL_ = EFFECT_UUID_INITIALIZER;
-static const effect_uuid_t* const EFFECT_UUID_NULL = &EFFECT_UUID_NULL_;
-static const char* const EFFECT_UUID_NULL_STR = "ec7178ec-e5e1-4432-a3f4-4657e6795210";
-
-// The effect descriptor contains necessary information to facilitate the enumeration of the effect
-// engines present in a library.
-typedef struct effect_descriptor_s {
-    effect_uuid_t type;    // UUID of to the OpenSL ES interface implemented by this effect
-    effect_uuid_t uuid;    // UUID for this particular implementation
-    uint32_t apiVersion;   // Version of the effect control API implemented
-    uint32_t flags;        // effect engine capabilities/requirements flags (see below)
-    uint16_t cpuLoad;      // CPU load indication (see below)
-    uint16_t memoryUsage;  // Data Memory usage (see below)
-    char name[EFFECT_STRING_LEN_MAX];         // human readable effect name
-    char implementor[EFFECT_STRING_LEN_MAX];  // human readable effect implementor name
-} effect_descriptor_t;
-
-/////////////////////////////////////////////////
-//      Effect control interface
-/////////////////////////////////////////////////
-
-//
-//--- Standardized command codes for command() function
-//
-enum effect_command_e {
-    EFFECT_CMD_INIT,                // initialize effect engine
-    EFFECT_CMD_SET_CONFIG,          // configure effect engine (see effect_config_t)
-    EFFECT_CMD_RESET,               // reset effect engine
-    EFFECT_CMD_ENABLE,              // enable effect process
-    EFFECT_CMD_DISABLE,             // disable effect process
-    EFFECT_CMD_SET_PARAM,           // set parameter immediately (see effect_param_t)
-    EFFECT_CMD_SET_PARAM_DEFERRED,  // set parameter deferred
-    EFFECT_CMD_SET_PARAM_COMMIT,    // commit previous set parameter deferred
-    EFFECT_CMD_GET_PARAM,           // get parameter
-    EFFECT_CMD_SET_DEVICE,          // set audio device (see audio.h, audio_devices_t)
-    EFFECT_CMD_SET_VOLUME,          // set volume
-    EFFECT_CMD_SET_AUDIO_MODE,      // set the audio mode (normal, ring, ...)
-    EFFECT_CMD_SET_CONFIG_REVERSE,  // configure effect engine reverse stream(see effect_config_t)
-    EFFECT_CMD_SET_INPUT_DEVICE,    // set capture device (see audio.h, audio_devices_t)
-    EFFECT_CMD_GET_CONFIG,          // read effect engine configuration
-    EFFECT_CMD_GET_CONFIG_REVERSE,  // read configure effect engine reverse stream configuration
-    EFFECT_CMD_GET_FEATURE_SUPPORTED_CONFIGS,  // get all supported configurations for a feature.
-    EFFECT_CMD_GET_FEATURE_CONFIG,             // get current feature configuration
-    EFFECT_CMD_SET_FEATURE_CONFIG,             // set current feature configuration
-    EFFECT_CMD_SET_AUDIO_SOURCE,               // set the audio source (see audio.h, audio_source_t)
-    EFFECT_CMD_OFFLOAD,                        // set if effect thread is an offload one,
-                                               // send the ioHandle of the effect thread
-    EFFECT_CMD_FIRST_PROPRIETARY = 0x10000     // first proprietary command code
-};
-
-//==================================================================================================
-// command: EFFECT_CMD_INIT
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Initialize effect engine: All configurations return to default
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 0
-//  data: N/A
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(int)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_SET_CONFIG
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Apply new audio parameters configurations for input and output buffers
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(effect_config_t)
-//  data: effect_config_t
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(int)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_RESET
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Reset the effect engine. Keep configuration but resets state and buffer content
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 0
-//  data: N/A
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: 0
-//  data: N/A
-//==================================================================================================
-// command: EFFECT_CMD_ENABLE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Enable the process. Called by the framework before the first call to process()
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 0
-//  data: N/A
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(int)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_DISABLE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Disable the process. Called by the framework after the last call to process()
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 0
-//  data: N/A
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(int)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_SET_PARAM
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Set a parameter and apply it immediately
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(effect_param_t) + size of param and value
-//  data: effect_param_t + param + value. See effect_param_t definition below for value offset
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(int)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_SET_PARAM_DEFERRED
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Set a parameter but apply it only when receiving EFFECT_CMD_SET_PARAM_COMMIT command
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(effect_param_t) + size of param and value
-//  data: effect_param_t + param + value. See effect_param_t definition below for value offset
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: 0
-//  data: N/A
-//==================================================================================================
-// command: EFFECT_CMD_SET_PARAM_COMMIT
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Apply all previously received EFFECT_CMD_SET_PARAM_DEFERRED commands
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 0
-//  data: N/A
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(int)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_GET_PARAM
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Get a parameter value
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(effect_param_t) + size of param
-//  data: effect_param_t + param
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(effect_param_t) + size of param and value
-//  data: effect_param_t + param + value. See effect_param_t definition below for value offset
-//==================================================================================================
-// command: EFFECT_CMD_SET_DEVICE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Set the rendering device the audio output path is connected to. See audio.h, audio_devices_t
-//  for device values.
-//  The effect implementation must set EFFECT_FLAG_DEVICE_IND flag in its descriptor to receive this
-//  command when the device changes
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(uint32_t)
-//  data: uint32_t
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: 0
-//  data: N/A
-//==================================================================================================
-// command: EFFECT_CMD_SET_VOLUME
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Set and get volume. Used by audio framework to delegate volume control to effect engine.
-//  The effect implementation must set EFFECT_FLAG_VOLUME_IND or EFFECT_FLAG_VOLUME_CTRL flag in
-//  its descriptor to receive this command before every call to process() function
-//  If EFFECT_FLAG_VOLUME_CTRL flag is set in the effect descriptor, the effect engine must return
-//  the volume that should be applied before the effect is processed. The overall volume (the volume
-//  actually applied by the effect engine multiplied by the returned value) should match the value
-//  indicated in the command.
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: n * sizeof(uint32_t)
-//  data: volume for each channel defined in effect_config_t for output buffer expressed in
-//      8.24 fixed point format
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: n * sizeof(uint32_t) / 0
-//  data: - if EFFECT_FLAG_VOLUME_CTRL is set in effect descriptor:
-//              volume for each channel defined in effect_config_t for output buffer expressed in
-//              8.24 fixed point format
-//        - if EFFECT_FLAG_VOLUME_CTRL is not set in effect descriptor:
-//              N/A
-//  It is legal to receive a null pointer as pReplyData in which case the effect framework has
-//  delegated volume control to another effect
-//==================================================================================================
-// command: EFFECT_CMD_SET_AUDIO_MODE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Set the audio mode. The effect implementation must set EFFECT_FLAG_AUDIO_MODE_IND flag in its
-//  descriptor to receive this command when the audio mode changes.
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(uint32_t)
-//  data: audio_mode_t
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: 0
-//  data: N/A
-//==================================================================================================
-// command: EFFECT_CMD_SET_CONFIG_REVERSE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Apply new audio parameters configurations for input and output buffers of reverse stream.
-//  An example of reverse stream is the echo reference supplied to an Acoustic Echo Canceler.
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(effect_config_t)
-//  data: effect_config_t
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(int)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_SET_INPUT_DEVICE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Set the capture device the audio input path is connected to. See audio.h, audio_devices_t
-//  for device values.
-//  The effect implementation must set EFFECT_FLAG_DEVICE_IND flag in its descriptor to receive this
-//  command when the device changes
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(uint32_t)
-//  data: uint32_t
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: 0
-//  data: N/A
-//==================================================================================================
-// command: EFFECT_CMD_GET_CONFIG
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Read audio parameters configurations for input and output buffers
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 0
-//  data: N/A
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(effect_config_t)
-//  data: effect_config_t
-//==================================================================================================
-// command: EFFECT_CMD_GET_CONFIG_REVERSE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Read audio parameters configurations for input and output buffers of reverse stream
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 0
-//  data: N/A
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(effect_config_t)
-//  data: effect_config_t
-//==================================================================================================
-// command: EFFECT_CMD_GET_FEATURE_SUPPORTED_CONFIGS
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Queries for supported configurations for a particular feature (e.g. get the supported
-// combinations of main and auxiliary channels for a noise suppressor).
-// The command parameter is the feature identifier (See effect_feature_e for a list of defined
-// features) followed by the maximum number of configuration descriptor to return.
-// The reply is composed of:
-//  - status (uint32_t):
-//          - 0 if feature is supported
-//          - -ENOSYS if the feature is not supported,
-//          - -ENOMEM if the feature is supported but the total number of supported configurations
-//          exceeds the maximum number indicated by the caller.
-//  - total number of supported configurations (uint32_t)
-//  - an array of configuration descriptors.
-// The actual number of descriptors returned must not exceed the maximum number indicated by
-// the caller.
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: 2 x sizeof(uint32_t)
-//  data: effect_feature_e + maximum number of configurations to return
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: 2 x sizeof(uint32_t) + n x sizeof (<config descriptor>)
-//  data: status + total number of configurations supported + array of n config descriptors
-//==================================================================================================
-// command: EFFECT_CMD_GET_FEATURE_CONFIG
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Retrieves current configuration for a given feature.
-// The reply status is:
-//      - 0 if feature is supported
-//      - -ENOSYS if the feature is not supported,
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(uint32_t)
-//  data: effect_feature_e
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(uint32_t) + sizeof (<config descriptor>)
-//  data: status + config descriptor
-//==================================================================================================
-// command: EFFECT_CMD_SET_FEATURE_CONFIG
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Sets current configuration for a given feature.
-// The reply status is:
-//      - 0 if feature is supported
-//      - -ENOSYS if the feature is not supported,
-//      - -EINVAL if the configuration is invalid
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(uint32_t) + sizeof (<config descriptor>)
-//  data: effect_feature_e + config descriptor
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(uint32_t)
-//  data: status
-//==================================================================================================
-// command: EFFECT_CMD_SET_AUDIO_SOURCE
-//--------------------------------------------------------------------------------------------------
-// description:
-//  Set the audio source the capture path is configured for (Camcorder, voice recognition...).
-//  See audio.h, audio_source_t for values.
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(uint32_t)
-//  data: uint32_t
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: 0
-//  data: N/A
-//==================================================================================================
-// command: EFFECT_CMD_OFFLOAD
-//--------------------------------------------------------------------------------------------------
-// description:
-//  1.indicate if the playback thread the effect is attached to is offloaded or not
-//  2.update the io handle of the playback thread the effect is attached to
-//--------------------------------------------------------------------------------------------------
-// command format:
-//  size: sizeof(effect_offload_param_t)
-//  data: effect_offload_param_t
-//--------------------------------------------------------------------------------------------------
-// reply format:
-//  size: sizeof(uint32_t)
-//  data: uint32_t
-//--------------------------------------------------------------------------------------------------
-// command: EFFECT_CMD_FIRST_PROPRIETARY
-//--------------------------------------------------------------------------------------------------
-// description:
-//  All proprietary effect commands must use command codes above this value. The size and format of
-//  command and response fields is free in this case
-//==================================================================================================
-
-// Audio buffer descriptor used by process(), bufferProvider() functions and buffer_config_t
-// structure. Multi-channel audio is always interleaved. The channel order is from LSB to MSB with
-// regard to the channel mask definition in audio.h, audio_channel_mask_t e.g :
-// Stereo: left, right
-// 5 point 1: front left, front right, front center, low frequency, back left, back right
-// The buffer size is expressed in frame count, a frame being composed of samples for all
-// channels at a given time. Frame size for unspecified format (AUDIO_FORMAT_OTHER) is 8 bit by
-// definition
-typedef struct audio_buffer_s {
-    size_t frameCount;  // number of frames in buffer
-    union {
-        void* raw;     // raw pointer to start of buffer
-        float* f32;    // pointer to float 32 bit data at start of buffer
-        int32_t* s32;  // pointer to signed 32 bit data at start of buffer
-        int16_t* s16;  // pointer to signed 16 bit data at start of buffer
-        uint8_t* u8;   // pointer to unsigned 8 bit data at start of buffer
-    };
-} audio_buffer_t;
-
-// The buffer_provider_s structure contains functions that can be used
-// by the effect engine process() function to query and release input
-// or output audio buffer.
-// The getBuffer() function is called to retrieve a buffer where data
-// should read from or written to by process() function.
-// The releaseBuffer() function MUST be called when the buffer retrieved
-// with getBuffer() is not needed anymore.
-// The process function should use the buffer provider mechanism to retrieve
-// input or output buffer if the inBuffer or outBuffer passed as argument is NULL
-// and the buffer configuration (buffer_config_t) given by the EFFECT_CMD_SET_CONFIG
-// command did not specify an audio buffer.
-
-typedef int32_t (*buffer_function_t)(void* cookie, audio_buffer_t* buffer);
-
-typedef struct buffer_provider_s {
-    buffer_function_t getBuffer;      // retrieve next buffer
-    buffer_function_t releaseBuffer;  // release used buffer
-    void* cookie;                     // for use by client of buffer provider functions
-} buffer_provider_t;
-
-// The buffer_config_s structure specifies the input or output audio format
-// to be used by the effect engine.
-typedef struct buffer_config_s {
-    audio_buffer_t buffer;  // buffer for use by process() function if not passed explicitly
-    uint32_t samplingRate;  // sampling rate
-    uint32_t channels;      // channel mask (see audio_channel_mask_t in audio.h)
-    buffer_provider_t bufferProvider;  // buffer provider
-    uint8_t format;                    // Audio format (see audio_format_t in audio.h)
-    uint8_t accessMode;  // read/write or accumulate in buffer (effect_buffer_access_e)
-    uint16_t mask;       // indicates which of the above fields is valid
-} buffer_config_t;
-
-// EFFECT_FEATURE_AUX_CHANNELS feature configuration descriptor. Describe a combination
-// of main and auxiliary channels supported
-typedef struct channel_config_s {
-    audio_channel_mask_t main_channels;  // channel mask for main channels
-    audio_channel_mask_t aux_channels;   // channel mask for auxiliary channels
-} channel_config_t;
-
-// effect_config_s structure is used to configure audio parameters and buffers for effect engine
-// input and output.
-typedef struct effect_config_s {
-    buffer_config_t inputCfg;
-    buffer_config_t outputCfg;
-} effect_config_t;
-
-// effect_param_s structure describes the format of the pCmdData argument of EFFECT_CMD_SET_PARAM
-// command and pCmdData and pReplyData of EFFECT_CMD_GET_PARAM command.
-// psize and vsize represent the actual size of parameter and value.
-//
-// NOTE: the start of value field inside the data field is always on a 32 bit boundary:
-//
-//  +-----------+
-//  | status    | sizeof(int)
-//  +-----------+
-//  | psize     | sizeof(int)
-//  +-----------+
-//  | vsize     | sizeof(int)
-//  +-----------+
-//  |           |   |           |
-//  ~ parameter ~   > psize     |
-//  |           |   |           >  ((psize - 1)/sizeof(int) + 1) * sizeof(int)
-//  +-----------+               |
-//  | padding   |               |
-//  +-----------+
-//  |           |   |
-//  ~ value     ~   > vsize
-//  |           |   |
-//  +-----------+
-
-typedef struct effect_param_s {
-    int32_t status;  // Transaction status (unused for command, used for reply)
-    uint32_t psize;  // Parameter size
-    uint32_t vsize;  // Value size
-    char data[];     // Start of Parameter + Value data
-} effect_param_t;
-
-// Maximum effect_param_t size
-#define EFFECT_PARAM_SIZE_MAX 65536
-
-// structure used by EFFECT_CMD_OFFLOAD command
-typedef struct effect_offload_param_s {
-    bool isOffload;  // true if the playback thread the effect is attached to is offloaded
-    int ioHandle;    // io handle of the playback thread the effect is attached to
-} effect_offload_param_t;
-
-__END_DECLS
-
-#endif  // ANDROID_AUDIO_EFFECT_CORE_H
diff --git a/audio/common/all-versions/util/Android.bp b/audio/common/all-versions/util/Android.bp
index 7132667..5d33a3a 100644
--- a/audio/common/all-versions/util/Android.bp
+++ b/audio/common/all-versions/util/Android.bp
@@ -1,7 +1,10 @@
 cc_library_headers {
     name: "android.hardware.audio.common.util@all-versions",
     defaults: ["hidl_defaults"],
-    vendor: true,
+    vendor_available: true,
+    vndk: {
+        enabled: true,
+    },
 
     export_include_dirs: ["include"],
 }
diff --git a/audio/core/2.0/default/Android.bp b/audio/core/2.0/default/Android.bp
index 87e6a9a..9847886 100644
--- a/audio/core/2.0/default/Android.bp
+++ b/audio/core/2.0/default/Android.bp
@@ -37,13 +37,13 @@
         "android.hardware.audio.common.util@all-versions",
         "android.hardware.audio.core@all-versions-impl",
         "libaudioclient_headers",
-        "android.hardware.audio.common.legacy@2.0",
+        "libaudio_system_headers",
         "libhardware_headers",
         "libmedia_headers",
     ],
 
     whole_static_libs: [
-        "libmedia_helper@2.0",
+        "libmedia_helper",
     ],
 
 }
diff --git a/audio/core/all-versions/default/Android.bp b/audio/core/all-versions/default/Android.bp
index a02a6bb..214b8d5 100644
--- a/audio/core/all-versions/default/Android.bp
+++ b/audio/core/all-versions/default/Android.bp
@@ -22,7 +22,7 @@
 
     header_libs: [
         "libaudioclient_headers",
-        "android.hardware.audio.common.legacy@2.0",
+        "libaudio_system_headers",
         "libhardware_headers",
         "libmedia_headers",
          "android.hardware.audio.common.util@all-versions",
diff --git a/audio/effect/2.0/default/Android.bp b/audio/effect/2.0/default/Android.bp
index d32a9d9..db00988 100644
--- a/audio/effect/2.0/default/Android.bp
+++ b/audio/effect/2.0/default/Android.bp
@@ -41,9 +41,9 @@
     header_libs: [
         "android.hardware.audio.common.util@all-versions",
         "android.hardware.audio.effect@all-versions-impl",
-        "android.hardware.audio.common.legacy@2.0",
-        "android.hardware.audio.effect.legacy@2.0",
+        "libaudio_system_headers",
         "libaudioclient_headers",
+        "libeffects_headers",
         "libhardware_headers",
         "libmedia_headers",
     ],
diff --git a/audio/effect/2.0/legacy/Android.bp b/audio/effect/2.0/legacy/Android.bp
deleted file mode 100644
index 68de70e..0000000
--- a/audio/effect/2.0/legacy/Android.bp
+++ /dev/null
@@ -1,12 +0,0 @@
-cc_library_headers {
-    name: "android.hardware.audio.effect.legacy@2.0",
-    vendor: true,
-    header_libs: [
-        "android.hardware.audio.common.legacy@2.0",
-        "android.hardware.audio.effect.legacy@all-versions",
-    ],
-    export_header_lib_headers: [
-        "android.hardware.audio.common.legacy@2.0",
-        "android.hardware.audio.effect.legacy@all-versions",
-    ],
-}
diff --git a/audio/effect/2.0/legacy/OWNERS b/audio/effect/2.0/legacy/OWNERS
deleted file mode 100644
index 6fdc97c..0000000
--- a/audio/effect/2.0/legacy/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-elaurent@google.com
-krocard@google.com
-mnaganov@google.com
diff --git a/audio/effect/all-versions/default/Android.bp b/audio/effect/all-versions/default/Android.bp
index 47d74a8..ed2a093 100644
--- a/audio/effect/all-versions/default/Android.bp
+++ b/audio/effect/all-versions/default/Android.bp
@@ -9,6 +9,7 @@
     shared_libs: [
         "libbase",
         "libcutils",
+        "libeffects",
         "libfmq",
         "libhidlbase",
         "libhidlmemory",
@@ -20,7 +21,9 @@
     ],
 
     header_libs: [
+        "libaudio_system_headers",
         "libaudioclient_headers",
+        "libeffects_headers",
         "libhardware_headers",
         "libmedia_headers",
         "android.hardware.audio.common.util@all-versions",
diff --git a/audio/effect/all-versions/legacy/Android.bp b/audio/effect/all-versions/legacy/Android.bp
deleted file mode 100644
index bcf81b3..0000000
--- a/audio/effect/all-versions/legacy/Android.bp
+++ /dev/null
@@ -1,11 +0,0 @@
-cc_library_headers {
-    name: "android.hardware.audio.effect.legacy@all-versions",
-    vendor: true,
-    export_include_dirs: ["include"],
-    header_libs: [
-        "android.hardware.audio.common.legacy@all-versions",
-    ],
-    export_header_lib_headers: [
-        "android.hardware.audio.common.legacy@all-versions",
-    ],
-}
diff --git a/audio/effect/all-versions/legacy/OWNERS b/audio/effect/all-versions/legacy/OWNERS
deleted file mode 100644
index 6fdc97c..0000000
--- a/audio/effect/all-versions/legacy/OWNERS
+++ /dev/null
@@ -1,3 +0,0 @@
-elaurent@google.com
-krocard@google.com
-mnaganov@google.com
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_aec.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_aec.h
deleted file mode 100644
index f48749a..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_aec.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_AEC_H_
-#define ANDROID_EFFECT_AEC_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_aec.h>
-
-#endif /*ANDROID_EFFECT_AEC_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_agc.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_agc.h
deleted file mode 100644
index 466ea96..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_agc.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_AGC_H_
-#define ANDROID_EFFECT_AGC_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_agc.h>
-
-#endif /*ANDROID_EFFECT_AGC_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_bassboost.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_bassboost.h
deleted file mode 100644
index 157452e..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_bassboost.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_BASSBOOST_H_
-#define ANDROID_EFFECT_BASSBOOST_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_bassboost.h>
-
-#endif /*ANDROID_EFFECT_BASSBOOST_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_downmix.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_downmix.h
deleted file mode 100644
index 26b849b..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_downmix.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2012 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_DOWNMIX_H_
-#define ANDROID_EFFECT_DOWNMIX_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_downmix.h>
-
-#endif /*ANDROID_EFFECT_DOWNMIX_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_environmentalreverb.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_environmentalreverb.h
deleted file mode 100644
index dd474c2..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_environmentalreverb.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_ENVIRONMENTALREVERB_H_
-#define ANDROID_EFFECT_ENVIRONMENTALREVERB_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_environmentalreverb.h>
-
-#endif /*ANDROID_EFFECT_ENVIRONMENTALREVERB_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_equalizer.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_equalizer.h
deleted file mode 100644
index 3059ec2..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_equalizer.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_EQUALIZER_H_
-#define ANDROID_EFFECT_EQUALIZER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_equalizer.h>
-
-#endif /*ANDROID_EFFECT_EQUALIZER_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_loudnessenhancer.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_loudnessenhancer.h
deleted file mode 100644
index f37ba45..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_loudnessenhancer.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2013 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_LOUDNESS_ENHANCER_H_
-#define ANDROID_EFFECT_LOUDNESS_ENHANCER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_loudnessenhancer.h>
-
-#endif /*ANDROID_EFFECT_LOUDNESS_ENHANCER_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_ns.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_ns.h
deleted file mode 100644
index 3bd8a41..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_ns.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_NS_H_
-#define ANDROID_EFFECT_NS_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_ns.h>
-
-#endif /*ANDROID_EFFECT_NS_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_presetreverb.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_presetreverb.h
deleted file mode 100644
index eac1f5f..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_presetreverb.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_PRESETREVERB_H_
-#define ANDROID_EFFECT_PRESETREVERB_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_presetreverb.h>
-
-#endif /*ANDROID_EFFECT_PRESETREVERB_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_virtualizer.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_virtualizer.h
deleted file mode 100644
index aeecfa5..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_virtualizer.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_VIRTUALIZER_H_
-#define ANDROID_EFFECT_VIRTUALIZER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_virtualizer.h>
-
-#endif /*ANDROID_EFFECT_VIRTUALIZER_H_*/
diff --git a/audio/effect/all-versions/legacy/include/audio_effects/effect_visualizer.h b/audio/effect/all-versions/legacy/include/audio_effects/effect_visualizer.h
deleted file mode 100644
index 47217e7..0000000
--- a/audio/effect/all-versions/legacy/include/audio_effects/effect_visualizer.h
+++ /dev/null
@@ -1,33 +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.
- */
-
-/*
- * 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_VISUALIZER_H_
-#define ANDROID_EFFECT_VISUALIZER_H_
-
-#include <hardware/audio_effect.h>
-#include <system/audio_effects/effect_visualizer.h>
-
-#endif /*ANDROID_EFFECT_VISUALIZER_H_*/
diff --git a/audio/effect/all-versions/legacy/include/media/EffectsFactoryApi.h b/audio/effect/all-versions/legacy/include/media/EffectsFactoryApi.h
deleted file mode 100644
index e08fd0b..0000000
--- a/audio/effect/all-versions/legacy/include/media/EffectsFactoryApi.h
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
- * Copyright (C) 2010 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_EFFECTSFACTORYAPI_H_
-#define ANDROID_EFFECTSFACTORYAPI_H_
-
-#include <cutils/compiler.h>
-#include <errno.h>
-#include <hardware/audio_effect.h>
-#include <stdint.h>
-#include <sys/types.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-/////////////////////////////////////////////////
-//      Effect factory interface
-/////////////////////////////////////////////////
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//    Function:       EffectQueryNumberEffects
-//
-//    Description:    Returns the number of different effects in all loaded libraries.
-//          Each effect must have a different effect uuid (see
-//          effect_descriptor_t). This function together with EffectQueryEffect()
-//          is used to enumerate all effects present in all loaded libraries.
-//          Each time EffectQueryNumberEffects() is called, the factory must
-//          reset the index of the effect descriptor returned by next call to
-//          EffectQueryEffect() to restart enumeration from the beginning.
-//
-//    Input/Output:
-//          pNumEffects:    address where the number of effects should be returned.
-//
-//    Output:
-//        returned value:    0          successful operation.
-//                          -ENODEV     factory failed to initialize
-//                          -EINVAL     invalid pNumEffects
-//        *pNumEffects:     updated with number of effects in factory
-//
-////////////////////////////////////////////////////////////////////////////////
-ANDROID_API
-int EffectQueryNumberEffects(uint32_t* pNumEffects);
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//    Function:       EffectQueryEffect
-//
-//    Description:    Returns a descriptor of the next available effect.
-//          See effect_descriptor_t for a details on effect descriptor.
-//          This function together with EffectQueryNumberEffects() is used to enumerate all
-//          effects present in all loaded libraries. The enumeration sequence is:
-//              EffectQueryNumberEffects(&num_effects);
-//              for (i = 0; i < num_effects; i++)
-//                  EffectQueryEffect(i,...);
-//
-//    Input/Output:
-//          pDescriptor:    address where to return the effect descriptor.
-//
-//    Output:
-//        returned value:    0          successful operation.
-//                          -ENOENT     no more effect available
-//                          -ENODEV     factory failed to initialize
-//                          -EINVAL     invalid pDescriptor
-//                          -ENOSYS     effect list has changed since last execution of
-//                                      EffectQueryNumberEffects()
-//        *pDescriptor:     updated with the effect descriptor.
-//
-////////////////////////////////////////////////////////////////////////////////
-ANDROID_API
-int EffectQueryEffect(uint32_t index, effect_descriptor_t* pDescriptor);
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//    Function:       EffectCreate
-//
-//    Description:    Creates an effect engine of the specified type and returns an
-//          effect control interface on this engine. The function will allocate the
-//          resources for an instance of the requested effect engine and return
-//          a handle on the effect control interface.
-//
-//    Input:
-//          pEffectUuid:    pointer to the effect uuid.
-//          sessionId:  audio session to which this effect instance will be attached. All effects
-//              created with the same session ID are connected in series and process the same signal
-//              stream.  Knowing that two effects are part of the same effect chain can help the
-//              library implement some kind of optimizations.
-//          ioId:   identifies the output or input stream this effect is directed to at audio HAL.
-//              For future use especially with tunneled HW accelerated effects
-//
-//    Input/Output:
-//          pHandle:        address where to return the effect handle.
-//
-//    Output:
-//        returned value:    0          successful operation.
-//                          -ENODEV     factory failed to initialize
-//                          -EINVAL     invalid pEffectUuid or pHandle
-//                          -ENOENT     no effect with this uuid found
-//        *pHandle:         updated with the effect handle.
-//
-////////////////////////////////////////////////////////////////////////////////
-ANDROID_API
-int EffectCreate(const effect_uuid_t* pEffectUuid, int32_t sessionId, int32_t ioId,
-                 effect_handle_t* pHandle);
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//    Function:       EffectRelease
-//
-//    Description:    Releases the effect engine whose handle is given as argument.
-//          All resources allocated to this particular instance of the effect are
-//          released.
-//
-//    Input:
-//          handle:    handle on the effect interface to be released.
-//
-//    Output:
-//        returned value:    0          successful operation.
-//                          -ENODEV     factory failed to initialize
-//                          -EINVAL     invalid interface handle
-//
-////////////////////////////////////////////////////////////////////////////////
-ANDROID_API
-int EffectRelease(effect_handle_t handle);
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//    Function:       EffectGetDescriptor
-//
-//    Description:    Returns the descriptor of the effect which uuid is pointed
-//          to by first argument.
-//
-//    Input:
-//          pEffectUuid:    pointer to the effect uuid.
-//
-//    Input/Output:
-//          pDescriptor:    address where to return the effect descriptor.
-//
-//    Output:
-//        returned value:    0          successful operation.
-//                          -ENODEV     factory failed to initialize
-//                          -EINVAL     invalid pEffectUuid or pDescriptor
-//                          -ENOENT     no effect with this uuid found
-//        *pDescriptor:     updated with the effect descriptor.
-//
-////////////////////////////////////////////////////////////////////////////////
-ANDROID_API
-int EffectGetDescriptor(const effect_uuid_t* pEffectUuid, effect_descriptor_t* pDescriptor);
-
-////////////////////////////////////////////////////////////////////////////////
-//
-//    Function:       EffectIsNullUuid
-//
-//    Description:    Helper function to compare effect uuid to EFFECT_UUID_NULL
-//
-//    Input:
-//          pEffectUuid: pointer to effect uuid to compare to EFFECT_UUID_NULL.
-//
-//    Output:
-//        returned value:    0 if uuid is different from EFFECT_UUID_NULL.
-//                           1 if uuid is equal to EFFECT_UUID_NULL.
-//
-////////////////////////////////////////////////////////////////////////////////
-ANDROID_API
-int EffectIsNullUuid(const effect_uuid_t* pEffectUuid);
-
-ANDROID_API
-int EffectDumpEffects(int fd);
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECTSFACTORYAPI_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/audio_effects_conf.h b/audio/effect/all-versions/legacy/include/system/audio_effects/audio_effects_conf.h
deleted file mode 100644
index b68a6c2..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/audio_effects_conf.h
+++ /dev/null
@@ -1,67 +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_EFFECTS_CONF_H
-#define ANDROID_AUDIO_EFFECTS_CONF_H
-
-/////////////////////////////////////////////////
-//      Definitions for effects configuration file (audio_effects.conf)
-/////////////////////////////////////////////////
-
-#define AUDIO_EFFECT_DEFAULT_CONFIG_FILE "/system/etc/audio_effects.conf"
-#define AUDIO_EFFECT_VENDOR_CONFIG_FILE "/vendor/etc/audio_effects.conf"
-#define LIBRARIES_TAG "libraries"
-#define PATH_TAG "path"
-
-#define EFFECTS_TAG "effects"
-#define LIBRARY_TAG "library"
-#define UUID_TAG "uuid"
-
-#define PREPROCESSING_TAG "pre_processing"
-#define OUTPUT_SESSION_PROCESSING_TAG "output_session_processing"
-
-#define PARAM_TAG "param"
-#define VALUE_TAG "value"
-#define INT_TAG "int"
-#define SHORT_TAG "short"
-#define FLOAT_TAG "float"
-#define BOOL_TAG "bool"
-#define STRING_TAG "string"
-
-// audio_source_t
-#define MIC_SRC_TAG "mic"                         // AUDIO_SOURCE_MIC
-#define VOICE_UL_SRC_TAG "voice_uplink"           // AUDIO_SOURCE_VOICE_UPLINK
-#define VOICE_DL_SRC_TAG "voice_downlink"         // AUDIO_SOURCE_VOICE_DOWNLINK
-#define VOICE_CALL_SRC_TAG "voice_call"           // AUDIO_SOURCE_VOICE_CALL
-#define CAMCORDER_SRC_TAG "camcorder"             // AUDIO_SOURCE_CAMCORDER
-#define VOICE_REC_SRC_TAG "voice_recognition"     // AUDIO_SOURCE_VOICE_RECOGNITION
-#define VOICE_COMM_SRC_TAG "voice_communication"  // AUDIO_SOURCE_VOICE_COMMUNICATION
-#define UNPROCESSED_SRC_TAG "unprocessed"         // AUDIO_SOURCE_UNPROCESSED
-
-// audio_stream_type_t
-#define AUDIO_STREAM_DEFAULT_TAG "default"
-#define AUDIO_STREAM_VOICE_CALL_TAG "voice_call"
-#define AUDIO_STREAM_SYSTEM_TAG "system"
-#define AUDIO_STREAM_RING_TAG "ring"
-#define AUDIO_STREAM_MUSIC_TAG "music"
-#define AUDIO_STREAM_ALARM_TAG "alarm"
-#define AUDIO_STREAM_NOTIFICATION_TAG "notification"
-#define AUDIO_STREAM_BLUETOOTH_SCO_TAG "bluetooth_sco"
-#define AUDIO_STREAM_ENFORCED_AUDIBLE_TAG "enforced_audible"
-#define AUDIO_STREAM_DTMF_TAG "dtmf"
-#define AUDIO_STREAM_TTS_TAG "tts"
-
-#endif  // ANDROID_AUDIO_EFFECTS_CONF_H
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_aec.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_aec.h
deleted file mode 100644
index 9785055..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_aec.h
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
- * Copyright (C) 2016 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_AEC_CORE_H_
-#define ANDROID_EFFECT_AEC_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-// The AEC 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_AEC_ = {
-    0x7b491460, 0x8d4d, 0x11e0, 0xbd61, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const FX_IID_AEC = &FX_IID_AEC_;
-
-typedef enum {
-    AEC_PARAM_ECHO_DELAY,  // echo delay in microseconds
-    AEC_PARAM_PROPERTIES
-} t_aec_params;
-
-// t_equalizer_settings groups all current aec settings for backup and restore.
-typedef struct s_aec_settings { uint32_t echoDelay; } t_aec_settings;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_AEC_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_agc.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_agc.h
deleted file mode 100644
index 319bcd4..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_agc.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2016 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_AGC_CORE_H_
-#define ANDROID_EFFECT_AGC_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_AGC_ = {
-    0x0a8abfe0, 0x654c, 0x11e0, 0xba26, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const FX_IID_AGC = &FX_IID_AGC_;
-
-typedef enum {
-    AGC_PARAM_TARGET_LEVEL,  // target output level in millibel
-    AGC_PARAM_COMP_GAIN,     // gain in the compression range in millibel
-    AGC_PARAM_LIMITER_ENA,   // enable or disable limiter (boolean)
-    AGC_PARAM_PROPERTIES
-} t_agc_params;
-
-// t_agc_settings groups all current agc settings for backup and restore.
-typedef struct s_agc_settings {
-    int16_t targetLevel;
-    int16_t compGain;
-    bool limiterEnabled;
-} t_agc_settings;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_AGC_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_bassboost.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_bassboost.h
deleted file mode 100644
index 7828d66..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_bassboost.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2016 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_BASSBOOST_CORE_H_
-#define ANDROID_EFFECT_BASSBOOST_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_BASSBOOST_ = {
-    0x0634f220, 0xddd4, 0x11db, 0xa0fc, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const SL_IID_BASSBOOST = &SL_IID_BASSBOOST_;
-#endif  // OPENSL_ES_H_
-
-/* enumerated parameter settings for BassBoost effect */
-typedef enum { BASSBOOST_PARAM_STRENGTH_SUPPORTED, BASSBOOST_PARAM_STRENGTH } t_bassboost_params;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_BASSBOOST_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_downmix.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_downmix.h
deleted file mode 100644
index 9f02e41..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_downmix.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2016 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_DOWNMIX_CORE_H_
-#define ANDROID_EFFECT_DOWNMIX_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-#define EFFECT_UIID_DOWNMIX__                                                      \
-    {                                                                              \
-        0x381e49cc, 0xa858, 0x4aa2, 0x87f6, { 0xe8, 0x38, 0x8e, 0x76, 0x01, 0xb2 } \
-    }
-static const effect_uuid_t EFFECT_UIID_DOWNMIX_ = EFFECT_UIID_DOWNMIX__;
-const effect_uuid_t* const EFFECT_UIID_DOWNMIX = &EFFECT_UIID_DOWNMIX_;
-
-/* enumerated parameter settings for downmix effect */
-typedef enum { DOWNMIX_PARAM_TYPE } downmix_params_t;
-
-typedef enum {
-    DOWNMIX_TYPE_INVALID = -1,
-    // throw away the extra channels
-    DOWNMIX_TYPE_STRIP = 0,
-    // mix the extra channels with FL/FR
-    DOWNMIX_TYPE_FOLD = 1,
-    DOWNMIX_TYPE_CNT,
-    DOWNMIX_TYPE_LAST = DOWNMIX_TYPE_CNT - 1
-} downmix_type_t;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_DOWNMIX_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_environmentalreverb.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_environmentalreverb.h
deleted file mode 100644
index 8caee32..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_environmentalreverb.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2016 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_ENVIRONMENTALREVERB_CORE_H_
-#define ANDROID_EFFECT_ENVIRONMENTALREVERB_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_ENVIRONMENTALREVERB_ = {
-    0xc2e5d5f0, 0x94bd, 0x4763, 0x9cac, {0x4e, 0x23, 0x4d, 0x6, 0x83, 0x9e}};
-const effect_uuid_t* const SL_IID_ENVIRONMENTALREVERB = &SL_IID_ENVIRONMENTALREVERB_;
-#endif  // OPENSL_ES_H_
-
-/* enumerated parameter settings for environmental reverb effect */
-typedef enum {
-    // Parameters below are as defined in OpenSL ES specification for environmental reverb interface
-    REVERB_PARAM_ROOM_LEVEL,         // in millibels,    range -6000 to 0
-    REVERB_PARAM_ROOM_HF_LEVEL,      // in millibels,    range -4000 to 0
-    REVERB_PARAM_DECAY_TIME,         // in milliseconds, range 100 to 20000
-    REVERB_PARAM_DECAY_HF_RATIO,     // in permilles,    range 100 to 1000
-    REVERB_PARAM_REFLECTIONS_LEVEL,  // in millibels,    range -6000 to 0
-    REVERB_PARAM_REFLECTIONS_DELAY,  // in milliseconds, range 0 to 65
-    REVERB_PARAM_REVERB_LEVEL,       // in millibels,    range -6000 to 0
-    REVERB_PARAM_REVERB_DELAY,       // in milliseconds, range 0 to 65
-    REVERB_PARAM_DIFFUSION,          // in permilles,    range 0 to 1000
-    REVERB_PARAM_DENSITY,            // in permilles,    range 0 to 1000
-    REVERB_PARAM_PROPERTIES,
-    REVERB_PARAM_BYPASS
-} t_env_reverb_params;
-
-// t_reverb_settings is equal to SLEnvironmentalReverbSettings defined in OpenSL ES specification.
-typedef struct s_reverb_settings {
-    int16_t roomLevel;
-    int16_t roomHFLevel;
-    uint32_t decayTime;
-    int16_t decayHFRatio;
-    int16_t reflectionsLevel;
-    uint32_t reflectionsDelay;
-    int16_t reverbLevel;
-    uint32_t reverbDelay;
-    int16_t diffusion;
-    int16_t density;
-} __attribute__((packed)) t_reverb_settings;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_ENVIRONMENTALREVERB_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_equalizer.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_equalizer.h
deleted file mode 100644
index 83fddcf..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_equalizer.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2016 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_EQUALIZER_CORE_H_
-#define ANDROID_EFFECT_EQUALIZER_CORE_H_
-
-#include <system/audio_effect.h>
-
-#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_EQUALIZER_ = {
-    0x0bed4300, 0xddd6, 0x11db, 0x8f34, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const SL_IID_EQUALIZER = &SL_IID_EQUALIZER_;
-#endif  // OPENSL_ES_H_
-
-#if __cplusplus
-extern "C" {
-#endif
-
-/* enumerated parameters for Equalizer effect */
-typedef enum {
-    EQ_PARAM_NUM_BANDS,           // Gets the number of frequency bands that the equalizer
-                                  // supports.
-    EQ_PARAM_LEVEL_RANGE,         // Returns the minimum and maximum band levels supported.
-    EQ_PARAM_BAND_LEVEL,          // Gets/Sets the gain set for the given equalizer band.
-    EQ_PARAM_CENTER_FREQ,         // Gets the center frequency of the given band.
-    EQ_PARAM_BAND_FREQ_RANGE,     // Gets the frequency range of the given frequency band.
-    EQ_PARAM_GET_BAND,            // Gets the band that has the most effect on the given
-                                  // frequency.
-    EQ_PARAM_CUR_PRESET,          // Gets/Sets the current preset.
-    EQ_PARAM_GET_NUM_OF_PRESETS,  // Gets the total number of presets the equalizer supports.
-    EQ_PARAM_GET_PRESET_NAME,     // Gets the preset name based on the index.
-    EQ_PARAM_PROPERTIES           // Gets/Sets all parameters at a time.
-} t_equalizer_params;
-
-// t_equalizer_settings groups all current equalizer setting for backup and restore.
-typedef struct s_equalizer_settings {
-    uint16_t curPreset;
-    uint16_t numBands;
-    uint16_t bandLevels[];
-} t_equalizer_settings;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_EQUALIZER_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_loudnessenhancer.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_loudnessenhancer.h
deleted file mode 100644
index 5c78013..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_loudnessenhancer.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2016 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_LOUDNESS_ENHANCER_CORE_H_
-#define ANDROID_EFFECT_LOUDNESS_ENHANCER_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-// this effect is not defined in OpenSL ES as one of the standard effects
-static const effect_uuid_t FX_IID_LOUDNESS_ENHANCER_ = {
-    0xfe3199be, 0xaed0, 0x413f, 0x87bb, {0x11, 0x26, 0x0e, 0xb6, 0x3c, 0xf1}};
-const effect_uuid_t* const FX_IID_LOUDNESS_ENHANCER = &FX_IID_LOUDNESS_ENHANCER_;
-
-#define LOUDNESS_ENHANCER_DEFAULT_TARGET_GAIN_MB 0  // mB
-
-// enumerated parameters for DRC effect
-// to keep in sync with frameworks/base/media/java/android/media/audiofx/LoudnessEnhancer.java
-typedef enum {
-    LOUDNESS_ENHANCER_PARAM_TARGET_GAIN_MB = 0,  // target gain expressed in mB
-} t_level_monitor_params;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_LOUDNESS_ENHANCER_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_ns.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_ns.h
deleted file mode 100644
index 8b9ac76..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_ns.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2016 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_NS_CORE_H_
-#define ANDROID_EFFECT_NS_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-// The NS 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_NS_ = {
-    0x58b4b260, 0x8e06, 0x11e0, 0xaa8e, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const FX_IID_NS = &FX_IID_NS_;
-
-typedef enum {
-    NS_PARAM_LEVEL,  // noise suppression level (t_ns_level)
-    NS_PARAM_PROPERTIES,
-    NS_PARAM_TYPE  // noise suppression type (t_ns_type)
-} t_ns_params;
-
-// noise suppression level
-typedef enum { NS_LEVEL_LOW, NS_LEVEL_MEDIUM, NS_LEVEL_HIGH } t_ns_level;
-
-// noise suppression type
-typedef enum { NS_TYPE_SINGLE_CHANNEL, NS_TYPE_MULTI_CHANNEL } t_ns_type;
-
-// s_ns_settings groups all current ns settings for backup and restore.
-typedef struct s_ns_settings {
-    uint32_t level;
-    uint32_t type;
-} t_ns_settings;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_NS_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_presetreverb.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_presetreverb.h
deleted file mode 100644
index 6804fed..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_presetreverb.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Copyright (C) 2016 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_PRESETREVERB_CORE_H_
-#define ANDROID_EFFECT_PRESETREVERB_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_PRESETREVERB_ = {
-    0x47382d60, 0xddd8, 0x11db, 0xbf3a, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const SL_IID_PRESETREVERB = &SL_IID_PRESETREVERB_;
-#endif  // OPENSL_ES_H_
-
-/* enumerated parameter settings for preset reverb effect */
-typedef enum { REVERB_PARAM_PRESET } t_preset_reverb_params;
-
-typedef enum {
-    REVERB_PRESET_NONE,
-    REVERB_PRESET_SMALLROOM,
-    REVERB_PRESET_MEDIUMROOM,
-    REVERB_PRESET_LARGEROOM,
-    REVERB_PRESET_MEDIUMHALL,
-    REVERB_PRESET_LARGEHALL,
-    REVERB_PRESET_PLATE,
-    REVERB_PRESET_LAST = REVERB_PRESET_PLATE
-} t_reverb_presets;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_PRESETREVERB_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_virtualizer.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_virtualizer.h
deleted file mode 100644
index a6a31ec..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_virtualizer.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (C) 2016 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_VIRTUALIZER_CORE_H_
-#define ANDROID_EFFECT_VIRTUALIZER_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_VIRTUALIZER_ = {
-    0x37cc2c00, 0xdddd, 0x11db, 0x8577, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const SL_IID_VIRTUALIZER = &SL_IID_VIRTUALIZER_;
-#endif  // OPENSL_ES_H_
-
-/* enumerated parameter settings for virtualizer effect */
-/* to keep in sync with frameworks/base/media/java/android/media/audiofx/Virtualizer.java */
-typedef enum {
-    VIRTUALIZER_PARAM_STRENGTH_SUPPORTED,
-    VIRTUALIZER_PARAM_STRENGTH,
-    // used with EFFECT_CMD_GET_PARAM
-    // format:
-    //   parameters int32_t              VIRTUALIZER_PARAM_VIRTUAL_SPEAKER_ANGLES
-    //              audio_channel_mask_t input channel mask
-    //              audio_devices_t      audio output device
-    //   output     int32_t*             an array of length 3 * the number of channels in the mask
-    //                                       where entries are the succession of the channel mask
-    //                                       of each speaker (i.e. a single bit is selected in the
-    //                                       channel mask) followed by the azimuth and the
-    //                                       elevation angles.
-    //   status     int -EINVAL  if configuration is not supported or invalid or not forcing
-    //                   0       if configuration is supported and the mode is forced
-    // notes:
-    // - all angles are expressed in degrees and are relative to the listener,
-    // - for azimuth: 0 is the direction the listener faces, 180 is behind the listener, and
-    //    -90 is to her/his left,
-    // - for elevation: 0 is the horizontal plane, +90 is above the listener, -90 is below.
-    VIRTUALIZER_PARAM_VIRTUAL_SPEAKER_ANGLES,
-    // used with EFFECT_CMD_SET_PARAM
-    // format:
-    //   parameters  int32_t           VIRTUALIZER_PARAM_FORCE_VIRTUALIZATION_MODE
-    //               audio_devices_t   audio output device
-    //   status      int -EINVAL   if the device is not supported or invalid
-    //                   0         if the device is supported and the mode is forced, or forcing
-    //                               was disabled for the AUDIO_DEVICE_NONE audio device.
-    VIRTUALIZER_PARAM_FORCE_VIRTUALIZATION_MODE,
-    // used with EFFECT_CMD_GET_PARAM
-    // format:
-    //   parameters int32_t              VIRTUALIZER_PARAM_VIRTUALIZATION_MODE
-    //   output     audio_device_t       audio device reflecting the current virtualization mode,
-    //                                   AUDIO_DEVICE_NONE when not virtualizing
-    //   status     int -EINVAL if an error occurred
-    //                  0       if the output value is successfully retrieved
-    VIRTUALIZER_PARAM_VIRTUALIZATION_MODE
-} t_virtualizer_params;
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_VIRTUALIZER_CORE_H_*/
diff --git a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_visualizer.h b/audio/effect/all-versions/legacy/include/system/audio_effects/effect_visualizer.h
deleted file mode 100644
index cc78e15..0000000
--- a/audio/effect/all-versions/legacy/include/system/audio_effects/effect_visualizer.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2016 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_VISUALIZER_CORE_H_
-#define ANDROID_EFFECT_VISUALIZER_CORE_H_
-
-#include <system/audio_effect.h>
-
-#if __cplusplus
-extern "C" {
-#endif
-
-#ifndef OPENSL_ES_H_
-static const effect_uuid_t SL_IID_VISUALIZATION_ = {
-    0xe46b26a0, 0xdddd, 0x11db, 0x8afd, {0x00, 0x02, 0xa5, 0xd5, 0xc5, 0x1b}};
-const effect_uuid_t* const SL_IID_VISUALIZATION = &SL_IID_VISUALIZATION_;
-#endif  // OPENSL_ES_H_
-
-#define VISUALIZER_CAPTURE_SIZE_MAX 1024  // maximum capture size in samples
-#define VISUALIZER_CAPTURE_SIZE_MIN 128   // minimum capture size in samples
-
-// to keep in sync with frameworks/base/media/java/android/media/audiofx/Visualizer.java
-#define VISUALIZER_SCALING_MODE_NORMALIZED 0
-#define VISUALIZER_SCALING_MODE_AS_PLAYED 1
-
-#define MEASUREMENT_MODE_NONE 0x0
-#define MEASUREMENT_MODE_PEAK_RMS 0x1
-
-#define MEASUREMENT_IDX_PEAK 0
-#define MEASUREMENT_IDX_RMS 1
-#define MEASUREMENT_COUNT 2
-
-/* enumerated parameters for Visualizer effect */
-typedef enum {
-    VISUALIZER_PARAM_CAPTURE_SIZE,      // Sets the number PCM samples in the capture.
-    VISUALIZER_PARAM_SCALING_MODE,      // Sets the way the captured data is scaled
-    VISUALIZER_PARAM_LATENCY,           // Informs the visualizer about the downstream latency
-    VISUALIZER_PARAM_MEASUREMENT_MODE,  // Sets which measurements are to be made
-} t_visualizer_params;
-
-/* commands */
-typedef enum {
-    VISUALIZER_CMD_CAPTURE = EFFECT_CMD_FIRST_PROPRIETARY,  // Gets the latest PCM capture.
-    VISUALIZER_CMD_MEASURE,                                 // Gets the current measurements
-} t_visualizer_cmds;
-
-// VISUALIZER_CMD_CAPTURE retrieves the latest PCM snapshot captured by the visualizer engine.
-// It returns the number of samples specified by VISUALIZER_PARAM_CAPTURE_SIZE
-// in 8 bit unsigned format (0 = 0x80)
-
-// VISUALIZER_CMD_MEASURE retrieves the lastest measurements as int32_t saved in the
-// MEASUREMENT_IDX_* array index order.
-
-#if __cplusplus
-}  // extern "C"
-#endif
-
-#endif /*ANDROID_EFFECT_VISUALIZER_CORE_H_*/
