mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #4407 from HiassofT/le10-v4l-utils-1.20.0
v4l-utils: update to 1.20.0
This commit is contained in:
commit
0848005fbf
@ -2,8 +2,8 @@
|
||||
# Copyright (C) 2020-present Team LibreELEC (https://libreelec.tv)
|
||||
|
||||
PKG_NAME="ir-bpf-decoders"
|
||||
PKG_VERSION="v4l-utils-1.18.0"
|
||||
PKG_SHA256="7d8777708ba861dcf46e26d5c04dc9f6e6181b4cb6a82cf836d1e015818a76e9"
|
||||
PKG_VERSION="v4l-utils-1.20.0"
|
||||
PKG_SHA256="aaf2b3d0cf3086317a4ee9c2a80af2520b59b303a71238742ee8bc20c4f2bbb6"
|
||||
PKG_LICENSE="GPLv2+"
|
||||
PKG_SITE="https://linuxtv.org/"
|
||||
PKG_URL="https://github.com/LibreELEC/ir-bpf-decoders/archive/$PKG_VERSION.tar.gz"
|
||||
|
@ -5,8 +5,8 @@
|
||||
# with 1.0.0 repeat delay is broken. test on upgrade
|
||||
|
||||
PKG_NAME="v4l-utils"
|
||||
PKG_VERSION="1.18.1"
|
||||
PKG_SHA256="25fc42253722401f8742f04dc50a444dfa9b75378e7d09b55035bcbb44c5f342"
|
||||
PKG_VERSION="1.20.0"
|
||||
PKG_SHA256="956118713f7ccb405c55c7088a6a2490c32d54300dd9a30d8d5008c28d3726f7"
|
||||
PKG_LICENSE="GPL"
|
||||
PKG_SITE="http://linuxtv.org/"
|
||||
PKG_URL="http://linuxtv.org/downloads/v4l-utils/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||
@ -30,6 +30,7 @@ make_target() {
|
||||
make -C utils/keytable CFLAGS="$TARGET_CFLAGS"
|
||||
make -C utils/ir-ctl CFLAGS="$TARGET_CFLAGS"
|
||||
if [ "$CEC_FRAMEWORK_SUPPORT" = "yes" ]; then
|
||||
make -C utils/libcecutil CFLAGS="$TARGET_CFLAGS"
|
||||
make -C utils/cec-ctl CFLAGS="$TARGET_CFLAGS"
|
||||
fi
|
||||
make -C lib CFLAGS="$TARGET_CFLAGS"
|
||||
|
@ -1,4 +1,4 @@
|
||||
From 6aafb490b7c352b04f036ea6f9cbc33be8383ddf Mon Sep 17 00:00:00 2001
|
||||
From ff65aa88a1ff3f02cc10e5a6e2af865b0c97f4fc Mon Sep 17 00:00:00 2001
|
||||
From: Matthias Reichl <hias@horus.com>
|
||||
Date: Sat, 8 Feb 2020 21:42:06 +0100
|
||||
Subject: [PATCH] disable bpf decoder build and drop bpf dependency on clang
|
||||
@ -10,23 +10,23 @@ Signed-off-by: Matthias Reichl <hias@horus.com>
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 6ff26093..1efa7879 100644
|
||||
index 3bb1d2a5..7b633473 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -508,7 +508,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_LIBV4L], [test x${enable_v4l2_ctl_libv4l} != xno])
|
||||
AM_CONDITIONAL([WITH_V4L2_CTL_STREAM_TO], [test x${enable_v4l2_ctl_stream_to} != xno])
|
||||
@@ -549,7 +549,7 @@ AM_CONDITIONAL([WITH_V4L2_CTL_32], [test x${enable_v4l2_ctl_32} = xyes])
|
||||
AM_CONDITIONAL([WITH_V4L2_COMPLIANCE], [test x$ac_cv_func_fork = xyes])
|
||||
AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_LIBV4L], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_libv4l} != xno])
|
||||
AM_CONDITIONAL([WITH_V4L2_COMPLIANCE_32], [test x$ac_cv_func_fork = xyes -a x${enable_v4l2_compliance_32} = xyes])
|
||||
-AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes -a x$CLANG = xclang])
|
||||
+AM_CONDITIONAL([WITH_BPF], [test x$enable_bpf != xno -a x$libelf_pkgconfig = xyes])
|
||||
|
||||
# append -static to libtool compile and link command to enforce static libs
|
||||
AS_IF([test x$enable_libdvbv5 = xno], [AC_SUBST([ENFORCE_LIBDVBV5_STATIC], ["-static"])])
|
||||
diff --git a/utils/keytable/Makefile.am b/utils/keytable/Makefile.am
|
||||
index d7b30e2c..a2c8df8d 100644
|
||||
index 4724897e..1c209fe2 100644
|
||||
--- a/utils/keytable/Makefile.am
|
||||
+++ b/utils/keytable/Makefile.am
|
||||
@@ -15,7 +15,7 @@ ir_keytable_LDFLAGS = $(ARGP_LIBS)
|
||||
@@ -18,7 +18,7 @@ ir_keytable_LDFLAGS = $(ARGP_LIBS)
|
||||
|
||||
if WITH_BPF
|
||||
ir_keytable_LDFLAGS += $(LIBELF_LIBS)
|
||||
@ -34,7 +34,7 @@ index d7b30e2c..a2c8df8d 100644
|
||||
+# SUBDIRS = bpf_protocols
|
||||
endif
|
||||
|
||||
EXTRA_DIST = 70-infrared.rules rc_keymaps rc_keymaps_userspace gen_input_events.pl gen_keytables.pl ir-keytable.1 rc_maps.cfg rc_keymap.5
|
||||
EXTRA_DIST = 70-infrared.rules 50-rc_keymap.conf rc_keymaps rc_keymaps_userspace gen_input_events.pl gen_keytables.pl ir-keytable.1 rc_maps.cfg rc_keymap.5
|
||||
--
|
||||
2.20.1
|
||||
|
||||
|
@ -1,140 +0,0 @@
|
||||
From 6013e359b70236f36d4f395d845ecc766c2230ba Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Mon, 14 Oct 2019 11:46:31 +0100
|
||||
Subject: [PATCH] keytable: do not warn if keymap not found in
|
||||
IR_KEYTABLE_USER_DIR
|
||||
|
||||
The following error is logged even though imon_rsc.toml is found at
|
||||
/lib/udev/rc_keymaps/imon_rsc.toml:
|
||||
|
||||
$ ir-keytable -a /etc/rc_maps.cfg
|
||||
/etc/rc_keymaps/imon_rsc.toml: error: cannot open: No such file or directory
|
||||
|
||||
Signed-off-by: Sean Young <sean@mess.org>
|
||||
---
|
||||
utils/keytable/keytable.c | 81 +++++++++++++++++++++++----------------
|
||||
1 file changed, 48 insertions(+), 33 deletions(-)
|
||||
|
||||
diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c
|
||||
index 6cb0217a..e2a1bfe1 100644
|
||||
--- a/utils/keytable/keytable.c
|
||||
+++ b/utils/keytable/keytable.c
|
||||
@@ -1954,6 +1954,38 @@ int bpf_param(struct protocol_param *protocol_param, const char *name, int *val)
|
||||
return -ENOENT;
|
||||
}
|
||||
|
||||
+char* keymap_to_filename(const char *fname)
|
||||
+{
|
||||
+ struct stat st;
|
||||
+ char *p;
|
||||
+
|
||||
+ if (fname[0] == '/' || ((fname[0] == '.') && strchr(fname, '/')))
|
||||
+ return strdup(fname);
|
||||
+
|
||||
+ if (asprintf(&p, IR_KEYTABLE_USER_DIR "/%s", fname) < 0) {
|
||||
+ fprintf(stderr, _("asprintf failed: %m\n"));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (!stat(p, &st))
|
||||
+ return p;
|
||||
+
|
||||
+ free(p);
|
||||
+ if (asprintf(&p, IR_KEYTABLE_SYSTEM_DIR "/%s", fname) < 0) {
|
||||
+ fprintf(stderr, _("asprintf failed: %m\n"));
|
||||
+ return NULL;
|
||||
+ }
|
||||
+
|
||||
+ if (!stat(p, &st))
|
||||
+ return p;
|
||||
+
|
||||
+ free(p);
|
||||
+
|
||||
+ fprintf(stderr, _("error: Unable to find keymap %s in %s or %s\n"), fname, IR_KEYTABLE_USER_DIR, IR_KEYTABLE_SYSTEM_DIR);
|
||||
+
|
||||
+ return NULL;
|
||||
+}
|
||||
+
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
int dev_from_class = 0, write_cnt;
|
||||
@@ -2003,6 +2035,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
if (cfg.next) {
|
||||
struct cfgfile *cur;
|
||||
+ struct keymap *map;
|
||||
char *fname;
|
||||
int rc;
|
||||
int matches = 0;
|
||||
@@ -2014,53 +2047,35 @@ int main(int argc, char *argv[])
|
||||
continue;
|
||||
|
||||
if (debug)
|
||||
- fprintf(stderr, _("Table for %s, %s is on %s file.\n"),
|
||||
+ fprintf(stderr, _("Keymap for %s, %s is on %s file.\n"),
|
||||
rc_dev.drv_name, rc_dev.keytable_name,
|
||||
cur->fname);
|
||||
|
||||
- if (cur->fname[0] == '/' || ((cur->fname[0] == '.') && strchr(cur->fname, '/'))) {
|
||||
- struct keymap *map;
|
||||
- fname = cur->fname;
|
||||
- rc = parse_keymap(fname, &map, debug);
|
||||
- if (rc < 0) {
|
||||
- fprintf(stderr, _("Can't load %s table\n"), fname);
|
||||
- return -1;
|
||||
- }
|
||||
- add_keymap(map, fname);
|
||||
- free_keymap(map);
|
||||
- } else {
|
||||
- struct keymap *map;
|
||||
- fname = malloc(strlen(cur->fname) + strlen(IR_KEYTABLE_USER_DIR) + 2);
|
||||
- strcpy(fname, IR_KEYTABLE_USER_DIR);
|
||||
- strcat(fname, "/");
|
||||
- strcat(fname, cur->fname);
|
||||
- rc = parse_keymap(fname, &map, debug);
|
||||
- if (rc != 0) {
|
||||
- fname = malloc(strlen(cur->fname) + strlen(IR_KEYTABLE_SYSTEM_DIR) + 2);
|
||||
- strcpy(fname, IR_KEYTABLE_SYSTEM_DIR);
|
||||
- strcat(fname, "/");
|
||||
- strcat(fname, cur->fname);
|
||||
- rc = parse_keymap(fname, &map, debug);
|
||||
- }
|
||||
- if (rc != 0) {
|
||||
- fprintf(stderr, _("Can't load %s table from %s or %s\n"), cur->fname, IR_KEYTABLE_USER_DIR, IR_KEYTABLE_SYSTEM_DIR);
|
||||
- return -1;
|
||||
- }
|
||||
+ fname = keymap_to_filename(cur->fname);
|
||||
+ if (!fname)
|
||||
+ return -1;
|
||||
|
||||
- add_keymap(map, fname);
|
||||
- free_keymap(map);
|
||||
+ rc = parse_keymap(fname, &map, debug);
|
||||
+ if (rc < 0) {
|
||||
+ fprintf(stderr, _("Can't load %s keymap\n"), fname);
|
||||
+ free(fname);
|
||||
+ return -1;
|
||||
}
|
||||
+ add_keymap(map, fname);
|
||||
+ free_keymap(map);
|
||||
if (!keytable) {
|
||||
- fprintf(stderr, _("Empty table %s\n"), fname);
|
||||
+ fprintf(stderr, _("Empty keymap %s\n"), fname);
|
||||
+ free(fname);
|
||||
return -1;
|
||||
}
|
||||
+ free(fname);
|
||||
clear = 1;
|
||||
matches++;
|
||||
}
|
||||
|
||||
if (!matches) {
|
||||
if (debug)
|
||||
- fprintf(stderr, _("Table for %s, %s not found. Keep as-is\n"),
|
||||
+ fprintf(stderr, _("Keymap for %s, %s not found. Keep as-is\n"),
|
||||
rc_dev.drv_name, rc_dev.keytable_name);
|
||||
return 0;
|
||||
}
|
||||
--
|
||||
2.20.1
|
||||
|
@ -1,38 +0,0 @@
|
||||
From 2e1c2d2b2d69596aea953e241edb3d82764db718 Mon Sep 17 00:00:00 2001
|
||||
From: Sean Young <sean@mess.org>
|
||||
Date: Tue, 31 Dec 2019 18:24:05 +0000
|
||||
Subject: [PATCH] lircd2toml: warn when scancode has duplicate definitions
|
||||
|
||||
In lircd.conf files, it is possible that the same scancode has multiple
|
||||
key definitions. In our rc keymap toml format, one scancode can only
|
||||
have one key definition.
|
||||
|
||||
Possibly we should allow alternate names for scancode for transmitting;
|
||||
however, as a first step, we should warn if there are multiple
|
||||
definitions for the same scancode.
|
||||
|
||||
Signed-off-by: Sean Young <sean@mess.org>
|
||||
---
|
||||
contrib/lircd2toml.py | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/contrib/lircd2toml.py b/contrib/lircd2toml.py
|
||||
index 54ea12fc..ba4b14ec 100755
|
||||
--- a/contrib/lircd2toml.py
|
||||
+++ b/contrib/lircd2toml.py
|
||||
@@ -131,7 +131,11 @@ class LircdParser:
|
||||
for s in a:
|
||||
if s[0] == '#':
|
||||
break
|
||||
- codes[int(s, 0)] = k
|
||||
+ scancode = int(s, 0)
|
||||
+ if scancode in codes:
|
||||
+ self.warning("scancode 0x{:x} has duplicate definition {} and {}".format(scancode, codes[scancode], k))
|
||||
+
|
||||
+ codes[scancode] = k
|
||||
|
||||
def read_raw_codes(self):
|
||||
raw_codes = []
|
||||
--
|
||||
2.20.1
|
||||
|
Loading…
x
Reference in New Issue
Block a user