#include <linux/init.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/pci.h>
#include <linux/wait.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/spinlock.h>
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include "videocodec.h"
#include <linux/io.h>
#include <linux/uaccess.h>
#include <linux/mutex.h>
#include "zoran.h"
#include "zoran_device.h"
#include "zoran_card.h"
const struct zoran_format zoran_formats[] = …;
#define NUM_FORMATS …
static __u32 zoran_v4l2_calc_bufsize(struct zoran_jpg_settings *settings)
{ … }
static int zoran_v4l_set_format(struct zoran *zr, int width, int height,
const struct zoran_format *format)
{ … }
static int zoran_set_norm(struct zoran *zr, v4l2_std_id norm)
{ … }
static int zoran_set_input(struct zoran *zr, int input)
{ … }
static int zoran_querycap(struct file *file, void *__fh, struct v4l2_capability *cap)
{ … }
static int zoran_enum_fmt(struct zoran *zr, struct v4l2_fmtdesc *fmt, int flag)
{ … }
static int zoran_enum_fmt_vid_cap(struct file *file, void *__fh,
struct v4l2_fmtdesc *f)
{ … }
static int zoran_g_fmt_vid_out(struct file *file, void *__fh,
struct v4l2_format *fmt)
{ … }
static int zoran_g_fmt_vid_cap(struct file *file, void *__fh,
struct v4l2_format *fmt)
{ … }
static int zoran_try_fmt_vid_out(struct file *file, void *__fh,
struct v4l2_format *fmt)
{ … }
static int zoran_try_fmt_vid_cap(struct file *file, void *__fh,
struct v4l2_format *fmt)
{ … }
static int zoran_s_fmt_vid_out(struct file *file, void *__fh,
struct v4l2_format *fmt)
{ … }
static int zoran_s_fmt_vid_cap(struct file *file, void *__fh,
struct v4l2_format *fmt)
{ … }
static int zoran_g_std(struct file *file, void *__fh, v4l2_std_id *std)
{ … }
static int zoran_s_std(struct file *file, void *__fh, v4l2_std_id std)
{ … }
static int zoran_enum_input(struct file *file, void *__fh,
struct v4l2_input *inp)
{ … }
static int zoran_g_input(struct file *file, void *__fh, unsigned int *input)
{ … }
static int zoran_s_input(struct file *file, void *__fh, unsigned int input)
{ … }
static int zoran_g_selection(struct file *file, void *__fh, struct v4l2_selection *sel)
{ … }
static int zoran_s_selection(struct file *file, void *__fh, struct v4l2_selection *sel)
{ … }
static const struct v4l2_ioctl_ops zoran_ioctl_ops = …;
static const struct v4l2_file_operations zoran_fops = …;
const struct video_device zoran_template = …;
static int zr_vb2_queue_setup(struct vb2_queue *vq, unsigned int *nbuffers, unsigned int *nplanes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static void zr_vb2_queue(struct vb2_buffer *vb)
{ … }
static int zr_vb2_prepare(struct vb2_buffer *vb)
{ … }
int zr_set_buf(struct zoran *zr)
{ … }
static int zr_vb2_start_streaming(struct vb2_queue *vq, unsigned int count)
{ … }
static void zr_vb2_stop_streaming(struct vb2_queue *vq)
{ … }
static const struct vb2_ops zr_video_qops = …;
int zoran_queue_init(struct zoran *zr, struct vb2_queue *vq, int dir)
{ … }
void zoran_queue_exit(struct zoran *zr)
{ … }