firesat.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #ifndef __FIRESAT_H
  2. #define __FIRESAT_H
  3. #include "dvb_frontend.h"
  4. #include "dmxdev.h"
  5. #include "dvb_demux.h"
  6. #include "dvb_net.h"
  7. #include <linux/semaphore.h>
  8. #include <linux/dvb/frontend.h>
  9. #include <linux/dvb/dmx.h>
  10. enum model_type {
  11. FireSAT_DVB_S = 1,
  12. FireSAT_DVB_C = 2,
  13. FireSAT_DVB_T = 3
  14. };
  15. struct firesat {
  16. struct dvb_demux dvb_demux;
  17. char *model_name;
  18. /* DVB bits */
  19. struct dvb_adapter *adapter;
  20. struct dmxdev dmxdev;
  21. struct dvb_demux demux;
  22. struct dmx_frontend frontend;
  23. struct dvb_net dvbnet;
  24. struct dvb_frontend_info *frontend_info;
  25. struct dvb_frontend *fe;
  26. struct dvb_device *cadev;
  27. int has_ci;
  28. struct semaphore avc_sem;
  29. atomic_t avc_reply_received;
  30. atomic_t reschedule_remotecontrol;
  31. struct firesat_channel {
  32. struct firesat *firesat;
  33. struct dvb_demux_feed *dvbdmxfeed;
  34. int active;
  35. int id;
  36. int pid;
  37. int type; /* 1 - TS, 2 - Filter */
  38. } channel[16];
  39. struct semaphore demux_sem;
  40. /* needed by avc_api */
  41. void *respfrm;
  42. int resp_length;
  43. // nodeid_t nodeid;
  44. struct hpsb_host *host;
  45. u64 guid; /* GUID of this node */
  46. u32 guid_vendor_id; /* Top 24bits of guid */
  47. struct node_entry *nodeentry;
  48. enum model_type type;
  49. char subunit;
  50. fe_sec_voltage_t voltage;
  51. fe_sec_tone_mode_t tone;
  52. int isochannel;
  53. struct list_head list;
  54. };
  55. extern struct list_head firesat_list;
  56. extern spinlock_t firesat_list_lock;
  57. /* firesat_dvb.c */
  58. extern int firesat_start_feed(struct dvb_demux_feed *dvbdmxfeed);
  59. extern int firesat_stop_feed(struct dvb_demux_feed *dvbdmxfeed);
  60. extern int firesat_dvbdev_init(struct firesat *firesat,
  61. struct device *dev,
  62. struct dvb_frontend *fe);
  63. /* firesat_fe.c */
  64. extern int firesat_frontend_attach(struct firesat *firesat, struct dvb_frontend *fe);
  65. #endif