tvafe.h 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /*******************************************************************
  2. * Copyright C 2010 by Amlogic, Inc. All Rights Reserved.
  3. * File name: tvafe.h
  4. * Description: IO function, structure, enum, used in TVIN AFE sub-module processing
  5. *******************************************************************/
  6. #ifndef _TVAFE_H
  7. #define _TVAFE_H
  8. #include <media/amlogic/656in.h>
  9. #include "tvin_global.h"
  10. #include "tvin_format_table.h"
  11. /******************************Definitions************************************/
  12. #define ABS(x) ( (x)<0 ? -(x) : (x))
  13. // ***************************************************************************
  14. // *** enum definitions *********************************************
  15. // ***************************************************************************
  16. typedef enum tvafe_src_type_e {
  17. TVAFE_SRC_TYPE_NULL = 0,
  18. TVAFE_SRC_TYPE_CVBS,
  19. TVAFE_SRC_TYPE_SVIDEO,
  20. TVAFE_SRC_TYPE_VGA,
  21. TVAFE_SRC_TYPE_COMP,
  22. TVAFE_SRC_TYPE_SCART,
  23. } tvafe_src_type_t;
  24. // ***************************************************************************
  25. // *** structure definitions *********************************************
  26. // ***************************************************************************
  27. //typedef struct tvafe_adc_parm_s {
  28. // unsigned int clk;
  29. // unsigned int phase;
  30. // unsigned int hpos;
  31. // unsigned int vpos;
  32. //} tvafe_adc_parm_t;
  33. typedef struct tvafe_info_s {
  34. unsigned int cvd2_mem_addr;
  35. unsigned int cvd2_mem_size;
  36. struct tvafe_pin_mux_s *pinmux;
  37. //signal parameters
  38. struct tvin_parm_s param;
  39. enum tvafe_src_type_e src_type;
  40. //VGA settings
  41. unsigned char vga_auto_flag;
  42. enum tvafe_cmd_status_e cmd_status;
  43. //adc calibration data
  44. struct tvafe_adc_cal_s adc_cal_val;
  45. //WSS data
  46. struct tvafe_comp_wss_s comp_wss;
  47. //for canvas
  48. unsigned char rd_canvas_index;
  49. unsigned char wr_canvas_index;
  50. unsigned char buff_flag[TVAFE_VF_POOL_SIZE];
  51. unsigned pbufAddr;
  52. unsigned decbuf_size;
  53. unsigned canvas_total_count : 4;
  54. unsigned sig_status_cnt : 16;
  55. unsigned cvbs_dec_state : 1; //1: enable the decode; 0: disable the decode
  56. unsigned s_video_dec_state : 1; //1: enable the decode; 0: disable the decode
  57. unsigned vga_dec_state : 1; //1: enable the decode; 0: disable the decode
  58. unsigned comp_dec_state : 1; //1: enable the decode; 0: disable the decode
  59. unsigned video_in_changing_flag : 1;
  60. unsigned wrap_flag : 1;
  61. } tvafe_info_t;
  62. #endif // _TVAFE_H