pvrusb2-dvb.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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[2];
  18. struct i2c_client *i2c_client_demod[2];
  19. struct i2c_client *i2c_client_tuner;
  20. int feedcount;
  21. int max_feed_count;
  22. struct task_struct *thread;
  23. struct mutex lock;
  24. unsigned int stream_run:1;
  25. wait_queue_head_t buffer_wait_data;
  26. char *buffer_storage[PVR2_DVB_BUFFER_COUNT];
  27. };
  28. struct pvr2_dvb_props {
  29. int (*frontend_attach) (struct pvr2_dvb_adapter *);
  30. int (*tuner_attach) (struct pvr2_dvb_adapter *);
  31. };
  32. struct pvr2_dvb_adapter *pvr2_dvb_create(struct pvr2_context *pvr);
  33. #endif /* __PVRUSB2_DVB_H__ */