| 1 | /*************************************************************************** |
|---|
| 2 | * Copyright (c) 2003-2006, Broadcom Corporation |
|---|
| 3 | * All Rights Reserved |
|---|
| 4 | * Confidential Property of Broadcom Corporation |
|---|
| 5 | * |
|---|
| 6 | * THIS SOFTWARE MAY ONLY BE USED SUBJECT TO AN EXECUTED SOFTWARE LICENSE |
|---|
| 7 | * AGREEMENT BETWEEN THE USER AND BROADCOM. YOU HAVE NO RIGHT TO USE OR |
|---|
| 8 | * EXPLOIT THIS MATERIAL EXCEPT SUBJECT TO THE TERMS OF SUCH AN AGREEMENT. |
|---|
| 9 | * |
|---|
| 10 | * $brcm_Workfile: $ |
|---|
| 11 | * $brcm_Revision: $ |
|---|
| 12 | * $brcm_Date: $ |
|---|
| 13 | * |
|---|
| 14 | * Module Description: |
|---|
| 15 | * |
|---|
| 16 | * Revision History: |
|---|
| 17 | * |
|---|
| 18 | * $brcm_Log: $ |
|---|
| 19 | * |
|---|
| 20 | ***************************************************************************/ |
|---|
| 21 | #ifndef BAPP_H__ |
|---|
| 22 | #define BAPP_H__ |
|---|
| 23 | |
|---|
| 24 | #include "bsettop.h" |
|---|
| 25 | #include "fstore.h" |
|---|
| 26 | #include "bscreen.h" |
|---|
| 27 | #include "bapp_util.h" |
|---|
| 28 | #include "bsettop_stream.h" |
|---|
| 29 | #include "chan_mgr.h" |
|---|
| 30 | #include "ch_map.h" |
|---|
| 31 | #include "led.h" |
|---|
| 32 | #include "bsettop_hdmi.h" |
|---|
| 33 | #ifdef CONFIG_EIA_708 |
|---|
| 34 | #include "bapp_eia708.h" |
|---|
| 35 | #endif |
|---|
| 36 | #include "bsettop_rfm.h" |
|---|
| 37 | |
|---|
| 38 | #define SCREEN_MAX_STR_WIDTH 1024 |
|---|
| 39 | |
|---|
| 40 | #define MAX_MSG_EVENT 128 |
|---|
| 41 | #define MAX_TIME_STR 32 |
|---|
| 42 | |
|---|
| 43 | #define TUNE_DURATION (3 * 1000) /* Milliseconds */ |
|---|
| 44 | |
|---|
| 45 | #define CONFIG_ACTIVE_STANDBY |
|---|
| 46 | |
|---|
| 47 | #define MAX_PHONE_LEN 255 |
|---|
| 48 | #define MAX_RRT_VAL 16 |
|---|
| 49 | #define MAX_EAS_TEXT 256 |
|---|
| 50 | |
|---|
| 51 | /* support for user defined frequencies in diagnostic screen */ |
|---|
| 52 | #define MAX_USER_FREQ 16 |
|---|
| 53 | |
|---|
| 54 | /* |
|---|
| 55 | * Application states |
|---|
| 56 | */ |
|---|
| 57 | typedef enum bapp_state_t |
|---|
| 58 | { |
|---|
| 59 | eAPP_STATE_DEFAULT, /* Default init state */ |
|---|
| 60 | eAPP_STATE_HUNT, /* Needs channel map to operate */ |
|---|
| 61 | eAPP_STATE_NORMAL, /* Has channel map and can tune channels */ |
|---|
| 62 | eAPP_STATE_FACTORY, /* Factory Test State */ |
|---|
| 63 | eAPP_STATE_DONE, /* Last state, should never occur */ |
|---|
| 64 | }bapp_state_t; |
|---|
| 65 | |
|---|
| 66 | /* |
|---|
| 67 | * RRT status |
|---|
| 68 | */ |
|---|
| 69 | typedef enum bapp_rrt_status_t |
|---|
| 70 | { |
|---|
| 71 | eRRT_UNAVAILABLE = 0x0, |
|---|
| 72 | eRRT_AVAILABLE = 0x1, |
|---|
| 73 | }bapp_rrt_status_t; |
|---|
| 74 | |
|---|
| 75 | /* |
|---|
| 76 | * Structure defining blocked setting for an RRT dim/value pair. |
|---|
| 77 | */ |
|---|
| 78 | typedef enum bapp_rrt_rating_state_t |
|---|
| 79 | { |
|---|
| 80 | eRRT_UNBLOCK = 0x0, |
|---|
| 81 | eRRT_BLOCK = 0x1 |
|---|
| 82 | }bapp_rrt_rating_state_t; |
|---|
| 83 | |
|---|
| 84 | /* |
|---|
| 85 | * Color palettes |
|---|
| 86 | */ |
|---|
| 87 | typedef enum bapp_palette_t |
|---|
| 88 | { |
|---|
| 89 | ePALETTE_DEFAULT, |
|---|
| 90 | ePALETTE_SCREENSAVER, |
|---|
| 91 | }bapp_palette_t; |
|---|
| 92 | |
|---|
| 93 | /** |
|---|
| 94 | Summary: |
|---|
| 95 | Stream format type |
|---|
| 96 | **/ |
|---|
| 97 | |
|---|
| 98 | typedef struct bapp_av_stream_type_t |
|---|
| 99 | { |
|---|
| 100 | unsigned char format; |
|---|
| 101 | unsigned int codec_id; |
|---|
| 102 | unsigned int transport_id; /* not used */ |
|---|
| 103 | char format_name[32]; |
|---|
| 104 | }bapp_av_stream_type_t; |
|---|
| 105 | |
|---|
| 106 | typedef struct rrt_settings_t { |
|---|
| 107 | unsigned int rrt_status : 2; |
|---|
| 108 | unsigned int rrt_size : 14; |
|---|
| 109 | unsigned int last_rrt_id : 16; |
|---|
| 110 | unsigned int pin; /* separate pin for RRT or same pin for whole app? */ |
|---|
| 111 | unsigned short ratings_rrt[MAX_RRT_DIM]; |
|---|
| 112 | unsigned char rrt[RRT_BUF_LEN]; |
|---|
| 113 | }rrt_settings_t; |
|---|
| 114 | |
|---|
| 115 | typedef struct ratings_settings_t { |
|---|
| 116 | unsigned int ratings_lock : 2; |
|---|
| 117 | unsigned int ratings_tv : 18; |
|---|
| 118 | unsigned int ratings_movies : 7; |
|---|
| 119 | unsigned int content_d : 1; |
|---|
| 120 | unsigned int content_l : 1; |
|---|
| 121 | unsigned int content_s : 1; |
|---|
| 122 | unsigned int content_v : 1; |
|---|
| 123 | }ratings_settings_t; |
|---|
| 124 | |
|---|
| 125 | typedef struct dcc_settings_t { |
|---|
| 126 | unsigned int captions_basic : 4; |
|---|
| 127 | unsigned int captions_font : 3; |
|---|
| 128 | unsigned int captions_font_size : 2; |
|---|
| 129 | unsigned int captions_font_style : 2; |
|---|
| 130 | unsigned int captions_font_color : 4; |
|---|
| 131 | unsigned int captions_font_opacity : 3; |
|---|
| 132 | unsigned int captions_back_color : 4; |
|---|
| 133 | unsigned int captions_back_opacity : 3; |
|---|
| 134 | unsigned int captions_edge_color : 4; |
|---|
| 135 | unsigned int captions_edge_type : 3; |
|---|
| 136 | unsigned char captions_analog : 4; |
|---|
| 137 | unsigned char captions_digital : 4; |
|---|
| 138 | }dcc_settings_t; |
|---|
| 139 | |
|---|
| 140 | typedef struct hd_config_settings_t { |
|---|
| 141 | unsigned int aspect_ratio : 2; /* display aspect radio, currently 4x3, 16x9 */ |
|---|
| 142 | unsigned int output_format : 3; /* hd output format for HDMI */ |
|---|
| 143 | unsigned int hd_options : 3; /* hd output options */ |
|---|
| 144 | unsigned char sharpness; /* sharpness (0-25) for HDMI 480i/480p */ |
|---|
| 145 | } hd_config_settings_t; |
|---|
| 146 | |
|---|
| 147 | #define MAX_LONG_NAME_CHARS 128 |
|---|
| 148 | #define MAX_TITLE_CHARS 96 |
|---|
| 149 | #define MAX_DESC_CHARS 256 |
|---|
| 150 | #define MAX_TIME_STR_CHARS 32 |
|---|
| 151 | #define EIT_CURRENT 0 |
|---|
| 152 | #define EIT_NEXT 1 |
|---|
| 153 | |
|---|
| 154 | /* |
|---|
| 155 | * Structure defining a unit of data storage |
|---|
| 156 | */ |
|---|
| 157 | typedef struct bapp_ch_t |
|---|
| 158 | { |
|---|
| 159 | unsigned int major : 10; |
|---|
| 160 | unsigned int minor : 10; |
|---|
| 161 | unsigned int freq_idx : 8; |
|---|
| 162 | unsigned int psi : 1; |
|---|
| 163 | unsigned int pcr_pid : 13; |
|---|
| 164 | unsigned int video_pid : 13; |
|---|
| 165 | unsigned int has_lang : 3; /* NOTE that we can have muximum of 3 languages */ |
|---|
| 166 | unsigned int hidden : 1; |
|---|
| 167 | unsigned short video_type : 8; /* we need support more video format, e.g. AVC */ |
|---|
| 168 | unsigned short program_num : 8; /* program number */ |
|---|
| 169 | unsigned short num_audio : 8; /* number of audio channels */ |
|---|
| 170 | unsigned short audio_pid[MAX_AUDIO_PIDS]; |
|---|
| 171 | unsigned short ch_name[MAX_CH_SHORT_NAME_CHARS]; /* VCT short defined 7 as max, but we have more */ |
|---|
| 172 | unsigned short audio_type[MAX_AUDIO_PIDS]; /* for MPEG audio support */ |
|---|
| 173 | unsigned char audio_lang[MAX_CH_NAME_CHARS][3]; |
|---|
| 174 | unsigned int frequency_khz; /* frequency in khz for the channel */ |
|---|
| 175 | unsigned short cur_audio; |
|---|
| 176 | unsigned short source_id; /* we need to save source id */ |
|---|
| 177 | /* new feature */ |
|---|
| 178 | unsigned int skip : 1; /* skip chennel */ |
|---|
| 179 | unsigned int favorite : 1; /* favorite channel, use the CH+/- to browse */ |
|---|
| 180 | }bapp_ch_t; |
|---|
| 181 | |
|---|
| 182 | /* |
|---|
| 183 | * State data structure, because this structure is saved to NVM |
|---|
| 184 | * options should be combined to make best use of storage space |
|---|
| 185 | */ |
|---|
| 186 | typedef struct bapp_settings_t |
|---|
| 187 | { |
|---|
| 188 | unsigned int sound : 2; |
|---|
| 189 | unsigned int picture : 1; |
|---|
| 190 | unsigned int language : 2; |
|---|
| 191 | unsigned int wiz_completed : 1; |
|---|
| 192 | unsigned int auto_power_off : 2; /* handle "no signal" case */ |
|---|
| 193 | unsigned int time_zone : 4; |
|---|
| 194 | unsigned int dst : 1; |
|---|
| 195 | |
|---|
| 196 | unsigned int standby : 1; |
|---|
| 197 | unsigned int rfm : 1; |
|---|
| 198 | unsigned int av_mute : 1; |
|---|
| 199 | unsigned int psi_scan : 1; |
|---|
| 200 | unsigned int audio_vol : 7; |
|---|
| 201 | unsigned int state : 4; |
|---|
| 202 | unsigned int dst_delta : 8; |
|---|
| 203 | unsigned int timeout_policy : 8; |
|---|
| 204 | unsigned int analog_captioning : 1; |
|---|
| 205 | unsigned int sd_options : 3; |
|---|
| 206 | unsigned int hunt_cnt : 16; |
|---|
| 207 | unsigned int download_failed_cnt : 16; |
|---|
| 208 | unsigned int download_invalid_cnt : 16; |
|---|
| 209 | unsigned int timeout : 16; |
|---|
| 210 | unsigned int max_location_errors : 16; |
|---|
| 211 | unsigned int location_errors : 16; |
|---|
| 212 | unsigned int message_time : 32; |
|---|
| 213 | unsigned int turn_on_freq_khz : 32; |
|---|
| 214 | unsigned int addressable_time : 32; |
|---|
| 215 | unsigned int timeout_cnt : 32; |
|---|
| 216 | unsigned int location : 32; |
|---|
| 217 | int utc_offset : 32; |
|---|
| 218 | unsigned int auto_power : 32; |
|---|
| 219 | unsigned int dst_entry : 32; |
|---|
| 220 | unsigned int dst_exit : 32; |
|---|
| 221 | unsigned int reserved_0 : 32; |
|---|
| 222 | unsigned int reserved_1 : 32; |
|---|
| 223 | unsigned int reserved_2 : 32; |
|---|
| 224 | unsigned int reserved_3 : 32; |
|---|
| 225 | ratings_settings_t ratings; |
|---|
| 226 | rrt_settings_t rrt_settings; |
|---|
| 227 | dcc_settings_t dcc; |
|---|
| 228 | |
|---|
| 229 | unsigned char num_channels; /* number of channels scanned */ |
|---|
| 230 | bapp_ch_t ch[MAX_CHANNELS]; |
|---|
| 231 | |
|---|
| 232 | #ifdef HAS_HDMI |
|---|
| 233 | hd_config_settings_t hd_config; |
|---|
| 234 | #endif |
|---|
| 235 | }bapp_settings_t; |
|---|
| 236 | |
|---|
| 237 | /* |
|---|
| 238 | * Main data structure containing references to all interfaces |
|---|
| 239 | * required throughout the application. |
|---|
| 240 | */ |
|---|
| 241 | |
|---|
| 242 | typedef struct bapp_t |
|---|
| 243 | { |
|---|
| 244 | bapp_state_t state; |
|---|
| 245 | enum led_mode_t led_mode; |
|---|
| 246 | unsigned int yield_ms; |
|---|
| 247 | unsigned char* osd_mem; |
|---|
| 248 | unsigned int osd_mem_size; |
|---|
| 249 | bapp_settings_t settings; |
|---|
| 250 | uint32_t settings_dirty; |
|---|
| 251 | bgfx_palette_t palette; |
|---|
| 252 | uint16_t width; |
|---|
| 253 | uint16_t height; |
|---|
| 254 | |
|---|
| 255 | b_timeval timeout_tv; |
|---|
| 256 | |
|---|
| 257 | bgfx_surf_t surf; |
|---|
| 258 | bdisplay_t display; |
|---|
| 259 | bgraphics_t graphics; |
|---|
| 260 | bdecode_window_t window[2]; |
|---|
| 261 | bdecode_t decode; |
|---|
| 262 | baudio_decode_t audio; |
|---|
| 263 | buser_input_t user_io; |
|---|
| 264 | bsettop_hdmi_t hdmi; |
|---|
| 265 | brfm_t p_rfm; |
|---|
| 266 | |
|---|
| 267 | bin_read_t br; |
|---|
| 268 | bscreen_t *p_screens; |
|---|
| 269 | int num_screens; |
|---|
| 270 | unsigned int last_keypress_tick; |
|---|
| 271 | unsigned int power_saver_tick; /* keep track the power saver tick */ |
|---|
| 272 | bapp_screen_id_t screen_id; |
|---|
| 273 | bapp_screen_id_t last_screen_id; |
|---|
| 274 | bapp_lang_t lang; |
|---|
| 275 | unsigned int tmp_str[SCREEN_MAX_STR_WIDTH]; |
|---|
| 276 | unsigned int tmp_value; |
|---|
| 277 | unsigned int tmp_cnt; |
|---|
| 278 | bgfx_font_t *p_font[eLANG_MAX][eFONT_SIZE_MAX]; |
|---|
| 279 | b_queue_t msg_queue; |
|---|
| 280 | b_event_t msg_event[MAX_MSG_EVENT]; |
|---|
| 281 | bool is_muted; |
|---|
| 282 | bool system_mute; |
|---|
| 283 | unsigned char audio_vol; |
|---|
| 284 | unsigned char audio_mute; |
|---|
| 285 | unsigned char power; |
|---|
| 286 | unsigned char decoding; |
|---|
| 287 | unsigned int last_tune_tick; |
|---|
| 288 | unsigned int eas_timeout; |
|---|
| 289 | unsigned int eas_text; /* EAS text scrolling flag */ |
|---|
| 290 | char eas_str[MAX_EAS_TEXT]; /* eas string including activation message and alert mesage */ |
|---|
| 291 | unsigned char eas_char_width[MAX_EAS_TEXT]; |
|---|
| 292 | int eas_str_len; /* lengthe of p_app->eas_str */ |
|---|
| 293 | int eas_activation_str_len; /* length of eas_activation_str inside p_app->eas_text */ |
|---|
| 294 | int eas_activation_str_width; /* pixel width of eas_activation_str inside p_app->eas_text */ |
|---|
| 295 | int eas_src_start_idx; /* required for scrolling */ |
|---|
| 296 | int eas_src_end_idx; |
|---|
| 297 | int eas_src_start_x; |
|---|
| 298 | int eas_src_end_x; |
|---|
| 299 | int eas_dsp_x; |
|---|
| 300 | bool eas_activation_text; |
|---|
| 301 | bool eas_one_iteration; |
|---|
| 302 | bool eas_started; |
|---|
| 303 | bool eas_ch_found; /* valid source id on EAS msg */ |
|---|
| 304 | |
|---|
| 305 | chm_mgr_t chm; |
|---|
| 306 | unsigned int poweron_ms; |
|---|
| 307 | unsigned int snr; |
|---|
| 308 | unsigned int tuned_freq; |
|---|
| 309 | bool check_poweron; |
|---|
| 310 | bool lock; |
|---|
| 311 | bool has_PAT; |
|---|
| 312 | |
|---|
| 313 | unsigned int power_level; |
|---|
| 314 | |
|---|
| 315 | unsigned int system_time; |
|---|
| 316 | unsigned int system_offset; |
|---|
| 317 | bool have_time; |
|---|
| 318 | |
|---|
| 319 | unsigned int tune_ms; |
|---|
| 320 | unsigned int si_ms; |
|---|
| 321 | unsigned int location; |
|---|
| 322 | /* VSB */ |
|---|
| 323 | bapp_ch_t prev_ch; |
|---|
| 324 | bapp_ch_t cur_ch; |
|---|
| 325 | int cur_ch_num; /* current channel number */ |
|---|
| 326 | |
|---|
| 327 | b_mutex_t ch_map_mutex; |
|---|
| 328 | b_mutex_t flash_mutex; |
|---|
| 329 | chm_cmd_event_t chm_cmd; |
|---|
| 330 | chm_cmd_event_t hunt_cmd; |
|---|
| 331 | chm_tune_event_t tune_cmd; |
|---|
| 332 | bIR_codes_t last_key_down; |
|---|
| 333 | b_timeval last_key_tv; |
|---|
| 334 | b_timeval last_save_tv; /* reduce check on save to flash */ |
|---|
| 335 | fstore_t flash_storage; |
|---|
| 336 | unsigned char eas_buf[EAS_BUF_LEN]; |
|---|
| 337 | unsigned int eas_buf_size; |
|---|
| 338 | unsigned char *logo; |
|---|
| 339 | unsigned int logo_size; |
|---|
| 340 | unsigned char prog_time_str[MAX_TIME_STR]; |
|---|
| 341 | unsigned char prog_rating_str[MAX_RATING_STR_CHARS]; |
|---|
| 342 | unsigned char psip_rating_str[MAX_RATING_STR_CHARS]; |
|---|
| 343 | unsigned int last_rating_tick; |
|---|
| 344 | unsigned int last_cad; |
|---|
| 345 | unsigned int last_xds; |
|---|
| 346 | unsigned char ratings_region; |
|---|
| 347 | unsigned char ratings_dim; |
|---|
| 348 | unsigned char ratings_val; |
|---|
| 349 | unsigned char tv_rating; |
|---|
| 350 | unsigned char movie_rating; |
|---|
| 351 | |
|---|
| 352 | p_timing_profile_t ptp_tune; /* profile tune/acquire */ |
|---|
| 353 | p_timing_profile_t ptp_psi; /* profile psi (PAT/PMT) */ |
|---|
| 354 | p_timing_profile_t ptp_first_pts; /* profile start decode to first PTS */ |
|---|
| 355 | p_timing_profile_t ptp_decode; /* profile start decode to sequence header */ |
|---|
| 356 | char last_rating_block_status; |
|---|
| 357 | char last_psip_rating_block_status; |
|---|
| 358 | unsigned char ratings_override; |
|---|
| 359 | bool ratings_override_set; |
|---|
| 360 | bool pin_limit_override; /* for channel change */ |
|---|
| 361 | uint32_t pin_limit_timeout; /* pin limit time out */ |
|---|
| 362 | char last_ch_block_status; |
|---|
| 363 | chm_info_t tmp_info; |
|---|
| 364 | |
|---|
| 365 | bool re_tune; /* re-tune flag */ |
|---|
| 366 | unsigned int signal_level; /* signal level */ |
|---|
| 367 | int num_sap; /* for draw SAP indicator if any */ |
|---|
| 368 | int current_sap; /* for draw SAP indicator if any */ |
|---|
| 369 | bool check_signal; |
|---|
| 370 | #ifdef CONFIG_STANDBY |
|---|
| 371 | bool active_standby; |
|---|
| 372 | #endif |
|---|
| 373 | btuner_status tuner_status; /* remember tuner status if any */ |
|---|
| 374 | |
|---|
| 375 | /* DCC */ |
|---|
| 376 | #ifdef CONFIG_EIA_708 |
|---|
| 377 | bapp_eia708_t eia708; |
|---|
| 378 | #endif |
|---|
| 379 | |
|---|
| 380 | #if 1 /*ChengYu@20120808: for factory test*/ |
|---|
| 381 | bool factory_test; |
|---|
| 382 | #endif |
|---|
| 383 | bool scan_in_progress; |
|---|
| 384 | unsigned short captions_basic; /* for simple On switch CC switch */ |
|---|
| 385 | bool cc_enabled; /* cc enabled or not */ |
|---|
| 386 | bool wide_aspect_ratio; /* wide aspect ratio flag from Closed Captioning descriptor */ |
|---|
| 387 | unsigned int signal_quality; /* signal quality */ |
|---|
| 388 | bool no_signal; /* flag to indicate the box are in no signal condition */ |
|---|
| 389 | int sd_options; /* temp sd_options that set from the AR remote button */ |
|---|
| 390 | |
|---|
| 391 | unsigned char *dolby_logo; /* dolby logo to show in the banner screen */ |
|---|
| 392 | unsigned int dolby_logo_size; |
|---|
| 393 | unsigned char *dst_logo; |
|---|
| 394 | unsigned int dst_logoSize; |
|---|
| 395 | |
|---|
| 396 | /* audio only channel screen support */ |
|---|
| 397 | uint32_t audio_channel_draw_timeout; /* audio only channel draw timeout */ |
|---|
| 398 | b_timeval audio_channel_tm; /* initial timeout to enter audio only channel event handler */ |
|---|
| 399 | }bapp_t; |
|---|
| 400 | |
|---|
| 401 | extern const unsigned short s_ch_to_freq[]; |
|---|
| 402 | |
|---|
| 403 | int bin_read( void *buffer, int size, int count, void *fp ); |
|---|
| 404 | |
|---|
| 405 | void bapp_init(bapp_t *p_app); |
|---|
| 406 | void bapp_run(bapp_t *p_app); |
|---|
| 407 | void bapp_idle(bapp_t *p_app); |
|---|
| 408 | void bapp_sync(bapp_t *p_app); |
|---|
| 409 | void bapp_handle_event(bapp_t *p_app, bscreen_event_t *p_event); |
|---|
| 410 | void bapp_flush_screen(bapp_t *p_app); |
|---|
| 411 | void bapp_set_current_screen(bapp_t *p_app, bapp_screen_id_t id, bapp_screen_id_t save_last); |
|---|
| 412 | bscreen_t * bapp_get_current_screen(bapp_t *p_app); |
|---|
| 413 | void bapp_goto_last_screen(bapp_t *p_app); |
|---|
| 414 | int bapp_change_channel(bapp_t *p_app, int ch_up, int tune); |
|---|
| 415 | int bapp_change_channel_fav(bapp_t *p_app, int ch_up, int tune); |
|---|
| 416 | |
|---|
| 417 | int bapp_tune(bapp_t *p_app); |
|---|
| 418 | int bapp_tune_prev(bapp_t *p_app); |
|---|
| 419 | int bapp_set_channel(bapp_t *p_app, bapp_ch_t *pch); |
|---|
| 420 | int bapp_set_channel_by_major(bapp_t *p_app, int major, int minor); |
|---|
| 421 | void bapp_enable_cc(bapp_t *p_app, int enable); |
|---|
| 422 | void bapp_reset_settings(bapp_t *p_app); |
|---|
| 423 | void bapp_save_settings(bapp_t *p_app); |
|---|
| 424 | void bapp_av_mute(bapp_t *p_app, int mute); |
|---|
| 425 | void bapp_audio_mute(bapp_t *p_app, int mute); |
|---|
| 426 | void bapp_audio_SetDolbyDrc_mode(bapp_t *p_app, baudio_dolby_drc_mode mode); |
|---|
| 427 | void bapp_audio_GetDolbyDrc_mode(bapp_t *p_app, baudio_dolby_drc_mode mode); |
|---|
| 428 | void bapp_video_mute(bapp_t *p_app, int mute); |
|---|
| 429 | void bapp_set_audio_volume(bapp_t *p_app, uint8_t level); |
|---|
| 430 | void bapp_set_palette(bapp_t *p_app, bapp_palette_t palette); |
|---|
| 431 | bool bapp_get_signal_status(bapp_t *p_app); |
|---|
| 432 | int bapp_rotate_audio_sap(bapp_t *p_app); |
|---|
| 433 | void bapp_do_poweroff(bapp_t *p_app); |
|---|
| 434 | ch_map_t *bapp_cur_ch_map(bapp_t *p_app); |
|---|
| 435 | |
|---|
| 436 | int bapp_rotate_dsub(bapp_t *p_app); |
|---|
| 437 | void bapp_audio_do_mute(bapp_t *p_app, int mute); |
|---|
| 438 | void bapp_flush_screen_partial(bapp_t *p_app, int id); |
|---|
| 439 | void bapp_select_primary_output(bapp_t *p_app, int mode); |
|---|
| 440 | void bapp_select_scaler_coefficient(bapp_t *p_app, bool horizontal, int output, int coeff_idx); |
|---|
| 441 | void bapp_power(bapp_t *p_app, bool power); |
|---|
| 442 | bool bapp_get_block_status(bapp_t *p_app); |
|---|
| 443 | void bapp_set_oob_flag(int oob); |
|---|
| 444 | void bapp_get_avl_settings(int *target, int *low, int *boost); |
|---|
| 445 | void bapp_set_avl_settings(int target, int low, int boost); |
|---|
| 446 | |
|---|
| 447 | bapp_ch_t *bapp_is_channel_valid(bapp_t *p_app); |
|---|
| 448 | |
|---|
| 449 | #define DIRTY_MISC 0x1 |
|---|
| 450 | #define DIRTY_CHANNEL 0x2 |
|---|
| 451 | #define DIRTY_EAS 0x4 |
|---|
| 452 | #define DIRTY_CHANNEL_MAP 0x10 |
|---|
| 453 | #define DIRTY_SCREEN 0x20 |
|---|
| 454 | #define DIRTY_DCC 0x20 |
|---|
| 455 | #define DIRTY_RRT 0x40 |
|---|
| 456 | #define DIRTY_RATINGS 0x80 |
|---|
| 457 | #define DIRTY_CC 0x100 |
|---|
| 458 | |
|---|
| 459 | #define DIRTY_HD_CONFIG 0x200 |
|---|
| 460 | #define DIRTY_DEBUG_CONFIG 0x400 |
|---|
| 461 | |
|---|
| 462 | #define DIRTY_ALL (DIRTY_MISC | DIRTY_CHANNEL | DIRTY_EAS | DIRTY_CHANNEL_MAP | DIRTY_RRT | \ |
|---|
| 463 | DIRTY_RATINGS | DIRTY_CC | DIRTY_HD_CONFIG | DIRTY_DEBUG_CONFIG) |
|---|
| 464 | |
|---|
| 465 | /* |
|---|
| 466 | Summary: |
|---|
| 467 | Reset the closed captioning settings to the default values. |
|---|
| 468 | */ |
|---|
| 469 | void bapp_reset_cc_config_settings(bapp_t *p_app); |
|---|
| 470 | |
|---|
| 471 | void bapp_channel_scan(bapp_t *p_app); |
|---|
| 472 | |
|---|
| 473 | /* |
|---|
| 474 | * Summary: |
|---|
| 475 | * Set closed captions CS options |
|---|
| 476 | * Description: |
|---|
| 477 | * Set closed captions CS options |
|---|
| 478 | */ |
|---|
| 479 | void bapp_set_captions_options(bapp_t *p_app); |
|---|
| 480 | |
|---|
| 481 | void bapp_P_enable_avl(bapp_t *p_app, bool enable); |
|---|
| 482 | void bapp_enable_avl(bool enable); |
|---|
| 483 | |
|---|
| 484 | bapp_t *bapp_get_app_instance(void); |
|---|
| 485 | |
|---|
| 486 | int bapp_get_wide_aspect_ratio_cb(void); |
|---|
| 487 | |
|---|
| 488 | void bapp_set_wide_aspect_ratio(bapp_t *p_app); |
|---|
| 489 | |
|---|
| 490 | #ifdef TUNER_DEBUG |
|---|
| 491 | /* helper function for frontend tuner performance measurement */ |
|---|
| 492 | void bapp_scan_psi_a_freq(uint32_t freq_khz); |
|---|
| 493 | void bapp_get_tuner_status(void); |
|---|
| 494 | #endif |
|---|
| 495 | void bapp_brfm_set_ch3(bool); |
|---|
| 496 | void bapp_bdisplay_setRfOutput(bool isOutput); |
|---|
| 497 | void bapp_audio_1k_TONE(void); |
|---|
| 498 | /*janzy@20121113,audio,video start/stop ctrl begin*/ |
|---|
| 499 | void bapp_audio_stop(void); |
|---|
| 500 | void bapp_video_stop(void); |
|---|
| 501 | void bapp_AV_start(unsigned int vid,unsigned int aud,unsigned int pcr); |
|---|
| 502 | /*end*/ |
|---|
| 503 | void bapp_Set_ColorBars(bool enable);/*janzy@20121113,add ColorBars*/ |
|---|
| 504 | void bapp_do_exit();/*janzy@20121115,OSD TimeOut*/ |
|---|
| 505 | |
|---|
| 506 | void bapp_set_ar_options(bapp_t *p_app); |
|---|
| 507 | |
|---|
| 508 | /* dolby logo support */ |
|---|
| 509 | bool bapp_is_dolby_type(bapp_t *p_app); |
|---|
| 510 | |
|---|
| 511 | #endif /* BAPP_H__ */ |
|---|