pvrusb2-dvb.h 950 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef __PVRUSB2_DVB_H__
  3. #define __PVRUSB2_DVB_H__
  4. #include <media/dvb_frontend.h>
  5. #include <media/dvb_demux.h>
  6. #include <media/dvb_net.h>
  7. #include <media/dmxdev.h>
  8. #include "pvrusb2-context.h"
  9. #define PVR2_DVB_BUFFER_COUNT 32
  10. #define PVR2_DVB_BUFFER_SIZE PAGE_ALIGN(0x4000)
  11. struct pvr2_dvb_adapter {
  12. struct pvr2_channel channel;
  13. struct dvb_adapter dvb_adap;
  14. struct dmxdev dmxdev;
  15. struct dvb_demux demux;
  16. struct dvb_net dvb_net;
  17. struct dvb_frontend *fe;
  18. int feedcount;
  19. int max_feed_count;
  20. struct task_struct *thread;
  21. struct mutex lock;
  22. unsigned int stream_run:1;
  23. wait_queue_head_t buffer_wait_data;
  24. char *buffer_storage[PVR2_DVB_BUFFER_COUNT];
  25. };
  26. struct pvr2_dvb_props {
  27. int (*frontend_attach) (struct pvr2_dvb_adapter *);
  28. int (*tuner_attach) (struct pvr2_dvb_adapter *);
  29. };
  30. struct pvr2_dvb_adapter *pvr2_dvb_create(struct pvr2_context *pvr);
  31. #endif /* __PVRUSB2_DVB_H__ */