Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
cx25821-video.h File Reference
#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 "cx25821.h"
#include <media/v4l2-common.h>
#include <media/v4l2-ioctl.h>

Go to the source code of this file.

Macros

#define TUNER_FLAG
 
#define VIDEO_DEBUG   0
 
#define dprintk(level, fmt, arg...)
 
#define UPSTREAM_START_VIDEO   700
 
#define UPSTREAM_STOP_VIDEO   701
 
#define UPSTREAM_START_AUDIO   702
 
#define UPSTREAM_STOP_AUDIO   703
 
#define UPSTREAM_DUMP_REGISTERS   702
 
#define SET_VIDEO_STD   800
 
#define SET_PIXEL_FORMAT   1000
 
#define ENABLE_CIF_RESOLUTION   1001
 
#define REG_READ   900
 
#define REG_WRITE   901
 
#define MEDUSA_READ   910
 
#define MEDUSA_WRITE   911
 
#define FORMAT_FLAGS_PACKED   0x01
 

Functions

struct cx25821_fmtcx25821_format_by_fourcc (unsigned int fourcc)
 
void cx25821_video_wakeup (struct cx25821_dev *dev, struct cx25821_dmaqueue *q, u32 count)
 
int cx25821_set_tvnorm (struct cx25821_dev *dev, v4l2_std_id norm)
 
int cx25821_res_get (struct cx25821_dev *dev, struct cx25821_fh *fh, unsigned int bit)
 
int cx25821_res_check (struct cx25821_fh *fh, unsigned int bit)
 
int cx25821_res_locked (struct cx25821_fh *fh, unsigned int bit)
 
void cx25821_res_free (struct cx25821_dev *dev, struct cx25821_fh *fh, unsigned int bits)
 
int cx25821_video_mux (struct cx25821_dev *dev, unsigned int input)
 
int cx25821_start_video_dma (struct cx25821_dev *dev, struct cx25821_dmaqueue *q, struct cx25821_buffer *buf, struct sram_channel *channel)
 
int cx25821_set_scale (struct cx25821_dev *dev, unsigned int width, unsigned int height, enum v4l2_field field)
 
int cx25821_video_irq (struct cx25821_dev *dev, int chan_num, u32 status)
 
void cx25821_video_unregister (struct cx25821_dev *dev, int chan_num)
 
int cx25821_video_register (struct cx25821_dev *dev)
 
int cx25821_get_format_size (void)
 
int cx25821_buffer_setup (struct videobuf_queue *q, unsigned int *count, unsigned int *size)
 
int cx25821_buffer_prepare (struct videobuf_queue *q, struct videobuf_buffer *vb, enum v4l2_field field)
 
void cx25821_buffer_release (struct videobuf_queue *q, struct videobuf_buffer *vb)
 
struct videobuf_queueget_queue (struct cx25821_fh *fh)
 
int cx25821_get_resource (struct cx25821_fh *fh, int resource)
 
int cx25821_video_mmap (struct file *file, struct vm_area_struct *vma)
 
int cx25821_vidioc_try_fmt_vid_cap (struct file *file, void *priv, struct v4l2_format *f)
 
int cx25821_vidioc_querycap (struct file *file, void *priv, struct v4l2_capability *cap)
 
int cx25821_vidioc_enum_fmt_vid_cap (struct file *file, void *priv, struct v4l2_fmtdesc *f)
 
int cx25821_vidioc_reqbufs (struct file *file, void *priv, struct v4l2_requestbuffers *p)
 
int cx25821_vidioc_querybuf (struct file *file, void *priv, struct v4l2_buffer *p)
 
int cx25821_vidioc_qbuf (struct file *file, void *priv, struct v4l2_buffer *p)
 
int cx25821_vidioc_s_std (struct file *file, void *priv, v4l2_std_id *tvnorms)
 
int cx25821_enum_input (struct cx25821_dev *dev, struct v4l2_input *i)
 
int cx25821_vidioc_enum_input (struct file *file, void *priv, struct v4l2_input *i)
 
int cx25821_vidioc_g_input (struct file *file, void *priv, unsigned int *i)
 
int cx25821_vidioc_s_input (struct file *file, void *priv, unsigned int i)
 
int cx25821_vidioc_g_ctrl (struct file *file, void *priv, struct v4l2_control *ctl)
 
int cx25821_vidioc_g_fmt_vid_cap (struct file *file, void *priv, struct v4l2_format *f)
 
int cx25821_vidioc_g_frequency (struct file *file, void *priv, struct v4l2_frequency *f)
 
int cx25821_set_freq (struct cx25821_dev *dev, struct v4l2_frequency *f)
 
int cx25821_vidioc_s_frequency (struct file *file, void *priv, struct v4l2_frequency *f)
 
int cx25821_vidioc_g_register (struct file *file, void *fh, struct v4l2_dbg_register *reg)
 
int cx25821_vidioc_s_register (struct file *file, void *fh, struct v4l2_dbg_register *reg)
 
int cx25821_vidioc_g_tuner (struct file *file, void *priv, struct v4l2_tuner *t)
 
int cx25821_vidioc_s_tuner (struct file *file, void *priv, struct v4l2_tuner *t)
 
int cx25821_is_valid_width (u32 width, v4l2_std_id tvnorm)
 
int cx25821_is_valid_height (u32 height, v4l2_std_id tvnorm)
 
int cx25821_vidioc_g_priority (struct file *file, void *f, enum v4l2_priority *p)
 
int cx25821_vidioc_s_priority (struct file *file, void *f, enum v4l2_priority prio)
 
int cx25821_vidioc_queryctrl (struct file *file, void *priv, struct v4l2_queryctrl *qctrl)
 
int cx25821_set_control (struct cx25821_dev *dev, struct v4l2_control *ctrl, int chan_num)
 
int cx25821_vidioc_cropcap (struct file *file, void *fh, struct v4l2_cropcap *cropcap)
 
int cx25821_vidioc_s_crop (struct file *file, void *priv, const struct v4l2_crop *crop)
 
int cx25821_vidioc_g_crop (struct file *file, void *priv, struct v4l2_crop *crop)
 
int cx25821_vidioc_querystd (struct file *file, void *priv, v4l2_std_id *norm)
 

Variables

struct sram_channelchannel0
 
struct sram_channelchannel1
 
struct sram_channelchannel2
 
struct sram_channelchannel3
 
struct sram_channelchannel4
 
struct sram_channelchannel5
 
struct sram_channelchannel6
 
struct sram_channelchannel7
 
struct sram_channelchannel9
 
struct sram_channelchannel10
 
struct sram_channelchannel11
 
struct video_device cx25821_videoioctl_template
 
unsigned int vid_limit
 
struct cx25821_fmt formats []
 
struct cx25821_data timeout_data [MAX_VID_CHANNEL_NUM]
 

Macro Definition Documentation

#define dprintk (   level,
  fmt,
  arg... 
)
Value:
do { \
if (VIDEO_DEBUG >= level) \
printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \
} while (0)

Definition at line 47 of file cx25821-video.h.

#define ENABLE_CIF_RESOLUTION   1001

Definition at line 61 of file cx25821-video.h.

#define FORMAT_FLAGS_PACKED   0x01

Definition at line 84 of file cx25821-video.h.

#define MEDUSA_READ   910

Definition at line 65 of file cx25821-video.h.

#define MEDUSA_WRITE   911

Definition at line 66 of file cx25821-video.h.

#define REG_READ   900

Definition at line 63 of file cx25821-video.h.

#define REG_WRITE   901

Definition at line 64 of file cx25821-video.h.

#define SET_PIXEL_FORMAT   1000

Definition at line 60 of file cx25821-video.h.

#define SET_VIDEO_STD   800

Definition at line 59 of file cx25821-video.h.

#define TUNER_FLAG

Definition at line 43 of file cx25821-video.h.

#define UPSTREAM_DUMP_REGISTERS   702

Definition at line 58 of file cx25821-video.h.

#define UPSTREAM_START_AUDIO   702

Definition at line 56 of file cx25821-video.h.

#define UPSTREAM_START_VIDEO   700

Definition at line 54 of file cx25821-video.h.

#define UPSTREAM_STOP_AUDIO   703

Definition at line 57 of file cx25821-video.h.

#define UPSTREAM_STOP_VIDEO   701

Definition at line 55 of file cx25821-video.h.

#define VIDEO_DEBUG   0

Definition at line 45 of file cx25821-video.h.

Function Documentation

int cx25821_buffer_prepare ( struct videobuf_queue q,
struct videobuf_buffer vb,
enum v4l2_field  field 
)

Definition at line 533 of file cx25821-video.c.

void cx25821_buffer_release ( struct videobuf_queue q,
struct videobuf_buffer vb 
)

Definition at line 660 of file cx25821-video.c.

int cx25821_buffer_setup ( struct videobuf_queue q,
unsigned int count,
unsigned int size 
)

Definition at line 517 of file cx25821-video.c.

int cx25821_enum_input ( struct cx25821_dev dev,
struct v4l2_input i 
)

Definition at line 1234 of file cx25821-video.c.

struct cx25821_fmt* cx25821_format_by_fourcc ( unsigned int  fourcc)
read

Definition at line 97 of file cx25821-video.c.

int cx25821_get_format_size ( void  )

Definition at line 92 of file cx25821-video.c.

int cx25821_get_resource ( struct cx25821_fh fh,
int  resource 
)

Definition at line 680 of file cx25821-video.c.

int cx25821_is_valid_height ( u32  height,
v4l2_std_id  tvnorm 
)

Definition at line 1661 of file cx25821-video.c.

int cx25821_is_valid_width ( u32  width,
v4l2_std_id  tvnorm 
)

Definition at line 1643 of file cx25821-video.c.

int cx25821_res_check ( struct cx25821_fh fh,
unsigned int  bit 
)

Definition at line 225 of file cx25821-video.c.

void cx25821_res_free ( struct cx25821_dev dev,
struct cx25821_fh fh,
unsigned int  bits 
)

Definition at line 235 of file cx25821-video.c.

int cx25821_res_get ( struct cx25821_dev dev,
struct cx25821_fh fh,
unsigned int  bit 
)

Definition at line 202 of file cx25821-video.c.

int cx25821_res_locked ( struct cx25821_fh fh,
unsigned int  bit 
)

Definition at line 230 of file cx25821-video.c.

int cx25821_set_control ( struct cx25821_dev dev,
struct v4l2_control ctrl,
int  chan_num 
)

Definition at line 1532 of file cx25821-video.c.

int cx25821_set_freq ( struct cx25821_dev dev,
struct v4l2_frequency f 
)

Definition at line 1315 of file cx25821-video.c.

int cx25821_set_scale ( struct cx25821_dev dev,
unsigned int  width,
unsigned int  height,
enum v4l2_field  field 
)
int cx25821_set_tvnorm ( struct cx25821_dev dev,
v4l2_std_id  norm 
)

Definition at line 148 of file cx25821-video.c.

int cx25821_start_video_dma ( struct cx25821_dev dev,
struct cx25821_dmaqueue q,
struct cx25821_buffer buf,
struct sram_channel channel 
)

Definition at line 266 of file cx25821-video.c.

int cx25821_video_irq ( struct cx25821_dev dev,
int  chan_num,
u32  status 
)

Definition at line 371 of file cx25821-video.c.

int cx25821_video_mmap ( struct file file,
struct vm_area_struct vma 
)

Definition at line 691 of file cx25821-video.c.

int cx25821_video_mux ( struct cx25821_dev dev,
unsigned int  input 
)

Definition at line 248 of file cx25821-video.c.

int cx25821_video_register ( struct cx25821_dev dev)

Definition at line 448 of file cx25821-video.c.

void cx25821_video_unregister ( struct cx25821_dev dev,
int  chan_num 
)

Definition at line 426 of file cx25821-video.c.

void cx25821_video_wakeup ( struct cx25821_dev dev,
struct cx25821_dmaqueue q,
u32  count 
)

Definition at line 112 of file cx25821-video.c.

int cx25821_vidioc_cropcap ( struct file file,
void fh,
struct v4l2_cropcap cropcap 
)

Definition at line 1594 of file cx25821-video.c.

int cx25821_vidioc_enum_fmt_vid_cap ( struct file file,
void priv,
struct v4l2_fmtdesc f 
)

Definition at line 1153 of file cx25821-video.c.

int cx25821_vidioc_enum_input ( struct file file,
void priv,
struct v4l2_input i 
)

Definition at line 1258 of file cx25821-video.c.

int cx25821_vidioc_g_crop ( struct file file,
void priv,
struct v4l2_crop crop 
)

Definition at line 1629 of file cx25821-video.c.

int cx25821_vidioc_g_ctrl ( struct file file,
void priv,
struct v4l2_control ctl 
)

Definition at line 1503 of file cx25821-video.c.

int cx25821_vidioc_g_fmt_vid_cap ( struct file file,
void priv,
struct v4l2_format f 
)

Definition at line 1073 of file cx25821-video.c.

int cx25821_vidioc_g_frequency ( struct file file,
void priv,
struct v4l2_frequency f 
)

Definition at line 1302 of file cx25821-video.c.

int cx25821_vidioc_g_input ( struct file file,
void priv,
unsigned int i 
)

Definition at line 1266 of file cx25821-video.c.

int cx25821_vidioc_g_priority ( struct file file,
void f,
enum v4l2_priority p 
)

Definition at line 1185 of file cx25821-video.c.

int cx25821_vidioc_g_register ( struct file file,
void fh,
struct v4l2_dbg_register reg 
)
int cx25821_vidioc_g_tuner ( struct file file,
void priv,
struct v4l2_tuner t 
)

Definition at line 1382 of file cx25821-video.c.

int cx25821_vidioc_qbuf ( struct file file,
void priv,
struct v4l2_buffer p 
)

Definition at line 1179 of file cx25821-video.c.

int cx25821_vidioc_querybuf ( struct file file,
void priv,
struct v4l2_buffer p 
)

Definition at line 1172 of file cx25821-video.c.

int cx25821_vidioc_querycap ( struct file file,
void priv,
struct v4l2_capability cap 
)

Definition at line 1137 of file cx25821-video.c.

int cx25821_vidioc_queryctrl ( struct file file,
void priv,
struct v4l2_queryctrl qctrl 
)

Definition at line 1484 of file cx25821-video.c.

int cx25821_vidioc_querystd ( struct file file,
void priv,
v4l2_std_id norm 
)

Definition at line 1635 of file cx25821-video.c.

int cx25821_vidioc_reqbufs ( struct file file,
void priv,
struct v4l2_requestbuffers p 
)

Definition at line 1165 of file cx25821-video.c.

int cx25821_vidioc_s_crop ( struct file file,
void priv,
const struct v4l2_crop crop 
)

Definition at line 1613 of file cx25821-video.c.

int cx25821_vidioc_s_frequency ( struct file file,
void priv,
struct v4l2_frequency f 
)

Definition at line 1330 of file cx25821-video.c.

int cx25821_vidioc_s_input ( struct file file,
void priv,
unsigned int  i 
)

Definition at line 1275 of file cx25821-video.c.

int cx25821_vidioc_s_priority ( struct file file,
void f,
enum v4l2_priority  prio 
)

Definition at line 1195 of file cx25821-video.c.

int cx25821_vidioc_s_register ( struct file file,
void fh,
struct v4l2_dbg_register reg 
)
int cx25821_vidioc_s_std ( struct file file,
void priv,
v4l2_std_id tvnorms 
)

Definition at line 1206 of file cx25821-video.c.

int cx25821_vidioc_s_tuner ( struct file file,
void priv,
struct v4l2_tuner t 
)

Definition at line 1400 of file cx25821-video.c.

int cx25821_vidioc_try_fmt_vid_cap ( struct file file,
void priv,
struct v4l2_format f 
)

Definition at line 1088 of file cx25821-video.c.

struct videobuf_queue* get_queue ( struct cx25821_fh fh)
read

Definition at line 669 of file cx25821-video.c.

Variable Documentation

struct sram_channel* channel0

Definition at line 320 of file cx25821-core.c.

struct sram_channel* channel1

Definition at line 321 of file cx25821-core.c.

struct sram_channel* channel10

Definition at line 329 of file cx25821-core.c.

struct sram_channel* channel11

Definition at line 330 of file cx25821-core.c.

struct sram_channel* channel2

Definition at line 322 of file cx25821-core.c.

struct sram_channel* channel3

Definition at line 323 of file cx25821-core.c.

struct sram_channel* channel4

Definition at line 324 of file cx25821-core.c.

struct sram_channel* channel5

Definition at line 325 of file cx25821-core.c.

struct sram_channel* channel6

Definition at line 326 of file cx25821-core.c.

struct sram_channel* channel7

Definition at line 327 of file cx25821-core.c.

struct sram_channel* channel9

Definition at line 328 of file cx25821-core.c.

struct video_device cx25821_videoioctl_template

Definition at line 1984 of file cx25821-video.c.

struct cx25821_fmt formats[]

Definition at line 63 of file cx25821-video.c.

unsigned int vid_limit

Definition at line 52 of file cx25821-video.c.