zoran_device.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Zoran zr36057/zr36067 PCI controller driver, for the
  3. * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux
  4. * Media Labs LML33/LML33R10.
  5. *
  6. * This part handles card-specific data and detection
  7. *
  8. * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
  9. *
  10. * Currently maintained by:
  11. * Ronald Bultje <rbultje@ronald.bitfreak.net>
  12. * Laurent Pinchart <laurent.pinchart@skynet.be>
  13. * Mailinglist <mjpeg-users@lists.sf.net>
  14. *
  15. * This program is free software; you can redistribute it and/or modify
  16. * it under the terms of the GNU General Public License as published by
  17. * the Free Software Foundation; either version 2 of the License, or
  18. * (at your option) any later version.
  19. *
  20. * This program is distributed in the hope that it will be useful,
  21. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  22. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  23. * GNU General Public License for more details.
  24. *
  25. * You should have received a copy of the GNU General Public License
  26. * along with this program; if not, write to the Free Software
  27. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  28. */
  29. #ifndef __ZORAN_DEVICE_H__
  30. #define __ZORAN_DEVICE_H__
  31. /* general purpose I/O */
  32. extern void GPIO(struct zoran *zr,
  33. int bit,
  34. unsigned int value);
  35. /* codec (or actually: guest bus) access */
  36. extern int post_office_wait(struct zoran *zr);
  37. extern int post_office_write(struct zoran *zr,
  38. unsigned guest,
  39. unsigned reg,
  40. unsigned value);
  41. extern int post_office_read(struct zoran *zr,
  42. unsigned guest,
  43. unsigned reg);
  44. extern void detect_guest_activity(struct zoran *zr);
  45. extern void jpeg_codec_sleep(struct zoran *zr,
  46. int sleep);
  47. extern int jpeg_codec_reset(struct zoran *zr);
  48. /* zr360x7 access to raw capture */
  49. extern void zr36057_overlay(struct zoran *zr,
  50. int on);
  51. extern void write_overlay_mask(struct zoran_fh *fh,
  52. struct v4l2_clip *vp,
  53. int count);
  54. extern void zr36057_set_memgrab(struct zoran *zr,
  55. int mode);
  56. extern int wait_grab_pending(struct zoran *zr);
  57. /* interrupts */
  58. extern void print_interrupts(struct zoran *zr);
  59. extern void clear_interrupt_counters(struct zoran *zr);
  60. extern irqreturn_t zoran_irq(int irq, void *dev_id);
  61. /* JPEG codec access */
  62. extern void jpeg_start(struct zoran *zr);
  63. extern void zr36057_enable_jpg(struct zoran *zr,
  64. enum zoran_codec_mode mode);
  65. extern void zoran_feed_stat_com(struct zoran *zr);
  66. /* general */
  67. extern void zoran_set_pci_master(struct zoran *zr,
  68. int set_master);
  69. extern void zoran_init_hardware(struct zoran *zr);
  70. extern void zr36057_restart(struct zoran *zr);
  71. extern const struct zoran_format zoran_formats[];
  72. extern int v4l_nbufs;
  73. extern int v4l_bufsize;
  74. extern int jpg_nbufs;
  75. extern int jpg_bufsize;
  76. extern int pass_through;
  77. /* i2c */
  78. #define decoder_call(zr, o, f, args...) \
  79. v4l2_subdev_call(zr->decoder, o, f, ##args)
  80. #define encoder_call(zr, o, f, args...) \
  81. v4l2_subdev_call(zr->encoder, o, f, ##args)
  82. #endif /* __ZORAN_DEVICE_H__ */