videobuf-dvb.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #include <dvbdev.h>
  2. #include <dmxdev.h>
  3. #include <dvb_demux.h>
  4. #include <dvb_net.h>
  5. #include <dvb_frontend.h>
  6. struct videobuf_dvb {
  7. /* filling that the job of the driver */
  8. char *name;
  9. struct dvb_frontend *frontend;
  10. struct videobuf_queue dvbq;
  11. /* video-buf-dvb state info */
  12. struct mutex lock;
  13. struct task_struct *thread;
  14. int nfeeds;
  15. /* videobuf_dvb_(un)register manges this */
  16. struct dvb_adapter adapter;
  17. struct dvb_demux demux;
  18. struct dmxdev dmxdev;
  19. struct dmx_frontend fe_hw;
  20. struct dmx_frontend fe_mem;
  21. struct dvb_net net;
  22. };
  23. struct videobuf_dvb_frontend {
  24. void *dev;
  25. struct list_head felist;
  26. int id;
  27. struct videobuf_dvb dvb;
  28. };
  29. struct videobuf_dvb_frontends {
  30. struct mutex lock;
  31. struct dvb_adapter adapter;
  32. int active_fe_id; /* Indicates which frontend in the felist is in use */
  33. struct videobuf_dvb_frontend frontend;
  34. int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */
  35. };
  36. int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
  37. struct module *module,
  38. void *adapter_priv,
  39. struct device *device,
  40. short *adapter_nr); //NEW
  41. void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
  42. int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *f,
  43. struct module *module,
  44. void *adapter_priv,
  45. struct device *device,
  46. char *adapter_name,
  47. short *adapter_nr); //NEW
  48. int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, struct videobuf_dvb *dvb);
  49. struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct videobuf_dvb_frontends *f, int id);
  50. struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id);
  51. int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
  52. /*
  53. * Local variables:
  54. * c-basic-offset: 8
  55. * End:
  56. */