2 * $Id: saa7134-dvb.c,v 1.4 2004/11/07 14:44:59 kraxel Exp $
4 * (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 #include <linux/init.h>
22 #include <linux/list.h>
23 #include <linux/module.h>
24 #include <linux/kernel.h>
25 #include <linux/slab.h>
26 #include <linux/delay.h>
27 #include <linux/kthread.h>
28 #include <linux/suspend.h>
30 #include "saa7134-reg.h"
33 MODULE_AUTHOR("Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]");
34 MODULE_LICENSE("GPL");
36 /* ------------------------------------------------------------------ */
38 static int dvb_init(struct saa7134_dev *dev)
40 printk("%s: %s\n",dev->name,__FUNCTION__);
42 /* init struct videobuf_dvb */
43 dev->dvb.name = dev->name;
44 videobuf_queue_init(&dev->dvb.dvbq, &saa7134_ts_qops,
45 dev->pci, &dev->slock,
46 V4L2_BUF_TYPE_VIDEO_CAPTURE,
48 sizeof(struct saa7134_buf),
51 /* TODO: init frontend */
52 if (NULL == dev->dvb.frontend)
55 /* register everything else */
56 return videobuf_dvb_register(&dev->dvb);
59 static int dvb_fini(struct saa7134_dev *dev)
61 printk("%s: %s\n",dev->name,__FUNCTION__);
62 videobuf_dvb_unregister(&dev->dvb);
66 static struct saa7134_mpeg_ops dvb_ops = {
67 .type = SAA7134_MPEG_DVB,
72 static int __init dvb_register(void)
74 return saa7134_ts_register(&dvb_ops);
77 static void __exit dvb_unregister(void)
79 saa7134_ts_unregister(&dvb_ops);
82 module_init(dvb_register);
83 module_exit(dvb_unregister);
85 /* ------------------------------------------------------------------ */
89 * compile-command: "make DVB=1"