00001
00002
00003
00004 #include <linux/poll.h>
00005
00006 int circbuf_all_open (struct inode *inode, struct file *filp);
00007 int circbuf_all_release(struct inode *inode, struct file *filp);
00008 loff_t circbuf_all_lseek (struct file * file, loff_t offset, int orig);
00009 ssize_t circbuf_all_write (struct file * file, const char * buf, size_t count, loff_t *off);
00010 ssize_t circbuf_all_read (struct file * file, char * buf, size_t count, loff_t *off);
00011 int circbuf_all_mmap (struct file *file, struct vm_area_struct *vma);
00012 unsigned int circbuf_all_poll (struct file *file, poll_table *wait);
00014 int circbuf_all_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg);
00015
00016
00017
00018 int circbuf_open (struct inode *inode, struct file *filp);
00019 loff_t circbuf_lseek (struct file * file, loff_t offset, int orig);
00020 ssize_t circbuf_write (struct file * file, const char * buf, size_t count, loff_t *off);
00021 ssize_t circbuf_read (struct file * file, char * buf, size_t count, loff_t *off);
00022 int circbuf_mmap (struct file *file, struct vm_area_struct *vma);
00023 unsigned int circbuf_poll (struct file *file, poll_table *wait);
00024
00025 int jpeghead_open (struct inode *inode, struct file *filp);
00026 loff_t jpeghead_lseek(struct file * file, loff_t offset, int orig);
00027 ssize_t jpeghead_read (struct file * file, char * buf, size_t count, loff_t *off);
00028 ssize_t jpeghead_write(struct file * file, const char * buf, size_t count, loff_t *off);
00029
00030 extern unsigned long * ccam_dma_buf_ptr;
00031 void init_ccam_dma_buf_ptr(void);
00035 extern wait_queue_head_t circbuf_wait_queue;
00036
00037
00038 #define X313_CHAIN_SIGNATURE 0xffffffff
00039 #define X313_CHAIN_SIGNATURE4 0xffff0000
00040
00041 #define X313_LENGTH_MASK 0xff000000
00042
00043 #define X313_PADDED_FRAME(x)((((x)+67+CCAM_MMAP_META ) >>2) & 0xfffffff8)
00044 #define X313_BUFFSUB(x,y) (((x)>=(y))? ((x)-(y)) : ((x)+ (CCAM_DMA_SIZE-(y))))
00045 #define X313_BUFFADD(x,y) ((((x) + (y))<=CCAM_DMA_SIZE)? ((x) + (y)) : ((x) - (CCAM_DMA_SIZE-(y))))