/*
 * Copyright (c) 2019-2021, The Linux Foundation. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 *       copyright notice, this list of conditions and the following
 *       disclaimer in the documentation and/or other materials provided
 *       with the distribution.
 *     * Neither the name of The Linux Foundation nor the names of its
 *       contributors may be used to endorse or promote products derived
 *       from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
 * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
 * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * Changes from Qualcomm Innovation Center are provided under the following license:
 * Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
 * SPDX-License-Identifier: BSD-3-Clause-Clear
 */

/** \file pal_defs.h
 *  \brief struture, enum constant defintions of the
 *         PAL(Platform Audio Layer).
 *
 *  This file contains macros, constants, or global variables
 *  exposed to the client of PAL(Platform Audio Layer).
 */

#ifndef PAL_DEFS_H
#define PAL_DEFS_H

#include <stdint.h>
#include <stdlib.h>
#include <stdbool.h>

#ifdef __cplusplus

#include <map>
#include <string>

extern "C" {
#endif

#define MIXER_PATH_MAX_LENGTH 100
#define PAL_MAX_CHANNELS_SUPPORTED 64
#define MAX_KEYWORD_SUPPORTED 8

#define PAL_VERSION "1.0"

/** Audio stream handle */
typedef uint64_t pal_stream_handle_t;

/** Sound Trigger handle */
typedef uint64_t pal_st_handle_t;

/** PAL Audio format enumeration */
typedef enum {
    PAL_AUDIO_FMT_DEFAULT_PCM = 0x1,                         /**< PCM*/
    PAL_AUDIO_FMT_PCM_S16_LE = PAL_AUDIO_FMT_DEFAULT_PCM,   /**< 16 bit little endian PCM*/
    PAL_AUDIO_FMT_DEFAULT_COMPRESSED = 0x2,                  /**< Default Compressed*/
    PAL_AUDIO_FMT_MP3 = PAL_AUDIO_FMT_DEFAULT_COMPRESSED,
    PAL_AUDIO_FMT_AAC = 0x3,
    PAL_AUDIO_FMT_AAC_ADTS = 0x4,
    PAL_AUDIO_FMT_AAC_ADIF = 0x5,
    PAL_AUDIO_FMT_AAC_LATM = 0x6,
    PAL_AUDIO_FMT_WMA_STD = 0x7,
    PAL_AUDIO_FMT_ALAC = 0x8,
    PAL_AUDIO_FMT_APE = 0x9,
    PAL_AUDIO_FMT_WMA_PRO = 0xA,
    PAL_AUDIO_FMT_FLAC = 0xB,
    PAL_AUDIO_FMT_FLAC_OGG = 0xC,
    PAL_AUDIO_FMT_VORBIS = 0xD,
    PAL_AUDIO_FMT_AMR_NB = 0xE,
    PAL_AUDIO_FMT_AMR_WB = 0xF,
    PAL_AUDIO_FMT_AMR_WB_PLUS = 0x10,
    PAL_AUDIO_FMT_EVRC = 0x11,
    PAL_AUDIO_FMT_G711 = 0x12,
    PAL_AUDIO_FMT_QCELP = 0x13,
    PAL_AUDIO_FMT_PCM_S8 = 0x14,            /**< 8 Bit PCM*/
    PAL_AUDIO_FMT_PCM_S24_3LE = 0x15,       /**<24 bit packed little endian PCM*/
    PAL_AUDIO_FMT_PCM_S24_LE = 0x16,        /**<24bit in 32bit word (LSB aligned) little endian PCM*/
    PAL_AUDIO_FMT_PCM_S32_LE = 0x17,        /**< 32bit little endian PCM*/
    PAL_AUDIO_FMT_NON_PCM = 0xE0000000,     /* Internal Constant used for Non PCM format identification */
    PAL_AUDIO_FMT_COMPRESSED_RANGE_BEGIN = 0xF0000000,  /* Reserved for beginning of compressed codecs */
    PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_BEGIN   = 0xF0000F00,  /* Reserved for beginning of 3rd party codecs */
    PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_END     = 0xF0000FFF,  /* Reserved for beginning of 3rd party codecs */
    PAL_AUDIO_FMT_COMPRESSED_RANGE_END   = PAL_AUDIO_FMT_COMPRESSED_EXTENDED_RANGE_END /* Reserved for beginning of 3rd party codecs */
} pal_audio_fmt_t;

#define PCM_24_BIT_PACKED (0x6u)
#define PCM_32_BIT (0x3u)
#define PCM_16_BIT (0x1u)

#define SAMPLE_RATE_192000 192000

#ifdef __cplusplus
static const std::map<std::string, pal_audio_fmt_t> PalAudioFormatMap
{
    { "PCM",  PAL_AUDIO_FMT_PCM_S16_LE},
    { "PCM_S8",  PAL_AUDIO_FMT_PCM_S8},
    { "PCM_S16_LE",  PAL_AUDIO_FMT_PCM_S16_LE},
    { "PCM_S24_3LE",  PAL_AUDIO_FMT_PCM_S24_3LE},
    { "PCM_S24_LE",  PAL_AUDIO_FMT_PCM_S24_LE},
    { "PCM_S32_LE",  PAL_AUDIO_FMT_PCM_S32_LE},
    { "MP3",  PAL_AUDIO_FMT_MP3},
    { "AAC",  PAL_AUDIO_FMT_AAC},
    { "AAC_ADTS",  PAL_AUDIO_FMT_AAC_ADTS},
    { "AAC_ADIF",  PAL_AUDIO_FMT_AAC_ADIF},
    { "AAC_LATM",  PAL_AUDIO_FMT_AAC_LATM},
    { "WMA_STD",  PAL_AUDIO_FMT_WMA_STD},
    { "ALAC", PAL_AUDIO_FMT_ALAC},
    { "APE", PAL_AUDIO_FMT_APE},
    { "WMA_PRO", PAL_AUDIO_FMT_WMA_PRO},
    { "FLAC", PAL_AUDIO_FMT_FLAC},
    { "FLAC_OGG", PAL_AUDIO_FMT_FLAC_OGG},
    { "VORBIS", PAL_AUDIO_FMT_VORBIS},
    { "AMR_NB", PAL_AUDIO_FMT_AMR_NB},
    { "AMR_WB", PAL_AUDIO_FMT_AMR_WB},
    { "AMR_WB_PLUS", PAL_AUDIO_FMT_AMR_WB_PLUS},
    { "EVRC", PAL_AUDIO_FMT_EVRC},
    { "G711", PAL_AUDIO_FMT_G711},
    { "QCELP", PAL_AUDIO_FMT_QCELP}

};
#endif

struct aac_enc_cfg {
    uint16_t aac_enc_mode; /**< AAC encoder mode */
    uint16_t aac_fmt_flag; /**< AAC format flag */
};

struct pal_snd_enc_aac {
    uint32_t aac_bit_rate;
    struct aac_enc_cfg enc_cfg;
};

struct pal_snd_dec_aac {
    uint16_t audio_obj_type;
    uint16_t pce_bits_size;
};

struct pal_snd_dec_wma {
    uint32_t fmt_tag;
    uint32_t super_block_align;
    uint32_t bits_per_sample;
    uint32_t channelmask;
    uint32_t encodeopt;
    uint32_t encodeopt1;
    uint32_t encodeopt2;
    uint32_t avg_bit_rate;
};

struct pal_snd_dec_alac {
    uint32_t frame_length;
    uint8_t compatible_version;
    uint8_t bit_depth;
    uint8_t pb;
    uint8_t mb;
    uint8_t kb;
    uint8_t num_channels;
    uint16_t max_run;
    uint32_t max_frame_bytes;
    uint32_t avg_bit_rate;
    uint32_t sample_rate;
    uint32_t channel_layout_tag;
};

struct pal_snd_dec_ape {
    uint16_t compatible_version;
    uint16_t compression_level;
    uint32_t format_flags;
    uint32_t blocks_per_frame;
    uint32_t final_frame_blocks;
    uint32_t total_frames;
    uint16_t bits_per_sample;
    uint16_t num_channels;
    uint32_t sample_rate;
    uint32_t seek_table_present;
};

struct pal_snd_dec_flac {
    uint16_t sample_size;
    uint16_t min_blk_size;
    uint16_t max_blk_size;
    uint16_t min_frame_size;
    uint16_t max_frame_size;
};

struct pal_snd_dec_vorbis {
    uint32_t bit_stream_fmt;
};

typedef struct pal_key_value_pair_s {
    uint32_t key; /**< key */
    uint32_t value; /**< value */
} pal_key_value_pair_t;

typedef struct pal_key_vector_s {
    size_t num_tkvs;  /**< number of key value pairs */
    pal_key_value_pair_t kvp[];  /**< vector of key value pairs */
} pal_key_vector_t;

typedef enum {
    PARAM_NONTKV,
    PARAM_TKV,
} pal_param_type_t;

typedef struct pal_effect_custom_payload_s {
    uint32_t paramId;
    uint32_t data[];
} pal_effect_custom_payload_t;

typedef struct effect_pal_payload_s {
    pal_param_type_t isTKV;      /* payload type: 0->non-tkv 1->tkv*/
    uint32_t tag;
    uint32_t  payloadSize;
    uint32_t  payload[]; /* TKV uses pal_key_vector_t, while nonTKV uses pal_effect_custom_payload_t */
} effect_pal_payload_t;

/* Type of Modes for Speaker Protection */
typedef enum {
    PAL_SP_MODE_DYNAMIC_CAL = 1,
    PAL_SP_MODE_FACTORY_TEST,
    PAL_SP_MODE_V_VALIDATION,
} pal_spkr_prot_mode;

/* Payload For ID: PAL_PARAM_ID_SP_MODE
 * Description   : Values for Speaker protection modes
 */
typedef struct pal_spkr_prot_payload {
    uint32_t spkrHeatupTime;         /* Wait time in mili seconds to heat up the
                                      * speaker before collecting statistics  */

    uint32_t operationModeRunTime;   /* Time period in  milli seconds when
                                      * statistics are collected */

    pal_spkr_prot_mode operationMode;/* Type of mode for which request is raised */
} pal_spkr_prot_payload;

typedef enum {
    GEF_PARAM_READ = 0,
    GEF_PARAM_WRITE,
} gef_param_rw_t;

/** Audio parameter data*/
typedef union {
    struct pal_snd_dec_aac aac_dec;
    struct pal_snd_dec_wma wma_dec;
    struct pal_snd_dec_alac alac_dec;
    struct pal_snd_dec_ape ape_dec;
    struct pal_snd_dec_flac flac_dec;
    struct pal_snd_dec_vorbis vorbis_dec;
} pal_snd_dec_t;

/** Audio encoder parameter data*/
typedef union {
    struct pal_snd_enc_aac aac_enc;
} pal_snd_enc_t;

/** Audio parameter data*/
typedef struct pal_param_payload_s {
    uint32_t payload_size;
    uint8_t payload[];
} pal_param_payload;

typedef struct gef_payload_s {
    pal_key_vector_t *graph;
    bool persist;
    effect_pal_payload_t data;
} gef_payload_t;

typedef enum {
    LPI_VOTE,
    NLPI_VOTE,
    AVOID_VOTE,
} vote_type_t;

/** Audio channel map enumeration*/
typedef enum {
    PAL_CHMAP_CHANNEL_FL = 1,                      /**< Front right channel. */
    PAL_CHMAP_CHANNEL_FR = 2,                      /**< Front center channel. */
    PAL_CHMAP_CHANNEL_C = 3,                       /**< Left surround channel. */
    PAL_CHMAP_CHANNEL_LS = 4,                      /** Right surround channel. */
    PAL_CHMAP_CHANNEL_RS = 5,                      /** Low frequency effect channel. */
    PAL_CHMAP_CHANNEL_LFE = 6,                     /** Center surround channel; */
    PAL_CHMAP_CHANNEL_RC = 7,                      /**< rear center channel. */
    PAL_CHMAP_CHANNEL_CB = PAL_CHMAP_CHANNEL_RC,   /**< center back channel. */
    PAL_CHMAP_CHANNEL_LB = 8,                      /**< rear left channel. */
    PAL_CHMAP_CHANNEL_RB = 9,                      /**<  rear right channel. */
    PAL_CHMAP_CHANNEL_TS = 10,                     /**< Top surround channel. */
    PAL_CHMAP_CHANNEL_CVH = 11,                    /**< Center vertical height channel.*/
    PAL_CHMAP_CHANNEL_TFC = PAL_CHMAP_CHANNEL_CVH, /**< Top front center channel. */
    PAL_CHMAP_CHANNEL_MS = 12,                     /**< Mono surround channel. */
    PAL_CHMAP_CHANNEL_FLC = 13,                    /**< Front left of center channel. */
    PAL_CHMAP_CHANNEL_FRC = 14,                    /**< Front right of center channel. */
    PAL_CHMAP_CHANNEL_RLC = 15,                    /**< Rear left of center channel. */
    PAL_CHMAP_CHANNEL_RRC = 16,                    /**< Rear right of center channel. */
    PAL_CHMAP_CHANNEL_LFE2 = 17,                   /**< Secondary low frequency effect channel. */
    PAL_CHMAP_CHANNEL_SL = 18,                     /**< Side left channel. */
    PAL_CHMAP_CHANNEL_SR = 19,                     /**< Side right channel. */
    PAL_CHMAP_CHANNEL_TFL = 20,                    /**< Top front left channel. */
    PAL_CHMAP_CHANNEL_LVH = PAL_CHMAP_CHANNEL_TFL, /**< Right vertical height channel */
    PAL_CHMAP_CHANNEL_TFR = 21,                    /**< Top front right channel. */
    PAL_CHMAP_CHANNEL_RVH = PAL_CHMAP_CHANNEL_TFR, /**< Right vertical height channel. */
    PAL_CHMAP_CHANNEL_TC = 22,                     /**< Top center channel. */
    PAL_CHMAP_CHANNEL_TBL = 23,                    /**< Top back left channel. */
    PAL_CHMAP_CHANNEL_TBR = 24,                    /**< Top back right channel. */
    PAL_CHMAP_CHANNEL_TSL = 25,                    /**< Top side left channel. */
    PAL_CHMAP_CHANNEL_TSR = 26,                    /**< Top side right channel. */
    PAL_CHMAP_CHANNEL_TBC = 27,                    /**< Top back center channel. */
    PAL_CHMAP_CHANNEL_BFC = 28,                    /**< Bottom front center channel. */
    PAL_CHMAP_CHANNEL_BFL = 29,                    /**< Bottom front left channel. */
    PAL_CHMAP_CHANNEL_BFR = 30,                    /**< Bottom front right channel. */
    PAL_CHMAP_CHANNEL_LW = 31,                     /**< Left wide channel. */
    PAL_CHMAP_CHANNEL_RW = 32,                     /**< Right wide channel. */
    PAL_CHMAP_CHANNEL_LSD = 33,                    /**< Left side direct channel. */
    PAL_CHMAP_CHANNEL_RSD = 34,                    /**< Left side direct channel. */
} pal_channel_map;

/** Audio channel info data structure */
struct pal_channel_info {
    uint16_t channels;      /**< number of channels*/
    uint8_t  ch_map[PAL_MAX_CHANNELS_SUPPORTED]; /**< ch_map value per channel. */
};

/** Audio stream direction enumeration */
typedef enum {
    PAL_AUDIO_OUTPUT        = 0x1, /**< playback usecases*/
    PAL_AUDIO_INPUT         = 0x2, /**< capture/voice activation usecases*/
    PAL_AUDIO_INPUT_OUTPUT  = 0x3, /**< transcode usecases*/
} pal_stream_direction_t;

/** Audio Voip TX Effect enumeration */
typedef enum {
    PAL_AUDIO_EFFECT_NONE      = 0x0, /**< No audio effect ie., EC_OFF_NS_OFF*/
    PAL_AUDIO_EFFECT_EC        = 0x1, /**< Echo Cancellation ie., EC_ON_NS_OFF*/
    PAL_AUDIO_EFFECT_NS        = 0x2, /**< Noise Suppression ie., NS_ON_EC_OFF*/
    PAL_AUDIO_EFFECT_ECNS      = 0x3, /**< EC + NS*/
} pal_audio_effect_t;

/** Audio stream types */
typedef enum {
    PAL_STREAM_LOW_LATENCY = 1,           /**< :low latency, higher power*/
    PAL_STREAM_DEEP_BUFFER = 2,           /**< :low power, higher latency*/
    PAL_STREAM_COMPRESSED = 3,            /**< :compresssed audio*/
    PAL_STREAM_VOIP = 4,                  /**< :pcm voip audio*/
    PAL_STREAM_VOIP_RX = 5,               /**< :pcm voip audio downlink*/
    PAL_STREAM_VOIP_TX = 6,               /**< :pcm voip audio uplink*/
    PAL_STREAM_VOICE_CALL_MUSIC = 7,      /**< :incall music */
    PAL_STREAM_GENERIC = 8,               /**< :generic playback audio*/
    PAL_STREAM_RAW = 9,                   /**< pcm no post processing*/
    PAL_STREAM_VOICE_RECOGNITION = 10,     /**< voice recognition*/
    PAL_STREAM_VOICE_CALL_RECORD = 11,    /**< incall record */
    PAL_STREAM_VOICE_CALL_TX = 12,        /**< incall record, uplink */
    PAL_STREAM_VOICE_CALL_RX_TX = 13,     /**< incall record, uplink & Downlink */
    PAL_STREAM_VOICE_CALL = 14,           /**< voice call */
    PAL_STREAM_LOOPBACK = 15,             /**< loopback */
    PAL_STREAM_TRANSCODE = 16,            /**< audio transcode */
    PAL_STREAM_VOICE_UI = 17,             /**< voice ui */
    PAL_STREAM_PCM_OFFLOAD = 18,          /**< pcm offload audio */
    PAL_STREAM_ULTRA_LOW_LATENCY = 19,    /**< pcm ULL audio */
    PAL_STREAM_PROXY = 20,                /**< pcm proxy audio */
    PAL_STREAM_NON_TUNNEL = 21,           /**< NT Mode session */
    PAL_STREAM_HAPTICS = 22,              /**< Haptics Stream */
    PAL_STREAM_ACD = 23,                  /**< ACD Stream */
    PAL_STREAM_CONTEXT_PROXY = 24,        /**< Context Proxy Stream */
    PAL_STREAM_SENSOR_PCM_DATA = 25,      /**< Sensor Pcm Data Stream */
    PAL_STREAM_ULTRASOUND = 26,           /**< Ultrasound Proximity detection */
    PAL_STREAM_SPATIAL_AUDIO = 27,        /**< Spatial audio playback */
    PAL_STREAM_MAX,                       /**< max stream types - add new ones above */
} pal_stream_type_t;

/** Audio devices available for enabling streams */
typedef enum {
    //OUTPUT DEVICES
    PAL_DEVICE_OUT_MIN = 0,
    PAL_DEVICE_NONE = 1, /**< for transcode usecases*/
    PAL_DEVICE_OUT_HANDSET = 2,
    PAL_DEVICE_OUT_SPEAKER = 3,
    PAL_DEVICE_OUT_WIRED_HEADSET = 4,
    PAL_DEVICE_OUT_WIRED_HEADPHONE = 5, /**< Wired headphones without mic*/
    PAL_DEVICE_OUT_LINE = 6,
    PAL_DEVICE_OUT_BLUETOOTH_SCO = 7,
    PAL_DEVICE_OUT_BLUETOOTH_A2DP = 8,
    PAL_DEVICE_OUT_AUX_DIGITAL = 9,
    PAL_DEVICE_OUT_HDMI = 10,
    PAL_DEVICE_OUT_USB_DEVICE = 11,
    PAL_DEVICE_OUT_USB_HEADSET = 12,
    PAL_DEVICE_OUT_SPDIF = 13,
    PAL_DEVICE_OUT_FM = 14,
    PAL_DEVICE_OUT_AUX_LINE = 15,
    PAL_DEVICE_OUT_PROXY = 16,
    PAL_DEVICE_OUT_AUX_DIGITAL_1 = 17,
    PAL_DEVICE_OUT_HEARING_AID = 18,
    PAL_DEVICE_OUT_HAPTICS_DEVICE = 19,
    PAL_DEVICE_OUT_ULTRASOUND = 20,
    PAL_DEVICE_OUT_ULTRASOUND_DEDICATED = 21,
    PAL_DEVICE_OUT_BLUETOOTH_BLE = 22,
    PAL_DEVICE_OUT_BLUETOOTH_BLE_BROADCAST = 23,
    // Add new OUT devices here, increment MAX and MIN below when you do so
    PAL_DEVICE_OUT_MAX = 24,
    //INPUT DEVICES
    PAL_DEVICE_IN_MIN = PAL_DEVICE_OUT_MAX,
    PAL_DEVICE_IN_HANDSET_MIC = PAL_DEVICE_IN_MIN +1,
    PAL_DEVICE_IN_SPEAKER_MIC = PAL_DEVICE_IN_MIN + 2,
    PAL_DEVICE_IN_BLUETOOTH_SCO_HEADSET = PAL_DEVICE_IN_MIN + 3,
    PAL_DEVICE_IN_WIRED_HEADSET = PAL_DEVICE_IN_MIN + 4,
    PAL_DEVICE_IN_AUX_DIGITAL = PAL_DEVICE_IN_MIN + 5,
    PAL_DEVICE_IN_HDMI = PAL_DEVICE_IN_MIN + 6,
    PAL_DEVICE_IN_USB_ACCESSORY = PAL_DEVICE_IN_MIN + 7,
    PAL_DEVICE_IN_USB_DEVICE = PAL_DEVICE_IN_MIN + 8,
    PAL_DEVICE_IN_USB_HEADSET = PAL_DEVICE_IN_MIN + 9,
    PAL_DEVICE_IN_FM_TUNER = PAL_DEVICE_IN_MIN + 10,
    PAL_DEVICE_IN_LINE = PAL_DEVICE_IN_MIN + 11,
    PAL_DEVICE_IN_SPDIF = PAL_DEVICE_IN_MIN + 12,
    PAL_DEVICE_IN_PROXY = PAL_DEVICE_IN_MIN + 13,
    PAL_DEVICE_IN_HANDSET_VA_MIC = PAL_DEVICE_IN_MIN + 14,
    PAL_DEVICE_IN_BLUETOOTH_A2DP = PAL_DEVICE_IN_MIN + 15,
    PAL_DEVICE_IN_HEADSET_VA_MIC = PAL_DEVICE_IN_MIN + 16,
    PAL_DEVICE_IN_VI_FEEDBACK = PAL_DEVICE_IN_MIN + 17,
    PAL_DEVICE_IN_TELEPHONY_RX = PAL_DEVICE_IN_MIN + 18,
    PAL_DEVICE_IN_ULTRASOUND_MIC = PAL_DEVICE_IN_MIN +19,
    PAL_DEVICE_IN_EXT_EC_REF = PAL_DEVICE_IN_MIN + 20,
    PAL_DEVICE_IN_ECHO_REF = PAL_DEVICE_IN_MIN + 21,
    PAL_DEVICE_IN_HAPTICS_VI_FEEDBACK = PAL_DEVICE_IN_MIN + 22,
    PAL_DEVICE_IN_BLUETOOTH_BLE = PAL_DEVICE_IN_MIN + 23,
    PAL_DEVICE_IN_CPS_FEEDBACK = PAL_DEVICE_IN_MIN + 24,
    PAL_DEVICE_IN_CPS2_FEEDBACK = PAL_DEVICE_IN_MIN + 25,
    // Add new IN devices here, increment MAX and MIN below when you do so
    PAL_DEVICE_IN_MAX = PAL_DEVICE_IN_MIN + 26,
} pal_device_id_t;

typedef enum {
    VOICEMMODE1 = 0x11C05000,
    VOICEMMODE2 = 0x11DC5000,
    VOICELBMMODE1 = 0x12006000,
    VOICELBMMODE2 = 0x121C6000,
} pal_VSID_t;

typedef enum {
    PAL_STREAM_LOOPBACK_PCM,
    PAL_STREAM_LOOPBACK_HFP_RX,
    PAL_STREAM_LOOPBACK_HFP_TX,
    PAL_STREAM_LOOPBACK_COMPRESS,
    PAL_STREAM_LOOPBACK_FM,
    PAL_STREAM_LOOPBACK_KARAOKE,
    PAL_STREAM_LOOPBACK_PLAYBACK_ONLY,
    PAL_STREAM_LOOPBACK_CAPTURE_ONLY,
} pal_stream_loopback_type_t;

typedef enum {
    PAL_STREAM_PROXY_TX_VISUALIZER,
    PAL_STREAM_PROXY_TX_WFD,
    PAL_STREAM_PROXY_TX_TELEPHONY_RX,
} pal_stream_proxy_tx_type_t;

typedef enum {
    PAL_STREAM_HAPTICS_TOUCH = 1,
    PAL_STREAM_HAPTICS_RINGTONE,
} pal_stream_haptics_type_t;

#ifdef __cplusplus
static const std::map<std::string, pal_device_id_t> deviceIdLUT {
    {std::string{ "PAL_DEVICE_OUT_MIN" },                  PAL_DEVICE_OUT_MIN},
    {std::string{ "PAL_DEVICE_NONE" },                     PAL_DEVICE_NONE},
    {std::string{ "PAL_DEVICE_OUT_HANDSET" },              PAL_DEVICE_OUT_HANDSET},
    {std::string{ "PAL_DEVICE_OUT_SPEAKER" },              PAL_DEVICE_OUT_SPEAKER},
    {std::string{ "PAL_DEVICE_OUT_WIRED_HEADSET" },        PAL_DEVICE_OUT_WIRED_HEADSET},
    {std::string{ "PAL_DEVICE_OUT_WIRED_HEADPHONE" },      PAL_DEVICE_OUT_WIRED_HEADPHONE},
    {std::string{ "PAL_DEVICE_OUT_LINE" },                 PAL_DEVICE_OUT_LINE},
    {std::string{ "PAL_DEVICE_OUT_BLUETOOTH_SCO" },        PAL_DEVICE_OUT_BLUETOOTH_SCO},
    {std::string{ "PAL_DEVICE_OUT_BLUETOOTH_A2DP" },       PAL_DEVICE_OUT_BLUETOOTH_A2DP},
    {std::string{ "PAL_DEVICE_OUT_BLUETOOTH_BLE" },        PAL_DEVICE_OUT_BLUETOOTH_BLE},
    {std::string{ "PAL_DEVICE_OUT_BLUETOOTH_BLE_BROADCAST" }, PAL_DEVICE_OUT_BLUETOOTH_BLE_BROADCAST},
    {std::string{ "PAL_DEVICE_OUT_AUX_DIGITAL" },          PAL_DEVICE_OUT_AUX_DIGITAL},
    {std::string{ "PAL_DEVICE_OUT_HDMI" },                 PAL_DEVICE_OUT_HDMI},
    {std::string{ "PAL_DEVICE_OUT_USB_DEVICE" },           PAL_DEVICE_OUT_USB_DEVICE},
    {std::string{ "PAL_DEVICE_OUT_USB_HEADSET" },          PAL_DEVICE_OUT_USB_HEADSET},
    {std::string{ "PAL_DEVICE_OUT_SPDIF" },                PAL_DEVICE_OUT_SPDIF},
    {std::string{ "PAL_DEVICE_OUT_FM" },                   PAL_DEVICE_OUT_FM},
    {std::string{ "PAL_DEVICE_OUT_AUX_LINE" },             PAL_DEVICE_OUT_AUX_LINE},
    {std::string{ "PAL_DEVICE_OUT_PROXY" },                PAL_DEVICE_OUT_PROXY},
    {std::string{ "PAL_DEVICE_OUT_AUX_DIGITAL_1" },        PAL_DEVICE_OUT_AUX_DIGITAL_1},
    {std::string{ "PAL_DEVICE_OUT_HEARING_AID" },          PAL_DEVICE_OUT_HEARING_AID},
    {std::string{ "PAL_DEVICE_OUT_HAPTICS_DEVICE" },       PAL_DEVICE_OUT_HAPTICS_DEVICE},
    {std::string{ "PAL_DEVICE_OUT_ULTRASOUND" },           PAL_DEVICE_OUT_ULTRASOUND},
    {std::string{ "PAL_DEVICE_OUT_ULTRASOUND_DEDICATED" }, PAL_DEVICE_OUT_ULTRASOUND_DEDICATED},
    {std::string{ "PAL_DEVICE_OUT_MAX" },                  PAL_DEVICE_OUT_MAX},
    {std::string{ "PAL_DEVICE_IN_HANDSET_MIC" },           PAL_DEVICE_IN_HANDSET_MIC},
    {std::string{ "PAL_DEVICE_IN_SPEAKER_MIC" },           PAL_DEVICE_IN_SPEAKER_MIC},
    {std::string{ "PAL_DEVICE_IN_BLUETOOTH_SCO_HEADSET" }, PAL_DEVICE_IN_BLUETOOTH_SCO_HEADSET},
    {std::string{ "PAL_DEVICE_IN_WIRED_HEADSET" },         PAL_DEVICE_IN_WIRED_HEADSET},
    {std::string{ "PAL_DEVICE_IN_AUX_DIGITAL" },           PAL_DEVICE_IN_AUX_DIGITAL},
    {std::string{ "PAL_DEVICE_IN_HDMI" },                  PAL_DEVICE_IN_HDMI},
    {std::string{ "PAL_DEVICE_IN_USB_ACCESSORY" },         PAL_DEVICE_IN_USB_ACCESSORY},
    {std::string{ "PAL_DEVICE_IN_USB_DEVICE" },            PAL_DEVICE_IN_USB_DEVICE},
    {std::string{ "PAL_DEVICE_IN_USB_HEADSET" },           PAL_DEVICE_IN_USB_HEADSET},
    {std::string{ "PAL_DEVICE_IN_FM_TUNER" },              PAL_DEVICE_IN_FM_TUNER},
    {std::string{ "PAL_DEVICE_IN_LINE" },                  PAL_DEVICE_IN_LINE},
    {std::string{ "PAL_DEVICE_IN_SPDIF" },                 PAL_DEVICE_IN_SPDIF},
    {std::string{ "PAL_DEVICE_IN_PROXY" },                 PAL_DEVICE_IN_PROXY},
    {std::string{ "PAL_DEVICE_IN_HANDSET_VA_MIC" },        PAL_DEVICE_IN_HANDSET_VA_MIC},
    {std::string{ "PAL_DEVICE_IN_BLUETOOTH_A2DP" },        PAL_DEVICE_IN_BLUETOOTH_A2DP},
    {std::string{ "PAL_DEVICE_IN_BLUETOOTH_BLE" },         PAL_DEVICE_IN_BLUETOOTH_BLE},
    {std::string{ "PAL_DEVICE_IN_HEADSET_VA_MIC" },        PAL_DEVICE_IN_HEADSET_VA_MIC},
    {std::string{ "PAL_DEVICE_IN_VI_FEEDBACK" },           PAL_DEVICE_IN_VI_FEEDBACK},
    {std::string{ "PAL_DEVICE_IN_TELEPHONY_RX" },          PAL_DEVICE_IN_TELEPHONY_RX},
    {std::string{ "PAL_DEVICE_IN_ULTRASOUND_MIC" },        PAL_DEVICE_IN_ULTRASOUND_MIC},
    {std::string{ "PAL_DEVICE_IN_EXT_EC_REF" },            PAL_DEVICE_IN_EXT_EC_REF},
    {std::string{ "PAL_DEVICE_IN_ECHO_REF" },              PAL_DEVICE_IN_ECHO_REF},
    {std::string{ "PAL_DEVICE_IN_HAPTICS_VI_FEEDBACK" },   PAL_DEVICE_IN_HAPTICS_VI_FEEDBACK},
    {std::string{ "PAL_DEVICE_IN_CPS_FEEDBACK" },          PAL_DEVICE_IN_CPS_FEEDBACK},
    {std::string{ "PAL_DEVICE_IN_CPS2_FEEDBACK" },          PAL_DEVICE_IN_CPS2_FEEDBACK},
};

//reverse mapping
static const std::map<uint32_t, std::string> deviceNameLUT {
    {PAL_DEVICE_OUT_MIN,                  std::string{"PAL_DEVICE_OUT_MIN"}},
    {PAL_DEVICE_NONE,                     std::string{"PAL_DEVICE_NONE"}},
    {PAL_DEVICE_OUT_HANDSET,              std::string{"PAL_DEVICE_OUT_HANDSET"}},
    {PAL_DEVICE_OUT_SPEAKER,              std::string{"PAL_DEVICE_OUT_SPEAKER"}},
    {PAL_DEVICE_OUT_WIRED_HEADSET,        std::string{"PAL_DEVICE_OUT_WIRED_HEADSET"}},
    {PAL_DEVICE_OUT_WIRED_HEADPHONE,      std::string{"PAL_DEVICE_OUT_WIRED_HEADPHONE"}},
    {PAL_DEVICE_OUT_LINE,                 std::string{"PAL_DEVICE_OUT_LINE"}},
    {PAL_DEVICE_OUT_BLUETOOTH_SCO,        std::string{"PAL_DEVICE_OUT_BLUETOOTH_SCO"}},
    {PAL_DEVICE_OUT_BLUETOOTH_A2DP,       std::string{"PAL_DEVICE_OUT_BLUETOOTH_A2DP"}},
    {PAL_DEVICE_OUT_BLUETOOTH_BLE,        std::string{"PAL_DEVICE_OUT_BLUETOOTH_BLE"}},
    {PAL_DEVICE_OUT_BLUETOOTH_BLE_BROADCAST, std::string{"PAL_DEVICE_OUT_BLUETOOTH_BLE_BROADCAST"}},
    {PAL_DEVICE_OUT_AUX_DIGITAL,          std::string{"PAL_DEVICE_OUT_AUX_DIGITAL"}},
    {PAL_DEVICE_OUT_HDMI,                 std::string{"PAL_DEVICE_OUT_HDMI"}},
    {PAL_DEVICE_OUT_USB_DEVICE,           std::string{"PAL_DEVICE_OUT_USB_DEVICE"}},
    {PAL_DEVICE_OUT_USB_HEADSET,          std::string{"PAL_DEVICE_OUT_USB_HEADSET"}},
    {PAL_DEVICE_OUT_SPDIF,                std::string{"PAL_DEVICE_OUT_SPDIF"}},
    {PAL_DEVICE_OUT_FM,                   std::string{"PAL_DEVICE_OUT_FM"}},
    {PAL_DEVICE_OUT_AUX_LINE,             std::string{"PAL_DEVICE_OUT_AUX_LINE"}},
    {PAL_DEVICE_OUT_PROXY,                std::string{"PAL_DEVICE_OUT_PROXY"}},
    {PAL_DEVICE_OUT_AUX_DIGITAL_1,        std::string{"PAL_DEVICE_OUT_AUX_DIGITAL_1"}},
    {PAL_DEVICE_OUT_HEARING_AID,          std::string{"PAL_DEVICE_OUT_HEARING_AID"}},
    {PAL_DEVICE_OUT_HAPTICS_DEVICE,       std::string{"PAL_DEVICE_OUT_HAPTICS_DEVICE"}},
    {PAL_DEVICE_OUT_ULTRASOUND,           std::string{"PAL_DEVICE_OUT_ULTRASOUND"}},
    {PAL_DEVICE_OUT_ULTRASOUND_DEDICATED, std::string{"PAL_DEVICE_OUT_ULTRASOUND_DEDICATED"}},
    {PAL_DEVICE_OUT_MAX,                  std::string{"PAL_DEVICE_OUT_MAX"}},
    {PAL_DEVICE_IN_HANDSET_MIC,           std::string{"PAL_DEVICE_IN_HANDSET_MIC"}},
    {PAL_DEVICE_IN_SPEAKER_MIC,           std::string{"PAL_DEVICE_IN_SPEAKER_MIC"}},
    {PAL_DEVICE_IN_BLUETOOTH_SCO_HEADSET, std::string{"PAL_DEVICE_IN_BLUETOOTH_SCO_HEADSET"}},
    {PAL_DEVICE_IN_WIRED_HEADSET,         std::string{"PAL_DEVICE_IN_WIRED_HEADSET"}},
    {PAL_DEVICE_IN_AUX_DIGITAL,           std::string{"PAL_DEVICE_IN_AUX_DIGITAL"}},
    {PAL_DEVICE_IN_HDMI,                  std::string{"PAL_DEVICE_IN_HDMI"}},
    {PAL_DEVICE_IN_USB_ACCESSORY,         std::string{"PAL_DEVICE_IN_USB_ACCESSORY"}},
    {PAL_DEVICE_IN_USB_DEVICE,            std::string{"PAL_DEVICE_IN_USB_DEVICE"}},
    {PAL_DEVICE_IN_USB_HEADSET,           std::string{"PAL_DEVICE_IN_USB_HEADSET"}},
    {PAL_DEVICE_IN_FM_TUNER,              std::string{"PAL_DEVICE_IN_FM_TUNER"}},
    {PAL_DEVICE_IN_LINE,                  std::string{"PAL_DEVICE_IN_LINE"}},
    {PAL_DEVICE_IN_SPDIF,                 std::string{"PAL_DEVICE_IN_SPDIF"}},
    {PAL_DEVICE_IN_PROXY,                 std::string{"PAL_DEVICE_IN_PROXY"}},
    {PAL_DEVICE_IN_HANDSET_VA_MIC,        std::string{"PAL_DEVICE_IN_HANDSET_VA_MIC"}},
    {PAL_DEVICE_IN_BLUETOOTH_A2DP,        std::string{"PAL_DEVICE_IN_BLUETOOTH_A2DP"}},
    {PAL_DEVICE_IN_BLUETOOTH_BLE,         std::string{"PAL_DEVICE_IN_BLUETOOTH_BLE"}},
    {PAL_DEVICE_IN_HEADSET_VA_MIC,        std::string{"PAL_DEVICE_IN_HEADSET_VA_MIC"}},
    {PAL_DEVICE_IN_VI_FEEDBACK,           std::string{"PAL_DEVICE_IN_VI_FEEDBACK"}},
    {PAL_DEVICE_IN_TELEPHONY_RX,          std::string{"PAL_DEVICE_IN_TELEPHONY_RX"}},
    {PAL_DEVICE_IN_ULTRASOUND_MIC,        std::string{"PAL_DEVICE_IN_ULTRASOUND_MIC"}},
    {PAL_DEVICE_IN_EXT_EC_REF,            std::string{"PAL_DEVICE_IN_EXT_EC_REF"}},
    {PAL_DEVICE_IN_ECHO_REF,              std::string{"PAL_DEVICE_IN_ECHO_REF"}},
    {PAL_DEVICE_IN_HAPTICS_VI_FEEDBACK,   std::string{"PAL_DEVICE_IN_HAPTICS_VI_FEEDBACK"}},
    {PAL_DEVICE_IN_CPS_FEEDBACK,          std::string{"PAL_DEVICE_IN_CPS_FEEDBACK"}},
    {PAL_DEVICE_IN_CPS2_FEEDBACK,          std::string{"PAL_DEVICE_IN_CPS2_FEEDBACK"}}
};

const std::map<std::string, uint32_t> usecaseIdLUT {
    {std::string{ "PAL_STREAM_LOW_LATENCY" },              PAL_STREAM_LOW_LATENCY},
    {std::string{ "PAL_STREAM_DEEP_BUFFER" },              PAL_STREAM_DEEP_BUFFER},
    {std::string{ "PAL_STREAM_COMPRESSED" },               PAL_STREAM_COMPRESSED},
    {std::string{ "PAL_STREAM_VOIP" },                     PAL_STREAM_VOIP},
    {std::string{ "PAL_STREAM_VOIP_RX" },                  PAL_STREAM_VOIP_RX},
    {std::string{ "PAL_STREAM_VOIP_TX" },                  PAL_STREAM_VOIP_TX},
    {std::string{ "PAL_STREAM_VOICE_CALL_MUSIC" },         PAL_STREAM_VOICE_CALL_MUSIC},
    {std::string{ "PAL_STREAM_GENERIC" },                  PAL_STREAM_GENERIC},
    {std::string{ "PAL_STREAM_RAW" },                      PAL_STREAM_RAW},
    {std::string{ "PAL_STREAM_VOICE_RECOGNITION" },        PAL_STREAM_VOICE_RECOGNITION},
    {std::string{ "PAL_STREAM_VOICE_CALL_RECORD" },        PAL_STREAM_VOICE_CALL_RECORD},
    {std::string{ "PAL_STREAM_VOICE_CALL_TX" },            PAL_STREAM_VOICE_CALL_TX},
    {std::string{ "PAL_STREAM_VOICE_CALL_RX_TX" },         PAL_STREAM_VOICE_CALL_RX_TX},
    {std::string{ "PAL_STREAM_VOICE_CALL" },               PAL_STREAM_VOICE_CALL},
    {std::string{ "PAL_STREAM_LOOPBACK" },                 PAL_STREAM_LOOPBACK},
    {std::string{ "PAL_STREAM_TRANSCODE" },                PAL_STREAM_TRANSCODE},
    {std::string{ "PAL_STREAM_VOICE_UI" },                 PAL_STREAM_VOICE_UI},
    {std::string{ "PAL_STREAM_PCM_OFFLOAD" },              PAL_STREAM_PCM_OFFLOAD},
    {std::string{ "PAL_STREAM_ULTRA_LOW_LATENCY" },        PAL_STREAM_ULTRA_LOW_LATENCY},
    {std::string{ "PAL_STREAM_PROXY" },                    PAL_STREAM_PROXY},
    {std::string{ "PAL_STREAM_NON_TUNNEL" },               PAL_STREAM_NON_TUNNEL},
    {std::string{ "PAL_STREAM_HAPTICS" },                  PAL_STREAM_HAPTICS},
    {std::string{ "PAL_STREAM_ACD" },                      PAL_STREAM_ACD},
    {std::string{ "PAL_STREAM_ULTRASOUND" },               PAL_STREAM_ULTRASOUND},
    {std::string{ "PAL_STREAM_SENSOR_PCM_DATA" },          PAL_STREAM_SENSOR_PCM_DATA},
    {std::string{ "PAL_STREAM_SPATIAL_AUDIO" },            PAL_STREAM_SPATIAL_AUDIO},
    {std::string{ "PAL_STREAM_CONTEXT_PROXY" },            PAL_STREAM_CONTEXT_PROXY},
};

/* Update the reverse mapping as well when new stream is added */
const std::map<uint32_t, std::string> streamNameLUT {
    {PAL_STREAM_LOW_LATENCY,        std::string{ "PAL_STREAM_LOW_LATENCY" } },
    {PAL_STREAM_DEEP_BUFFER,        std::string{ "PAL_STREAM_DEEP_BUFFER" } },
    {PAL_STREAM_COMPRESSED,         std::string{ "PAL_STREAM_COMPRESSED" } },
    {PAL_STREAM_VOIP,               std::string{ "PAL_STREAM_VOIP" } },
    {PAL_STREAM_VOIP_RX,            std::string{ "PAL_STREAM_VOIP_RX" } },
    {PAL_STREAM_VOIP_TX,            std::string{ "PAL_STREAM_VOIP_TX" } },
    {PAL_STREAM_VOICE_CALL_MUSIC,   std::string{ "PAL_STREAM_VOICE_CALL_MUSIC" } },
    {PAL_STREAM_GENERIC,            std::string{ "PAL_STREAM_GENERIC" } },
    {PAL_STREAM_RAW,                std::string{ "PAL_STREAM_RAW" } },
    {PAL_STREAM_VOICE_RECOGNITION,  std::string{ "PAL_STREAM_VOICE_RECOGNITION" } },
    {PAL_STREAM_VOICE_CALL_RECORD,  std::string{ "PAL_STREAM_VOICE_CALL_RECORD" } },
    {PAL_STREAM_VOICE_CALL_TX,      std::string{ "PAL_STREAM_VOICE_CALL_TX" } },
    {PAL_STREAM_VOICE_CALL_RX_TX,   std::string{ "PAL_STREAM_VOICE_CALL_RX_TX" } },
    {PAL_STREAM_VOICE_CALL,         std::string{ "PAL_STREAM_VOICE_CALL" } },
    {PAL_STREAM_LOOPBACK,           std::string{ "PAL_STREAM_LOOPBACK" } },
    {PAL_STREAM_TRANSCODE,          std::string{ "PAL_STREAM_TRANSCODE" } },
    {PAL_STREAM_VOICE_UI,           std::string{ "PAL_STREAM_VOICE_UI" } },
    {PAL_STREAM_PCM_OFFLOAD,        std::string{ "PAL_STREAM_PCM_OFFLOAD" } },
    {PAL_STREAM_ULTRA_LOW_LATENCY,  std::string{ "PAL_STREAM_ULTRA_LOW_LATENCY" } },
    {PAL_STREAM_PROXY,              std::string{ "PAL_STREAM_PROXY" } },
    {PAL_STREAM_NON_TUNNEL,         std::string{ "PAL_STREAM_NON_TUNNEL" } },
    {PAL_STREAM_HAPTICS,            std::string{ "PAL_STREAM_HAPTICS" } },
    {PAL_STREAM_ACD,                std::string{ "PAL_STREAM_ACD" } },
    {PAL_STREAM_ULTRASOUND,         std::string{ "PAL_STREAM_ULTRASOUND" } },
    {PAL_STREAM_SENSOR_PCM_DATA,    std::string{ "PAL_STREAM_SENSOR_PCM_DATA" } },
    {PAL_STREAM_SPATIAL_AUDIO,      std::string{ "PAL_STREAM_SPATIAL_AUDIO" } },
};

const std::map<uint32_t, std::string> vsidLUT {
    {VOICEMMODE1,    std::string{ "VOICEMMODE1" } },
    {VOICEMMODE2,    std::string{ "VOICEMMODE2" } },
    {VOICELBMMODE1,  std::string{ "VOICELBMMODE1" } },
    {VOICELBMMODE2,  std::string{ "VOICELBMMODE2" } },
};

const std::map<uint32_t, std::string> loopbackLUT {
    {PAL_STREAM_LOOPBACK_PCM,           std::string{ "PAL_STREAM_LOOPBACK_PCM" } },
    {PAL_STREAM_LOOPBACK_HFP_RX,        std::string{ "PAL_STREAM_LOOPBACK_HFP_RX" } },
    {PAL_STREAM_LOOPBACK_HFP_TX,        std::string{ "PAL_STREAM_LOOPBACK_HFP_TX" } },
    {PAL_STREAM_LOOPBACK_COMPRESS,      std::string{ "PAL_STREAM_LOOPBACK_COMPRESS" } },
    {PAL_STREAM_LOOPBACK_FM,            std::string{ "PAL_STREAM_LOOPBACK_FM" } },
    {PAL_STREAM_LOOPBACK_KARAOKE,       std::string{ "PAL_STREAM_LOOPBACK_KARAOKE" }},
    {PAL_STREAM_LOOPBACK_PLAYBACK_ONLY, std::string{ "PAL_STREAM_LOOPBACK_PLAYBACK_ONLY" } },
    {PAL_STREAM_LOOPBACK_CAPTURE_ONLY,  std::string{ "PAL_STREAM_LOOPBACK_CAPTURE_ONLY" } },
};

const std::map<uint32_t, std::string> hapticsLUT {
    {PAL_STREAM_HAPTICS_TOUCH,        std::string{ "PAL_STREAM_HAPTICS_TOUCH" } },
    {PAL_STREAM_HAPTICS_RINGTONE,     std::string{ "PAL_STREAM_HAPTICS_RINGTONE" } },
};

#endif


/* type of asynchronous write callback events. Mutually exclusive */
typedef enum {
    PAL_STREAM_CBK_EVENT_WRITE_READY, /* non blocking write completed */
    PAL_STREAM_CBK_EVENT_DRAIN_READY,  /* drain completed */
    PAL_STREAM_CBK_EVENT_PARTIAL_DRAIN_READY, /* partial drain completed */
    PAL_STREAM_CBK_EVENT_READ_DONE, /* stream hit some error, let AF take action */
    PAL_STREAM_CBK_EVENT_ERROR, /* stream hit some error, let AF take action */
} pal_stream_callback_event_t;

/* type of global callback events. */
typedef enum {
    PAL_SND_CARD_STATE,
} pal_global_callback_event_t;

struct pal_stream_info {
    int64_t version;                    /** version of structure*/
    int64_t size;                       /** size of structure*/
    int64_t duration_us;                /** duration in microseconds, -1 if unknown */
    bool has_video;                     /** optional, true if stream is tied to a video stream */
    bool is_streaming;                  /** true if streaming, false if local playback */
    int32_t loopback_type;              /** used only if stream_type is LOOPBACK. One of the */
                                        /** enums defined in enum pal_stream_loopback_type */
    int32_t tx_proxy_type;   /** enums defined in enum pal_stream_proxy_tx_types */
    int32_t haptics_type;    /** enums defined in enum pal_sream_haptics_types */
    //pal_audio_attributes_t usage;       /** Not sure if we make use of this */
};

typedef enum {
    INCALL_RECORD_VOICE_UPLINK = 1,
    INCALL_RECORD_VOICE_DOWNLINK,
    INCALL_RECORD_VOICE_UPLINK_DOWNLINK,
} pal_incall_record_direction;

struct pal_voice_record_info {
    int64_t version;                    /** version of structure*/
    int64_t size;                       /** size of structure*/
    pal_incall_record_direction record_direction;         /** use direction enum to indicate content to be record */
};

struct pal_voice_call_info {
     uint32_t VSID;
     uint32_t tty_mode;
};

typedef enum {
    PAL_TTY_OFF = 0,
    PAL_TTY_HCO = 1,
    PAL_TTY_VCO = 2,
    PAL_TTY_FULL = 3,
} pal_tty_t;

typedef union {
    struct pal_stream_info opt_stream_info; /* optional */
    struct pal_voice_record_info voice_rec_info; /* mandatory */
    struct pal_voice_call_info voice_call_info; /* manatory for voice call*/
} pal_stream_info_t;

/** Media configuraiton */
struct pal_media_config {
    uint32_t sample_rate;                /**< sample rate */
    uint32_t bit_width;                  /**< bit width */
    pal_audio_fmt_t aud_fmt_id;          /**< audio format id*/
    struct pal_channel_info ch_info;    /**< channel info */
};

/** Android Media configuraiton  */
/* dynamic media config for plugin devices, +1 so that the last entry is always 0 */
#define MAX_SUPPORTED_CHANNEL_MASKS (2 * 8)
#define MAX_SUPPORTED_FORMATS 15
#define MAX_SUPPORTED_SAMPLE_RATES 7
typedef struct dynamic_media_config {
    uint32_t sample_rate[MAX_SUPPORTED_SAMPLE_RATES+1];   /**< sample rate */
    uint32_t format[MAX_SUPPORTED_FORMATS+1];             /**< format */
    uint32_t mask[MAX_SUPPORTED_CHANNEL_MASKS + 1];       /**< channel mask */
    bool jack_status;                                     /**< input/output jack status*/
} dynamic_media_config_t;

/**  Available stream flags of an audio session*/
typedef enum {
    PAL_STREAM_FLAG_TIMESTAMP       = 0x1,  /**< Enable time stamps associated to audio buffers  */
    PAL_STREAM_FLAG_NON_BLOCKING    = 0x2,  /**< Stream IO operations are non blocking */
    PAL_STREAM_FLAG_MMAP            = 0x4,  /**< Stream Mode should be in MMAP*/
    PAL_STREAM_FLAG_MMAP_NO_IRQ     = 0x8,  /**< Stream Mode should be No IRQ */
    PAL_STREAM_FLAG_EXTERN_MEM      = 0x10, /**< Shared memory buffers allocated by client*/
    PAL_STREAM_FLAG_SRCM_INBAND     = 0x20, /**< MediaFormat change event inband with data buffers*/
    PAL_STREAM_FLAG_EOF             = 0x40, /**< MediaFormat change event inband with data buffers*/
} pal_stream_flags_t;

#define PAL_STREAM_FLAG_NON_BLOCKING_MASK 0x2
#define PAL_STREAM_FLAG_MMAP_MASK 0x4
#define PAL_STREAM_FLAG_MMAP_NO_IRQ_MASK 0x8

/**< PAL stream attributes to be specified, used in pal_stream_open cmd */
struct pal_stream_attributes {
    pal_stream_type_t type;                      /**<  stream type */
    pal_stream_info_t info;                      /**<  stream info */
    pal_stream_flags_t flags;                    /**<  stream flags */
    pal_stream_direction_t direction;            /**<  direction of the streams */
    struct pal_media_config in_media_config;     /**<  media config of the input audio samples */
    struct pal_media_config out_media_config;    /**<  media config of the output audio samples */
};

/**< Key value pair to identify the topology of a usecase from default  */
struct modifier_kv  {
    uint32_t key;
    uint32_t value;
};

/** Metadata flags */
enum {
    PAL_META_DATA_FLAGS_NONE = 0,
};

/** metadata flags, can be OR'able */
typedef uint32_t pal_meta_data_flags_t;

typedef struct pal_extern_alloc_buff_info {
    int      alloc_handle;/**< unique memory handle identifying extern mem allocation */
    uint32_t alloc_size;  /**< size of external allocation */
    uint32_t offset;      /**< offset of buffer within extern allocation */
} pal_extern_alloc_buff_info_t;

/** PAL buffer structure used for reading/writing buffers from/to the stream */
struct pal_buffer {
    uint8_t *buffer;               /**<  buffer pointer */
    size_t size;                   /**< number of bytes */
    size_t offset;                 /**< offset in buffer from where valid byte starts */
    struct timespec *ts;           /**< timestmap */
    uint32_t flags;                /**< flags */
    size_t metadata_size;          /**< size of metadata buffer in bytes */
    uint8_t *metadata;             /**< metadata buffer. Can contain multiple metadata*/
    pal_extern_alloc_buff_info_t alloc_info; /**< holds info for extern buff */
    uint64_t frame_index;          /**< frame index of the buffer */
};

struct pal_clbk_buffer_info {
    uint64_t frame_index;       /**< frame index of the buffer */
    uint32_t sample_rate;       /**< updated sample rate */
    uint32_t bit_width;         /**< updated bit width */
    uint16_t channel_count;     /**< updated channel count */
};

struct pal_callback_buffer {
    uint8_t *buffer;               /**<  buffer pointer */
    size_t size;                   /**< filled length of the buffer */
    struct timespec *ts;           /**< timestamp */
    uint32_t status;               /**< status of callback payload */
    struct pal_clbk_buffer_info cb_buf_info;   /**< callback buffer info */
};

/** pal_mmap_buffer flags */
enum {
    PAL_MMMAP_BUFF_FLAGS_NONE = 0,
    /**
    * Only set this flag if applications can access the audio buffer memory
    * shared with the backend (usually DSP) _without_ security issue.
    *
    * Setting this flag also implies that Binder will allow passing the shared memory FD
    * to applications.
    *
    * That usually implies that the kernel will prevent any access to the
    * memory surrounding the audio buffer as it could lead to a security breach.
    *
    * For example, a "/dev/snd/" file descriptor generally is not shareable,
    * but an "anon_inode:dmabuffer" file descriptor is shareable.
    * See also Linux kernel's dma_buf.
    *
    */
    PAL_MMMAP_BUFF_FLAGS_APP_SHAREABLE = 1,
};

/** pal_mmap_buffer flags, can be OR'able */
typedef uint32_t pal_mmap_buffer_flags_t;

/** PAL buffer structure used for reading/writing buffers from/to the stream */
struct pal_mmap_buffer {
    void*    buffer;                /**< base address of mmap memory buffer,
                                         for use by local proces only */
    int32_t  fd;                    /**< fd for mmap memory buffer */
    uint32_t buffer_size_frames;    /**< total buffer size in frames */
    uint32_t burst_size_frames;     /**< transfer size granularity in frames */
    pal_mmap_buffer_flags_t flags;  /**< Attributes describing the buffer. */
};

 /**
 * Mmap buffer read/write position returned by GetMmapPosition.
 * note\ Used by streams opened in mmap mode.
 */
struct pal_mmap_position {
    int64_t  time_nanoseconds; /**< timestamp in ns, CLOCK_MONOTONIC */
    int32_t  position_frames;  /**< increasing 32 bit frame count reset when stop()
                                    is called */
};

/** channel mask and volume pair */
struct pal_channel_vol_kv {
    uint32_t channel_mask;       /**< channel mask */
    float vol;                   /**< gain of the channel mask */
};

/** Volume data strucutre defintion used as argument for volume command */
struct pal_volume_data {
    uint32_t no_of_volpair;                       /**< no of volume pairs*/
    struct pal_channel_vol_kv volume_pair[];     /**< channel mask and volume pair */
};

struct pal_time_us {
    uint32_t value_lsw;   /** Lower 32 bits of 64 bit time value in microseconds */
    uint32_t value_msw;   /** Upper 32 bits of 64 bit time value in microseconds */
};

/** Timestamp strucutre defintion used as argument for
 *  gettimestamp api */
struct pal_session_time {
    struct pal_time_us session_time;   /** Value of the current session time in microseconds */
    struct pal_time_us absolute_time;  /** Value of the absolute time in microseconds */
    struct pal_time_us timestamp;      /** Value of the last processed time stamp in microseconds */
};

/** EVENT configurations data strucutre defintion used as
 *  argument for mute command */
//typedef union {
//} pal_event_cfg_t;

/** event id of the event generated*/
typedef uint32_t pal_event_id;

typedef enum {
    /** request notification when all accumlated data has be
     *  drained.*/
    PAL_DRAIN,
    /** request notification when drain completes shortly before all
     *  accumlated data of the current track has been played out */
    PAL_DRAIN_PARTIAL,
} pal_drain_type_t;

typedef enum {
    PAL_PARAM_ID_LOAD_SOUND_MODEL = 0,
    PAL_PARAM_ID_RECOGNITION_CONFIG = 1,
    PAL_PARAM_ID_ECNS_ON_OFF = 2,
    PAL_PARAM_ID_DIRECTION_OF_ARRIVAL = 3,
    PAL_PARAM_ID_UIEFFECT = 4,
    PAL_PARAM_ID_STOP_BUFFERING = 5,
    PAL_PARAM_ID_CODEC_CONFIGURATION = 6,
    /* Non-Stream Specific Parameters*/
    PAL_PARAM_ID_DEVICE_CONNECTION = 7,
    PAL_PARAM_ID_SCREEN_STATE = 8,
    PAL_PARAM_ID_CHARGING_STATE = 9,
    PAL_PARAM_ID_DEVICE_ROTATION = 10,
    PAL_PARAM_ID_BT_SCO = 11,
    PAL_PARAM_ID_BT_SCO_WB = 12,
    PAL_PARAM_ID_BT_SCO_SWB = 13,
    PAL_PARAM_ID_BT_A2DP_RECONFIG = 14,
    PAL_PARAM_ID_BT_A2DP_RECONFIG_SUPPORTED = 15,
    PAL_PARAM_ID_BT_A2DP_SUSPENDED = 16,
    PAL_PARAM_ID_BT_A2DP_TWS_CONFIG = 17,
    PAL_PARAM_ID_BT_A2DP_ENCODER_LATENCY = 18,
    PAL_PARAM_ID_DEVICE_CAPABILITY = 19,
    PAL_PARAM_ID_GET_SOUND_TRIGGER_PROPERTIES = 20,
    PAL_PARAM_ID_TTY_MODE = 21,
    PAL_PARAM_ID_VOLUME_BOOST = 22,
    PAL_PARAM_ID_SLOW_TALK = 23,
    PAL_PARAM_ID_SPEAKER_RAS = 24,
    PAL_PARAM_ID_SP_MODE = 25,
    PAL_PARAM_ID_GAIN_LVL_MAP = 26,
    PAL_PARAM_ID_GAIN_LVL_CAL = 27,
    PAL_PARAM_ID_GAPLESS_MDATA = 28,
    PAL_PARAM_ID_HD_VOICE = 29,
    PAL_PARAM_ID_WAKEUP_ENGINE_CONFIG = 30,
    PAL_PARAM_ID_WAKEUP_BUFFERING_CONFIG = 31,
    PAL_PARAM_ID_WAKEUP_ENGINE_RESET = 32,
    PAL_PARAM_ID_WAKEUP_MODULE_VERSION = 33,
    PAL_PARAM_ID_WAKEUP_CUSTOM_CONFIG = 34,
    PAL_PARAM_ID_UNLOAD_SOUND_MODEL = 35,
    PAL_PARAM_ID_MODULE_CONFIG = 36, /*Clients directly configure DSP modules*/
    PAL_PARAM_ID_BT_A2DP_LC3_CONFIG = 37,
    PAL_PARAM_ID_PROXY_CHANNEL_CONFIG = 38,
    PAL_PARAM_ID_CONTEXT_LIST = 39,
    PAL_PARAM_ID_HAPTICS_INTENSITY = 40,
    PAL_PARAM_ID_HAPTICS_VOLUME = 41,
    PAL_PARAM_ID_BT_A2DP_DECODER_LATENCY = 42,
    PAL_PARAM_ID_CUSTOM_CONFIGURATION = 43,
    PAL_PARAM_ID_KW_TRANSFER_LATENCY = 44,
    PAL_PARAM_ID_BT_A2DP_FORCE_SWITCH = 45,
    PAL_PARAM_ID_BT_SCO_LC3 = 46,
    PAL_PARAM_ID_DEVICE_MUTE = 47,
    PAL_PARAM_ID_UPD_REGISTER_FOR_EVENTS = 48,
    PAL_PARAM_ID_SP_GET_CAL = 49,
    PAL_PARAM_ID_BT_A2DP_CAPTURE_SUSPENDED = 50,
    PAL_PARAM_ID_SNDCARD_STATE = 51,
    PAL_PARAM_ID_HIFI_PCM_FILTER = 52,
    PAL_PARAM_ID_CHARGER_STATE = 53,
    PAL_PARAM_ID_BT_SCO_NREC = 54,
    PAL_PARAM_ID_VOLUME_USING_SET_PARAM = 55,
    PAL_PARAM_ID_UHQA_FLAG = 56,
    PAL_PARAM_ID_STREAM_ATTRIBUTES = 57,
    PAL_PARAM_ID_SET_UPD_DUTY_CYCLE = 58,
    PAL_PARAM_ID_MSPP_LINEAR_GAIN = 59,
    PAL_PARAM_ID_SET_SOURCE_METADATA = 60,
    PAL_PARAM_ID_SET_SINK_METADATA = 61,
    PAL_PARAM_ID_ULTRASOUND_RAMPDOWN = 62,
    PAL_PARAM_ID_VOLUME_CTRL_RAMP = 63,
    PAL_PARAM_ID_ULTRASOUND_SET_GAIN = 64,
} pal_param_id_type_t;

/** HDMI/DP */
// START: MST ==================================================
#define MAX_CONTROLLERS 1
#define MAX_STREAMS_PER_CONTROLLER 2
// END: MST ==================================================

/** Audio parameter data*/

typedef struct pal_param_proxy_channel_config {
    uint32_t num_proxy_channels;
} pal_param_proxy_channel_config_t;

struct pal_param_context_list {
    uint32_t num_contexts;
    uint32_t context_id[]; /* list of num_contexts context_id */
};

struct pal_param_disp_port_config_params {
    int controller;
    int stream;
};

struct pal_usb_device_address {
    int card_id;
    int device_num;
};

typedef union {
    struct pal_param_disp_port_config_params dp_config;
    struct pal_usb_device_address usb_addr;
} pal_device_config_t;

struct pal_amp_db_and_gain_table {
    float    amp;
    float    db;
    uint32_t level;
};

struct pal_vol_ctrl_ramp_param {
   uint32_t ramp_period_ms;
};

/* Payload For ID: PAL_PARAM_ID_DEVICE_CONNECTION
 * Description   : Device Connection
*/
typedef struct pal_param_device_connection {
    pal_device_id_t   id;
    bool              connection_state;
    pal_device_config_t device_config;
} pal_param_device_connection_t;

/* Payload For ID: PAL_PARAM_ID_GAIN_LVL_MAP
 * Description   : get gain level mapping
*/
typedef struct pal_param_gain_lvl_map {
    struct pal_amp_db_and_gain_table *mapping_tbl;
    int                              table_size;
    int                              filled_size;
} pal_param_gain_lvl_map_t;

/* Payload For ID: PAL_PARAM_ID_GAIN_LVL_CAL
 * Description   : set gain level calibration
*/
typedef struct pal_param_gain_lvl_cal {
    int level;
} pal_param_gain_lvl_cal_t;

/* Payload For ID: PAL_PARAM_ID_MSPP_LINEAR_GAIN
 * Description   : set linear gain for MSPP
*/
typedef struct pal_param_mspp_linear_gain {
    int32_t gain;
} pal_param_mspp_linear_gain_t;


/* Payload For ID: PAL_PARAM_ID_DEVICE_CAPABILITY
 * Description   : get Device Capability
*/
 typedef struct pal_param_device_capability {
  pal_device_id_t   id;
  struct pal_usb_device_address addr;
  bool              is_playback;
  struct dynamic_media_config *config;
} pal_param_device_capability_t;

/* Payload For ID: PAL_PARAM_ID_SCREEN_STATE
 * Description   : Screen State
*/
typedef struct pal_param_screen_state {
    bool              screen_state;
} pal_param_screen_state_t;

/* Payload For ID: PAL_PARAM_ID_CHARGING_STATE
 * Description   : Charging State
*/
typedef struct pal_param_charging_state {
    bool              charging_state;
} pal_param_charging_state_t;

/* Payload For ID: PAL_PARAM_ID_CHARGER_STATE
 * Description   : Charger State
*/
typedef struct pal_param_charger_state {
    bool              is_charger_online;
    bool              is_concurrent_boost_enable;
} pal_param_charger_state_t;

/*
 * Used to identify the swapping type
 */
typedef enum {
    PAL_SPEAKER_ROTATION_LR,  /* Default position. It will be set when device
                               * is at angle 0, 90 or 180 degree.
                               */

    PAL_SPEAKER_ROTATION_RL   /* This will be set if device is rotated by 270
                               * degree
                               */
} pal_speaker_rotation_type;

/* Payload For ID: PAL_PARAM_ID_DEVICE_ROTATION
 * Description   : Device Rotation
 */
typedef struct pal_param_device_rotation {
    pal_speaker_rotation_type    rotation_type;
} pal_param_device_rotation_t;

/* Payload For ID: PAL_PARAM_ID_UHQA_FLAG
 * Description   : use to enable/disable USB high quality audio from userend
*/
typedef struct pal_param_uhqa_state {
    bool uhqa_state;
} pal_param_uhqa_t;

/* Payload For ID: PAL_PARAM_ID_BT_SCO*
 * Description   : BT SCO related device parameters
*/
static const char* lc3_reserved_params[] = {
    "StreamMap",
    "Codec",
    "FrameDuration",
    "rxconfig_index",
    "txconfig_index",
    "version",
    "Blocks_forSDU",
    "vendor",
};

enum {
    LC3_STREAM_MAP_BIT     = 0x1,
    LC3_CODEC_BIT          = 0x1 << 1,
    LC3_FRAME_DURATION_BIT = 0x1 << 2,
    LC3_RXCFG_IDX_BIT      = 0x1 << 3,
    LC3_TXCFG_IDX_BIT      = 0x1 << 4,
    LC3_VERSION_BIT        = 0x1 << 5,
    LC3_BLOCKS_FORSDU_BIT  = 0x1 << 6,
    LC3_VENDOR_BIT         = 0x1 << 7,
    LC3_BIT_ALL            = LC3_STREAM_MAP_BIT |
                             LC3_CODEC_BIT |
                             LC3_FRAME_DURATION_BIT |
                             LC3_RXCFG_IDX_BIT |
                             LC3_TXCFG_IDX_BIT |
                             LC3_VERSION_BIT |
                             LC3_BLOCKS_FORSDU_BIT |
                             LC3_VENDOR_BIT,
    LC3_BIT_MASK           = LC3_BIT_ALL & ~LC3_FRAME_DURATION_BIT, // frame duration is optional
    LC3_BIT_VALID          = LC3_BIT_MASK,
};

/* max length of streamMap string, up to 16 stream id supported */
#define PAL_LC3_MAX_STRING_LEN 200
typedef struct btsco_lc3_cfg {
    uint32_t fields_map;
    uint32_t rxconfig_index;
    uint32_t txconfig_index;
    uint32_t api_version;
    uint32_t frame_duration;
    uint32_t num_blocks;
    char     streamMap[PAL_LC3_MAX_STRING_LEN];
    char     vendor[PAL_LC3_MAX_STRING_LEN];
} btsco_lc3_cfg_t;

typedef struct pal_param_btsco {
    bool   bt_sco_on;
    bool   bt_wb_speech_enabled;
    bool   bt_sco_nrec;
    int    bt_swb_speech_mode;
    bool   bt_lc3_speech_enabled;
    btsco_lc3_cfg_t lc3_cfg;
    bool   is_bt_hfp;
} pal_param_btsco_t;

/* Payload For ID: PAL_PARAM_ID_BT_A2DP*
 * Description   : A2DP related device setParameters
*/
typedef struct pal_param_bta2dp {
    int32_t  reconfig_supported;
    bool     reconfig;
    bool     a2dp_suspended;
    bool     a2dp_capture_suspended;
    bool     is_tws_mono_mode_on;
    bool     is_lc3_mono_mode_on;
    bool     is_force_switch;
    uint32_t latency;
    pal_device_id_t   dev_id;
} pal_param_bta2dp_t;

typedef struct pal_param_upd_event_detection {
    bool     register_status;
} pal_param_upd_event_detection_t;

typedef struct pal_bt_tws_payload_s {
    bool isTwsMonoModeOn;
    uint32_t codecFormat;
} pal_bt_tws_payload;

/* Payload For Custom Config
 * Description : Used by PAL client to customize
 *               the device related information.
*/
#define PAL_MAX_CUSTOM_KEY_SIZE 128
typedef struct pal_device_custom_config {
    char custom_key[PAL_MAX_CUSTOM_KEY_SIZE];
} pal_device_custom_config_t;

typedef struct pal_bt_lc3_payload_s {
    bool isLC3MonoModeOn;
} pal_bt_lc3_payload;

typedef struct pal_param_haptics_intensity {
    int intensity;
} pal_param_haptics_intensity_t;

/* Type of Ultrasound Gain */
typedef enum {
    PAL_ULTRASOUND_GAIN_MUTE = 0,
    PAL_ULTRASOUND_GAIN_LOW,
    PAL_ULTRASOUND_GAIN_HIGH,
} pal_ultrasound_gain_t;

/**< PAL device */
#define DEVICE_NAME_MAX_SIZE 128
struct pal_device {
    pal_device_id_t id;                     /**<  device id */
    struct pal_media_config config;         /**<  media config of the device */
    struct pal_usb_device_address address;
    char sndDevName[DEVICE_NAME_MAX_SIZE];
    pal_device_custom_config_t custom_config;        /**<  Optional */
};

/**
 * Maps the modules instance id to module id for a single module
 */
struct module_info {
    uint32_t module_id; /**< module id */
    uint32_t module_iid; /**< globally unique module instance id */
};

/**
 * Structure mapping the tag_id to module info (mid and miid)
 */
struct pal_tag_module_mapping {
    uint32_t tag_id; /**< tag id of the module */
    uint32_t num_modules; /**< number of modules matching the tag_id */
    struct module_info mod_list[]; /**< module list */
};

/**
 * Used to return tags and module info data to client given a graph key vector
 */
struct pal_tag_module_info {
    /**< number of tags */
    uint32_t num_tags;
    /**< variable payload of type struct pal_tag_module_mapping*/
    uint8_t pal_tag_module_list[];
};

#define PAL_SOUND_TRIGGER_MAX_STRING_LEN 64 /* max length of strings in properties or descriptor structs */
#define PAL_SOUND_TRIGGER_MAX_LOCALE_LEN 6  /* max length of locale string. e.g en_US */
#define PAL_SOUND_TRIGGER_MAX_USERS 10      /* max number of concurrent users */
#define PAL_SOUND_TRIGGER_MAX_PHRASES 10    /* max number of concurrent phrases */

#define PAL_RECOGNITION_MODE_VOICE_TRIGGER 0x1       /* simple voice trigger */
#define PAL_RECOGNITION_MODE_USER_IDENTIFICATION 0x2 /* trigger only if one user in model identified */
#define PAL_RECOGNITION_MODE_USER_AUTHENTICATION 0x4 /* trigger only if one user in mode authenticated */
#define PAL_RECOGNITION_MODE_GENERIC_TRIGGER 0x8     /* generic sound trigger */

#define PAL_RECOGNITION_STATUS_SUCCESS 0
#define PAL_RECOGNITION_STATUS_ABORT 1
#define PAL_RECOGNITION_STATUS_FAILURE 2
#define PAL_RECOGNITION_STATUS_GET_STATE_RESPONSE 3  /* Indicates that the recognition event is in
                                                        response to a state request and was not
                                                        triggered by a real DSP recognition */

/** used to identify the sound model type for the session */
typedef enum {
    PAL_SOUND_MODEL_TYPE_UNKNOWN = -1,        /* use for unspecified sound model type */
    PAL_SOUND_MODEL_TYPE_KEYPHRASE = 0,       /* use for key phrase sound models */
    PAL_SOUND_MODEL_TYPE_GENERIC = 1          /* use for all models other than keyphrase */
} pal_st_sound_model_type_t;

struct st_uuid {
    uint32_t timeLow;
    uint16_t timeMid;
    uint16_t timeHiAndVersion;
    uint16_t clockSeq;
    uint8_t node[6];
};

/**
 * sound trigger implementation descriptor read by the framework via get_properties().
 * Used by SoundTrigger service to report to applications and manage concurrency and policy.
 */
struct pal_st_properties {
    int8_t           implementor[PAL_SOUND_TRIGGER_MAX_STRING_LEN]; /* implementor name */
    int8_t           description[PAL_SOUND_TRIGGER_MAX_STRING_LEN]; /* implementation description */
    uint32_t         version;               /* implementation version */
    struct st_uuid   uuid;                             /* unique implementation ID.
                                                   Must change with version each version */
    uint32_t         max_sound_models;      /* maximum number of concurrent sound models
                                                   loaded */
    uint32_t         max_key_phrases;       /* maximum number of key phrases */
    uint32_t         max_users;             /* maximum number of concurrent users detected */
    uint32_t         recognition_modes;     /* all supported modes.
                                                   e.g PAL_RECOGNITION_MODE_VOICE_TRIGGER */
    bool             capture_transition;    /* supports seamless transition from detection
                                                   to capture */
    uint32_t         max_buffer_ms;         /* maximum buffering capacity in ms if
                                                   capture_transition is true*/
    bool             concurrent_capture;    /* supports capture by other use cases while
                                                   detection is active */
    bool             trigger_in_event;      /* returns the trigger capture in event */
    uint32_t         power_consumption_mw;  /* Rated power consumption when detection is active
                                                   with TDB silence/sound/speech ratio */
};

/** sound model structure passed in by ST Client during pal_st_load_sound_model() */
struct pal_st_sound_model {
    pal_st_sound_model_type_t type;           /* model type. e.g. PAL_SOUND_MODEL_TYPE_KEYPHRASE */
    struct st_uuid            uuid;           /* unique sound model ID. */
    struct st_uuid            vendor_uuid;    /* unique vendor ID. Identifies the engine the
                                                  sound model was build for */
    uint32_t                  data_size;      /* size of opaque model data */
    uint32_t                  data_offset;    /* offset of opaque data start from head of struct
                                                  e.g sizeof struct pal_st_sound_model) */
};

/** key phrase descriptor */
struct pal_st_phrase {
    uint32_t    id;                                 /**< keyphrase ID */
    uint32_t    recognition_mode;                   /**< recognition modes supported by this key phrase */
    uint32_t    num_users;                          /**< number of users in the key phrase */
    uint32_t    users[PAL_SOUND_TRIGGER_MAX_USERS]; /**< users ids: (not uid_t but sound trigger
                                                        specific IDs */
    char        locale[PAL_SOUND_TRIGGER_MAX_LOCALE_LEN]; /**< locale - JAVA Locale style (e.g. en_US) */
    char        text[PAL_SOUND_TRIGGER_MAX_STRING_LEN];   /**< phrase text in UTF-8 format. */
};

/**
 * Specialized sound model for key phrase detection.
 * Proprietary representation of key phrases in binary data must match information indicated
 * by phrases field use this when not sending
 */
struct pal_st_phrase_sound_model {
    struct pal_st_sound_model   common;         /** common sound model */
    uint32_t                    num_phrases;    /** number of key phrases in model */
    struct pal_st_phrase        phrases[PAL_SOUND_TRIGGER_MAX_PHRASES];
};

struct pal_st_confidence_level {
    uint32_t user_id;   /* user ID */
    uint32_t level;     /* confidence level in percent (0 - 100).
                               - min level for recognition configuration
                               - detected level for recognition event */
};

/** Specialized recognition event for key phrase detection */
struct pal_st_phrase_recognition_extra {
    uint32_t id;                /* keyphrase ID */
    uint32_t recognition_modes; /* recognition modes used for this keyphrase */
    uint32_t confidence_level;  /* confidence level for mode RECOGNITION_MODE_VOICE_TRIGGER */
    uint32_t num_levels;        /* number of user confidence levels */
    struct pal_st_confidence_level levels[PAL_SOUND_TRIGGER_MAX_USERS];
};

struct pal_st_recognition_event {
    int32_t                          status;              /**< recognition status e.g.
                                                              RECOGNITION_STATUS_SUCCESS */
    pal_st_sound_model_type_t        type;                /**< event type, same as sound model type.
                                                              e.g. SOUND_MODEL_TYPE_KEYPHRASE */
    pal_st_handle_t                  *st_handle;           /**< handle of sound trigger session */
    bool                             capture_available;   /**< it is possible to capture audio from this
                                                              utterance buffered by the
                                                              implementation */
    int32_t                          capture_session;     /**< audio session ID. framework use */
    int32_t                          capture_delay_ms;    /**< delay in ms between end of model
                                                              detection and start of audio available
                                                              for capture. A negative value is possible
                                                              (e.g. if key phrase is also available for
                                                              capture */
    int32_t                          capture_preamble_ms; /**< duration in ms of audio captured
                                                              before the start of the trigger.
                                                              0 if none. */
    bool                             trigger_in_data;     /**< the opaque data is the capture of
                                                              the trigger sound */
    struct pal_media_config          media_config;        /**< media format of either the trigger in
                                                              event data or to use for capture of the
                                                              rest of the utterance */
    uint32_t                         data_size;           /**< size of opaque event data */
    uint32_t                         data_offset;         /**< offset of opaque data start from start of
                                                              this struct (e.g sizeof struct
                                                              sound_trigger_phrase_recognition_event) */
};

typedef void(*pal_st_recognition_callback_t)(struct pal_st_recognition_event *event,
                                             uint8_t *cookie);

/* Payload for pal_st_start_recognition() */
struct pal_st_recognition_config {
    int32_t       capture_handle;             /**< IO handle that will be used for capture.
                                                N/A if capture_requested is false */
    uint32_t      capture_device;             /**< input device requested for detection capture */
    bool          capture_requested;          /**< capture and buffer audio for this recognition
                                                instance */
    uint32_t      num_phrases;                /**< number of key phrases recognition extras */
    struct pal_st_phrase_recognition_extra phrases[PAL_SOUND_TRIGGER_MAX_PHRASES];
                                              /**< configuration for each key phrase */
    pal_st_recognition_callback_t callback;   /**< callback for recognition events */
    uint8_t *        cookie;                     /**< cookie set from client*/
    uint32_t      data_size;                  /**< size of opaque capture configuration data */
    uint32_t      data_offset;                /**< offset of opaque data start from start of this struct
                                              (e.g sizeof struct sound_trigger_recognition_config) */
};

struct pal_st_phrase_recognition_event {
    struct pal_st_recognition_event common;
    uint32_t num_phrases;
    struct pal_st_phrase_recognition_extra phrase_extras[PAL_SOUND_TRIGGER_MAX_PHRASES];
};

struct pal_st_generic_recognition_event {
    struct pal_st_recognition_event common;
};

struct detection_engine_config_voice_wakeup {
    uint16_t mode;
    uint16_t custom_payload_size;
    uint8_t num_active_models;
    uint8_t reserved;
    uint8_t confidence_levels[PAL_SOUND_TRIGGER_MAX_USERS];
    uint8_t keyword_user_enables[PAL_SOUND_TRIGGER_MAX_USERS];
};

struct detection_engine_config_stage1_pdk {
    uint16_t mode;
    uint16_t custom_payload_size;
    uint32_t model_id;
    uint32_t num_keywords;
    uint32_t confidence_levels[MAX_KEYWORD_SUPPORTED];
};

struct detection_engine_multi_model_buffering_config {
    uint32_t model_id;
    uint32_t hist_buffer_duration_in_ms;
    uint32_t pre_roll_duration_in_ms;
};

struct ffv_doa_tracking_monitor_t
{
    int16_t target_angle_L16[2];
    int16_t interf_angle_L16[2];
    int8_t polarActivityGUI[360];
};

struct __attribute__((__packed__)) version_arch_payload {
    unsigned int version;
    char arch[64];
};

struct pal_compr_gapless_mdata {
       uint32_t encoderDelay;
       uint32_t encoderPadding;
};

typedef struct pal_device_mute_t {
    pal_stream_direction_t dir;
    bool mute;
}pal_device_mute_t;

/**
 * Event payload passed to client with PAL_STREAM_CBK_EVENT_READ_DONE and
  * PAL_STREAM_CBK_EVENT_WRITE_READY events
  */
struct pal_event_read_write_done_payload {
    uint32_t tag; /**< tag that was used to read/write this buffer */
    uint32_t status; /**< data buffer status as defined in ar_osal_error.h */
    uint32_t md_status; /**< meta-data status as defined in ar_osal_error.h */
    struct pal_buffer buff; /**< buffer that was passed to pal_stream_read/pal_stream_write */
};

/** @brief Callback function prototype to be given for
 *         pal_open_stream.
 *
 * \param[in] stream_handle - stream handle associated with the
 * callback event.
 * \param[in] event_id - event id of the event raised on the
 *       stream.
 * \param[in] event_data - event_data specific to the event
 *       raised.
 * \param[in] cookie - cookie speificied in the
 *       pal_stream_open()
 */
typedef int32_t (*pal_stream_callback)(pal_stream_handle_t *stream_handle,
                                       uint32_t event_id, uint32_t *event_data,
                                       uint32_t event_data_size,
                                       uint64_t cookie);

/** @brief Callback function prototype to be given for
 *         pal_register_callback.
 *
 * \param[in] event_id - event id of the event raised on the
 *       stream.
 * \param[in] event_data - event_data specific to the event
 *       raised.
 * \param[in] cookie - cookie specified in the
 *       pal_register_global_callback.
 */
typedef int32_t (*pal_global_callback)(uint32_t event_id, uint32_t *event_data, uint64_t cookie);

/** Sound card state */
typedef enum card_status_t {
    CARD_STATUS_OFFLINE = 0,
    CARD_STATUS_ONLINE,
    CARD_STATUS_NONE,
} card_status_t;

typedef struct pal_buffer_config {
    size_t buf_count; /**< number of buffers*/
    size_t buf_size; /**< This would be the size of each buffer*/
    size_t max_metadata_size; /** < max metadata size associated with each buffer*/
} pal_buffer_config_t;

#define PAL_GENERIC_PLATFORM_DELAY     (29*1000LL)
#define PAL_DEEP_BUFFER_PLATFORM_DELAY (29*1000LL)
#define PAL_SPATIAL_AUDIO_PLATFORM_DELAY (13*1000LL)
#define PAL_PCM_OFFLOAD_PLATFORM_DELAY (30*1000LL)
#define PAL_LOW_LATENCY_PLATFORM_DELAY (13*1000LL)
#define PAL_MMAP_PLATFORM_DELAY        (3*1000LL)
#define PAL_ULL_PLATFORM_DELAY         (4*1000LL)
#define PAL_VOIP_PLATFORM_DELAY        (29*1000LL)

#define PAL_GENERIC_OUTPUT_PERIOD_DURATION 40
#define PAL_DEEP_BUFFER_OUTPUT_PERIOD_DURATION 40
#define PAL_PCM_OFFLOAD_OUTPUT_PERIOD_DURATION 80
#define PAL_LOW_LATENCY_OUTPUT_PERIOD_DURATION 5
#define PAL_SPATIAL_AUDIO_PERIOD_DURATION 10
#define PAL_VOIP_OUTPUT_PERIOD_DURATION 20

#define PAL_GENERIC_PLAYBACK_PERIOD_COUNT 2
#define PAL_DEEP_BUFFER_PLAYBACK_PERIOD_COUNT 2
#define PAL_PCM_OFFLOAD_PLAYBACK_PERIOD_COUNT 2
#define PAL_LOW_LATENCY_PLAYBACK_PERIOD_COUNT 2
#define PAL_SPATIAL_AUDIO_PLAYBACK_PERIOD_COUNT 2
#define PAL_VOIP_PLAYBACK_PERIOD_COUNT 2

#ifdef __cplusplus
}  /* extern "C" */
#endif

#endif /*PAL_DEFS_H*/
