/*****************************************************************************
 * Copyright (C) Gemalto M2M GmbH
 *****************************************************************************
 * Project: IMC-RIL-Driver
 *****************************************************************************
 * Author : Wireless Modules RD SW A2
 *****************************************************************************
 * $Workfile: Y:/z_ms-d/src/working/Quinn/RilDrv/audio.h $
 * $Revision: /main/ms-d/10 $
 *     $Date: 2013-03-04 13:19:24 $
 *   $Author: pmackent $
 *****************************************************************************
 * Target:
 *  Microsoft Windows Mobile 5.0
 *****************************************************************************
 * Description:
 *  Gemalto IMC RIL
 *****************************************************************************
 *
 * $Log: Y:/z_ms-d/src/working/Quinn/RilDrv/audio.h$ 
 * 
 * /main/ms-d/10   2013-03-04 13:19:24   pmackent 
 * Adaptions for EHS5 1.300
 *
 * /main/ms-d/9   2012-10-24 10:55:27   pmackent
 * Allow different audio configuration for CDMA and GSM
 *
 * /main/ms-d/8   2010-07-02 15:58:31   ctna0256
 * Introduce SAIC-settings and modified SNFO for PH8
 *
 * /main/ms-d/7   2009-05-28 11:36:35   ctna0256
 * Remove "Siemens" from RIL
 *
 * /main/ms-d/6   2008-08-22 10:22:37   ctna0256
 * Set Cinterion copyright text
 *
 * /main/ms-d/5   2008-08-21 09:33:54   ctna0256
 * Prepared for new disclaimer handling
 *
 * /main/ms-d/4   2007-08-08 11:16:41   mp49210
 * Introduction of audio profile download
 *
 * /main/ms-d/3   2007-02-09 15:15:33   mp49210
 * Lint compatibility
 *
 * /main/ms-d/2   2007-01-19 10:06:52   mp49210
 * New audio configuration registry structure
 *
 * /main/ms-d/1   2006-10-25 16:52:46   wm36264
 * First transformation from classic RIL
 *
*/

//////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2008 Gemalto M2M GmbH
// Copyright (C) 2006-2008 Siemens AG
// Copyright (C) 2003 Intrinsyc Europe Ltd.
//
// Version: 1.0
// Date:    dummy
//
//////////////////////////////////////////////////////////////////////////////

/*++
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.
Copyright (c) 1995-1999  Microsoft Corporation
--*/

#if !defined(RIL_AUDIO_REGNAME_EXT)
#define RIL_AUDIO_REGNAME_EXT L""
#endif

#define RIL_AUDIO_CONFIG_ROOT         (HKEY_LOCAL_MACHINE)
#define RIL_AUDIO_CONFIG_KEY          (TEXT("Software\\RIL\\Audio"))
#define RIL_AUDIO_CONFIG_HANDSET      (TEXT("Software\\RIL\\Audio\\Handset"))
#define RIL_AUDIO_CONFIG_SPEAKERPHONE (TEXT("Software\\RIL\\Audio\\Speakerphone"))
#define RIL_AUDIO_CONFIG_HEADSET      (TEXT("Software\\RIL\\Audio\\Headset"))
#define RIL_AUDIO_CONFIG_CARKIT       (TEXT("Software\\RIL\\Audio\\Carkit"))
#define RIL_AUDIO_CONFIG_EXTENSION_BLUETOOTHCARKIT  (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"BlueToothCarkit")
#define RIL_AUDIO_CONFIG_EXTENSION_BLUETOOTHHEADSET (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"BlueToothHeadSet")
#define RIL_AUDIO_CONFIG_EXTENSION_GENERIC1         (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"Generic1")
#define RIL_AUDIO_CONFIG_EXTENSION_GENERIC2         (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"Generic2")
#define RIL_AUDIO_CONFIG_HANDSET_CDMA      (TEXT("Software\\RIL\\Audio\\HandsetCdma"))
#define RIL_AUDIO_CONFIG_SPEAKERPHONE_CDMA (TEXT("Software\\RIL\\Audio\\SpeakerphoneCdma"))
#define RIL_AUDIO_CONFIG_HEADSET_CDMA      (TEXT("Software\\RIL\\Audio\\HeadsetCdma"))
#define RIL_AUDIO_CONFIG_CARKIT_CDMA       (TEXT("Software\\RIL\\Audio\\CarkitCdma"))
#define RIL_AUDIO_CONFIG_EXTENSION_BLUETOOTHCARKIT_CDMA  (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"BlueToothCarkitCdma")
#define RIL_AUDIO_CONFIG_EXTENSION_BLUETOOTHHEADSET_CDMA (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"BlueToothHeadSetCdma")
#define RIL_AUDIO_CONFIG_EXTENSION_GENERIC1_CDMA         (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"Generic1Cdma")
#define RIL_AUDIO_CONFIG_EXTENSION_GENERIC2_CDMA         (L"Software\\RIL\\Audio\\" RIL_AUDIO_REGNAME_EXT L"Generic2Cdma")

#define RIL_AUDIO_CONFIG_MODE                     (TEXT("AudioMode"))
#define RIL_AUDIO_CONFIG_EXTAUDIOCODECVOLSTEPS    (TEXT("ExtAudioCodecVolSteps"))
#define RIL_AUDIO_CONFIG_EXTMICAUDIOCODECVOLSTEPS (TEXT("ExtMicAudioCodecVolSteps"))
#define RIL_AUDIO_CONFIG_EXTMICAUDIOCODECVOL      (TEXT("ExtMicAudioCodecVol"))
#define RIL_AUDIO_CONFIG_SNFOCDCRXGAINSTEPS       (TEXT("SNFOcdcRxGainSteps"))
#define RIL_AUDIO_CONFIG_SNFORXVOLSTEPS           (TEXT("SNFOrxVolSteps"))
#define RIL_AUDIO_CONFIG_SNFOSTGAINSTEPS          (TEXT("SNFOstGainSteps"))
#define RIL_AUDIO_CONFIG_SNFOOUTVOLSTEPS          (TEXT("SNFOoutVolSteps"))
#define RIL_AUDIO_CONFIG_SNFOSIDETONESTEPS        (TEXT("SNFOsideToneSteps"))
#define RIL_AUDIO_CONFIG_SNFIMICAMP1STEPS         (TEXT("SNFImicAmp1Steps"))
#define RIL_AUDIO_CONFIG_SNFIMICAMP2STEPS         (TEXT("SNFImicAmp2Steps"))
#define RIL_AUDIO_CONFIG_SNFIMICTXVOLSTEPS        (TEXT("SNFImicTxVolSteps"))
#define RIL_AUDIO_CONFIG_SNFIMICAMP1              (TEXT("SNFImicAmp1"))
#define RIL_AUDIO_CONFIG_SNFIMICAMP2              (TEXT("SNFImicAmp2"))
#define RIL_AUDIO_CONFIG_SNFIMICTXVOL             (TEXT("SNFImicTxVol"))
#define RIL_AUDIO_CONFIG_SNFIINVOLSTEP            (TEXT("SNFIinVolStep"))
#define RIL_AUDIO_CONFIG_SAICINTERFACE            (TEXT("SAICinterface"))
#define RIL_AUDIO_CONFIG_SAICMICROPHONE           (TEXT("SAICmicrophone"))
#define RIL_AUDIO_CONFIG_SAICEARPIECE             (TEXT("SAICearpiece"))
#define RIL_AUDIO_CONFIG_SAICCLOCK                (TEXT("SAICclock"))
#define RIL_AUDIO_CONFIG_SAICMSMODE               (TEXT("SAICmsMode"))
#define RIL_AUDIO_CONFIG_SAICFRAMEMODE            (TEXT("SAICframeMode"))
#define RIL_AUDIO_CONFIG_SAICEXTCLKMODE           (TEXT("SAICextClkMode"))
#define RIL_AUDIO_CONFIG_DISABLE                  (TEXT("ProfileDownloadDisable"))
#define RIL_AUDIO_VERSION_CHECK_DISABLE           (TEXT("ProfileVersionCheckDisable"))

#define MAX_AUDIO_MODES     9
#define MAX_VOLUME_STEPS    6

typedef struct tagAudioConfig {
    DWORD   dwAudioMode;
    DWORD   dwSAICinterface;
    DWORD   dwSAICmicrophone;
    DWORD   dwSAICearpiece;
    DWORD   dwSAICclock;
    DWORD   dwSAICmsMode;
    DWORD   dwSAICframeMode;
    DWORD   dwSAICextClkMode;
    DWORD   dwExtAudioCodecVolSteps[MAX_VOLUME_STEPS];
    DWORD   dwExtMicAudioCodecVolSteps[MAX_VOLUME_STEPS];
    DWORD   dwSNFOcdcRxGainSteps[MAX_VOLUME_STEPS];
    DWORD   dwSNFOrxVolSteps[MAX_VOLUME_STEPS];
    DWORD   dwSNFOstGainSteps[MAX_VOLUME_STEPS];
    DWORD   dwSNFOoutVolSteps[MAX_VOLUME_STEPS];
    DWORD   dwSNFOsideToneSteps[MAX_VOLUME_STEPS];
    DWORD   dwSNFImicAmp1Steps[MAX_VOLUME_STEPS];
    DWORD   dwSNFImicAmp2Steps[MAX_VOLUME_STEPS];
    DWORD   dwSNFImicTxVolSteps[MAX_VOLUME_STEPS];
    DWORD   dwSNFIinVolSteps[MAX_VOLUME_STEPS];
} AUDIO_CONFIG;

extern void GetAudioConfig(void);
int GetAudioTableIndex(DWORD dwAudioMode);
AUDIO_CONFIG *GetAudioTableEntry(INT iDevice, CRilHandle *pHandle);

