PS.c
上传用户:super_houu
上传日期:2008-09-21
资源大小:4099k
文件大小:41k
- /****************************************************************************************
- * Copyright (c) 2002 ZORAN Corporation, All Rights Reserved
- * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
- *
- * File: $Workfile: PS.c $
- *
- * Description:
- * ============
- *
- *
- * Log:
- * ====
- * $Revision: 114 $
- * Last Modified by $Author: Fwang $ at $Modtime: 04-04-02 14:51 $
- ****************************************************************************************
- * Updates:
- ****************************************************************************************
- * $Log: /I76/I76_Common/I76_Reference/Playcore/PS/PS.c $
- *
- * 114 04-04-02 15:01 Fwang
- * Fix green screen by MPP.
- *
- * 113 04-04-02 14:18 Billt
- * merge some new elements
- *
- * 112 3/25/04 11:37p Johnk
- * inserted the stillmode interpolation
- *
- * 111 3/16/04 11:07p Johnk
- * Merged the latest code of S1 function
- *
- * 110 3/12/04 5:45p Johnk
- * Merged EZVIEW function - inserted EZVIEW_ENABLE macro
- *
- * 109 04-03-10 10:51 Chaol
- * change prototype of DEC_get_spectrum_analyzer
- *
- * 108 04-03-09 20:32 Chaol
- * add VE & Melody support, and code clean
- *
- * 107 04-03-05 16:46 Jerryc
- *
- * 106 04-03-02 16:43 Chaol
- * remove gtps.mMuteSPDIF
- *
- * 105 04-03-02 13:20 Chaol
- * add spectrum analyzer and graphic equalizer support
- *
- * 104 04-02-24 12:04 Janeg
- * Improve EZVIEW implementation.
- *
- * 103 2/20/04 6:22p Glenl
- * Merged S1 code
- *
- * 102 2/10/04 7:48p Chaol
- * add karaoke support
- *
- * 101 28/01/04 9:31 Rinata
- * add downmix_volume gps parameter for headphones volume
- *
- * 100 1/16/04 11:12a Fwang
- * Add PS_UPDATE_TV_SHAPE.
- *
- * 99 1/14/04 9:54a Chaol
- * code clear
- *
- * 98 1/13/04 12:11 Hamadk
- * Merged with CES DB
- *
- * 97 12/18/03 12:14p Leslie
- * Remove INTERPOLATION_CONTROL on I76
- *
- * 96 11/28/03 5:52p Fwang
- * Implement manual scaling and clean code.
- *
- * 95 11/28/03 5:06p Chaol
- * remove D_DYNAMIC_COMPRESSION_SETTING and change down sample
- *
- * 94 11/13/03 4:18p Leonh
- * Angieh:Add support for Priority Content.
- *
- * 93 10/22/03 11:29a Chaol
- * change gps->ucDRCCtrl from BYTE to WORD
- *
- * 92 10/15/03 8:47a Leslie
- * Remove Karaoke Recording
- * Re-Order gtps
- * Code cleanup
- *
- * 91 12/10/03 12:33 Rinata
- * On PS_UPDATE_MUTE_SETTING reset also spdif mute parameter
- *
- * 90 9/29/03 12:02p Chaol
- * code clear & rewrite
- *
- * 89 9/23/03 6:40p Chaol
- * checkin in stage4
- *
- ****************************************************************************************/
- #include "Config.h" // Global Configuration - do not remove!
- #ifdef _DEBUG
- #undef IFTRACE
- #define IFTRACE if (gTraceCore)
- #include "DebugDbgMain.h"
- #endif
- #include "Decoderdecoder.h"
- #include "PlaycorePSps.h"
- #include "eeprom.h"
- #include "PlaycoreCoremaincoregdef.h"
- #include "PlaycoreCoremaincoremain.h"
- #ifdef SAVE_TVSTANDARD_ONLY_IN_SETUPMENU //BT030619
- #include "UIMenu_sysMS_LIB.h"
- #endif
- //#include "v186t.h"
- #include <embedded.h>
- #ifdef TV_GUARDIAN_ENABLE
- #include "PlaycoreTVGtvgapi.h"
- #endif
- #include "DecoderAudioSetting.h"
- #include "io_hal_api.h"
- #ifdef SUPPORT_FLASH_CARD
- #include "driveFE_Manager.h"
- #endif // SUPPORT_FLASH_CARD
- //Function prototype
- #define NV_CHECKSUM_ADDR (sizeof(NV_STORAGE)-1)
- static NV_STORAGE g_nv_storage;
- NV_SETTINGS *gps = &g_nv_storage.settings;
- #ifdef USE_JOG
- BYTE b_vol_change = FALSE;
- extern BYTE g_is_saving_vol;
- #endif
- /* <<< ZORAN SH0111: Added global variable for External karaoke */
- /* >>> */
- /* Global Temporary Player Settings = Wanted settings */
- TEMP_SETTINGS gtps = {
- 0, //Karaoke Echo Delay
- 0, //Karaoke Key Shift
- EFFECT3D_SETTING_OFF,
- KARAOKE_SETTING_OFF,
- PARTNER_SETTING_OFF,
- DMM_SETTING_NORMAL,
- KAR_AC3_SETTING_NOVOCAL,
- KAR_AC3_MELODY_SETTING_OFF,
- VOICE_CANCEL_SETTING_OFF,
- MUTE_SETTING_OFF,
-
- #ifdef SPECTRUM_EQUALIZER
- GRAPHIC_EQUALIZER_OFF,
- #endif
- #ifdef AUTO_SLEEP
- STANDBY_OFF,
- #endif
- #ifdef D_ENABLE_HEADPHONE_DETECT
- HEADPHONE_PLUG_OUT
- #endif
- #ifdef AUDIO_IN_SUPPORT
- AUDIO_IN_MODE_OFF,
- #endif
- }; /* Global Temporary Player Settings */
- /* Global Current States */
- //ZCH, Sean07102003
- #ifdef D_CONTROL_6_CHANNEL_VOLUME
- CURRENT_STATES gcst = {0,0,0,0,0,0,0,0,0,0,0,0,0,0};
- #else
- CURRENT_STATES gcst = {0,0,0,0,0,0,0,0,0,0,0,0,0};
- #endif //D_CONTROL_6_CHANNEL_VOLUME
- #ifdef STORE_PS_DATA_IN_FLASH
- #define MK_FP(seg,ofs) ((void __seg *)(seg) + (void __near *)(ofs))
- #define FLASH_OFFSET 0x4000
- #define PS_FLASH_START_ADDR MK_FP(PS_SEG, 0)
- extern void _initCommand(void);
- extern void Erase_One_Sector(unsigned short far *fp_SectorAddress);
- unsigned short huge *PS_FLASH_POINTER = PS_FLASH_START_ADDR;
- #endif
- #ifdef SPECTRUM_EQUALIZER
- BYTE sa_value[EQUALIZER_BANDGAIN_SZ] = {0, 0, 0, 0, 0,0};
- #endif
- #define GLB_NV_STORAGE g_nv_storage
- extern CONST NV_SETTINGS g_default_factory_settings; /* must be defined in customer file */
- extern BOOL CheckAddressWritable(unsigned short far *dwfpAddress);;
- static BYTE ps_compute_check_sum( void )
- {
- int i;
- BYTE checksum=0;
- for (i=0; i< sizeof(NV_SETTINGS); i++)
- {
- checksum += GLB_NV_STORAGE.data[i];
- }
- return checksum^0xFF;
- }
- #ifdef STORE_PS_DATA_IN_FLASH
- void PS_NVM_Save(BOOL bUpdateFlash)
- {
- BYTE buff[2];
- unsigned short far *fp_uDestAddr;
- int i;
- GLB_NV_STORAGE.data[NV_CHECKSUM_ADDR] = ps_compute_check_sum();
- if (bUpdateFlash)
- {
- for( i = 0; i < sizeof(GLB_NV_STORAGE); i=i+2 ){
- buff[0] = GLB_NV_STORAGE.data[i];
- buff[1] = GLB_NV_STORAGE.data[i+1];
- fp_uDestAddr = MK_FP( PS_SEG, i );
- Nor_Write((unsigned short huge *)fp_uDestAddr, (unsigned char far *)buff, 2);
- }
- }else
- {
- for( i = 0; i < sizeof(GLB_NV_STORAGE); i=i+2 ){
- buff[0] = GLB_NV_STORAGE.data[i];
- buff[1] = GLB_NV_STORAGE.data[i+1];
- PS_FLASH_POINTER[i>>1] = (( buff[1] << 8 ) & 0xff00) | buff[0];//UPdate inside SRAM in PDREMOTE_DEBUG mode
- }
- }
- }
- #endif
- // ====================================================================
- void PS_Save( void )
- {
- int i;
- #ifdef DONOT_SAVE_TVSTANDARD
- BYTE pre_tv_standard = gps->tv_standard;
- gps->tv_standard = g_default_factory_settings.tv_standard;
- #endif
-
- // Write from first EPROM address until last param to save
- GLB_NV_STORAGE.data[NV_CHECKSUM_ADDR] = ps_compute_check_sum();
- #ifdef STORE_PS_DATA_IN_FLASH
- #ifdef _DEBUG
- dbg_printf(("Beforen"));
- for ( i = 0; i < sizeof(GLB_NV_STORAGE); i ++ )
- dbg_printf((" %02x", GLB_NV_STORAGE.data[i]));
- dbg_printf(("n"));
- dbg_printf(("Data in %08x:n", (DWORD)PS_FLASH_START_ADDR));
- for ( i = 0 ; i < sizeof(GLB_NV_STORAGE); i = i+2)
- dbg_printf((" %04x", PS_FLASH_POINTER[i>>1]));
- dbg_printf(("n"));
- #endif//_DEBUG
- core_save_NVM_setting_In_Flash((unsigned short far *)PS_FLASH_START_ADDR);
- #ifdef _DEBUG
- dbg_printf(("Aftern"));
- for ( i = 0 ; i < sizeof(GLB_NV_STORAGE); i = i+2)
- dbg_printf((" %04x", PS_FLASH_POINTER[i>>1]));
- dbg_printf(("n"));
- #endif//_DEBUG
- #else
- eeprom_write( PS_OFFSET_ADDR,&(GLB_NV_STORAGE.data[0]), sizeof(NV_STORAGE) );
- #endif//STORE_PS_DATA_IN_FLASH
- #ifdef DONOT_SAVE_TVSTANDARD
- gps->tv_standard = pre_tv_standard;
- #endif
- }
- void PS_RestoreFactoryDefault( void )
- {
- GLB_NV_STORAGE.settings = g_default_factory_settings; /* copy factory default */
- #ifndef _DEBUG_VERILOG
- PS_Save(); /* .. and save to NVRAM */
- #endif
- }
- void PS_Restore( void )
- {
- BYTE checksum;
- #ifdef STORE_PS_DATA_IN_FLASH
- {
- int i;
- for( i = 0; i < sizeof(GLB_NV_STORAGE); i=i+2 ){
- GLB_NV_STORAGE.data[i+1] = PS_FLASH_POINTER[i>>1]>>8 ;
- GLB_NV_STORAGE.data[i] = PS_FLASH_POINTER[i>>1] & 0x00ff ;
- }
- }
- #else
- eeprom_read( PS_OFFSET_ADDR,&(GLB_NV_STORAGE.data[0]), sizeof(NV_STORAGE) );
- #endif//STORE_PS_DATA_IN_FLASH
- if (GLB_NV_STORAGE.data[NV_CHECKSUM_ADDR] != (checksum = ps_compute_check_sum())){
- dbg_printf(("szof(NV_STORAGE)=%d, szof(NV_SETTINGS)=%dn", sizeof(NV_STORAGE), sizeof(NV_SETTINGS) ));
- dbg_printf(("NVRAM checksum error, restore factory default (%d!=%d)!n",
- (int) GLB_NV_STORAGE.data[NV_CHECKSUM_ADDR],(int) checksum));
- PS_RestoreFactoryDefault();
- }
- //<<<LX072502
- IFDEF(Decoder_Macro.bNOT_STORE_VIDEO_BE_EE_VALUE)
- #ifdef VIDEO_ENHANCED_SLIDER
- gps->be_ctrl = NUM_BRIGHTNESS_SLIDER_STEPS/2;
- gps->ee_ctrl = NUM_EDGE_SLIDER_STEPS/2;
- #else
- gps->be_ctrl = 8;
- gps->ee_ctrl = 8;
- #endif
- ENDIF
- //LX072502>>>
-
- //<<<ML 061203 added
- IFDEF(Decoder_Macro.bRgbonly)
- gps->vid_out = VID_OUT_RGB;
- ENDIF
- //>>>ML 061203 added
- #ifndef D_DEFUALT_VOLUME_MIDDLE//tecobest gxd 20051024
- //<<<RL080802 Default Max Volume
- gps->volume = HW_MAX_VOLUME ;
- //RL080802>>>
- #else
- //Default Max Volume
- gps->volume = HW_MAX_VOLUME/2;
- #endif
- #ifdef NOT_SAVER_WORKMODE
- gps->TunerWorkmode = (BYTE) 0;
- #endif
- #ifndef SMART_NAVI_MENU_SETTING
- gps->smart_navi == SMART_NAVI_MENU_ON; //to avoid the situation that not define smart menu switch and set off in factory default
- #endif
- #ifdef I77_COMPANION_CHIP
- if (gps->hd_jpeg_mode_preference == SD_JPEG_MODE)
- gps->hd_vid_out_mode = HD_NTSC_IN_OUT_480P;
- else
- gps->hd_vid_out_mode = HD_NTSC_IN_OUT_720P;
- #endif
- #ifdef USE_JOG
- if (gps->main_volume > 60) //add by wl082304 for KXD's request
- gps->main_volume = 60; //add by wl082304 for KXD's request
- #endif
- }
- /***********
- Update global settings and save value in NVRAM if necessary
- ************/
- void PS_Update(DWORD param)
- {
- BOOL save_change = FALSE;
- WORD value;
- value = (WORD)(param&0xFFFF);
- switch((WORD)(param>>16))
- {
- #ifdef I77_COMPANION_CHIP
- case PS_UPDATE_HD_VID_OUT:
- gps->hd_vid_out_mode = (BYTE)(value);
- #ifdef I77_BRAIN_STORM
- if( gps->hd_jpeg_mode_preference == SD_JPEG_MODE )
- gcst.hd_jpeg_mode_preference = SD_JPEG_MODE;
- else
- {
- switch(gps->hd_vid_out_mode)
- {
- case HD_NTSC_IN_OUT_720P:
- case HD_NTSC_IN_OUT_1080I:
- case HD_NTSC_IN_OUT_1024X768:
- case HD_NTSC_IN_OUT_1360X768:
- gcst.hd_jpeg_mode_preference = gps->hd_vid_out_mode;
- break;
- default:
- gcst.hd_jpeg_mode_preference = SD_JPEG_MODE;
- break;
- }
- }
- gps->lastest_hdmi_mode.output_resolution = (BYTE)value;
- #endif//I77_BRAIN_STORM
- save_change = TRUE;
- break;
- // <<< SEC CH.KO050204 : DVI mode selection between SMPTE and CEA-861
- #if defined(EXINO2) && defined(D_ENABLE_DVI_OUTPUT)
- case PS_UPDATE_DVI_OUT_MODE:
- gps->dvi_out_mode = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- // SEC CH.KO050204 >>>
- case PS_UPDATE_HD_COMPONENT_OUT:
- gps->hd_component_out = (BYTE)(value);
- break;
- #endif
- #if D_SUPPORT_SACD
- case PS_UPDATE_SACDLAYER_SETTING :
- dbg_printf(("nI_PS_Update - sacd layer preference : %il",value));
- gps->playCDLayerOfSACD = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- case PS_UPDATE_PROLOGIC_SETTING :
- dbg_printf(("nI_PS_Update - Prologic : %il",value));
- gps->prologic = (BYTE)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_DMM_SETTING :
- dbg_printf(("nI_PS_Update - DMM : %il",value));
- gtps.mDMM = (BYTE)(value);
- break;
-
- case PS_UPDATE_KARAOKE_SETTING :
- dbg_printf(("nI_PS_Update - Karaoke : %il",value));
- gtps.mKaraoke = (BYTE)(value);
- gcst.mPartner = VP_DEACTIVATED;
- #ifdef SPECTRUM_EQUALIZER
- gtps.mGeMode = GRAPHIC_EQUALIZER_OFF;
- #endif
- break;
- case PS_UPDATE_PARTNER_SETTING :
- dbg_printf(("nI_PS_Update - Partner : %il",value));
- gtps.mPartner = (BYTE)(value);
- gcst.mPartner = VP_DEACTIVATED;
- break;
-
- case PS_UPDATE_PARTNER_STATE :
- dbg_printf(("nI_PS_Update - Partner State : %il",value));
- gcst.mPartner = (BYTE)(value);
- break;
-
- case PS_UPDATE_KARECHODELAY_SETTING :
- dbg_printf(("nI_PS_Update - Echo Scale : %il",value));
- gtps.mKarEchoDelay = (WORD) (value);
- break;
-
- case PS_UPDATE_KARKEYSHIFT_SETTING :
- dbg_printf(("nI_PS_Update - Key Shift : %il",value));
- gtps.mKarKeyShift = (BYTE)(value);
- break;
-
- case PS_UPDATE_KAR_AC3_VOCAL_SETTING :
- dbg_printf(("nI_PS_Update - AC3 Vocal : %il",value));
- gtps.mAC3KarVocal = (BYTE)(value);
- break;
-
- case PS_UPDATE_KAR_AC3_MEL_SETTING :
- dbg_printf(("nI_PS_Update - AC3 Melody : %il",value));;
- gtps.mAC3KarMel = (BYTE)(value);
- break;
-
- case PS_UPDATE_VOICE_CANCEL_SETTING :
- dbg_printf(("nI_PS_Update - Voice Cancel : %il",value));;
- gtps.mVoiceCanel = (BYTE)(value);
- break;
-
- case PS_UPDATE_3DEFFECT_SETTING :
- dbg_printf(("nI_PS_Update - 3D Effect : %il",value));
- gtps.m3dEffect = (BYTE)(value);
- #ifdef SPECTRUM_EQUALIZER
- gtps.mGeMode= GRAPHIC_EQUALIZER_OFF;
- #endif
- break;
- case PS_UPDATE_DIGITAL_SETTINGS :
- dbg_printf(("nI_PS_Update - Digital Output LSB : %il",value));
- gps->digital_setting = (gps->digital_setting&0xFFFF) | (value);
- save_change = TRUE;
- break;
- case PS_UPDATE_MUTE_SETTING :
- dbg_printf(("nI_PS_Update - Audio Mute : %il",value));
- gtps.mMute = (BYTE)(value);
- break;
-
- case PS_UPDATE_VOLUME_SETTING :
- dbg_printf(("nI_PS_Update - Volume : %il",value));
- gps->volume = (WORD)(value);
- // save_change = TRUE; // ZRN SH0626:must not be saved
- break;
- case PS_UPDATE_DOWNMIX_VOLUME_SETTING:
- dbg_printf(("nI_PS_Update - Downmix Volume : %il",value));
- gps->downmix_volume = (WORD)(value);
- break;
- case PS_UPDATE_TV_STANDARD:
- dbg_printf(("nI_PS_Update - TV Standard : %il",value));
- gps->tv_standard = (BYTE) (value);
- #ifdef SAVE_TVSTANDARD_ONLY_IN_SETUPMENU //BT030619
- if( g_ui_active_menu_id == SETUP_MENU_ID)
- save_change = TRUE;
- //else
- //save_change = FALSE;
- #else
- save_change = TRUE;
- #endif //SAVE_TVSTANDARD_ONLY_IN_SETUPMENU
- break;
-
- #ifdef DVD_AUDIO_SUPPORT
- case PS_UPDATE_A_V_PRIORITY:
- dbg_printf(("nI_PS_Update - Audio/Video priority : %il",value));
- gps->dvd_a_v_preference=(BYTE)value;
- save_change = TRUE;
- break;
- #endif
- #ifdef I77_COMPANION_CHIP //einav
- case PS_UPDATE_HD_JPEG_MODE_PRIORITY:
- gps->hd_jpeg_mode_preference=(BYTE)value;
- #ifdef I77_BRAIN_STORM
- if( gps->hd_jpeg_mode_preference == SD_JPEG_MODE )
- gcst.hd_jpeg_mode_preference = SD_JPEG_MODE;
- else
- {
- BYTE resolution;
- resolution = I77_GetResolution();
- switch(resolution)
- {
- case HD_NTSC_IN_OUT_720P:
- case HD_NTSC_IN_OUT_1080I:
- case HD_NTSC_IN_OUT_1024X768:
- case HD_NTSC_IN_OUT_1360X768:
- gcst.hd_jpeg_mode_preference = resolution;
- break;
- default:
- gcst.hd_jpeg_mode_preference = SD_JPEG_MODE;
- break;
- }
- }
- #endif//I77_BRAIN_STORM
- save_change = TRUE;
- break;
- #ifdef I77_BRAIN_STORM
- case PS_UPDATE_HD_LOCK_MODE:
- gps->hd_lock_mode = (BYTE)value;
- save_change = TRUE;
- break;
- case PS_UPDATE_HD_COLOR_SPACE:
- {
- BYTE outputResolution = I77_GetResolution();
-
- gps->lastest_hdmi_mode.color_space = (BYTE)value;
- _loadInfoFrames((BYTE)value, outputResolution,FALSE);
- }
- save_change = TRUE;
- break;
- #endif//I77_BRAIN_STORM
- #endif //I76_COMPANION_CHIP
-
- case PS_UPDATE_PROG_INTER_SETTING:
- //<<<Roger add to save PSO mode,020624
- gps->prog_inter_select = (BYTE) (value&0xFF);
- gps->pso_mode=(BYTE)((value>>8) &0xFF);
- //>>>
- save_change = TRUE;
- break;
- #ifdef A_SD340E
- #ifdef USE_I64_TV_SHAPE_SETTING
- case PS_UPDATE_USER_TV_SHAPE:
- dbg_printf(("nI_PS_Update - USER TV Shape: %d", (BYTE)value));
-
- #ifdef D_SCART_OUTPUT
- if ( PS_USER_TV169 == (value&0xff) )
- ScartLL_VMOD(SCART_VMOD_16V9);
- else
- ScartLL_VMOD(SCART_VMOD_4V3);
- #endif
- gps->user_tv_shape= (BYTE) value;
- switch(gps->user_tv_shape)
- {
- case PS_USER_TV43PS:
- gps->tv_shape= (BYTE)PS_TV43;
- gps->view_mode = (BYTE)VIEW_MODE_PAN_SCAN;
- break;
- case PS_USER_TV43LB:
- gps->tv_shape= (BYTE)PS_TV43;
- gps->view_mode = (BYTE)VIEW_MODE_AUTO_FIT;
- break;
- case PS_USER_TV169:
- gps->tv_shape= (BYTE)PS_TV169;
- gps->view_mode = (BYTE)VIEW_MODE_FILL;
- break;
- }
- save_change = TRUE;
- break;
- #endif
- #endif
- case PS_UPDATE_TV_SHAPE:
- dbg_printf(("nI_PS_Update - TV Shape: %d", (BYTE)value));
-
- #ifdef D_SCART_OUTPUT //BT012603: added
- if ( PS_TV169 == (value&0xff) )
- ScartLL_VMOD(SCART_VMOD_16V9);
- else
- ScartLL_VMOD(SCART_VMOD_4V3);
- #endif //D_SCART_OUTPUT //BT012603: added
- gps->tv_shape= (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_VIEW_MODE:
- dbg_printf(("nI_PS_Update - Screen Mode : %il",value));
- gps->view_mode= (BYTE) (value);
- save_change = TRUE;
- break;
- case PS_UPDATE_VID_OUT:
- dbg_printf(("nI_PS_Update - Video output Mode : %il",value));
- #ifdef D_SCART_OUTPUT //BT012603: added
- if ( VID_OUT_RGB == (value&0xff) )
- ScartLL_VFMD(SCART_VFMD_RGB);
- else
- ScartLL_VFMD(SCART_VFMD_CVBS);
- #endif //D_SCART_OUTPUT //BT012603: added
- gps->vid_out = (BYTE) (value);
- save_change = TRUE;
- break;
- #ifdef SWITCH_BETWEEN_PSO_AND_NON_PSO //billt_0402_2004
- case PS_UPDATE_PREV_VID:
- gps->prev_vid_out = (BYTE) (value);
- save_change = TRUE;
- break;
- #endif
- case PS_UPDATE_BE_CTRL_SETTING:
- dbg_printf(("nI_PS_Update - BE Control : %i",value));
- gps->be_ctrl = (BYTE)(value);
- IFNDEF(Decoder_Macro.bNOT_STORE_VIDEO_BE_EE_VALUE)
- save_change = TRUE;
- ENDIF
- break;
- case PS_UPDATE_EE_CTRL_SETTING:
- dbg_printf(("nI_PS_Update - EE Control : %i",value));
- gps->ee_ctrl = (BYTE)(value);
- IFNDEF(Decoder_Macro.bNOT_STORE_VIDEO_BE_EE_VALUE)
- save_change = TRUE;
- ENDIF
- break;
- #ifdef SUPPORT_CAPTURE_LOGO
- case PS_UPDATE_DISP_LOGO_SETTING:
- dbg_printf(("nI_PS_Update - disply logo : %il",value));
- gps->disp_logo = (BYTE)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_CAPTURE_LOGO_SIZE:
- dbg_printf(("nI_PS_Update - capture logo size: %il",value));
- gps->captureLogoKWords = (WORD)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_CL_AR_SETTING:
- dbg_printf(("nI_PS_Update - capture logo size: %il",value));
- gps->cl_AR = (BYTE)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_CL_OUTSCALLING_SETTING:
- dbg_printf(("nI_PS_Update - capture logo size: %il",value));
- gps->cl_OutScalling = (BYTE)(value);
- save_change = TRUE;
- break;
-
- case PS_UPDATE_WAIT_FOR_CAPTURE_LOGO_READY:
- sig_sem(SEM_READY_FOR_CL_ID);
- wai_sem(SEM_CL_FINISHED_ID);
- break;
- #endif //SUPPORT_CAPTURE_LOGO
- case PS_UPDATE_JPG_VIEW_SETTING:
- #ifdef D_ENABLE_SETUP_JPG_SIZE //DM1015 enable setup the option for JPG view,original/full screen size.
- dbg_printf(("nI_PS_Update - JPG View Control : %il",value));
- gps->jpg_size = (BYTE)(value);
- save_change = TRUE;
- #endif //D_ENABLE_SETUP_JPG_SIZE
- break;
- case PS_UPDATE_JPG_INTERVAL_SETTING:
- #ifdef D_ENABLE_SETUP_JPG_INTERVAL
- dbg_printf(("nI_PS_Update - JPG Interval Control : %il",value));
- gps->jpg_interval = (BYTE)(value);
- save_change = TRUE;
- #endif
- break;
- case PS_UPDATE_PARENTAL_LEVEL:
- dbg_printf(("nI_PS_Update - Parental level : %il",value));
- gps->parental_level = (BYTE)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_PARENTAL_PASSWORD:
- dbg_printf(("nI_PS_Update - Parental password : %il",value));
- #if defined(EXINO2) && defined(D_USE_CUSTOMER_RESERVED_SETTING) // SEC CH.KO041604
- gps->customer_reserved |= B_CUSTOMER_PREVIOUSLY_SET_PASSWORD;
- //Reset parental paswword saved
- if ( value == INITIAL_PASSWORD )
- gps->parental_password_saved = gps->parental_password;
- #endif
- gps->parental_password = (WORD) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_DVD_MENU_LANGUAGE:
- dbg_printf(("nI_PS_Update - DVD menu language : %il",value));
- gps->dvd_menu_language = (WORD)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_AUDIO_LANGUAGE:
- dbg_printf(("nI_PS_Update - Audio language : %il",value));
- gps->audio_language = (WORD)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_SUBTITLE_LANGUAGE:
- dbg_printf(("nI_PS_Update - Subtitle language : %il",value));
- gps->subtitle_language = (WORD)(value);
- save_change = TRUE;
- break;
- #ifdef D_AUX_SUBTITLE_SELECT
- case PS_UPDATE_AUX_SUBTITLE:
- dbg_printf(("nI_PS_Update - Subtitle language : %il",value));
- gps->aux_subtitle = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- #ifdef D_LANGUAGE_OTHERS
- case PS_UPDATE_SUBTITLE_OTHERS_LANGUAGE:
- dbg_printf(("nI_PS_Update - Subtitle Others language : %il",value));
- gps->subtitle_others_language = (WORD)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_AUDIO_OTHERS_LANGUAGE:
- dbg_printf(("nI_PS_Update - Audio Others language : %il",value));
- gps->audio_others_language = (WORD)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_DVD_MENU_OTHERS_LANGUAGE:
- dbg_printf(("nI_PS_Update - Menu Others language : %il",value));
- gps->menu_others_language = (WORD)(value);
- save_change = TRUE;
- break;
- #endif
- #ifdef VIRTUAL_SURROUND_ENABLE
- case PS_UPDATE_VITUAL_SURROUND_EFFECT:
- dbg_printf(("nI_PS_Update - VIRTUAL SURROUND : %il",value));
- gps->threeD_effect = (BYTE)(value);
- gtps.m3dEffect = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- #ifdef D_VIDEO_HD_COM_SETTING
- case PS_UPDATE_VIDEO_HD_COM:
- dbg_printf(("nI_PS_Update - VIDEO HD COM : %il",value));
- gps->video_hd_com = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- #ifdef D_AUDIO_DOWNMIX_MODE_SETTING
- case PS_UPDATE_DOWNMIX_MODE_SETTING:
- dbg_printf(("nI_PS_Update - DOWNMIX MODE : %il",value));
- gps->downmix_mode = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- #ifdef D_AUTO_STANDBY_SETTING
- case PS_UPDATE_AUTO_STANDBY_SETTING:
- dbg_printf(("nI_PS_Update - AUTO STANDBY : %il",value));
- gps->auto_standy_enable = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- case PS_UPDATE_OSD_MENU_LANGUAGE:
- dbg_printf(("nI_PS_Update - OSD menu language : %il",value));
- gps->osd_menu_language = (WORD)(value);
- save_change = TRUE;
- break;
-
- #ifdef SPECTRUM_EQUALIZER
- case PS_UPDATE_GRAPHIC_EQUALIZER_MODE:
- gtps.mGeMode = (BYTE) value;
- break;
- #endif
- #ifdef SPECTRUM_EQUALIZER
- case PS_UPDATE_SPECTRUM_ANALYZER:
- DEC_get_spectrum_analyzer( sa_value);
- break;
- #endif
- //Zoran Dm0105 Enable user change the region code in special case!
- case PS_UPDATE_REGION_CODE:
- dbg_printf(("nI_PS_Update - Region Code : %il",value));
- gps->region_code = (BYTE)(value);
- save_change = TRUE;
- break;
- //DM0105
- //#ifdef VCD_SELECTION_ENABLE
- case PS_UPDATE_VCD_PLAYABLE_MODE:
- dbg_printf(("nI_PS_Update - Macrovision Mode : %il",value));
- gps->vcd_playable_mode = (WORD)(value);
- save_change = TRUE;
- break;
- //#endif
- // <<<<<FW0310 Add macrovision switch
- #ifdef MACROVISION_SELECTION_ENABLE//ZORAN LX0327: merge from ZCH
- case PS_UPDATE_MACROVISION_MODE:
- dbg_printf(("nI_PS_Update - Macrovision Mode : %il",value));
- gps->macrovision_mode = (WORD)(value);
- save_change = TRUE;
- break;
- #endif //MACROVISION_SELECTION_ENABLE
- // FW0310 >>>>>>>>>>
-
- #ifdef D_USE_CUSTOMER_RESERVED_SETTING
- case PS_UPDATE_CUSTOMER_RESERVED:
- dbg_printf(("nI_PS_Update - Customer Reserved : %02x",value));
- gps->customer_reserved = (BYTE) value;
- if ( value & B_CUSTOMER_PREVIOUSLY_POWERED_ON )
- save_change = TRUE;
- else
- PS_RestoreFactoryDefault();
- break;
- #endif // D_USE_CUSTOMER_RESERVED_SETTING
-
- case PS_UPDATE_TO_FACTORY_SETTING:
- {
- #ifdef K1_WL
- extern void cpu_hardware_reset(void);
- #endif
- #ifndef RESET_REGION_CODE
- BYTE pre_region_code = gps->region_code;
- #endif
- WORD pre_parental_password = gps->parental_password;
- BYTE pre_parental_level = gps->parental_level;
- BYTE pre_vcd_playable_mode = gps->vcd_playable_mode;
- #ifdef TUNER_ENABLE
- WORD pradio_index[MAX_FM_STATION];
- BYTE Pre_station_index=gps->CurrentFMStationIndex;
- WORD Pre_CurrentFrequency= gps->CurrentFrequency;
- int i;
- #endif
- #ifdef AVI_DRM_SUPPORT
- BYTE drmmemoryPacked_Temp[PACKED_ALLOCATION_BYTES];
- memcpy(drmmemoryPacked_Temp,& gps->drmmemoryPacked, PACKED_ALLOCATION_BYTES);
- #endif
- OSD_TurnOff();//tecobest gxd 20050916在Setup中设定Reset后,Setup菜单取消后会出现MP3/MPEG4菜单,
- #ifdef TUNER_ENABLE
- for(i=0;i<MAX_FM_STATION;i++)
- pradio_index[i]=gps->FMRadioStations[i];
- #endif
- dbg_printf(("nI_PS_Update - Restore factory settings"));
- PS_RestoreFactoryDefault();
-
- #ifndef RESET_REGION_CODE
- gps->region_code = pre_region_code;
- #endif
- gps->parental_password = pre_parental_password;
- gps->parental_level = pre_parental_level;
- gps->vcd_playable_mode = pre_vcd_playable_mode;
- #ifdef AVI_DRM_SUPPORT
- memcpy(&gps->drmmemoryPacked,drmmemoryPacked_Temp, PACKED_ALLOCATION_BYTES);
- #endif
- #ifdef TUNER_ENABLE
- for(i=0;i<MAX_FM_STATION;i++)
- gps->FMRadioStations[i]=pradio_index[i];
- gps->CurrentFMStationIndex=Pre_station_index;
- gps->CurrentFrequency=Pre_CurrentFrequency;
- #endif
- PS_Save();
- #ifdef DEFAULT_POWER_OFF_STATE
- g_power_state = POWER_SEQUENCE_ON_REQUESTED;
- #endif
- #ifdef INTERNAL_MEM_CARD_READER
- if( IS_PLAYING_CARD )
- FcuTerminate();
- #endif // INTERNAL_MEM_CARD_READER
- #ifdef D_SOFT_RESET
- cpu_soft_reset();
- #else
- cpu_hardware_reset();
- #endif
- }
- break;
- // <<< ZORAN SH0613:Support Front Display setting
- #ifdef D_FRONT_DISPLAY_SETTING
- case PS_UPDATE_FRONT_DISPLAY_SETTING:
- dbg_printf(("nI_PS_Update - Front Display setting : %04x",value));
- gps->frontDisplay = (BYTE) value;
- save_change = TRUE; // ZRN SH0626:must be saved
- break;
- #endif // D_FRONT_DISPLAY_SETTING
- // ZORAN CDE0613 >>>
-
- #if defined(D_STILL_MODE_INTERPOLATION_ENABLED) //ZKR JK0325
- case PS_UPDATE_STILL_MODE_INTERPOLATION:
- dbg_printf(("nI_PS_Update - Still Mode Interpolation : %04x",value));
- //tr_printf(("nI_PS_Update - Still Mode Interpolation : %04x",value));
- gps->still_mode_interpol = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- // <<< ZRN SH0731:Added Black Level setting for Internal Video Encoder (CVE)
- #ifdef D_CVE_BLACKLEVEL_SETTING
- case PS_UPDATE_CVE_BLACKLEVEL_SETTING:
- dbg_printf(("nI_PS_Update - CVE BlackLevel : %04x",value));
- gps->cve_blacklevel = (BOOL) value;
- save_change = TRUE;
- break;
- #endif
- // >>>
- #ifdef PS_UPDATE_TVG_MODE
- case PS_UPDATE_TVG_MODE:
- dbg_printf(("set tvg mode to be: %iln",value));
- PS_Set_TVG_Mode_Value((BYTE)value);
- break;
- #endif
- #ifdef TV_GUARDIAN_ENABLE
- case PS_UPDATE_TVG_CC:
- dbg_printf(("set tvg cc to be: %iln",value));
- PS_Set_TVG_CC_Value((BYTE)value);
- save_change = TRUE;
- break;
- #endif
- #ifdef TV_GUARDIAN_ENABLE
- case PS_UPDATE_TVG_CC_CHANNEL:
- dbg_printf(("set tvg cc to be: %iln",value));
- PS_Set_TVG_CC_Channel_Value((BYTE)value);
- save_change = TRUE;
- break;
- #endif
-
- case PS_UPDATE_OSD_SWITCHER:
- dbg_printf(("set osd switcher to: %iln",value));
- gps->osd_onoff = (BOOL)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_SCREEN_SAVER_ENABLE: //DM092502 For screen save on off
- #ifdef SCREEN_SAVER_SELECTION
- dbg_printf(("set screen saver switcher to: %iln",value));
- gps->screen_saver_enable = (BYTE)(value);
- save_change = TRUE;
- #endif
- break;
- case PS_UPDATE_BG_SELECT:
- #ifdef BACKGROUND_SELECTABLE
- dbg_printf(("set bg to be: %02xn", value));
- gps->ucBackGroundSelect = (BYTE)value;
- save_change = TRUE;
- #endif
- break;
- case PS_UPDATE_DRC_CONTROL:
- gps->ucDRCCtrl = (WORD)value;
- save_change = TRUE;
- break;
- #ifdef MULTIPLE_3D_EFFECT_CHOICE
- case PS_UPDATE_3D_EFFECT:
- gps->uc3DEffect = (BYTE)value;
- save_change = TRUE;
- break;
- #endif
-
- #ifdef D_ENABLE_SETUP_CNTRCTRL
- case PS_UPDATE_CNTR_CTRL:
- gps->cntr_speaker_ctrl = (BYTE)value;
- save_change = TRUE;
- break;
- #endif
- #ifdef D_ENABLE_SETUP_REARCTRL
- case PS_UPDATE_REAR_CTRL:
- gps->rear_speaker_ctrl = (BYTE)value;
- save_change = TRUE;
- break;
- #endif
- case PS_UPDATE_PANORAMA:
- gps->Panorama = (BYTE)value;
- save_change = TRUE;
- break;
-
- case PS_UPDATE_DEC_MODE:
- AS_Set_Enhancement_Mode( (BYTE)value );
- save_change = TRUE;
- break;
- case PS_UPDATE_AIN_PRLGII_MODE:
- #ifdef AUX_IN_ENABLE
- gps->ain_mode = (BYTE)value;
- save_change = TRUE;
- #endif
- break;
- case PS_UPDATE_MUSIC_MODE:
- gps->Hall_effect = (BYTE)value;
- save_change = TRUE;
- break;
-
- case PS_UPDATE_DIMENSION_CTRL:
- gps->Dimension_ctrl = (BYTE)value;
- save_change = TRUE;
- break;
-
- case PS_UPDATE_CENTER_WIDTH_CTRL:
- gps->Center_width_ctrl = (BYTE)value;
- save_change = TRUE;
- break;
- #ifdef D_ENABLE_DOWN_SAMPLING
- case PS_UPDATE_DOWN_SAMPLING_SETTING:
- gps->downsampling_setting = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- #ifdef ANGLE_MARK_SETTING
- case PS_UPDATE_ANGLE_MARK_SETTING:
- gps->angle_mark = (BYTE) value;
- tr_printf(("Set Angle Mark to be %04xn", value));
- save_change = TRUE;
- break;
- #endif
- #ifdef SMART_NAVI_MENU_SETTING
- case PS_UPDATE_SMART_NAVI_SETTING:
- gps->smart_navi = (BYTE) value;
- tr_printf(("Set Smart Navi Menu to be %02xn", value));
- save_change = TRUE;
- break;
- #endif
-
- #ifdef FOUR_LEVEL_TRANSPARENCY //BT030703
- case PS_UPDATE_TRANSPARENCY_LEVEL:
- if ( PS_GET_TRANSPARENCY_LEVEL != (BYTE)value )
- save_change = TRUE;
- gps->menuTrans = (BYTE) value;
- tr_printf(("Set Setup Menu Trans to be %02xn", value));
- break;
- #endif
- #ifdef TUNER_ENABLE
- //#ifdef SAVE_STEREO_MONO_MODE
- case PS_STEREO_MONO:
- gps->CurrentStereoMono= (BYTE)(value);
- save_change = TRUE;
- break;
- //#endif
- case PS_UPDATE_TUNER_WORKMODE:
- dbg_printf(("nI_PS_Update - Tuner work mode : %il",(BYTE) value));
- gps->TunerWorkmode = (BYTE) value;
- #ifndef NOT_SAVER_WORKMODE
- save_change = TRUE;
- #endif
- break;
- case PS_UPDATE_AMFM_FLAG:
- dbg_printf(("nI_PS_Update - AM_FM : %il",(BYTE) value));
- gps->bAmFm = (BYTE) value;
- save_change = TRUE;
- break;
-
- #if 1 //KISENSE_PRE
- case PS_UPDATE_PRETUN_FLAG:
- dbg_printf(("nI_PS_Update - PRE_TUN : %il",(BYTE) value));
- gps->CurrentPretunStation = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- case PS_UPDATE_FMSTATION_TOTALNUM:
- dbg_printf(("nI_PS_Update - Total FM station numbers : %il",(BYTE) value));
- gps->TotalFMStationNum = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_AMSTATION_TOTALNUM:
- dbg_printf(("nI_PS_Update - Total AM station numbers : %il",(BYTE) value));
- gps->TotalAMStationNum = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_FMSTATION_CURNUM:
- dbg_printf(("nI_PS_Update - Current FM station index : %il",(BYTE) value));
- gps->CurrentFMStationIndex = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_AMSTATION_CURNUM:
- dbg_printf(("nI_PS_Update - Current AM station index : %il",(BYTE) value));
- #if 0 //STATION_50
- gps->CurrentAMStationIndex = (BYTE) value;
- save_change = TRUE;
- #else
- gps->CurrentFMStationIndex = (BYTE) value;
- save_change = TRUE;
- #endif
- break;
- case PS_UPDATE_FMSTATION_FREQUENCY:
- dbg_printf(("nI_PS_Update - Current FM station frequency : %il",(BYTE) value));
- gps->FMRadioStations[gps->CurrentFMStationIndex] = (WORD) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_AMSTATION_FREQUENCY:
- dbg_printf(("nI_PS_Update - Current AM station frequency : %il",(BYTE) value));
- #if 0 //STATION_50
- gps->AMRadioStations[gps->CurrentAMStationIndex] = (WORD) value;
- save_change = TRUE;
- #else
- gps->FMRadioStations[gps->CurrentFMStationIndex] = (WORD) value;
- save_change = TRUE;
- #endif
- break;
- case PS_UPDATE_FREQUENCY:
- dbg_printf(("nI_PS_Update - Current FM station frequency : %il",(BYTE) value));
- gps->CurrentFrequency = (WORD) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_ONE_FMSTATION_FREQUENCY:
- save_change = TRUE;
- break;
- case PS_UPDATE_ONE_AMSTATION_FREQUENCY:
- save_change = TRUE;
- break;
- case PS_CLEAR_ALL_AM_STATION_PARAM:
- {
- dbg_printf(("nI_PS_Update - Clear all AM radio station param"));
- gps->TotalAMStationNum = 0;
- gps->CurrentAMStationIndex = 0;
- // for(StationIndex = 0; StationIndex < MAX_AM_STATION; StationIndex++)
- // gps->AMRadioStations[StationIndex] = 0;
- // save_change = TRUE;
- }
- break;
- case PS_CLEAR_ALL_FM_STATION_PARAM:
- {
- dbg_printf(("nI_PS_Update - Clear all FM radio station param"));
- gps->TotalFMStationNum = 0;
- gps->CurrentFMStationIndex = 0;
- // for(StationIndex = 0; StationIndex < MAX_FM_STATION; StationIndex++)
- // gps->FMRadioStations[StationIndex] = 0;
- // save_change = TRUE;
- }
- break;
- #endif
- #ifdef DIGITAL_AMPLIFIER_ENABLE
- case PS_UPDATE_AMPLIFIER_VOLUME:
- gps->ChannelVolume[(BYTE)((value>>12)&0x0F)] = (BYTE)(value&0xFF);
- #ifdef ENABLE_DAC_VOLUME_CONTROL
- if(!((value>>12)&0x0F))
- AUDIODAC_VOL_CONTROL(value&0xFF);// add to control the audio dac volume
- #endif
- save_change = TRUE;
- break;
-
- case PS_UPDATE_SOUND_EFFECT:
- dbg_printf(("nI_PS_Update - Current sound effect : %il",(BYTE) value));
- gps->SoundEffect = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_BASE_SET:
- dbg_printf(("nI_PS_Update - Current base set : %il",(BYTE) value));
- gps->BaseSet = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_BASE_TONE:
- dbg_printf(("nI_PS_Update - Current base tone : %il",(BYTE) value));
- gps->BaseTone = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_TREMBLE_TONE:
- dbg_printf(("nI_PS_Update - Current tremble tone : %il",(BYTE) value));
- gps->TrembleTone = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_DRC_MODE:
- dbg_printf(("nI_PS_Update - Current DRC mode : %il",(BYTE) value));
- gps->DRCMode = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_DRC_ATTACK_SPEED:
- dbg_printf(("nI_PS_Update - Current attack speed : %il",(BYTE) value));
- gps->DRCAttackSpeed = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_DRC_RELEASE_SPEED:
- dbg_printf(("nI_PS_Update - Current release speed : %il",(BYTE) value));
- gps->DRCReleaseSpeed = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_DRC_ATTACK_RANGE:
- dbg_printf(("nI_PS_Update - Current attack threshold : %il",(BYTE) value));
- gps->DRCAttackThreshold = (BYTE) value;
- save_change = TRUE;
- break;
- case PS_UPDATE_DRC_RELEASE_RANGE:
- dbg_printf(("nI_PS_Update - Current attack threshold : %il",(BYTE) value));
- gps->DRCReleaseThreshold = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- #ifdef SPDIF_IN_CH_SELECT
- case PS_UPDATE_DIGITAL_AUDIO_IN_CH:
- dbg_printf(("nI_PS_Update - Current attack threshold : %il",(BYTE) value));
- gps->dig_aud_in_chan= (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- //ZCH, Sean07102003
- #ifdef D_CONTROL_6_CHANNEL_VOLUME
- case PS_UPDATE_SEPARATE_VOLUME :
- dbg_printf(("nI_PS_Update - Current channel volume : %il",(BYTE)value));
-
- gps->separate_volume[((value >> 8) & 0xFF) % 6] = (value & 0xFF);
- gcst.mSeparateVolumeFlag = 0x1;
-
- save_change = TRUE;
-
- break;
- #endif //D_CONTROL_6_CHANNEL_VOLUME
- case PS_UPDATE_BASS_MANAGEMENT:
- dbg_printf(("nI_PS_Update - Bass Management : %d", (BYTE)value));
- #if defined(D_SIMPLIFIED_AUDIO_SETUP)&&defined(D_ENABLE_SUBWOOFER_OPTION)
- {
- BYTE tempstore = (BYTE) value;
- if(gps->BassManagement != tempstore)
- {
- gps->BassManagement = tempstore;
- if (gps->SpeakersConfigIndex != gps->SpeakersConfigIndexBak)
- {
- gps->SpeakersConfigIndex = gps->SpeakersConfigIndexBak;
- }
- save_change = TRUE;
- }
- else if (gps->SpeakersConfigIndex != SPEAKERS_DEFAULT_CONFIG)
- {
- gps->SpeakersConfigIndexBak = gps->SpeakersConfigIndex;
- save_change = TRUE;
- }
- }
- #else
- gps->BassManagement = (BYTE) value;
- save_change = TRUE;
- #endif
- break;
-
- //SeanLiu_0902_2004
- #ifdef D_ENABLE_DOLBY_EX_SUPPORT
- case PS_UPDATE_DOLBY_EX_SETTING :
- dbg_printf(("nI_PS_Update -Dolby EX mode : %d", (BYTE)value));
- gps->Dolby_EX_BS_Speakers = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- //<<<SeanLiu_0902_2004
-
- #ifdef EZVIEW_ENABLED // ZKR GL031204 : Changed the macro name.
- case PS_UPDATE_EZVIEW_MODE:
- dbg_printf(("nI_PS_Update - EZView Mode : %d", (BYTE)value));
- gps->ezview_mode = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- // <<< SEC CH.KO012203 : for rear, center speaker setting
- #ifdef D_ENABLE_SPEAKER_SETUP
- case PS_UPDATE_BASS_RECFG_SETTING:
- gps->bass_configration = (BYTE)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_CENTERSPK_SETTING:
- gps->centerspk = (BYTE)(value);
- save_change = TRUE;
- break;
- case PS_UPDATE_REARSPK_SETTING:
- gps->rearspk = (BYTE)(value);
- save_change = TRUE;
- break;
-
- case PS_UPDATE_SW_SETTING:
- gps->subwoofer = (BYTE)(value);
- save_change = TRUE;
- break;
- #endif
- #ifdef MPP_SUPPORT
- case PS_UPDATE_MPP_ENABLE:
- gcst.mMPP_Enable = (value) ? TRUE : FALSE;
- break;
- #endif
- #ifdef EXINO2 //ZKR ML:040604 Dts digital out option.
- #ifdef D_DIGITAL_DTS_OUT_OPTION
- case PS_UPDATE_DIGITAL_OUT:
- gps->dts_digital_out = (BYTE)value;
- save_change = TRUE;
- break;
- #endif
- #endif
- #ifdef D_ENABLE_HEADPHONE_DETECT
- case PS_UPDATE_HEADPHONE_SETTING :
- gtps.mHeadPhone = (BYTE) value;
- break;
- #endif
- #ifdef AVI_DRM_SUPPORT
- case PS_UPDATE_DRM_MEMORY:
- save_change = TRUE;
- break;
- #endif
- #ifdef D_MEMORY_SETTING
- case PS_UPDATE_MEMORY_SETTING:
- gps->memory_mode = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- // <<< Glen.Lim.1024.2004
- #ifdef D_AUTO_PLAY_MODE_SUPPORT
- case PS_UPDATE_AUTO_PLAY_MODE:
- gps->bAutoPlayMode = (BYTE)value;
- save_change = TRUE;
- break;
- #endif
- // >>>
- #ifdef D_SURROUND_PERFERENCE_SUPPORT
- case PS_UPDATE_SURROUND_PERFERENCE:
- gps->surround_perference = (BYTE)value;
- save_change = TRUE;
- break;
- #endif
-
- #ifdef D_CLOSE_CAPTION_SETTING
- case PS_UPDATE_CLOSE_CAPTION_SETTING:
- gps->close_caption_mode = (BYTE) value;
- save_change = TRUE;
- break;
- #endif
- #ifdef USE_JOG
- case PS_UPDATE_MAIN_VOL_LEFT:
- gps->left_volume = (BYTE) value;
- b_vol_change = 1;
- save_change = FALSE;
- break;
- case PS_UPDATE_MAIN_VOL_RIGHT:
- gps->right_volume = (BYTE) value;
- b_vol_change = 1;
- save_change = FALSE;
- break;
- case PS_UPDATE_SUR_VOL_LEFT:
- gps->sur_left_volume = (BYTE) value;
- b_vol_change = 1;
- save_change = FALSE;
- break;
- case PS_UPDATE_SUR_VOL_RIGHT:
- gps->sur_right_volume = (BYTE) value;
- b_vol_change = 1;
- save_change = FALSE;
- break;
- case PS_UPDATE_CENTER_VOL:
- gps->center_volume = (BYTE) value;
- b_vol_change = 1;
- save_change = FALSE;
- break;
- case PS_UPDATE_SUB_VOL:
- gps->sub_volume = (BYTE) value;
- b_vol_change = 1;
- save_change = FALSE;
- break;
- case PS_UPDATE_MAIN_VOLUME:
- gps->main_volume = (BYTE) value;
- b_vol_change = 1;
- /*
- gps->left_volume = (BYTE) value;
- gps->right_volume = (BYTE) value;
- gps->sur_left_volume = (BYTE) value;
- gps->sur_right_volume = (BYTE) value;
- gps->center_volume = (BYTE) value;
- gps->sub_volume = (BYTE) value;
- */
- save_change = FALSE;
- break;
- case PS_UPDATE_ALL_VOLUME:
- PS_Save();
- b_vol_change = 0;
- g_is_saving_vol = 0;
- return;
- #endif
- default :
- dbg_printf(("nI_PS_Update - Unknown update commandn"));
- }
- dbg_printf(("n"));
- if (save_change){
- PS_Save();
- }
- }
- #ifdef TV_GUARDIAN_ENABLE
- BYTE PS_Get_TVG_Mode_Value(void)
- {
- return ((gps->tvg_mode )&TVG_MODE_M);
- }
- BYTE PS_Get_TVG_CC_Value(void)
- {
- return ((((gps->tvg_mode)&TVG_CC_M)>>2)&0x03);
- }
- BYTE PS_Get_TVG_CC_Channel_Value(void)
- {
- return( ( ( ( gps->tvg_mode ) & TVG_CC_CHANNEL_M ) >> 4 ) & 0x03);
- }
- void PS_Set_TVG_Mode_Value(BYTE value)
- {
- gps->tvg_mode = ( gps->tvg_mode & ( ~TVG_MODE_M ) ) | value;
- }
- void PS_Set_TVG_CC_Value(BYTE value)
- {
- gps->tvg_mode = ( ( gps->tvg_mode ) & ( ~TVG_CC_M ) ) | ( ( value << 2 ) & TVG_CC_M );
- }
- void PS_Set_TVG_CC_Channel_Value(BYTE value)
- {
- gps->tvg_mode = ( ( gps->tvg_mode ) & ( ~TVG_CC_CHANNEL_M ) ) | ( ( value << 4 ) & TVG_CC_CHANNEL_M );
- }
- #endif
- #ifdef AVI_DRM_SUPPORT
- BOOL PS_LoadDrmMemory(unsigned char *data, unsigned int count)
- {
- memcpy(data, &gps->drmmemoryPacked[0], count);
- return TRUE;
- }
- BOOL PS_SaveDrmMemory(unsigned char *data, unsigned int count)
- {
- memcpy(&gps->drmmemoryPacked[0], data, count);
- return TRUE;
- }
- #endif
- //Change the gps->** to function.
- WORD PS_GetDVDMenuLanguage(void)
- {
- return gps->dvd_menu_language;
- }
- WORD PS_GetAudioLanguage(void)
- {
- return gps->audio_language;
- }
- WORD PS_GetSubtitleLanguage(void)
- {
- return gps->subtitle_language;
- }
- WORD PS_GetParentalCountry(void)
- {
- return gps->parental_country;
- }
- BYTE PS_GetRegionCode(void)
- {
- return gps->region_code;
- }
- BYTE PS_GetParentalLevel(void)
- {
- return gps->parental_level;
- }
- BYTE PS_GetTVStandard(void)
- {
- return gps->tv_standard;
- }
- // <<< Glen.Lim.1024.2004
- #ifdef D_AUTO_PLAY_MODE_SUPPORT
- BYTE PS_GetAutoPlayMode(void)
- {
- return gps->bAutoPlayMode;
- }
- #endif
- // >>>
- #ifdef D_SURROUND_PERFERENCE_SUPPORT
- BYTE PS_GetSurroundPerferenceParam(void)
- {
- return gps->surround_perference;
- }
- #endif
- BYTE PS_GetViewMode(void)
- {
- return gps->view_mode;
- }
- BYTE PS_GetTVShape(void)
- {
- return gps->tv_shape;
- }
- #ifdef EZVIEW_ENABLED
- BYTE PS_GetEzviewMode()
- {
- return gps->ezview_mode;
- }
- #endif
- BYTE PS_GetVideoMode()
- {
- return gps->vid_out;
- }