blob: ab63b3858acf14b1853078903fc9af91e25444a0 [file] [log] [blame]
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -03001/*
2 * Driver for the Conexant CX25821 PCIe bridge
3 *
Mauro Carvalho Chehabbb4c9a72009-09-13 11:25:45 -03004 * Copyright (C) 2009 Conexant Systems Inc.
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -03005 * Authors <shu.lin@conexant.com>, <hiep.huynh@conexant.com>
6 * Based on Steven Toth <stoth@linuxtv.org> cx23885 driver
7 *
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.
12 *
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
16 *
17 * GNU General Public License for more details.
18 *
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.
22 */
23
24#ifndef CX25821_VIDEO_H_
25#define CX25821_VIDEO_H_
26
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030027#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>
38
39#include "cx25821.h"
40#include <media/v4l2-common.h>
41#include <media/v4l2-ioctl.h>
Hans Verkuil8d125c52013-04-14 11:57:18 -030042#include <media/v4l2-event.h>
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030043
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030044#define VIDEO_DEBUG 0
45
Joe Perches36d89f72010-11-07 17:48:21 -030046#define dprintk(level, fmt, arg...) \
47do { \
48 if (VIDEO_DEBUG >= level) \
49 printk(KERN_DEBUG "%s/0: " fmt, dev->name, ##arg); \
50} while (0)
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030051
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030052#define FORMAT_FLAGS_PACKED 0x01
Mauro Carvalho Chehab1a9fc852009-09-13 11:30:11 -030053extern void cx25821_video_wakeup(struct cx25821_dev *dev,
54 struct cx25821_dmaqueue *q, u32 count);
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030055
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030056extern int cx25821_start_video_dma(struct cx25821_dev *dev,
Mauro Carvalho Chehab1a9fc852009-09-13 11:30:11 -030057 struct cx25821_dmaqueue *q,
58 struct cx25821_buffer *buf,
Hans Verkuilbfef0d32013-04-13 06:28:54 -030059 const struct sram_channel *channel);
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030060
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030061extern int cx25821_video_irq(struct cx25821_dev *dev, int chan_num, u32 status);
62extern void cx25821_video_unregister(struct cx25821_dev *dev, int chan_num);
Palash Bandyopadhyay6d8c2ba2010-07-04 14:15:38 -030063extern int cx25821_video_register(struct cx25821_dev *dev);
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030064
Mauro Carvalho Chehab02b20b02009-09-15 11:33:54 -030065#endif