2 * Driver for the Conexant CX25821 PCIe bridge
4 * Copyright (C) 2009 Conexant Systems Inc.
5 * Authors <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
6 * Based on Steven Toth <stoth@linuxtv.org> cx23885 driver
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24 #ifndef CX25821_VIDEO_H_
25 #define CX25821_VIDEO_H_
27 #include <linux/init.h>
28 #include <linux/list.h>
29 #include <linux/module.h>
30 #include <linux/moduleparam.h>
31 #include <linux/kmod.h>
32 #include <linux/kernel.h>
33 #include <linux/slab.h>
34 #include <linux/interrupt.h>
35 #include <linux/delay.h>
36 #include <linux/kthread.h>
37 #include <asm/div64.h>
40 #include <media/v4l2-common.h>
41 #include <media/v4l2-ioctl.h>
42 #include <media/v4l2-event.h>
46 #define dprintk(level, fmt, arg...) \
48 if (VIDEO_DEBUG >= level) \
49 printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \
52 #define FORMAT_FLAGS_PACKED 0x01
53 extern void cx25821_video_wakeup(struct cx25821_dev *dev,
54 struct cx25821_dmaqueue *q, u32 count);
56 extern int cx25821_start_video_dma(struct cx25821_dev *dev,
57 struct cx25821_dmaqueue *q,
58 struct cx25821_buffer *buf,
59 const struct sram_channel *channel);
61 extern int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status);
62 extern void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num);
63 extern int cx25821_video_register(struct cx25821_dev *dev);