//CC_AUD_AQ_IN_DRVCUST
#define AUD_EXTERN_FILE


//=======================
//  [!!!!**CAUTION**!!!!]
// Please exclude Loader
//=======================
#if ((!defined(CC_MTK_PRELOADER)) && (!defined(CC_MTK_LOADER))) 

//---------------------------------------------------------------------------
// Include files
//---------------------------------------------------------------------------
/* =======================================================
 [!!!!**CAUTION**!!!!]
 You can only include header 
    files in \target\mtxxxx\xxxx_driver\drv_inc\
 or files in \vm_linux\output\sysbuild\xxxx\rel(or debug)\inc\drv_inc\
 or files in "the same directory."
========================================================= */
#include "x_typedef.h"
#include "x_os.h"
#include "x_bim.h"
#include "x_printf.h"
#include "x_assert.h"
#include "x_util.h"
#include "aud_if.h"
#include "drvcust_if.h"
#include "nor_if.h"
#include "nand_if.h"
#include "storage_if.h"

#include "sakura_aud_aq_data.h"

#if defined(__KERNEL__)&&!defined(CC_UBOOT)
#include <linux/device.h>
#include <linux/firmware.h>
#include <linux/err.h>
#include <linux/version.h>
#include <linux/platform_device.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(4, 4, 0)
#include <linux/soc/mediatek/opm_device.h>
#else
#include <linux/opm_device.h>
#endif
extern struct platform_device request_flashaq_device;
#endif


extern UINT32 _gu4BeDelay;
extern AUD_AOUT_PAD_CFG_T _grAOutPadCfg;
extern void AUD_AoutPADMux(AUD_CH_T ePAD_SDATA0, AUD_CH_T ePAD_SDATA1, AUD_CH_T ePAD_SDATA2,
                    AUD_CH_T ePAD_SDATA3, AUD_CH_T ePAD_SDATA4, AUD_CH_T ePAD_SDATA5,
                    UINT8 PAD_MCLK0);
extern BOOL AUD_DspIecChannel(AUD_IEC_CH_T eIecChannel);
#if defined(CC_AUD_ARM_SUPPORT) && defined(CC_AUD_ARM_RENDER)
extern void _vAprocSetRoutine (UINT32 u4Id);
#endif
#ifdef CUSTOM_SELF_DIAG_ENABLE
extern void SelfDiagSetAudAmpType(UINT8 u1ErrorDetectType);
#endif

#ifdef CC_AUD_SAKURA_RENDER
extern void _AUD_UpdateDspConfig(BOOL forceUpdateFlag);
#endif
//---------------------------------------------------------------------------
// Const defitions
//---------------------------------------------------------------------------
//#define CHANGE_ENDIAN       // Change MSB/LSB 
//#define AQ_DEBUG            // Print log
//#define AQ_KEY_DEBUG        // Print table key search log (many logs...)
//#define AQ_SELF_TEST        // For self test only (make some fake data to test...)
#define AQ_IDX_DEBUG

#ifdef AQ_DEBUG
#define aq_printf  printf
#else
#define aq_printf(...)  do {} while(0)
#endif
#ifdef AQ_KEY_DEBUG
#define aqkey_printf  printf
#else
#define aqkey_printf(a,b,...)  do {} while(0)
#endif


// Flash layout
#define AQ_LEN          (200*1024)  // In Bytes.
#define AQ_PARTITION    17          // AQ Partition on Flash.
#define AQ_BIN_NAME    "aqda.bin"

// Data offset in AQ Table
#ifdef CC_AUD_SAKURA_RENDER_AQ
#define MM_SVT_SP_OFFSET            AQDATA_ADDRESS_MM_SVT_SP
#define MM_SVT_SPW_OFFSET           AQDATA_ADDRESS_MM_SVT_SPW
#define MM_SVT_HP_OFFSET            AQDATA_ADDRESS_MM_SVT_HP
#define MM_SVT_LO_OFFSET            AQDATA_ADDRESS_MM_SVT_LO
#define MM_SVT_LOH_OFFSET           AQDATA_ADDRESS_MM_SVT_LOH
#define MM_SVT_ASW_OFFSET           AQDATA_ADDRESS_MM_SVT_ASW
#define MM_SVT_DSW_OFFSET           AQDATA_ADDRESS_MM_SVT_DSW
#define MM_SVT_BT_OFFSET            AQDATA_ADDRESS_MM_SVT_BT
#define MM_DRCT_OFFSET              AQDATA_ADDRESS_MM_DRCT
#define MM_LIMT_OFFSET              AQDATA_ADDRESS_MM_LIMT
#define MM_FIR_OFFSET               AQDATA_ADDRESS_MM_FIR
#define MM_LOUDT_OFFSET             AQDATA_ADDRESS_MM_LOUDT
#define MM_SMT_OFFSET               AQDATA_ADDRESS_MM_SMT
#define MM_SWS_OFFSET               AQDATA_ADDRESS_MM_SWS
#define MM_SLT_OFFSET               AQDATA_ADDRESS_MM_SLT
#define MM_SPEQ_OFFSET              AQDATA_ADDRESS_MM_SPEQ
#define MM_AU_DLY_OFFSET            AQDATA_ADDRESS_MM_AU_DLY
#define MM_ADCT_OFFSET              AQDATA_ADDRESS_MM_ADCT
#define MM_ACT_OFFSET               AQDATA_ADDRESS_MM_ACT
#define MM_ADT_OFFSET               AQDATA_ADDRESS_MM_ADT
#define MM_RSV_OFFSET               AQDATA_ADDRESS_MM_RSV
#define DA_GENERAL_CONFIG_OFFSET    AQDATA_ADDRESS_DA_GENERAL_CONFIG
#define DA_5760_CONFIG1_OFFSET      AQDATA_ADDRESS_DA_5760_CONFIG1
#define DA_5760_CONFIG2_OFFSET      AQDATA_ADDRESS_DA_5760_CONFIG2
#define DA_5538_CONFIG_OFFSET       AQDATA_ADDRESS_DA_5538_CONFIG
#define DA_5538_BQ_OFFSET           AQDATA_ADDRESS_DA_5538_BQ
#define DA_5538_BT_OFFSET           AQDATA_ADDRESS_DA_5538_BT
#define DA_5538_LOUD_OFFSET         AQDATA_ADDRESS_DA_5538_LOUD
#define DA_5538_DRC_OFFSET          AQDATA_ADDRESS_DA_5538_DRC
#define MM_AU_DLY2_OFFSET           AQDATA_ADDRESS_MM_AU_DLY2
#endif //CC_AUD_SAKURA_RENDER_AQ
#ifdef CC_AUD_SAKURA_RENDER
// Data position in 32 bit Key.
// If add or modify these position, please check the definition of LOOP_OF_XX_KEY and NUM_OF_KEY.
#define FS_POS              0
#define MM_MODE_POS         4
#define WIRELESS_WOOFER_POS 8
#define TV_POSITION_POS     12
#define INPUT_POS           16
#define SOUND_MODE_POS      20
#define BT_TYPE_POS         24
#define PICTURE_MODE_POS    28

#define TYPE_ANY    0x0
#define AQ_MAKE_KEY(FS, MODE, WIRELESS, POS, INPUT, SND_MODE, BT_TYPE, PIC )  \ 
                   (((FS    << FS_POS)    | (MODE     << MM_MODE_POS)    | (WIRELESS << WIRELESS_WOOFER_POS) | (POS << TV_POSITION_POS) | \
                     (INPUT << INPUT_POS) | (SND_MODE << SOUND_MODE_POS) | (BT_TYPE  << BT_TYPE_POS)         | (PIC << PICTURE_MODE_POS)) \
                     & 0xFFFFFFFF)

#define LOOP_OF_INTPUT_KEY  (4)   // INPUT is in bit16~19, which is in the 4th loop when checking key.
#define LOOP_OF_S_MODE_KEY  (5)   // SOUND MODE is in bit20~23, which is in the 5th loop when checking key.
#define NUM_OF_KEY          (8)   // Key is 32 Bit, every item is 4 Bit, now we use 32 bit (0xFFFFFFFF)

#else //CC_AUD_SAKURA_RENDER

#define MM_SVT_SP_OFFSET 8 
#define MM_SVT_SPW_OFFSET 824 
#define MM_SVT_HP_OFFSET 1640 
#define MM_SVT_LO_OFFSET 2456 
#define MM_SVT_LOH_OFFSET 3272 
#define MM_SVT_ASW_OFFSET 4088 
#define MM_SVT_DSW_OFFSET 4904 
#define MM_SVT_BT_OFFSET 5720 
#define MM_DRCT_OFFSET 6536 
#define MM_LIMT_OFFSET 9128 
#define MM_FIR_OFFSET 10280 
#define MM_LOUDT_OFFSET         14408
#define MM_SMT_OFFSET   14792
#define MM_SWS_OFFSET   26792
#define MM_SLT_OFFSET   28232
#define MM_SPEQ_OFFSET  28360
#define MM_AU_DLY_OFFSET        28792
#define MM_ADCT_OFFSET  28888
#define MM_ACT_OFFSET   28904
#define MM_ADT_OFFSET   28928
#define MM_RSV_OFFSET   28960
#define DA_GENERAL_CONFIG_OFFSET        28976
#define DA_5760_CONFIG1_OFFSET  28984
#define DA_5760_CONFIG2_OFFSET  28992
#define DA_5538_CONFIG_OFFSET   29000
#define DA_5538_BQ_OFFSET       29124
#define DA_5538_BT_OFFSET       30244
#define DA_5538_LOUD_OFFSET     30284
#define DA_5538_DRC_OFFSET      30356


// Data position in 32 bit Key.
#define FS_POS              0
#define MM_MODE_POS         4
#define TV_POSITION_POS     8
#define INPUT_POS           12
#define SOUND_MODE_POS      16
#define SOUND_BOOSTER_POS   20
#define CLAER_AUD_POS       20
#define BT_TYPE_POS         20
#define WIRELESS_WOOFER_POS 24
#define PICTURE_MODE_POS    24

#define TYPE_ANY    0xF
#define AQ_MAKE_KEY(FS, MODE, POS, INPUT, SND_MODE, BOOSTER, WIRELESS)  \
                   (((FS <<FS_POS) | (MODE <<MM_MODE_POS) | (POS <<TV_POSITION_POS) | \
                    (INPUT <<INPUT_POS) | (SND_MODE <<SOUND_MODE_POS) | (BOOSTER <<SOUND_BOOSTER_POS) |  \
                    (WIRELESS <<WIRELESS_WOOFER_POS)) & 0x0FFFFFFF)


#define LOOP_OF_INTPUT_KEY  (3)     // INPUT is in bit12~15, which is in the 3rd loop when checking key.
#define NUM_OF_KEY          (8-1)   // Key is 32 Bit, every item is 4 Bit, now we use 28 bit (0x0FFFFFFF)

#endif /* CC_AUD_SAKURA_RENDER */

#define AQ_ADT_MODE_ON      0x99
#define AQ_SPKSEL_IS_ORIGNAL  0x99
#define AQ_SPKCFG_IS_ORIGNAL  0x99

#ifndef CC_AUD_SAKURA_RENDER
#define APROC_POSTBUF_BLOCK_SIZE 64 // samples in one block 
#endif /* CC_AUD_SAKURA_RENDER */

//-----------------------------------------------------------------------------
// Grobal
//-----------------------------------------------------------------------------
#ifdef CC_AUD_SAKURA_RENDER_AQ
AQDataDa5760Config1 gDa5760Cfg1Data;
AQDataDa5760Config2 gDa5760Cfg2Data;
AQDataDa5538Config gDa5538CfgData;
AQDataDa5538Bq gDa5538BqData;
AQDataDa5538Bt gDa5538BtData;
AQDataDa5538Loud gDa5538LoudData;
AQDataDa5538Drc gDa5538DrcData;
#endif //CC_AUD_SAKURA_RENDER_AQ
#ifdef CC_AUD_SAKURA_RENDER
AQDataDa15782Vol gDa15782Vol;
AQDataDa25782Vol gDa25782Vol;
AQDataDa35782Vol gDa35782Vol;
AQDataDa45782Vol gDa45782Vol;
AQDataDa15782Bq gDa15782Bq;
AQDataDa25782Bq gDa25782Bq;
AQDataDa35782Bq gDa35782Bq;
AQDataDa45782Bq gDa45782Bq;
AQDataDa15782Dpeq gDa15782Dpeq;
AQDataDa25782Dpeq gDa25782Dpeq;
AQDataDa35782Dpeq gDa35782Dpeq;
AQDataDa45782Dpeq gDa45782Dpeq;
AQDataDa15782Drc gDa15782Drc;
AQDataDa25782Drc gDa25782Drc;
AQDataDa35782Drc gDa35782Drc;
AQDataDa45782Drc gDa45782Drc;
AQDataDa15782General gDa15782General;
AQDataDa25782General gDa25782General;
AQDataDa35782General gDa35782General;
AQDataDa45782General gDa45782General;
#endif //CC_AUD_SAKURA_RENDER

#ifdef AQ_IDX_DEBUG
#define AQ_IDX_DBG_INDEX_NUM (AUD_DrvCust_AQ_Get_MS_RSV - AUD_DrvCust_AQ_Get_SVT_SP + 1)
#define AQ_IDX_DBG_INDEX_OFFSET (AUD_DrvCust_AQ_Get_SVT_SP)
UINT32 gAqIdxDebugIndex[AQ_IDX_DBG_INDEX_NUM];
#endif /* AQ_IDX_DEBUG */
//#endif /* CC_AUD_SAKURA_RENDER */
//-----------------------------------------------------------------------------
// Static variables
//-----------------------------------------------------------------------------
#ifndef CC_AUD_SAKURA_RENDER
typedef struct
{
    UINT32 u4DrvDly;           //ms,   Delay from MTK video driver
    UINT32 u4BeDly;            //ms,   Delay from SONY 4K/2K Ex-FRC
    INT32  i4MainAdj;          //ms,   (-128..127ms) caculate from MM_MAIN_ADJ of AQ 
    UINT32 u4MainDelay;        //bank, value set to APROC MainDelay
    UINT32 u4SpAdj;            //bank, value from AQ(m_MmSpAdj) and covert ms to bank.
    UINT32 u4SubWooferSync;    //0.24, UI value 0..24 means -12..12
    UINT32 u4USwDlyAdj;        //bank, from UI mapping to banks,
    UINT32 u4LSwDlyAdj;        //bank, from UI mapping to banks,
    UINT32 u4SpDiffDelay;      //bank, Value set to APROC speaker diff delay
    UINT32 u4AssistSpDiffDelay;//bank, Value set to APROC assist speaker diff delay
    UINT32 u4HoLoSwAdj;        //ms,   Value from AQ(m_MmHoloswAdj) and convert to ms.
    UINT32 u4HpDiffDelay;      //bank, Value set to APROC HP Diff Delay.
    UINT32 u4Spdif_Adj;        //ms,   Value from AQ(m_MmSpdifAdj) and convert to ms.
    UINT32 u4SpdifDiffDelay;   //bank, Value set to APROC SPDIF Diff Delay.
    UINT32 u4SpdifRawDelay;    //Frames, Value set to APROC SPDIF Raw Delay.    
} AQ_DLY_SETVAL_T;

AQ_DLY_SETVAL_T rAudDlySetValInfo;
#endif /* CC_AUD_SAKURA_RENDER */


typedef struct
{
    UINT32 u4Key;
    UINT32 u4ExceptKey;
    UINT32 u4Inputs;    
} AQ_TBL_KEY_T;
#ifdef CC_AUD_SAKURA_RENDER
AQ_TBL_KEY_T _ar_VersionTbl_Key[AQDATA_INDEX_VERSION_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtSpTbl_Key[AQDATA_INDEX_MM_SVT_SP_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtSpwTbl_Key[AQDATA_INDEX_MM_SVT_SPW_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtHpTbl_Key[AQDATA_INDEX_MM_SVT_HP_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtSpdifTbl_Key[AQDATA_INDEX_MM_SVT_SPDIF_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtBtTbl_Key[AQDATA_INDEX_MM_SVT_BT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtEcTbl_Key[AQDATA_INDEX_MM_SVT_EC_MAX]= {0};
AQ_TBL_KEY_T _ar_MmFirTbl_Key[AQDATA_INDEX_MM_FIR_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmLoudtTbl_Key[AQDATA_INDEX_MM_LOUDT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmDrctTbl_Key[AQDATA_INDEX_MM_DRCT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmLimtTbl_Key[AQDATA_INDEX_MM_LIMT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_MAX]= {0};
AQ_TBL_KEY_T _ar_MmActTbl_Key[AQDATA_INDEX_MM_ACT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmAdctTbl_Key[AQDATA_INDEX_MM_ADCT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmRsvTbl_Key[AQDATA_INDEX_MM_RSV_MAX]= {0};
AQ_TBL_KEY_T _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_MAX]= {0};
AQ_TBL_KEY_T _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_MAX]= {0};
AQ_TBL_KEY_T _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_MAX]= {0};
AQ_TBL_KEY_T _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_MAX]= {0};
AQ_TBL_KEY_T _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_MAX]= {0};
AQ_TBL_KEY_T _ar_DdGeqTbl_Key[AQDATA_INDEX_DD_GEQ_MAX]= {0};
AQ_TBL_KEY_T _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_MAX]= {0};
AQ_TBL_KEY_T _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_MAX]= {0};
AQ_TBL_KEY_T _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_MAX]= {0};
AQ_TBL_KEY_T _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_MAX]= {0};
AQ_TBL_KEY_T _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_MAX]= {0};
AQ_TBL_KEY_T _ar_DaGeneralConfigTbl_Key[AQDATA_INDEX_DA_GENERAL_CONFIG_MAX]= {0};
AQ_TBL_KEY_T _ar_Da15782VolTbl_Key[AQDATA_INDEX_DA1_5782_VOL_MAX]= {0};
AQ_TBL_KEY_T _ar_Da25782VolTbl_Key[AQDATA_INDEX_DA2_5782_VOL_MAX]= {0};
AQ_TBL_KEY_T _ar_Da35782VolTbl_Key[AQDATA_INDEX_DA3_5782_VOL_MAX]= {0};
AQ_TBL_KEY_T _ar_Da45782VolTbl_Key[AQDATA_INDEX_DA4_5782_VOL_MAX]= {0};
AQ_TBL_KEY_T _ar_Da15782BqTbl_Key[AQDATA_INDEX_DA1_5782_BQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da25782BqTbl_Key[AQDATA_INDEX_DA2_5782_BQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da35782BqTbl_Key[AQDATA_INDEX_DA3_5782_BQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da45782BqTbl_Key[AQDATA_INDEX_DA4_5782_BQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da15782DpeqTbl_Key[AQDATA_INDEX_DA1_5782_DPEQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da25782DpeqTbl_Key[AQDATA_INDEX_DA2_5782_DPEQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da35782DpeqTbl_Key[AQDATA_INDEX_DA3_5782_DPEQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da45782DpeqTbl_Key[AQDATA_INDEX_DA4_5782_DPEQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da15782DrcTbl_Key[AQDATA_INDEX_DA1_5782_DRC_MAX]= {0};
AQ_TBL_KEY_T _ar_Da25782DrcTbl_Key[AQDATA_INDEX_DA2_5782_DRC_MAX]= {0};
AQ_TBL_KEY_T _ar_Da35782DrcTbl_Key[AQDATA_INDEX_DA3_5782_DRC_MAX]= {0};
AQ_TBL_KEY_T _ar_Da45782DrcTbl_Key[AQDATA_INDEX_DA4_5782_DRC_MAX]= {0};
AQ_TBL_KEY_T _ar_Da15782GeneralTbl_Key[AQDATA_INDEX_DA1_5782_GENERAL_MAX]= {0};
AQ_TBL_KEY_T _ar_Da25782GeneralTbl_Key[AQDATA_INDEX_DA2_5782_GENERAL_MAX]= {0};
AQ_TBL_KEY_T _ar_Da35782GeneralTbl_Key[AQDATA_INDEX_DA3_5782_GENERAL_MAX]= {0};
AQ_TBL_KEY_T _ar_Da45782GeneralTbl_Key[AQDATA_INDEX_DA4_5782_GENERAL_MAX]= {0};
AQ_TBL_KEY_T _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_MAX]= {0};
AQ_TBL_KEY_T _ar_MsRsvTbl_Key[AQDATA_INDEX_MS_RSV_MAX]= {0};
#else
AQ_TBL_KEY_T _ar_MmSvtSpTbl_Key[AQDATA_INDEX_MM_SVT_SP_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtSpwTbl_Key[AQDATA_INDEX_MM_SVT_SPW_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtHpTbl_Key[AQDATA_INDEX_MM_SVT_HP_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtLoTbl_Key[AQDATA_INDEX_MM_SVT_LO_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtLohTbl_Key[AQDATA_INDEX_MM_SVT_LOH_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtAswTbl_Key[AQDATA_INDEX_MM_SVT_ASW_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtDswTbl_Key[AQDATA_INDEX_MM_SVT_DSW_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSvtBtTbl_Key[AQDATA_INDEX_MM_SVT_BT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmDrctTbl_Key[AQDATA_INDEX_MM_DRCT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmLimtTbl_Key[AQDATA_INDEX_MM_LIMT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmFirTbl_Key[AQDATA_INDEX_MM_FIR_MAX]= {0};
AQ_TBL_KEY_T _ar_MmLoudtTbl_Key[AQDATA_INDEX_MM_LOUDT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSwsTbl_Key[AQDATA_INDEX_MM_SWS_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmSpeqTbl_Key[AQDATA_INDEX_MM_SPEQ_MAX]= {0};
AQ_TBL_KEY_T _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_MAX]= {0};
AQ_TBL_KEY_T _ar_MmAdctTbl_Key[AQDATA_INDEX_MM_ADCT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmActTbl_Key[AQDATA_INDEX_MM_ACT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmAdtTbl_Key[AQDATA_INDEX_MM_ADT_MAX]= {0};
AQ_TBL_KEY_T _ar_MmRsvTbl_Key[AQDATA_INDEX_MM_RSV_MAX]= {0};
AQ_TBL_KEY_T _ar_DaGeneralConfigTbl_Key[AQDATA_INDEX_DA_GENERAL_CONFIG_MAX]= {0};
AQ_TBL_KEY_T _ar_Da5760Config1Tbl_Key[AQDATA_INDEX_DA_5760_CONFIG1_MAX]= {0};
AQ_TBL_KEY_T _ar_Da5760Config2Tbl_Key[AQDATA_INDEX_DA_5760_CONFIG2_MAX]= {0};
AQ_TBL_KEY_T _ar_Da5538ConfigTbl_Key[AQDATA_INDEX_DA_5538_CONFIG_MAX]= {0};
AQ_TBL_KEY_T _ar_Da5538BqTbl_Key[AQDATA_INDEX_DA_5538_BQ_MAX]= {0};
AQ_TBL_KEY_T _ar_Da5538BtTbl_Key[AQDATA_INDEX_DA_5538_BT_MAX]= {0};
AQ_TBL_KEY_T _ar_Da5538LoudTbl_Key[AQDATA_INDEX_DA_5538_LOUD_MAX]= {0};
AQ_TBL_KEY_T _ar_Da5538DrcTbl_Key[AQDATA_INDEX_DA_5538_DRC_MAX]= {0};
#endif //CC_AUD_SAKURA_RENDER
extern CUST_AUD_SOUND_SETTING_T gSoundSetting;

#ifdef CC_AUD_SAKURA_RENDER
/* AQ Data address table */
typedef struct {
    unsigned long m_id;
    unsigned long m_address;
    unsigned long m_size;
    unsigned long m_indexNum;
} AQDataAddressTable;

const AQDataAddressTable gAQDataAddressTable[] = {
    { AQDATA_GROUP_VERSION,                 AQDATA_ADDRESS_VERSION,               AQDATA_SIZE_VERSION,                  AQDATA_INDEX_VERSION_MAX,             },
    { AQDATA_GROUP_MM_SVT_SP,               AQDATA_ADDRESS_MM_SVT_SP,             AQDATA_SIZE_MM_SVT_SP,                AQDATA_INDEX_MM_SVT_SP_MAX,           },
    { AQDATA_GROUP_MM_SVT_SPW,              AQDATA_ADDRESS_MM_SVT_SPW,            AQDATA_SIZE_MM_SVT_SPW,               AQDATA_INDEX_MM_SVT_SPW_MAX,          },
    { AQDATA_GROUP_MM_SVT_HP,               AQDATA_ADDRESS_MM_SVT_HP,             AQDATA_SIZE_MM_SVT_HP,                AQDATA_INDEX_MM_SVT_HP_MAX,           },
    { AQDATA_GROUP_MM_SVT_SPDIF,            AQDATA_ADDRESS_MM_SVT_SPDIF,          AQDATA_SIZE_MM_SVT_SPDIF,             AQDATA_INDEX_MM_SVT_SPDIF_MAX,        },
    { AQDATA_GROUP_MM_SVT_BT,               AQDATA_ADDRESS_MM_SVT_BT,             AQDATA_SIZE_MM_SVT_BT,                AQDATA_INDEX_MM_SVT_BT_MAX,           },
    { AQDATA_GROUP_MM_SVT_EC,               AQDATA_ADDRESS_MM_SVT_EC,             AQDATA_SIZE_MM_SVT_EC,                AQDATA_INDEX_MM_SVT_EC_MAX,           },
    { AQDATA_GROUP_MM_FIR,                  AQDATA_ADDRESS_MM_FIR,                AQDATA_SIZE_MM_FIR,                   AQDATA_INDEX_MM_FIR_MAX,              },
    { AQDATA_GROUP_MM_SMT,                  AQDATA_ADDRESS_MM_SMT,                AQDATA_SIZE_MM_SMT,                   AQDATA_INDEX_MM_SMT_MAX,              },
    { AQDATA_GROUP_MM_LOUDT,                AQDATA_ADDRESS_MM_LOUDT,              AQDATA_SIZE_MM_LOUDT,                 AQDATA_INDEX_MM_LOUDT_MAX,            },
    { AQDATA_GROUP_MM_DRCT,                 AQDATA_ADDRESS_MM_DRCT,               AQDATA_SIZE_MM_DRCT,                  AQDATA_INDEX_MM_DRCT_MAX,             },
    { AQDATA_GROUP_MM_SLT,                  AQDATA_ADDRESS_MM_SLT,                AQDATA_SIZE_MM_SLT,                   AQDATA_INDEX_MM_SLT_MAX,              },
    { AQDATA_GROUP_MM_LIMT,                 AQDATA_ADDRESS_MM_LIMT,               AQDATA_SIZE_MM_LIMT,                  AQDATA_INDEX_MM_LIMT_MAX,             },
    { AQDATA_GROUP_MM_AU_DLY,               AQDATA_ADDRESS_MM_AU_DLY,             AQDATA_SIZE_MM_AU_DLY,                AQDATA_INDEX_MM_AU_DLY_MAX,           },
    { AQDATA_GROUP_MM_ACT,                  AQDATA_ADDRESS_MM_ACT,                AQDATA_SIZE_MM_ACT,                   AQDATA_INDEX_MM_ACT_MAX,              },
    { AQDATA_GROUP_MM_ADCT,                 AQDATA_ADDRESS_MM_ADCT,               AQDATA_SIZE_MM_ADCT,                  AQDATA_INDEX_MM_ADCT_MAX,             },
    { AQDATA_GROUP_MM_RSV,                  AQDATA_ADDRESS_MM_RSV,                AQDATA_SIZE_MM_RSV,                   AQDATA_INDEX_MM_RSV_MAX,              },
    { AQDATA_GROUP_DD_OPTIMIZER,            AQDATA_ADDRESS_DD_OPTIMIZER,          AQDATA_SIZE_DD_OPTIMIZER,             AQDATA_INDEX_DD_OPTIMIZER_MAX,        },
    { AQDATA_GROUP_DD_REGU,                 AQDATA_ADDRESS_DD_REGU,               AQDATA_SIZE_DD_REGU,                  AQDATA_INDEX_DD_REGU_MAX,             },
    { AQDATA_GROUP_DD_GENERAL,              AQDATA_ADDRESS_DD_GENERAL,            AQDATA_SIZE_DD_GENERAL,               AQDATA_INDEX_DD_GENERAL_MAX,          },
    { AQDATA_GROUP_DD_GENERAL2,             AQDATA_ADDRESS_DD_GENERAL2,           AQDATA_SIZE_DD_GENERAL2,              AQDATA_INDEX_DD_GENERAL2_MAX,         },
    { AQDATA_GROUP_DD_IEQ,                  AQDATA_ADDRESS_DD_IEQ,                AQDATA_SIZE_DD_IEQ,                   AQDATA_INDEX_DD_IEQ_MAX,              },
    { AQDATA_GROUP_DD_GEQ,                  AQDATA_ADDRESS_DD_GEQ,                AQDATA_SIZE_DD_GEQ,                   AQDATA_INDEX_DD_GEQ_MAX,              },
    { AQDATA_GROUP_DD_BASS_EN,              AQDATA_ADDRESS_DD_BASS_EN,            AQDATA_SIZE_DD_BASS_EN,               AQDATA_INDEX_DD_BASS_EN_MAX,          },
    { AQDATA_GROUP_DD_SURR,                 AQDATA_ADDRESS_DD_SURR,               AQDATA_SIZE_DD_SURR,                  AQDATA_INDEX_DD_SURR_MAX,             },
    { AQDATA_GROUP_DD_VB,                   AQDATA_ADDRESS_DD_VB,                 AQDATA_SIZE_DD_VB,                    AQDATA_INDEX_DD_VB_MAX,               },
    { AQDATA_GROUP_DD_VOL_LV,               AQDATA_ADDRESS_DD_VOL_LV,             AQDATA_SIZE_DD_VOL_LV,                AQDATA_INDEX_DD_VOL_LV_MAX,           },
    { AQDATA_GROUP_DD_DIALOG,               AQDATA_ADDRESS_DD_DIALOG,             AQDATA_SIZE_DD_DIALOG,                AQDATA_INDEX_DD_DIALOG_MAX,           },
    { AQDATA_GROUP_DA_GENERAL_CONFIG,       AQDATA_ADDRESS_DA_GENERAL_CONFIG,     AQDATA_SIZE_DA_GENERAL_CONFIG,        AQDATA_INDEX_DA_GENERAL_CONFIG_MAX,   },
    { AQDATA_GROUP_DA1_5782_VOL,            AQDATA_ADDRESS_DA1_5782_VOL,          AQDATA_SIZE_DA1_5782_VOL,             AQDATA_INDEX_DA1_5782_VOL_MAX,        },
    { AQDATA_GROUP_DA2_5782_VOL,            AQDATA_ADDRESS_DA2_5782_VOL,          AQDATA_SIZE_DA2_5782_VOL,             AQDATA_INDEX_DA2_5782_VOL_MAX,        },
    { AQDATA_GROUP_DA3_5782_VOL,            AQDATA_ADDRESS_DA3_5782_VOL,          AQDATA_SIZE_DA3_5782_VOL,             AQDATA_INDEX_DA3_5782_VOL_MAX,        },
    { AQDATA_GROUP_DA4_5782_VOL,            AQDATA_ADDRESS_DA4_5782_VOL,          AQDATA_SIZE_DA4_5782_VOL,             AQDATA_INDEX_DA4_5782_VOL_MAX,        },
    { AQDATA_GROUP_DA1_5782_BQ,             AQDATA_ADDRESS_DA1_5782_BQ,           AQDATA_SIZE_DA1_5782_BQ,              AQDATA_INDEX_DA1_5782_BQ_MAX,         },
    { AQDATA_GROUP_DA2_5782_BQ,             AQDATA_ADDRESS_DA2_5782_BQ,           AQDATA_SIZE_DA2_5782_BQ,              AQDATA_INDEX_DA2_5782_BQ_MAX,         },
    { AQDATA_GROUP_DA3_5782_BQ,             AQDATA_ADDRESS_DA3_5782_BQ,           AQDATA_SIZE_DA3_5782_BQ,              AQDATA_INDEX_DA3_5782_BQ_MAX,         },
    { AQDATA_GROUP_DA4_5782_BQ,             AQDATA_ADDRESS_DA4_5782_BQ,           AQDATA_SIZE_DA4_5782_BQ,              AQDATA_INDEX_DA4_5782_BQ_MAX,         },
    { AQDATA_GROUP_DA1_5782_DPEQ,           AQDATA_ADDRESS_DA1_5782_DPEQ,         AQDATA_SIZE_DA1_5782_DPEQ,            AQDATA_INDEX_DA1_5782_DPEQ_MAX,       },
    { AQDATA_GROUP_DA2_5782_DPEQ,           AQDATA_ADDRESS_DA2_5782_DPEQ,         AQDATA_SIZE_DA2_5782_DPEQ,            AQDATA_INDEX_DA2_5782_DPEQ_MAX,       },
    { AQDATA_GROUP_DA3_5782_DPEQ,           AQDATA_ADDRESS_DA3_5782_DPEQ,         AQDATA_SIZE_DA3_5782_DPEQ,            AQDATA_INDEX_DA3_5782_DPEQ_MAX,       },
    { AQDATA_GROUP_DA4_5782_DPEQ,           AQDATA_ADDRESS_DA4_5782_DPEQ,         AQDATA_SIZE_DA4_5782_DPEQ,            AQDATA_INDEX_DA4_5782_DPEQ_MAX,       },
    { AQDATA_GROUP_DA1_5782_DRC,            AQDATA_ADDRESS_DA1_5782_DRC,          AQDATA_SIZE_DA1_5782_DRC,             AQDATA_INDEX_DA1_5782_DRC_MAX,        },
    { AQDATA_GROUP_DA2_5782_DRC,            AQDATA_ADDRESS_DA2_5782_DRC,          AQDATA_SIZE_DA2_5782_DRC,             AQDATA_INDEX_DA2_5782_DRC_MAX,        },
    { AQDATA_GROUP_DA3_5782_DRC,            AQDATA_ADDRESS_DA3_5782_DRC,          AQDATA_SIZE_DA3_5782_DRC,             AQDATA_INDEX_DA3_5782_DRC_MAX,        },
    { AQDATA_GROUP_DA4_5782_DRC,            AQDATA_ADDRESS_DA4_5782_DRC,          AQDATA_SIZE_DA4_5782_DRC,             AQDATA_INDEX_DA4_5782_DRC_MAX,        },
    { AQDATA_GROUP_DA1_5782_GENERAL,        AQDATA_ADDRESS_DA1_5782_GENERAL,      AQDATA_SIZE_DA1_5782_GENERAL,         AQDATA_INDEX_DA1_5782_GENERAL_MAX,    },
    { AQDATA_GROUP_DA2_5782_GENERAL,        AQDATA_ADDRESS_DA2_5782_GENERAL,      AQDATA_SIZE_DA2_5782_GENERAL,         AQDATA_INDEX_DA2_5782_GENERAL_MAX,    },
    { AQDATA_GROUP_DA3_5782_GENERAL,        AQDATA_ADDRESS_DA3_5782_GENERAL,      AQDATA_SIZE_DA3_5782_GENERAL,         AQDATA_INDEX_DA3_5782_GENERAL_MAX,    },
    { AQDATA_GROUP_DA4_5782_GENERAL,        AQDATA_ADDRESS_DA4_5782_GENERAL,      AQDATA_SIZE_DA4_5782_GENERAL,         AQDATA_INDEX_DA4_5782_GENERAL_MAX,    },
    { AQDATA_GROUP_AC_GEN,                  AQDATA_ADDRESS_AC_GEN,                AQDATA_SIZE_AC_GEN,                   AQDATA_INDEX_AC_GEN_MAX,              },
    { AQDATA_GROUP_AC_MIC_SHAPE1,           AQDATA_ADDRESS_AC_MIC_SHAPE1,         AQDATA_SIZE_AC_MIC_SHAPE1,            AQDATA_INDEX_AC_MIC_SHAPE1_MAX,       },
    { AQDATA_GROUP_AC_MIC_SHAPE2,           AQDATA_ADDRESS_AC_MIC_SHAPE2,         AQDATA_SIZE_AC_MIC_SHAPE2,            AQDATA_INDEX_AC_MIC_SHAPE2_MAX,       },
    { AQDATA_GROUP_AC_MIC_SHAPE3,           AQDATA_ADDRESS_AC_MIC_SHAPE3,         AQDATA_SIZE_AC_MIC_SHAPE3,            AQDATA_INDEX_AC_MIC_SHAPE3_MAX,       },
    { AQDATA_GROUP_AC_TARGET_FNT,           AQDATA_ADDRESS_AC_TARGET_FNT,         AQDATA_SIZE_AC_TARGET_FNT,            AQDATA_INDEX_AC_TARGET_FNT_MAX,       },
    { AQDATA_GROUP_AC_TARGET_CNT,           AQDATA_ADDRESS_AC_TARGET_CNT,         AQDATA_SIZE_AC_TARGET_CNT,            AQDATA_INDEX_AC_TARGET_CNT_MAX,       },
    { AQDATA_GROUP_AC_TARGET_SUR,           AQDATA_ADDRESS_AC_TARGET_SUR,         AQDATA_SIZE_AC_TARGET_SUR,            AQDATA_INDEX_AC_TARGET_SUR_MAX,       },
    { AQDATA_GROUP_AC_TARGET_SBK,           AQDATA_ADDRESS_AC_TARGET_SBK,         AQDATA_SIZE_AC_TARGET_SBK,            AQDATA_INDEX_AC_TARGET_SBK_MAX,       },
    { AQDATA_GROUP_AC_TARGET_FH,            AQDATA_ADDRESS_AC_TARGET_FH,          AQDATA_SIZE_AC_TARGET_FH,             AQDATA_INDEX_AC_TARGET_FH_MAX,        },
    { AQDATA_GROUP_MM_SVT_AEC,              AQDATA_ADDRESS_MM_SVT_AEC,            AQDATA_SIZE_MM_SVT_AEC,               AQDATA_INDEX_MM_SVT_AEC_MAX,          },
    { AQDATA_GROUP_MM_AU_DLY2,              AQDATA_ADDRESS_MM_AU_DLY2,            AQDATA_SIZE_MM_AU_DLY2,               AQDATA_INDEX_MM_AU_DLY2_MAX,          },
    { AQDATA_GROUP_MM_CEC,                  AQDATA_ADDRESS_MM_CEC,                AQDATA_SIZE_MM_CEC,                   AQDATA_INDEX_MM_CEC_MAX,              },
    { AQDATA_GROUP_MS_RSV,                  AQDATA_ADDRESS_MS_RSV,                AQDATA_SIZE_MS_RSV,                   AQDATA_INDEX_MS_RSV_MAX,              },
    { AQDATA_GROUP_EXT,                     AQDATA_ADDRESS_EXT,                   AQDATA_SIZE_EXT,                      AQDATA_INDEX_EXT_MAX,                 },
    { AQDATA_GROUP_MODEL_INDEX,             AQDATA_ADDRESS_MODEL_INDEX,           AQDATA_SIZE_MODEL_INDEX,              AQDATA_INDEX_MODEL_INDEX_MAX,         },
};
#define AQDATA_ADDRESS_TABLE_NUM sizeof(gAQDataAddressTable) / sizeof(gAQDataAddressTable[0])
#define AQDATA_ERROR_ADDRESS 0xFFFFFFFF
#endif //CC_AUD_SAKURA_RENDER

//---------------------------------------------------------------------------
// Static functions
//---------------------------------------------------------------------------
INT32 DrvCust_AQ_Init(void);
#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_SetVal(UINT32 u4Offset, UINT8 u1Value);
INT32 DrvCust_AQ_List(UINT32 u4Offset, UINT32 Length);
UINT32 DrvCust_AQ_GenKey(AUD_DrvCust_AQ_Key_T rAqKey);

static UINT32 DrvCust_AQ_GetAqAddress(UINT32 u4Group, UINT32 u4Index, UINT32 u4Offset);
static UINT32 DrvCust_AQ_GetAqGroupSize(UINT32 u4Group);
#endif //CC_AUD_SAKURA_RENDER

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_Get_SVT_SP(AQDataMmSvtSp* pGetSvtSpData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_SPW(AQDataMmSvtSpw* pGetSvtSpwData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_HP(AQDataMmSvtHp* pGetSvtHpData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_SPDIF(AQDataMmSvtSpdif* pGetSvtSpdifData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_BT(AQDataMmSvtBt* pGetSvtBtData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_EC(AQDataMmSvtEc* pGetSvtEcData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_FIR(AQDataMmFir* pGetFirData, UINT32* pGetFirIdx, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SMT(AQDataMmSmt* pGetSmtData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_LOUDT(AQDataMmLoudt* pGetLoudtData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DRCT(AQDataMmDrct* pGetDrctData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SLT(AQDataMmSlt* pGetSltData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_LIMT(AQDataMmLimt* pGetLimtData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DLY(AQDataMmAuDly* pDlyData, UINT32* pGetDlyIdx, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_ACT(AQDataMmAct* pGetActData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_ADCT(AQDataMmAdct* pGetAdctData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_RSV(AQDataMmRsv* pGetRsvData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_OPTIMIZER(AQDataDdOptimizer* pGetDdOptimizerData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_REGU(AQDataDdRegu* pGetDeReguData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_GENERAL(AQDataDdGeneral* pGetDdGeneralData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_GENERAL2(AQDataDdGeneral2* pGetDdGeneral2Data, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_IEQ(AQDataDdIeq* pGetDdIeqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_GEQ(AQDataDdGeq* pGetDdGeqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_BASS_EN(AQDataDdBassEn* pGetDdBassEnData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_SURR(AQDataDdSurr* pGetDdSurrData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_VB(AQDataDdVb* pGetDdVbData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_VOL_LV(AQDataDdVolLv* pGetDdVolLvData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DD_DIALOG(AQDataDdDialog* pGetDdDialogData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_GEN_CFG(UINT32 u4InputKey);
INT32 DrvCust_AQ_Get_DA1_5782_VOL(AQDataDa15782Vol* pGetDa15782VolData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA2_5782_VOL(AQDataDa25782Vol* pGetDa25782VolData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA3_5782_VOL(AQDataDa35782Vol* pGetDa35782VolData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA4_5782_VOL(AQDataDa45782Vol* pGetDa45782VolData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA1_5782_BQ(AQDataDa15782Bq* pGetDa15782BqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA2_5782_BQ(AQDataDa25782Bq* pGetDa25782BqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA3_5782_BQ(AQDataDa35782Bq* pGetDa35782BqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA4_5782_BQ(AQDataDa45782Bq* pGetDa45782BqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA1_5782_DPEQ(AQDataDa15782Dpeq* pGetDa15782DpeqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA2_5782_DPEQ(AQDataDa25782Dpeq* pGetDa25782DpeqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA3_5782_DPEQ(AQDataDa35782Dpeq* pGetDa35782DpeqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA4_5782_DPEQ(AQDataDa45782Dpeq* pGetDa45782DpeqData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA1_5782_DRC(AQDataDa15782Drc* pGetDa15782DrcData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA2_5782_DRC(AQDataDa25782Drc* pGetDa25782DrcData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA3_5782_DRC(AQDataDa35782Drc* pGetDa35782DrcData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA4_5782_DRC(AQDataDa45782Drc* pGetDa45782DrcData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA1_5782_GENERAL(AQDataDa15782General* pGetDa15782GeneralData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA2_5782_GENERAL(AQDataDa25782General* pGetDa25782GeneralData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA3_5782_GENERAL(AQDataDa35782General* pGetDa35782GeneralData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA4_5782_GENERAL(AQDataDa45782General* pGetDa45782GeneralData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DLY2(AQDataMmAuDly2* pDly2Data, UINT32* pGetDly2Idx, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_MS_RSV(AQDataMsRsv* pGetRsvData, UINT32 u4InputKey, UINT32 u4Type);

INT32 DrvCust_AQ_Get_DA_GEN_CFG_INIT(UINT32 u4InputKey);
BOOL  DrvCust_AQ_IsSurround(AUD_DrvCust_AQ_Key_T rAqKey);
#else
INT32 DrvCust_AQ_Get_SVTSP(AQDataMmSvtSp* pGetSvtSpData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVTSPW(AQDataMmSvtSpw* pGetSvtSpwData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_HP(AQDataMmSvtHp* pGetSvtHpData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_LO(AQDataMmSvtLo* pGetSvtLoData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_LOH(AQDataMmSvtLoh* pGetSvtLohData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_ASW(AQDataMmSvtAsw* pGetSvtAswData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_DSW(AQDataMmSvtDsw* pGetSvtDswData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SVT_BT(AQDataMmSvtBt* pGetSvtBtData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_SLT(AQDataMmSlt* pGetSltData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_FIR(AQDataMmFir* pGetFirData, UINT32* pGetFirIdx, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DLY(AQDataMmAuDly* pDlyData, UINT32* pGetDlyIdx, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_LIMT(AQDataMmLimt* pGetLimtData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_RSV(AQDataMmRsv* pGetRsvData, UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_5760_CONFIG1(UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_5760_CONFIG2(UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_5538_CONFIG(UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_5538_BQ(UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_5538_BT(UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_5538_LOUD(UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_5538_DRC(UINT32 u4InputKey, UINT32 u4Type);
INT32 DrvCust_AQ_Get_DA_GEN_CFG_INIT(UINT32 u4InputKey);
BOOL  DrvCust_AQ_IsSurround(AUD_DrvCust_AQ_Key_T rAqKey);
#endif //CC_AUD_SAKURA_RENDER

#ifdef CC_AUD_SAKURA_RENDER
// =================================================
// [!!!!**CAUTION**!!!!]
// 1. Use printf, not LOG
// 2. You can only call public functions in xxx_if.c
//==================================================
INT32 DrvCust_AQ_InitKeys(void)
{
    // KeyTable
    //_ar_VersionTbl_KeyVERSION
    _ar_VersionTbl_Key[AQDATA_INDEX_VERSION_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtSpTbl_KeyMM_SVT_SP
    _ar_MmSvtSpTbl_Key[AQDATA_INDEX_MM_SVT_SP_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtSpwTbl_KeyMM_SVT_SPW
    _ar_MmSvtSpwTbl_Key[AQDATA_INDEX_MM_SVT_SPW_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtHpTbl_KeyMM_SVT_HP
    _ar_MmSvtHpTbl_Key[AQDATA_INDEX_MM_SVT_HP_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtSpdifTbl_KeyMM_SVT_SPDIF
    _ar_MmSvtSpdifTbl_Key[AQDATA_INDEX_MM_SVT_SPDIF_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtBtTbl_KeyMM_SVT_BT
    _ar_MmSvtBtTbl_Key[AQDATA_INDEX_MM_SVT_BT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtEcTbl_KeyMM_SVT_EC
    _ar_MmSvtEcTbl_Key[AQDATA_INDEX_MM_SVT_EC_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmFirTbl_KeyMM_FIR
    _ar_MmFirTbl_Key[AQDATA_INDEX_MM_FIR_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmFirTbl_Key[AQDATA_INDEX_MM_FIR_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSmtTbl_KeyMM_SMT
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmLoudtTbl_KeyMM_LOUDT
    _ar_MmLoudtTbl_Key[AQDATA_INDEX_MM_LOUDT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmLoudtTbl_Key[AQDATA_INDEX_MM_LOUDT_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmDrctTbl_KeyMM_DRCT
    _ar_MmDrctTbl_Key[AQDATA_INDEX_MM_DRCT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmDrctTbl_Key[AQDATA_INDEX_MM_DRCT_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSltTbl_KeyMM_SLT
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_ANALOG_RF, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_ANALOG_RF, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_4].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_5].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmLimtTbl_KeyMM_LIMT
    _ar_MmLimtTbl_Key[AQDATA_INDEX_MM_LIMT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmLimtTbl_Key[AQDATA_INDEX_MM_LIMT_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmAuDlyTbl_KeyMM_AU_DLY
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_NOT_CONNECTED, AQ_PICTURE_MODE_OTHER);
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_NOT_CONNECTED, AQ_PICTURE_MODE_GAME_GRAPHICS);
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_CONNECTED, AQ_PICTURE_MODE_OTHER);
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_CONNECTED, AQ_PICTURE_MODE_GAME_GRAPHICS);

    //_ar_MmActTbl_KeyMM_ACT
    _ar_MmActTbl_Key[AQDATA_INDEX_MM_ACT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmAdctTbl_KeyMM_ADCT
    _ar_MmAdctTbl_Key[AQDATA_INDEX_MM_ADCT_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmRsvTbl_KeyMM_RSV
    _ar_MmRsvTbl_Key[AQDATA_INDEX_MM_RSV_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdOptimizerTbl_KeyDD_OPTIMIZER
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdReguTbl_KeyDD_REGU
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdGeneralTbl_KeyDD_GENERAL
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdGeneral2Tbl_KeyDD_GENERAL2
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdIeqTbl_KeyDD_IEQ
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdGeqTbl_KeyDD_GEQ
    _ar_DdGeqTbl_Key[AQDATA_INDEX_DD_GEQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdBassEnTbl_KeyDD_BASS_EN
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdSurrTbl_KeyDD_SURR
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdVbTbl_KeyDD_VB
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdVolLvTbl_KeyDD_VOL_LV
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdDialogTbl_KeyDD_DIALOG
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_TABLE_STAND, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_OFF, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_WALL_MOUNT, AQ_INPUT_DONT, AQ_SOUND_MODE_DOLBY_SUR_ON, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DaGeneralConfigTbl_KeyDA_GENERAL_CONFIG
    _ar_DaGeneralConfigTbl_Key[AQDATA_INDEX_DA_GENERAL_CONFIG_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782VolTbl_KeyDA1_5782_VOL
    _ar_Da15782VolTbl_Key[AQDATA_INDEX_DA1_5782_VOL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782VolTbl_KeyDA2_5782_VOL
    _ar_Da25782VolTbl_Key[AQDATA_INDEX_DA2_5782_VOL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782VolTbl_KeyDA3_5782_VOL
    _ar_Da35782VolTbl_Key[AQDATA_INDEX_DA3_5782_VOL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782VolTbl_KeyDA4_5782_VOL
    _ar_Da45782VolTbl_Key[AQDATA_INDEX_DA4_5782_VOL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782BqTbl_KeyDA1_5782_BQ
    _ar_Da15782BqTbl_Key[AQDATA_INDEX_DA1_5782_BQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782BqTbl_KeyDA2_5782_BQ
    _ar_Da25782BqTbl_Key[AQDATA_INDEX_DA2_5782_BQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782BqTbl_KeyDA3_5782_BQ
    _ar_Da35782BqTbl_Key[AQDATA_INDEX_DA3_5782_BQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782BqTbl_KeyDA4_5782_BQ
    _ar_Da45782BqTbl_Key[AQDATA_INDEX_DA4_5782_BQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782DpeqTbl_KeyDA1_5782_DPEQ
    _ar_Da15782DpeqTbl_Key[AQDATA_INDEX_DA1_5782_DPEQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782DpeqTbl_KeyDA2_5782_DPEQ
    _ar_Da25782DpeqTbl_Key[AQDATA_INDEX_DA2_5782_DPEQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782DpeqTbl_KeyDA3_5782_DPEQ
    _ar_Da35782DpeqTbl_Key[AQDATA_INDEX_DA3_5782_DPEQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782DpeqTbl_KeyDA4_5782_DPEQ
    _ar_Da45782DpeqTbl_Key[AQDATA_INDEX_DA4_5782_DPEQ_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782DrcTbl_KeyDA1_5782_DRC
    _ar_Da15782DrcTbl_Key[AQDATA_INDEX_DA1_5782_DRC_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782DrcTbl_KeyDA2_5782_DRC
    _ar_Da25782DrcTbl_Key[AQDATA_INDEX_DA2_5782_DRC_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782DrcTbl_KeyDA3_5782_DRC
    _ar_Da35782DrcTbl_Key[AQDATA_INDEX_DA3_5782_DRC_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782DrcTbl_KeyDA4_5782_DRC
    _ar_Da45782DrcTbl_Key[AQDATA_INDEX_DA4_5782_DRC_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782GeneralTbl_KeyDA1_5782_GENERAL
    _ar_Da15782GeneralTbl_Key[AQDATA_INDEX_DA1_5782_GENERAL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782GeneralTbl_KeyDA2_5782_GENERAL
    _ar_Da25782GeneralTbl_Key[AQDATA_INDEX_DA2_5782_GENERAL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782GeneralTbl_KeyDA3_5782_GENERAL
    _ar_Da35782GeneralTbl_Key[AQDATA_INDEX_DA3_5782_GENERAL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782GeneralTbl_KeyDA4_5782_GENERAL
    _ar_Da45782GeneralTbl_Key[AQDATA_INDEX_DA4_5782_GENERAL_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmAuDly2Tbl_KeyMM_AU_DLY2
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_NOT_CONNECTED, AQ_PICTURE_MODE_OTHER);
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_1].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_NOT_CONNECTED, AQ_PICTURE_MODE_GAME_GRAPHICS);
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_2].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_CONNECTED, AQ_PICTURE_MODE_OTHER);
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_3].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_CONNECTED, AQ_PICTURE_MODE_GAME_GRAPHICS);

    //_ar_MsRsvTbl_KeyMS_RSV
    _ar_MsRsvTbl_Key[AQDATA_INDEX_MS_RSV_0].u4Key = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_VersionTbl_KeyVERSION
    _ar_VersionTbl_Key[AQDATA_INDEX_VERSION_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtSpTbl_KeyMM_SVT_SP
    _ar_MmSvtSpTbl_Key[AQDATA_INDEX_MM_SVT_SP_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtSpwTbl_KeyMM_SVT_SPW
    _ar_MmSvtSpwTbl_Key[AQDATA_INDEX_MM_SVT_SPW_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtHpTbl_KeyMM_SVT_HP
    _ar_MmSvtHpTbl_Key[AQDATA_INDEX_MM_SVT_HP_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtSpdifTbl_KeyMM_SVT_SPDIF
    _ar_MmSvtSpdifTbl_Key[AQDATA_INDEX_MM_SVT_SPDIF_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtBtTbl_KeyMM_SVT_BT
    _ar_MmSvtBtTbl_Key[AQDATA_INDEX_MM_SVT_BT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSvtEcTbl_KeyMM_SVT_EC
    _ar_MmSvtEcTbl_Key[AQDATA_INDEX_MM_SVT_EC_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmFirTbl_KeyMM_FIR
    _ar_MmFirTbl_Key[AQDATA_INDEX_MM_FIR_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmFirTbl_Key[AQDATA_INDEX_MM_FIR_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSmtTbl_KeyMM_SMT
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSmtTbl_Key[AQDATA_INDEX_MM_SMT_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmLoudtTbl_KeyMM_LOUDT
    _ar_MmLoudtTbl_Key[AQDATA_INDEX_MM_LOUDT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmLoudtTbl_Key[AQDATA_INDEX_MM_LOUDT_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmDrctTbl_KeyMM_DRCT
    _ar_MmDrctTbl_Key[AQDATA_INDEX_MM_DRCT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmDrctTbl_Key[AQDATA_INDEX_MM_DRCT_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmSltTbl_KeyMM_SLT
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_4].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_5].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmLimtTbl_KeyMM_LIMT
    _ar_MmLimtTbl_Key[AQDATA_INDEX_MM_LIMT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmLimtTbl_Key[AQDATA_INDEX_MM_LIMT_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmAuDlyTbl_KeyMM_AU_DLY
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmAuDlyTbl_Key[AQDATA_INDEX_MM_AU_DLY_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmActTbl_KeyMM_ACT
    _ar_MmActTbl_Key[AQDATA_INDEX_MM_ACT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmAdctTbl_KeyMM_ADCT
    _ar_MmAdctTbl_Key[AQDATA_INDEX_MM_ADCT_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmRsvTbl_KeyMM_RSV
    _ar_MmRsvTbl_Key[AQDATA_INDEX_MM_RSV_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdOptimizerTbl_KeyDD_OPTIMIZER
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdOptimizerTbl_Key[AQDATA_INDEX_DD_OPTIMIZER_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdReguTbl_KeyDD_REGU
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdReguTbl_Key[AQDATA_INDEX_DD_REGU_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdGeneralTbl_KeyDD_GENERAL
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneralTbl_Key[AQDATA_INDEX_DD_GENERAL_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdGeneral2Tbl_KeyDD_GENERAL2
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdGeneral2Tbl_Key[AQDATA_INDEX_DD_GENERAL2_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdIeqTbl_KeyDD_IEQ
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdIeqTbl_Key[AQDATA_INDEX_DD_IEQ_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdGeqTbl_KeyDD_GEQ
    _ar_DdGeqTbl_Key[AQDATA_INDEX_DD_GEQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdBassEnTbl_KeyDD_BASS_EN
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdBassEnTbl_Key[AQDATA_INDEX_DD_BASS_EN_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdSurrTbl_KeyDD_SURR
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdSurrTbl_Key[AQDATA_INDEX_DD_SURR_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdVbTbl_KeyDD_VB
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVbTbl_Key[AQDATA_INDEX_DD_VB_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdVolLvTbl_KeyDD_VOL_LV
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdVolLvTbl_Key[AQDATA_INDEX_DD_VOL_LV_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DdDialogTbl_KeyDD_DIALOG
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_DdDialogTbl_Key[AQDATA_INDEX_DD_DIALOG_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_DaGeneralConfigTbl_KeyDA_GENERAL_CONFIG
    _ar_DaGeneralConfigTbl_Key[AQDATA_INDEX_DA_GENERAL_CONFIG_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782VolTbl_KeyDA1_5782_VOL
    _ar_Da15782VolTbl_Key[AQDATA_INDEX_DA1_5782_VOL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782VolTbl_KeyDA2_5782_VOL
    _ar_Da25782VolTbl_Key[AQDATA_INDEX_DA2_5782_VOL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782VolTbl_KeyDA3_5782_VOL
    _ar_Da35782VolTbl_Key[AQDATA_INDEX_DA3_5782_VOL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782VolTbl_KeyDA4_5782_VOL
    _ar_Da45782VolTbl_Key[AQDATA_INDEX_DA4_5782_VOL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782BqTbl_KeyDA1_5782_BQ
    _ar_Da15782BqTbl_Key[AQDATA_INDEX_DA1_5782_BQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782BqTbl_KeyDA2_5782_BQ
    _ar_Da25782BqTbl_Key[AQDATA_INDEX_DA2_5782_BQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782BqTbl_KeyDA3_5782_BQ
    _ar_Da35782BqTbl_Key[AQDATA_INDEX_DA3_5782_BQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782BqTbl_KeyDA4_5782_BQ
    _ar_Da45782BqTbl_Key[AQDATA_INDEX_DA4_5782_BQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782DpeqTbl_KeyDA1_5782_DPEQ
    _ar_Da15782DpeqTbl_Key[AQDATA_INDEX_DA1_5782_DPEQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782DpeqTbl_KeyDA2_5782_DPEQ
    _ar_Da25782DpeqTbl_Key[AQDATA_INDEX_DA2_5782_DPEQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782DpeqTbl_KeyDA3_5782_DPEQ
    _ar_Da35782DpeqTbl_Key[AQDATA_INDEX_DA3_5782_DPEQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782DpeqTbl_KeyDA4_5782_DPEQ
    _ar_Da45782DpeqTbl_Key[AQDATA_INDEX_DA4_5782_DPEQ_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782DrcTbl_KeyDA1_5782_DRC
    _ar_Da15782DrcTbl_Key[AQDATA_INDEX_DA1_5782_DRC_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782DrcTbl_KeyDA2_5782_DRC
    _ar_Da25782DrcTbl_Key[AQDATA_INDEX_DA2_5782_DRC_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782DrcTbl_KeyDA3_5782_DRC
    _ar_Da35782DrcTbl_Key[AQDATA_INDEX_DA3_5782_DRC_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782DrcTbl_KeyDA4_5782_DRC
    _ar_Da45782DrcTbl_Key[AQDATA_INDEX_DA4_5782_DRC_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da15782GeneralTbl_KeyDA1_5782_GENERAL
    _ar_Da15782GeneralTbl_Key[AQDATA_INDEX_DA1_5782_GENERAL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da25782GeneralTbl_KeyDA2_5782_GENERAL
    _ar_Da25782GeneralTbl_Key[AQDATA_INDEX_DA2_5782_GENERAL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da35782GeneralTbl_KeyDA3_5782_GENERAL
    _ar_Da35782GeneralTbl_Key[AQDATA_INDEX_DA3_5782_GENERAL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_Da45782GeneralTbl_KeyDA4_5782_GENERAL
    _ar_Da45782GeneralTbl_Key[AQDATA_INDEX_DA4_5782_GENERAL_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MmAuDly2Tbl_KeyMM_AU_DLY2
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_1].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_2].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);
    _ar_MmAuDly2Tbl_Key[AQDATA_INDEX_MM_AU_DLY2_3].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    //_ar_MsRsvTbl_KeyMS_RSV
    _ar_MsRsvTbl_Key[AQDATA_INDEX_MS_RSV_0].u4ExceptKey = AQ_MAKE_KEY(AQ_FS_DONT, AQ_MM_MEASURE_MODE_DONT, AQ_WIRELESS_SUBWOOFER_MODE_DONT, AQ_TV_POSITION_DONT, AQ_INPUT_DONT, AQ_SOUND_MODE_DONT, AQ_BT_AUDIO_DONT, AQ_PICTURE_MODE_DONT);

    // KeyTable

    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_1].u4Inputs = (1<<AQ_INPUT_DIGITAL_RF)|(1<<AQ_INPUT_HDMI)|(1<<AQ_INPUT_VIDEO_APP)|(1<<AQ_INPUT_PHOTO)|(1<<AQ_INPUT_JELLYFISH)|(1<<AQ_INPUT_MIRACAST)|(1<<AQ_INPUT_GENERAL_APP)|(1<<AQ_INPUT_RESERVED1)|(1<<AQ_INPUT_RESERVED2)|(1<<AQ_INPUT_RESERVED3);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_2].u4Inputs = (1<<AQ_INPUT_COMPOSITE)|(1<<AQ_INPUT_COMPONENT)|(1<<AQ_INPUT_PC);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_4].u4Inputs = (1<<AQ_INPUT_DIGITAL_RF)|(1<<AQ_INPUT_HDMI)|(1<<AQ_INPUT_VIDEO_APP)|(1<<AQ_INPUT_PHOTO)|(1<<AQ_INPUT_JELLYFISH)|(1<<AQ_INPUT_MIRACAST)|(1<<AQ_INPUT_GENERAL_APP)|(1<<AQ_INPUT_RESERVED1)|(1<<AQ_INPUT_RESERVED2)|(1<<AQ_INPUT_RESERVED3);
    _ar_MmSltTbl_Key[AQDATA_INDEX_MM_SLT_5].u4Inputs = (1<<AQ_INPUT_COMPOSITE)|(1<<AQ_INPUT_COMPONENT)|(1<<AQ_INPUT_PC);

    return 0;
}
#endif //CC_AUD_SAKURA_RENDER

#if defined(__KERNEL__)&&!defined(CC_UBOOT)
struct device* pApiFlashAqGetDevice(void)
{
    struct device *dev = &request_flashaq_device.dev;
	if (!dev)
    {
       LOG(0,"FlashAQ request device fail\n");
       return NULL;
    }
	LOG(1,"FlashAQ dev =%p.\n",dev);
    return dev;
}
#endif

INT32 DrvCust_AQ_SetGet(AUD_DrvCust_AQ_OP_T eType, void* arg1, void* arg2, UINT32 arg3, UINT32 arg4)
{

    UNUSED(DrvCust_AQ_SetGet);
    UNUSED(eType);
    UNUSED(arg1);
    UNUSED(arg3);
    UNUSED(arg4);    

    switch (eType)
    {
    case AUD_DrvCust_AQ_Set_Init:
        DrvCust_AQ_Init();
        break;
#ifdef CC_AUD_SAKURA_RENDER
    case AUD_DrvCust_AQ_Set_Val:
        DrvCust_AQ_SetVal(arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_List:
        DrvCust_AQ_List(arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Gen_Key:
        *(UINT32*)arg2 = DrvCust_AQ_GenKey(*(AUD_DrvCust_AQ_Key_T*)arg1);
        break;
    case AUD_DrvCust_AQ_Get_SVT_SP:
        DrvCust_AQ_Get_SVT_SP(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_SVT_SPW:
        DrvCust_AQ_Get_SVT_SPW(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_SVT_HP:
        DrvCust_AQ_Get_SVT_HP(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_SVT_SPDIF:
        DrvCust_AQ_Get_SVT_SPDIF(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_SVT_BT:
        DrvCust_AQ_Get_SVT_BT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_SVT_EC:
        DrvCust_AQ_Get_SVT_EC(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_FIR:
        DrvCust_AQ_Get_FIR(arg1, arg2, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_SMT:
        DrvCust_AQ_Get_SMT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_LOUDT:
        DrvCust_AQ_Get_LOUDT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DRCT:
        DrvCust_AQ_Get_DRCT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_SLT:
        DrvCust_AQ_Get_SLT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_LIMT:
        DrvCust_AQ_Get_LIMT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DLY:
        DrvCust_AQ_Get_DLY(arg1, arg2, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_ACT:
        DrvCust_AQ_Get_ACT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_ADCT:
        DrvCust_AQ_Get_ADCT(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_RSV:
        DrvCust_AQ_Get_RSV(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_OPTIMIZER:
        DrvCust_AQ_Get_DD_OPTIMIZER(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_REGU:
        DrvCust_AQ_Get_DD_REGU(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_GENERAL:
        DrvCust_AQ_Get_DD_GENERAL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_GENERAL2:
        DrvCust_AQ_Get_DD_GENERAL2(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_IEQ:
        DrvCust_AQ_Get_DD_IEQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_GEQ:
        DrvCust_AQ_Get_DD_GEQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_BASS_EN:
        DrvCust_AQ_Get_DD_BASS_EN(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_SURR:
        DrvCust_AQ_Get_DD_SURR(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_VB:
        DrvCust_AQ_Get_DD_VB(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_VOL_LV:
        DrvCust_AQ_Get_DD_VOL_LV(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DD_DIALOG:
        DrvCust_AQ_Get_DD_DIALOG(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA_GEN_CFG:
        DrvCust_AQ_Get_DA_GEN_CFG(arg3);
        break;
    case AUD_DrvCust_AQ_Get_DA1_5782_VOL:
        DrvCust_AQ_Get_DA1_5782_VOL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA2_5782_VOL:
        DrvCust_AQ_Get_DA2_5782_VOL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA3_5782_VOL:
        DrvCust_AQ_Get_DA3_5782_VOL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA4_5782_VOL:
        DrvCust_AQ_Get_DA4_5782_VOL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA1_5782_BQ:
        DrvCust_AQ_Get_DA1_5782_BQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA2_5782_BQ:
        DrvCust_AQ_Get_DA2_5782_BQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA3_5782_BQ:
        DrvCust_AQ_Get_DA3_5782_BQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA4_5782_BQ:
        DrvCust_AQ_Get_DA4_5782_BQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA1_5782_DPEQ:
        DrvCust_AQ_Get_DA1_5782_DPEQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA2_5782_DPEQ:
        DrvCust_AQ_Get_DA2_5782_DPEQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA3_5782_DPEQ:
        DrvCust_AQ_Get_DA3_5782_DPEQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA4_5782_DPEQ:
        DrvCust_AQ_Get_DA4_5782_DPEQ(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA1_5782_DRC:
        DrvCust_AQ_Get_DA1_5782_DRC(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA2_5782_DRC:
        DrvCust_AQ_Get_DA2_5782_DRC(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA3_5782_DRC:
        DrvCust_AQ_Get_DA3_5782_DRC(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA4_5782_DRC:
        DrvCust_AQ_Get_DA4_5782_DRC(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA1_5782_GENERAL:
        DrvCust_AQ_Get_DA1_5782_GENERAL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA2_5782_GENERAL:
        DrvCust_AQ_Get_DA2_5782_GENERAL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA3_5782_GENERAL:
        DrvCust_AQ_Get_DA3_5782_GENERAL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA4_5782_GENERAL:
        DrvCust_AQ_Get_DA4_5782_GENERAL(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_MS_RSV:
        DrvCust_AQ_Get_MS_RSV(arg1, arg3, arg4);
        break;
    case AUD_DrvCust_AQ_Get_DA_5760_SET:
        DrvCust_AQ_Get_DA_GEN_CFG_INIT(arg3);
        break;
    case AUD_DrvCust_AQ_Get_DLY2:
        DrvCust_AQ_Get_DLY2(arg1, arg2, arg3, arg4);
        break;
#endif //CC_AUD_SAKURA_RENDER
default:
        return -1;
    }
return 0;
}

//-----------------------------------------------------------------------------
// [Example 1] DrvCust_AQ_Init
//
//    Get AQ data from flash, and put data to DRAM.
//
//  Return 0  : OK
//         -1 : NG
//-----------------------------------------------------------------------------
#ifdef CC_SONY_FILE_BASED_RECIPE_SUPPORT
extern INT32 BEBoot_CheckFile(char *filename, UINT32 u4BufSize);
#endif
INT32 DrvCust_AQ_Init(void)
{

	UINT32 i;
	static UINT8* pu1DataAddr = NULL;
	UINT8 u1AQPartition;
	static BOOL _bAqTmpBufAllocated = FALSE;
#ifdef CC_SONY_FILE_BASED_RECIPE_SUPPORT
#if defined(__KERNEL__)&&!defined(CC_UBOOT) 
	const struct firmware *fw;
	struct device *dev;
	//UINT32 u2Idx;
#endif
#endif
	UNUSED(DrvCust_AQ_Init);
	UNUSED(i);

	// Load AQ table from Flash to Dram
	u1AQPartition = AQ_PARTITION;
	LOG(0, "LOG AQ! - u1AQPartition = %d, %d\n", u1AQPartition, _bAqTmpBufAllocated);

	if (_bAqTmpBufAllocated == FALSE)
	{
		pu1DataAddr = (UINT8*)x_mem_alloc(AQ_LEN);
		_bAqTmpBufAllocated = TRUE;
	}
	LOG(0,"AQ! - pu1DataAddr = 0x%p, %d\n", pu1DataAddr, _bAqTmpBufAllocated);
	if (pu1DataAddr == NULL)
	{
		LOG(0,"AQ! - memory allocate failed!! (Size=%d Bytes)\n", AQ_LEN);
		_bAqTmpBufAllocated = FALSE;
		return -1;
	}
#ifdef CC_SONY_FILE_BASED_RECIPE_SUPPORT
#if defined(__KERNEL__)&&!defined(CC_UBOOT) 
	INT32 i4Ret;
	dev = pApiFlashAqGetDevice();
	if (BEBoot_CheckFile((char *)AQ_BIN_NAME, 0))
	{
		i4Ret = request_firmware(&fw, AQ_BIN_NAME, dev);
		if (i4Ret == 0)
		{
			x_memcpy((VOID*)pu1DataAddr, fw->data, fw->size);
			release_firmware(fw);
		}
	}
	else
	{
		LOG(0,"DrvCust_AQ_Init request FW fail.\n");
	}
#endif
#else
	 STORG_SyncRead(u1AQPartition, 0, (VOID*)pu1DataAddr, AQ_LEN);
#endif
	/*
	for(u2Idx = 0; u2Idx < AQ_LEN; u2Idx++)
	{
		if ((u2Idx % 16) == 0)
		{
			Printf("0x%02X: ", u2Idx);
		}
		Printf("0x%02X, ", *pu1DataAddr);

		if (((u2Idx + 1) % 16) == 0)
		{
			Printf("\n");
		}
		pu1DataAddr++;
	}
	*/
	vAprocAqData_Write(0, pu1DataAddr, AQ_LEN);
	//x_mem_free(pu1DataAddr); //Allocate once, and not release. (after long time pause/resume, may allocate fail!)

	//Initial Index
	//DrvCust_AQ_InitKeys();
#ifdef CC_AUD_SAKURA_RENDER
	DrvCust_AQ_InitKeys();
#endif //CC_AUD_SAKURA_RENDER

	return 0;
}

#ifdef CC_AUD_SAKURA_RENDER
static UINT32 DrvCust_AQ_GetAqAddress(UINT32 u4Group, UINT32 u4Index, UINT32 u4Offset)
{
    UINT32 u4Addr = AQDATA_ERROR_ADDRESS; /* 0xFFFFFFFF: error */
    UINT32 i;

    for (i = 0; i < AQDATA_ADDRESS_TABLE_NUM; i++) {
        if (u4Group == gAQDataAddressTable[i].m_id) {
            if (u4Index < gAQDataAddressTable[i].m_indexNum) {
                u4Addr = gAQDataAddressTable[i].m_address + gAQDataAddressTable[i].m_size * u4Index + u4Offset;
            }
            return u4Addr;
        }
    }
    return u4Addr;
}
#endif // CC_AUD_SAKURA_RENDER

#ifdef CC_AUD_SAKURA_RENDER
static UINT32 DrvCust_AQ_GetAqGroupSize(UINT32 u4Group)
{
    UINT32 i;

    for (i = 0; i < AQDATA_ADDRESS_TABLE_NUM; i++) {
        if (u4Group == gAQDataAddressTable[i].m_id) {
            return gAQDataAddressTable[i].m_size;
        }
    }
    return 0;
}
#endif // CC_AUD_SAKURA_RENDER

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_SetData(UINT32 u4Group, UINT32 u4Index, UINT32 u4Offset, UINT32 u4Length, UINT8 *p1Value)
{
    UINT32 u4Addr;
    UINT8 i;

    CHAR replyStr[ 2048 ] = { 0 };
    CHAR replyData[ 20 ] = { 0 };
    CHAR replySummary[ 256 ] = { 0 };
    CHAR replyFooter[] = "/saqr 0 012 saqr/\n";

    UNUSED(DrvCust_AQ_SetData);
    UNUSED(u4Group);
    UNUSED(u4Index);
    UNUSED(u4Offset);
    UNUSED(p1Value);

    u4Addr = DrvCust_AQ_GetAqAddress(u4Group, u4Index, u4Offset);
    if (u4Addr == AQDATA_ERROR_ADDRESS) {
        printf("AQ! - address error failed!! (u4Group=%d u4Index=%d, u4Offset=%d)\n", u4Group, u4Index, u4Offset);
        printf("/saqr 1 012 saqr/\n"); // error
        return -1; 
    } else {
        printf("AQ! - address=%d(0x%08x)\n", u4Addr, u4Addr);
    }

    if (u4Addr + u4Length <= 102416) {
        vAprocAqData_Write (u4Addr, p1Value, u4Length);
    } else {
        printf("AQ! - size is over(address=%d(0x%08x), size=%d)\n", u4Addr, u4Addr, u4Length);
        printf("/saqr 1 012 saqr/\n"); // error
        return -1;
    }

    for ( i = 0; i < u4Length; ++i ) {
        snprintf( replyData, sizeof( replyData ), "0x%02x ", p1Value[ i ] );
        strncat( replyStr, replyData, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    }
    strncat( replyStr, " ", sizeof( replyStr ) - strlen( replyStr ) - 1 );
    strncat( replyStr, replyFooter, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    printf ( "%s", replyStr );

    snprintf( replySummary, sizeof( replySummary ), "Write: group=%d index=%d offset=%d size=%d\n", u4Group, u4Index, u4Offset, u4Length );
    printf ( "%s", replySummary );

    return 0;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_GetData(UINT32 u4Group, UINT32 u4Index, UINT32 u4Offset, UINT32 u4Length)
{
    UINT32 i, max;
    UINT8* pu1DataAddr;
    UINT32 u4Addr;
    UINT32 u4ResultLen;
    UINT8 u1Size;

    CHAR replyStr[ 2048 ] = { 0 };
    CHAR replyData[ 20 ] = { 0 };
    CHAR replyHeader[ 20 ] = { 0 };
    CHAR replySummary[ 256 ] = { 0 };
    CHAR replyFooter[] = "saqr/\n";

    UNUSED(DrvCust_AQ_GetData);
    UNUSED(u4Group);
    UNUSED(u4Index);
    UNUSED(u4Offset);
    UNUSED(u4Length);

    pu1DataAddr = (UINT8*)x_mem_alloc(u4Length);
    if (pu1DataAddr == NULL)
    {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - memory allocate failed!! (Size=%d Bytes)\n", u4Length);
        return -1; 
    }
    u4Addr = DrvCust_AQ_GetAqAddress(u4Group, u4Index, u4Offset);
    if (u4Addr == AQDATA_ERROR_ADDRESS) {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - address error failed!! (u4Group=%d u4Index=%d, u4Offset=%d)\n", u4Group, u4Index, u4Offset);
        return -1; 
    }

    if (u4Addr + u4Length > 102416) {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - out of range(address=%d(0x%08x), size=%d)\n", u4Addr, u4Addr, u4Length);
        return -1;
    }

    vAprocAqData_Read(u4Addr, (UINT8*)pu1DataAddr, u4Length);

    u4ResultLen = 15 + u4Length*3;
    u1Size = 1;
    max = 0x10;
    while (max <= 0xFFFFFFFF) {
        if (u4ResultLen > max) {
            u1Size++;
            max <<= 4;
        } else {
            break;
        }
    }

    snprintf( replyHeader, sizeof( replyHeader ), "/saqr 0 %x ", u4ResultLen + u1Size );
    strncpy( replyStr, replyHeader, sizeof( replyStr ) - 1 );

    for ( i = 0; i < u4Length; ++i ) {
        snprintf( replyData, sizeof( replyData ), "%02x ", pu1DataAddr[ i ] );
        strncat( replyStr, replyData, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    }
    strncat( replyStr, replyFooter, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    printf( "%s", replyStr );

    snprintf( replySummary, sizeof( replySummary ), "AQ Data Read:  Group=%d(%02x)  Index=%d(%02x)  Addr=%d(%02x)  Length=%d(%02x)\n",
    u4Group, u4Group, u4Index, u4Index, u4Offset, u4Offset, u4Length, u4Length );
    printf( "%s", replySummary );

    x_mem_free(pu1DataAddr);


    return 0;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_SetDataWord(UINT32 u4Group, UINT32 u4Index, UINT32 u4Offset, UINT32 u4Length, UINT32 *p4Value)
{
    UINT32 u4Addr;
    UINT8 i;

    CHAR replyStr[ 2048 ] = { 0 };
    CHAR replyData[ 20 ] = { 0 };
    CHAR replySummary[ 256 ] = { 0 };
    CHAR replyFooter[] = "/saqr 0 012 saqr/\n";

    UNUSED(DrvCust_AQ_SetData);
    UNUSED(u4Group);
    UNUSED(u4Index);
    UNUSED(u4Offset);
    UNUSED(p4Value);

    u4Addr = DrvCust_AQ_GetAqAddress(u4Group, u4Index, u4Offset*4);
    if (u4Addr == AQDATA_ERROR_ADDRESS) {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - address error failed!! (u4Group=%d u4Index=%d, u4Offset=%d)\n", u4Group, u4Index, u4Offset);
        return -1; 
    }

    if (u4Addr + 4*u4Length <= 102416) {
        vAprocAqData_WriteWord (u4Addr, p4Value, u4Length);
    } else {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - size is over(address=%d(0x%08x), size=%d)\n", u4Addr, u4Addr, u4Length);
        return -1;
    }

    for ( i = 0; i < u4Length; ++i ) {
        snprintf( replyData, sizeof( replyData ), "0x%08x ", p4Value[ i ] );
        strncat( replyStr, replyData, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    }
    strncat( replyStr, " ", sizeof( replyStr ) - strlen( replyStr ) - 1 );
    strncat( replyStr, replyFooter, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    printf( "%s", replyStr );

    snprintf( replySummary, sizeof( replySummary ), "Write: group=%d index=%d offset=%d size=%d\n", u4Group, u4Index, u4Offset, u4Length );
    printf( "%s", replySummary );

    return 0;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_GetDataWord(UINT32 u4Group, UINT32 u4Index, UINT32 u4Offset, UINT32 u4Length)
{
    UINT32 i, max;
    UINT32* pu4DataAddr;
    UINT32 u4Addr;
    UINT32 u4ResultLen;
    UINT8 u1Size;

    CHAR replyStr[ 2048 ] = { 0 };
    CHAR replyData[ 20 ] = { 0 };
    CHAR replyHeader[ 20 ] = { 0 };
    CHAR replySummary[ 256 ] = { 0 };
    CHAR replyFooter[] = "saqr/\n";

    UNUSED(DrvCust_AQ_GetData);
    UNUSED(u4Group);
    UNUSED(u4Index);
    UNUSED(u4Offset);
    UNUSED(u4Length);

    pu4DataAddr = (UINT32*)x_mem_alloc(4*u4Length);
    if (pu4DataAddr == NULL)
    {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - memory allocate failed!! (Size=%d Bytes)\n", u4Length);
        return -1; 
    }
    u4Addr = DrvCust_AQ_GetAqAddress(u4Group, u4Index, u4Offset*4);
    if (u4Addr == AQDATA_ERROR_ADDRESS) {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - address error failed!! (u4Group=%d u4Index=%d, u4Offset=%d)\n", u4Group, u4Index, u4Offset);
        return -1; 
    }

    if (u4Addr + u4Length*4 > 102416) {
        printf("/saqr 1 012 saqr/\n"); // error
        printf("AQ! - out of range(address=%d(0x%08x), size=%d)\n", u4Addr, u4Addr, u4Length);
        return -1;
    }

    vAprocAqData_ReadWord(u4Addr, (UINT32*)pu4DataAddr, u4Length);

    u4ResultLen = 15 + u4Length*9;
    u1Size = 1;
    max = 0x10;
    while (max <= 0xFFFFFFFF) {
        if (u4ResultLen > max) {
            u1Size++;
            max <<= 4;
        } else {
            break;
        }
    }

    snprintf( replyHeader, sizeof( replyHeader ), "/saqr 0 %x ", u4ResultLen + u1Size );
    strncpy( replyStr, replyHeader, sizeof( replyStr ) - 1 );

    for ( i = 0; i < u4Length; ++i ) {
        snprintf( replyData, sizeof( replyData ), "%08x ", pu4DataAddr[ i ] );
        strncat( replyStr, replyData, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    }
    strncat( replyStr, replyFooter, sizeof( replyStr ) - strlen( replyStr ) - 1 );
    printf( "%s", replyStr );

    snprintf( replySummary, sizeof( replySummary ), "AQ Data Read:  Group=%d(%02x)  Index=%d(%02x)  Addr=[%d-%d(%02x)]  Length=%d(%02x)\n",
           u4Group, u4Group, u4Index, u4Index, u4Addr, u4Offset, u4Offset, u4Length, u4Length );
    printf( "%s", replySummary );

    x_mem_free(pu4DataAddr);

    return 0;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_Query(void)
{
    UINT32 i;
    UINT8* pu1DataAddr;
    UINT32 u4Addr;
    UINT32 u4Length;

    UNUSED(DrvCust_AQ_Query);

    pu1DataAddr = (UINT8*)x_mem_alloc(256);
    if (pu1DataAddr == NULL) {
        printf("AQ! - memory allocate failed!! (Size=%d Bytes)\n", 256);
        return -1; 
    }

    printf("AQ Query\n");
    printf("Version: \n");
    u4Length = (AQDATA_SIZE_VERSION < 256) ? AQDATA_SIZE_VERSION : 256;
    vAprocAqData_Read(0, (UINT8*)pu1DataAddr, u4Length);
    for (i = 0; i < u4Length; i++){
        printf("%02x", pu1DataAddr[i]);
    }        
    printf("\n");    

    printf("Footer: ");
    u4Length = (AQDATA_SIZE_MODEL_INDEX < 256) ? AQDATA_SIZE_MODEL_INDEX : 256;
    vAprocAqData_Read(AQDATA_ADDRESS_MODEL_INDEX, (UINT8*)pu1DataAddr, u4Length);
    for (i = 0; i < u4Length; i++){
        if ((i%16) == 0) {
            printf("\n");
        }
        printf("%02x ", pu1DataAddr[i]);
    }        
    printf("\n");    
    x_mem_free(pu1DataAddr);

    return 0;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_SetVal(UINT32 u4Offset, UINT8 u1Value)
{
    UINT8 u1Val; 

    u1Val = u1Value;
    vAprocAqData_Write (u4Offset, &u1Val, 1);

    aq_printf("Write u4Offset 0x%x data to 0x%x\n", u4Offset, u1Val);

    return 0;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_List(UINT32 u4Offset, UINT32 Length)
{
    UINT32 i;
    UINT8* pu1DataAddr; 

    pu1DataAddr = (UINT8*)x_mem_alloc(Length);
    if (pu1DataAddr == NULL)
    {
        aq_printf("AQ! - memory allocate failed!! (Size=%d Bytes)\n", Length);
        return -1; 
    }
    
    vAprocAqData_Read(u4Offset, (UINT8*)pu1DataAddr, Length);    
    for (i=0; i<Length; i++)
    {
        if ((i%16) ==0)
        {
            aq_printf("\n");
        }
        aq_printf("0x%02x ", pu1DataAddr[i]);
    }        
    aq_printf("\n");    
    x_mem_free(pu1DataAddr);

    return 0;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
UINT32 DrvCust_AQ_GenKey(AUD_DrvCust_AQ_Key_T rAqKey)
{
    UINT32 u4Key;

    if (rAqKey.u1SoundMode == AQ_SOUND_MODE_STANDARD)
    {
        if(DrvCust_AQ_IsSurround(rAqKey))
        {
            rAqKey.u1SoundMode = AQ_SOUND_MODE_DOLBY_SUR_ON;
        }
        else
        {
            rAqKey.u1SoundMode = AQ_SOUND_MODE_DOLBY_SUR_OFF;
        }
    }

    u4Key = AQ_MAKE_KEY(rAqKey.u1Fs, rAqKey.u1MmMode, rAqKey.u1WirelessWoofer, rAqKey.u1TvPos, rAqKey.u1Input, 
                  rAqKey.u1SoundMode, rAqKey.u1BtConnect, rAqKey.u1PictureMode);
    return u4Key;
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
UINT32 DrvCust_AQ_Get_SpecificTable(UINT32 u4TableNum, UINT32 u4InputKey, AQ_TBL_KEY_T* prAQTbl)
{
    UINT32 u4Idx;
    UINT32 j;
    BOOL fgFindKey = FALSE;
    UINT32 u4Size;
    UINT32 u4TmpKey, u4TmpInput, u4TmpExcept;
    UINT8 u1CurKeyByte, u1CurInByte, u1CurExceptByte;

    UNUSED(u4Size);

    for (u4Idx=0; u4Idx<u4TableNum; u4Idx++)
    {
        aqkey_printf("key   [%d]= 0x%08x\n", u4Idx,prAQTbl[u4Idx].u4Key);
        aqkey_printf("except[%d]= 0x%08x\n", u4Idx,prAQTbl[u4Idx].u4ExceptKey);

        u4TmpKey = prAQTbl[u4Idx].u4Key;     
        u4TmpExcept = prAQTbl[u4Idx].u4ExceptKey;
        u4TmpInput = u4InputKey;
        for (j=0; j<NUM_OF_KEY; j++)
        {
            u1CurKeyByte = (u4TmpKey & 0xF);
            u1CurInByte = (u4TmpInput & 0xF);
            u1CurExceptByte = (u4TmpExcept& 0xF);
            //aq_printf("(%d)In=0x%x, Key=0x%x, Ex=0x%x\n", j, u1CurInByte, u1CurKeyByte, u1CurExceptByte);
//#ifdef CC_AUD_SAKURA_RENDER
            if ((((u1CurKeyByte == TYPE_ANY) || (u1CurKeyByte == u1CurInByte)) && (u1CurInByte != u1CurExceptByte)) || (j == LOOP_OF_S_MODE_KEY))
            {
                // If target is Input key
                if (j == LOOP_OF_INTPUT_KEY)
                {
                    // Inputs may contain many items. (e.x. DTV|ATV|HDMI| .....)
                    // Need a special case for it.
                    if ( (prAQTbl[u4Idx].u4Inputs                     == AQ_INPUT_DONT ) ||
                        ((prAQTbl[u4Idx].u4Inputs & (1<<u1CurInByte)) == (1<<u1CurInByte)))
                    {
                        // Input source condtion is OK
                        u4TmpKey = u4TmpKey >> 4;
                        u4TmpExcept = u4TmpExcept >> 4;
                        u4TmpInput = u4TmpInput >> 4;
                        //aq_printf("input ok, go next char in this key\n");
                    }
                    else
                    {
                        // Input source condtion is NG
                        //aq_printf("input NG, jump to next key\n");
                        break;
                    }
                }
                // If target is sound mode key
                else if(j == LOOP_OF_S_MODE_KEY){
                    if(((u1CurKeyByte == TYPE_ANY) || (u1CurKeyByte == u1CurInByte)) && (u1CurInByte != u1CurExceptByte)){
                        if((u1CurExceptByte == AQ_SOUND_MODE_DEMO) &&
                           ((u1CurInByte == AQ_SOUND_MODE_DEMO_SUR_OFF) || (u1CurInByte == AQ_SOUND_MODE_DEMO_SUR_ON))){
                            //aq_printf("sound mode NG-chk1, jump to next key\n");
                            break;
                        }
                    }
                    else if (u1CurKeyByte == AQ_SOUND_MODE_DEMO){
                        if((u1CurInByte != AQ_SOUND_MODE_DEMO_SUR_OFF) && (u1CurInByte != AQ_SOUND_MODE_DEMO_SUR_ON)){
                            //aq_printf("sound mode NG-chk2, jump to next key\n");
                            break;
                        }
                    }
                    else {
                        //aq_printf("sound mode NG-chk2, jump to next key\n");
                        break;
                    }
                    // sound mode condtion is OK
                    u4TmpKey = u4TmpKey >> 4;
                    u4TmpExcept = u4TmpExcept >> 4;
                    u4TmpInput = u4TmpInput >> 4;
                    //aq_printf("sound mode ok, go next char in this key\n");
                }
                else{
                    // If current condition is ANY and is NOT except.
                    u4TmpKey = u4TmpKey >> 4;
                    u4TmpExcept = u4TmpExcept >> 4;
                    u4TmpInput = u4TmpInput >> 4;
                    //aq_printf("ok, go next char in this key\n");
                }
            }
            else
            {
                //aq_printf("NG, jump to next key\n");
                break;
                // One condition is not match, just go to next table.
            }
//#endif /* CC_AUD_SAKURA_RENDER */
        }
        if (j == NUM_OF_KEY)
        {
            aq_printf("Good!! find Table Idx = %d!!!\n", u4Idx);
            fgFindKey = TRUE;
            break;
        }
    }

    if (!fgFindKey)
    {
        u4Idx = 0; 
    }
    aqkey_printf("Input key is 0x%x\n", u4InputKey);
    aqkey_printf("Table index is %d, (Find=%d)\n", u4Idx, fgFindKey);

    return u4Idx;
}
#endif /* CC_AUD_SAKURA_RENDER */

#if defined(AQ_SELF_TEST) && !defined(CC_MAPLE_CUST_DRV)
CUST_AUD_SOUND_SETTING_T gSoundSetting;
#endif

void AQ_Dump_Table(INT32* pi4Table, UINT32 u4Size)
{
    UINT32 j;
       
    for (j=0; j<(u4Size/4); j++)
    {
        if (j%4 == 0)
        {
            aq_printf("\n");
        }
        aq_printf ("0x%08x ", pi4Table[j]);
    }   
}

#ifdef CC_AUD_SAKURA_RENDER
void AQ_Dump_Byte(UINT8* pu1Byte, UINT32 u4Size)
{
    UINT32 j;
    
    for (j=0; j<u4Size; j++)
    {
        if (j%16 == 0)
        {
            aq_printf("\n");
        }
        aq_printf ("0x%02x ", pu1Byte[j]);
    }
}
#endif /* CC_AUD_SAKURA_RENDER */

#ifdef CC_AUD_SAKURA_RENDER
INT32 DrvCust_AQ_Get_SVT_SP(AQDataMmSvtSp* pGetSvtSpData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSvtSp rSvtSpData;
    INT32* pi1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SVT_SP_MAX, u4InputKey, _ar_MmSvtSpTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SVT_SP);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SVT_SP, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSvtSpData, u4Size);
    pi1Tmp = (INT32*)&rSvtSpData;

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SVT_SP - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        AQ_Dump_Table(pi1Tmp, u4Size);
    }
    else
    {
        if (pGetSvtSpData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSvtSpData), (VOID*)VIRTUAL((UPTR)&rSvtSpData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_SVT_SPW(AQDataMmSvtSpw* pGetSvtSpwData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSvtSpw rSvtSpwData;
    INT32* pi1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SVT_SPW_MAX, u4InputKey, _ar_MmSvtSpwTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SVT_SPW);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SVT_SPW, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSvtSpwData, u4Size);
    pi1Tmp = (INT32*)&rSvtSpwData;

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SVT_SPW - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        AQ_Dump_Table(pi1Tmp, u4Size);
    }
    else
    {
        if (pGetSvtSpwData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSvtSpwData), (VOID*)VIRTUAL((UPTR)&rSvtSpwData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_SVT_HP(AQDataMmSvtHp* pGetSvtHpData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSvtHp rSvtHpData;
    INT32* pi1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SVT_HP_MAX, u4InputKey, _ar_MmSvtHpTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SVT_HP);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SVT_HP, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSvtHpData, u4Size);
    pi1Tmp = (INT32*)&rSvtHpData;
    
#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SVT_HP - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        AQ_Dump_Table(pi1Tmp, u4Size);
    }
    else
    {
        if (pGetSvtHpData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSvtHpData), (VOID*)VIRTUAL((UPTR)&rSvtHpData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_SVT_SPDIF(AQDataMmSvtSpdif* pGetSvtSpdifData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSvtSpw rSvtSpdifData;
    INT32* pi1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SVT_SPDIF_MAX, u4InputKey, _ar_MmSvtSpdifTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SVT_SPDIF);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SVT_SPDIF, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSvtSpdifData, u4Size);
    pi1Tmp = (INT32*)&rSvtSpdifData;

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SVT_SPDIF - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        AQ_Dump_Table(pi1Tmp, u4Size);
    }
    else
    {
        if (pGetSvtSpdifData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSvtSpdifData), (VOID*)VIRTUAL((UPTR)&rSvtSpdifData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_SVT_BT(AQDataMmSvtBt* pGetSvtBtData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSvtBt rSvtBtData;
    INT32* pi1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SVT_BT_MAX, u4InputKey, _ar_MmSvtBtTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SVT_BT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SVT_BT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSvtBtData, u4Size);
    pi1Tmp = (INT32*)&rSvtBtData;
    
#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SVT_BT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        AQ_Dump_Table(pi1Tmp, u4Size);
    }
    else
    {
        if (pGetSvtBtData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSvtBtData), (VOID*)VIRTUAL((UPTR)&rSvtBtData), u4Size);
        }
    }

    return 0;

}

INT32 DrvCust_AQ_Get_SVT_EC(AQDataMmSvtEc* pGetSvtEcData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSvtEc rSvtEcData;
    INT32* pi1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SVT_EC_MAX, u4InputKey, _ar_MmSvtEcTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SVT_EC);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SVT_EC, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSvtEcData, u4Size);
    pi1Tmp = (INT32*)&rSvtEcData;
    
#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SVT_EC - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        AQ_Dump_Table(pi1Tmp, u4Size);
    }
    else
    {
        if (pGetSvtEcData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSvtEcData), (VOID*)VIRTUAL((UPTR)&rSvtEcData), u4Size);
        }
    }

    return 0;

}

INT32 DrvCust_AQ_Get_FIR(AQDataMmFir* pGetFirData, UINT32* pGetFirIdx, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmFir rFirData;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_FIR_MAX, u4InputKey, _ar_MmFirTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_FIR);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_FIR, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rFirData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_FIR - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        pu1Tmp = (UINT8*)&rFirData;
        AQ_Dump_Byte(pu1Tmp, u4Size);

    }
    else    // Set Delay to SPK/HP/SPDIF/SCART, both main and diff
    {
        if (pGetFirData != NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetFirData), (VOID*)VIRTUAL((UPTR)&rFirData), u4Size);
        }

        if (pGetFirIdx != NULL)
        {
            *pGetFirIdx = u4Idx;
        }

    }

    return 0;
}

INT32 DrvCust_AQ_Get_SMT(AQDataMmSmt* pGetSmtData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSmt rSmtData;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SMT_MAX, u4InputKey, _ar_MmSmtTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SMT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SMT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSmtData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SMT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rSmtData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetSmtData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSmtData), (VOID*)VIRTUAL((UPTR)&rSmtData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_LOUDT(AQDataMmLoudt* pGetLoudtData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmLoudt rLoudtData;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_LOUDT_MAX, u4InputKey, _ar_MmLoudtTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_LOUDT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_LOUDT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rLoudtData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_LOUDT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rLoudtData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetLoudtData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetLoudtData), (VOID*)VIRTUAL((UPTR)&rLoudtData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_DRCT(AQDataMmDrct* pGetDrctData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmDrct rDrctData;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_DRCT_MAX, u4InputKey, _ar_MmDrctTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_DRCT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_DRCT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDrctData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DRCT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDrctData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDrctData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDrctData), (VOID*)VIRTUAL((UPTR)&rDrctData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_SLT(AQDataMmSlt* pGetSltData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmSlt rSltData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_SLT_MAX, u4InputKey, _ar_MmSltTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_SLT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_SLT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rSltData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_SLT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rSltData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetSltData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetSltData), (VOID*)VIRTUAL((UPTR)&rSltData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_LIMT(AQDataMmLimt* pGetLimtData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmLimt rLimtData;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_LIMT_MAX, u4InputKey, _ar_MmLimtTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_LIMT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_LIMT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rLimtData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_LIMT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rLimtData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetLimtData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetLimtData), (VOID*)VIRTUAL((UPTR)&rLimtData), u4Size);
        }
    }

    return 0;
}

INT32 DrvCust_AQ_Get_DLY(AQDataMmAuDly* pDlyData, UINT32* pGetDlyIdx, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmAuDly rDlyData;
    UINT32 u4MtkDrvDly;
    UINT8 u1DecId;
    
    UINT32 j;
    UINT8* pu1Tmp;
    
    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_AU_DLY_MAX, u4InputKey, _ar_MmAuDlyTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_AU_DLY);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_AU_DLY, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDlyData, u4Size);
    
#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DLY - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        pu1Tmp = (UINT8*)&rDlyData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
        
        printf("\n === AQ === \n");
        printf("  m_MmMainAdj   = %d \n", rDlyData.m_MmMainAdj);
        printf("  m_MmSpAdj     = %d \n", rDlyData.m_MmSpAdj);
        printf("  m_MmHoloswAdj = %d \n", rDlyData.m_MmHoloswAdj);
        printf("  m_MmSpdifAdj  = %d \n", rDlyData.m_MmSpdifAdj);
        printf("  m_MmBtDly     = %d \n", rDlyData.m_MmBtDly);
    }
    else    // Set Delay to SPK/HP/SPDIF/SCART, both main and diff
    {
        if (pDlyData != NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pDlyData), (VOID*)VIRTUAL((UPTR)&rDlyData), u4Size);
        }
        
        if (pGetDlyIdx != NULL)
        {
            *pGetDlyIdx = u4Idx;
        }
        
    }
    
    return 0;
}

INT32 DrvCust_AQ_Get_ACT(AQDataMmAct* pGetActData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmAct rActData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_ACT_MAX, u4InputKey, _ar_MmActTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_ACT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_ACT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rActData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_ACT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rActData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetActData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetActData), (VOID*)VIRTUAL((UPTR)&rActData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_ADCT(AQDataMmAdct* pGetAdctData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmAdct rAdctData;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_ADCT_MAX, u4InputKey, _ar_MmAdctTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_ADCT);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_ADCT, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rAdctData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_ADCT - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rAdctData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetAdctData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetAdctData), (VOID*)VIRTUAL((UPTR)&rAdctData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_RSV(AQDataMmRsv* pGetRsvData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmRsv rRsvData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_RSV_MAX, u4InputKey, _ar_MmRsvTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_RSV);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_RSV, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rRsvData, u4Size);
    
#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_RSV - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        pu1Tmp = (UINT8*)pGetRsvData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetRsvData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetRsvData), (VOID*)VIRTUAL((UPTR)&rRsvData), u4Size);
        }
    }


    return 0;
}

INT32 DrvCust_AQ_Get_DD_OPTIMIZER(AQDataDdOptimizer* pGetDdOptimizerData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdOptimizer rDdOptimizerData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_OPTIMIZER_MAX, u4InputKey, _ar_DdOptimizerTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_OPTIMIZER);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_OPTIMIZER, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdOptimizerData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_OPTIMIZER - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdOptimizerData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdOptimizerData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdOptimizerData), (VOID*)VIRTUAL((UPTR)&rDdOptimizerData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_REGU(AQDataDdRegu* pGetDdReguData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdRegu rDdReguData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_REGU_MAX, u4InputKey, _ar_DdReguTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_REGU);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_REGU, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdReguData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_REGU - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdReguData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdReguData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdReguData), (VOID*)VIRTUAL((UPTR)&rDdReguData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_GENERAL(AQDataDdGeneral* pGetDdGeneralData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdGeneral rDdGeneralData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_GENERAL_MAX, u4InputKey, _ar_DdGeneralTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_GENERAL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_GENERAL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdGeneralData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_GENERAL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdGeneralData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdGeneralData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdGeneralData), (VOID*)VIRTUAL((UPTR)&rDdGeneralData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_GENERAL2(AQDataDdGeneral2* pGetDdGeneral2Data, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdGeneral2 rDdGeneral2Data;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_GENERAL2_MAX, u4InputKey, _ar_DdGeneral2Tbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_GENERAL2);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_GENERAL2, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdGeneral2Data, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_GENERAL2 - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdGeneral2Data;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdGeneral2Data!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdGeneral2Data), (VOID*)VIRTUAL((UPTR)&rDdGeneral2Data), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_IEQ(AQDataDdIeq* pGetDdIeqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdIeq rDdIeqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_IEQ_MAX, u4InputKey, _ar_DdIeqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_IEQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_IEQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdIeqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_IEQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdIeqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdIeqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdIeqData), (VOID*)VIRTUAL((UPTR)&rDdIeqData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_GEQ(AQDataDdGeq* pGetDdGeqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdGeq rDdGeqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_GEQ_MAX, u4InputKey, _ar_DdGeqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_GEQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_GEQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdGeqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_GEQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdGeqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdGeqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdGeqData), (VOID*)VIRTUAL((UPTR)&rDdGeqData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_BASS_EN(AQDataDdBassEn* pGetDdBassEnData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdBassEn rDdBassEnData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_BASS_EN_MAX, u4InputKey, _ar_DdBassEnTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_BASS_EN);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_BASS_EN, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdBassEnData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_BASS_EN - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdBassEnData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdBassEnData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdBassEnData), (VOID*)VIRTUAL((UPTR)&rDdBassEnData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_SURR(AQDataDdSurr* pGetDdSurrData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdSurr rDdSurrData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_SURR_MAX, u4InputKey, _ar_DdSurrTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_SURR);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_SURR, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdSurrData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_SURR - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdSurrData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdSurrData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdSurrData), (VOID*)VIRTUAL((UPTR)&rDdSurrData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_VB(AQDataDdVb* pGetDdVbData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdVb rDdVbData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_VB_MAX, u4InputKey, _ar_DdVbTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_VB);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_VB, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdVbData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_VB - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdVbData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdVbData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdVbData), (VOID*)VIRTUAL((UPTR)&rDdVbData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_VOL_LV(AQDataDdVolLv* pGetDdVolLvData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdVolLv rDdVolLvData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_VOL_LV_MAX, u4InputKey, _ar_DdVolLvTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_VOL_LV);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_VOL_LV, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdVolLvData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_VOL_LV - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdVolLvData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdVolLvData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdVolLvData), (VOID*)VIRTUAL((UPTR)&rDdVolLvData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DD_DIALOG(AQDataDdDialog* pGetDdDialogData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDdDialog rDdDialogData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DD_DIALOG_MAX, u4InputKey, _ar_DdDialogTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DD_DIALOG);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DD_DIALOG, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDdDialogData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DD_DIALOG - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDdDialogData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDdDialogData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDdDialogData), (VOID*)VIRTUAL((UPTR)&rDdDialogData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DA_GEN_CFG(UINT32 u4InputKey)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDaGeneralConfig rDaGenConfData;

    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA_GENERAL_CONFIG_MAX, u4InputKey, _ar_DaGeneralConfigTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA_GENERAL_CONFIG);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA_GENERAL_CONFIG, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDaGenConfData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA_GEN_CFG - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    pu1Tmp = (UINT8*)&rDaGenConfData;
    AQ_Dump_Byte(pu1Tmp, u4Size);

    return 0;
}

INT32 DrvCust_AQ_Get_DA1_5782_VOL(AQDataDa15782Vol* pGetDa15782VolData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa15782Vol rDa15782VolData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA1_5782_VOL_MAX, u4InputKey, _ar_Da15782VolTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA1_5782_VOL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA1_5782_VOL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa15782VolData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA1_5782_VOL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa15782VolData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa15782VolData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa15782VolData), (VOID*)VIRTUAL((UPTR)&rDa15782VolData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA2_5782_VOL(AQDataDa25782Vol* pGetDa25782VolData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa25782Vol rDa25782VolData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA2_5782_VOL_MAX, u4InputKey, _ar_Da25782VolTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA2_5782_VOL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA2_5782_VOL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa25782VolData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA2_5782_VOL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa25782VolData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa25782VolData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa25782VolData), (VOID*)VIRTUAL((UPTR)&rDa25782VolData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA3_5782_VOL(AQDataDa35782Vol* pGetDa35782VolData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa35782Vol rDa35782VolData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA3_5782_VOL_MAX, u4InputKey, _ar_Da35782VolTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA3_5782_VOL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA3_5782_VOL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa35782VolData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA3_5782_VOL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa35782VolData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa35782VolData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa35782VolData), (VOID*)VIRTUAL((UPTR)&rDa35782VolData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA4_5782_VOL(AQDataDa45782Vol* pGetDa45782VolData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa45782Vol rDa45782VolData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA4_5782_VOL_MAX, u4InputKey, _ar_Da45782VolTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA4_5782_VOL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA4_5782_VOL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa45782VolData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA4_5782_VOL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa45782VolData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa45782VolData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa45782VolData), (VOID*)VIRTUAL((UPTR)&rDa45782VolData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DA1_5782_BQ(AQDataDa15782Bq* pGetDa15782BqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa15782Bq rDa15782BqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA1_5782_BQ_MAX, u4InputKey, _ar_Da15782BqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA1_5782_BQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA1_5782_BQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa15782BqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA1_5782_BQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa15782BqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa15782BqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa15782BqData), (VOID*)VIRTUAL((UPTR)&rDa15782BqData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA2_5782_BQ(AQDataDa25782Bq* pGetDa25782BqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa25782Bq rDa25782BqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA2_5782_BQ_MAX, u4InputKey, _ar_Da25782BqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA2_5782_BQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA2_5782_BQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa25782BqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA2_5782_BQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa25782BqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa25782BqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa25782BqData), (VOID*)VIRTUAL((UPTR)&rDa25782BqData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA3_5782_BQ(AQDataDa35782Bq* pGetDa35782BqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa35782Bq rDa35782BqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA3_5782_BQ_MAX, u4InputKey, _ar_Da35782BqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA3_5782_BQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA3_5782_BQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa35782BqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA3_5782_BQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa35782BqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa35782BqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa35782BqData), (VOID*)VIRTUAL((UPTR)&rDa35782BqData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA4_5782_BQ(AQDataDa45782Bq* pGetDa45782BqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa45782Bq rDa45782BqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA4_5782_BQ_MAX, u4InputKey, _ar_Da45782BqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA4_5782_BQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA4_5782_BQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa45782BqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA4_5782_BQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa45782BqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa45782BqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa45782BqData), (VOID*)VIRTUAL((UPTR)&rDa45782BqData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DA1_5782_DPEQ(AQDataDa15782Dpeq* pGetDa15782DpeqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa15782Dpeq rDa15782DpeqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA1_5782_DPEQ_MAX, u4InputKey, _ar_Da15782DpeqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA1_5782_DPEQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA1_5782_DPEQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa15782DpeqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA1_5782_DPEQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa15782DpeqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa15782DpeqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa15782DpeqData), (VOID*)VIRTUAL((UPTR)&rDa15782DpeqData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA2_5782_DPEQ(AQDataDa25782Dpeq* pGetDa25782DpeqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa25782Dpeq rDa25782DpeqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA2_5782_DPEQ_MAX, u4InputKey, _ar_Da25782DpeqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA2_5782_DPEQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA2_5782_DPEQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa25782DpeqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA2_5782_DPEQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa25782DpeqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa25782DpeqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa25782DpeqData), (VOID*)VIRTUAL((UPTR)&rDa25782DpeqData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA3_5782_DPEQ(AQDataDa35782Dpeq* pGetDa35782DpeqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa35782Dpeq rDa35782DpeqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA3_5782_DPEQ_MAX, u4InputKey, _ar_Da35782DpeqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA3_5782_DPEQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA3_5782_DPEQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa35782DpeqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA3_5782_DPEQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa35782DpeqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa35782DpeqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa35782DpeqData), (VOID*)VIRTUAL((UPTR)&rDa35782DpeqData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA4_5782_DPEQ(AQDataDa45782Dpeq* pGetDa45782DpeqData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa45782Dpeq rDa45782DpeqData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA4_5782_DPEQ_MAX, u4InputKey, _ar_Da45782DpeqTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA4_5782_DPEQ);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA4_5782_DPEQ, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa45782DpeqData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA4_5782_DPEQ - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa45782DpeqData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa45782DpeqData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa45782DpeqData), (VOID*)VIRTUAL((UPTR)&rDa45782DpeqData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DA1_5782_DRC(AQDataDa15782Drc* pGetDa15782DrcData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa15782Drc rDa15782DrcData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA1_5782_DRC_MAX, u4InputKey, _ar_Da15782DrcTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA1_5782_DRC);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA1_5782_DRC, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa15782DrcData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA1_5782_DRC - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa15782DrcData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa15782DrcData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa15782DrcData), (VOID*)VIRTUAL((UPTR)&rDa15782DrcData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA2_5782_DRC(AQDataDa25782Drc* pGetDa25782DrcData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa25782Drc rDa25782DrcData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA2_5782_DRC_MAX, u4InputKey, _ar_Da25782DrcTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA2_5782_DRC);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA2_5782_DRC, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa25782DrcData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA2_5782_DRC - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa25782DrcData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa25782DrcData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa25782DrcData), (VOID*)VIRTUAL((UPTR)&rDa25782DrcData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA3_5782_DRC(AQDataDa35782Drc* pGetDa35782DrcData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa35782Drc rDa35782DrcData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA3_5782_DRC_MAX, u4InputKey, _ar_Da35782DrcTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA3_5782_DRC);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA3_5782_DRC, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa35782DrcData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA3_5782_DRC - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa35782DrcData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa35782DrcData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa35782DrcData), (VOID*)VIRTUAL((UPTR)&rDa35782DrcData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA4_5782_DRC(AQDataDa45782Drc* pGetDa45782DrcData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa45782Drc rDa45782DrcData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA4_5782_DRC_MAX, u4InputKey, _ar_Da45782DrcTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA4_5782_DRC);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA4_5782_DRC, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa45782DrcData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA4_5782_DRC - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa45782DrcData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa45782DrcData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa45782DrcData), (VOID*)VIRTUAL((UPTR)&rDa45782DrcData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DA1_5782_GENERAL(AQDataDa15782General* pGetDa15782GeneralData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa15782General rDa15782GeneralData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA1_5782_GENERAL_MAX, u4InputKey, _ar_Da15782GeneralTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA1_5782_GENERAL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA1_5782_GENERAL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa15782GeneralData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA1_5782_GENERAL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa15782GeneralData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa15782GeneralData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa15782GeneralData), (VOID*)VIRTUAL((UPTR)&rDa15782GeneralData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA2_5782_GENERAL(AQDataDa25782General* pGetDa25782GeneralData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa25782General rDa25782GeneralData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA2_5782_GENERAL_MAX, u4InputKey, _ar_Da25782GeneralTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA2_5782_GENERAL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA2_5782_GENERAL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa25782GeneralData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA2_5782_GENERAL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa25782GeneralData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa25782GeneralData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa25782GeneralData), (VOID*)VIRTUAL((UPTR)&rDa25782GeneralData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA3_5782_GENERAL(AQDataDa35782General* pGetDa35782GeneralData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa35782General rDa35782GeneralData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA3_5782_GENERAL_MAX, u4InputKey, _ar_Da35782GeneralTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA3_5782_GENERAL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA3_5782_GENERAL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa35782GeneralData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA3_5782_GENERAL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa35782GeneralData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa35782GeneralData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa35782GeneralData), (VOID*)VIRTUAL((UPTR)&rDa35782GeneralData), u4Size);
        }
    }
    return 0;
}
INT32 DrvCust_AQ_Get_DA4_5782_GENERAL(AQDataDa45782General* pGetDa45782GeneralData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDa45782General rDa45782GeneralData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA4_5782_GENERAL_MAX, u4InputKey, _ar_Da45782GeneralTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA4_5782_GENERAL);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA4_5782_GENERAL, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDa45782GeneralData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA4_5782_GENERAL - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC)
    {
        pu1Tmp = (UINT8*)&rDa45782GeneralData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetDa45782GeneralData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetDa45782GeneralData), (VOID*)VIRTUAL((UPTR)&rDa45782GeneralData), u4Size);
        }
    }
    return 0;
}

INT32 DrvCust_AQ_Get_DA_GEN_CFG_INIT(UINT32 u4InputKey)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataDaGeneralConfig rDaGenConfData;

    UINT32 i,j;
    UINT8* pu1Tmp;
    UINT8 u1AmpNum=0;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_DA_GENERAL_CONFIG_MAX, u4InputKey, _ar_DaGeneralConfigTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_DA_GENERAL_CONFIG);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_DA_GENERAL_CONFIG, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDaGenConfData, u4Size);

#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DA_GEN_CFG - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    pu1Tmp = (UINT8*)&rDaGenConfData;
    for (j = 0; j < u4Size; j++)
    {
        if (j % 16 == 0)
        {
            Printf("\n");
        }
        Printf("0x%02x ", pu1Tmp[j]);
    }    
    Printf("\n");

    if (rDaGenConfData.m_DaTypeIicC90 != 0)
    {
        AUD_CUST_AMP_RegistAmp(AUD_CUST_AMP_TYPE_5782, AUD_CUST_AMP_I2C_BUS_C,
                               0x90, rDaGenConfData.m_DaTypeIicC90);
        u1AmpNum++;
    }
    if (rDaGenConfData.m_DaTypeIicC92 != 0)
    {
        AUD_CUST_AMP_RegistAmp(AUD_CUST_AMP_TYPE_5782, AUD_CUST_AMP_I2C_BUS_C,
                               0x92, rDaGenConfData.m_DaTypeIicC92);
        u1AmpNum++;
    }
    if (rDaGenConfData.m_DaTypeIicC94 != 0)
    {
        AUD_CUST_AMP_RegistAmp(AUD_CUST_AMP_TYPE_5782, AUD_CUST_AMP_I2C_BUS_C,
                               0x94, rDaGenConfData.m_DaTypeIicC94);
        u1AmpNum++;
    }
    if (rDaGenConfData.m_DaTypeIicC96 != 0)
    {
        AUD_CUST_AMP_RegistAmp(AUD_CUST_AMP_TYPE_5782, AUD_CUST_AMP_I2C_BUS_C,
                               0x96, rDaGenConfData.m_DaTypeIicC96);
        u1AmpNum++;
    }
    
    LOG(1, "Num of Amp is %d\n", u1AmpNum);
	AUD_CUST_AMP_ShowStatus();
    return 0;
}


INT32 DrvCust_AQ_Get_DLY2(AQDataMmAuDly2* pDly2Data, UINT32* pGetDly2Idx, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMmAuDly2 rDly2Data;
    UINT32 u4MtkDrvDly2;
    UINT8 u1DecId;
    
    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MM_AU_DLY2_MAX, u4InputKey, _ar_MmAuDly2Tbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MM_AU_DLY2);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MM_AU_DLY2, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rDly2Data, u4Size);
    
#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_DLY2 - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        pu1Tmp = (UINT8*)&rDly2Data;
        AQ_Dump_Byte(pu1Tmp, u4Size);
        
        printf("\n === AQ === \n");
        printf("  m_MmEarcAdjNonpcmP3   = %d \n", rDly2Data.m_MmEarcAdjNonpcmP3);
        printf("  m_MmEarcAdjNonpcmP2   = %d \n", rDly2Data.m_MmEarcAdjNonpcmP2);
        printf("  m_MmEarcAdjPcm        = %d \n", rDly2Data.m_MmEarcAdjPcm);
        printf("  m_MmEarcAdjDtsHd      = %d \n", rDly2Data.m_MmEarcAdjDtsHd);
        printf("  m_MmEarcAdjDtsX       = %d \n", rDly2Data.m_MmEarcAdjDtsX);
        printf("  m_MmEarcAdjMat        = %d \n", rDly2Data.m_MmEarcAdjMat);
        printf("  m_MmPassThrough1      = %d \n", rDly2Data.m_MmPassThrough1);
        printf("  m_MmPassThrough2      = %d \n", rDly2Data.m_MmPassThrough2);
    }
    else    // Set Delay to SPK/HP/SPDIF/SCART, both main and diff
    {
        if (pDly2Data != NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pDly2Data), (VOID*)VIRTUAL((UPTR)&rDly2Data), u4Size);
        }
        
        if (pGetDly2Idx != NULL)
        {
            *pGetDly2Idx = u4Idx;
        }
        
    }
    
    return 0;
}

INT32 DrvCust_AQ_Get_MS_RSV(AQDataMsRsv* pGetRsvData, UINT32 u4InputKey, UINT32 u4Type)
{
    UINT32 u4Idx = 0;
    UINT32 u4Size;
    UINT32 u4Addr;
    AQDataMsRsv rRsvData;

    UINT32 j;
    UINT8* pu1Tmp;

    u4Idx = DrvCust_AQ_Get_SpecificTable(AQDATA_INDEX_MS_RSV_MAX, u4InputKey, _ar_MsRsvTbl_Key);
    u4Size = DrvCust_AQ_GetAqGroupSize(AQDATA_GROUP_MS_RSV);
    u4Addr = DrvCust_AQ_GetAqAddress(AQDATA_GROUP_MS_RSV, u4Idx, 0);
    vAprocAqData_Read(u4Addr, (UINT8*)&rRsvData, u4Size);
    
#ifdef AQ_IDX_DEBUG
    gAqIdxDebugIndex[AUD_DrvCust_AQ_Get_RSV - AQ_IDX_DBG_INDEX_OFFSET] = u4Idx;
#endif /* AQ_IDX_DEBUG */

    // Write code for apply data here ....
    if (u4Type == AQ_NOT_SPECIFIC) /* Just query table */
    {
        pu1Tmp = (UINT8*)pGetRsvData;
        AQ_Dump_Byte(pu1Tmp, u4Size);
    }
    else
    {
        if (pGetRsvData!=NULL)
        {
            x_memcpy((VOID*)VIRTUAL((UPTR)pGetRsvData), (VOID*)VIRTUAL((UPTR)&rRsvData), u4Size);
        }
    }


    return 0;
}

BOOL DrvCust_AQ_IsSurround(AUD_DrvCust_AQ_Key_T rAqKey)
{
    BOOL isSurround = FALSE;

    if(rAqKey.u1SurroundOnOff == AQ_SURROUND_OFF){
        isSurround = FALSE;
    }
    else if(rAqKey.u1SurroundOnOff == AQ_SURROUND_ON){
        isSurround = TRUE;
    }
    else if(rAqKey.u1SurroundOnOff == AQ_SURROUND_AUTO){
        switch(rAqKey.u1ChannelConf) {
        case AQ_CHANNEL_CONF_2_2_0:
        case AQ_CHANNEL_CONF_2_2_1:
        case AQ_CHANNEL_CONF_3_2_0:
        case AQ_CHANNEL_CONF_3_2_1:
            isSurround = TRUE;
            break;
        default:
            isSurround = FALSE;
            break;
        }
    }
    return isSurround;
}


UINT32 DrvCust_AQ_GetAqDebugIndex(UINT8 id)
{
#ifdef AQ_IDX_DEBUG
    if (id <= AQ_IDX_DBG_INDEX_NUM-1) {
        return gAqIdxDebugIndex[id];
    } else if (id >= AQ_IDX_DBG_INDEX_OFFSET) {
        if((id - AQ_IDX_DBG_INDEX_OFFSET)<=AQ_IDX_DBG_INDEX_NUM-1)
            return gAqIdxDebugIndex[id - AQ_IDX_DBG_INDEX_OFFSET];
        return 0xFFFFFFFF;
    } else {
        return 0xFFFFFFFF;
    }
#else
    return 0xFFFFFFFF;
#endif /* AQ_IDX_DEBUG */
}
#endif // CC_AUD_SAKURA_RENDER

#endif //#if ((!defined(CC_MTK_PRELOADER)) && (!defined(CC_MTK_LOADER))) 

