firesat.h 1.8 KB

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