dmbdrv_wrap_fc8080.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright(c) 2008 SEC Corp. All Rights Reserved
  3. *
  4. * File name : dmbdrv_wrap_fc8080.h
  5. *
  6. * Description : fc8080 tuner control driver
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as published by
  9. * the Free Software Foundation; either version 2 of the License, or
  10. * (at your option) any later version.
  11. *
  12. * This program is distributed in the hope that it will be useful,
  13. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public License
  18. * along with this program; if not, write to the Free Software
  19. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  20. *
  21. * History :
  22. * ----------------------------------------------------------------------
  23. *
  24. */
  25. #ifndef __DMBDRV_WRAP_FC8080_H
  26. #define __DMBDRV_WRAP_FC8080_H
  27. #include <linux/string.h>
  28. #include <linux/delay.h>
  29. #define TDMB_SUCCESS 1
  30. #define TDMB_FAIL 0
  31. #define USER_APPL_NUM_MAX 12
  32. #define USER_APPL_DATA_SIZE_MAX 24
  33. struct sub_channel_info_type {
  34. unsigned short uiEnsembleID;
  35. unsigned char ucSubchID;
  36. unsigned short uiStartAddress;
  37. unsigned char ucTMId;
  38. unsigned char ucServiceType;
  39. unsigned long ulServiceID;
  40. unsigned char num_of_user_appl;
  41. unsigned short user_appl_type[USER_APPL_NUM_MAX];
  42. unsigned char user_appl_length[USER_APPL_NUM_MAX];
  43. unsigned char user_appl_data
  44. [USER_APPL_NUM_MAX][USER_APPL_DATA_SIZE_MAX];
  45. unsigned char scids;
  46. unsigned char ecc;
  47. };
  48. #if defined(CONFIG_TDMB_TSIF_SLSI) || defined(CONFIG_TDMB_TSIF_QC)
  49. void dmb_drv_isr(unsigned char *data, unsigned int length);
  50. #else
  51. void dmb_drv_isr(void);
  52. #endif
  53. unsigned char dmb_drv_init(unsigned long param);
  54. unsigned char dmb_drv_deinit(void);
  55. unsigned char dmb_drv_scan_ch(unsigned long frequency);
  56. int dmb_drv_get_dmb_sub_ch_cnt(void);
  57. int dmb_drv_get_dab_sub_ch_cnt(void);
  58. int dmb_drv_get_dat_sub_ch_cnt(void);
  59. char *dmb_drv_get_ensemble_label(void);
  60. char *dmb_drv_get_sub_ch_dmb_label(int subchannel_count);
  61. char *dmb_drv_get_sub_ch_dab_label(int subchannel_count);
  62. char *dmb_drv_get_sub_ch_dat_label(int subchannel_count);
  63. struct sub_channel_info_type *dmb_drv_get_fic_dmb(int subchannel_count);
  64. struct sub_channel_info_type *dmb_drv_get_fic_dab(int subchannel_count);
  65. struct sub_channel_info_type *dmb_drv_get_fic_dat(int subchannel_count);
  66. unsigned char dmb_drv_set_ch(
  67. unsigned long frequency
  68. , unsigned char subchannel
  69. , unsigned char sevice_type);
  70. unsigned char dmb_drv_set_ch_factory(
  71. unsigned long frequency
  72. , unsigned char subchannel
  73. , unsigned char sevice_type);
  74. unsigned short dmb_drv_get_ber(void);
  75. unsigned char dmb_drv_get_ant(void);
  76. signed short dmb_drv_get_rssi(void);
  77. int tdmb_interrupt_fic_callback(u32 userdata, u8 *data, int length);
  78. int tdmb_interrupt_msc_callback(
  79. u32 userdata, u8 subchannel_id, u8 *data, int length);
  80. #endif