diff options
| -rw-r--r-- | meta/recipes-support/hal/files/probe-video4linux.c.patch | 60 | ||||
| -rw-r--r-- | meta/recipes-support/hal/hal_0.5.14.bb | 4 |
2 files changed, 63 insertions, 1 deletions
diff --git a/meta/recipes-support/hal/files/probe-video4linux.c.patch b/meta/recipes-support/hal/files/probe-video4linux.c.patch new file mode 100644 index 0000000000..0f8140be85 --- /dev/null +++ b/meta/recipes-support/hal/files/probe-video4linux.c.patch | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | Upstream-Status: Backport | ||
| 2 | |||
| 3 | From ae13d96fa2a0612b6000f4b8f6ed9d3564035703 Mon Sep 17 00:00:00 2001 | ||
| 4 | From: Michael Biebl <biebl@debian.org> | ||
| 5 | Date: Sun, 10 Apr 2011 12:54:53 +0000 | ||
| 6 | Subject: Build hald-probe-video4linux on current kernels again | ||
| 7 | |||
| 8 | The hald-probe-video4linux prober supports both v4l1 and v4l2. Support for v4l1 | ||
| 9 | has been removed from Linux kernel 2.6.38. Instead of disabling the prober | ||
| 10 | altogether, #ifdef the v4l1 parts when building on a newer kernel. | ||
| 11 | |||
| 12 | Signed-off-by: Martin Pitt <martin.pitt@ubuntu.com> | ||
| 13 | --- | ||
| 14 | (limited to 'hald/linux/probing/probe-video4linux.c') | ||
| 15 | |||
| 16 | diff --git a/hald/linux/probing/probe-video4linux.c b/hald/linux/probing/probe-video4linux.c | ||
| 17 | index 7bc13e8..b055720 100644 | ||
| 18 | --- a/hald/linux/probing/probe-video4linux.c | ||
| 19 | +++ b/hald/linux/probing/probe-video4linux.c | ||
| 20 | @@ -30,7 +30,9 @@ | ||
| 21 | #include <sys/types.h> | ||
| 22 | #include <sys/time.h> | ||
| 23 | #include <sys/ioctl.h> | ||
| 24 | +#ifdef HAVE_LINUX_VIDEODEV_H | ||
| 25 | #include <linux/videodev.h> | ||
| 26 | +#endif | ||
| 27 | #include <linux/videodev2.h> | ||
| 28 | #include <errno.h> | ||
| 29 | #include <fcntl.h> | ||
| 30 | @@ -50,7 +52,9 @@ main (int argc, char *argv[]) | ||
| 31 | int ret = -1; | ||
| 32 | char *udi; | ||
| 33 | char *device_file; | ||
| 34 | +#ifdef HAVE_LINUX_VIDEODEV_H | ||
| 35 | struct video_capability v1cap; | ||
| 36 | +#endif | ||
| 37 | struct v4l2_capability v2cap; | ||
| 38 | LibHalContext *ctx = NULL; | ||
| 39 | LibHalChangeSet *cset; | ||
| 40 | @@ -107,7 +111,9 @@ main (int argc, char *argv[]) | ||
| 41 | LIBHAL_FREE_DBUS_ERROR (&error); | ||
| 42 | libhal_device_add_capability (ctx, udi, "video4linux.radio", &error); | ||
| 43 | } | ||
| 44 | - } else { | ||
| 45 | + } | ||
| 46 | +#ifdef HAVE_LINUX_VIDEODEV_H | ||
| 47 | + else { | ||
| 48 | HAL_DEBUG (("ioctl VIDIOC_QUERYCAP failed")); | ||
| 49 | |||
| 50 | if (ioctl (fd, VIDIOCGCAP, &v1cap) == 0) { | ||
| 51 | @@ -134,6 +140,7 @@ main (int argc, char *argv[]) | ||
| 52 | HAL_DEBUG (("ioctl VIDIOCGCAP failed")); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | +#endif | ||
| 56 | |||
| 57 | LIBHAL_FREE_DBUS_ERROR (&error); | ||
| 58 | libhal_device_commit_changeset (ctx, cset, &error); | ||
| 59 | -- | ||
| 60 | cgit v0.9.0.2-2-gbebe | ||
diff --git a/meta/recipes-support/hal/hal_0.5.14.bb b/meta/recipes-support/hal/hal_0.5.14.bb index aa67ae6232..858e68519f 100644 --- a/meta/recipes-support/hal/hal_0.5.14.bb +++ b/meta/recipes-support/hal/hal_0.5.14.bb | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | require hal.inc | 1 | require hal.inc |
| 2 | 2 | ||
| 3 | PR = "r4" | 3 | PR = "r5" |
| 4 | 4 | ||
| 5 | EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h" | 5 | EXTRA_OECONF += "--with-linux-input-header=${STAGING_INCDIR}/linux/input.h" |
| 6 | EXTRA_OEMAKE += "-e 'udevrulesdir=$(sysconfdir)/udev/rules.d'" | 6 | EXTRA_OEMAKE += "-e 'udevrulesdir=$(sysconfdir)/udev/rules.d'" |
| @@ -15,3 +15,5 @@ FILES_${PN} =+ "${bindir}/hal-disable-polling \ | |||
| 15 | 15 | ||
| 16 | SRC_URI[md5sum] = "e9163df591a6f38f59fdbfe33e73bf20" | 16 | SRC_URI[md5sum] = "e9163df591a6f38f59fdbfe33e73bf20" |
| 17 | SRC_URI[sha256sum] = "323aacfa52f12def3b0d1e76456e34f027c345adc344aad19a8cc0c59c1a8d02" | 17 | SRC_URI[sha256sum] = "323aacfa52f12def3b0d1e76456e34f027c345adc344aad19a8cc0c59c1a8d02" |
| 18 | |||
| 19 | SRC_URI += "file://probe-video4linux.c.patch" | ||
