xref: /linux/drivers/media/pci/cx25821/cx25821-video.h (revision 95298d63c67673c654c08952672d016212b26054)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  *  Driver for the Conexant CX25821 PCIe bridge
4  *
5  *  Copyright (C) 2009 Conexant Systems Inc.
6  *  Authors  <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
7  *  Based on Steven Toth <stoth@linuxtv.org> cx23885 driver
8  */
9 
10 #ifndef CX25821_VIDEO_H_
11 #define CX25821_VIDEO_H_
12 
13 #include <linux/init.h>
14 #include <linux/list.h>
15 #include <linux/module.h>
16 #include <linux/moduleparam.h>
17 #include <linux/kmod.h>
18 #include <linux/kernel.h>
19 #include <linux/slab.h>
20 #include <linux/interrupt.h>
21 #include <linux/delay.h>
22 #include <linux/kthread.h>
23 #include <asm/div64.h>
24 
25 #include "cx25821.h"
26 #include <media/v4l2-common.h>
27 #include <media/v4l2-ioctl.h>
28 #include <media/v4l2-event.h>
29 
30 #define VIDEO_DEBUG 0
31 
32 #define dprintk(level, fmt, arg...)					\
33 do {									\
34 	if (VIDEO_DEBUG >= level)					\
35 		printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg);	\
36 } while (0)
37 
38 #define FORMAT_FLAGS_PACKED       0x01
39 extern void cx25821_video_wakeup(struct cx25821_dev *dev,
40 				 struct cx25821_dmaqueue *q, u32 count);
41 
42 extern int cx25821_start_video_dma(struct cx25821_dev *dev,
43 				   struct cx25821_dmaqueue *q,
44 				   struct cx25821_buffer *buf,
45 				   const struct sram_channel *channel);
46 
47 extern int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status);
48 extern void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num);
49 extern int cx25821_video_register(struct cx25821_dev *dev);
50 
51 #endif
52