| 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_reg.h,v $ |
|---|
| 29 | // Revision 1.1 2011/07/08 03:43:14 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:55 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 | #include "datatype.h" |
|---|
| 123 | |
|---|
| 124 | #define STV82X8_PATCH_VERSION 0x18 |
|---|
| 125 | |
|---|
| 126 | #if !defined( NULL ) |
|---|
| 127 | #define NULL 0x00 |
|---|
| 128 | #endif |
|---|
| 129 | |
|---|
| 130 | #if !defined( TRUE ) && !defined( FALSE ) |
|---|
| 131 | #define TRUE 0x01 |
|---|
| 132 | #define FALSE 0x00 |
|---|
| 133 | #endif |
|---|
| 134 | |
|---|
| 135 | //******************************************************* |
|---|
| 136 | // Register Define |
|---|
| 137 | //******************************************************* |
|---|
| 138 | #define CUT_ID 0x00 |
|---|
| 139 | #define SW_RESET 0x01 |
|---|
| 140 | #define I2S_CTRL 0x04 |
|---|
| 141 | #define I2S_STAT 0x05 |
|---|
| 142 | #define I2S_SYNC_OFFSET 0x06 |
|---|
| 143 | #define DEMOD_STAT 0x0D |
|---|
| 144 | #define AGC_CTRL 0x0E |
|---|
| 145 | #define AGC_GAIN 0x0F |
|---|
| 146 | |
|---|
| 147 | #define CARFQ1H 0x12 |
|---|
| 148 | #define CARFQ1M 0x13 |
|---|
| 149 | #define CARFQ1L 0x14 |
|---|
| 150 | |
|---|
| 151 | #define CETH1_REG 0x20 |
|---|
| 152 | #define SQTH1 0x21 |
|---|
| 153 | |
|---|
| 154 | #define CARFQ2H 0x28 |
|---|
| 155 | #define CARFQ2M 0x29 |
|---|
| 156 | #define CARFQ2L 0x30 |
|---|
| 157 | #define SAP_CONF 0x47 |
|---|
| 158 | #define SAP_LEVEL_H 0x48 |
|---|
| 159 | #define SAP_LEVEL_L 0x49 |
|---|
| 160 | #define PLL_P_GAIN 0x4D |
|---|
| 161 | #define SAP_SQ_TH 0x4F |
|---|
| 162 | |
|---|
| 163 | #define ADC_CTRL 0x56 |
|---|
| 164 | #define SCART1_2_OUTPUT_CTRL 0x57 |
|---|
| 165 | #define SCART3_OUTPUT_CTRL 0x58 |
|---|
| 166 | |
|---|
| 167 | #define HOST_CMD 0x80 |
|---|
| 168 | #define IRQ_STAT 0x81 |
|---|
| 169 | #define DSP_STATUS 0x84 |
|---|
| 170 | #define DSP_RUN 0x85 |
|---|
| 171 | #define I2S_CONFIG 0x86 |
|---|
| 172 | |
|---|
| 173 | #define AUTOSTD_CTRL 0x8A |
|---|
| 174 | #define AUTOSTD_TIME 0x8B |
|---|
| 175 | #define AUTOSTD_STATUS 0x8C |
|---|
| 176 | #define AUTOSTD_DEM_STATUS 0x8D |
|---|
| 177 | |
|---|
| 178 | #define BTSC_FINE_PRESCAL_ST 0x90 |
|---|
| 179 | #define BTSC_FINE_PRESCAL_SAP 0x91 |
|---|
| 180 | #define BTSC_CONTROL 0x92 |
|---|
| 181 | |
|---|
| 182 | #define PRESCALE_MONO 0x94 |
|---|
| 183 | #define PRESCALE_STEREO 0x95 |
|---|
| 184 | #define PRESCALE_SAP 0x96 |
|---|
| 185 | #define PRESCALE_SCART 0x97 |
|---|
| 186 | #define PRESCALE_I2S_0 0x98 |
|---|
| 187 | #define PRESCALE_I2S_1 0x99 |
|---|
| 188 | #define PRESCALE_I2S_2 0x9A |
|---|
| 189 | |
|---|
| 190 | #define DEEMPHASIS_DEMATRIX 0x9B |
|---|
| 191 | |
|---|
| 192 | #define AUDIO_MATRIX1_INPUT 0xA2 |
|---|
| 193 | #define AUDIO_MATRIX2_INPUT 0xA3 |
|---|
| 194 | #define AUDIO_MATRIX3_INPUT 0xA4 |
|---|
| 195 | #define CHANNEL_MATRIX_LS 0xA5 |
|---|
| 196 | #define CHANNEL_MATRIX_SPDIF 0xA9 |
|---|
| 197 | |
|---|
| 198 | #define AV_DELAY_CONFIG 0xAD |
|---|
| 199 | #define AV_DELAY_TIME_LS 0xAE |
|---|
| 200 | #define AV_DELAY_TIME_HP 0xAF |
|---|
| 201 | |
|---|
| 202 | #define NOISE_GENERATOR 0xB4 |
|---|
| 203 | #define TRUSRND_CONTROL 0xB7 |
|---|
| 204 | #define TRUSRND_DC_ELEVATION 0xB8 |
|---|
| 205 | #define TRUSRND_INPUT_GAIN 0xB9 |
|---|
| 206 | #define TRUBASS_LS_CONTROL 0xBA |
|---|
| 207 | #define TRUBASS_LS_LEVEL 0xBB |
|---|
| 208 | #define TRUBASS_HP_CONTROL 0xBC |
|---|
| 209 | #define TRUBASS_HP_LEVEL 0xBD |
|---|
| 210 | #define SVC_LS_CONTROL 0xBE |
|---|
| 211 | #define SVC_LS_TIME_TH 0xBF |
|---|
| 212 | #define SVC_LS_GAIN 0xC0 |
|---|
| 213 | #define SVC_HP_CONTROL 0xC1 |
|---|
| 214 | #define SVC_HP_TIME_TH 0xC2 |
|---|
| 215 | #define SVC_HP_GAIN 0xC3 |
|---|
| 216 | |
|---|
| 217 | #define STSRND_CONTROL 0xC4 |
|---|
| 218 | #define STSRND_FREQ 0xC5 |
|---|
| 219 | #define STSRND_LEVEL 0xC6 |
|---|
| 220 | #define DYNAMIC_BASS_LS 0xC8 |
|---|
| 221 | #define DYNAMIC_BASS_HP 0xC9 |
|---|
| 222 | |
|---|
| 223 | #define LS_EQ_BT_CTRL 0xCC |
|---|
| 224 | #define LS_EQ_BAND 0xCD |
|---|
| 225 | |
|---|
| 226 | #define LS_BASS_GAIN 0xD2 |
|---|
| 227 | #define LS_TREBLE_GAIN 0xD3 |
|---|
| 228 | #define HP_BASS_GAIN 0xD4 |
|---|
| 229 | #define HP_TREBLE_GAIN 0xD5 |
|---|
| 230 | |
|---|
| 231 | #define OUTPUT_BASS_MNGT 0xD6 |
|---|
| 232 | #define LS_LOUDNESS 0xD7 |
|---|
| 233 | #define HP_LOUDNESS 0xD8 |
|---|
| 234 | |
|---|
| 235 | #define VOLUME_MODES 0xD9 |
|---|
| 236 | #define LS_L_VOLUME_MSB 0xDA |
|---|
| 237 | #define LS_L_VOLUME_LSB 0xDB |
|---|
| 238 | #define LS_R_VOLUME_MSB 0xDC |
|---|
| 239 | #define LS_R_VOLUME_LSB 0xDD |
|---|
| 240 | #define LS_C_VOLUME_MSB 0xDE |
|---|
| 241 | #define LS_C_VOLUME_LSB 0xDF |
|---|
| 242 | #define LS_SUB_VOLUME_MSB 0xE0 |
|---|
| 243 | #define LS_SUB_VOLUME_LSB 0xE1 |
|---|
| 244 | #define LS_SL_VOLUME_MSB 0xE2 |
|---|
| 245 | #define LS_SL_VOLUME_LSB 0xE3 |
|---|
| 246 | #define LS_SR_VOLUME_MSB 0xE4 |
|---|
| 247 | #define LS_SR_VOLUME_LSB 0xE5 |
|---|
| 248 | #define LS_MASTER_VOLUME_MSB 0xE6 |
|---|
| 249 | #define LS_MASTER_VOLUME_LSB 0xE7 |
|---|
| 250 | #define HP_L_VOL_MSB 0xE8 |
|---|
| 251 | #define HP_L_VOL_LSB 0xE9 |
|---|
| 252 | #define HP_R_VOL_MSB 0xEA |
|---|
| 253 | #define HP_R_VOL_LSB 0xEB |
|---|
| 254 | |
|---|
| 255 | #define AUX_VOL_INDEX 0xEC |
|---|
| 256 | #define AUX_L_VOL_MSB 0xED |
|---|
| 257 | #define AUX_L_VOL_LSB 0xEE |
|---|
| 258 | #define AUX_R_VOL_MSB 0xEF |
|---|
| 259 | #define AUX_R_VOL_LSB 0xF0 |
|---|
| 260 | |
|---|
| 261 | #define MUTE_DIGITAL 0xF1 |
|---|
| 262 | #define BEEPER_ON 0xF2 |
|---|
| 263 | #define BEEPER_MODE 0xF3 |
|---|
| 264 | #define BEEPER_FREQ_VOL 0xF4 |
|---|
| 265 | #define HEADPHONE_CONFIG 0xF6 |
|---|
| 266 | #define DAC_CTRL 0xF7 |
|---|
| 267 | #define DAC_SW_CH 0xF8 |
|---|
| 268 | #define S_PDIF_SW_CH 0xF9 |
|---|
| 269 | |
|---|
| 270 | #define AUTOSTD_COEFF_CTRL 0xFB |
|---|
| 271 | #define AUTOSTD_COEFF_INDEX_MSB 0xFC |
|---|
| 272 | #define AUTOSTD_COEFF_INDEX_LSB 0xFD |
|---|
| 273 | #define AUTOSTD_COEFF_VAL 0xFE |
|---|
| 274 | |
|---|
| 275 | #define PATCH_VERSION 0xFF |
|---|
| 276 | |
|---|
| 277 | //******************************************************* |
|---|
| 278 | // Register Mask Define |
|---|
| 279 | //******************************************************* |
|---|
| 280 | /* Volume_Control */ |
|---|
| 281 | #define VOLUME_MSB_MASK 0x00FF |
|---|
| 282 | #define VOLUME_LSB_MASK 0x0003 |
|---|
| 283 | #define BALANCE_MSB_MASK 0x00FF |
|---|
| 284 | #define BALANCE_LSB_MASK 0x0003 |
|---|
| 285 | |
|---|
| 286 | /* SW_RESET */ |
|---|
| 287 | //#define STV82X8_SOFT_RESETALL_MASK 0x01 |
|---|
| 288 | #define STV82X8_SOFT_RESETALL_MASK 0x61 // I2S data pin is Input port for Artoo |
|---|
| 289 | |
|---|
| 290 | /* IRQ_STAT */ |
|---|
| 291 | #define STV82X8_IRQ0_MASK 0x01 |
|---|
| 292 | #define STV82X8_IRQ3_MASK 0x08 |
|---|
| 293 | |
|---|
| 294 | /* MUTE_DIGITAL */ |
|---|
| 295 | #define STV82X8_DIGITAL_MUTE_MASK 0x8F |
|---|
| 296 | #define STV82X8_DIGITALMUTE_SCART1_MASK 0x10 |
|---|
| 297 | #define STV82X8_DIGITALMUTE_SCART2_MASK 0x20 |
|---|
| 298 | #define STV82X8_DIGITALMUTE_SPDIF_MASK 0x40 |
|---|
| 299 | #define STV82x8_DIGITAL_AUTOSTD_MUTE_MASK 0x80 |
|---|
| 300 | #define STV82x8_MUTEDIG_SUBWOOFER_MASK 0x04 |
|---|
| 301 | #define STV82x8_DAC_SUBWOOFER_MASK 0x04 |
|---|
| 302 | |
|---|
| 303 | /* HEADPHONE_CONFIG */ |
|---|
| 304 | #define STV82X8_HP_CONFIG_MASK 0x0E |
|---|
| 305 | #define STV82X8_HP_DETECTED_MASK 0x01 |
|---|
| 306 | |
|---|
| 307 | /* ADC_CTRL */ |
|---|
| 308 | #define STV82X8_ADC_WAKEUP_MASK 0x08 |
|---|
| 309 | #define STV82x8_I2S_DATA0_CTRL_MASK 0xE0 |
|---|
| 310 | #define STV82X8_I2S_OUTPUT_LR 0x00 |
|---|
| 311 | #define STV82X8_I2S_OUTPUT_HP_SURROUND 0x20 |
|---|
| 312 | #define STV82X8_I2S_OUTPUT_C_SUB 0x40 |
|---|
| 313 | #define STV82X8_I2S_OUTPUT_SCART 0x60 |
|---|
| 314 | #define STV82X8_I2S_OUTPUT_SPDIF 0x80 |
|---|
| 315 | #define STV82X8_I2S_OUTPUT_DELAY 0xA0 |
|---|
| 316 | #define STV82X8_ADCINPUT_MASK 0x07 |
|---|
| 317 | |
|---|
| 318 | |
|---|
| 319 | /* TRUSRND_INPUT_GAIN */ |
|---|
| 320 | #define STV82x8_TRUSRND_INPUT_GAIN 0x05 // -2.5 dB |
|---|
| 321 | |
|---|
| 322 | /* TRUSRND_DC_ELEVATION */ |
|---|
| 323 | #define STV82x8_TRUSRND_DC_ELEVATION 0x00 // 0 dB |
|---|
| 324 | |
|---|
| 325 | /* AV_DELAY_CONFIG */ |
|---|
| 326 | #define STV82X8_AV_DELAY_ON_MASK 0x01 |
|---|
| 327 | #define STV82X8_DOLBY_DELAY_ON_MASK 0x02 |
|---|
| 328 | |
|---|
| 329 | /* IRQ_CTRL */ |
|---|
| 330 | #define STV82X8_IRQ0_WAKEUP_MASK 0x08 |
|---|
| 331 | |
|---|
| 332 | /* DAC_CTRL */ |
|---|
| 333 | #define STV82X8_DAC_MUTE_MASK 0x1E |
|---|
| 334 | #define STV82x8_MUX_MASK 0x20 |
|---|
| 335 | |
|---|
| 336 | /* VOLUME_MODES */ |
|---|
| 337 | #define STV82X8_VOLUMEMODE_MASK 0x07 |
|---|
| 338 | #define STV82X8_SCART_VOLUMEMODE_MASK 0x08 |
|---|
| 339 | |
|---|
| 340 | /* VOLUME Control */ |
|---|
| 341 | #define STV82X8_VOLUMEMMSB_MASK 0xFF |
|---|
| 342 | #define STV82X8_VOLUMEMLSB_MASK 0x03 |
|---|
| 343 | |
|---|
| 344 | /* DSP_STATUS */ |
|---|
| 345 | #define STV82X8_INIT_MEM_MASK 0x01 |
|---|
| 346 | |
|---|
| 347 | /* AUTOSTD_TIMERS */ |
|---|
| 348 | #define STV82X8_FM_TIME_MASK 0x03 |
|---|
| 349 | #define STV82X8_STEREO_TIME_MASK 0x1C |
|---|
| 350 | |
|---|
| 351 | /* SVC_LS_CONTROL */ |
|---|
| 352 | #define STV82X8_SVCON_MASK 0x01 |
|---|
| 353 | |
|---|
| 354 | /* DYNAMIC_BASS_LS */ |
|---|
| 355 | #define STV82X8_STDYNAMIC_BASS_MASK 0x01 |
|---|
| 356 | #define STV82X8_BASS_FREQ_MASK 0x06 |
|---|
| 357 | |
|---|
| 358 | /* AV_DELAY */ |
|---|
| 359 | #define STV82x8_AV_DELAY_ON 0x01 |
|---|
| 360 | #define STV82x8_AV_DELAY_OFF 0x00 |
|---|
| 361 | #define STV82x8_Dolby_DELAY_ON 0x02 |
|---|
| 362 | #define STV82x8_Dolby_DELAY_OFF 0x00 |
|---|
| 363 | #define STV82x8_DolbyOn_MAX_VALUE 100 |
|---|
| 364 | #define STV82x8_DolbyOff_MAX_VALUE 177 |
|---|
| 365 | |
|---|
| 366 | #define STV82X8_DolbyDelay_On 0x02 |
|---|
| 367 | #define STV82X8_DolbyDelay_Off 0x00 |
|---|
| 368 | |
|---|
| 369 | /* AUTOSTD_STANDARD_DETECT */ |
|---|
| 370 | #define STV82X8_STANDARD_DETECT_MASK 0x0F |
|---|
| 371 | #define STV82X8_SOUNDMONO_ALL_CHECK SCART_PRESCALING_DEFAULTVALU 0x0F |
|---|
| 372 | |
|---|
| 373 | /* AUTOSTD_STEREO_DETECT */ |
|---|
| 374 | #define STV82X8_AUTOSTD_ALL_CHECK 0x07 |
|---|
| 375 | #define STV82X8_AUTOSTD_STEREO_CHECK 0x03 |
|---|
| 376 | #define STV82X8_AUTOSTD_MONO_CHECK 0x01 |
|---|
| 377 | |
|---|
| 378 | /* AUTOSTD_STATUS */ |
|---|
| 379 | #define STV82X8_AUTOSTD_STATUS_MASK 0x0E |
|---|
| 380 | |
|---|
| 381 | /* AUTOSTD_DEM_STATUS */ |
|---|
| 382 | #define STV82X8_AUTOSTD_DEM_STATUS_MASK 0x3C |
|---|
| 383 | |
|---|
| 384 | /* HOST_CMD */ |
|---|
| 385 | #define STV82X8_HWINITDSP_MASK 0x04 |
|---|
| 386 | |
|---|
| 387 | /* DSP_RUN */ |
|---|
| 388 | #define STV82X8_INITDSPHOSTRUN_MASK 0x01 |
|---|
| 389 | |
|---|
| 390 | /* I2S_CONFIG*/ |
|---|
| 391 | #define STV82X8_I2S_CONFIG_MASK 0x0F |
|---|
| 392 | |
|---|
| 393 | /* AGC_CTRL */ |
|---|
| 394 | #define STV82X8_AGC_CMD_MASK 0x80 |
|---|
| 395 | #define STV82X8_AGC_VALUE_MASK 0x7C |
|---|
| 396 | |
|---|
| 397 | /* OUTPUT_BASS_MNGT */ |
|---|
| 398 | #define OUTPUT_BASS_MNGT_MASK 0xFF |
|---|
| 399 | |
|---|
| 400 | /* PRESCALE_MONO */ |
|---|
| 401 | #define PRESCALE_MONO_MASK 0x7F |
|---|
| 402 | |
|---|
| 403 | /* TRUSRND_CONTROL */ |
|---|
| 404 | #define STV82X8_PSEUDO_MASK 0x01 |
|---|
| 405 | #define STV82X8_SRS_MASK 0x09 |
|---|
| 406 | |
|---|
| 407 | /* LS_LOUDNESS */ |
|---|
| 408 | #define LS_LOUDNESS_MASK 0x0F |
|---|
| 409 | |
|---|
| 410 | /* SVC_LS_TIME_TH */ |
|---|
| 411 | #define SVC_LS_TIME_TH_MASK 0x1F |
|---|
| 412 | |
|---|
| 413 | /* AUDIO_MATRIX1_INPUT */ |
|---|
| 414 | #define STV82X8_MATRIX1_INPUT_MASK 0x07 |
|---|
| 415 | #define STV82X8_MATRIX3_INPUT_MASK 0x38 |
|---|
| 416 | |
|---|
| 417 | /* SCART1_2_OUTPUT_CTRL */ |
|---|
| 418 | #define STV82X8_SCARTOUT_SC2OUT_MASK 0x70 |
|---|
| 419 | |
|---|
| 420 | /* CHANNEL_MATRIX_LS */ |
|---|
| 421 | #define CM_MATRIX_LS_MASK 0x07 |
|---|
| 422 | #define AUTOSTD_CTRL_LS_MASK 0x80 |
|---|
| 423 | |
|---|
| 424 | /* CHANNEL_MATRIX_SPDIF */ |
|---|
| 425 | #define STV82x8_CMMATRIX_SPDIF_MASK 0x07 |
|---|
| 426 | |
|---|
| 427 | /* AUTOSTD_CTRL */ |
|---|
| 428 | #define STV82X8_AUTOSTD_CHECK_MASK 0x07 |
|---|
| 429 | |
|---|
| 430 | #define STV82X8_BEEPER_PULSE_MASK 0x04 |
|---|
| 431 | #define STV82X8_BEEPEROUT_LS_MASK 0x03 |
|---|
| 432 | |
|---|
| 433 | /* BEEPER_FREQ_VOL */ |
|---|
| 434 | #define BEEPER_FREQ_MASK 0xE0 |
|---|
| 435 | |
|---|
| 436 | /* BEEPER_ON */ |
|---|
| 437 | #define BEEPER_ON_MASK 0x01 |
|---|
| 438 | |
|---|
| 439 | /* Treble/Equalize_CONTROL --Josie 8/21*/ |
|---|
| 440 | |
|---|
| 441 | #define STV82X8_EQUALIZE_MASK 0x07 |
|---|
| 442 | |
|---|
| 443 | |
|---|
| 444 | //******************************************************* |
|---|
| 445 | // Definition |
|---|
| 446 | //******************************************************* |
|---|
| 447 | |
|---|
| 448 | /* Sound system */ |
|---|
| 449 | #define BG_SYSTEM 0 |
|---|
| 450 | #define DK_SYSTEM 1 |
|---|
| 451 | #define I_SYSTEM 2 |
|---|
| 452 | #define L_SYSTEM 3 |
|---|
| 453 | #define M_SYSTEM 4 |
|---|
| 454 | |
|---|
| 455 | /* Sound mode */ |
|---|
| 456 | #define MONO 0x00 |
|---|
| 457 | #define STEREO 0x01 |
|---|
| 458 | #define SAP 0x02 |
|---|
| 459 | #define SAP_STEREO 0x03 |
|---|
| 460 | #define NOTFOUND_SOUND 0x04 |
|---|
| 461 | |
|---|
| 462 | #define MONO_CHECK 0x01 |
|---|
| 463 | #define STEREO_CHECK 0x02 |
|---|
| 464 | #define SAP_CHECK 0x04 |
|---|
| 465 | |
|---|
| 466 | /* Option for extra effect */ |
|---|
| 467 | #define STV82X8_TURBO_SOUND_ON 0x01 |
|---|
| 468 | #define STV82X8_TURBO_SOUND_OFF 0x00 |
|---|
| 469 | #define STV82X8_AUTO_VOLUME_ON 0x01 |
|---|
| 470 | #define STV82X8_AUTO_VOLUME_OFF 0x00 |
|---|
| 471 | #define STV82X8_NCSLOW_MODE 0x01 |
|---|
| 472 | #define STV82X8_NCFAST_MODE 0x00 |
|---|
| 473 | #define STV82X8_INPUT_AV1 0x01 |
|---|
| 474 | #define STV82X8_INPUT_AV2 0x02 |
|---|
| 475 | #define STV82X8_INPUT_AV3 0x03 |
|---|
| 476 | #define STV82X8_INPUT_AV4 0x04 |
|---|
| 477 | #define STV82x8_SVC_ON 0x01 |
|---|
| 478 | #define STV82x8_SVC_OFF 0x00 |
|---|
| 479 | |
|---|
| 480 | /* Error value */ |
|---|
| 481 | #define STV82X8_I2C_ERROR 0x01 |
|---|
| 482 | #define STV82X8_INVALID_PARAM 0x02 |
|---|
| 483 | #define STV82X8_UPDATE_ERROR 0x04 |
|---|
| 484 | #define STV82X8_RESOURCE_ERROR 0x08 |
|---|
| 485 | #define STV82X8_NO_ERROR 0x00 |
|---|
| 486 | |
|---|
| 487 | |
|---|
| 488 | /* VOLUME Control*/ |
|---|
| 489 | #define VOLUME_0DB_DEFAULT_VALUE 928 |
|---|
| 490 | #define STV82X8_LS_BALANCE_CENTER 0x0000 |
|---|
| 491 | |
|---|
| 492 | /* Signal state */ |
|---|
| 493 | #define STV82X8_SOUNDSIGNAL_UNLOCKED 0x00 |
|---|
| 494 | #define STV82X8_SOUNDSIGNAL_LOCKED 0x01 |
|---|
| 495 | |
|---|
| 496 | /* VOLUME_MODES */ |
|---|
| 497 | #define INDEPENDANT_MODE 0x01 |
|---|
| 498 | #define DIFFERENTIAL_MODE 0x02 |
|---|
| 499 | |
|---|
| 500 | /* Volume_Control */ |
|---|
| 501 | #define MASTER_VOLUME_SHIFT 0x08 |
|---|
| 502 | #define NORMAL_VOLUME_SHIFT 0x02 |
|---|
| 503 | #define NORMAL_BALANCE_SHIFT 0x02 |
|---|
| 504 | |
|---|
| 505 | /* AUTOSTD_TIMERS */ |
|---|
| 506 | #define FM_TIME_16MS 0x00 |
|---|
| 507 | #define FM_TIME_32MS 0x01 |
|---|
| 508 | #define FM_TIME_48MS 0x02 |
|---|
| 509 | #define FM_TIME_64MS 0x03 |
|---|
| 510 | |
|---|
| 511 | /* Balance */ |
|---|
| 512 | #define DEFAULT_LSB_BALANCE_VALUE 0x00 |
|---|
| 513 | |
|---|
| 514 | /* LS_EQ_BAND */ |
|---|
| 515 | #define EQUALIZER_100HZ 0x00 |
|---|
| 516 | #define EQUALIZER_330HZ 0x01 |
|---|
| 517 | #define EQUALIZER_1KHZ 0x02 |
|---|
| 518 | #define EQUALIZER_3P3KHZ 0x03 |
|---|
| 519 | #define EQUALIZER_10KHZ 0x04 |
|---|
| 520 | |
|---|
| 521 | /* SW_RESET */ |
|---|
| 522 | #define STV82X8_SOFT_RESET 0x01 |
|---|
| 523 | #define STV82X8_I2S_INPUT 0x00 |
|---|
| 524 | //#define STV82X8_I2S_OUTPUT 0x60 |
|---|
| 525 | #define STV82X8_I2S_OUTPUT 0x00 |
|---|
| 526 | |
|---|
| 527 | /* TRUSRND_CONTROL */ |
|---|
| 528 | #define STV82X8_PSEUDO_ON 0x01 |
|---|
| 529 | #define STV82X8_PSEUDO_OFF 0x00 |
|---|
| 530 | #define STV82X8_SRS_ON 0x09 |
|---|
| 531 | #define STV82X8_ALL_SRS_OFF 0x00 |
|---|
| 532 | #define STV82x8_SRS_WOW_ON 0x01 |
|---|
| 533 | #define STV82x8_SRS_WOW_OFF 0x00 |
|---|
| 534 | #define STV82x8_SRS_TRX_ON 0x01 |
|---|
| 535 | #define STV82x8_SRS_TRX_OFF 0x00 |
|---|
| 536 | #define STV82x8_DOLBY_PRO1_ON 0x01 |
|---|
| 537 | #define STV82x8_DOLBY_PRO1_OFF 0x00 |
|---|
| 538 | |
|---|
| 539 | #define STV82x8_SRS_MONO_LEFT 0x01 |
|---|
| 540 | #define STV82x8_SRS_MONO_DCLARITY 0x02 |
|---|
| 541 | #define STV82x8_SRS_LR_STEREO 0x03 |
|---|
| 542 | #define STV82x8_SRS_LR_STEREO_DCLARITY 0x04 |
|---|
| 543 | #define STV82x8_SRS_LSR 0x05 |
|---|
| 544 | #define STV82x8_SRS_LSR_DCLARITY 0x06 |
|---|
| 545 | #define STV82x8_SRS_LRLsRs 0x07 |
|---|
| 546 | #define STV82x8_SRS_LRLsRs_DCLARITY 0x08 |
|---|
| 547 | #define STV82x8_SRS_LRC 0x09 |
|---|
| 548 | #define STV82x8_SRS_LRC_DCLARITY 0x0A |
|---|
| 549 | #define STV82x8_SRS_LRCS 0x0B |
|---|
| 550 | #define STV82x8_SRS_LRCS_DCLARITY 0x0C |
|---|
| 551 | #define STV82x8_SRS_LRCLsRs 0x0D |
|---|
| 552 | #define STV82x8_SRS_LRCLsRs_DCLARITY 0x0E |
|---|
| 553 | #define STV82x8_SRS_LtRt 0x0F |
|---|
| 554 | #define STV82x8_SRS_LtRt_DCLARITY 0x10 |
|---|
| 555 | #define STV82x8_SRS_LRCLsRs_SRS 0x11 |
|---|
| 556 | #define STV82x8_SRS_LRCLsRs_SRS_DCLARITY 0x12 |
|---|
| 557 | #define STV82x8_SRS_LRCLsRs_TRX 0x13 |
|---|
| 558 | #define STV82x8_SRS_LRCLsRs_TRX_DCLARITY 0x14 |
|---|
| 559 | |
|---|
| 560 | #define STV82x8_TRUSURROUND_ON 0x01 |
|---|
| 561 | #define STV82x8_TRUSURROUND_OFF 0x00 |
|---|
| 562 | #define STV82x8_DIALOG_CLARITY_ON 0x80 |
|---|
| 563 | #define STV82x8_DIALOG_CLARITY_OFF 0x00 |
|---|
| 564 | #define STV82x8_HP_MODE_ON 0x40 |
|---|
| 565 | #define STV82x8_HP_MODE_OFF 0x00 |
|---|
| 566 | |
|---|
| 567 | #define STV82x8_TRUSRND_MONO_CENTER 0x00 |
|---|
| 568 | #define TRUSRND_BYPASS 0x02 |
|---|
| 569 | #define STV82x8_TRUSRND_MONO_LEFT 0x04 |
|---|
| 570 | #define STV82x8_TRUSRND_LR_STEREO 0x08 |
|---|
| 571 | #define STV82x8_TRUSRND_LSR 0x0C |
|---|
| 572 | #define STV82x8_TRUSRND_LSLsRs 0x10 |
|---|
| 573 | #define STV82x8_TRUSRND_LRC 0x14 |
|---|
| 574 | #define STV82x8_TRUSRND_LRCS 0x18 |
|---|
| 575 | #define STV82x8_TRUSRND_LRCLsRs_XT 0x1C |
|---|
| 576 | #define STV82x8_TRUSRND_LtRt 0x20 |
|---|
| 577 | #define STV82x8_TRUSRND_LRCLsRs_SRS 0x24 |
|---|
| 578 | #define STV82x8_TRUSRND_LRCLsRs_XTPRO2 0x28 |
|---|
| 579 | |
|---|
| 580 | /* TRUBASS_LS_CONTROL */ |
|---|
| 581 | #define STV82x8_TRUBASS_ON 0x01 |
|---|
| 582 | #define STV82x8_TRUBASS_OFF 0x00 |
|---|
| 583 | #define STV82x8_TRUBASS_LF_RESPOSE_40KHZ 0x00 |
|---|
| 584 | #define STV82x8_TRUBASS_LF_RESPOSE_60KHZ 0x02 |
|---|
| 585 | #define STV82x8_TRUBASS_LF_RESPOSE_100KHZ 0x04 |
|---|
| 586 | #define STV82x8_TRUBASS_LF_RESPOSE_150KHZ 0x06 |
|---|
| 587 | #define STV82x8_TRUBASS_LF_RESPOSE_200KHZ 0x08 |
|---|
| 588 | #define STV82x8_TRUBASS_LF_RESPOSE_250KHZ 0x0A |
|---|
| 589 | #define STV82x8_TRUBASS_LF_RESPOSE_300KHZ 0x0C |
|---|
| 590 | #define STV82x8_TRUBASS_LF_RESPOSE_400KHZ 0x0E |
|---|
| 591 | |
|---|
| 592 | #define STV82x8_TRUBASS_LS_LEVEL 0x00 |
|---|
| 593 | |
|---|
| 594 | #define STV82x8_SRS_TRUBASS_OFF 0x00 |
|---|
| 595 | #define STV82x8_SRS_TRUBASS_SMALL 0x01 |
|---|
| 596 | #define STV82x8_SRS_TRUBASS_MEDIUM 0x02 |
|---|
| 597 | #define STV82x8_SRS_TRUBASS_LARGE 0x03 |
|---|
| 598 | |
|---|
| 599 | /* ST_DYNAMIC_BASS */ |
|---|
| 600 | #define STV82x8_ST_DYNAMIC_BASS_ON 0x01 |
|---|
| 601 | #define STV82x8_ST_DYNAMIC_BASS_OFF 0x00 |
|---|
| 602 | #define STV82x8_100HZ_CUT_OFF 0x00 |
|---|
| 603 | #define STV82x8_150HZ_CUT_OFF 0x02 |
|---|
| 604 | #define STV82x8_200HZ_CUT_OFF 0x04 |
|---|
| 605 | #define STV82x8_BASS_LEVEL 0x1F |
|---|
| 606 | |
|---|
| 607 | /* SVC_LS_CONTROL */ |
|---|
| 608 | #define STV82X8_AUTOSVC_ON 0x01 |
|---|
| 609 | #define STV82X8_AUTOSVC_OFF 0x00 |
|---|
| 610 | |
|---|
| 611 | /* MUTE_DIGITAL */ |
|---|
| 612 | #define STV82X8_DIGITAL_UNMUTE_VALUE 0x00 |
|---|
| 613 | #define STV82X8_DIGITAL_MUTE_VALUE 0x8F |
|---|
| 614 | #define STV82X8_DIGITAL_LS_MUTE 0x01 |
|---|
| 615 | #define STV82X8_DIGITAL_LS_UNMUTE 0x00 |
|---|
| 616 | #define STV82X8_DIGITAL_SCART1_MUTE 0x10 |
|---|
| 617 | #define STV82X8_DIGITAL_SCART1_UNMUTE 0x00 |
|---|
| 618 | #define STV82X8_DIGITAL_SPDIF_MUTE 0x40 |
|---|
| 619 | #define STV82X8_DIGITAL_SPDIF_UNMUTE 0x00 |
|---|
| 620 | #define STV82x8_MUTEDIG_SUBWOOFER_MUTE 0x04 |
|---|
| 621 | #define STV82x8_MUTEDIG_SUBWOOFER_UNMUTE 0x00 |
|---|
| 622 | #define STV82x8_DIGITAL_HP_MUTE 0x80 |
|---|
| 623 | #define STV82x8_DIGITAL_HP_UMMUTE 0x00 |
|---|
| 624 | #define STV82x8_MUTE_ALL_OUTPUT 0xff |
|---|
| 625 | #define STV82x8_UNMUTE_ALL_OUTPUT 0x00 |
|---|
| 626 | #define STV82x8_ALL_OUTPUT_MASK 0xff |
|---|
| 627 | |
|---|
| 628 | /* DAC_CONTROL */ |
|---|
| 629 | #define STV82X8_SC_DAC_MUTE_MASK 0x10 |
|---|
| 630 | #define STV82X8_SC_DAC_MUTE_VALUE 0x10 |
|---|
| 631 | #define STV82X8_SC_DAC_UNMUTE_VALUE 0x00 |
|---|
| 632 | #define STV82x8_DAC_SUBWOOFER_MUTE 0x04 |
|---|
| 633 | #define STV82x8_DAC_SUBWOOFER_UNMUTE 0x00 |
|---|
| 634 | |
|---|
| 635 | /* HEADPHONE_CONFIG */ |
|---|
| 636 | #define STV82x8_HP_FORCE_ON 0x08 |
|---|
| 637 | #define STV82x8_HP_FORCE_OFF 0x00 |
|---|
| 638 | #define STV82x8_HP_LS_MUTE 0x04 |
|---|
| 639 | #define STV82x8_HP_LS_UNMUTE 0x00 |
|---|
| 640 | #define STV82x8_HP_DET_ACTIVE_ON 0x02 |
|---|
| 641 | #define STV82x8_HP_DET_ACTIVE_OFF 0x00 |
|---|
| 642 | #define STV82x8_HP_DETECTED 0x01 |
|---|
| 643 | #define STV82x8_HP_NOT_DETECTED 0x00 |
|---|
| 644 | |
|---|
| 645 | /* CHANNEL_MATRIX_LS */ |
|---|
| 646 | #define AUTOSTD_CTRL_LS_OFF 0x00 |
|---|
| 647 | #define AUTOSTD_CTRL_LS_ON 0x80 |
|---|
| 648 | #define BYPASS 0x00 |
|---|
| 649 | #define LEFT_ONLY 0x01 |
|---|
| 650 | #define RIGHT_ONLY 0x02 |
|---|
| 651 | #define LEFT_RIGHT_MIX 0x03 |
|---|
| 652 | #define SWAP 0x04 |
|---|
| 653 | |
|---|
| 654 | /* DAC_CTRL */ |
|---|
| 655 | #define Internal_SPDIF 0x00 |
|---|
| 656 | #define External_SPDIF 0x20 |
|---|
| 657 | |
|---|
| 658 | /* SW_RESET */ |
|---|
| 659 | #define STV82x8_I2S_INOUT_MASK 0x60 |
|---|
| 660 | |
|---|
| 661 | /* ADC_CTRL */ |
|---|
| 662 | #define STV82X8_ADC_WAKEUP_VALUE 0x08 |
|---|
| 663 | |
|---|
| 664 | /* ADC_CTRL */ |
|---|
| 665 | #define STV82X8_IRQ0_WAKEUP_VALUE 0x08 |
|---|
| 666 | |
|---|
| 667 | /* DAC_CTRL */ |
|---|
| 668 | #define STV82X8_DAC_MUTE_VALUE 0x1E |
|---|
| 669 | #define STV82X8_DAC_UNMUTE_VALUE 0x00 |
|---|
| 670 | |
|---|
| 671 | /* VOLUME_MODES */ |
|---|
| 672 | #define STV82X8_VOLUMEMODE_INDEPENDANT 0x00 |
|---|
| 673 | #define STV82X8_VOLUMEMODE_DIFFERENTIAL 0x07 |
|---|
| 674 | #define STV82X8_SCART_VOLUMEMODE_INDEPENDANT 0x00 |
|---|
| 675 | #define STV82X8_SCART_VOLUMEMODE_DIFFERENTIAL 0x08 |
|---|
| 676 | |
|---|
| 677 | /* SCART_Volume */ |
|---|
| 678 | #define STV82X8_SCART_VOLUME_DEFAULT 0xDE00 |
|---|
| 679 | |
|---|
| 680 | #define STV82X8_HEADPHONE_VOLUME_DEFAULT 0x037C |
|---|
| 681 | |
|---|
| 682 | /* AUDIO_MATRIX_CONF */ |
|---|
| 683 | #define STV82X8_SCART_MATRIX_VALUE 0x00 |
|---|
| 684 | |
|---|
| 685 | /* PRESCALE_AM & PRESCALE_FM & Nicam & Scart */ |
|---|
| 686 | #define MONO_PRESCALING_DEFAULTVALU 0x12 |
|---|
| 687 | #define STEREO_PRESCALING_DEFAULTVALU 0x10 |
|---|
| 688 | #define FM_PRESCALING_6DB 0x0C |
|---|
| 689 | #define SAP_PRESCALING_DEFAULTVALU 0x0A |
|---|
| 690 | #define SCART_PRESCALING_DEFAULTVALU 0x0A |
|---|
| 691 | #define I2S_PRESCALING_DEFAULTVALU 0x10 |
|---|
| 692 | |
|---|
| 693 | /* AUTOSTD_TIMERS */ |
|---|
| 694 | #define STV82X8_FMAM_TIME_16MS 0x00 |
|---|
| 695 | #define STV82X8_FMAM_TIME_32MS 0x01 |
|---|
| 696 | #define STV82X8_FMAM_TIME_48MS 0x02 |
|---|
| 697 | #define STV82X8_FMAM_TIME_64MS 0x03 |
|---|
| 698 | |
|---|
| 699 | /* SVC_LS_TIME_TH */ |
|---|
| 700 | #define STV82X8_SVC_30MSCONST_0DBGAIN 0x00 |
|---|
| 701 | #define STV82X8_SVC_30MSCONST_205DBGAIN 0x19 |
|---|
| 702 | #define STV82X8_SVC_16MSCONST_205DBGAIN 0x99 |
|---|
| 703 | |
|---|
| 704 | /* SVC_LS_GAIN */ |
|---|
| 705 | #define STV82X8_LS_HP_MAKE_UP_GAIN_AUTOON 0x1D |
|---|
| 706 | #define STV82X8_LS_HP_MAKE_UP_GAIN_AUTOOFF 0x00 |
|---|
| 707 | |
|---|
| 708 | /* TRUSRND_INPUT_GAIN */ |
|---|
| 709 | #define STV82X8_SRSGAIN_VALUE 0x05 |
|---|
| 710 | |
|---|
| 711 | /* AUDIO_MATRIX_INPUT */ |
|---|
| 712 | #define STV82X8_AUDIOINPUT_BTSC_DEM 0x02 |
|---|
| 713 | #define STV82X8_AUDIOINPUT_I2S 0x04 |
|---|
| 714 | #define STV82X8_AUDIOINPUT_SCART 0x05 |
|---|
| 715 | |
|---|
| 716 | /* BEEPER_ON */ |
|---|
| 717 | #define STV82X8_BEEPER_ON 0x01 |
|---|
| 718 | #define STV82X8_BEEPER_OFF 0x00 |
|---|
| 719 | |
|---|
| 720 | /* BEEPER_MODE */ |
|---|
| 721 | #define STV82X8_BEEPER_PULSE 0x00 |
|---|
| 722 | #define STV82X8_BEEPEROUT_LS 0x01 |
|---|
| 723 | |
|---|
| 724 | /* Treble Equalize ON/OFF : CCh ---Josie 8/21*/ |
|---|
| 725 | #define STV82X8_TREBLE_ON 0x07 |
|---|
| 726 | #define STV82X8_EQUALIZE_ON 0x01 |
|---|
| 727 | |
|---|
| 728 | |
|---|
| 729 | #define MUTE 0x00 |
|---|
| 730 | #define Delay 0x01 |
|---|
| 731 | #define DEMOD 0x02 |
|---|
| 732 | #define LtRt 0x03 |
|---|
| 733 | #define I2S 0x04 |
|---|
| 734 | #define SCART 0x05 |
|---|
| 735 | |
|---|
| 736 | typedef enum _tagScartType |
|---|
| 737 | { |
|---|
| 738 | SCART_INPUT1=STV82X8_INPUT_AV1, //has to been sync with STV82X8_INPUT_AV1 |
|---|
| 739 | SCART_INPUT2=STV82X8_INPUT_AV2, |
|---|
| 740 | SCART_INPUT3=STV82X8_INPUT_AV3, |
|---|
| 741 | SCART_INPUT4=STV82X8_INPUT_AV4 |
|---|
| 742 | } ScartNo_t; |
|---|
| 743 | |
|---|
| 744 | /* ADC_CTRL */ |
|---|
| 745 | #define STV82X8_SCARTINPUT_SC1 0x00 |
|---|
| 746 | #define STV82X8_SCARTINPUT_SC2 0x01 |
|---|
| 747 | #define STV82X8_SCARTINPUT_SC3 0x02 |
|---|
| 748 | #define STV82X8_SCARTINPUT_SC4 0x03 |
|---|
| 749 | #define STV82X8_SCARTOUT_CTRL_RF 0x88 |
|---|
| 750 | #define STV82X8_ADCINPUT_MONO 0x04 |
|---|
| 751 | |
|---|
| 752 | /* SCART1_2_OUTPUT_CTRL */ |
|---|
| 753 | #define SCARTOUT_SC1OUT_SC1_DSP 0x02 |
|---|
| 754 | #define SCARTOUT_SC1OUT_SC2_DSP 0x03 |
|---|
| 755 | #define SCARTOUT_SC1OUT_SC3_DSP 0x04 |
|---|
| 756 | #define SCARTOUT_SC1OUT_SC4_DSP 0x05 |
|---|
| 757 | #define SCARTOUT_SC2OUT_SC1_DSP 0x20 |
|---|
| 758 | #define SCARTOUT_SC2OUT_SC2_DSP 0x30 |
|---|
| 759 | #define SCARTOUT_SC2OUT_SC3_DSP 0x40 |
|---|
| 760 | #define SCARTOUT_SC2OUT_SC4_DSP 0x50 |
|---|
| 761 | |
|---|
| 762 | /* AUDIO_MATRIX_LANG */ |
|---|
| 763 | #define STV82X8_LANG_SEL_STEREO 0x00 |
|---|
| 764 | #define STV82X8_LANG_SEL_CH_A 0x15 |
|---|
| 765 | #define STV82X8_LANG_SEL_CH_B 0x2A |
|---|
| 766 | #define STV82X8_LANG_SEL_CH_C 0x3F |
|---|
| 767 | |
|---|
| 768 | /* NOISE_GENERATOR */ |
|---|
| 769 | #define STV82x8_NOISE_GENERATIONB_ON 0x01 |
|---|
| 770 | #define STV82x8_NOISE_GENERATIONB_OFF 0x00 |
|---|
| 771 | #define STV82x8_SRIGHT_NOISE_ON 0x40 |
|---|
| 772 | #define STV82x8_SLEFT_NOISE_ON 0x20 |
|---|
| 773 | #define STV82x8_SUB_NOISE_ON 0x10 |
|---|
| 774 | #define STV82x8_CENTER_NOISE_ON 0x08 |
|---|
| 775 | #define STV82x8_RIGHT_NOISE_ON 0x04 |
|---|
| 776 | #define STV82x8_LEFT_NOISE_ON 0x02 |
|---|
| 777 | #define STV82x8_OUTPUT_FULLRANGE 0x00 |
|---|
| 778 | #define STV82x8_OUTPUT_10_DB 0x80 |
|---|
| 779 | |
|---|
| 780 | /* Coefficient filter */ |
|---|
| 781 | #define SOUND_STAT_MONO 0x01 |
|---|
| 782 | #define SOUND_STAT_STEREO 0x02 |
|---|
| 783 | #define SOUND_STAT_DUAL 0x04 |
|---|
| 784 | #define SET_50KHZ_MODE 0x00 |
|---|
| 785 | #define SET_200KHZ_MODE 0x01 |
|---|
| 786 | |
|---|
| 787 | /* DEMOD_STAT */ |
|---|
| 788 | #define STV82X8_LCK_DET 0x20 |
|---|
| 789 | #define STV82X8_ST_DET 0x10 |
|---|
| 790 | #define STV82X8_SAP_SQ 0x08 |
|---|
| 791 | #define STV82X8_SAP_DET 0x04 |
|---|
| 792 | |
|---|
| 793 | #define STV82X8_FM1_CAR 0x02 |
|---|
| 794 | #define STV82X8_FM1_SQ 0x01 |
|---|
| 795 | |
|---|
| 796 | /* AUTOSTD_STATUS */ |
|---|
| 797 | #define STV82X8_SAP_OK 0x08 |
|---|
| 798 | #define STV82X8_STEREO_OK 0x04 |
|---|
| 799 | #define STV82X8_MONO_OK 0x02 |
|---|
| 800 | |
|---|
| 801 | /* AUTOSTD_CTRL */ |
|---|
| 802 | #define STV82X8_AUTOSTD_LSELECTION 0x01 |
|---|
| 803 | #define STV82X8_AUTOSTD_50KHZ 0x00 |
|---|
| 804 | #define STV82X8_AUTOSTD_200KHZ 0x02 |
|---|
| 805 | #define STV82X8_AUTOSTD_350KHZ 0x04 |
|---|
| 806 | #define STV82X8_AUTOSTD_500KHZ 0x06 |
|---|
| 807 | |
|---|
| 808 | /* OUTPUT_BASS_MNGT */ |
|---|
| 809 | #define STV82x8_BASSMNGT_ON 0x80 |
|---|
| 810 | #define STV82x8_BASSMNGT_OFF 0x00 |
|---|
| 811 | #define STV82x8_SUBWOOFER_ON 0x10 |
|---|
| 812 | #define STV82x8_SUBWOOFER_OFF 0x00 |
|---|
| 813 | #define STV82x8_GAINSW_ON 0x08 |
|---|
| 814 | #define STV82x8_GAINSW_OFF 0x00 |
|---|
| 815 | #define STV82x8_STLFEAdd_ON 0x40 |
|---|
| 816 | #define STV82x8_STLFEAdd_OFF 0x00 |
|---|
| 817 | #define STV82x8_DolbyPro_ON 0x20 |
|---|
| 818 | #define STV82x8_DolbyPro_OFF 0x00 |
|---|
| 819 | |
|---|
| 820 | #define ST_LFE_ADD_ 0x40 |
|---|
| 821 | #define DOLBY_PROLOGIC 0x20 |
|---|
| 822 | |
|---|
| 823 | #define STV82x8_BASSCONFI_0 0x00 |
|---|
| 824 | #define STV82x8_BASSCONFI_1 0x01 |
|---|
| 825 | #define STV82x8_BASSCONFI_2 0x02 |
|---|
| 826 | #define STV82x8_BASSCONFI_3 0x03 |
|---|
| 827 | #define STV82x8_BASSCONFI_4 0x04 |
|---|
| 828 | #define STV82x8_BASSCONFI_5 0x05 |
|---|
| 829 | #define STV82x8_BASSCONFI_6 0x06 |
|---|
| 830 | |
|---|
| 831 | /* LS_LOUDNESS */ |
|---|
| 832 | #define STV82X8_LOUNDNESS_ENABLE 0x01 |
|---|
| 833 | #define STV82X8_LOUNDNESS_DISABLE 0x00 |
|---|
| 834 | |
|---|
| 835 | /* AGC_CTRL */ |
|---|
| 836 | #define STV82X8_AGC_CMD_MANUAL 0x80 |
|---|
| 837 | #define STV82X8_AGC_CMD_AUTO 0x00 |
|---|
| 838 | |
|---|
| 839 | /* HOST_CMD */ |
|---|
| 840 | #define STV82X8_HWINITDSP_VALUE 0x04 |
|---|
| 841 | |
|---|
| 842 | /* DSP_RUN */ |
|---|
| 843 | #define STV82X8_INITDSPHOSTRUN_VALUE 0x01 |
|---|
| 844 | |
|---|
| 845 | #define AUTOSTD_CTRL_AUTO_MUTE_ON 0x08 |
|---|
| 846 | #define AUTOSTD_CTRL_AUTO_MUTE_OFF 0x00 |
|---|
| 847 | #define AUTOSTD_CTRL_AUTO_MUTE_MASK 0x08 |
|---|
| 848 | |
|---|
| 849 | /******************** For the coefficients *****************************/ |
|---|
| 850 | #define AUTOSTD_COEFF_INIT_TABLE 0x01 |
|---|
| 851 | #define AUTOSTD_COEFF_UPDATE_TABLE 0x02 |
|---|
| 852 | #define AUTOSTD_COEFF_ENTER_VALUE 0x00 |
|---|
| 853 | |
|---|
| 854 | #define FIRC0_200KHZ_VALUE 0x00 |
|---|
| 855 | #define FIRC1_200KHZ_VALUE 0x01 |
|---|
| 856 | #define FIRC2_200KHZ_VALUE 0x01 |
|---|
| 857 | #define FIRC3_200KHZ_VALUE 0xFC |
|---|
| 858 | #define FIRC4_200KHZ_VALUE 0x08 |
|---|
| 859 | #define FIRC5_200KHZ_VALUE 0xF6 |
|---|
| 860 | #define FIRC6_200KHZ_VALUE 0xF8 |
|---|
| 861 | #define FIRC7_200KHZ_VALUE 0x4A |
|---|
| 862 | |
|---|
| 863 | #define FIRC0_50KHZ_VALUE 0x00 |
|---|
| 864 | #define FIRC1_50KHZ_VALUE 0xFE |
|---|
| 865 | #define FIRC2_50KHZ_VALUE 0xFC |
|---|
| 866 | #define FIRC3_50KHZ_VALUE 0xFD |
|---|
| 867 | #define FIRC4_50KHZ_VALUE 0x02 |
|---|
| 868 | #define FIRC5_50KHZ_VALUE 0x0D |
|---|
| 869 | #define FIRC6_50KHZ_VALUE 0x18 |
|---|
| 870 | #define FIRC7_50KHZ_VALUE 0x1F |
|---|
| 871 | |
|---|
| 872 | #define FIRC0_27KHZ_VALUE 0xFF |
|---|
| 873 | #define FIRC1_27KHZ_VALUE 0xFE |
|---|
| 874 | #define FIRC2_27KHZ_VALUE 0xFE |
|---|
| 875 | #define FIRC3_27KHZ_VALUE 0x00 |
|---|
| 876 | #define FIRC4_27KHZ_VALUE 0x06 |
|---|
| 877 | #define FIRC5_27KHZ_VALUE 0x0E |
|---|
| 878 | #define FIRC6_27KHZ_VALUE 0x16 |
|---|
| 879 | #define FIRC7_27KHZ_VALUE 0x1B |
|---|
| 880 | |
|---|
| 881 | #define FM_ACOEFF_VALUE 0x2C |
|---|
| 882 | #define FM_BCOEFF_VALUE 0x0A |
|---|
| 883 | |
|---|
| 884 | #define FM_ACOEFF_RESET_VALUE 0x10 |
|---|
| 885 | #define FM_BCOEFF_RESET_VALUE 0x11 |
|---|
| 886 | |
|---|
| 887 | #define MN_FM_MONO_FIR1C0_INDEX 6 |
|---|
| 888 | #define MN_FM_MONO_FIR1C1_INDEX 7 |
|---|
| 889 | #define MN_FM_MONO_FIR1C2_INDEX 8 |
|---|
| 890 | #define MN_FM_MONO_FIR1C3_INDEX 9 |
|---|
| 891 | #define MN_FM_MONO_FIR1C4_INDEX 10 |
|---|
| 892 | #define MN_FM_MONO_FIR1C5_INDEX 11 |
|---|
| 893 | #define MN_FM_MONO_FIR1C6_INDEX 12 |
|---|
| 894 | #define MN_FM_MONO_FIR1C7_INDEX 13 |
|---|
| 895 | #define MN_FM_MONO_ACOEFF1_INDEX 14 |
|---|
| 896 | #define MN_FM_MONO_BCOEFF1_INDEX 15 |
|---|
| 897 | |
|---|
| 898 | #define BG_FM_MONO_FIR1C0_INDEX 21 |
|---|
| 899 | #define BG_FM_MONO_FIR1C1_INDEX 22 |
|---|
| 900 | #define BG_FM_MONO_FIR1C2_INDEX 23 |
|---|
| 901 | #define BG_FM_MONO_FIR1C3_INDEX 24 |
|---|
| 902 | #define BG_FM_MONO_FIR1C4_INDEX 25 |
|---|
| 903 | #define BG_FM_MONO_FIR1C5_INDEX 26 |
|---|
| 904 | #define BG_FM_MONO_FIR1C6_INDEX 27 |
|---|
| 905 | #define BG_FM_MONO_FIR1C7_INDEX 28 |
|---|
| 906 | #define BG_FM_MONO_ACOEFF1_INDEX 29 |
|---|
| 907 | #define BG_FM_MONO_BCOEFF1_INDEX 30 |
|---|
| 908 | |
|---|
| 909 | #define I_FM_MONO_FIR1C0_INDEX 36 |
|---|
| 910 | #define I_FM_MONO_FIR1C1_INDEX 37 |
|---|
| 911 | #define I_FM_MONO_FIR1C2_INDEX 38 |
|---|
| 912 | #define I_FM_MONO_FIR1C3_INDEX 39 |
|---|
| 913 | #define I_FM_MONO_FIR1C4_INDEX 40 |
|---|
| 914 | #define I_FM_MONO_FIR1C5_INDEX 41 |
|---|
| 915 | #define I_FM_MONO_FIR1C6_INDEX 42 |
|---|
| 916 | #define I_FM_MONO_FIR1C7_INDEX 43 |
|---|
| 917 | #define I_FM_MONO_ACOEFF1_INDEX 44 |
|---|
| 918 | #define I_FM_MONO_BCOEFF1_INDEX 45 |
|---|
| 919 | |
|---|
| 920 | #define STEREO_TIME_20MS (0x00 << 2) |
|---|
| 921 | #define STEREO_TIME_40MS (0x01 << 2) |
|---|
| 922 | #define STEREO_TIME_100MS (0x02 << 2) |
|---|
| 923 | #define STEREO_TIME_200MS (0x03 << 2) |
|---|
| 924 | #define STEREO_TIME_400MS (0x04 << 2) |
|---|
| 925 | #define STEREO_TIME_800MS (0x05 << 2) |
|---|
| 926 | #define STEREO_TIME_1200MS (0x06 << 2) |
|---|
| 927 | #define STEREO_TIME_1600MS (0x07 << 2) |
|---|
| 928 | |
|---|
| 929 | // define for ST WIDE SURROUND |
|---|
| 930 | #define ST_WIDE_SURROUND_OFF_MODE 0 |
|---|
| 931 | #define ST_WIDE_SURROUND_MONO_MODE 1 |
|---|
| 932 | #define ST_WIDE_SURROUND_STEREO_MODE 2 |
|---|
| 933 | #define ST_WIDE_SURROUND_MOVIE_MODE 3 |
|---|
| 934 | #define ST_WIDE_SURROUND_MUSIC_MODE 4 |
|---|
| 935 | |
|---|
| 936 | #define ST_SURROUND_STEREO 0x04 |
|---|
| 937 | #define ST_SURROUND_MUSIC 0x02 |
|---|
| 938 | #define ST_SURROUND_ON 0x01 |
|---|
| 939 | #define ST_SURROUND_MONO 0x00 |
|---|
| 940 | #define ST_SURROUND_MOVIE 0x00 |
|---|
| 941 | #define ST_SURROUND_OFF 0x00 |
|---|
| 942 | #define ST_SURROUND_MONO_STEREO_MASK 0x04 |
|---|
| 943 | #define ST_SURROUND_MOVIE_MUSIC_MASK 0x02 |
|---|
| 944 | #define ST_SURROUND_ON_OFF_MASK 0x01 |
|---|
| 945 | |
|---|
| 946 | |
|---|
| 947 | extern unsigned char BALANCE_TABLE[]; |
|---|
| 948 | extern USHORT VOLUME_TABLE[]; |
|---|
| 949 | extern unsigned char BASS_TREBLE_GAIN_TABLE[]; |
|---|
| 950 | extern INT gSizeofVolumeTable; |
|---|
| 951 | extern INT gSizeOfBassTrebleTable; |
|---|
| 952 | extern INT gSizeOfBalanceTable; |
|---|
| 953 | |
|---|
| 954 | #define STV_FUNCTION fprintf(stdout, "[%s] ==> Enter %s [%d]\n", __FILE__, __FUNCTION__, __LINE__) |
|---|
| 955 | /********************************************************************************** |
|---|
| 956 | * Function Prototype |
|---|
| 957 | *********************************************************************************/ |
|---|
| 958 | unsigned char STV82x8_SwReset(VOID); |
|---|
| 959 | unsigned char STV82x8_UpdatePatchData( VOID ); |
|---|
| 960 | unsigned char STV82x8_VerifiedPatchData( VOID ); |
|---|
| 961 | unsigned char STV82x8_InitDSP( VOID ); |
|---|
| 962 | unsigned char STV82x8_InitRegister( VOID ); |
|---|
| 963 | unsigned char STV82x8_SetDefaultValueFromSTDConfig ( VOID ); |
|---|
| 964 | unsigned char STV82x8_SetDACMute( VOID ); |
|---|
| 965 | unsigned char STV82x8_SetDACUnMute( VOID ); |
|---|
| 966 | unsigned char STV82x8_SetScart1DigitalMute( VOID ); |
|---|
| 967 | unsigned char STV82x8_SetScart1DigitalUnMute( VOID ); |
|---|
| 968 | unsigned char STV82x8_SetSPDIFDigitalMute( VOID ); |
|---|
| 969 | unsigned char STV82x8_SetSPDIFDigitalUnMute( VOID ); |
|---|
| 970 | unsigned char STV82x8_SetSPDIFMute(VOID); |
|---|
| 971 | unsigned char STV82x8_SetSPDIFUnMute(VOID); |
|---|
| 972 | unsigned char STV82x8_SetI2SInOut( unsigned char ucI2S_InOut ); |
|---|
| 973 | unsigned char STV82x8_SetI2SOutputSignal( unsigned char ucI2S_Output ); |
|---|
| 974 | unsigned char STV82x8_SetVolumeMode( unsigned char usVolumeMode ); |
|---|
| 975 | unsigned char STV82x8_SetLeftVolume( USHORT usVolume ); |
|---|
| 976 | unsigned char STV82x8_SetRightVolume( USHORT usVolume ); |
|---|
| 977 | unsigned char STV82x8_SetCenterVolume( USHORT usVolume ); |
|---|
| 978 | unsigned char STV82x8_SetMasterVolume( USHORT usVolume ); |
|---|
| 979 | unsigned char STV82x8_SetSurroundLeftVolume( USHORT usVolume ); |
|---|
| 980 | unsigned char STV82x8_SetSurroundRightVolume( USHORT usVolume ); |
|---|
| 981 | unsigned char STV82x8_SetLeftScartVolume( USHORT usVolume ); |
|---|
| 982 | unsigned char STV82x8_SetRightScartVolume( USHORT usVolume ); |
|---|
| 983 | unsigned char STV82x8_WakeUpADC( VOID ); |
|---|
| 984 | unsigned char STV82x8_WakeUpIRQ0( VOID ); |
|---|
| 985 | unsigned char STV82x8_SetFMTimeOut( unsigned char ucTimeOut ); |
|---|
| 986 | unsigned char STV82x8_SetLSBalance(unsigned char ucBalance); |
|---|
| 987 | unsigned char STV82x8_SetEqualizerValue( unsigned char ucEqualizerIndex, unsigned char ucEQBandIndex ); |
|---|
| 988 | unsigned char STV82x8_SetLoudSpkHeadPhoneGain(unsigned char ucType, unsigned char ucGain); |
|---|
| 989 | unsigned char STV82x8_SetPseudoEffect( unsigned char ucPseudo ); |
|---|
| 990 | unsigned char STV82x8_ControlTurboSound( unsigned char ucTurbo, unsigned char ucLoudnessIndex ); |
|---|
| 991 | unsigned char STV82x8_AutoVolumeCtrl( unsigned char SvcSel ); |
|---|
| 992 | unsigned char STV82x8_RefreshSTV( VOID ); |
|---|
| 993 | unsigned char STV82x8_CheckElectricalShock( VOID ); |
|---|
| 994 | unsigned char STV82x8_SetScartDefaultPrescale( VOID ); |
|---|
| 995 | unsigned char STV82x8_SetMonoStereoDefaultPrescale( VOID ); |
|---|
| 996 | unsigned char STV82x8_SAPDefaultPrescale( VOID ); |
|---|
| 997 | unsigned char STV82x8_I2SDefaultPrescale(unsigned char ucI2SPort, unsigned char ucPreScaleVal); |
|---|
| 998 | unsigned char STV82x8_GetSoundSignalState( unsigned char * pucSignalState ); |
|---|
| 999 | unsigned char STV82x8_All_SoundSystem_Check( VOID ); |
|---|
| 1000 | unsigned char STV82x8_SetValueForSPDIF( VOID ); |
|---|
| 1001 | unsigned char STV82x8_BeeperAmbulanceSound( VOID ); |
|---|
| 1002 | unsigned char STV82x8_GetSoundSystem(unsigned char * pucSoundSystem, BOOL bDetectFM); |
|---|
| 1003 | unsigned char STV82x8_GetSoundSystem_Independ(unsigned char * pucSoundSystem, BOOL bDetectFM); |
|---|
| 1004 | unsigned char STV82x8_ChangeMTS_Manual (unsigned char ucMTS); |
|---|
| 1005 | unsigned char STV82x8_SetStereoTimeOut( unsigned char ucTimeOut ); |
|---|
| 1006 | unsigned char STV82x8_SetScartDACMute( VOID ); |
|---|
| 1007 | unsigned char STV82x8_SetScartDACUnMute( VOID ); |
|---|
| 1008 | unsigned char STV82x8_SetLeftScartVolume( USHORT usVolume ); |
|---|
| 1009 | unsigned char STV82x8_SetRightScartVolume( USHORT usVolume ); |
|---|
| 1010 | unsigned char STV82x8_ScartOutBalance( unsigned char ucBalance ); |
|---|
| 1011 | unsigned char STV82x8_SetSRS_InputMode( unsigned char ucSRS_InputMode ); |
|---|
| 1012 | unsigned char STV82x8_SetSRSWOW_Effect( unsigned char ucSRSWOW ); |
|---|
| 1013 | unsigned char STV82x8_SetOutput_RFConfig(VOID); |
|---|
| 1014 | unsigned char STV82x8_SetSRSTRS_DolbyPro1_Effect( unsigned char ucSRS_TruSurround, unsigned char ucDolby_ProLogic1 ); |
|---|
| 1015 | unsigned char STV82x8_SetAutoMuteOnOff(unsigned char ucOnOff); |
|---|
| 1016 | unsigned char STV82x8_Initialize(unsigned char i2c_num,unsigned char ucSlaveAddr); |
|---|
| 1017 | unsigned char STV82x8_SetMuteAll(BOOL bMute); |
|---|
| 1018 | unsigned char STV82x8_SetLoudSpkHeadPhoneGain(unsigned char ucType, unsigned char ucGain); |
|---|
| 1019 | unsigned char STV82x8_ReturnToStereoFromMono(VOID); |
|---|
| 1020 | unsigned char STV82x8_SAPConfig(unsigned char bSAP); |
|---|
| 1021 | unsigned char STV82x8_SetSoundSystem(unsigned char ucSound); |
|---|
| 1022 | unsigned char STV82x8_AutoVolumeHPCtrl(unsigned char ucSvcSel); |
|---|
| 1023 | unsigned char STV82x8_SetHPLeftVolume(USHORT usVolume); |
|---|
| 1024 | unsigned char STV82x8_SetHPBalance(unsigned char ucBalance); |
|---|
| 1025 | unsigned char STV82x8_SetHPConfiguration(unsigned char ucHP_Force, unsigned char ucLS_Mute, unsigned char ucHP_Active); |
|---|
| 1026 | unsigned char STV82x8_WideSurroundMode(unsigned char ucWideSRSMode); |
|---|
| 1027 | unsigned char STV82x8_SetSRS_TRUBASS(unsigned char ucTrubassType, unsigned char ucSRS_TruBass); |
|---|
| 1028 | unsigned char STV82x8_SRSTruBaseLoudspeakerHeadphoneLevel(unsigned char ucTrubassType, unsigned char ucLevel); |
|---|
| 1029 | unsigned char STV82x8_DialogClarityLevel(unsigned char ucLevel); |
|---|
| 1030 | unsigned char STV82x8_AudioMatrix_HeadphoneOut (unsigned char ucInput); |
|---|
| 1031 | unsigned char STV82x8_AuxVolSelection(unsigned char ucAuxSel); |
|---|
| 1032 | unsigned char STV82x8_SetLSSubWooferVolume(USHORT usVolume); |
|---|
| 1033 | unsigned char STV82x8_SetDigitalMute(unsigned char ucMute, unsigned char ucMask); |
|---|
| 1034 | unsigned char STV82x8_SetDigitalUnMute(unsigned char ucUnMute, unsigned char ucMask); |
|---|
| 1035 | unsigned char STV82x8_SetSubWoofer(unsigned char ucSubWoofer, unsigned char ucBassManage, unsigned char ucBassGainSW, unsigned char ucSTLFEAdd, unsigned char ucDolbyPro, unsigned char ucBassConfNum); |
|---|
| 1036 | unsigned char STV82x8_MuteSPDIF(BOOL bMute); |
|---|
| 1037 | unsigned char STV82x8_Enble_Equalizer(unsigned char ucOnOff, unsigned char ucType, unsigned char ucIndex ); |
|---|
| 1038 | |
|---|
| 1039 | |
|---|
| 1040 | typedef enum _tagPrescaleInput |
|---|
| 1041 | { |
|---|
| 1042 | _ST_PRESCALE_MONO_, |
|---|
| 1043 | _ST_PRESCALE_STEREO_, |
|---|
| 1044 | _ST_RRESCALE_SAP_, |
|---|
| 1045 | _ST_PRESCALE_SIF_, //For all tuner signal |
|---|
| 1046 | _ST_PRESCALE_SCART_, |
|---|
| 1047 | _ST_PRESCALE_I2S_, //For all I2S input |
|---|
| 1048 | _ST_PRESCALE_I2S_0_, |
|---|
| 1049 | _ST_PRESCALE_I2S_1_, |
|---|
| 1050 | _ST_PRESCALE_I2S_2_, |
|---|
| 1051 | }STPrescaleInput_e; |
|---|
| 1052 | |
|---|
| 1053 | typedef enum _tagSTAudioOutput |
|---|
| 1054 | { |
|---|
| 1055 | _ST_OUTPUT_LOUDSPEAKER_, |
|---|
| 1056 | _ST_OUTPUT_HEADPHONE_, |
|---|
| 1057 | _ST_OUTPUT_SCART1_, |
|---|
| 1058 | _ST_OUTPUT_SCART2_, |
|---|
| 1059 | _ST_OUTPUT_SPDIF_, |
|---|
| 1060 | _ST_OUTPUT_DELAY_, |
|---|
| 1061 | }STAudioOutput_e; |
|---|
| 1062 | |
|---|
| 1063 | |
|---|
| 1064 | typedef enum _tagSTAudioInput |
|---|
| 1065 | { |
|---|
| 1066 | _ST_INPUT_INVALID_=-1, |
|---|
| 1067 | _ST_INPUT_MUTE_ = 0x0, |
|---|
| 1068 | _ST_INPUT_DEALY_ = 0x1, |
|---|
| 1069 | _ST_INPUT_DEMOD_ = 0x2, |
|---|
| 1070 | _ST_INPUT_LTRT_ = 0x3, |
|---|
| 1071 | _ST_INPUT_I2S_ = 0x4, |
|---|
| 1072 | _ST_INPUT_SCART_ = 0x5, |
|---|
| 1073 | _ST_INPUT_MAX_, |
|---|
| 1074 | }STAudioInput_e; |
|---|
| 1075 | |
|---|
| 1076 | |
|---|
| 1077 | typedef enum _tagSTAudioScartInput |
|---|
| 1078 | { |
|---|
| 1079 | _ST_SCART_INPUT_MONO_, |
|---|
| 1080 | _ST_SCART_INPUT_1_, |
|---|
| 1081 | _ST_SCART_INPUT_2_, |
|---|
| 1082 | _ST_SCART_INPUT_3_, |
|---|
| 1083 | _ST_SCART_INPUT_4_, |
|---|
| 1084 | _ST_SCART_INPUT_5_, |
|---|
| 1085 | _ST_SCART_INPUT_DSP_, |
|---|
| 1086 | }STAudioScartInput_e; |
|---|
| 1087 | |
|---|
| 1088 | |
|---|
| 1089 | typedef enum _tagSTAudioScartOuput |
|---|
| 1090 | { |
|---|
| 1091 | _ST_SCART_OUTPUT_1_, |
|---|
| 1092 | _ST_SCART_OUTPUT_2_, |
|---|
| 1093 | _ST_SCART_OUTPUT_3_, |
|---|
| 1094 | _ST_SCART_OUTPUT_ADC_, |
|---|
| 1095 | }STAudioScartOutput_e; |
|---|
| 1096 | |
|---|
| 1097 | |
|---|
| 1098 | typedef enum _tagSTAudioVolumeDev{ |
|---|
| 1099 | _ST_VOLUME_LS_L_, |
|---|
| 1100 | _ST_VOLUME_LS_R_, |
|---|
| 1101 | _ST_VOLUME_LS_, //For differential mode |
|---|
| 1102 | |
|---|
| 1103 | _ST_VOLUME_LS_C_, |
|---|
| 1104 | _ST_VOLUME_LS_SUB_, |
|---|
| 1105 | _ST_VOLUME_MASTER_, |
|---|
| 1106 | |
|---|
| 1107 | _ST_VOLUME_LS_SL_, |
|---|
| 1108 | _ST_VOLUME_LS_SR_, |
|---|
| 1109 | _ST_VOLUME_LS_SURROUND_, //For differential mode |
|---|
| 1110 | |
|---|
| 1111 | _ST_VOLUME_HP_L_, |
|---|
| 1112 | _ST_VOLUME_HP_R_, |
|---|
| 1113 | |
|---|
| 1114 | _ST_VOLUME_HP_, //For differential mode |
|---|
| 1115 | |
|---|
| 1116 | _ST_VOLUME_SCART1_L_, |
|---|
| 1117 | _ST_VOLUME_SCART1_R_, |
|---|
| 1118 | _ST_VOLUME_SCART1_, //For differential mode |
|---|
| 1119 | |
|---|
| 1120 | _ST_VOLUME_SCART2_L_, |
|---|
| 1121 | _ST_VOLUME_SCART2_R_, |
|---|
| 1122 | |
|---|
| 1123 | _ST_VOLUME_SCART2_, //For differential mode |
|---|
| 1124 | }STAudioVolumeDev_e; |
|---|
| 1125 | |
|---|
| 1126 | |
|---|
| 1127 | typedef enum _tagSTAudioVolumeModeDev{ |
|---|
| 1128 | _ST_VOLUME_MODE_HP_ = 0, |
|---|
| 1129 | _ST_VOLUME_MODE_LS_, |
|---|
| 1130 | _ST_VOLUME_MODE_SRND_, |
|---|
| 1131 | _ST_VOLUME_MODE_SCART1_, |
|---|
| 1132 | _ST_VOLUME_MODE_SCART2_, |
|---|
| 1133 | }STAudioVolumeModeDev_e; |
|---|
| 1134 | |
|---|
| 1135 | |
|---|
| 1136 | typedef enum _tagSTAudioMuteDev{ |
|---|
| 1137 | //Adjust in F1 |
|---|
| 1138 | _ST_SOFTMUTE_LS_, //bit 0 |
|---|
| 1139 | _ST_SOFTMUTE_CENTER_, //bit 1 |
|---|
| 1140 | _ST_SOFTMUTE_SUB_, //bit 2 |
|---|
| 1141 | _ST_SOFTMUTE_SRND_, //bit 3 |
|---|
| 1142 | _ST_SOFTMUTE_SCART1_, //bit 4 |
|---|
| 1143 | _ST_SOFTMUTE_SCART2_, //bit 5 |
|---|
| 1144 | _ST_SOFTMUTE_SPDIF_, //bit 6 |
|---|
| 1145 | _ST_SOFTMUTE_HP_, //bit 7 |
|---|
| 1146 | //Adjust in F7 |
|---|
| 1147 | _ST_DACMUTE_LSLR_, //bit 1 |
|---|
| 1148 | _ST_DACMUTE_CSUB_, //bit 2 |
|---|
| 1149 | _ST_DACMUTE_SHP_, //bit 3 |
|---|
| 1150 | _ST_DACMUTE_SCART_, //bit 4 |
|---|
| 1151 | //Adjust in 57-58, |
|---|
| 1152 | _ST_OUTPUT_SCART1_MUTE_, |
|---|
| 1153 | _ST_OUTPUT_SCART2_MUTE_, |
|---|
| 1154 | _ST_OUTPUT_SCART3_MUTE_, |
|---|
| 1155 | }STAudioMuteDev_e; |
|---|
| 1156 | |
|---|
| 1157 | typedef struct _tagSTAudioDrvInitParam{ |
|---|
| 1158 | int SlaveAddr; |
|---|
| 1159 | int I2CMasterNum; //1 means the first i2c master, 2 means the second i2c master |
|---|
| 1160 | BOOL bThreadInit; //true means use thread to initialize ST chip. |
|---|
| 1161 | }STAudioDrvInitParam; |
|---|
| 1162 | |
|---|
| 1163 | int STV82x8_EXT_SetMute(STAudioMuteDev_e AudioDev, BOOL bMute); |
|---|
| 1164 | int STV82x8_EXT_SetBalance(STAudioVolumeDev_e AudioDev, int Balance); |
|---|
| 1165 | int STV82x8_EXT_SetVolume(STAudioVolumeDev_e AudioDev, int Volume); |
|---|
| 1166 | int STV82x8_EXT_SetVolumeMode(STAudioVolumeModeDev_e AudioDev, int VolumeMode); |
|---|
| 1167 | int STV82x8_EXT_SetAudioOutputPath(STAudioInput_e STInput, STAudioOutput_e STOutput); |
|---|
| 1168 | int STV82x8_EXT_SetPrescale(STPrescaleInput_e STInput, int PrescaleValue); |
|---|
| 1169 | int STV82x8_EXT_SetSPDIFExtInput(BOOL bExtSrc); |
|---|
| 1170 | int STV82x8_EXT_PowerOnADC(void); |
|---|
| 1171 | int STV82x8_EXT_PowerOffADC(void); |
|---|
| 1172 | int STV82x8_EXT_SetScartOutputPath(STAudioScartInput_e STScartInput, STAudioScartOutput_e STScartOutput); |
|---|
| 1173 | int STV82x8_EXT_EnableLSEqualizerBassTreble(BOOL bEnable); |
|---|
| 1174 | int STV82x8_EXT_EnableLSEqualizer(BOOL bEnable); |
|---|
| 1175 | int STV82x8_EXT_EnableLSBassTreble(BOOL bEnable); |
|---|
| 1176 | int STV82x8_EXT_EnableHPBassTreble(BOOL bEnable); |
|---|
| 1177 | int STV82x8_EXT_SetBass(int Value, BOOL bHP); |
|---|
| 1178 | int STV82x8_EXT_SetTreble(int Value, BOOL bHP); |
|---|
| 1179 | int STV82x8_EXT_SetLSEqulizer(int BandIndex, int Value); |
|---|
| 1180 | int STV82x8_EXT_GetSoundSystem_Independ(unsigned char * pucSoundSystem, BOOL bDetectFM); |
|---|
| 1181 | unsigned char STV82x8_EXT_Initialize(STAudioDrvInitParam* pInit); |
|---|
| 1182 | |
|---|
| 1183 | |
|---|
| 1184 | #endif |
|---|
| 1185 | |
|---|
| 1186 | |
|---|
| 1187 | |
|---|
| 1188 | /******************************************************************************************** |
|---|
| 1189 | * End Of File |
|---|
| 1190 | ********************************************************************************************/ |
|---|