/*
 * 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-2024, Qualcomm Innovation Center, Inc. All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted (subject to the limitations in the
 * disclaimer below) 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 Qualcomm Innovation Center, Inc. nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 * NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
 * GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
 * HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
 */

#ifndef ANDROID_HARDWARE_AHAL_ASTREAM_H_
#define ANDROID_HARDWARE_AHAL_ASTREAM_H_

#include <stdlib.h>
#include <unistd.h>

#include <set>
#include <string>

#include <cutils/properties.h>
#include <hardware/audio.h>
#include <system/audio.h>

#include "PalDefs.h"
#include <audio_extn/AudioExtn.h>
#include <mutex>
#include <map>

#define LOW_LATENCY_PLATFORM_DELAY (13*1000LL)
#define DEEP_BUFFER_PLATFORM_DELAY (29*1000LL)
#define PCM_OFFLOAD_PLATFORM_DELAY (30*1000LL)
#define MMAP_PLATFORM_DELAY        (3*1000LL)
#define ULL_PLATFORM_DELAY         (4*1000LL)

#define DEEP_BUFFER_OUTPUT_PERIOD_DURATION 40
#define PCM_OFFLOAD_OUTPUT_PERIOD_DURATION 80
#define LOW_LATENCY_OUTPUT_PERIOD_DURATION 5
#define VOIP_PERIOD_COUNT_DEFAULT 2
#define DEFAULT_VOIP_BUF_DURATION_MS 20
#define DEFAULT_VOIP_BIT_DEPTH_BYTE sizeof(int16_t)
#define COMPRESS_OFFLOAD_PLAYBACK_LATENCY  50

#define DEFAULT_OUTPUT_SAMPLING_RATE    48000
#define LOW_LATENCY_PLAYBACK_PERIOD_SIZE 240 /** 5ms; frames */
#define LOW_LATENCY_PLAYBACK_PERIOD_COUNT 2
#define LOW_LATENCY_ICMD_PLAYBACK_PERIOD_COUNT 4 /** In Call Music **/

#define PCM_OFFLOAD_PLAYBACK_PERIOD_COUNT 2 /** Direct PCM */
#define DEEP_BUFFER_PLAYBACK_PERIOD_COUNT 2 /** Deep Buffer*/

#define DEEP_BUFFER_PLAYBACK_PERIOD_SIZE 1920 /** 40ms; frames */

#define ULL_PERIOD_SIZE (DEFAULT_OUTPUT_SAMPLING_RATE / 1000) /** 1ms; frames */
#define ULL_PERIOD_COUNT_DEFAULT 512
#define ULL_PERIOD_MULTIPLIER 3
#define BUF_SIZE_PLAYBACK 960
#define BUF_SIZE_CAPTURE 960
#define NO_OF_BUF 4
#define LOW_LATENCY_CAPTURE_SAMPLE_RATE 48000
#define LOW_LATENCY_CAPTURE_PERIOD_SIZE 240
#define LOW_LATENCY_OUTPUT_PERIOD_SIZE 240
#define LOW_LATENCY_CAPTURE_USE_CASE 1
#define MIN_PCM_FRAGMENT_SIZE 512
#define MAX_PCM_FRAGMENT_SIZE (240 * 1024)
#define MMAP_PERIOD_SIZE (DEFAULT_OUTPUT_SAMPLING_RATE/1000)
#define MMAP_PERIOD_COUNT_MIN 32
#define MMAP_PERIOD_COUNT_MAX 512
#define MMAP_PERIOD_COUNT_DEFAULT (MMAP_PERIOD_COUNT_MAX)
#define CODEC_BACKEND_DEFAULT_BIT_WIDTH 16
#define AUDIO_CAPTURE_PERIOD_DURATION_MSEC 20

#define LL_PERIOD_SIZE_FRAMES_160 160
#define LL_PERIOD_SIZE_FRAMES_192 192
#define LL_PERIOD_SIZE_FRAMES_240 240
#define LL_PERIOD_SIZE_FRAMES_320 320
#define LL_PERIOD_SIZE_FRAMES_480 480

#define DIV_ROUND_UP(x, y) (((x) + (y) - 1)/(y))
#define ALIGN(x, y) ((y) * DIV_ROUND_UP((x), (y)))

#if LINUX_ENABLED
#ifdef __LP64__
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/usr/lib64/libqcompostprocbundle.so"
#define VISUALIZER_LIBRARY_PATH "/usr/lib64/libqcomvisualizer.so"
#else
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/usr/lib/libqcompostprocbundle.so"
#define VISUALIZER_LIBRARY_PATH "/usr/lib/libqcomvisualizer.so"
#endif
#else
#ifdef __LP64__
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/vendor/lib64/soundfx/libqcompostprocbundle.so"
#define VISUALIZER_LIBRARY_PATH "/vendor/lib64/soundfx/libqcomvisualizer.so"
#else
#define OFFLOAD_EFFECTS_BUNDLE_LIBRARY_PATH "/vendor/lib/soundfx/libqcompostprocbundle.so"
#define VISUALIZER_LIBRARY_PATH "/vendor/lib/soundfx/libqcomvisualizer.so"
#endif
#endif

#define AUDIO_PARAMETER_KEY_CAMERA_FACING "cameraFacing"
#define AUDIO_PARAMETER_VALUE_FRONT "front"
#define AUDIO_PARAMETER_VALUE_BACK "back"

/* These are the supported use cases by the hardware.
 * Each usecase is mapped to a specific PCM device.
 * Refer to pcm_device_table[].
 */
enum {
    USECASE_INVALID = -1,
    /* Playback usecases */
    USECASE_AUDIO_PLAYBACK_DEEP_BUFFER = 0,
    USECASE_AUDIO_PLAYBACK_LOW_LATENCY,
    USECASE_AUDIO_PLAYBACK_MULTI_CH,
    USECASE_AUDIO_PLAYBACK_OFFLOAD,
    USECASE_AUDIO_PLAYBACK_OFFLOAD2,
    USECASE_AUDIO_PLAYBACK_OFFLOAD3,
    USECASE_AUDIO_PLAYBACK_OFFLOAD4,
    USECASE_AUDIO_PLAYBACK_OFFLOAD5,
    USECASE_AUDIO_PLAYBACK_OFFLOAD6,
    USECASE_AUDIO_PLAYBACK_OFFLOAD7,
    USECASE_AUDIO_PLAYBACK_OFFLOAD8,
    USECASE_AUDIO_PLAYBACK_OFFLOAD9,
    USECASE_AUDIO_PLAYBACK_ULL,
    USECASE_AUDIO_PLAYBACK_MMAP,
    USECASE_AUDIO_PLAYBACK_WITH_HAPTICS,
    USECASE_AUDIO_PLAYBACK_HIFI,
    USECASE_AUDIO_PLAYBACK_TTS,

    /* FM usecase */
    USECASE_AUDIO_PLAYBACK_FM,

    /* HFP Use case*/
    USECASE_AUDIO_HFP_SCO,
    USECASE_AUDIO_HFP_SCO_WB,

    /* Capture usecases */
    USECASE_AUDIO_RECORD,
    USECASE_AUDIO_RECORD_COMPRESS,
    USECASE_AUDIO_RECORD_COMPRESS2,
    USECASE_AUDIO_RECORD_COMPRESS3,
    USECASE_AUDIO_RECORD_COMPRESS4,
    USECASE_AUDIO_RECORD_COMPRESS5,
    USECASE_AUDIO_RECORD_COMPRESS6,
    USECASE_AUDIO_RECORD_LOW_LATENCY,
    USECASE_AUDIO_RECORD_FM_VIRTUAL,
    USECASE_AUDIO_RECORD_HIFI,

    USECASE_AUDIO_PLAYBACK_VOIP,
    USECASE_AUDIO_RECORD_VOIP,
    /* Voice usecase */
    USECASE_VOICE_CALL,
    USECASE_AUDIO_RECORD_MMAP,

    /* Voice extension usecases */
    USECASE_VOICE2_CALL,
    USECASE_VOLTE_CALL,
    USECASE_QCHAT_CALL,
    USECASE_VOWLAN_CALL,
    USECASE_VOICEMMODE1_CALL,
    USECASE_VOICEMMODE2_CALL,
    USECASE_COMPRESS_VOIP_CALL,

    USECASE_INCALL_REC_UPLINK,
    USECASE_INCALL_REC_DOWNLINK,
    USECASE_INCALL_REC_UPLINK_AND_DOWNLINK,
    USECASE_INCALL_REC_UPLINK_COMPRESS,
    USECASE_INCALL_REC_DOWNLINK_COMPRESS,
    USECASE_INCALL_REC_UPLINK_AND_DOWNLINK_COMPRESS,

    USECASE_INCALL_MUSIC_UPLINK,
    USECASE_INCALL_MUSIC_UPLINK2,

    USECASE_AUDIO_SPKR_CALIB_RX,
    USECASE_AUDIO_SPKR_CALIB_TX,

    USECASE_AUDIO_PLAYBACK_AFE_PROXY,
    USECASE_AUDIO_RECORD_AFE_PROXY,
    USECASE_AUDIO_DSM_FEEDBACK,

    USECASE_AUDIO_PLAYBACK_SILENCE,

    USECASE_AUDIO_RECORD_ECHO_REF,

    USECASE_AUDIO_TRANSCODE_LOOPBACK_RX,
    USECASE_AUDIO_TRANSCODE_LOOPBACK_TX,

    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM1,
    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM2,
    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM3,
    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM4,
    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM5,
    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM6,
    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM7,
    USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM8,

    USECASE_AUDIO_EC_REF_LOOPBACK,

    USECASE_AUDIO_A2DP_ABR_FEEDBACK,

    /* car streams usecases */
    USECASE_AUDIO_PLAYBACK_MEDIA,
    USECASE_AUDIO_PLAYBACK_SYS_NOTIFICATION,
    USECASE_AUDIO_PLAYBACK_NAV_GUIDANCE,
    USECASE_AUDIO_PLAYBACK_PHONE,

    /*Audio FM Tuner usecase*/
    USECASE_AUDIO_FM_TUNER_EXT,
    AUDIO_USECASE_MAX
};

enum {
    CAMERA_FACING_BACK = 0x0,
    CAMERA_FACING_FRONT = 0x1,
    CAMERA_FACING_MASK = 0x0F,
    CAMERA_ROTATION_LANDSCAPE = 0x0,
    CAMERA_ROTATION_INVERT_LANDSCAPE = 0x10,
    CAMERA_ROTATION_PORTRAIT = 0x20,
    CAMERA_ROTATION_MASK = 0xF0,
    CAMERA_BACK_LANDSCAPE = (CAMERA_FACING_BACK|CAMERA_ROTATION_LANDSCAPE),
    CAMERA_BACK_INVERT_LANDSCAPE = (CAMERA_FACING_BACK|CAMERA_ROTATION_INVERT_LANDSCAPE),
    CAMERA_BACK_PORTRAIT = (CAMERA_FACING_BACK|CAMERA_ROTATION_PORTRAIT),
    CAMERA_FRONT_LANDSCAPE = (CAMERA_FACING_FRONT|CAMERA_ROTATION_LANDSCAPE),
    CAMERA_FRONT_INVERT_LANDSCAPE = (CAMERA_FACING_FRONT|CAMERA_ROTATION_INVERT_LANDSCAPE),
    CAMERA_FRONT_PORTRAIT = (CAMERA_FACING_FRONT|CAMERA_ROTATION_PORTRAIT),
    CAMERA_DEFAULT = CAMERA_BACK_LANDSCAPE,
};

struct string_to_enum {
    const char *name;
    uint32_t value;
};
#define STRING_TO_ENUM(string) { #string, string }

static const struct string_to_enum formats_name_to_enum_table[] = {
    STRING_TO_ENUM(AUDIO_FORMAT_PCM_16_BIT),
    STRING_TO_ENUM(AUDIO_FORMAT_PCM_24_BIT_PACKED),
    STRING_TO_ENUM(AUDIO_FORMAT_PCM_32_BIT),
    STRING_TO_ENUM(AUDIO_FORMAT_AC3),
    STRING_TO_ENUM(AUDIO_FORMAT_E_AC3),
    STRING_TO_ENUM(AUDIO_FORMAT_E_AC3_JOC),
    STRING_TO_ENUM(AUDIO_FORMAT_DOLBY_TRUEHD),
    STRING_TO_ENUM(AUDIO_FORMAT_DTS),
    STRING_TO_ENUM(AUDIO_FORMAT_DTS_HD),
    STRING_TO_ENUM(AUDIO_FORMAT_IEC61937)
};

static const struct string_to_enum channels_name_to_enum_table[] = {
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_STEREO),
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_2POINT1),
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_QUAD),
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_SURROUND),
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_PENTA),
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_5POINT1),
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_6POINT1),
    STRING_TO_ENUM(AUDIO_CHANNEL_OUT_7POINT1),
    STRING_TO_ENUM(AUDIO_CHANNEL_IN_MONO),
    STRING_TO_ENUM(AUDIO_CHANNEL_IN_STEREO),
    STRING_TO_ENUM(AUDIO_CHANNEL_IN_FRONT_BACK),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_1),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_2),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_3),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_4),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_5),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_6),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_7),
    STRING_TO_ENUM(AUDIO_CHANNEL_INDEX_MASK_8),
};

const std::map<uint32_t, pal_audio_fmt_t> getFormatId {
    {AUDIO_FORMAT_PCM_8_BIT,           PAL_AUDIO_FMT_PCM_S8},
    {AUDIO_FORMAT_PCM_16_BIT,          PAL_AUDIO_FMT_PCM_S16_LE},
    {AUDIO_FORMAT_PCM_24_BIT_PACKED,   PAL_AUDIO_FMT_PCM_S24_3LE},
    {AUDIO_FORMAT_PCM_8_24_BIT,        PAL_AUDIO_FMT_PCM_S24_LE},
    {AUDIO_FORMAT_PCM_32_BIT,          PAL_AUDIO_FMT_PCM_S32_LE},
    {AUDIO_FORMAT_MP3,                 PAL_AUDIO_FMT_MP3},
    {AUDIO_FORMAT_AAC,                 PAL_AUDIO_FMT_AAC},
    {AUDIO_FORMAT_AAC_LC,              PAL_AUDIO_FMT_AAC},
    {AUDIO_FORMAT_AAC_ADTS_LC ,        PAL_AUDIO_FMT_AAC},
    {AUDIO_FORMAT_AAC_ADTS_HE_V1,      PAL_AUDIO_FMT_AAC},
    {AUDIO_FORMAT_AAC_ADTS_HE_V2,      PAL_AUDIO_FMT_AAC},
    {AUDIO_FORMAT_AAC_ADTS,            PAL_AUDIO_FMT_AAC_ADTS},
    {AUDIO_FORMAT_AAC_ADIF,            PAL_AUDIO_FMT_AAC_ADIF},
    {AUDIO_FORMAT_AAC_LATM,            PAL_AUDIO_FMT_AAC_LATM},
    {AUDIO_FORMAT_WMA,                 PAL_AUDIO_FMT_WMA_STD},
    {AUDIO_FORMAT_ALAC,                PAL_AUDIO_FMT_ALAC},
    {AUDIO_FORMAT_APE,                 PAL_AUDIO_FMT_APE},
    {AUDIO_FORMAT_WMA_PRO,             PAL_AUDIO_FMT_WMA_PRO},
    {AUDIO_FORMAT_FLAC,                PAL_AUDIO_FMT_FLAC},
    {AUDIO_FORMAT_VORBIS,              PAL_AUDIO_FMT_VORBIS}
};

const uint32_t format_to_bitwidth_table[] = {
    [AUDIO_FORMAT_DEFAULT] = 0,
    [AUDIO_FORMAT_PCM_16_BIT] = 16,
    [AUDIO_FORMAT_PCM_8_BIT] = 8,
    [AUDIO_FORMAT_PCM_32_BIT] = 32,
    [AUDIO_FORMAT_PCM_8_24_BIT] = 32,
    [AUDIO_FORMAT_PCM_FLOAT] = sizeof(float) * 8,
    [AUDIO_FORMAT_PCM_24_BIT_PACKED] = 24,
};

const std::unordered_map<uint32_t, uint32_t> compressRecordBitWidthTable{
    {AUDIO_FORMAT_AAC_LC, 16},
    {AUDIO_FORMAT_AAC_ADTS_LC, 16},
    {AUDIO_FORMAT_AAC_ADTS_HE_V1, 16},
    {AUDIO_FORMAT_AAC_ADTS_HE_V2, 16},
};

const std::map<uint32_t, uint32_t> getAlsaSupportedFmt {
    {AUDIO_FORMAT_PCM_32_BIT,           AUDIO_FORMAT_PCM_32_BIT},
    {AUDIO_FORMAT_PCM_FLOAT,            AUDIO_FORMAT_PCM_32_BIT},
    {AUDIO_FORMAT_PCM_8_24_BIT,         AUDIO_FORMAT_PCM_8_24_BIT},
    {AUDIO_FORMAT_PCM_8_BIT,            AUDIO_FORMAT_PCM_8_BIT},
    {AUDIO_FORMAT_PCM_24_BIT_PACKED,    AUDIO_FORMAT_PCM_24_BIT_PACKED},
    {AUDIO_FORMAT_PCM_16_BIT,           AUDIO_FORMAT_PCM_16_BIT},
};

const char * const use_case_table[AUDIO_USECASE_MAX] = {
    [USECASE_AUDIO_PLAYBACK_DEEP_BUFFER] = "deep-buffer-playback",
    [USECASE_AUDIO_PLAYBACK_LOW_LATENCY] = "low-latency-playback",
    [USECASE_AUDIO_PLAYBACK_WITH_HAPTICS] = "audio-with-haptics-playback",
    [USECASE_AUDIO_PLAYBACK_ULL]         = "audio-ull-playback",
    [USECASE_AUDIO_PLAYBACK_MULTI_CH]    = "multi-channel-playback",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD] = "compress-offload-playback",
    //Enabled for Direct_PCM
    [USECASE_AUDIO_PLAYBACK_OFFLOAD2] = "compress-offload-playback2",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD3] = "compress-offload-playback3",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD4] = "compress-offload-playback4",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD5] = "compress-offload-playback5",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD6] = "compress-offload-playback6",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD7] = "compress-offload-playback7",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD8] = "compress-offload-playback8",
    [USECASE_AUDIO_PLAYBACK_OFFLOAD9] = "compress-offload-playback9",
    [USECASE_AUDIO_PLAYBACK_FM] = "play-fm",
    [USECASE_AUDIO_PLAYBACK_MMAP] = "mmap-playback",
    [USECASE_AUDIO_PLAYBACK_HIFI] = "hifi-playback",
    [USECASE_AUDIO_PLAYBACK_TTS] = "audio-tts-playback",

    [USECASE_AUDIO_RECORD] = "audio-record",
    [USECASE_AUDIO_RECORD_COMPRESS] = "audio-record-compress",
    [USECASE_AUDIO_RECORD_COMPRESS2] = "audio-record-compress2",
    [USECASE_AUDIO_RECORD_COMPRESS3] = "audio-record-compress3",
    [USECASE_AUDIO_RECORD_COMPRESS4] = "audio-record-compress4",
    [USECASE_AUDIO_RECORD_COMPRESS5] = "audio-record-compress5",
    [USECASE_AUDIO_RECORD_COMPRESS6] = "audio-record-compress6",
    [USECASE_AUDIO_RECORD_LOW_LATENCY] = "low-latency-record",
    [USECASE_AUDIO_RECORD_FM_VIRTUAL] = "fm-virtual-record",
    [USECASE_AUDIO_RECORD_MMAP] = "mmap-record",
    [USECASE_AUDIO_RECORD_HIFI] = "hifi-record",

    [USECASE_AUDIO_HFP_SCO] = "hfp-sco",
    [USECASE_AUDIO_HFP_SCO_WB] = "hfp-sco-wb",
    [USECASE_VOICE_CALL] = "voice-call",

    [USECASE_VOICE2_CALL] = "voice2-call",
    [USECASE_VOLTE_CALL] = "volte-call",
    [USECASE_QCHAT_CALL] = "qchat-call",
    [USECASE_VOWLAN_CALL] = "vowlan-call",
    [USECASE_VOICEMMODE1_CALL] = "voicemmode1-call",
    [USECASE_VOICEMMODE2_CALL] = "voicemmode2-call",
    [USECASE_COMPRESS_VOIP_CALL] = "compress-voip-call",
    [USECASE_INCALL_REC_UPLINK] = "incall-rec-uplink",
    [USECASE_INCALL_REC_DOWNLINK] = "incall-rec-downlink",
    [USECASE_INCALL_REC_UPLINK_AND_DOWNLINK] = "incall-rec-uplink-and-downlink",
    [USECASE_INCALL_REC_UPLINK_COMPRESS] = "incall-rec-uplink-compress",
    [USECASE_INCALL_REC_DOWNLINK_COMPRESS] = "incall-rec-downlink-compress",
    [USECASE_INCALL_REC_UPLINK_AND_DOWNLINK_COMPRESS] = "incall-rec-uplink-and-downlink-compress",

    [USECASE_INCALL_MUSIC_UPLINK] = "incall_music_uplink",
    [USECASE_INCALL_MUSIC_UPLINK2] = "incall_music_uplink2",
    [USECASE_AUDIO_SPKR_CALIB_RX] = "spkr-rx-calib",
    [USECASE_AUDIO_SPKR_CALIB_TX] = "spkr-vi-record",

    [USECASE_AUDIO_PLAYBACK_AFE_PROXY] = "afe-proxy-playback",
    [USECASE_AUDIO_RECORD_AFE_PROXY] = "afe-proxy-record",
    [USECASE_AUDIO_PLAYBACK_SILENCE] = "silence-playback",

    [USECASE_AUDIO_RECORD_ECHO_REF] = "echo-ref-record",


    /* Transcode loopback cases */
    [USECASE_AUDIO_TRANSCODE_LOOPBACK_RX] = "audio-transcode-loopback-rx",
    [USECASE_AUDIO_TRANSCODE_LOOPBACK_TX] = "audio-transcode-loopback-tx",

    [USECASE_AUDIO_PLAYBACK_VOIP] = "audio-playback-voip",
    [USECASE_AUDIO_RECORD_VOIP] = "audio-record-voip",
    /* For Interactive Audio Streams */
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM1] = "audio-interactive-stream1",
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM2] = "audio-interactive-stream2",
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM3] = "audio-interactive-stream3",
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM4] = "audio-interactive-stream4",
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM5] = "audio-interactive-stream5",
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM6] = "audio-interactive-stream6",
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM7] = "audio-interactive-stream7",
    [USECASE_AUDIO_PLAYBACK_INTERACTIVE_STREAM8] = "audio-interactive-stream8",

    [USECASE_AUDIO_EC_REF_LOOPBACK] = "ec-ref-audio-capture",

    [USECASE_AUDIO_A2DP_ABR_FEEDBACK] = "a2dp-abr-feedback",

    [USECASE_AUDIO_PLAYBACK_MEDIA] = "media-playback",
    [USECASE_AUDIO_PLAYBACK_SYS_NOTIFICATION] = "sys-notification-playback",
    [USECASE_AUDIO_PLAYBACK_NAV_GUIDANCE] = "nav-guidance-playback",
    [USECASE_AUDIO_PLAYBACK_PHONE] = "phone-playback",
    [USECASE_AUDIO_FM_TUNER_EXT] = "fm-tuner-ext",
};

extern "C" typedef void (*hello_t)( const char* text );
extern "C" typedef int (*offload_effects_start_output)(audio_io_handle_t,
                                                       pal_stream_handle_t*);
extern "C" typedef int (*offload_effects_stop_output)(audio_io_handle_t,
                                                      pal_stream_handle_t*);

extern "C" typedef int (*visualizer_hal_start_output)(audio_io_handle_t,
                                                       pal_stream_handle_t*);
extern "C" typedef int (*visualizer_hal_stop_output)(audio_io_handle_t,
                                                      pal_stream_handle_t*);

int adev_open(audio_hw_device_t **device);

class AudioDevice;

class StreamPrimary {
public:
    StreamPrimary(audio_io_handle_t handle,
        const std::set<audio_devices_t> &devices,
        struct audio_config *config);
    virtual ~StreamPrimary();
    uint32_t        GetSampleRate();
    uint32_t        GetBufferSize();
    audio_format_t  GetFormat();
    audio_channel_mask_t GetChannelMask();
    int getPalDeviceIds(const std::set<audio_devices_t> &halDeviceIds, pal_device_id_t* palOutDeviceIds);
    audio_io_handle_t GetHandle();
    int             GetUseCase();
    std::mutex write_wait_mutex_;
    std::condition_variable write_condition_;
    std::mutex stream_mutex_;
    bool write_ready_;
    std::mutex drain_wait_mutex_;
    std::condition_variable drain_condition_;
    bool drain_ready_;
    stream_callback_t client_callback;
    void *client_cookie;
    static int GetDeviceAddress(struct str_parms *parms, int *card_id,
                                 int *device_num);
    int GetLookupTableIndex(const struct string_to_enum *table,
                                        const int table_size, int value);
    bool GetSupportedConfig(bool isOutStream,
                            struct str_parms *query, struct str_parms *reply);
    virtual int RouteStream(const std::set<audio_devices_t>&, bool force_device_switch = false) = 0;
protected:
    struct pal_stream_attributes streamAttributes_;
    pal_stream_handle_t*      pal_stream_handle_;
    audio_io_handle_t         handle_;
    pal_device_id_t           pal_device_id_;
    struct audio_config       config_;
    char                      address_[AUDIO_DEVICE_MAX_ADDRESS_LEN];
    bool                      stream_started_ = false;
    bool                      stream_paused_ = false;
    int usecase_;
    struct pal_volume_data *volume_; /* used to cache volume */
    std::map <audio_devices_t, pal_device_id_t> mAndroidDeviceMap;
    int mmap_shared_memory_fd;
    pal_param_device_capability_t *device_cap_query_;
};

class StreamOutPrimary : public StreamPrimary {
private:
    // Helper function for write to open pal stream & configure.
    ssize_t configurePalOutputStream();
    //Helper method to standby streams upon write failures and sleep for buffer duration.
    ssize_t onWriteError(size_t bytes, ssize_t ret);
    struct pal_device* mPalOutDevice;
    pal_device_id_t* mPalOutDeviceIds;
    std::set<audio_devices_t> mAndroidOutDevices;
    bool mInitialized;
    bool isOffloadUsecase() {
        int usecase = GetUseCase();
        switch (usecase) {
            case USECASE_AUDIO_PLAYBACK_OFFLOAD:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD2:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD3:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD4:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD5:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD6:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD7:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD8:
            case USECASE_AUDIO_PLAYBACK_OFFLOAD9:
                return true;
            default:
                return false;
        }
    }

public:
    StreamOutPrimary(audio_io_handle_t handle,
                     const std::set<audio_devices_t>& devices,
                     audio_output_flags_t flags,
                     struct audio_config *config,
                     const char *address,
                     offload_effects_start_output fnp_start_offload_effect,
                     offload_effects_stop_output fnp_stop_offload_effect,
                     visualizer_hal_start_output fnp_visualizer_start_output_,
                     visualizer_hal_stop_output fnp_visualizer_stop_output_);

    ~StreamOutPrimary();
    bool sendGaplessMetadata = true;
    bool isCompressMetadataAvail = false;
    void UpdatemCachedPosition(uint64_t val);
    int Standby();
    int SetVolume(float left, float right);
    uint64_t GetFramesWritten(struct timespec *timestamp);
    int SetParameters(struct str_parms *parms);
    int Pause();
    int Resume();
    int Drain(audio_drain_type_t type);
    int Flush();
    int Start();
    int Stop();
    ssize_t write(const void *buffer, size_t bytes);
    int Open();
    void GetStreamHandle(audio_stream_out** stream);
    uint32_t GetBufferSize();
    uint32_t GetBufferSizeForLowLatency();
    int GetFrames(uint64_t *frames);
    static pal_stream_type_t GetPalStreamType(audio_output_flags_t halStreamFlags);
    static int64_t GetRenderLatency(audio_output_flags_t halStreamFlags);
    int GetOutputUseCase(audio_output_flags_t halStreamFlags);
    int StartOffloadEffects(audio_io_handle_t, pal_stream_handle_t*);
    int StopOffloadEffects(audio_io_handle_t, pal_stream_handle_t*);
    bool CheckOffloadEffectsType(pal_stream_type_t pal_stream_type);
    int StartOffloadVisualizer(audio_io_handle_t, pal_stream_handle_t*);
    int StopOffloadVisualizer(audio_io_handle_t, pal_stream_handle_t*);
    audio_output_flags_t flags_;
    int CreateMmapBuffer(int32_t min_size_frames, struct audio_mmap_buffer_info *info);
    int GetMmapPosition(struct audio_mmap_position *position);
    bool isDeviceAvailable(pal_device_id_t deviceId);
    int RouteStream(const std::set<audio_devices_t>&, bool force_device_switch = false);
    ssize_t splitAndWriteAudioHapticsStream(const void *buffer, size_t bytes);
    bool period_size_is_plausible_for_low_latency(int period_size);
protected:
    struct timespec writeAt;
    int get_compressed_buffer_size();
    int get_pcm_buffer_size();
    audio_format_t halInputFormat = AUDIO_FORMAT_DEFAULT;
    audio_format_t halOutputFormat = AUDIO_FORMAT_DEFAULT;
    uint32_t convertBufSize;
    uint32_t fragments_ = 0;
    uint32_t fragment_size_ = 0;
    pal_snd_dec_t palSndDec;
    struct pal_compr_gapless_mdata gaplessMeta;
    uint32_t msample_rate;
    uint16_t mchannels;
    std::shared_ptr<audio_stream_out>   stream_;
    uint64_t mBytesWritten; /* total bytes written, not cleared when entering standby */
    uint64_t mCachedPosition = 0; /* cache pcm offload position when entering standby */
    offload_effects_start_output fnp_offload_effect_start_output_ = nullptr;
    offload_effects_stop_output fnp_offload_effect_stop_output_ = nullptr;
    visualizer_hal_start_output fnp_visualizer_start_output_ = nullptr;
    visualizer_hal_stop_output fnp_visualizer_stop_output_ = nullptr;
    void *convertBuffer;
    //Haptics Usecase
    struct pal_stream_attributes hapticsStreamAttributes;
    pal_stream_handle_t* pal_haptics_stream_handle;
    AudioExtn AudExtn;
    struct pal_device* hapticsDevice;
    uint8_t* hapticBuffer;
    size_t hapticsBufSize;

    int FillHalFnPtrs();
    friend class AudioDevice;
};

class StreamInPrimary : public StreamPrimary{

private:
     struct pal_device* mPalInDevice;
     pal_device_id_t* mPalInDeviceIds;
     std::set<audio_devices_t> mAndroidInDevices;
     bool mInitialized;
    //Helper method to standby streams upon read failures and sleep for buffer duration.
    ssize_t onReadError(size_t bytes, size_t ret);
public:
    StreamInPrimary(audio_io_handle_t handle,
                    const std::set<audio_devices_t> &devices,
                    audio_input_flags_t flags,
                    struct audio_config *config,
                    const char *address,
                    audio_source_t source);

    ~StreamInPrimary();
    int Standby();
    int SetGain(float gain);
    void GetStreamHandle(audio_stream_in** stream);
    int Open();
    int Start();
    int Stop();
    int SetMicMute(bool mute);
    ssize_t read(const void *buffer, size_t bytes);
    uint32_t GetBufferSize();
    uint32_t GetBufferSizeForLowLatencyRecord();
    pal_stream_type_t GetPalStreamType(audio_input_flags_t halStreamFlags,
            uint32_t sample_rate);
    int GetInputUseCase(audio_input_flags_t halStreamFlags, audio_source_t source);
    int addRemoveAudioEffect(const struct audio_stream *stream, effect_handle_t effect,bool enable);
    int SetParameters(const char *kvpairs);
    bool getParameters(struct str_parms *query, struct str_parms *reply);
    bool is_st_session;
    audio_input_flags_t                 flags_;
    int CreateMmapBuffer(int32_t min_size_frames, struct audio_mmap_buffer_info *info);
    int GetMmapPosition(struct audio_mmap_position *position);
    bool isDeviceAvailable(pal_device_id_t deviceId);
    int RouteStream(const std::set<audio_devices_t>& new_devices, bool force_device_switch = false);
    int64_t GetSourceLatency(audio_input_flags_t halStreamFlags);
    uint64_t GetFramesRead(int64_t *time);
    int GetPalDeviceIds(pal_device_id_t *palDevIds, int *numPalDevs);
protected:
    struct timespec readAt;
    uint32_t fragments_ = 0;
    uint32_t fragment_size_ = 0;
    int FillHalFnPtrs();
    std::shared_ptr<audio_stream_in>    stream_;
    audio_source_t                      source_;
    friend class AudioDevice;
    uint64_t mBytesRead = 0; /* total bytes read, not cleared when entering standby */
    /**
     * number of successful compress read calls
     * correlate to number of PCM frames read in
     * compress record usecase
     * */
    uint64_t mCompressReadCalls = 0;
    int32_t mCompressStreamAdjBitRate;
    bool mIsBitRateSet =false;
    bool mIsBitRateGet = false;
    bool isECEnabled = false;
    bool isNSEnabled = false;
    bool effects_applied_ = true;
    pal_snd_enc_t palSndEnc{};
};
#endif  // ANDROID_HARDWARE_AHAL_ASTREAM_H_
