📄 setup_tab.c
字号:
//
// FILE
// setup_tab.c
//
//--------------------------------------
//Modefied by wangfeng, 2003-08-29 15:18
//For new setup menu
//--------------------------------------
#include "user_init.h"
extern int user_input_pwd;
#ifdef NEW_SETUP_OSD // majinping 2002-05-02 for new setup menu
#error
#include "setup_new.c"
#elif defined(KONKA_DVD) // 2-7-16 14:44 for new setup menu
#include "setup_konka.c"
#else
/*****************************************************\
Creater: Terry
Date : 2001/5/11 12:49PM
Description: Setup menu using
\*****************************************************/
//#define USE_MIC_ECHO_PARAM
#include "global.h"
#include "osd.h"
#include "func.h"
#include "navdata.h"
#include "kernel.h"
#include "vpp.h"
#include "user_if.h"
#include "dsp3_if.h"
#include "cchar.h"
#include "ircmd.h"
#include "auddrv.h" //2004AUDDRV oliver 20041004 for using audio driver purpose
//#include "audif.h"
#include "tvif.h"
#include "memmap.h"
#include "stdlib.h"
#include "kinf.h"
#include "gpio.h"//nono 2004-4-26 20:57
#ifdef SUPPORT_MIDI //ouyang 2004-10-18 22:44
#include "fsmidi.h"
#endif
#ifdef SUPPORT_DISPLAY_MENU
#include "ircode.h"
#include "irconfig.h"
#endif//end #ifdef DISPLAY_MENUs
#ifdef TAS3001_AMP //Ti3001_OSD_UI_2 // TAS3001_AMP use setup menu control /jsaon 2-8-30 21:30
#include "ti3001.h"
#endif
#ifdef SUPPORT_APOGEE_AMP//xyy 2004-1-12 17:40
#include "ddx8000.h"
#endif
#ifdef SUPPORT_SPI
#include "spi.h"
#endif
#ifdef DVB_MENU_SETUP_STYLE
#include "dvbmenu.h"
#endif
#ifndef DVDRELEASE
#define SETUP_DBG 1
//#define MONE_SETUP
#endif
#ifndef SETUP_DBG
#undef printf
#undef print_block
#define printf(f, a...) do {} while (0)
#define print_block(x,y) do {} while (0)
#endif
#if defined (YI_XIAN_TONG)||defined (TONIC_DVD)//zhaoyanhua add 03-11-3 22:20
#include "gpio.h"
#endif
extern UINT16 echo_para_tbl[9][2];//echo_para[9][2]; for using audio driver purpose
#ifdef VGA_CTRL_FORMAT//wangfeng 2003-12-18 16:12
BYTE temp_format=0;
#endif
#ifdef MIC_FUNCTION_KEY
extern BYTE bFuncStep;//nono 20040107
#endif//MIC_FUNCTION_KEY
//wangap add for downmix off volume
#ifndef AC3_BASS_MANAGEMENT
BYTE cspk_volume;
BYTE fspk_volume;
BYTE sspk_volume;
#endif
#ifdef USE_PROLOGIC_II_KEY
BYTE prologic_val;//clead 2003-8-7
#endif
#if defined(GBM_DVD)&&!defined(GBM_FULL_FUNCTION)&&!defined(USER_MPEG_LOGO)
#undef SAME_DISC_RESUME
BYTE same_disc_onoff = 1;
#endif
#ifdef DYNAMIC_SPECTRUM //fengjl 3-10-21 20:38
#undef SAME_DISC_RESUME
BYTE band_onoff = 0;//inital value must be 0.zhaoyanhua modify 2004-1-12 15:01
#endif
#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //fengjl add for bbk's new setup 3-11-12 16:17
extern void osd_init_bbk_setup(void);
BYTE one_key_pass_flag = 0;
BYTE main_setup = 0;
#elif defined(BBK_DSS_555_DVD)||defined(BBK_DV911S)
BYTE main_setup = 0;
#endif
#ifdef VIDEO_SETUP_NEW_GUI//zhaoyanhua add 2004-1-7 17:18
extern int GetVideoSetValue(int id);
#endif//end VIDEO_SETUP_NEW_GUI
#ifdef AUDIO_2CH_5_1CH//zhaoyanhua add 03-11-1 17:33
extern BYTE ChannelFlag;
#endif
#ifdef KARAOKE_MENU//wangfeng
BYTE KARAOKE_MENU_FLAG=0;
#endif
//#define MONE_SETUP
//=======================
#ifdef NEW_STYLE_SETUP
#define BUTTON_COLOR 7
//zhaoyanhua add 3-7-14 17:49
//a flag decide to operate setupmenu or not.
//if 0,only show setup menu, now at level 0, can not operate.
//if 1,now at level 1, can operate setup menu with UP/DOWN/LEFT/RIGHT/SELECT key.
int GBM_run_setupmenu_flag = 0;
#endif
//define setup pages(including MAX_SETUP_PAGE+MAX_CUSTM_SETUP_PAGE)
#include "setup_def.h"
const BYTE OSD_LANG_MAP[8] = OSD_LANG_SETUP_MAP; //Jeff 20030217
const BYTE upgrade_file_name[] = UPGRADE_FILE_NAME;//nono 3-6-17 14:03
extern void RsmInfo2Flash(int);
extern void audif_set_SPDIF_BITSTREAM();
//extern void ircmd_stop(void);
#ifdef SAME_DISC_RESUME
BYTE same_disc_onoff;
#endif
extern UINT8 ap_tv_out_id;//nono 2003-8-1 18:08
#ifdef USER_MPEG_LOGO
BYTE mpeg_logo_onoff=0;
BYTE need_show_logo=0;
extern void Change_User_Logo();
#endif
#ifdef DVB_MENU_SETUP_STYLE
extern const char * osd_str_dvb_submenu[N_OSD_LANGS][5];
#endif
#if defined(NEW_PARENTAL_GUI)||defined(MODIFY_PARENTAL_GUI)//zhaoyanhua add 2003-11-28 10:46
#if defined(NEW_PARENTAL_GUI)
extern void osd_init_parental_gui(void);
BYTE new_parental_gui = 0;
#endif
#if defined(MODIFY_PARENTAL_GUI)
BYTE parental_gui_flag = 0;
#endif//#if defined(MODIFY_PARENTAL_GUI)
void check_parent_password(void);
void ExitParentalGUI(void);
#endif
//osd related function
extern void osd_init_setup(void);
extern void osd_disable(void);
extern void osd_DrawLine(UINT32 xStart, UINT32 yStart, UINT32 xEnd, UINT32 yEnd, BYTE color, BYTE lineWidth);
extern void osd_draw_rect(UINT32 xStart, UINT32 yStart, UINT32 xLen, UINT32 yLen, BYTE bkColor);
extern void osd_draw_setup_button(BYTE xStart, BYTE yStart, BYTE xLen, BYTE color, BYTE bDown);
extern void setVPP_OffsetX(int X);
extern void setVPP_OffsetY(int Y);
//3D sound(EQ, Surround) related setting
extern BYTE soundGetSurroundType();
//misc functions
extern void set_aud_buf_size(void);
void setup_DrawItem(BYTE level, BYTE yStart, BYTE updowngray);
const char * setup_SetItemString(void);
void run_save_tv_cmd(UINT8 item,UINT8 sel);
UINT16 run_save_unChk_cmd(UINT8 save);
void set_video_aspect(void);
int is_aspect_menu(void);
void run_save_sel_cmd(BYTE page,BYTE index);
void run_save_total_sel(void);
void rep_run_the_menu(void);
void show_lock(int s,int mode);
void setup_ShowAC3Config();
void setup_CookScaleItem(UINT8 id, UINT8 dir);
void setup_PrepareScaleItem(BYTE id, BYTE up1down);
void setup_ShowVolCtrlConfig();
void ShowPasswordGUI();
void setup_ShowAC3DynamicRange(void);
void set_AC3DynamicRange(void);
void reset_passwd_cnt(void);
void setup_func_return_main(void);
int IsOSDChinese();
//void SetSharpness(BYTE nVal);
void SetBrightness(BYTE nVal);
void SetContrast(BYTE nVal);
void setup_save_exit(void);
#ifdef IR_KEY_SET_VIDEO_MODE
void SetBrightnessAdjust(BYTE nVal, BYTE nVal2);
void SetContrastAdjust(BYTE nVal, BYTE nVal2);
#endif//IR_KEY_SET_VIDEO_MODE
void SetHUE(BYTE nVal);
void SetSaturation(BYTE nVal);
#ifdef DIP_CFG_ENABLE
void SetDeInterlace(BYTE nVal);
#endif
#ifdef BBK_DVD//zhaoyanhua add 03-10-19 10:43
void AudioSet2chOutput(void);
void AudioSet5_1chOutput(void);
void AudioSetPrologic_IIOutput(void);
#endif//end BBK_DVD
#ifdef SHOW_STANDBY_TIMER //suqiaoli add 2003-8-2
#define STANDBY_TIMER_ITEM 3
void polling_setup_standby_timer(void);
#endif
extern void search_ap_tv_out_id(void);
extern void update_tv_format_sel(void);
/*********** Item description **********************\
BYTE function
0 mode(MSB 4bits) ==>show direction picture
0x0:no effect
0x1:basic select function
0x2:can enter number
0x3:need run function by osd id
0x4:left/right shift only
0x5:only show text,can't move to this area
1 title ---sw region 1
2~6 select item ---sw region 2
\******************************************************/
enum
{
SET_NE=0,
SET_BS=0x1,
SET_NM=0x2,
SET_FUNC=0x3,
SET_SH=0x4,
SET_SHOW=0x5,
SET_SCALE=0x6,
SET_SPACE=0x7,
};
UINT8 setup_page,setup_id,setup_sel_item;
#define page setup_page
#define id setup_id
#define sel setup_sel_item
UINT8 id,sel,page;
#ifdef SETUP_6_DIGIT_PASSWORD//zhaoyanhua add 03-10-14 14:22
UINT32 tmp_passwd;
#else
UINT16 tmp_passwd;
#endif
UINT32 romCheckSum;
#ifdef Ti3001_OSD_UI_2
INT8 amp_volume_level;
INT8 amp_fspk_level;
INT8 amp_fspk_balance_level;
INT8 amp_sspk_level;
INT8 amp_sspk_balance_level;
INT8 amp_cspk_level;
INT8 amp_subwoofer_level;
INT8 amp_bass_level;
INT8 amp_tremble_level;
INT8 amp_dynamic_level;
#endif
BYTE index_y=0; //item index for 1st-level page, 2nd-level page
BYTE index_y2=0; //item index for 3rd-level page
BYTE index_y_start=0;
BYTE index_y2_start=0;
#ifdef EASTECH_SETUPMENU
BYTE index_pscan_ok=0;
#endif
BYTE submenuStart=SETUP_MENU_YSTART;
BYTE setupLevel=0; //0:main menu, 1:sub-menu, 2:selection-menu(menu of sub-menu)
BYTE setupItemNum[3] = { //max item num in every sub-menu
MAX_PAGE_ITEM, //main menu items count
MAX_PAGE_ITEM, //second-level menu items count
MAX_PAGE_ITEM //third-level menu
};
//define setup page
#include "setup_page.h"
//PS:this command line doesn't be used in macro define
//run_save_sel_cmd(0, 5);
#ifdef Ti3001_OSD_UI_2
const UINT8 setup_MainP[][2] =
{
{STR_OS_SYS_SETUP, 0},
{STR_OS_LANG_SETUP, 1},
{STR_OS_AUD_SETUP, 2},
//{STR_OS_SPK_SETUP, 3},
{STR_OS_SPK_SETUP, 3},
{STR_OS_DIGTAL_SETUP, 4},
{STR_OS_AMP_SETUP1,5}, //S:"功放设定1"
{STR_OS_AMP_SETUP2,6}, //S:"功放设定2"
{STR_OS_EXIT_MENU, 7},
};
#elif defined(DVB_MENU_SETUP_STYLE)
const UINT8 setup_MainP[][2] =
{
{STR_OS_INSTALL_SETUP, 0},
{STR_OS_CHANNEL_SETUP, 1},
{STR_OS_SYS_SETUP, 2},
{STR_OS_LANG_SETUP, 3},
{STR_OS_AUD_SETUP, 4},
{STR_OS_VIDEO_SETUP, 5},
{STR_OS_SPK_SETUP, 6},
{STR_OS_DIGTAL_SETUP, 7},
{STR_OS_SPACE, 0},
{STR_OS_EXIT_MENU, 8},
{STR_OS_NO, 0},
};
#else//take off SOFT_MENU special setup_MainP,share with old setup_MainP.chenzhao on 2004-11-15 11:3
const UINT8 setup_MainP[][2] =
{
{STR_OS_SYS_SETUP, 0},
{STR_OS_LANG_SETUP, 1},
{STR_OS_AUD_SETUP, 2},
#ifdef QSI_SETUP_MENU//liweihua 2004-6-15
{STR_OS_KARAOKE_SETUP,3},
#else
#ifndef BBK_SIMPLE_SETUP
#ifndef SETUP_DONGLI459//20040206
{STR_OS_VIDEO_SETUP, 3},
{STR_OS_SPK_SETUP, 4},
{STR_OS_DIGTAL_SETUP, 5},
#else
{STR_OS_SPK_SETUP, 3},
{STR_OS_DIGTAL_SETUP, 4},
#endif
{STR_OS_SPACE, 0},
#else//#ifndef BBK_SIMPLE_SETUP
{STR_OS_VIDEO, 0},
#endif//#ifndef BBK_SIMPLE_SETUP
#endif//#ifdef QSI_SETUP_MENU
#if defined(BBK_NEW_SETUP)&&defined(BBK_DV961_DVD) //axel 2004/1/26 04:01 DSS555 need not OENKEYPASSPAGE
{STR_OS_ONEKEY_SETUP, 7},
{STR_OS_EXIT_MENU,8},
#else
{STR_OS_EXIT_MENU, 7},
#endif
{STR_OS_NO, 0},
};
#endif
//
// If you change the sequence of the menu items, please check up the following definition
// and
// set_default_value()
// run_set_variable()
// setup_func_down()
// setup_SetAC3Config()
//
UINT8 setup_sel[MAX_SETUP_PAGE + MAX_CUSTM_SETUP_PAGE][MAX_PAGE_ITEM];//Item number
#ifdef SUPPORT_FUNCTION_MENU
UINT8 setup_sel_plus[MAX_SETUP_PAGE_PLUS][MAX_PAGE_ITEM_PLUS];
#endif
//const UINT8 setup_item[MAX_SETUP_PAGE + MAX_CUSTM_SETUP_PAGE][MAX_PAGE_ITEM][MAX_ITEM_SEL]
//exe_setup_function,terry,2004/2/10 03:36PM
//take off SOFT_MENU special setup_item,share with old setup_item.chenzhao on 2004-11-15 11:3
#include "setup_item.c"
#include "setup_exe.c"
#include "setup_if.c"
#ifdef SUPPORT_FUNCTION_MENU
#include "setup_plus.c"
#endif
int setup_IsSpkSubwooferOn(void)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -