]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - drivers/media/pci/zoran/zoran_device.h
Merge branches 'for-4.11/upstream-fixes', 'for-4.12/accutouch', 'for-4.12/cp2112...
[mirror_ubuntu-artful-kernel.git] / drivers / media / pci / zoran / zoran_device.h
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
26 #ifndef __ZORAN_DEVICE_H__
27 #define __ZORAN_DEVICE_H__
28
29 /* general purpose I/O */
30 extern void GPIO(struct zoran *zr,
31 int bit,
32 unsigned int value);
33
34 /* codec (or actually: guest bus) access */
35 extern int post_office_wait(struct zoran *zr);
36 extern int post_office_write(struct zoran *zr,
37 unsigned guest,
38 unsigned reg,
39 unsigned value);
40 extern int post_office_read(struct zoran *zr,
41 unsigned guest,
42 unsigned reg);
43
44 extern void detect_guest_activity(struct zoran *zr);
45
46 extern void jpeg_codec_sleep(struct zoran *zr,
47 int sleep);
48 extern int jpeg_codec_reset(struct zoran *zr);
49
50 /* zr360x7 access to raw capture */
51 extern void zr36057_overlay(struct zoran *zr,
52 int on);
53 extern void write_overlay_mask(struct zoran_fh *fh,
54 struct v4l2_clip *vp,
55 int count);
56 extern void zr36057_set_memgrab(struct zoran *zr,
57 int mode);
58 extern int wait_grab_pending(struct zoran *zr);
59
60 /* interrupts */
61 extern void print_interrupts(struct zoran *zr);
62 extern void clear_interrupt_counters(struct zoran *zr);
63 extern irqreturn_t zoran_irq(int irq, void *dev_id);
64
65 /* JPEG codec access */
66 extern void jpeg_start(struct zoran *zr);
67 extern void zr36057_enable_jpg(struct zoran *zr,
68 enum zoran_codec_mode mode);
69 extern void zoran_feed_stat_com(struct zoran *zr);
70
71 /* general */
72 extern void zoran_set_pci_master(struct zoran *zr,
73 int set_master);
74 extern void zoran_init_hardware(struct zoran *zr);
75 extern void zr36057_restart(struct zoran *zr);
76
77 extern const struct zoran_format zoran_formats[];
78
79 extern int v4l_nbufs;
80 extern int v4l_bufsize;
81 extern int jpg_nbufs;
82 extern int jpg_bufsize;
83 extern int pass_through;
84
85 /* i2c */
86 #define decoder_call(zr, o, f, args...) \
87 v4l2_subdev_call(zr->decoder, o, f, ##args)
88 #define encoder_call(zr, o, f, args...) \
89 v4l2_subdev_call(zr->encoder, o, f, ##args)
90
91 #endif /* __ZORAN_DEVICE_H__ */