videobuf-dvb.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #include <dvbdev.h>
  2. #include <dmxdev.h>
  3. #include <dvb_demux.h>
  4. #include <dvb_net.h>
  5. #include <dvb_frontend.h>
  6. #ifndef _VIDEOBUF_DVB_H_
  7. #define _VIDEOBUF_DVB_H_
  8. struct videobuf_dvb {
  9. /* filling that the job of the driver */
  10. char *name;
  11. struct dvb_frontend *frontend;
  12. struct videobuf_queue dvbq;
  13. /* video-buf-dvb state info */
  14. struct mutex lock;
  15. struct task_struct *thread;
  16. int nfeeds;
  17. /* videobuf_dvb_(un)register manges this */
  18. struct dvb_demux demux;
  19. struct dmxdev dmxdev;
  20. struct dmx_frontend fe_hw;
  21. struct dmx_frontend fe_mem;
  22. struct dvb_net net;
  23. };
  24. struct videobuf_dvb_frontend {
  25. struct list_head felist;
  26. int id;
  27. struct videobuf_dvb dvb;
  28. };
  29. struct videobuf_dvb_frontends {
  30. struct list_head felist;
  31. struct mutex lock;
  32. struct dvb_adapter adapter;
  33. int active_fe_id; /* Indicates which frontend in the felist is in use */
  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,
  41. int mfe_shared);
  42. void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
  43. struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(struct videobuf_dvb_frontends *f, int id);
  44. void videobuf_dvb_dealloc_frontends(struct videobuf_dvb_frontends *f);
  45. struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id);
  46. int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
  47. #endif /* _VIDEOBUF_DVB_H_ */