]> www.vanbest.org Git - sasc-ng.git/commitdiff
Package without kernel source dependency
authorJan-Pascal van Best <janpascal@vanbest.org>
Thu, 24 Jan 2013 13:41:18 +0000 (14:41 +0100)
committerJan-Pascal van Best <janpascal@vanbest.org>
Thu, 24 Jan 2013 20:29:37 +0000 (21:29 +0100)
.gitignore [new file with mode: 0644]
debian/changelog
debian/config.mak-sse2 [new file with mode: 0644]
debian/control
debian/includes/3.7.1/dvbdev.h [new file with mode: 0644]
debian/patches/use-proper-kernel-header-locations.patch
debian/rules

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..a01ee28
--- /dev/null
@@ -0,0 +1 @@
+.*.swp
index 5d1464b0e1dd65e8e9049667784a9fe9124519d2..e8729307d4464be9e05cb786f84a8c9b5194488c 100644 (file)
@@ -1,4 +1,4 @@
-sasc-ng (620-3.7.1+1~experimental.sasc1) UNRELEASED; urgency=low
+sasc-ng (620-3.7.1+1~experimental.sasc1) experimental; urgency=low
 
   * Initial release. (Closes: #XXXXXX)
 
diff --git a/debian/config.mak-sse2 b/debian/config.mak-sse2
new file mode 100644 (file)
index 0000000..b0fc3a5
--- /dev/null
@@ -0,0 +1,5 @@
+# Automatically generated by configure - do not modify
+FFDECSA_OPTS = "FLAGS=-O3 -fexpensive-optimizations -funroll-loops -mmmx -msse -msse2 -march=native" PARALLEL_MODE=PARALLEL_128_SSE2 COMPILER=g++
+#DVB_DIR=/home/janpascal/src/tmp/linux/linux-3.7.1
+DVB_DIR=#DVB_DIR#
+CXX=g++
index 9b45e2fe242a8f413df1903baf2a99487cd1c518..23177d81adff2a092c8f0b8895c9ef9d0b3a01d9 100644 (file)
@@ -6,7 +6,7 @@ Standards-Version: 3.9.4
 #Build-Depends: debhelper (>= 5), ${kver:BuildDepends}
 Build-Depends: debhelper (>= 8)
 
-Package: sasc-ng-3.7-trunk-amd64
+Package: sasc-ng-3.7-trunk-amd64-sse2
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${kver:Depends}
 Description: softcam to help decode DVB streams
diff --git a/debian/includes/3.7.1/dvbdev.h b/debian/includes/3.7.1/dvbdev.h
new file mode 100644 (file)
index 0000000..93a9470
--- /dev/null
@@ -0,0 +1,146 @@
+/*
+ * dvbdev.h
+ *
+ * Copyright (C) 2000 Ralph Metzler & Marcus Metzler
+ *                    for convergence integrated media GmbH
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Lesser Public License
+ * as published by the Free Software Foundation; either version 2.1
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
+ *
+ */
+
+#ifndef _DVBDEV_H_
+#define _DVBDEV_H_
+
+#include <linux/types.h>
+#include <linux/poll.h>
+#include <linux/fs.h>
+#include <linux/list.h>
+
+#define DVB_MAJOR 212
+
+#if defined(CONFIG_DVB_MAX_ADAPTERS) && CONFIG_DVB_MAX_ADAPTERS > 0
+  #define DVB_MAX_ADAPTERS CONFIG_DVB_MAX_ADAPTERS
+#else
+  #define DVB_MAX_ADAPTERS 8
+#endif
+
+#define DVB_UNSET (-1)
+
+#define DVB_DEVICE_VIDEO      0
+#define DVB_DEVICE_AUDIO      1
+#define DVB_DEVICE_SEC        2
+#define DVB_DEVICE_FRONTEND   3
+#define DVB_DEVICE_DEMUX      4
+#define DVB_DEVICE_DVR        5
+#define DVB_DEVICE_CA         6
+#define DVB_DEVICE_NET        7
+#define DVB_DEVICE_OSD        8
+
+#define DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr) \
+       static short adapter_nr[] = \
+               {[0 ... (DVB_MAX_ADAPTERS - 1)] = DVB_UNSET }; \
+       module_param_array(adapter_nr, short, NULL, 0444); \
+       MODULE_PARM_DESC(adapter_nr, "DVB adapter numbers")
+
+struct dvb_frontend;
+
+struct dvb_adapter {
+       int num;
+       struct list_head list_head;
+       struct list_head device_list;
+       const char *name;
+       u8 proposed_mac [6];
+       void* priv;
+
+       struct device *device;
+
+       struct module *module;
+
+       int mfe_shared;                 /* indicates mutually exclusive frontends */
+       struct dvb_device *mfe_dvbdev;  /* frontend device in use */
+       struct mutex mfe_lock;          /* access lock for thread creation */
+};
+
+
+struct dvb_device {
+       struct list_head list_head;
+       const struct file_operations *fops;
+       struct dvb_adapter *adapter;
+       int type;
+       int minor;
+       u32 id;
+
+       /* in theory, 'users' can vanish now,
+          but I don't want to change too much now... */
+       int readers;
+       int writers;
+       int users;
+
+       wait_queue_head_t         wait_queue;
+       /* don't really need those !? -- FIXME: use video_usercopy  */
+       int (*kernel_ioctl)(struct file *file, unsigned int cmd, void *arg);
+
+       void *priv;
+};
+
+
+extern int dvb_register_adapter(struct dvb_adapter *adap, const char *name,
+                               struct module *module, struct device *device,
+                               short *adapter_nums);
+extern int dvb_unregister_adapter (struct dvb_adapter *adap);
+
+extern int dvb_register_device (struct dvb_adapter *adap,
+                               struct dvb_device **pdvbdev,
+                               const struct dvb_device *template,
+                               void *priv,
+                               int type);
+
+extern void dvb_unregister_device (struct dvb_device *dvbdev);
+
+extern int dvb_generic_open (struct inode *inode, struct file *file);
+extern int dvb_generic_release (struct inode *inode, struct file *file);
+extern long dvb_generic_ioctl (struct file *file,
+                             unsigned int cmd, unsigned long arg);
+
+/* we don't mess with video_usercopy() any more,
+we simply define out own dvb_usercopy(), which will hopefully become
+generic_usercopy()  someday... */
+
+extern int dvb_usercopy(struct file *file, unsigned int cmd, unsigned long arg,
+                           int (*func)(struct file *file, unsigned int cmd, void *arg));
+
+/** generic DVB attach function. */
+#ifdef CONFIG_MEDIA_ATTACH
+#define dvb_attach(FUNCTION, ARGS...) ({ \
+       void *__r = NULL; \
+       typeof(&FUNCTION) __a = symbol_request(FUNCTION); \
+       if (__a) { \
+               __r = (void *) __a(ARGS); \
+               if (__r == NULL) \
+                       symbol_put(FUNCTION); \
+       } else { \
+               printk(KERN_ERR "DVB: Unable to find symbol "#FUNCTION"()\n"); \
+       } \
+       __r; \
+})
+
+#else
+#define dvb_attach(FUNCTION, ARGS...) ({ \
+       FUNCTION(ARGS); \
+})
+
+#endif
+
+#endif /* #ifndef _DVBDEV_H_ */
index 2a8ec622bd8321b6b51b9beec2c3b4f601f03ce5..c3555023ed25b0438142eb53bb97c0c9ba0e9967 100644 (file)
@@ -20,7 +20,7 @@ diff -r 29b7b5f231c8 dvbloopback/module/Makefile
 -  EXTRA_CFLAGS = -I$(DVB_DIR) -I$(DVB_DIR)/drivers/media/dvb/dvb-core
 +  EXTRA_CFLAGS = -I$(SOURCE_DIR) -I$(SOURCE_DIR)/include \
 +     -I$(SOURCE_DIR)/include/uapi -I$(SOURCE_DIR)/arch/x86/include \
-+     -I$(DVB_DIR)/drivers/media/dvb-core
++     -I$(DVB_DIR)
    DVB_SRC = $(DVB_DIR)
    SYMVER = $(DVB_DIR)/../v4l/Module.symvers
    have_modver := $(wildcard $(SYMVER))
index 0b49ae211257cc2d5b0ce8bfd1c22ae839b3a15b..e1cde096013259b5f90f8289583a45dea253009a 100755 (executable)
@@ -21,7 +21,9 @@ override_dh_gencontrol:
        dh_gencontrol -- $(SUBSTVARS)
 
 override_dh_auto_configure:
-       cd contrib/sasc-ng; ./configure --dvb-dir=$(DVB_DIR)
+       #cd contrib/sasc-ng; ./configure --dvb-dir=$(DVB_DIR)
+       #cp debian/config.mak-sse2 contrib/sasc-ng/config.mak
+       sed -e "s|#DVB_DIR#|$(CURDIR)/debian/includes/3.7.1/|" < debian/config.mak-sse2 > contrib/sasc-ng/config.mak
        
 override_dh_auto_clean:
        cd contrib/sasc-ng; if [ -r config.mak ]; then make clean module_clean; fi