videobuf-dvb.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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. };
  35. int videobuf_dvb_register_bus(struct videobuf_dvb_frontends *f,
  36. struct module *module,
  37. void *adapter_priv,
  38. struct device *device,
  39. short *adapter_nr); //NEW
  40. void videobuf_dvb_unregister_bus(struct videobuf_dvb_frontends *f);
  41. int videobuf_dvb_register_adapter(struct videobuf_dvb_frontends *f,
  42. struct module *module,
  43. void *adapter_priv,
  44. struct device *device,
  45. char *adapter_name,
  46. short *adapter_nr); //NEW
  47. int videobuf_dvb_register_frontend(struct dvb_adapter *adapter, struct videobuf_dvb *dvb);
  48. struct videobuf_dvb_frontend * videobuf_dvb_alloc_frontend(void *private, struct videobuf_dvb_frontends *f, int id);
  49. struct videobuf_dvb_frontend * videobuf_dvb_get_frontend(struct videobuf_dvb_frontends *f, int id);
  50. int videobuf_dvb_find_frontend(struct videobuf_dvb_frontends *f, struct dvb_frontend *p);
  51. /*
  52. * Local variables:
  53. * c-basic-offset: 8
  54. * End:
  55. */