1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Zoran zr36057/zr36067 PCI controller driver, for the
4 * Pinnacle/Miro DC10/DC10+/DC30/DC30+, Iomega Buz, Linux
5 * Media Labs LML33/LML33R10.
7 * This part handles card-specific data and detection
9 * Copyright (C) 2000 Serguei Miridonov <mirsev@cicese.mx>
12 #ifndef __ZORAN_DEVICE_H__
13 #define __ZORAN_DEVICE_H__
15 /* general purpose I/O */
16 extern void GPIO(struct zoran *zr, int bit, unsigned int value);
18 /* codec (or actually: guest bus) access */
19 extern int post_office_wait(struct zoran *zr);
20 extern int post_office_write(struct zoran *zr, unsigned int guest, unsigned int reg, unsigned int value);
21 extern int post_office_read(struct zoran *zr, unsigned int guest, unsigned int reg);
23 extern void detect_guest_activity(struct zoran *zr);
25 extern void jpeg_codec_sleep(struct zoran *zr, int sleep);
26 extern int jpeg_codec_reset(struct zoran *zr);
28 /* zr360x7 access to raw capture */
29 extern void zr36057_overlay(struct zoran *zr, int on);
30 extern void write_overlay_mask(struct zoran_fh *fh, struct v4l2_clip *vp, int count);
31 extern void zr36057_set_memgrab(struct zoran *zr, int mode);
32 extern int wait_grab_pending(struct zoran *zr);
35 extern void print_interrupts(struct zoran *zr);
36 extern void clear_interrupt_counters(struct zoran *zr);
37 extern irqreturn_t zoran_irq(int irq, void *dev_id);
39 /* JPEG codec access */
40 extern void jpeg_start(struct zoran *zr);
41 extern void zr36057_enable_jpg(struct zoran *zr,
42 enum zoran_codec_mode mode);
43 extern void zoran_feed_stat_com(struct zoran *zr);
46 extern void zoran_set_pci_master(struct zoran *zr, int set_master);
47 extern void zoran_init_hardware(struct zoran *zr);
48 extern void zr36057_restart(struct zoran *zr);
50 extern const struct zoran_format zoran_formats[];
53 extern int v4l_bufsize;
55 extern int jpg_bufsize;
56 extern int pass_through;
59 #define decoder_call(zr, o, f, args...) \
60 v4l2_subdev_call(zr->decoder, o, f, ##args)
61 #define encoder_call(zr, o, f, args...) \
62 v4l2_subdev_call(zr->encoder, o, f, ##args)
64 #endif /* __ZORAN_DEVICE_H__ */