| 1 | /****************************************************************************/ |
|---|
| 2 | /* */ |
|---|
| 3 | /* Copyright (c) 2003 Trident Technologies, Inc. */ |
|---|
| 4 | /* All rights reserved */ |
|---|
| 5 | /* */ |
|---|
| 6 | /* The content of this file or document is CONFIDENTIAL and PROPRIETARY */ |
|---|
| 7 | /* to Trident Microsystems, Inc. It is subject to the terms of a */ |
|---|
| 8 | /* License Agreement between Licensee and Trident Technologies, Inc. */ |
|---|
| 9 | /* restricting among other things, the use, reproduction, distribution */ |
|---|
| 10 | /* and transfer. Each of the embodiments, including this information and */ |
|---|
| 11 | /* any derivative work shall retain this copyright notice */ |
|---|
| 12 | /* */ |
|---|
| 13 | /****************************************************************************/ |
|---|
| 14 | /****************************************************************************** |
|---|
| 15 | COPYRIGHT (C) ISD ST 2005. |
|---|
| 16 | |
|---|
| 17 | -. File name STV82X8.h |
|---|
| 18 | -. Creation date 06/May/2005 |
|---|
| 19 | -. Author Name MS Song ( e.g.: ST-Korea ) |
|---|
| 20 | -. History |
|---|
| 21 | Version 1.0.0 : 18/May/2005 |
|---|
| 22 | Version 1.0.1 : 10/Jun/2005 |
|---|
| 23 | -. Description |
|---|
| 24 | This file contains the definition of the registers and masks for STV82x8. |
|---|
| 25 | *******************************************************************************/ |
|---|
| 26 | ////////////////////////////////////////////////////////////////////////////////////// |
|---|
| 27 | // |
|---|
| 28 | // $Log: stv82x8.h,v $ |
|---|
| 29 | // Revision 1.1 2011/07/08 03:43:26 megakiss |
|---|
| 30 | // *** empty log message *** |
|---|
| 31 | // |
|---|
| 32 | // Revision 1.1.1.1 2009/01/09 03:18:18 hwatk |
|---|
| 33 | // DSTHAL Base Skeleton, which is imported at 2009.01.09. |
|---|
| 34 | // |
|---|
| 35 | // Revision 1.1.1.1 2008/01/08 23:40:21 jhkoh |
|---|
| 36 | // first release |
|---|
| 37 | // |
|---|
| 38 | // Revision 1.1 2007/02/23 13:42:56 hwatk |
|---|
| 39 | // H0_10 |
|---|
| 40 | // |
|---|
| 41 | // Revision 1.25 2006/09/28 20:08:42 teresa |
|---|
| 42 | // *** empty log message *** |
|---|
| 43 | // |
|---|
| 44 | // Revision 1.24 2006/09/27 05:16:22 blance |
|---|
| 45 | // Update init interface |
|---|
| 46 | // |
|---|
| 47 | // Revision 1.23 2006/09/13 23:45:15 teresa |
|---|
| 48 | // add i2c_num parameter |
|---|
| 49 | // |
|---|
| 50 | // Revision 1.22 2006/09/13 10:22:06 blance |
|---|
| 51 | // Add ext func. |
|---|
| 52 | // |
|---|
| 53 | // Revision 1.21 2006/09/08 09:16:33 blance |
|---|
| 54 | // Add audio path switch. |
|---|
| 55 | // |
|---|
| 56 | // Revision 1.20 2006/09/07 03:58:12 blance |
|---|
| 57 | // Update from Wistron. |
|---|
| 58 | // |
|---|
| 59 | // Revision 1.19 2006/09/05 00:59:14 blance |
|---|
| 60 | // Update from Wistron. |
|---|
| 61 | // |
|---|
| 62 | // Revision 1.18 2006/09/01 09:56:32 blance |
|---|
| 63 | // update for func declaration. |
|---|
| 64 | // |
|---|
| 65 | // Revision 1.17 2006/09/01 09:48:21 blance |
|---|
| 66 | // Add for extend routines. |
|---|
| 67 | // |
|---|
| 68 | // Revision 1.16 2006/08/01 22:16:33 simon |
|---|
| 69 | // change mute function |
|---|
| 70 | // |
|---|
| 71 | // Revision 1.15 2006/07/29 02:28:59 simon |
|---|
| 72 | // change default headphone setting; otherwise cannot hear |
|---|
| 73 | // |
|---|
| 74 | // Revision 1.14 2006/07/28 23:47:48 simon |
|---|
| 75 | // fix headphone problem, add subwoofer, and av selection |
|---|
| 76 | // |
|---|
| 77 | // Revision 1.13 2006/07/18 02:54:26 teresa |
|---|
| 78 | // *** empty log message *** |
|---|
| 79 | // |
|---|
| 80 | // Revision 1.12 2006/07/17 09:08:42 simon |
|---|
| 81 | // 1. add dialog, trubass level for LS and Headphone |
|---|
| 82 | // 2. support turbass on headphone |
|---|
| 83 | // |
|---|
| 84 | // Revision 1.11 2006/07/17 08:13:42 simon |
|---|
| 85 | // 1. add headphone control prototype |
|---|
| 86 | // 2. enable Smart Vol. control for Loudspeaker and Headphone |
|---|
| 87 | // 3. add ST Wide Surround Mode prototype |
|---|
| 88 | // |
|---|
| 89 | // Revision 1.10 2006/07/13 08:43:05 simon |
|---|
| 90 | // change prescale setting for each input |
|---|
| 91 | // |
|---|
| 92 | // Revision 1.9 2006/07/13 00:09:48 teresa |
|---|
| 93 | // *** empty log message *** |
|---|
| 94 | // |
|---|
| 95 | // Revision 1.8 2006/07/04 02:36:05 simon |
|---|
| 96 | // add I2S prescale for each I2S input |
|---|
| 97 | // |
|---|
| 98 | // Revision 1.7 2006/07/03 23:52:39 simon |
|---|
| 99 | // set I2S prescale equal to analog gain |
|---|
| 100 | // |
|---|
| 101 | // Revision 1.6 2006/07/03 20:50:34 simon |
|---|
| 102 | // fix multi-defination problem |
|---|
| 103 | // |
|---|
| 104 | // Revision 1.5 2006/07/03 17:56:29 simon |
|---|
| 105 | // add balance table |
|---|
| 106 | // |
|---|
| 107 | // Revision 1.4 2006/06/23 23:37:12 simon |
|---|
| 108 | // 1. add auto mute if no signal |
|---|
| 109 | // 2. add mute all fucntion |
|---|
| 110 | // 3. add bass and treble gain on Loud Speaker |
|---|
| 111 | // |
|---|
| 112 | // Revision 1.3 2006/06/21 22:42:04 simon |
|---|
| 113 | // make code readable and following our coding convention |
|---|
| 114 | // |
|---|
| 115 | // |
|---|
| 116 | ////////////////////////////////////////////////////////////////////////////////////// |
|---|
| 117 | |
|---|
| 118 | |
|---|
| 119 | #if !defined(__STV82x8_H__) |
|---|
| 120 | #define __STV82x8_H__ |
|---|
| 121 | |
|---|
| 122 | //******************************************************* |
|---|
| 123 | // Register Mask Define |
|---|
| 124 | //******************************************************* |
|---|
| 125 | /* Volume_Control */ |
|---|
| 126 | #define VOLUME_MSB_MASK 0x00FF |
|---|
| 127 | #define VOLUME_LSB_MASK 0x0003 |
|---|
| 128 | #define BALANCE_MSB_MASK 0x00FF |
|---|
| 129 | #define BALANCE_LSB_MASK 0x0003 |
|---|
| 130 | |
|---|
| 131 | /* SW_RESET */ |
|---|
| 132 | //#define STV82X8_SOFT_RESETALL_MASK 0x01 |
|---|
| 133 | #define STV82X8_SOFT_RESETALL_MASK 0x61 // I2S data pin is Input port for Artoo |
|---|
| 134 | |
|---|
| 135 | /* IRQ_STAT */ |
|---|
| 136 | #define STV82X8_IRQ0_MASK 0x01 |
|---|
| 137 | #define STV82X8_IRQ3_MASK 0x08 |
|---|
| 138 | |
|---|
| 139 | /* MUTE_DIGITAL */ |
|---|
| 140 | #define STV82X8_DIGITAL_MUTE_MASK 0x8F |
|---|
| 141 | #define STV82X8_DIGITALMUTE_SCART1_MASK 0x10 |
|---|
| 142 | #define STV82X8_DIGITALMUTE_SCART2_MASK 0x20 |
|---|
| 143 | #define STV82X8_DIGITALMUTE_SPDIF_MASK 0x40 |
|---|
| 144 | #define STV82x8_DIGITAL_AUTOSTD_MUTE_MASK 0x80 |
|---|
| 145 | #define STV82x8_MUTEDIG_SUBWOOFER_MASK 0x04 |
|---|
| 146 | #define STV82x8_DAC_SUBWOOFER_MASK 0x04 |
|---|
| 147 | |
|---|
| 148 | /* HEADPHONE_CONFIG */ |
|---|
| 149 | #define STV82X8_HP_CONFIG_MASK 0x0E |
|---|
| 150 | #define STV82X8_HP_DETECTED_MASK 0x01 |
|---|
| 151 | |
|---|
| 152 | /* ADC_CTRL */ |
|---|
| 153 | #define STV82X8_ADC_WAKEUP_MASK 0x08 |
|---|
| 154 | #define STV82x8_I2S_DATA0_CTRL_MASK 0xE0 |
|---|
| 155 | #define STV82X8_I2S_OUTPUT_LR 0x00 |
|---|
| 156 | #define STV82X8_I2S_OUTPUT_HP_SURROUND 0x20 |
|---|
| 157 | #define STV82X8_I2S_OUTPUT_C_SUB 0x40 |
|---|
| 158 | #define STV82X8_I2S_OUTPUT_SCART 0x60 |
|---|
| 159 | #define STV82X8_I2S_OUTPUT_SPDIF 0x80 |
|---|
| 160 | #define STV82X8_I2S_OUTPUT_DELAY 0xA0 |
|---|
| 161 | #define STV82X8_ADCINPUT_MASK 0x07 |
|---|
| 162 | |
|---|
| 163 | |
|---|
| 164 | /* TRUSRND_INPUT_GAIN */ |
|---|
| 165 | #define STV82x8_TRUSRND_INPUT_GAIN 0x05 // -2.5 dB |
|---|
| 166 | |
|---|
| 167 | /* TRUSRND_DC_ELEVATION */ |
|---|
| 168 | #define STV82x8_TRUSRND_DC_ELEVATION 0x00 // 0 dB |
|---|
| 169 | |
|---|
| 170 | /* AV_DELAY_CONFIG */ |
|---|
| 171 | #define STV82X8_AV_DELAY_ON_MASK 0x01 |
|---|
| 172 | #define STV82X8_DOLBY_DELAY_ON_MASK 0x02 |
|---|
| 173 | |
|---|
| 174 | /* IRQ_CTRL */ |
|---|
| 175 | #define STV82X8_IRQ0_WAKEUP_MASK 0x08 |
|---|
| 176 | |
|---|
| 177 | /* DAC_CTRL */ |
|---|
| 178 | #define STV82X8_DAC_MUTE_MASK 0x1E |
|---|
| 179 | #define STV82x8_MUX_MASK 0x20 |
|---|
| 180 | |
|---|
| 181 | /* VOLUME_MODES */ |
|---|
| 182 | #define STV82X8_VOLUMEMODE_MASK 0x07 |
|---|
| 183 | #define STV82X8_SCART_VOLUMEMODE_MASK 0x08 |
|---|
| 184 | |
|---|
| 185 | /* VOLUME Control */ |
|---|
| 186 | #define STV82X8_VOLUMEMMSB_MASK 0xFF |
|---|
| 187 | #define STV82X8_VOLUMEMLSB_MASK 0x03 |
|---|
| 188 | |
|---|
| 189 | /* DSP_STATUS */ |
|---|
| 190 | #define STV82X8_INIT_MEM_MASK 0x01 |
|---|
| 191 | |
|---|
| 192 | /* AUTOSTD_TIMERS */ |
|---|
| 193 | #define STV82X8_FM_TIME_MASK 0x03 |
|---|
| 194 | #define STV82X8_STEREO_TIME_MASK 0x1C |
|---|
| 195 | |
|---|
| 196 | /* SVC_LS_CONTROL */ |
|---|
| 197 | #define STV82X8_SVCON_MASK 0x01 |
|---|
| 198 | |
|---|
| 199 | /* DYNAMIC_BASS_LS */ |
|---|
| 200 | #define STV82X8_STDYNAMIC_BASS_MASK 0x01 |
|---|
| 201 | #define STV82X8_BASS_FREQ_MASK 0x06 |
|---|
| 202 | |
|---|
| 203 | /* AV_DELAY */ |
|---|
| 204 | #define STV82x8_AV_DELAY_ON 0x01 |
|---|
| 205 | #define STV82x8_AV_DELAY_OFF 0x00 |
|---|
| 206 | #define STV82x8_Dolby_DELAY_ON 0x02 |
|---|
| 207 | #define STV82x8_Dolby_DELAY_OFF 0x00 |
|---|
| 208 | #define STV82x8_DolbyOn_MAX_VALUE 100 |
|---|
| 209 | #define STV82x8_DolbyOff_MAX_VALUE 177 |
|---|
| 210 | |
|---|
| 211 | #define STV82X8_DolbyDelay_On 0x02 |
|---|
| 212 | #define STV82X8_DolbyDelay_Off 0x00 |
|---|
| 213 | |
|---|
| 214 | /* AUTOSTD_STANDARD_DETECT */ |
|---|
| 215 | #define STV82X8_STANDARD_DETECT_MASK 0x0F |
|---|
| 216 | #define STV82X8_SOUNDMONO_ALL_CHECK SCART_PRESCALING_DEFAULTVALU 0x0F |
|---|
| 217 | |
|---|
| 218 | /* AUTOSTD_STEREO_DETECT */ |
|---|
| 219 | #define STV82X8_AUTOSTD_ALL_CHECK 0x07 |
|---|
| 220 | #define STV82X8_AUTOSTD_STEREO_CHECK 0x03 |
|---|
| 221 | #define STV82X8_AUTOSTD_MONO_CHECK 0x01 |
|---|
| 222 | |
|---|
| 223 | /* AUTOSTD_STATUS */ |
|---|
| 224 | #define STV82X8_AUTOSTD_STATUS_MASK 0x0E |
|---|
| 225 | |
|---|
| 226 | /* AUTOSTD_DEM_STATUS */ |
|---|
| 227 | #define STV82X8_AUTOSTD_DEM_STATUS_MASK 0x3C |
|---|
| 228 | |
|---|
| 229 | /* HOST_CMD */ |
|---|
| 230 | #define STV82X8_HWINITDSP_MASK 0x04 |
|---|
| 231 | |
|---|
| 232 | /* DSP_RUN */ |
|---|
| 233 | #define STV82X8_INITDSPHOSTRUN_MASK 0x01 |
|---|
| 234 | |
|---|
| 235 | /* I2S_CONFIG*/ |
|---|
| 236 | #define STV82X8_I2S_CONFIG_MASK 0x0F |
|---|
| 237 | |
|---|
| 238 | /* AGC_CTRL */ |
|---|
| 239 | #define STV82X8_AGC_CMD_MASK 0x80 |
|---|
| 240 | #define STV82X8_AGC_VALUE_MASK 0x7C |
|---|
| 241 | |
|---|
| 242 | /* OUTPUT_BASS_MNGT */ |
|---|
| 243 | #define OUTPUT_BASS_MNGT_MASK 0xFF |
|---|
| 244 | |
|---|
| 245 | /* PRESCALE_MONO */ |
|---|
| 246 | #define PRESCALE_MONO_MASK 0x7F |
|---|
| 247 | |
|---|
| 248 | /* TRUSRND_CONTROL */ |
|---|
| 249 | #define STV82X8_PSEUDO_MASK 0x01 |
|---|
| 250 | #define STV82X8_SRS_MASK 0x09 |
|---|
| 251 | |
|---|
| 252 | /* LS_LOUDNESS */ |
|---|
| 253 | #define LS_LOUDNESS_MASK 0x0F |
|---|
| 254 | |
|---|
| 255 | /* SVC_LS_TIME_TH */ |
|---|
| 256 | #define SVC_LS_TIME_TH_MASK 0x1F |
|---|
| 257 | |
|---|
| 258 | /* AUDIO_MATRIX1_INPUT */ |
|---|
| 259 | #define STV82X8_MATRIX1_INPUT_MASK 0x07 |
|---|
| 260 | #define STV82X8_MATRIX3_INPUT_MASK 0x38 |
|---|
| 261 | |
|---|
| 262 | /* SCART1_2_OUTPUT_CTRL */ |
|---|
| 263 | #define STV82X8_SCARTOUT_SC2OUT_MASK 0x70 |
|---|
| 264 | |
|---|
| 265 | /* CHANNEL_MATRIX_LS */ |
|---|
| 266 | #define CM_MATRIX_LS_MASK 0x07 |
|---|
| 267 | #define AUTOSTD_CTRL_LS_MASK 0x80 |
|---|
| 268 | |
|---|
| 269 | /* CHANNEL_MATRIX_SPDIF */ |
|---|
| 270 | #define STV82x8_CMMATRIX_SPDIF_MASK 0x07 |
|---|
| 271 | |
|---|
| 272 | /* AUTOSTD_CTRL */ |
|---|
| 273 | #define STV82X8_AUTOSTD_CHECK_MASK 0x07 |
|---|
| 274 | |
|---|
| 275 | #define STV82X8_BEEPER_PULSE_MASK 0x04 |
|---|
| 276 | #define STV82X8_BEEPEROUT_LS_MASK 0x03 |
|---|
| 277 | |
|---|
| 278 | /* BEEPER_FREQ_VOL */ |
|---|
| 279 | #define BEEPER_FREQ_MASK 0xE0 |
|---|
| 280 | |
|---|
| 281 | /* BEEPER_ON */ |
|---|
| 282 | #define BEEPER_ON_MASK 0x01 |
|---|
| 283 | |
|---|
| 284 | /* Treble/Equalize_CONTROL --Josie 8/21*/ |
|---|
| 285 | |
|---|
| 286 | #define STV82X8_EQUALIZE_MASK 0x07 |
|---|
| 287 | |
|---|
| 288 | |
|---|
| 289 | //******************************************************* |
|---|
| 290 | // Definition |
|---|
| 291 | //******************************************************* |
|---|
| 292 | |
|---|
| 293 | /* Sound system */ |
|---|
| 294 | #define BG_SYSTEM 0 |
|---|
| 295 | #define DK_SYSTEM 1 |
|---|
| 296 | #define I_SYSTEM 2 |
|---|
| 297 | #define L_SYSTEM 3 |
|---|
| 298 | #define M_SYSTEM 4 |
|---|
| 299 | |
|---|
| 300 | /* Sound mode */ |
|---|
| 301 | #define MONO 0x00 |
|---|
| 302 | #define STEREO 0x01 |
|---|
| 303 | #define SAP 0x02 |
|---|
| 304 | #define SAP_STEREO 0x03 |
|---|
| 305 | #define NOTFOUND_SOUND 0x04 |
|---|
| 306 | |
|---|
| 307 | #define MONO_CHECK 0x01 |
|---|
| 308 | #define STEREO_CHECK 0x02 |
|---|
| 309 | #define SAP_CHECK 0x04 |
|---|
| 310 | |
|---|
| 311 | /* Option for extra effect */ |
|---|
| 312 | #define STV82X8_TURBO_SOUND_ON 0x01 |
|---|
| 313 | #define STV82X8_TURBO_SOUND_OFF 0x00 |
|---|
| 314 | #define STV82X8_AUTO_VOLUME_ON 0x01 |
|---|
| 315 | #define STV82X8_AUTO_VOLUME_OFF 0x00 |
|---|
| 316 | #define STV82X8_NCSLOW_MODE 0x01 |
|---|
| 317 | #define STV82X8_NCFAST_MODE 0x00 |
|---|
| 318 | #define STV82X8_INPUT_AV1 0x01 |
|---|
| 319 | #define STV82X8_INPUT_AV2 0x02 |
|---|
| 320 | #define STV82X8_INPUT_AV3 0x03 |
|---|
| 321 | #define STV82X8_INPUT_AV4 0x04 |
|---|
| 322 | #define STV82x8_SVC_ON 0x01 |
|---|
| 323 | #define STV82x8_SVC_OFF 0x00 |
|---|
| 324 | |
|---|
| 325 | /* Error value */ |
|---|
| 326 | #define STV82X8_I2C_ERROR 0x01 |
|---|
| 327 | #define STV82X8_INVALID_PARAM 0x02 |
|---|
| 328 | #define STV82X8_UPDATE_ERROR 0x04 |
|---|
| 329 | #define STV82X8_RESOURCE_ERROR 0x08 |
|---|
| 330 | #define STV82X8_NO_ERROR 0x00 |
|---|
| 331 | |
|---|
| 332 | |
|---|
| 333 | /* VOLUME Control*/ |
|---|
| 334 | #define VOLUME_0DB_DEFAULT_VALUE 928 |
|---|
| 335 | #define STV82X8_LS_BALANCE_CENTER 0x0000 |
|---|
| 336 | |
|---|
| 337 | /* Signal state */ |
|---|
| 338 | #define STV82X8_SOUNDSIGNAL_UNLOCKED 0x00 |
|---|
| 339 | #define STV82X8_SOUNDSIGNAL_LOCKED 0x01 |
|---|
| 340 | |
|---|
| 341 | /* VOLUME_MODES */ |
|---|
| 342 | #define INDEPENDANT_MODE 0x01 |
|---|
| 343 | #define DIFFERENTIAL_MODE 0x02 |
|---|
| 344 | |
|---|
| 345 | /* Volume_Control */ |
|---|
| 346 | #define MASTER_VOLUME_SHIFT 0x08 |
|---|
| 347 | #define NORMAL_VOLUME_SHIFT 0x02 |
|---|
| 348 | #define NORMAL_BALANCE_SHIFT 0x02 |
|---|
| 349 | |
|---|
| 350 | /* AUTOSTD_TIMERS */ |
|---|
| 351 | #define FM_TIME_16MS 0x00 |
|---|
| 352 | #define FM_TIME_32MS 0x01 |
|---|
| 353 | #define FM_TIME_48MS 0x02 |
|---|
| 354 | #define FM_TIME_64MS 0x03 |
|---|
| 355 | |
|---|
| 356 | /* Balance */ |
|---|
| 357 | #define DEFAULT_LSB_BALANCE_VALUE 0x00 |
|---|
| 358 | |
|---|
| 359 | /* LS_EQ_BAND */ |
|---|
| 360 | #define EQUALIZER_100HZ 0x00 |
|---|
| 361 | #define EQUALIZER_330HZ 0x01 |
|---|
| 362 | #define EQUALIZER_1KHZ 0x02 |
|---|
| 363 | #define EQUALIZER_3P3KHZ 0x03 |
|---|
| 364 | #define EQUALIZER_10KHZ 0x04 |
|---|
| 365 | |
|---|
| 366 | /* SW_RESET */ |
|---|
| 367 | #define STV82X8_SOFT_RESET 0x01 |
|---|
| 368 | #define STV82X8_I2S_INPUT 0x00 |
|---|
| 369 | //#define STV82X8_I2S_OUTPUT 0x60 |
|---|
| 370 | #define STV82X8_I2S_OUTPUT 0x00 |
|---|
| 371 | |
|---|
| 372 | /* TRUSRND_CONTROL */ |
|---|
| 373 | #define STV82X8_PSEUDO_ON 0x01 |
|---|
| 374 | #define STV82X8_PSEUDO_OFF 0x00 |
|---|
| 375 | #define STV82X8_SRS_ON 0x09 |
|---|
| 376 | #define STV82X8_ALL_SRS_OFF 0x00 |
|---|
| 377 | #define STV82x8_SRS_WOW_ON 0x01 |
|---|
| 378 | #define STV82x8_SRS_WOW_OFF 0x00 |
|---|
| 379 | #define STV82x8_SRS_TRX_ON 0x01 |
|---|
| 380 | #define STV82x8_SRS_TRX_OFF 0x00 |
|---|
| 381 | #define STV82x8_DOLBY_PRO1_ON 0x01 |
|---|
| 382 | #define STV82x8_DOLBY_PRO1_OFF 0x00 |
|---|
| 383 | |
|---|
| 384 | #define STV82x8_SRS_MONO_LEFT 0x01 |
|---|
| 385 | #define STV82x8_SRS_MONO_DCLARITY 0x02 |
|---|
| 386 | #define STV82x8_SRS_LR_STEREO 0x03 |
|---|
| 387 | #define STV82x8_SRS_LR_STEREO_DCLARITY 0x04 |
|---|
| 388 | #define STV82x8_SRS_LSR 0x05 |
|---|
| 389 | #define STV82x8_SRS_LSR_DCLARITY 0x06 |
|---|
| 390 | #define STV82x8_SRS_LRLsRs 0x07 |
|---|
| 391 | #define STV82x8_SRS_LRLsRs_DCLARITY 0x08 |
|---|
| 392 | #define STV82x8_SRS_LRC 0x09 |
|---|
| 393 | #define STV82x8_SRS_LRC_DCLARITY 0x0A |
|---|
| 394 | #define STV82x8_SRS_LRCS 0x0B |
|---|
| 395 | #define STV82x8_SRS_LRCS_DCLARITY 0x0C |
|---|
| 396 | #define STV82x8_SRS_LRCLsRs 0x0D |
|---|
| 397 | #define STV82x8_SRS_LRCLsRs_DCLARITY 0x0E |
|---|
| 398 | #define STV82x8_SRS_LtRt 0x0F |
|---|
| 399 | #define STV82x8_SRS_LtRt_DCLARITY 0x10 |
|---|
| 400 | #define STV82x8_SRS_LRCLsRs_SRS 0x11 |
|---|
| 401 | #define STV82x8_SRS_LRCLsRs_SRS_DCLARITY 0x12 |
|---|
| 402 | #define STV82x8_SRS_LRCLsRs_TRX 0x13 |
|---|
| 403 | #define STV82x8_SRS_LRCLsRs_TRX_DCLARITY 0x14 |
|---|
| 404 | |
|---|
| 405 | #define STV82x8_TRUSURROUND_ON 0x01 |
|---|
| 406 | #define STV82x8_TRUSURROUND_OFF 0x00 |
|---|
| 407 | #define STV82x8_DIALOG_CLARITY_ON 0x80 |
|---|
| 408 | #define STV82x8_DIALOG_CLARITY_OFF 0x00 |
|---|
| 409 | #define STV82x8_HP_MODE_ON 0x40 |
|---|
| 410 | #define STV82x8_HP_MODE_OFF 0x00 |
|---|
| 411 | |
|---|
| 412 | #define STV82x8_TRUSRND_MONO_CENTER 0x00 |
|---|
| 413 | #define TRUSRND_BYPASS 0x02 |
|---|
| 414 | #define STV82x8_TRUSRND_MONO_LEFT 0x04 |
|---|
| 415 | #define STV82x8_TRUSRND_LR_STEREO 0x08 |
|---|
| 416 | #define STV82x8_TRUSRND_LSR 0x0C |
|---|
| 417 | #define STV82x8_TRUSRND_LSLsRs 0x10 |
|---|
| 418 | #define STV82x8_TRUSRND_LRC 0x14 |
|---|
| 419 | #define STV82x8_TRUSRND_LRCS 0x18 |
|---|
| 420 | #define STV82x8_TRUSRND_LRCLsRs_XT 0x1C |
|---|
| 421 | #define STV82x8_TRUSRND_LtRt 0x20 |
|---|
| 422 | #define STV82x8_TRUSRND_LRCLsRs_SRS 0x24 |
|---|
| 423 | #define STV82x8_TRUSRND_LRCLsRs_XTPRO2 0x28 |
|---|
| 424 | |
|---|
| 425 | /* TRUBASS_LS_CONTROL */ |
|---|
| 426 | #define STV82x8_TRUBASS_ON 0x01 |
|---|
| 427 | #define STV82x8_TRUBASS_OFF 0x00 |
|---|
| 428 | #define STV82x8_TRUBASS_LF_RESPOSE_40KHZ 0x00 |
|---|
| 429 | #define STV82x8_TRUBASS_LF_RESPOSE_60KHZ 0x02 |
|---|
| 430 | #define STV82x8_TRUBASS_LF_RESPOSE_100KHZ 0x04 |
|---|
| 431 | #define STV82x8_TRUBASS_LF_RESPOSE_150KHZ 0x06 |
|---|
| 432 | #define STV82x8_TRUBASS_LF_RESPOSE_200KHZ 0x08 |
|---|
| 433 | #define STV82x8_TRUBASS_LF_RESPOSE_250KHZ 0x0A |
|---|
| 434 | #define STV82x8_TRUBASS_LF_RESPOSE_300KHZ 0x0C |
|---|
| 435 | #define STV82x8_TRUBASS_LF_RESPOSE_400KHZ 0x0E |
|---|
| 436 | |
|---|
| 437 | #define STV82x8_TRUBASS_LS_LEVEL 0x00 |
|---|
| 438 | |
|---|
| 439 | #define STV82x8_SRS_TRUBASS_OFF 0x00 |
|---|
| 440 | #define STV82x8_SRS_TRUBASS_SMALL 0x01 |
|---|
| 441 | #define STV82x8_SRS_TRUBASS_MEDIUM 0x02 |
|---|
| 442 | #define STV82x8_SRS_TRUBASS_LARGE 0x03 |
|---|
| 443 | |
|---|
| 444 | /* ST_DYNAMIC_BASS */ |
|---|
| 445 | #define STV82x8_ST_DYNAMIC_BASS_ON 0x01 |
|---|
| 446 | #define STV82x8_ST_DYNAMIC_BASS_OFF 0x00 |
|---|
| 447 | #define STV82x8_100HZ_CUT_OFF 0x00 |
|---|
| 448 | #define STV82x8_150HZ_CUT_OFF 0x02 |
|---|
| 449 | #define STV82x8_200HZ_CUT_OFF 0x04 |
|---|
| 450 | #define STV82x8_BASS_LEVEL 0x1F |
|---|
| 451 | |
|---|
| 452 | /* SVC_LS_CONTROL */ |
|---|
| 453 | #define STV82X8_AUTOSVC_ON 0x01 |
|---|
| 454 | #define STV82X8_AUTOSVC_OFF 0x00 |
|---|
| 455 | |
|---|
| 456 | /* MUTE_DIGITAL */ |
|---|
| 457 | #define STV82X8_DIGITAL_UNMUTE_VALUE 0x00 |
|---|
| 458 | #define STV82X8_DIGITAL_MUTE_VALUE 0x8F |
|---|
| 459 | #define STV82X8_DIGITAL_LS_MUTE 0x01 |
|---|
| 460 | #define STV82X8_DIGITAL_LS_UNMUTE 0x00 |
|---|
| 461 | #define STV82X8_DIGITAL_SCART1_MUTE 0x10 |
|---|
| 462 | #define STV82X8_DIGITAL_SCART1_UNMUTE 0x00 |
|---|
| 463 | #define STV82X8_DIGITAL_SPDIF_MUTE 0x40 |
|---|
| 464 | #define STV82X8_DIGITAL_SPDIF_UNMUTE 0x00 |
|---|
| 465 | #define STV82x8_MUTEDIG_SUBWOOFER_MUTE 0x04 |
|---|
| 466 | #define STV82x8_MUTEDIG_SUBWOOFER_UNMUTE 0x00 |
|---|
| 467 | #define STV82x8_DIGITAL_HP_MUTE 0x80 |
|---|
| 468 | #define STV82x8_DIGITAL_HP_UMMUTE 0x00 |
|---|
| 469 | #define STV82x8_MUTE_ALL_OUTPUT 0xff |
|---|
| 470 | #define STV82x8_UNMUTE_ALL_OUTPUT 0x00 |
|---|
| 471 | #define STV82x8_ALL_OUTPUT_MASK 0xff |
|---|
| 472 | |
|---|
| 473 | /* DAC_CONTROL */ |
|---|
| 474 | #define STV82X8_SC_DAC_MUTE_MASK 0x10 |
|---|
| 475 | #define STV82X8_SC_DAC_MUTE_VALUE 0x10 |
|---|
| 476 | #define STV82X8_SC_DAC_UNMUTE_VALUE 0x00 |
|---|
| 477 | #define STV82x8_DAC_SUBWOOFER_MUTE 0x04 |
|---|
| 478 | #define STV82x8_DAC_SUBWOOFER_UNMUTE 0x00 |
|---|
| 479 | |
|---|
| 480 | /* HEADPHONE_CONFIG */ |
|---|
| 481 | #define STV82x8_HP_FORCE_ON 0x08 |
|---|
| 482 | #define STV82x8_HP_FORCE_OFF 0x00 |
|---|
| 483 | #define STV82x8_HP_LS_MUTE 0x04 |
|---|
| 484 | #define STV82x8_HP_LS_UNMUTE 0x00 |
|---|
| 485 | #define STV82x8_HP_DET_ACTIVE_ON 0x02 |
|---|
| 486 | #define STV82x8_HP_DET_ACTIVE_OFF 0x00 |
|---|
| 487 | #define STV82x8_HP_DETECTED 0x01 |
|---|
| 488 | #define STV82x8_HP_NOT_DETECTED 0x00 |
|---|
| 489 | |
|---|
| 490 | /* CHANNEL_MATRIX_LS */ |
|---|
| 491 | #define AUTOSTD_CTRL_LS_OFF 0x00 |
|---|
| 492 | #define AUTOSTD_CTRL_LS_ON 0x80 |
|---|
| 493 | #define BYPASS 0x00 |
|---|
| 494 | #define LEFT_ONLY 0x01 |
|---|
| 495 | #define RIGHT_ONLY 0x02 |
|---|
| 496 | #define LEFT_RIGHT_MIX 0x03 |
|---|
| 497 | #define SWAP 0x04 |
|---|
| 498 | |
|---|
| 499 | /* DAC_CTRL */ |
|---|
| 500 | #define Internal_SPDIF 0x00 |
|---|
| 501 | #define External_SPDIF 0x20 |
|---|
| 502 | |
|---|
| 503 | /* SW_RESET */ |
|---|
| 504 | #define STV82x8_I2S_INOUT_MASK 0x60 |
|---|
| 505 | |
|---|
| 506 | /* ADC_CTRL */ |
|---|
| 507 | #define STV82X8_ADC_WAKEUP_VALUE 0x08 |
|---|
| 508 | |
|---|
| 509 | /* ADC_CTRL */ |
|---|
| 510 | #define STV82X8_IRQ0_WAKEUP_VALUE 0x08 |
|---|
| 511 | |
|---|
| 512 | /* DAC_CTRL */ |
|---|
| 513 | #define STV82X8_DAC_MUTE_VALUE 0x1E |
|---|
| 514 | #define STV82X8_DAC_UNMUTE_VALUE 0x00 |
|---|
| 515 | |
|---|
| 516 | /* VOLUME_MODES */ |
|---|
| 517 | #define STV82X8_VOLUMEMODE_INDEPENDANT 0x00 |
|---|
| 518 | #define STV82X8_VOLUMEMODE_DIFFERENTIAL 0x07 |
|---|
| 519 | #define STV82X8_SCART_VOLUMEMODE_INDEPENDANT 0x00 |
|---|
| 520 | #define STV82X8_SCART_VOLUMEMODE_DIFFERENTIAL 0x08 |
|---|
| 521 | |
|---|
| 522 | /* SCART_Volume */ |
|---|
| 523 | #define STV82X8_SCART_VOLUME_DEFAULT 0xDE00 |
|---|
| 524 | |
|---|
| 525 | #define STV82X8_HEADPHONE_VOLUME_DEFAULT 0x037C |
|---|
| 526 | |
|---|
| 527 | /* AUDIO_MATRIX_CONF */ |
|---|
| 528 | #define STV82X8_SCART_MATRIX_VALUE 0x00 |
|---|
| 529 | |
|---|
| 530 | /* PRESCALE_AM & PRESCALE_FM & Nicam & Scart */ |
|---|
| 531 | #define MONO_PRESCALING_DEFAULTVALU 0x12 |
|---|
| 532 | #define STEREO_PRESCALING_DEFAULTVALU 0x10 |
|---|
| 533 | #define FM_PRESCALING_6DB 0x0C |
|---|
| 534 | #define SAP_PRESCALING_DEFAULTVALU 0x0A |
|---|
| 535 | #define SCART_PRESCALING_DEFAULTVALU 0x0A |
|---|
| 536 | #define I2S_PRESCALING_DEFAULTVALU 0x10 |
|---|
| 537 | |
|---|
| 538 | /* AUTOSTD_TIMERS */ |
|---|
| 539 | #define STV82X8_FMAM_TIME_16MS 0x00 |
|---|
| 540 | #define STV82X8_FMAM_TIME_32MS 0x01 |
|---|
| 541 | #define STV82X8_FMAM_TIME_48MS 0x02 |
|---|
| 542 | #define STV82X8_FMAM_TIME_64MS 0x03 |
|---|
| 543 | |
|---|
| 544 | /* SVC_LS_TIME_TH */ |
|---|
| 545 | #define STV82X8_SVC_30MSCONST_0DBGAIN 0x00 |
|---|
| 546 | #define STV82X8_SVC_30MSCONST_205DBGAIN 0x19 |
|---|
| 547 | #define STV82X8_SVC_16MSCONST_205DBGAIN 0x99 |
|---|
| 548 | |
|---|
| 549 | /* SVC_LS_GAIN */ |
|---|
| 550 | #define STV82X8_LS_HP_MAKE_UP_GAIN_AUTOON 0x1D |
|---|
| 551 | #define STV82X8_LS_HP_MAKE_UP_GAIN_AUTOOFF 0x00 |
|---|
| 552 | |
|---|
| 553 | /* TRUSRND_INPUT_GAIN */ |
|---|
| 554 | #define STV82X8_SRSGAIN_VALUE 0x05 |
|---|
| 555 | |
|---|
| 556 | /* AUDIO_MATRIX_INPUT */ |
|---|
| 557 | #define STV82X8_AUDIOINPUT_BTSC_DEM 0x02 |
|---|
| 558 | #define STV82X8_AUDIOINPUT_I2S 0x04 |
|---|
| 559 | #define STV82X8_AUDIOINPUT_SCART 0x05 |
|---|
| 560 | |
|---|
| 561 | /* BEEPER_ON */ |
|---|
| 562 | #define STV82X8_BEEPER_ON 0x01 |
|---|
| 563 | #define STV82X8_BEEPER_OFF 0x00 |
|---|
| 564 | |
|---|
| 565 | /* BEEPER_MODE */ |
|---|
| 566 | #define STV82X8_BEEPER_PULSE 0x00 |
|---|
| 567 | #define STV82X8_BEEPEROUT_LS 0x01 |
|---|
| 568 | |
|---|
| 569 | /* Treble Equalize ON/OFF : CCh ---Josie 8/21*/ |
|---|
| 570 | #define STV82X8_TREBLE_ON 0x07 |
|---|
| 571 | #define STV82X8_EQUALIZE_ON 0x01 |
|---|
| 572 | |
|---|
| 573 | #if 0 |
|---|
| 574 | #define MUTE 0x00 |
|---|
| 575 | #define Delay 0x01 |
|---|
| 576 | #define DEMOD 0x02 |
|---|
| 577 | #define LtRt 0x03 |
|---|
| 578 | #define I2S 0x04 |
|---|
| 579 | #define SCART 0x05 |
|---|
| 580 | #endif |
|---|
| 581 | |
|---|
| 582 | typedef enum _tagScartType |
|---|
| 583 | { |
|---|
| 584 | SCART_INPUT1=STV82X8_INPUT_AV1, //has to been sync with STV82X8_INPUT_AV1 |
|---|
| 585 | SCART_INPUT2=STV82X8_INPUT_AV2, |
|---|
| 586 | SCART_INPUT3=STV82X8_INPUT_AV3, |
|---|
| 587 | SCART_INPUT4=STV82X8_INPUT_AV4 |
|---|
| 588 | } ScartNo_t; |
|---|
| 589 | |
|---|
| 590 | /* ADC_CTRL */ |
|---|
| 591 | #define STV82X8_SCARTINPUT_SC1 0x00 |
|---|
| 592 | #define STV82X8_SCARTINPUT_SC2 0x01 |
|---|
| 593 | #define STV82X8_SCARTINPUT_SC3 0x02 |
|---|
| 594 | #define STV82X8_SCARTINPUT_SC4 0x03 |
|---|
| 595 | #define STV82X8_SCARTOUT_CTRL_RF 0x88 |
|---|
| 596 | #define STV82X8_ADCINPUT_MONO 0x04 |
|---|
| 597 | |
|---|
| 598 | /* SCART1_2_OUTPUT_CTRL */ |
|---|
| 599 | #define SCARTOUT_SC1OUT_SC1_DSP 0x02 |
|---|
| 600 | #define SCARTOUT_SC1OUT_SC2_DSP 0x03 |
|---|
| 601 | #define SCARTOUT_SC1OUT_SC3_DSP 0x04 |
|---|
| 602 | #define SCARTOUT_SC1OUT_SC4_DSP 0x05 |
|---|
| 603 | #define SCARTOUT_SC2OUT_SC1_DSP 0x20 |
|---|
| 604 | #define SCARTOUT_SC2OUT_SC2_DSP 0x30 |
|---|
| 605 | #define SCARTOUT_SC2OUT_SC3_DSP 0x40 |
|---|
| 606 | #define SCARTOUT_SC2OUT_SC4_DSP 0x50 |
|---|
| 607 | |
|---|
| 608 | /* AUDIO_MATRIX_LANG */ |
|---|
| 609 | #define STV82X8_LANG_SEL_STEREO 0x00 |
|---|
| 610 | #define STV82X8_LANG_SEL_CH_A 0x15 |
|---|
| 611 | #define STV82X8_LANG_SEL_CH_B 0x2A |
|---|
| 612 | #define STV82X8_LANG_SEL_CH_C 0x3F |
|---|
| 613 | |
|---|
| 614 | /* NOISE_GENERATOR */ |
|---|
| 615 | #define STV82x8_NOISE_GENERATIONB_ON 0x01 |
|---|
| 616 | #define STV82x8_NOISE_GENERATIONB_OFF 0x00 |
|---|
| 617 | #define STV82x8_SRIGHT_NOISE_ON 0x40 |
|---|
| 618 | #define STV82x8_SLEFT_NOISE_ON 0x20 |
|---|
| 619 | #define STV82x8_SUB_NOISE_ON 0x10 |
|---|
| 620 | #define STV82x8_CENTER_NOISE_ON 0x08 |
|---|
| 621 | #define STV82x8_RIGHT_NOISE_ON 0x04 |
|---|
| 622 | #define STV82x8_LEFT_NOISE_ON 0x02 |
|---|
| 623 | #define STV82x8_OUTPUT_FULLRANGE 0x00 |
|---|
| 624 | #define STV82x8_OUTPUT_10_DB 0x80 |
|---|
| 625 | |
|---|
| 626 | /* Coefficient filter */ |
|---|
| 627 | #define SOUND_STAT_MONO 0x01 |
|---|
| 628 | #define SOUND_STAT_STEREO 0x02 |
|---|
| 629 | #define SOUND_STAT_DUAL 0x04 |
|---|
| 630 | #define SET_50KHZ_MODE 0x00 |
|---|
| 631 | #define SET_200KHZ_MODE 0x01 |
|---|
| 632 | |
|---|
| 633 | /* DEMOD_STAT */ |
|---|
| 634 | #define STV82X8_LCK_DET 0x20 |
|---|
| 635 | #define STV82X8_ST_DET 0x10 |
|---|
| 636 | #define STV82X8_SAP_SQ 0x08 |
|---|
| 637 | #define STV82X8_SAP_DET 0x04 |
|---|
| 638 | |
|---|
| 639 | #define STV82X8_FM1_CAR 0x02 |
|---|
| 640 | #define STV82X8_FM1_SQ 0x01 |
|---|
| 641 | |
|---|
| 642 | /* AUTOSTD_STATUS */ |
|---|
| 643 | #define STV82X8_SAP_OK 0x08 |
|---|
| 644 | #define STV82X8_STEREO_OK 0x04 |
|---|
| 645 | #define STV82X8_MONO_OK 0x02 |
|---|
| 646 | |
|---|
| 647 | /* AUTOSTD_CTRL */ |
|---|
| 648 | #define STV82X8_AUTOSTD_LSELECTION 0x01 |
|---|
| 649 | #define STV82X8_AUTOSTD_50KHZ 0x00 |
|---|
| 650 | #define STV82X8_AUTOSTD_200KHZ 0x02 |
|---|
| 651 | #define STV82X8_AUTOSTD_350KHZ 0x04 |
|---|
| 652 | #define STV82X8_AUTOSTD_500KHZ 0x06 |
|---|
| 653 | |
|---|
| 654 | /* OUTPUT_BASS_MNGT */ |
|---|
| 655 | #define STV82x8_BASSMNGT_ON 0x80 |
|---|
| 656 | #define STV82x8_BASSMNGT_OFF 0x00 |
|---|
| 657 | #define STV82x8_SUBWOOFER_ON 0x10 |
|---|
| 658 | #define STV82x8_SUBWOOFER_OFF 0x00 |
|---|
| 659 | #define STV82x8_GAINSW_ON 0x08 |
|---|
| 660 | #define STV82x8_GAINSW_OFF 0x00 |
|---|
| 661 | #define STV82x8_STLFEAdd_ON 0x40 |
|---|
| 662 | #define STV82x8_STLFEAdd_OFF 0x00 |
|---|
| 663 | #define STV82x8_DolbyPro_ON 0x20 |
|---|
| 664 | #define STV82x8_DolbyPro_OFF 0x00 |
|---|
| 665 | |
|---|
| 666 | #define ST_LFE_ADD_ 0x40 |
|---|
| 667 | #define DOLBY_PROLOGIC 0x20 |
|---|
| 668 | |
|---|
| 669 | #define STV82x8_BASSCONFI_0 0x00 |
|---|
| 670 | #define STV82x8_BASSCONFI_1 0x01 |
|---|
| 671 | #define STV82x8_BASSCONFI_2 0x02 |
|---|
| 672 | #define STV82x8_BASSCONFI_3 0x03 |
|---|
| 673 | #define STV82x8_BASSCONFI_4 0x04 |
|---|
| 674 | #define STV82x8_BASSCONFI_5 0x05 |
|---|
| 675 | #define STV82x8_BASSCONFI_6 0x06 |
|---|
| 676 | |
|---|
| 677 | /* LS_LOUDNESS */ |
|---|
| 678 | #define STV82X8_LOUNDNESS_ENABLE 0x01 |
|---|
| 679 | #define STV82X8_LOUNDNESS_DISABLE 0x00 |
|---|
| 680 | |
|---|
| 681 | /* AGC_CTRL */ |
|---|
| 682 | #define STV82X8_AGC_CMD_MANUAL 0x80 |
|---|
| 683 | #define STV82X8_AGC_CMD_AUTO 0x00 |
|---|
| 684 | |
|---|
| 685 | /* HOST_CMD */ |
|---|
| 686 | #define STV82X8_HWINITDSP_VALUE 0x04 |
|---|
| 687 | |
|---|
| 688 | /* DSP_RUN */ |
|---|
| 689 | #define STV82X8_INITDSPHOSTRUN_VALUE 0x01 |
|---|
| 690 | |
|---|
| 691 | #define AUTOSTD_CTRL_AUTO_MUTE_ON 0x08 |
|---|
| 692 | #define AUTOSTD_CTRL_AUTO_MUTE_OFF 0x00 |
|---|
| 693 | #define AUTOSTD_CTRL_AUTO_MUTE_MASK 0x08 |
|---|
| 694 | |
|---|
| 695 | /******************** For the coefficients *****************************/ |
|---|
| 696 | #define AUTOSTD_COEFF_INIT_TABLE 0x01 |
|---|
| 697 | #define AUTOSTD_COEFF_UPDATE_TABLE 0x02 |
|---|
| 698 | #define AUTOSTD_COEFF_ENTER_VALUE 0x00 |
|---|
| 699 | |
|---|
| 700 | #define FIRC0_200KHZ_VALUE 0x00 |
|---|
| 701 | #define FIRC1_200KHZ_VALUE 0x01 |
|---|
| 702 | #define FIRC2_200KHZ_VALUE 0x01 |
|---|
| 703 | #define FIRC3_200KHZ_VALUE 0xFC |
|---|
| 704 | #define FIRC4_200KHZ_VALUE 0x08 |
|---|
| 705 | #define FIRC5_200KHZ_VALUE 0xF6 |
|---|
| 706 | #define FIRC6_200KHZ_VALUE 0xF8 |
|---|
| 707 | #define FIRC7_200KHZ_VALUE 0x4A |
|---|
| 708 | |
|---|
| 709 | #define FIRC0_50KHZ_VALUE 0x00 |
|---|
| 710 | #define FIRC1_50KHZ_VALUE 0xFE |
|---|
| 711 | #define FIRC2_50KHZ_VALUE 0xFC |
|---|
| 712 | #define FIRC3_50KHZ_VALUE 0xFD |
|---|
| 713 | #define FIRC4_50KHZ_VALUE 0x02 |
|---|
| 714 | #define FIRC5_50KHZ_VALUE 0x0D |
|---|
| 715 | #define FIRC6_50KHZ_VALUE 0x18 |
|---|
| 716 | #define FIRC7_50KHZ_VALUE 0x1F |
|---|
| 717 | |
|---|
| 718 | #define FIRC0_27KHZ_VALUE 0xFF |
|---|
| 719 | #define FIRC1_27KHZ_VALUE 0xFE |
|---|
| 720 | #define FIRC2_27KHZ_VALUE 0xFE |
|---|
| 721 | #define FIRC3_27KHZ_VALUE 0x00 |
|---|
| 722 | #define FIRC4_27KHZ_VALUE 0x06 |
|---|
| 723 | #define FIRC5_27KHZ_VALUE 0x0E |
|---|
| 724 | #define FIRC6_27KHZ_VALUE 0x16 |
|---|
| 725 | #define FIRC7_27KHZ_VALUE 0x1B |
|---|
| 726 | |
|---|
| 727 | #define FM_ACOEFF_VALUE 0x2C |
|---|
| 728 | #define FM_BCOEFF_VALUE 0x0A |
|---|
| 729 | |
|---|
| 730 | #define FM_ACOEFF_RESET_VALUE 0x10 |
|---|
| 731 | #define FM_BCOEFF_RESET_VALUE 0x11 |
|---|
| 732 | |
|---|
| 733 | #define MN_FM_MONO_FIR1C0_INDEX 6 |
|---|
| 734 | #define MN_FM_MONO_FIR1C1_INDEX 7 |
|---|
| 735 | #define MN_FM_MONO_FIR1C2_INDEX 8 |
|---|
| 736 | #define MN_FM_MONO_FIR1C3_INDEX 9 |
|---|
| 737 | #define MN_FM_MONO_FIR1C4_INDEX 10 |
|---|
| 738 | #define MN_FM_MONO_FIR1C5_INDEX 11 |
|---|
| 739 | #define MN_FM_MONO_FIR1C6_INDEX 12 |
|---|
| 740 | #define MN_FM_MONO_FIR1C7_INDEX 13 |
|---|
| 741 | #define MN_FM_MONO_ACOEFF1_INDEX 14 |
|---|
| 742 | #define MN_FM_MONO_BCOEFF1_INDEX 15 |
|---|
| 743 | |
|---|
| 744 | #define BG_FM_MONO_FIR1C0_INDEX 21 |
|---|
| 745 | #define BG_FM_MONO_FIR1C1_INDEX 22 |
|---|
| 746 | #define BG_FM_MONO_FIR1C2_INDEX 23 |
|---|
| 747 | #define BG_FM_MONO_FIR1C3_INDEX 24 |
|---|
| 748 | #define BG_FM_MONO_FIR1C4_INDEX 25 |
|---|
| 749 | #define BG_FM_MONO_FIR1C5_INDEX 26 |
|---|
| 750 | #define BG_FM_MONO_FIR1C6_INDEX 27 |
|---|
| 751 | #define BG_FM_MONO_FIR1C7_INDEX 28 |
|---|
| 752 | #define BG_FM_MONO_ACOEFF1_INDEX 29 |
|---|
| 753 | #define BG_FM_MONO_BCOEFF1_INDEX 30 |
|---|
| 754 | |
|---|
| 755 | #define I_FM_MONO_FIR1C0_INDEX 36 |
|---|
| 756 | #define I_FM_MONO_FIR1C1_INDEX 37 |
|---|
| 757 | #define I_FM_MONO_FIR1C2_INDEX 38 |
|---|
| 758 | #define I_FM_MONO_FIR1C3_INDEX 39 |
|---|
| 759 | #define I_FM_MONO_FIR1C4_INDEX 40 |
|---|
| 760 | #define I_FM_MONO_FIR1C5_INDEX 41 |
|---|
| 761 | #define I_FM_MONO_FIR1C6_INDEX 42 |
|---|
| 762 | #define I_FM_MONO_FIR1C7_INDEX 43 |
|---|
| 763 | #define I_FM_MONO_ACOEFF1_INDEX 44 |
|---|
| 764 | #define I_FM_MONO_BCOEFF1_INDEX 45 |
|---|
| 765 | |
|---|
| 766 | #define STEREO_TIME_20MS (0x00 << 2) |
|---|
| 767 | #define STEREO_TIME_40MS (0x01 << 2) |
|---|
| 768 | #define STEREO_TIME_100MS (0x02 << 2) |
|---|
| 769 | #define STEREO_TIME_200MS (0x03 << 2) |
|---|
| 770 | #define STEREO_TIME_400MS (0x04 << 2) |
|---|
| 771 | #define STEREO_TIME_800MS (0x05 << 2) |
|---|
| 772 | #define STEREO_TIME_1200MS (0x06 << 2) |
|---|
| 773 | #define STEREO_TIME_1600MS (0x07 << 2) |
|---|
| 774 | |
|---|
| 775 | // define for ST WIDE SURROUND |
|---|
| 776 | #define ST_WIDE_SURROUND_OFF_MODE 0 |
|---|
| 777 | #define ST_WIDE_SURROUND_MONO_MODE 1 |
|---|
| 778 | #define ST_WIDE_SURROUND_STEREO_MODE 2 |
|---|
| 779 | #define ST_WIDE_SURROUND_MOVIE_MODE 3 |
|---|
| 780 | #define ST_WIDE_SURROUND_MUSIC_MODE 4 |
|---|
| 781 | |
|---|
| 782 | #define ST_SURROUND_STEREO 0x04 |
|---|
| 783 | #define ST_SURROUND_MUSIC 0x02 |
|---|
| 784 | #define ST_SURROUND_ON 0x01 |
|---|
| 785 | #define ST_SURROUND_MONO 0x00 |
|---|
| 786 | #define ST_SURROUND_MOVIE 0x00 |
|---|
| 787 | #define ST_SURROUND_OFF 0x00 |
|---|
| 788 | #define ST_SURROUND_MONO_STEREO_MASK 0x04 |
|---|
| 789 | #define ST_SURROUND_MOVIE_MUSIC_MASK 0x02 |
|---|
| 790 | #define ST_SURROUND_ON_OFF_MASK 0x01 |
|---|
| 791 | |
|---|
| 792 | |
|---|
| 793 | /********************************************************************************** |
|---|
| 794 | * Function Prototype |
|---|
| 795 | *********************************************************************************/ |
|---|
| 796 | unsigned char STV82x8_SwReset(void); |
|---|
| 797 | unsigned char STV82x8_UpdatePatchData( void ); |
|---|
| 798 | unsigned char STV82x8_VerifiedPatchData( void ); |
|---|
| 799 | unsigned char STV82x8_InitDSP( void ); |
|---|
| 800 | unsigned char STV82x8_InitRegister( void ); |
|---|
| 801 | unsigned char STV82x8_SetDefaultValueFromSTDConfig ( void ); |
|---|
| 802 | unsigned char STV82x8_SetDACMute( void ); |
|---|
| 803 | unsigned char STV82x8_SetDACUnMute( void ); |
|---|
| 804 | unsigned char STV82x8_SetScart1DigitalMute( void ); |
|---|
| 805 | unsigned char STV82x8_SetScart1DigitalUnMute( void ); |
|---|
| 806 | unsigned char STV82x8_SetSPDIFDigitalMute( void ); |
|---|
| 807 | unsigned char STV82x8_SetSPDIFDigitalUnMute( void ); |
|---|
| 808 | unsigned char STV82x8_SetSPDIFMute(void); |
|---|
| 809 | unsigned char STV82x8_SetSPDIFUnMute(void); |
|---|
| 810 | unsigned char STV82x8_SetI2SInOut( unsigned char ucI2S_InOut ); |
|---|
| 811 | unsigned char STV82x8_SetI2SOutputSignal( unsigned char ucI2S_Output ); |
|---|
| 812 | unsigned char STV82x8_SetVolumeMode( unsigned char usVolumeMode ); |
|---|
| 813 | unsigned char STV82x8_SetLeftVolume( unsigned short usVolume ); |
|---|
| 814 | unsigned char STV82x8_SetRightVolume( unsigned short usVolume ); |
|---|
| 815 | unsigned char STV82x8_SetCenterVolume( unsigned short usVolume ); |
|---|
| 816 | unsigned char STV82x8_SetMasterVolume( unsigned short usVolume ); |
|---|
| 817 | unsigned char STV82x8_SetSurroundLeftVolume( unsigned short usVolume ); |
|---|
| 818 | unsigned char STV82x8_SetSurroundRightVolume( unsigned short usVolume ); |
|---|
| 819 | unsigned char STV82x8_SetLeftScartVolume( unsigned short usVolume ); |
|---|
| 820 | unsigned char STV82x8_SetRightScartVolume( unsigned short usVolume ); |
|---|
| 821 | unsigned char STV82x8_WakeUpADC( void ); |
|---|
| 822 | unsigned char STV82x8_WakeUpIRQ0( void ); |
|---|
| 823 | unsigned char STV82x8_SetFMTimeOut( unsigned char ucTimeOut ); |
|---|
| 824 | unsigned char STV82x8_SetLSBalance(unsigned char ucBalance); |
|---|
| 825 | unsigned char STV82x8_SetEqualizerValue( unsigned char ucEqualizerIndex, unsigned char ucEQBandIndex ); |
|---|
| 826 | unsigned char STV82x8_SetLoudSpkHeadPhoneGain(unsigned char ucType, unsigned char ucGain); |
|---|
| 827 | unsigned char STV82x8_SetPseudoEffect( unsigned char ucPseudo ); |
|---|
| 828 | unsigned char STV82x8_ControlTurboSound( unsigned char ucTurbo, unsigned char ucLoudnessIndex ); |
|---|
| 829 | unsigned char STV82x8_AutoVolumeCtrl( unsigned char SvcSel ); |
|---|
| 830 | unsigned char STV82x8_RefreshSTV( void ); |
|---|
| 831 | unsigned char STV82x8_CheckElectricalShock( void ); |
|---|
| 832 | unsigned char STV82x8_SetScartDefaultPrescale( void ); |
|---|
| 833 | unsigned char STV82x8_SetMonoStereoDefaultPrescale( void ); |
|---|
| 834 | unsigned char STV82x8_SAPDefaultPrescale( void ); |
|---|
| 835 | unsigned char STV82x8_I2SDefaultPrescale(unsigned char ucI2SPort, unsigned char ucPreScaleVal); |
|---|
| 836 | unsigned char STV82x8_GetSoundSignalState( unsigned char * pucSignalState ); |
|---|
| 837 | unsigned char STV82x8_All_SoundSystem_Check( void ); |
|---|
| 838 | unsigned char STV82x8_SetValueForSPDIF( void ); |
|---|
| 839 | unsigned char STV82x8_BeeperAmbulanceSound( void ); |
|---|
| 840 | unsigned char STV82x8_GetSoundSystem(unsigned char * pucSoundSystem, BOOL bDetectFM); |
|---|
| 841 | unsigned char STV82x8_GetSoundSystem_Independ(unsigned char * pucSoundSystem, BOOL bDetectFM); |
|---|
| 842 | unsigned char STV82x8_ChangeMTS_Manual (unsigned char ucMTS); |
|---|
| 843 | unsigned char STV82x8_SetStereoTimeOut( unsigned char ucTimeOut ); |
|---|
| 844 | unsigned char STV82x8_SetScartDACMute( void ); |
|---|
| 845 | unsigned char STV82x8_SetScartDACUnMute( void ); |
|---|
| 846 | unsigned char STV82x8_SetLeftScartVolume( unsigned short usVolume ); |
|---|
| 847 | unsigned char STV82x8_SetRightScartVolume( unsigned short usVolume ); |
|---|
| 848 | unsigned char STV82x8_ScartOutBalance( unsigned char ucBalance ); |
|---|
| 849 | unsigned char STV82x8_SetSRS_InputMode( unsigned char ucSRS_InputMode ); |
|---|
| 850 | unsigned char STV82x8_SetSRSWOW_Effect( unsigned char ucSRSWOW ); |
|---|
| 851 | unsigned char STV82x8_SetOutput_RFConfig(void); |
|---|
| 852 | unsigned char STV82x8_SetSRSTRS_DolbyPro1_Effect( unsigned char ucSRS_TruSurround, unsigned char ucDolby_ProLogic1 ); |
|---|
| 853 | unsigned char STV82x8_SetAutoMuteOnOff(unsigned char ucOnOff); |
|---|
| 854 | unsigned char STV82x8_Initialize(unsigned char i2c_num,unsigned char ucSlaveAddr); |
|---|
| 855 | unsigned char STV82x8_SetMuteAll(BOOL bMute); |
|---|
| 856 | unsigned char STV82x8_SetLoudSpkHeadPhoneGain(unsigned char ucType, unsigned char ucGain); |
|---|
| 857 | unsigned char STV82x8_ReturnToStereoFromMono(void); |
|---|
| 858 | unsigned char STV82x8_SAPConfig(unsigned char bSAP); |
|---|
| 859 | unsigned char STV82x8_SetSoundSystem(unsigned char ucSound); |
|---|
| 860 | unsigned char STV82x8_AutoVolumeHPCtrl(unsigned char ucSvcSel); |
|---|
| 861 | unsigned char STV82x8_SetHPLeftVolume(unsigned short usVolume); |
|---|
| 862 | unsigned char STV82x8_SetHPBalance(unsigned char ucBalance); |
|---|
| 863 | unsigned char STV82x8_SetHPConfiguration(unsigned char ucHP_Force, unsigned char ucLS_Mute, unsigned char ucHP_Active); |
|---|
| 864 | unsigned char STV82x8_WideSurroundMode(unsigned char ucWideSRSMode); |
|---|
| 865 | unsigned char STV82x8_SetSRS_TRUBASS(unsigned char ucTrubassType, unsigned char ucSRS_TruBass); |
|---|
| 866 | unsigned char STV82x8_SRSTruBaseLoudspeakerHeadphoneLevel(unsigned char ucTrubassType, unsigned char ucLevel); |
|---|
| 867 | unsigned char STV82x8_DialogClarityLevel(unsigned char ucLevel); |
|---|
| 868 | unsigned char STV82x8_AudioMatrix_HeadphoneOut (unsigned char ucInput); |
|---|
| 869 | unsigned char STV82x8_AuxVolSelection(unsigned char ucAuxSel); |
|---|
| 870 | unsigned char STV82x8_SetLSSubWooferVolume(unsigned short usVolume); |
|---|
| 871 | unsigned char STV82x8_SetDigitalMute(unsigned char ucMute, unsigned char ucMask); |
|---|
| 872 | unsigned char STV82x8_SetDigitalUnMute(unsigned char ucUnMute, unsigned char ucMask); |
|---|
| 873 | unsigned char STV82x8_SetSubWoofer(unsigned char ucSubWoofer, unsigned char ucBassManage, unsigned char ucBassGainSW, unsigned char ucSTLFEAdd, unsigned char ucDolbyPro, unsigned char ucBassConfNum); |
|---|
| 874 | unsigned char STV82x8_MuteSPDIF(BOOL bMute); |
|---|
| 875 | unsigned char STV82x8_Enble_Equalizer(unsigned char ucOnOff, unsigned char ucType, unsigned char ucIndex ); |
|---|
| 876 | |
|---|
| 877 | |
|---|
| 878 | unsigned char STV82x8_EXT_OpenDevice(unsigned char ucSubAddr, int I2CMasterNum); |
|---|
| 879 | unsigned char STV82x8_SetOutput_I2SConfig(void); |
|---|
| 880 | unsigned char STV82x8_Set_SPDIFOut (unsigned char Input1, unsigned char Input2); |
|---|
| 881 | unsigned char STV82x8_SetInOutput_ScartConfig(ScartNo_t ScartNo); |
|---|
| 882 | unsigned char STV82x8_Control_ChannelMatrixLS (unsigned char ucInput ); |
|---|
| 883 | |
|---|
| 884 | |
|---|
| 885 | #endif |
|---|
| 886 | |
|---|
| 887 | |
|---|
| 888 | |
|---|
| 889 | /******************************************************************************************** |
|---|
| 890 | * End Of File |
|---|
| 891 | ********************************************************************************************/ |
|---|