X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fmedia%2Fsaa7146_vv.h;h=50e33b0e934984c543651bf4cb1fd8b3af550c87;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=60cd29e52f2d08c6dfad8c1417857cb35b76ec97;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/include/media/saa7146_vv.h b/include/media/saa7146_vv.h index 60cd29e52..50e33b0e9 100644 --- a/include/media/saa7146_vv.h +++ b/include/media/saa7146_vv.h @@ -1,8 +1,8 @@ #ifndef __SAA7146_VV__ #define __SAA7146_VV__ -#include - +#include +#include #include #include @@ -31,10 +31,11 @@ struct saa7146_video_dma { struct saa7146_format { char *name; - u32 pixelformat; + u32 pixelformat; u32 trans; u8 depth; u8 flags; + u8 swap; }; struct saa7146_standard @@ -44,10 +45,10 @@ struct saa7146_standard int v_offset; /* number of lines of vertical offset before processing */ int v_field; /* number of lines in a field for HPS to process */ - + int h_offset; /* horizontal offset of processing window */ int h_pixels; /* number of horizontal pixels to process */ - + int v_max_out; int h_max_out; }; @@ -89,7 +90,7 @@ struct saa7146_fh { /* video overlay */ struct saa7146_overlay ov; - + /* video capture */ struct videobuf_queue video_q; struct v4l2_pix_format video_fmt; @@ -112,7 +113,7 @@ struct saa7146_vv /* vbi capture */ struct saa7146_dmaqueue vbi_q; /* vbi workaround interrupt queue */ - wait_queue_head_t vbi_wq; + wait_queue_head_t vbi_wq; int vbi_fieldcount; struct saa7146_fh *vbi_streaming; @@ -138,11 +139,11 @@ struct saa7146_vv all opens? currently, we do the latter, like all other drivers do... */ struct saa7146_standard *standard; - + int vflip; - int hflip; - int current_hps_source; - int current_hps_sync; + int hflip; + int current_hps_source; + int current_hps_sync; struct saa7146_dma d_clipping; /* pointer to clipping memory */ @@ -156,7 +157,7 @@ struct saa7146_vv struct saa7146_extension_ioctls { unsigned int cmd; - int flags; + int flags; }; /* flags */ @@ -165,36 +166,39 @@ struct saa7146_extension_ioctls struct saa7146_ext_vv { /* informations about the video capabilities of the device */ - int inputs; - int audios; + int inputs; + int audios; u32 capabilities; - int flags; + int flags; /* additionally supported transmission standards */ struct saa7146_standard *stds; int num_stds; int (*std_callback)(struct saa7146_dev*, struct saa7146_standard *); - + struct saa7146_extension_ioctls *ioctls; int (*ioctl)(struct saa7146_fh*, unsigned int cmd, void *arg); + + struct file_operations vbi_fops; }; struct saa7146_use_ops { - void (*init)(struct saa7146_dev *, struct saa7146_vv *); - int(*open)(struct saa7146_dev *, struct file *); - void (*release)(struct saa7146_dev *, struct file *); - void (*irq_done)(struct saa7146_dev *, unsigned long status); - ssize_t (*read)(struct file *, char *, size_t, loff_t *); + void (*init)(struct saa7146_dev *, struct saa7146_vv *); + int(*open)(struct saa7146_dev *, struct file *); + void (*release)(struct saa7146_dev *, struct file *); + void (*irq_done)(struct saa7146_dev *, unsigned long status); + ssize_t (*read)(struct file *, char __user *, size_t, loff_t *); }; /* from saa7146_fops.c */ -int saa7146_register_device(struct video_device *vid, struct saa7146_dev* dev, char *name, int type); -int saa7146_unregister_device(struct video_device *vid, struct saa7146_dev* dev); +int saa7146_register_device(struct video_device **vid, struct saa7146_dev* dev, char *name, int type); +int saa7146_unregister_device(struct video_device **vid, struct saa7146_dev* dev); void saa7146_buffer_finish(struct saa7146_dev *dev, struct saa7146_dmaqueue *q, int state); void saa7146_buffer_next(struct saa7146_dev *dev, struct saa7146_dmaqueue *q,int vbi); int saa7146_buffer_queue(struct saa7146_dev *dev, struct saa7146_dmaqueue *q, struct saa7146_buf *buf); void saa7146_buffer_timeout(unsigned long data); -void saa7146_dma_free(struct saa7146_dev *dev,struct saa7146_buf *buf); +void saa7146_dma_free(struct saa7146_dev* dev,struct videobuf_queue *q, + struct saa7146_buf *buf); int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv); int saa7146_vv_release(struct saa7146_dev* dev); @@ -218,8 +222,6 @@ extern struct saa7146_use_ops saa7146_vbi_uops; /* resource management functions */ int saa7146_res_get(struct saa7146_fh *fh, unsigned int bit); -int saa7146_res_check(struct saa7146_fh *fh, unsigned int bit); -int saa7146_res_locked(struct saa7146_dev *dev, unsigned int bit); void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits); #define RESOURCE_DMA1_HPS 0x1 @@ -237,7 +239,8 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits); #define SAA7146_HPS_SYNC_PORT_B 0x01 /* some memory sizes */ -#define SAA7146_CLIPPING_MEM (14*PAGE_SIZE) +/* max. 16 clipping rectangles */ +#define SAA7146_CLIPPING_MEM (16 * 4 * sizeof(u32)) /* some defines for the various clipping-modes */ #define SAA7146_CLIPPING_RECT 0x4 @@ -265,7 +268,7 @@ void saa7146_res_free(struct saa7146_fh *fh, unsigned int bits); /* misc defines */ #define SAA7146_NO_SWAP (0x0) -#define SAA7146_TWO_BYTE_SWAP (0x1) +#define SAA7146_TWO_BYTE_SWAP (0x1) #define SAA7146_FOUR_BYTE_SWAP (0x2) #endif