c8sectpfe-common.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * c8sectpfe-common.h - C8SECTPFE STi DVB driver
  4. *
  5. * Copyright (c) STMicroelectronics 2015
  6. *
  7. * Author: Peter Griffin <peter.griffin@linaro.org>
  8. *
  9. */
  10. #ifndef _C8SECTPFE_COMMON_H_
  11. #define _C8SECTPFE_COMMON_H_
  12. #include <linux/dvb/dmx.h>
  13. #include <linux/dvb/frontend.h>
  14. #include <linux/gpio.h>
  15. #include <linux/version.h>
  16. #include <media/dmxdev.h>
  17. #include <media/dvb_demux.h>
  18. #include <media/dvb_frontend.h>
  19. #include <media/dvb_net.h>
  20. /* Maximum number of channels */
  21. #define C8SECTPFE_MAXADAPTER (4)
  22. #define C8SECTPFE_MAXCHANNEL 64
  23. #define STPTI_MAXCHANNEL 64
  24. #define MAX_INPUTBLOCKS 7
  25. struct c8sectpfe;
  26. struct stdemux;
  27. struct stdemux {
  28. struct dvb_demux dvb_demux;
  29. struct dmxdev dmxdev;
  30. struct dmx_frontend hw_frontend;
  31. struct dmx_frontend mem_frontend;
  32. int tsin_index;
  33. int running_feed_count;
  34. struct c8sectpfei *c8sectpfei;
  35. };
  36. struct c8sectpfe {
  37. struct stdemux demux[MAX_INPUTBLOCKS];
  38. struct mutex lock;
  39. struct dvb_adapter adapter;
  40. struct device *device;
  41. int mapping;
  42. int num_feeds;
  43. };
  44. /* Channel registration */
  45. int c8sectpfe_tuner_register_frontend(struct c8sectpfe **c8sectpfe,
  46. struct c8sectpfei *fei,
  47. void *start_feed,
  48. void *stop_feed);
  49. void c8sectpfe_tuner_unregister_frontend(struct c8sectpfe *c8sectpfe,
  50. struct c8sectpfei *fei);
  51. #endif