videobuf-dvb.h 1.7 KB

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