videobuf2-dvb.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef _VIDEOBUF2_DVB_H_
  2. #define _VIDEOBUF2_DVB_H_
  3. #include <dvbdev.h>
  4. #include <dmxdev.h>
  5. #include <dvb_demux.h>
  6. #include <dvb_net.h>
  7. #include <dvb_frontend.h>
  8. #include <media/videobuf2-core.h>
  9. struct vb2_dvb {
  10. /* filling that the job of the driver */
  11. char *name;
  12. struct dvb_frontend *frontend;
  13. struct vb2_queue dvbq;
  14. /* video-buf-dvb state info */
  15. struct mutex lock;
  16. int nfeeds;
  17. /* vb2_dvb_(un)register manages 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 vb2_dvb_frontend {
  25. struct list_head felist;
  26. int id;
  27. struct vb2_dvb dvb;
  28. };
  29. struct vb2_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 vb2_dvb_register_bus(struct vb2_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 vb2_dvb_unregister_bus(struct vb2_dvb_frontends *f);
  43. struct vb2_dvb_frontend *vb2_dvb_alloc_frontend(struct vb2_dvb_frontends *f, int id);
  44. void vb2_dvb_dealloc_frontends(struct vb2_dvb_frontends *f);
  45. struct vb2_dvb_frontend *vb2_dvb_get_frontend(struct vb2_dvb_frontends *f, int id);
  46. int vb2_dvb_find_frontend(struct vb2_dvb_frontends *f, struct dvb_frontend *p);
  47. #endif /* _VIDEOBUF2_DVB_H_ */