adb.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /**
  2. * Copyright(c) 2011 Sunmedia Technologies - All Rights Reserved.
  3. *
  4. * @file
  5. * Common macros, declarations and definitions of Analog Database.
  6. *
  7. * @author jun.luo
  8. *
  9. */
  10. #ifndef _ADB_H_
  11. #define _ADB_H_
  12. #include "db_common.h"
  13. #ifdef __cplusplus
  14. extern "C"{
  15. #endif
  16. /**
  17. * @addtogroup ADB_APIS Common macros, declarations and definitions of Analog Database.
  18. * @{
  19. */
  20. /** Exported constants */
  21. enum {
  22. ADB_MAGIC_CODE = 0xbabeface, /**< used to judge the analog DB whether be initialized */
  23. /** Values for frequency scan range */
  24. ADB_FREQUENCY_MIN = 44250000, /**<DRV_MAIN_TUNER_RF_MIN - 1000000 */
  25. ADB_FREQUENCY_MAX = 870000000 /**< DRV_MAIN_TUNER_RF_MAX + 500000 */
  26. };
  27. /** Type define of Colour system type */
  28. typedef enum {
  29. ADB_COLOR_SYSTEM_AUTO = 0,
  30. ADB_COLOR_SYSTEM_PAL,
  31. ADB_COLOR_SYSTEM_SECAM,
  32. ADB_COLOR_SYSTEM_MAX,
  33. } colorSystem_t;
  34. /** Type define of Sound system type */
  35. typedef enum {
  36. ADB_SOUND_SYSTEM_AUTO = 0,
  37. ADB_SOUND_SYSTEM_BG,
  38. ADB_SOUND_SYSTEM_DK,
  39. ADB_SOUND_SYSTEM_I,
  40. ADB_SOUND_SYSTEM_L,
  41. ADB_SOUND_SYSTEM_L1,
  42. ADB_SOUND_SYSTEM_MAX,
  43. } soundSystem_t;
  44. /** Type define of audio format */
  45. typedef enum{
  46. ADB_AUDIO_SIF_MODE_ANALOG_MONO = 0,
  47. ADB_AUDIO_SIF_MODE_NICAM_MONO,
  48. ADB_AUDIO_SIF_MODE_STEREO,
  49. ADB_AUDIO_SIF_MODE_DUAL_I,
  50. ADB_AUDIO_SIF_MODE_DUAL_II,
  51. ADB_AUDIO_SIF_MODE_DUAL_I_II,
  52. ADB_AUDIO_SIF_MODE_SAP,
  53. ADB_AUDIO_SIF_MODE_MAX,
  54. } multiAudio_t;
  55. /** Analog Service details define */
  56. typedef struct // __attribute__ ((packed))
  57. {
  58. UINT32 u32Freq;
  59. UINT8 inuse :1;
  60. UINT8 soundSystem :4; /**< refer to soundSystem_t */
  61. UINT8 fav1 :1;
  62. UINT8 fav2 :1;
  63. UINT8 fav3 :1;
  64. UINT8 fav4 :1;
  65. UINT8 lock :1;
  66. UINT8 del :1;
  67. UINT8 AFC :1;
  68. UINT8 skip :1;
  69. UINT8 mov :1;
  70. UINT8 colorSystem :4; /**< refer to colorSystem_t */
  71. UINT8 multiAudio :4; /**< refer to multiAudio_t */
  72. UINT8 available :1; /**< This means usable or not*/
  73. UINT8 tvtype :1; /**< 0: air atv 1: cable atv */
  74. UINT8 szChannelName[DB_ATV_MAX_CHNAME_LEN];
  75. } SADBServInfo_t;
  76. /**
  77. * @}
  78. */
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82. #endif