c8sectpfe-common.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * c8sectpfe-common.h - C8SECTPFE STi DVB driver
  3. *
  4. * Copyright (c) STMicroelectronics 2015
  5. *
  6. * Author: Peter Griffin <peter.griffin@linaro.org>
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. */
  13. #ifndef _C8SECTPFE_COMMON_H_
  14. #define _C8SECTPFE_COMMON_H_
  15. #include <linux/dvb/dmx.h>
  16. #include <linux/dvb/frontend.h>
  17. #include <linux/gpio.h>
  18. #include <linux/version.h>
  19. #include "dmxdev.h"
  20. #include "dvb_demux.h"
  21. #include "dvb_frontend.h"
  22. #include "dvb_net.h"
  23. /* Maximum number of channels */
  24. #define C8SECTPFE_MAXADAPTER (4)
  25. #define C8SECTPFE_MAXCHANNEL 64
  26. #define STPTI_MAXCHANNEL 64
  27. #define MAX_INPUTBLOCKS 7
  28. struct c8sectpfe;
  29. struct stdemux;
  30. struct stdemux {
  31. struct dvb_demux dvb_demux;
  32. struct dmxdev dmxdev;
  33. struct dmx_frontend hw_frontend;
  34. struct dmx_frontend mem_frontend;
  35. int tsin_index;
  36. int running_feed_count;
  37. struct c8sectpfei *c8sectpfei;
  38. };
  39. struct c8sectpfe {
  40. struct stdemux demux[MAX_INPUTBLOCKS];
  41. struct mutex lock;
  42. struct dvb_adapter adapter;
  43. struct device *device;
  44. int mapping;
  45. int num_feeds;
  46. };
  47. /* Channel registration */
  48. int c8sectpfe_tuner_register_frontend(struct c8sectpfe **c8sectpfe,
  49. struct c8sectpfei *fei,
  50. void *start_feed,
  51. void *stop_feed);
  52. void c8sectpfe_tuner_unregister_frontend(struct c8sectpfe *c8sectpfe,
  53. struct c8sectpfei *fei);
  54. #endif