/****************************************************************************/ /* */ /* Copyright (c) 2003 Trident Technologies, Inc. */ /* All rights reserved */ /* */ /* The content of this file or document is CONFIDENTIAL and PROPRIETARY */ /* to Trident Microsystems, Inc. It is subject to the terms of a */ /* License Agreement between Licensee and Trident Technologies, Inc. */ /* restricting among other things, the use, reproduction, distribution */ /* and transfer. Each of the embodiments, including this information and */ /* any derivative work shall retain this copyright notice */ /* */ /****************************************************************************/ /****************************************************************************** COPYRIGHT (C) ISD ST 2005. -. File name STV82X8.h -. Creation date 06/May/2005 -. Author Name MS Song ( e.g.: ST-Korea ) -. History Version 1.0.0 : 18/May/2005 Version 1.0.1 : 10/Jun/2005 -. Description This file contains the definition of the registers and masks for STV82x8. *******************************************************************************/ ////////////////////////////////////////////////////////////////////////////////////// // // $Log: stv82x8.h,v $ // Revision 1.1 2011/07/08 03:43:26 megakiss // *** empty log message *** // // Revision 1.1.1.1 2009/01/09 03:18:18 hwatk // DSTHAL Base Skeleton, which is imported at 2009.01.09. // // Revision 1.1.1.1 2008/01/08 23:40:21 jhkoh // first release // // Revision 1.1 2007/02/23 13:42:56 hwatk // H0_10 // // Revision 1.25 2006/09/28 20:08:42 teresa // *** empty log message *** // // Revision 1.24 2006/09/27 05:16:22 blance // Update init interface // // Revision 1.23 2006/09/13 23:45:15 teresa // add i2c_num parameter // // Revision 1.22 2006/09/13 10:22:06 blance // Add ext func. // // Revision 1.21 2006/09/08 09:16:33 blance // Add audio path switch. // // Revision 1.20 2006/09/07 03:58:12 blance // Update from Wistron. // // Revision 1.19 2006/09/05 00:59:14 blance // Update from Wistron. // // Revision 1.18 2006/09/01 09:56:32 blance // update for func declaration. // // Revision 1.17 2006/09/01 09:48:21 blance // Add for extend routines. // // Revision 1.16 2006/08/01 22:16:33 simon // change mute function // // Revision 1.15 2006/07/29 02:28:59 simon // change default headphone setting; otherwise cannot hear // // Revision 1.14 2006/07/28 23:47:48 simon // fix headphone problem, add subwoofer, and av selection // // Revision 1.13 2006/07/18 02:54:26 teresa // *** empty log message *** // // Revision 1.12 2006/07/17 09:08:42 simon // 1. add dialog, trubass level for LS and Headphone // 2. support turbass on headphone // // Revision 1.11 2006/07/17 08:13:42 simon // 1. add headphone control prototype // 2. enable Smart Vol. control for Loudspeaker and Headphone // 3. add ST Wide Surround Mode prototype // // Revision 1.10 2006/07/13 08:43:05 simon // change prescale setting for each input // // Revision 1.9 2006/07/13 00:09:48 teresa // *** empty log message *** // // Revision 1.8 2006/07/04 02:36:05 simon // add I2S prescale for each I2S input // // Revision 1.7 2006/07/03 23:52:39 simon // set I2S prescale equal to analog gain // // Revision 1.6 2006/07/03 20:50:34 simon // fix multi-defination problem // // Revision 1.5 2006/07/03 17:56:29 simon // add balance table // // Revision 1.4 2006/06/23 23:37:12 simon // 1. add auto mute if no signal // 2. add mute all fucntion // 3. add bass and treble gain on Loud Speaker // // Revision 1.3 2006/06/21 22:42:04 simon // make code readable and following our coding convention // // ////////////////////////////////////////////////////////////////////////////////////// #if !defined(__STV82x8_H__) #define __STV82x8_H__ //******************************************************* // Register Mask Define //******************************************************* /* Volume_Control */ #define VOLUME_MSB_MASK 0x00FF #define VOLUME_LSB_MASK 0x0003 #define BALANCE_MSB_MASK 0x00FF #define BALANCE_LSB_MASK 0x0003 /* SW_RESET */ //#define STV82X8_SOFT_RESETALL_MASK 0x01 #define STV82X8_SOFT_RESETALL_MASK 0x61 // I2S data pin is Input port for Artoo /* IRQ_STAT */ #define STV82X8_IRQ0_MASK 0x01 #define STV82X8_IRQ3_MASK 0x08 /* MUTE_DIGITAL */ #define STV82X8_DIGITAL_MUTE_MASK 0x8F #define STV82X8_DIGITALMUTE_SCART1_MASK 0x10 #define STV82X8_DIGITALMUTE_SCART2_MASK 0x20 #define STV82X8_DIGITALMUTE_SPDIF_MASK 0x40 #define STV82x8_DIGITAL_AUTOSTD_MUTE_MASK 0x80 #define STV82x8_MUTEDIG_SUBWOOFER_MASK 0x04 #define STV82x8_DAC_SUBWOOFER_MASK 0x04 /* HEADPHONE_CONFIG */ #define STV82X8_HP_CONFIG_MASK 0x0E #define STV82X8_HP_DETECTED_MASK 0x01 /* ADC_CTRL */ #define STV82X8_ADC_WAKEUP_MASK 0x08 #define STV82x8_I2S_DATA0_CTRL_MASK 0xE0 #define STV82X8_I2S_OUTPUT_LR 0x00 #define STV82X8_I2S_OUTPUT_HP_SURROUND 0x20 #define STV82X8_I2S_OUTPUT_C_SUB 0x40 #define STV82X8_I2S_OUTPUT_SCART 0x60 #define STV82X8_I2S_OUTPUT_SPDIF 0x80 #define STV82X8_I2S_OUTPUT_DELAY 0xA0 #define STV82X8_ADCINPUT_MASK 0x07 /* TRUSRND_INPUT_GAIN */ #define STV82x8_TRUSRND_INPUT_GAIN 0x05 // -2.5 dB /* TRUSRND_DC_ELEVATION */ #define STV82x8_TRUSRND_DC_ELEVATION 0x00 // 0 dB /* AV_DELAY_CONFIG */ #define STV82X8_AV_DELAY_ON_MASK 0x01 #define STV82X8_DOLBY_DELAY_ON_MASK 0x02 /* IRQ_CTRL */ #define STV82X8_IRQ0_WAKEUP_MASK 0x08 /* DAC_CTRL */ #define STV82X8_DAC_MUTE_MASK 0x1E #define STV82x8_MUX_MASK 0x20 /* VOLUME_MODES */ #define STV82X8_VOLUMEMODE_MASK 0x07 #define STV82X8_SCART_VOLUMEMODE_MASK 0x08 /* VOLUME Control */ #define STV82X8_VOLUMEMMSB_MASK 0xFF #define STV82X8_VOLUMEMLSB_MASK 0x03 /* DSP_STATUS */ #define STV82X8_INIT_MEM_MASK 0x01 /* AUTOSTD_TIMERS */ #define STV82X8_FM_TIME_MASK 0x03 #define STV82X8_STEREO_TIME_MASK 0x1C /* SVC_LS_CONTROL */ #define STV82X8_SVCON_MASK 0x01 /* DYNAMIC_BASS_LS */ #define STV82X8_STDYNAMIC_BASS_MASK 0x01 #define STV82X8_BASS_FREQ_MASK 0x06 /* AV_DELAY */ #define STV82x8_AV_DELAY_ON 0x01 #define STV82x8_AV_DELAY_OFF 0x00 #define STV82x8_Dolby_DELAY_ON 0x02 #define STV82x8_Dolby_DELAY_OFF 0x00 #define STV82x8_DolbyOn_MAX_VALUE 100 #define STV82x8_DolbyOff_MAX_VALUE 177 #define STV82X8_DolbyDelay_On 0x02 #define STV82X8_DolbyDelay_Off 0x00 /* AUTOSTD_STANDARD_DETECT */ #define STV82X8_STANDARD_DETECT_MASK 0x0F #define STV82X8_SOUNDMONO_ALL_CHECK SCART_PRESCALING_DEFAULTVALU 0x0F /* AUTOSTD_STEREO_DETECT */ #define STV82X8_AUTOSTD_ALL_CHECK 0x07 #define STV82X8_AUTOSTD_STEREO_CHECK 0x03 #define STV82X8_AUTOSTD_MONO_CHECK 0x01 /* AUTOSTD_STATUS */ #define STV82X8_AUTOSTD_STATUS_MASK 0x0E /* AUTOSTD_DEM_STATUS */ #define STV82X8_AUTOSTD_DEM_STATUS_MASK 0x3C /* HOST_CMD */ #define STV82X8_HWINITDSP_MASK 0x04 /* DSP_RUN */ #define STV82X8_INITDSPHOSTRUN_MASK 0x01 /* I2S_CONFIG*/ #define STV82X8_I2S_CONFIG_MASK 0x0F /* AGC_CTRL */ #define STV82X8_AGC_CMD_MASK 0x80 #define STV82X8_AGC_VALUE_MASK 0x7C /* OUTPUT_BASS_MNGT */ #define OUTPUT_BASS_MNGT_MASK 0xFF /* PRESCALE_MONO */ #define PRESCALE_MONO_MASK 0x7F /* TRUSRND_CONTROL */ #define STV82X8_PSEUDO_MASK 0x01 #define STV82X8_SRS_MASK 0x09 /* LS_LOUDNESS */ #define LS_LOUDNESS_MASK 0x0F /* SVC_LS_TIME_TH */ #define SVC_LS_TIME_TH_MASK 0x1F /* AUDIO_MATRIX1_INPUT */ #define STV82X8_MATRIX1_INPUT_MASK 0x07 #define STV82X8_MATRIX3_INPUT_MASK 0x38 /* SCART1_2_OUTPUT_CTRL */ #define STV82X8_SCARTOUT_SC2OUT_MASK 0x70 /* CHANNEL_MATRIX_LS */ #define CM_MATRIX_LS_MASK 0x07 #define AUTOSTD_CTRL_LS_MASK 0x80 /* CHANNEL_MATRIX_SPDIF */ #define STV82x8_CMMATRIX_SPDIF_MASK 0x07 /* AUTOSTD_CTRL */ #define STV82X8_AUTOSTD_CHECK_MASK 0x07 #define STV82X8_BEEPER_PULSE_MASK 0x04 #define STV82X8_BEEPEROUT_LS_MASK 0x03 /* BEEPER_FREQ_VOL */ #define BEEPER_FREQ_MASK 0xE0 /* BEEPER_ON */ #define BEEPER_ON_MASK 0x01 /* Treble/Equalize_CONTROL --Josie 8/21*/ #define STV82X8_EQUALIZE_MASK 0x07 //******************************************************* // Definition //******************************************************* /* Sound system */ #define BG_SYSTEM 0 #define DK_SYSTEM 1 #define I_SYSTEM 2 #define L_SYSTEM 3 #define M_SYSTEM 4 /* Sound mode */ #define MONO 0x00 #define STEREO 0x01 #define SAP 0x02 #define SAP_STEREO 0x03 #define NOTFOUND_SOUND 0x04 #define MONO_CHECK 0x01 #define STEREO_CHECK 0x02 #define SAP_CHECK 0x04 /* Option for extra effect */ #define STV82X8_TURBO_SOUND_ON 0x01 #define STV82X8_TURBO_SOUND_OFF 0x00 #define STV82X8_AUTO_VOLUME_ON 0x01 #define STV82X8_AUTO_VOLUME_OFF 0x00 #define STV82X8_NCSLOW_MODE 0x01 #define STV82X8_NCFAST_MODE 0x00 #define STV82X8_INPUT_AV1 0x01 #define STV82X8_INPUT_AV2 0x02 #define STV82X8_INPUT_AV3 0x03 #define STV82X8_INPUT_AV4 0x04 #define STV82x8_SVC_ON 0x01 #define STV82x8_SVC_OFF 0x00 /* Error value */ #define STV82X8_I2C_ERROR 0x01 #define STV82X8_INVALID_PARAM 0x02 #define STV82X8_UPDATE_ERROR 0x04 #define STV82X8_RESOURCE_ERROR 0x08 #define STV82X8_NO_ERROR 0x00 /* VOLUME Control*/ #define VOLUME_0DB_DEFAULT_VALUE 928 #define STV82X8_LS_BALANCE_CENTER 0x0000 /* Signal state */ #define STV82X8_SOUNDSIGNAL_UNLOCKED 0x00 #define STV82X8_SOUNDSIGNAL_LOCKED 0x01 /* VOLUME_MODES */ #define INDEPENDANT_MODE 0x01 #define DIFFERENTIAL_MODE 0x02 /* Volume_Control */ #define MASTER_VOLUME_SHIFT 0x08 #define NORMAL_VOLUME_SHIFT 0x02 #define NORMAL_BALANCE_SHIFT 0x02 /* AUTOSTD_TIMERS */ #define FM_TIME_16MS 0x00 #define FM_TIME_32MS 0x01 #define FM_TIME_48MS 0x02 #define FM_TIME_64MS 0x03 /* Balance */ #define DEFAULT_LSB_BALANCE_VALUE 0x00 /* LS_EQ_BAND */ #define EQUALIZER_100HZ 0x00 #define EQUALIZER_330HZ 0x01 #define EQUALIZER_1KHZ 0x02 #define EQUALIZER_3P3KHZ 0x03 #define EQUALIZER_10KHZ 0x04 /* SW_RESET */ #define STV82X8_SOFT_RESET 0x01 #define STV82X8_I2S_INPUT 0x00 //#define STV82X8_I2S_OUTPUT 0x60 #define STV82X8_I2S_OUTPUT 0x00 /* TRUSRND_CONTROL */ #define STV82X8_PSEUDO_ON 0x01 #define STV82X8_PSEUDO_OFF 0x00 #define STV82X8_SRS_ON 0x09 #define STV82X8_ALL_SRS_OFF 0x00 #define STV82x8_SRS_WOW_ON 0x01 #define STV82x8_SRS_WOW_OFF 0x00 #define STV82x8_SRS_TRX_ON 0x01 #define STV82x8_SRS_TRX_OFF 0x00 #define STV82x8_DOLBY_PRO1_ON 0x01 #define STV82x8_DOLBY_PRO1_OFF 0x00 #define STV82x8_SRS_MONO_LEFT 0x01 #define STV82x8_SRS_MONO_DCLARITY 0x02 #define STV82x8_SRS_LR_STEREO 0x03 #define STV82x8_SRS_LR_STEREO_DCLARITY 0x04 #define STV82x8_SRS_LSR 0x05 #define STV82x8_SRS_LSR_DCLARITY 0x06 #define STV82x8_SRS_LRLsRs 0x07 #define STV82x8_SRS_LRLsRs_DCLARITY 0x08 #define STV82x8_SRS_LRC 0x09 #define STV82x8_SRS_LRC_DCLARITY 0x0A #define STV82x8_SRS_LRCS 0x0B #define STV82x8_SRS_LRCS_DCLARITY 0x0C #define STV82x8_SRS_LRCLsRs 0x0D #define STV82x8_SRS_LRCLsRs_DCLARITY 0x0E #define STV82x8_SRS_LtRt 0x0F #define STV82x8_SRS_LtRt_DCLARITY 0x10 #define STV82x8_SRS_LRCLsRs_SRS 0x11 #define STV82x8_SRS_LRCLsRs_SRS_DCLARITY 0x12 #define STV82x8_SRS_LRCLsRs_TRX 0x13 #define STV82x8_SRS_LRCLsRs_TRX_DCLARITY 0x14 #define STV82x8_TRUSURROUND_ON 0x01 #define STV82x8_TRUSURROUND_OFF 0x00 #define STV82x8_DIALOG_CLARITY_ON 0x80 #define STV82x8_DIALOG_CLARITY_OFF 0x00 #define STV82x8_HP_MODE_ON 0x40 #define STV82x8_HP_MODE_OFF 0x00 #define STV82x8_TRUSRND_MONO_CENTER 0x00 #define TRUSRND_BYPASS 0x02 #define STV82x8_TRUSRND_MONO_LEFT 0x04 #define STV82x8_TRUSRND_LR_STEREO 0x08 #define STV82x8_TRUSRND_LSR 0x0C #define STV82x8_TRUSRND_LSLsRs 0x10 #define STV82x8_TRUSRND_LRC 0x14 #define STV82x8_TRUSRND_LRCS 0x18 #define STV82x8_TRUSRND_LRCLsRs_XT 0x1C #define STV82x8_TRUSRND_LtRt 0x20 #define STV82x8_TRUSRND_LRCLsRs_SRS 0x24 #define STV82x8_TRUSRND_LRCLsRs_XTPRO2 0x28 /* TRUBASS_LS_CONTROL */ #define STV82x8_TRUBASS_ON 0x01 #define STV82x8_TRUBASS_OFF 0x00 #define STV82x8_TRUBASS_LF_RESPOSE_40KHZ 0x00 #define STV82x8_TRUBASS_LF_RESPOSE_60KHZ 0x02 #define STV82x8_TRUBASS_LF_RESPOSE_100KHZ 0x04 #define STV82x8_TRUBASS_LF_RESPOSE_150KHZ 0x06 #define STV82x8_TRUBASS_LF_RESPOSE_200KHZ 0x08 #define STV82x8_TRUBASS_LF_RESPOSE_250KHZ 0x0A #define STV82x8_TRUBASS_LF_RESPOSE_300KHZ 0x0C #define STV82x8_TRUBASS_LF_RESPOSE_400KHZ 0x0E #define STV82x8_TRUBASS_LS_LEVEL 0x00 #define STV82x8_SRS_TRUBASS_OFF 0x00 #define STV82x8_SRS_TRUBASS_SMALL 0x01 #define STV82x8_SRS_TRUBASS_MEDIUM 0x02 #define STV82x8_SRS_TRUBASS_LARGE 0x03 /* ST_DYNAMIC_BASS */ #define STV82x8_ST_DYNAMIC_BASS_ON 0x01 #define STV82x8_ST_DYNAMIC_BASS_OFF 0x00 #define STV82x8_100HZ_CUT_OFF 0x00 #define STV82x8_150HZ_CUT_OFF 0x02 #define STV82x8_200HZ_CUT_OFF 0x04 #define STV82x8_BASS_LEVEL 0x1F /* SVC_LS_CONTROL */ #define STV82X8_AUTOSVC_ON 0x01 #define STV82X8_AUTOSVC_OFF 0x00 /* MUTE_DIGITAL */ #define STV82X8_DIGITAL_UNMUTE_VALUE 0x00 #define STV82X8_DIGITAL_MUTE_VALUE 0x8F #define STV82X8_DIGITAL_LS_MUTE 0x01 #define STV82X8_DIGITAL_LS_UNMUTE 0x00 #define STV82X8_DIGITAL_SCART1_MUTE 0x10 #define STV82X8_DIGITAL_SCART1_UNMUTE 0x00 #define STV82X8_DIGITAL_SPDIF_MUTE 0x40 #define STV82X8_DIGITAL_SPDIF_UNMUTE 0x00 #define STV82x8_MUTEDIG_SUBWOOFER_MUTE 0x04 #define STV82x8_MUTEDIG_SUBWOOFER_UNMUTE 0x00 #define STV82x8_DIGITAL_HP_MUTE 0x80 #define STV82x8_DIGITAL_HP_UMMUTE 0x00 #define STV82x8_MUTE_ALL_OUTPUT 0xff #define STV82x8_UNMUTE_ALL_OUTPUT 0x00 #define STV82x8_ALL_OUTPUT_MASK 0xff /* DAC_CONTROL */ #define STV82X8_SC_DAC_MUTE_MASK 0x10 #define STV82X8_SC_DAC_MUTE_VALUE 0x10 #define STV82X8_SC_DAC_UNMUTE_VALUE 0x00 #define STV82x8_DAC_SUBWOOFER_MUTE 0x04 #define STV82x8_DAC_SUBWOOFER_UNMUTE 0x00 /* HEADPHONE_CONFIG */ #define STV82x8_HP_FORCE_ON 0x08 #define STV82x8_HP_FORCE_OFF 0x00 #define STV82x8_HP_LS_MUTE 0x04 #define STV82x8_HP_LS_UNMUTE 0x00 #define STV82x8_HP_DET_ACTIVE_ON 0x02 #define STV82x8_HP_DET_ACTIVE_OFF 0x00 #define STV82x8_HP_DETECTED 0x01 #define STV82x8_HP_NOT_DETECTED 0x00 /* CHANNEL_MATRIX_LS */ #define AUTOSTD_CTRL_LS_OFF 0x00 #define AUTOSTD_CTRL_LS_ON 0x80 #define BYPASS 0x00 #define LEFT_ONLY 0x01 #define RIGHT_ONLY 0x02 #define LEFT_RIGHT_MIX 0x03 #define SWAP 0x04 /* DAC_CTRL */ #define Internal_SPDIF 0x00 #define External_SPDIF 0x20 /* SW_RESET */ #define STV82x8_I2S_INOUT_MASK 0x60 /* ADC_CTRL */ #define STV82X8_ADC_WAKEUP_VALUE 0x08 /* ADC_CTRL */ #define STV82X8_IRQ0_WAKEUP_VALUE 0x08 /* DAC_CTRL */ #define STV82X8_DAC_MUTE_VALUE 0x1E #define STV82X8_DAC_UNMUTE_VALUE 0x00 /* VOLUME_MODES */ #define STV82X8_VOLUMEMODE_INDEPENDANT 0x00 #define STV82X8_VOLUMEMODE_DIFFERENTIAL 0x07 #define STV82X8_SCART_VOLUMEMODE_INDEPENDANT 0x00 #define STV82X8_SCART_VOLUMEMODE_DIFFERENTIAL 0x08 /* SCART_Volume */ #define STV82X8_SCART_VOLUME_DEFAULT 0xDE00 #define STV82X8_HEADPHONE_VOLUME_DEFAULT 0x037C /* AUDIO_MATRIX_CONF */ #define STV82X8_SCART_MATRIX_VALUE 0x00 /* PRESCALE_AM & PRESCALE_FM & Nicam & Scart */ #define MONO_PRESCALING_DEFAULTVALU 0x12 #define STEREO_PRESCALING_DEFAULTVALU 0x10 #define FM_PRESCALING_6DB 0x0C #define SAP_PRESCALING_DEFAULTVALU 0x0A #define SCART_PRESCALING_DEFAULTVALU 0x0A #define I2S_PRESCALING_DEFAULTVALU 0x10 /* AUTOSTD_TIMERS */ #define STV82X8_FMAM_TIME_16MS 0x00 #define STV82X8_FMAM_TIME_32MS 0x01 #define STV82X8_FMAM_TIME_48MS 0x02 #define STV82X8_FMAM_TIME_64MS 0x03 /* SVC_LS_TIME_TH */ #define STV82X8_SVC_30MSCONST_0DBGAIN 0x00 #define STV82X8_SVC_30MSCONST_205DBGAIN 0x19 #define STV82X8_SVC_16MSCONST_205DBGAIN 0x99 /* SVC_LS_GAIN */ #define STV82X8_LS_HP_MAKE_UP_GAIN_AUTOON 0x1D #define STV82X8_LS_HP_MAKE_UP_GAIN_AUTOOFF 0x00 /* TRUSRND_INPUT_GAIN */ #define STV82X8_SRSGAIN_VALUE 0x05 /* AUDIO_MATRIX_INPUT */ #define STV82X8_AUDIOINPUT_BTSC_DEM 0x02 #define STV82X8_AUDIOINPUT_I2S 0x04 #define STV82X8_AUDIOINPUT_SCART 0x05 /* BEEPER_ON */ #define STV82X8_BEEPER_ON 0x01 #define STV82X8_BEEPER_OFF 0x00 /* BEEPER_MODE */ #define STV82X8_BEEPER_PULSE 0x00 #define STV82X8_BEEPEROUT_LS 0x01 /* Treble Equalize ON/OFF : CCh ---Josie 8/21*/ #define STV82X8_TREBLE_ON 0x07 #define STV82X8_EQUALIZE_ON 0x01 #if 0 #define MUTE 0x00 #define Delay 0x01 #define DEMOD 0x02 #define LtRt 0x03 #define I2S 0x04 #define SCART 0x05 #endif typedef enum _tagScartType { SCART_INPUT1=STV82X8_INPUT_AV1, //has to been sync with STV82X8_INPUT_AV1 SCART_INPUT2=STV82X8_INPUT_AV2, SCART_INPUT3=STV82X8_INPUT_AV3, SCART_INPUT4=STV82X8_INPUT_AV4 } ScartNo_t; /* ADC_CTRL */ #define STV82X8_SCARTINPUT_SC1 0x00 #define STV82X8_SCARTINPUT_SC2 0x01 #define STV82X8_SCARTINPUT_SC3 0x02 #define STV82X8_SCARTINPUT_SC4 0x03 #define STV82X8_SCARTOUT_CTRL_RF 0x88 #define STV82X8_ADCINPUT_MONO 0x04 /* SCART1_2_OUTPUT_CTRL */ #define SCARTOUT_SC1OUT_SC1_DSP 0x02 #define SCARTOUT_SC1OUT_SC2_DSP 0x03 #define SCARTOUT_SC1OUT_SC3_DSP 0x04 #define SCARTOUT_SC1OUT_SC4_DSP 0x05 #define SCARTOUT_SC2OUT_SC1_DSP 0x20 #define SCARTOUT_SC2OUT_SC2_DSP 0x30 #define SCARTOUT_SC2OUT_SC3_DSP 0x40 #define SCARTOUT_SC2OUT_SC4_DSP 0x50 /* AUDIO_MATRIX_LANG */ #define STV82X8_LANG_SEL_STEREO 0x00 #define STV82X8_LANG_SEL_CH_A 0x15 #define STV82X8_LANG_SEL_CH_B 0x2A #define STV82X8_LANG_SEL_CH_C 0x3F /* NOISE_GENERATOR */ #define STV82x8_NOISE_GENERATIONB_ON 0x01 #define STV82x8_NOISE_GENERATIONB_OFF 0x00 #define STV82x8_SRIGHT_NOISE_ON 0x40 #define STV82x8_SLEFT_NOISE_ON 0x20 #define STV82x8_SUB_NOISE_ON 0x10 #define STV82x8_CENTER_NOISE_ON 0x08 #define STV82x8_RIGHT_NOISE_ON 0x04 #define STV82x8_LEFT_NOISE_ON 0x02 #define STV82x8_OUTPUT_FULLRANGE 0x00 #define STV82x8_OUTPUT_10_DB 0x80 /* Coefficient filter */ #define SOUND_STAT_MONO 0x01 #define SOUND_STAT_STEREO 0x02 #define SOUND_STAT_DUAL 0x04 #define SET_50KHZ_MODE 0x00 #define SET_200KHZ_MODE 0x01 /* DEMOD_STAT */ #define STV82X8_LCK_DET 0x20 #define STV82X8_ST_DET 0x10 #define STV82X8_SAP_SQ 0x08 #define STV82X8_SAP_DET 0x04 #define STV82X8_FM1_CAR 0x02 #define STV82X8_FM1_SQ 0x01 /* AUTOSTD_STATUS */ #define STV82X8_SAP_OK 0x08 #define STV82X8_STEREO_OK 0x04 #define STV82X8_MONO_OK 0x02 /* AUTOSTD_CTRL */ #define STV82X8_AUTOSTD_LSELECTION 0x01 #define STV82X8_AUTOSTD_50KHZ 0x00 #define STV82X8_AUTOSTD_200KHZ 0x02 #define STV82X8_AUTOSTD_350KHZ 0x04 #define STV82X8_AUTOSTD_500KHZ 0x06 /* OUTPUT_BASS_MNGT */ #define STV82x8_BASSMNGT_ON 0x80 #define STV82x8_BASSMNGT_OFF 0x00 #define STV82x8_SUBWOOFER_ON 0x10 #define STV82x8_SUBWOOFER_OFF 0x00 #define STV82x8_GAINSW_ON 0x08 #define STV82x8_GAINSW_OFF 0x00 #define STV82x8_STLFEAdd_ON 0x40 #define STV82x8_STLFEAdd_OFF 0x00 #define STV82x8_DolbyPro_ON 0x20 #define STV82x8_DolbyPro_OFF 0x00 #define ST_LFE_ADD_ 0x40 #define DOLBY_PROLOGIC 0x20 #define STV82x8_BASSCONFI_0 0x00 #define STV82x8_BASSCONFI_1 0x01 #define STV82x8_BASSCONFI_2 0x02 #define STV82x8_BASSCONFI_3 0x03 #define STV82x8_BASSCONFI_4 0x04 #define STV82x8_BASSCONFI_5 0x05 #define STV82x8_BASSCONFI_6 0x06 /* LS_LOUDNESS */ #define STV82X8_LOUNDNESS_ENABLE 0x01 #define STV82X8_LOUNDNESS_DISABLE 0x00 /* AGC_CTRL */ #define STV82X8_AGC_CMD_MANUAL 0x80 #define STV82X8_AGC_CMD_AUTO 0x00 /* HOST_CMD */ #define STV82X8_HWINITDSP_VALUE 0x04 /* DSP_RUN */ #define STV82X8_INITDSPHOSTRUN_VALUE 0x01 #define AUTOSTD_CTRL_AUTO_MUTE_ON 0x08 #define AUTOSTD_CTRL_AUTO_MUTE_OFF 0x00 #define AUTOSTD_CTRL_AUTO_MUTE_MASK 0x08 /******************** For the coefficients *****************************/ #define AUTOSTD_COEFF_INIT_TABLE 0x01 #define AUTOSTD_COEFF_UPDATE_TABLE 0x02 #define AUTOSTD_COEFF_ENTER_VALUE 0x00 #define FIRC0_200KHZ_VALUE 0x00 #define FIRC1_200KHZ_VALUE 0x01 #define FIRC2_200KHZ_VALUE 0x01 #define FIRC3_200KHZ_VALUE 0xFC #define FIRC4_200KHZ_VALUE 0x08 #define FIRC5_200KHZ_VALUE 0xF6 #define FIRC6_200KHZ_VALUE 0xF8 #define FIRC7_200KHZ_VALUE 0x4A #define FIRC0_50KHZ_VALUE 0x00 #define FIRC1_50KHZ_VALUE 0xFE #define FIRC2_50KHZ_VALUE 0xFC #define FIRC3_50KHZ_VALUE 0xFD #define FIRC4_50KHZ_VALUE 0x02 #define FIRC5_50KHZ_VALUE 0x0D #define FIRC6_50KHZ_VALUE 0x18 #define FIRC7_50KHZ_VALUE 0x1F #define FIRC0_27KHZ_VALUE 0xFF #define FIRC1_27KHZ_VALUE 0xFE #define FIRC2_27KHZ_VALUE 0xFE #define FIRC3_27KHZ_VALUE 0x00 #define FIRC4_27KHZ_VALUE 0x06 #define FIRC5_27KHZ_VALUE 0x0E #define FIRC6_27KHZ_VALUE 0x16 #define FIRC7_27KHZ_VALUE 0x1B #define FM_ACOEFF_VALUE 0x2C #define FM_BCOEFF_VALUE 0x0A #define FM_ACOEFF_RESET_VALUE 0x10 #define FM_BCOEFF_RESET_VALUE 0x11 #define MN_FM_MONO_FIR1C0_INDEX 6 #define MN_FM_MONO_FIR1C1_INDEX 7 #define MN_FM_MONO_FIR1C2_INDEX 8 #define MN_FM_MONO_FIR1C3_INDEX 9 #define MN_FM_MONO_FIR1C4_INDEX 10 #define MN_FM_MONO_FIR1C5_INDEX 11 #define MN_FM_MONO_FIR1C6_INDEX 12 #define MN_FM_MONO_FIR1C7_INDEX 13 #define MN_FM_MONO_ACOEFF1_INDEX 14 #define MN_FM_MONO_BCOEFF1_INDEX 15 #define BG_FM_MONO_FIR1C0_INDEX 21 #define BG_FM_MONO_FIR1C1_INDEX 22 #define BG_FM_MONO_FIR1C2_INDEX 23 #define BG_FM_MONO_FIR1C3_INDEX 24 #define BG_FM_MONO_FIR1C4_INDEX 25 #define BG_FM_MONO_FIR1C5_INDEX 26 #define BG_FM_MONO_FIR1C6_INDEX 27 #define BG_FM_MONO_FIR1C7_INDEX 28 #define BG_FM_MONO_ACOEFF1_INDEX 29 #define BG_FM_MONO_BCOEFF1_INDEX 30 #define I_FM_MONO_FIR1C0_INDEX 36 #define I_FM_MONO_FIR1C1_INDEX 37 #define I_FM_MONO_FIR1C2_INDEX 38 #define I_FM_MONO_FIR1C3_INDEX 39 #define I_FM_MONO_FIR1C4_INDEX 40 #define I_FM_MONO_FIR1C5_INDEX 41 #define I_FM_MONO_FIR1C6_INDEX 42 #define I_FM_MONO_FIR1C7_INDEX 43 #define I_FM_MONO_ACOEFF1_INDEX 44 #define I_FM_MONO_BCOEFF1_INDEX 45 #define STEREO_TIME_20MS (0x00 << 2) #define STEREO_TIME_40MS (0x01 << 2) #define STEREO_TIME_100MS (0x02 << 2) #define STEREO_TIME_200MS (0x03 << 2) #define STEREO_TIME_400MS (0x04 << 2) #define STEREO_TIME_800MS (0x05 << 2) #define STEREO_TIME_1200MS (0x06 << 2) #define STEREO_TIME_1600MS (0x07 << 2) // define for ST WIDE SURROUND #define ST_WIDE_SURROUND_OFF_MODE 0 #define ST_WIDE_SURROUND_MONO_MODE 1 #define ST_WIDE_SURROUND_STEREO_MODE 2 #define ST_WIDE_SURROUND_MOVIE_MODE 3 #define ST_WIDE_SURROUND_MUSIC_MODE 4 #define ST_SURROUND_STEREO 0x04 #define ST_SURROUND_MUSIC 0x02 #define ST_SURROUND_ON 0x01 #define ST_SURROUND_MONO 0x00 #define ST_SURROUND_MOVIE 0x00 #define ST_SURROUND_OFF 0x00 #define ST_SURROUND_MONO_STEREO_MASK 0x04 #define ST_SURROUND_MOVIE_MUSIC_MASK 0x02 #define ST_SURROUND_ON_OFF_MASK 0x01 /********************************************************************************** * Function Prototype *********************************************************************************/ unsigned char STV82x8_SwReset(void); unsigned char STV82x8_UpdatePatchData( void ); unsigned char STV82x8_VerifiedPatchData( void ); unsigned char STV82x8_InitDSP( void ); unsigned char STV82x8_InitRegister( void ); unsigned char STV82x8_SetDefaultValueFromSTDConfig ( void ); unsigned char STV82x8_SetDACMute( void ); unsigned char STV82x8_SetDACUnMute( void ); unsigned char STV82x8_SetScart1DigitalMute( void ); unsigned char STV82x8_SetScart1DigitalUnMute( void ); unsigned char STV82x8_SetSPDIFDigitalMute( void ); unsigned char STV82x8_SetSPDIFDigitalUnMute( void ); unsigned char STV82x8_SetSPDIFMute(void); unsigned char STV82x8_SetSPDIFUnMute(void); unsigned char STV82x8_SetI2SInOut( unsigned char ucI2S_InOut ); unsigned char STV82x8_SetI2SOutputSignal( unsigned char ucI2S_Output ); unsigned char STV82x8_SetVolumeMode( unsigned char usVolumeMode ); unsigned char STV82x8_SetLeftVolume( unsigned short usVolume ); unsigned char STV82x8_SetRightVolume( unsigned short usVolume ); unsigned char STV82x8_SetCenterVolume( unsigned short usVolume ); unsigned char STV82x8_SetMasterVolume( unsigned short usVolume ); unsigned char STV82x8_SetSurroundLeftVolume( unsigned short usVolume ); unsigned char STV82x8_SetSurroundRightVolume( unsigned short usVolume ); unsigned char STV82x8_SetLeftScartVolume( unsigned short usVolume ); unsigned char STV82x8_SetRightScartVolume( unsigned short usVolume ); unsigned char STV82x8_WakeUpADC( void ); unsigned char STV82x8_WakeUpIRQ0( void ); unsigned char STV82x8_SetFMTimeOut( unsigned char ucTimeOut ); unsigned char STV82x8_SetLSBalance(unsigned char ucBalance); unsigned char STV82x8_SetEqualizerValue( unsigned char ucEqualizerIndex, unsigned char ucEQBandIndex ); unsigned char STV82x8_SetLoudSpkHeadPhoneGain(unsigned char ucType, unsigned char ucGain); unsigned char STV82x8_SetPseudoEffect( unsigned char ucPseudo ); unsigned char STV82x8_ControlTurboSound( unsigned char ucTurbo, unsigned char ucLoudnessIndex ); unsigned char STV82x8_AutoVolumeCtrl( unsigned char SvcSel ); unsigned char STV82x8_RefreshSTV( void ); unsigned char STV82x8_CheckElectricalShock( void ); unsigned char STV82x8_SetScartDefaultPrescale( void ); unsigned char STV82x8_SetMonoStereoDefaultPrescale( void ); unsigned char STV82x8_SAPDefaultPrescale( void ); unsigned char STV82x8_I2SDefaultPrescale(unsigned char ucI2SPort, unsigned char ucPreScaleVal); unsigned char STV82x8_GetSoundSignalState( unsigned char * pucSignalState ); unsigned char STV82x8_All_SoundSystem_Check( void ); unsigned char STV82x8_SetValueForSPDIF( void ); unsigned char STV82x8_BeeperAmbulanceSound( void ); unsigned char STV82x8_GetSoundSystem(unsigned char * pucSoundSystem, BOOL bDetectFM); unsigned char STV82x8_GetSoundSystem_Independ(unsigned char * pucSoundSystem, BOOL bDetectFM); unsigned char STV82x8_ChangeMTS_Manual (unsigned char ucMTS); unsigned char STV82x8_SetStereoTimeOut( unsigned char ucTimeOut ); unsigned char STV82x8_SetScartDACMute( void ); unsigned char STV82x8_SetScartDACUnMute( void ); unsigned char STV82x8_SetLeftScartVolume( unsigned short usVolume ); unsigned char STV82x8_SetRightScartVolume( unsigned short usVolume ); unsigned char STV82x8_ScartOutBalance( unsigned char ucBalance ); unsigned char STV82x8_SetSRS_InputMode( unsigned char ucSRS_InputMode ); unsigned char STV82x8_SetSRSWOW_Effect( unsigned char ucSRSWOW ); unsigned char STV82x8_SetOutput_RFConfig(void); unsigned char STV82x8_SetSRSTRS_DolbyPro1_Effect( unsigned char ucSRS_TruSurround, unsigned char ucDolby_ProLogic1 ); unsigned char STV82x8_SetAutoMuteOnOff(unsigned char ucOnOff); unsigned char STV82x8_Initialize(unsigned char i2c_num,unsigned char ucSlaveAddr); unsigned char STV82x8_SetMuteAll(BOOL bMute); unsigned char STV82x8_SetLoudSpkHeadPhoneGain(unsigned char ucType, unsigned char ucGain); unsigned char STV82x8_ReturnToStereoFromMono(void); unsigned char STV82x8_SAPConfig(unsigned char bSAP); unsigned char STV82x8_SetSoundSystem(unsigned char ucSound); unsigned char STV82x8_AutoVolumeHPCtrl(unsigned char ucSvcSel); unsigned char STV82x8_SetHPLeftVolume(unsigned short usVolume); unsigned char STV82x8_SetHPBalance(unsigned char ucBalance); unsigned char STV82x8_SetHPConfiguration(unsigned char ucHP_Force, unsigned char ucLS_Mute, unsigned char ucHP_Active); unsigned char STV82x8_WideSurroundMode(unsigned char ucWideSRSMode); unsigned char STV82x8_SetSRS_TRUBASS(unsigned char ucTrubassType, unsigned char ucSRS_TruBass); unsigned char STV82x8_SRSTruBaseLoudspeakerHeadphoneLevel(unsigned char ucTrubassType, unsigned char ucLevel); unsigned char STV82x8_DialogClarityLevel(unsigned char ucLevel); unsigned char STV82x8_AudioMatrix_HeadphoneOut (unsigned char ucInput); unsigned char STV82x8_AuxVolSelection(unsigned char ucAuxSel); unsigned char STV82x8_SetLSSubWooferVolume(unsigned short usVolume); unsigned char STV82x8_SetDigitalMute(unsigned char ucMute, unsigned char ucMask); unsigned char STV82x8_SetDigitalUnMute(unsigned char ucUnMute, unsigned char ucMask); unsigned char STV82x8_SetSubWoofer(unsigned char ucSubWoofer, unsigned char ucBassManage, unsigned char ucBassGainSW, unsigned char ucSTLFEAdd, unsigned char ucDolbyPro, unsigned char ucBassConfNum); unsigned char STV82x8_MuteSPDIF(BOOL bMute); unsigned char STV82x8_Enble_Equalizer(unsigned char ucOnOff, unsigned char ucType, unsigned char ucIndex ); unsigned char STV82x8_EXT_OpenDevice(unsigned char ucSubAddr, int I2CMasterNum); unsigned char STV82x8_SetOutput_I2SConfig(void); unsigned char STV82x8_Set_SPDIFOut (unsigned char Input1, unsigned char Input2); unsigned char STV82x8_SetInOutput_ScartConfig(ScartNo_t ScartNo); unsigned char STV82x8_Control_ChannelMatrixLS (unsigned char ucInput ); #endif /******************************************************************************************** * End Of File ********************************************************************************************/