#include "cx23885.h"
#include "cx23885-video.h"
#include <linux/init.h>
#include <linux/list.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kmod.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/kthread.h>
#include <asm/div64.h>
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include "cx23885-ioctl.h"
#include "xc2028.h"
#include <media/drv-intf/cx25840.h>
MODULE_DESCRIPTION(…) …;
MODULE_AUTHOR(…) …;
MODULE_LICENSE(…) …;
static unsigned int video_nr[] = …;
static unsigned int vbi_nr[] = …;
module_param_array(…);
module_param_array(…);
MODULE_PARM_DESC(…) …;
MODULE_PARM_DESC(…) …;
static unsigned int video_debug;
module_param(video_debug, int, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int irq_debug;
module_param(irq_debug, int, 0644);
MODULE_PARM_DESC(…) …;
static unsigned int vid_limit = …;
module_param(vid_limit, int, 0644);
MODULE_PARM_DESC(…) …;
#define dprintk(level, fmt, arg...) …
#define FORMAT_FLAGS_PACKED …
static struct cx23885_fmt formats[] = …;
static struct cx23885_fmt *format_by_fourcc(unsigned int fourcc)
{ … }
void cx23885_video_wakeup(struct cx23885_dev *dev,
struct cx23885_dmaqueue *q, u32 count)
{ … }
int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm)
{ … }
static struct video_device *cx23885_vdev_init(struct cx23885_dev *dev,
struct pci_dev *pci,
struct video_device *template,
char *type)
{ … }
int cx23885_flatiron_write(struct cx23885_dev *dev, u8 reg, u8 data)
{ … }
u8 cx23885_flatiron_read(struct cx23885_dev *dev, u8 reg)
{ … }
static void cx23885_flatiron_dump(struct cx23885_dev *dev)
{ … }
static int cx23885_flatiron_mux(struct cx23885_dev *dev, int input)
{ … }
static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input)
{ … }
static int cx23885_audio_mux(struct cx23885_dev *dev, unsigned int input)
{ … }
static int cx23885_start_video_dma(struct cx23885_dev *dev,
struct cx23885_dmaqueue *q,
struct cx23885_buffer *buf)
{ … }
static int queue_setup(struct vb2_queue *q,
unsigned int *num_buffers, unsigned int *num_planes,
unsigned int sizes[], struct device *alloc_devs[])
{ … }
static int buffer_prepare(struct vb2_buffer *vb)
{ … }
static void buffer_finish(struct vb2_buffer *vb)
{ … }
static void buffer_queue(struct vb2_buffer *vb)
{ … }
static int cx23885_start_streaming(struct vb2_queue *q, unsigned int count)
{ … }
static void cx23885_stop_streaming(struct vb2_queue *q)
{ … }
static const struct vb2_ops cx23885_video_qops = …;
static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_format *f)
{ … }
static int vidioc_querycap(struct file *file, void *priv,
struct v4l2_capability *cap)
{ … }
static int vidioc_enum_fmt_vid_cap(struct file *file, void *priv,
struct v4l2_fmtdesc *f)
{ … }
static int vidioc_g_pixelaspect(struct file *file, void *priv,
int type, struct v4l2_fract *f)
{ … }
static int vidioc_g_selection(struct file *file, void *fh,
struct v4l2_selection *sel)
{ … }
static int vidioc_g_std(struct file *file, void *priv, v4l2_std_id *id)
{ … }
static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id tvnorms)
{ … }
int cx23885_enum_input(struct cx23885_dev *dev, struct v4l2_input *i)
{ … }
static int vidioc_enum_input(struct file *file, void *priv,
struct v4l2_input *i)
{ … }
int cx23885_get_input(struct file *file, void *priv, unsigned int *i)
{ … }
static int vidioc_g_input(struct file *file, void *priv, unsigned int *i)
{ … }
int cx23885_set_input(struct file *file, void *priv, unsigned int i)
{ … }
static int vidioc_s_input(struct file *file, void *priv, unsigned int i)
{ … }
static int vidioc_log_status(struct file *file, void *priv)
{ … }
static int cx23885_query_audinput(struct file *file, void *priv,
struct v4l2_audio *i)
{ … }
static int vidioc_enum_audinput(struct file *file, void *priv,
struct v4l2_audio *i)
{ … }
static int vidioc_g_audinput(struct file *file, void *priv,
struct v4l2_audio *i)
{ … }
static int vidioc_s_audinput(struct file *file, void *priv,
const struct v4l2_audio *i)
{ … }
static int vidioc_g_tuner(struct file *file, void *priv,
struct v4l2_tuner *t)
{ … }
static int vidioc_s_tuner(struct file *file, void *priv,
const struct v4l2_tuner *t)
{ … }
static int vidioc_g_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
{ … }
static int cx23885_set_freq(struct cx23885_dev *dev, const struct v4l2_frequency *f)
{ … }
static int cx23885_set_freq_via_ops(struct cx23885_dev *dev,
const struct v4l2_frequency *f)
{ … }
int cx23885_set_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{ … }
static int vidioc_s_frequency(struct file *file, void *priv,
const struct v4l2_frequency *f)
{ … }
int cx23885_video_irq(struct cx23885_dev *dev, u32 status)
{ … }
static const struct v4l2_file_operations video_fops = …;
static const struct v4l2_ioctl_ops video_ioctl_ops = …;
static struct video_device cx23885_vbi_template;
static struct video_device cx23885_video_template = …;
void cx23885_video_unregister(struct cx23885_dev *dev)
{ … }
int cx23885_video_register(struct cx23885_dev *dev)
{ … }