summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO28
-rw-r--r--PKGBUILD68
-rw-r--r--stk11xx-svn.install16
-rw-r--r--stk11xx_0C.patch11
-rw-r--r--stk11xx_ioctl.patch11
-rw-r--r--stk11xx_kernel11.patch49
-rw-r--r--stk11xx_sysfs.patch21
7 files changed, 204 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..2745c209803b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,28 @@
+pkgbase = stk11xx-svn
+ pkgdesc = Syntek DC-1125 Camera Driver (integrated camera in Asus laptops)
+ pkgver = 107
+ pkgrel = 3
+ url = http://syntekdriver.sourceforge.net
+ install = stk11xx-svn.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = subversion
+ makedepends = ctags
+ makedepends = linux-headers
+ depends = linux
+ provides = stk11xx
+ replaces = stk11xx
+ source = stk11xx_kernel11.patch
+ source = stk11xx_sysfs.patch
+ source = stk11xx-svn.install
+ source = stk11xx_ioctl.patch
+ source = stk11xx_0C.patch
+ md5sums = 86123174ff309ce646d0060cb2d19ddb
+ md5sums = a655b8df03ad18053645cf8a33c5b625
+ md5sums = d1ebdbe36756f49fcfabfcd8498b3512
+ md5sums = eedf9fec9418f61e3002e94cc06e0c8e
+ md5sums = 0f58bef7a0f768da9ccd42e4abe183e1
+
+pkgname = stk11xx-svn
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..d64fa57af11a
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,68 @@
+# Maintainer : jSparber <julian at sparber dot net>
+# Package is based on AUR stk11xx and the old stk11xx-svn package, so I list all here all contributors to the original package:
+# Contributor : pavolsk <pavol.kapusta at gmail dot com>
+# Contributor : jSparber <julian at sparber dot net>
+# Contributor : SpepS <dreamspepser at yahoo dot it>
+# Contributor : Marcin Karpezo <sirmacik at gmail dot com>
+
+_kv=`uname -r | sed "s/\([0-9]\+.[0-9]\+\).*/\1/"` # kernel version
+pkgname=stk11xx-svn
+pkgver=107
+pkgrel=3
+pkgdesc="Syntek DC-1125 Camera Driver (integrated camera in Asus laptops)"
+arch=(i686 x86_64)
+url="http://syntekdriver.sourceforge.net"
+license=('GPL')
+depends=("linux")
+makedepends=('subversion' 'ctags' 'linux-headers')
+install="$pkgname.install"
+provides=('stk11xx')
+replaces=('stk11xx')
+source=("stk11xx_kernel11.patch" "stk11xx_sysfs.patch" "$pkgname.install" "stk11xx_ioctl.patch" "stk11xx_0C.patch");
+md5sums=('86123174ff309ce646d0060cb2d19ddb'
+ 'a655b8df03ad18053645cf8a33c5b625'
+ 'd1ebdbe36756f49fcfabfcd8498b3512'
+ 'eedf9fec9418f61e3002e94cc06e0c8e'
+ '0f58bef7a0f768da9ccd42e4abe183e1')
+
+_svntrunk="https://syntekdriver.svn.sourceforge.net/svnroot/syntekdriver/trunk/driver"
+_svnmod="driver"
+
+build() {
+ cd "$srcdir"
+ msg "Connecting to SVN server...."
+
+ if [[ -d "$_svnmod/.svn" ]]; then
+ (cd "$_svnmod" && svn up -r "$pkgver")
+ else
+ svn co "$_svntrunk" --config-dir ./ -r "$pkgver" "$_svnmod"
+ fi
+
+ msg "SVN checkout done or server timeout"
+ msg "Starting build..."
+
+ rm -rf "$srcdir/$_svnmod-build"
+ svn export "$srcdir/$_svnmod" "$srcdir/$_svnmod-build"
+ cd "$srcdir/$_svnmod-build"
+ patch -p1 -i $srcdir/stk11xx_kernel11.patch
+ patch -p1 -i $srcdir/stk11xx_sysfs.patch
+ patch -p1 -i $srcdir/stk11xx_ioctl.patch
+ patch -p1 -i $srcdir/stk11xx_0C.patch
+ #
+ # BUILD HERE
+ #
+
+ make -f Makefile.standalone
+}
+
+package() {
+ cd "$srcdir/$_svnmod-build"
+
+ # module
+ install -Dm644 stk11xx.ko \
+ "$pkgdir/usr/lib/modules/extramodules-$_kv-ARCH/stk11xx.ko"
+
+ # readme
+ install -Dm644 README "$pkgdir/usr/share/stk11xx/README"
+}
+
diff --git a/stk11xx-svn.install b/stk11xx-svn.install
new file mode 100644
index 000000000000..8163a60772e2
--- /dev/null
+++ b/stk11xx-svn.install
@@ -0,0 +1,16 @@
+post_install()
+{
+ depmod $(cat /lib/modules/extramodules-`uname -r | sed "s/\([0-9]\+.[0-9]\+\).*/\1/"`-ARCH/version)
+}
+
+post_upgrade()
+{
+ post_install
+}
+
+post_remove()
+{
+ post_install
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/stk11xx_0C.patch b/stk11xx_0C.patch
new file mode 100644
index 000000000000..1aa512b1862c
--- /dev/null
+++ b/stk11xx_0C.patch
@@ -0,0 +1,11 @@
+--- ./old/stk11xx-dev.c 2011-06-13 21:44:35.630053000 +0200
++++ ./stk11xx-dev.c 2015-09-27 15:14:41.051877270 +0200
+@@ -208,7 +208,7 @@ int dev_stk11xx_check_device(struct usb_
+ }
+ else if ((value == 0x04) || (value == 0x05))
+ return 1;
+- else if (value == 0x15)
++ else if (value == 0x15 || (value == 0x0C))
+ return 1;
+ else {
+ STK_ERROR("Check device return error (0x0201 = %02X) !\n", value);
diff --git a/stk11xx_ioctl.patch b/stk11xx_ioctl.patch
new file mode 100644
index 000000000000..6f91d1c45fc3
--- /dev/null
+++ b/stk11xx_ioctl.patch
@@ -0,0 +1,11 @@
+--- old/stk11xx-v4l.c 2015-09-26 18:38:59.611483232 +0200
++++ stk11xx-v4l.c 2015-09-26 18:51:21.339749268 +0200
+@@ -1559,7 +1559,7 @@ static struct v4l2_file_operations v4l_s
+ .read = v4l_stk11xx_read,
+ .poll = v4l_stk11xx_poll,
+ .mmap = v4l_stk11xx_mmap,
+- .ioctl = v4l_stk11xx_ioctl,
++ .unlocked_ioctl = v4l_stk11xx_ioctl,
+ #if defined(CONFIG_COMPAT) && defined(v4l_compat_ioctl32)
+ .compat_ioctl = v4l_compat_ioctl32,
+ #endif
diff --git a/stk11xx_kernel11.patch b/stk11xx_kernel11.patch
new file mode 100644
index 000000000000..52d30087340c
--- /dev/null
+++ b/stk11xx_kernel11.patch
@@ -0,0 +1,49 @@
+diff -urp ./old/stk11xx.h ./stk11xx.h
+--- ./old/stk11xx.h 2012-03-10 10:03:12.000000000 +0100
++++ ./stk11xx.h 2013-08-05 22:50:00.000000000 +0200
+@@ -33,6 +33,7 @@
+
+ #ifndef STK11XX_H
+ #define STK11XX_H
++#include <media/v4l2-device.h>
+
+ #define DRIVER_NAME "stk11xx" /**< Name of this driver */
+ #define DRIVER_VERSION "v3.0.0" /**< Version of this driver */
+@@ -316,6 +317,7 @@ struct stk11xx_video {
+ * @struct usb_stk11xx
+ */
+ struct usb_stk11xx {
++ struct v4l2_device v4l2_dev;
+ struct video_device *vdev; /**< Pointer on a V4L2 video device */
+ struct usb_device *udev; /**< Pointer on a USB device */
+ struct usb_interface *interface; /**< Pointer on a USB interface */
+diff -urp ./old/stk11xx-v4l.c ./stk11xx-v4l.c
+--- ./old/stk11xx-v4l.c 2012-03-10 09:54:57.000000000 +0100
++++ ./stk11xx-v4l.c 2013-08-05 22:51:12.000000000 +0200
+@@ -1498,9 +1498,17 @@ int v4l_stk11xx_register_video_device(st
+ {
+ int err;
+
++ err = v4l2_device_register(&dev->interface->dev, &dev->v4l2_dev);
++ if (err < 0) {
++ STK_ERROR("couldn't register v4l2_device\n");
++ kfree(dev);
++ return err;
++ }
++
+ strcpy(dev->vdev->name, DRIVER_DESC);
+
+- dev->vdev->parent = &dev->interface->dev;
++// dev->vdev->parent = &dev->interface->dev;
++ dev->vdev->v4l2_dev = &dev->v4l2_dev;
+ dev->vdev->fops = &v4l_stk11xx_fops;
+ dev->vdev->release = video_device_release;
+ dev->vdev->minor = -1;
+@@ -1533,6 +1541,7 @@ int v4l_stk11xx_unregister_video_device(
+
+ video_set_drvdata(dev->vdev, NULL);
+ video_unregister_device(dev->vdev);
++ v4l2_device_unregister(&dev->v4l2_dev);
+
+ return 0;
+ }
diff --git a/stk11xx_sysfs.patch b/stk11xx_sysfs.patch
new file mode 100644
index 000000000000..0a713f0c450c
--- /dev/null
+++ b/stk11xx_sysfs.patch
@@ -0,0 +1,21 @@
+--- stk11xx-driver.pristine/stk11xx-sysfs.c 2015-01-10 15:16:02.840106809 +0100
++++ stk11xx-driver.new/stk11xx-sysfs.c 2015-01-10 15:18:56.556126613 +0100
+@@ -488,12 +488,12 @@
+ static DEVICE_ATTR(videostatus, S_IRUGO, show_videostatus, NULL); /**< Video status */
+ static DEVICE_ATTR(informations, S_IRUGO, show_informations, NULL); /**< Informations */
+ static DEVICE_ATTR(fps, S_IRUGO, show_fps, NULL); /**< FPS value */
+-static DEVICE_ATTR(brightness, S_IRUGO | S_IWUGO, show_brightness, store_brightness); /**< Brightness value */
+-static DEVICE_ATTR(contrast, S_IRUGO | S_IWUGO, show_contrast, store_contrast); /**< Contrast value */
+-static DEVICE_ATTR(whitebalance, S_IRUGO | S_IWUGO, show_whitebalance, store_whitebalance); /**< Whitebalance value */
+-static DEVICE_ATTR(colour, S_IRUGO | S_IWUGO, show_colour, store_colour); /**< Hue value */
+-static DEVICE_ATTR(hflip, S_IRUGO | S_IWUGO, show_hflip, store_hflip); /**< Horizontal filp value */
+-static DEVICE_ATTR(vflip, S_IRUGO | S_IWUGO, show_vflip, store_vflip); /**< Vertical filp value */
++static DEVICE_ATTR(brightness, 0660, show_brightness, store_brightness); /**< Brightness value */
++static DEVICE_ATTR(contrast, 0660, show_contrast, store_contrast); /**< Contrast value */
++static DEVICE_ATTR(whitebalance, 0660, show_whitebalance, store_whitebalance); /**< Whitebalance value */
++static DEVICE_ATTR(colour, 0660, show_colour, store_colour); /**< Hue value */
++static DEVICE_ATTR(hflip, 0660, show_hflip, store_hflip); /**< Horizontal filp value */
++static DEVICE_ATTR(vflip, 0660, show_vflip, store_vflip); /**< Vertical filp value */
+
+
+ /**