linux/drivers/media/usb/hdpvr/hdpvr-video.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Hauppauge HD PVR USB driver - video 4 linux 2 interface
 *
 * Copyright (C) 2008      Janne Grunau ([email protected])
 */

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/mutex.h>
#include <linux/workqueue.h>

#include <linux/videodev2.h>
#include <linux/v4l2-dv-timings.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-common.h>
#include <media/v4l2-dv-timings.h>
#include <media/v4l2-ioctl.h>
#include <media/v4l2-event.h>
#include "hdpvr.h"

#define BULK_URB_TIMEOUT

#define print_buffer_status()

static const struct v4l2_dv_timings hdpvr_dv_timings[] =;

/* Use 480i59 as the default timings */
#define HDPVR_DEF_DV_TIMINGS_IDX

struct hdpvr_fh {};

static uint list_size(struct list_head *list)
{}

/*=========================================================================*/
/* urb callback */
static void hdpvr_read_bulk_callback(struct urb *urb)
{}

/*=========================================================================*/
/* buffer bits */

/* function expects dev->io_mutex to be hold by caller */
int hdpvr_cancel_queue(struct hdpvr_device *dev)
{}

static int hdpvr_free_queue(struct list_head *q)
{}

/* function expects dev->io_mutex to be hold by caller */
int hdpvr_free_buffers(struct hdpvr_device *dev)
{}

/* function expects dev->io_mutex to be hold by caller */
int hdpvr_alloc_buffers(struct hdpvr_device *dev, uint count)
{}

static int hdpvr_submit_buffers(struct hdpvr_device *dev)
{}

static struct hdpvr_buffer *hdpvr_get_next_buffer(struct hdpvr_device *dev)
{}

static void hdpvr_transmit_buffers(struct work_struct *work)
{}

/* function expects dev->io_mutex to be hold by caller */
static int hdpvr_start_streaming(struct hdpvr_device *dev)
{}


/* function expects dev->io_mutex to be hold by caller */
static int hdpvr_stop_streaming(struct hdpvr_device *dev)
{}


/*=======================================================================*/
/*
 * video 4 linux 2 file operations
 */

static int hdpvr_open(struct file *file)
{}

static int hdpvr_release(struct file *file)
{}

/*
 * hdpvr_v4l2_read()
 * will allocate buffers when called for the first time
 */
static ssize_t hdpvr_read(struct file *file, char __user *buffer, size_t count,
			  loff_t *pos)
{}

static __poll_t hdpvr_poll(struct file *filp, poll_table *wait)
{}


static const struct v4l2_file_operations hdpvr_fops =;

/*=======================================================================*/
/*
 * V4L2 ioctl handling
 */

static int vidioc_querycap(struct file *file, void  *priv,
			   struct v4l2_capability *cap)
{}

static int vidioc_s_std(struct file *file, void *_fh,
			v4l2_std_id std)
{}

static int vidioc_g_std(struct file *file, void *_fh,
			v4l2_std_id *std)
{}

static int vidioc_querystd(struct file *file, void *_fh, v4l2_std_id *a)
{}

static int vidioc_s_dv_timings(struct file *file, void *_fh,
				    struct v4l2_dv_timings *timings)
{}

static int vidioc_g_dv_timings(struct file *file, void *_fh,
				    struct v4l2_dv_timings *timings)
{}

static int vidioc_query_dv_timings(struct file *file, void *_fh,
				    struct v4l2_dv_timings *timings)
{}

static int vidioc_enum_dv_timings(struct file *file, void *_fh,
				    struct v4l2_enum_dv_timings *timings)
{}

static int vidioc_dv_timings_cap(struct file *file, void *_fh,
				    struct v4l2_dv_timings_cap *cap)
{}

static const char *iname[] =;

static int vidioc_enum_input(struct file *file, void *_fh, struct v4l2_input *i)
{}

static int vidioc_s_input(struct file *file, void *_fh,
			  unsigned int index)
{}

static int vidioc_g_input(struct file *file, void *private_data,
			  unsigned int *index)
{}


static const char *audio_iname[] =;

static int vidioc_enumaudio(struct file *file, void *priv,
				struct v4l2_audio *audio)
{}

static int vidioc_s_audio(struct file *file, void *private_data,
			  const struct v4l2_audio *audio)
{}

static int vidioc_g_audio(struct file *file, void *private_data,
			  struct v4l2_audio *audio)
{}

static int hdpvr_try_ctrl(struct v4l2_ctrl *ctrl)
{}

static int hdpvr_s_ctrl(struct v4l2_ctrl *ctrl)
{}

static int vidioc_enum_fmt_vid_cap(struct file *file, void *private_data,
				    struct v4l2_fmtdesc *f)
{}

static int vidioc_g_fmt_vid_cap(struct file *file, void *_fh,
				struct v4l2_format *f)
{}

static int vidioc_encoder_cmd(struct file *filp, void *priv,
			       struct v4l2_encoder_cmd *a)
{}

static int vidioc_try_encoder_cmd(struct file *filp, void *priv,
					struct v4l2_encoder_cmd *a)
{}

static const struct v4l2_ioctl_ops hdpvr_ioctl_ops =;

static void hdpvr_device_release(struct video_device *vdev)
{}

static const struct video_device hdpvr_video_template =;

static const struct v4l2_ctrl_ops hdpvr_ctrl_ops =;

int hdpvr_register_videodev(struct hdpvr_device *dev, struct device *parent,
			    int devnum)
{}