summaryrefslogtreecommitdiff
path: root/linux/include
diff options
context:
space:
mode:
Diffstat (limited to 'linux/include')
-rw-r--r--linux/include/media/saa7146_vv.h29
1 files changed, 23 insertions, 6 deletions
diff --git a/linux/include/media/saa7146_vv.h b/linux/include/media/saa7146_vv.h
index 5043be6ee..9f7e9ea35 100644
--- a/linux/include/media/saa7146_vv.h
+++ b/linux/include/media/saa7146_vv.h
@@ -26,12 +26,15 @@ struct saa7146_video_dma {
u32 num_line_byte;
};
+#define FORMAT_BYTE_SWAP 0x1
+#define FORMAT_IS_PLANAR 0x2
+
struct saa7146_format {
char *name;
- int pixelformat;
+ u32 pixelformat;
u32 trans;
u8 depth;
- int swap;
+ u8 flags;
};
struct saa7146_standard
@@ -97,6 +100,8 @@ struct saa7146_fh {
struct videobuf_queue vbi_q;
struct v4l2_vbi_format vbi_fmt;
struct timer_list vbi_read_timeout;
+
+ unsigned int resources; /* resource management for device open */
};
struct saa7146_vv
@@ -136,6 +141,8 @@ struct saa7146_vv
int current_hps_sync;
struct saa7146_dma d_clipping; /* pointer to clipping memory */
+
+ unsigned int resources; /* resource management for device */
};
#define SAA7146_EXCLUSIVE 0x1
@@ -149,7 +156,6 @@ struct saa7146_extension_ioctls
};
/* flags */
-// #define SAA7146_EXT_SWAP_ODD_EVEN 0x1 /* needs odd/even fields swapped */
#define SAA7146_USE_PORT_B_FOR_VBI 0x2 /* use input port b for vbi hardware bug workaround */
struct saa7146_ext_vv
@@ -171,7 +177,7 @@ struct saa7146_ext_vv
struct saa7146_use_ops {
void (*init)(struct saa7146_dev *, struct saa7146_vv *);
- void(*open)(struct saa7146_dev *, struct file *);
+ 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 *);
@@ -189,9 +195,10 @@ void saa7146_dma_free(struct saa7146_dev *dev,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);
-
/* from saa7146_hlp.c */
-void saa7146_set_overlay(struct saa7146_dev *dev, struct saa7146_fh *fh, int v);
+int saa7146_enable_overlay(struct saa7146_fh *fh);
+void saa7146_disable_overlay(struct saa7146_fh *fh);
+
void saa7146_set_capture(struct saa7146_dev *dev, struct saa7146_buf *buf, struct saa7146_buf *next);
void saa7146_write_out_dma(struct saa7146_dev* dev, int which, struct saa7146_video_dma* vdma) ;
void saa7146_set_hps_source_and_sync(struct saa7146_dev *saa, int source, int sync);
@@ -205,6 +212,16 @@ int saa7146_stop_preview(struct saa7146_fh *fh);
/* from saa7146_vbi.c */
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
+#define RESOURCE_DMA2_CLP 0x2
+#define RESOURCE_DMA3_BRS 0x4
+
/* saa7146 source inputs */
#define SAA7146_HPS_SOURCE_PORT_A 0x00
#define SAA7146_HPS_SOURCE_PORT_B 0x01