Accepting request 439256 from vdr

Final fix

OBS-URL: https://build.opensuse.org/request/show/439256
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/lirc?expand=0&rev=65
This commit is contained in:
Dominique Leuenberger 2016-11-09 10:37:30 +00:00 committed by Git OBS Bridge
commit b75fd2854f
12 changed files with 267 additions and 292 deletions

View File

@ -1,26 +0,0 @@
From 8459a881fd53525a47ae2f9180fa3644be5df343 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas@nowhere.net>
Date: Mon, 18 Aug 2014 10:00:49 +0200
Subject: [PATCH 1/3] Fix segfault when starting lircd (AUR 41581)
See https://bugs.archlinux.org/task/41581
---
lirc_options.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lirc_options.conf b/lirc_options.conf
index d8ddedd..11293e2 100644
--- a/lirc_options.conf
+++ b/lirc_options.conf
@@ -10,7 +10,7 @@
nodaemon = False
driver = devinput
device = auto
-output = /var/run/lirc/lircd
+lircdfile = /var/run/lirc/lircd
pidfile = /var/run/lirc/lircd.pid
plugindir = /usr/lib/lirc/plugins
permission = 666
--
1.8.4.2

View File

@ -1,25 +0,0 @@
From 4a9b45822890f50c5ed36660468e0a99cd4531e0 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas@nowhere.net>
Date: Mon, 18 Aug 2014 10:05:44 +0200
Subject: [PATCH 2/3] lircd: Fix bad default for lircdfile.
---
daemons/lircd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index db8ea13..fa8cf17 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -2179,7 +2179,7 @@
"lircd:device", NULL,
"lircd:listen", NULL,
"lircd:connect", NULL,
- "lircd:output", LIRCD,
+ "lircd:lircdfile", LIRCD,
"lircd:pidfile", PIDFILE,
"lircd:logfile", "syslog",
"lircd:debug", level,
--
1.8.4.2

View File

@ -1,11 +0,0 @@
#
# This is a hack since /sys info for event devices is incomplete
#
# Check if the name of the event device contains the string IR and
# create the /dev/input/ir symlink.
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="*IR*", SYMLINK+="input/ir"
# If your remote does not have 'IR' in it's name add a line like the
# following (this one is for the Cinergy T2). You can look up the
# name of the device in /proc/bus/input/devices
KERNEL=="event*", SUBSYSTEM=="input", ATTRS{name}=="TerraTec/qanu USB2.0 Highspeed DVB-T Receiver remote control", SYMLINK+="input/ir"

View File

@ -1,50 +0,0 @@
Quickstart guide for self made serial receivers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Please read /usr/share/doc/packages/lirc/html/install.html for
details.
Suppose you have a self made serial receiver as described in
http://www.lirc.org/receivers.html connected to the first serial
port serial port:
Ensure that the following values are set in /etc/sysconfig/lirc:
LIRCD_DEVICE="/dev/lirc"
LIRCD_DRIVER="default"
LIRC_MODULE="lirc_serial"
Run the following command and add it at the end of
/etc/init.d/boot.local:
setserial /dev/ttyS0 uart none
Load the kernel module for the serial receiver:
modprobe lirc_serial
Run irrecord to assign names to keys on your remote. Move the
resulting config file to /etc/lircd.conf. Start lircd:
rclirc start
If everything works (check with 'irw'), add lirc to the boot
process:
chkconfig lirc on
Quickstart guide for remotes that show up as event devices
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The remotes of most DVB devices show up as event devices in
/dev/input/. If you have one of those
- check whether udev already created /dev/input/ir for you when you
plugged in the device. Edit /etc/udev/rules.d/51-lirc.rules if it
didn't. Unplug the device and plug it in again to make
/dev/input/ir appear.
- cp /usr/share/lirc/remotes/devinput/lircd.conf.devinput /etc/lircd.conf
- rclirc start; chkconfig lirc on

View File

@ -1,128 +0,0 @@
#!/usr/bin/perl -w
#
# This is a perl script to unify the key names in lircd config files.
#
# Going to use the KEY_* #defines (without KEY_ prefix)
# from #include <linux/input.h> for the key names.
#
# (c) 2003 Gerd Knorr <kraxel@suse.de>
#
use strict;
use POSIX;
use File::Find;
#############################################################################
# translation table
my %table = (
# volume keys
'vol(ume)?[-_]?(\+|up|plus)' => 'VOLUMEUP',
'vol(ume)?[-_]?(\-|down|dn|minus)' => 'VOLUMEDOWN',
# switch channels
'ch(annel|n|an)?[-_]?(\+|up|plus)' => 'CHANNELUP',
'ch(annel|n|an)?[-_]?(\-|down|dn|minus)' => 'CHANNELDOWN',
# dummy
'dummy' => 'dummy'
);
my %keys;
#############################################################################
# helpers
sub readfile {
my $filename = shift;
my $content;
open FILE, "< $filename" or die "open $filename: $!";
{ local $/; undef $/; $content = <FILE>; };
close FILE;
return $content;
}
sub writefile {
my $filename = shift;
my $content = shift;
open FILE, "> $filename" or die "open $filename: $!";
print FILE $content;
close FILE;
}
sub fix_key {
my $name = shift;
$name =~ s/´//g;
for my $regex (keys %table) {
$name =~ s/^$regex$/$table{$regex}/i;
}
$name = POSIX::toupper($name);
$keys{$name}++;
$name = "'$name'";
return $name;
}
sub replacer {
my $old = shift;
my $new = "";
my $codes = 0;
my $raw_codes = 0;
my ($orig,$name,$code);
foreach my $line (split /\n/,$old) {
if ($line =~ m/begin\s+codes/) {
$codes = 1;
} elsif ($line =~ m/end\s+codes/) {
$codes = 0;
} elsif ($line =~ m/begin\s+raw_codes/) {
$raw_codes = 1;
} elsif ($line =~ m/end\s+raw_codes/) {
$raw_codes = 0;
} elsif ($codes == 1 && $line =~ m/^\s*(\S+)\s+(\S+)\s*$/) {
$orig = $1;
$code = $2;
$name = fix_key($orig);
$line = sprintf("\t%-20s %-20s # %s",
$name,$code,$orig);
} elsif ($raw_codes == 1 && $line =~ m/^\s*name\s+(\S+)\s*$/) {
$orig = $1;
$name = fix_key($orig);
$line = sprintf("\tname %-20s # %s",
$name,$orig);
}
$new .= $line . "\n";
}
return $new;
}
sub wanted {
my $content;
return unless -f $_; # regular files
print "fixup $File::Find::name\n";
$content = readfile($_);
if ($content =~ m/begin\s+remote/s) {
# is a lircd config file
$content = replacer($content);
writefile($_,$content);
}
}
#############################################################################
# main
# handle files
my $dir = shift;
find(\&wanted, $dir);
# print key stats (for building %table ...).
exit;
foreach my $key (sort { $keys{$a} <=> $keys{$b} } keys %keys) {
printf("%3d %s\n",$keys{$key},$key);
}

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:386086a74c7d12e7e8f26f7dbc8f40d20b9968c9ad2a42599483a51dd2da03ba
size 2292119

3
lirc-0.9.4c.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:8974fe5dc8eaa717daab6785d2aefeec27615f01ec24b96d31e3381b2f70726a
size 2311300

View File

@ -0,0 +1,23 @@
--- a/configure.ac
+++ b/configure.ac
@@ -48,7 +48,7 @@
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_TIME
-AC_CHECK_HEADERS([fcntl.h limits.h poll.h sys/ioctl.h sys/poll.h sys/time.h ])
+AC_CHECK_HEADERS([fcntl.h libudev.h limits.h poll.h sys/ioctl.h sys/poll.h sys/time.h ])
AC_CHECK_HEADERS([syslog.h unistd.h util.h libutil.h pty.h])
dnl Checks for typedefs, structures, and compiler characteristics.
@@ -390,6 +390,10 @@
AC_DEFINE(HAVE_SYSTEMD)
fi
+PKG_CHECK_MODULES([LIBUDEV],[libudev],,[true])
+CFLAGS="$CFLAGS $LIBUDEV_CFLAGS"
+LIBS="$LIBS $LIBUDEV_LIBS"
+
dnl Ubuntu's systemd pkg-config seems broken beyond repair. So:
kernelversion=`cat /proc/version || echo "non-linux"`
case $kernelversion in

View File

@ -0,0 +1,35 @@
From 33c40d127877179e0cba2f6595816377bb6bcda1 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Tue, 25 Oct 2016 10:28:14 +0200
Subject: [PATCH 05/10] lib: curl_poll.h: Ensure build on unconfiguredclients.
---
lib/curl_poll.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/lib/curl_poll.h b/lib/curl_poll.h
index 6144c42..af25381 100644
--- a/lib/curl_poll.h
+++ b/lib/curl_poll.h
@@ -21,7 +21,9 @@
* KIND, either express or implied.
*
***************************************************************************/
+#ifdef HAVE_CONFIG_H
#include "config.h"
+#endif
#ifdef __cplusplus
extern "C" {
@@ -29,7 +31,7 @@ extern "C" {
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
-#elif defined(HAVE_POLL_H)
+#else
#include <poll.h>
#endif
--
2.5.5

View File

@ -1,3 +1,60 @@
-------------------------------------------------------------------
Tue Nov 8 16:05:41 UTC 2016 - p.drouand@gmail.com
- Move workarounds to %prep section
- Add lirc-configure-libudev.patch (boo#1008764)
-------------------------------------------------------------------
Thu Nov 3 10:30:47 UTC 2016 - p.drouand@gmail.com
- Fix %pre script
-------------------------------------------------------------------
Wed Nov 2 13:46:41 UTC 2016 - p.drouand@gmail.com
- Add lirc-lib-curl_poll.h-Ensure-build-on-unconfiguredclients.patch
-------------------------------------------------------------------
Fri Oct 21 18:14:41 UTC 2016 - p.drouand@gmail.com
- Update to version 0.9.4c
* New curl_poll files adds a new MIT license. Lirc now carries GPL,
BSD and MIT licenses.
* Several patches to make lirc work again on macos (#226, #227).
* New tool irtext2udp generates udp plugin data (#197).
* plugins: girs: Add udp/receive support (#201).
* mode2: Fix broken --raw option (#223).
* lirc-make-devinput: Fix that two remotes has the same name (#222).
* lircd: Warn for duplicate remote definitions (#222).
* lircd: Retry temporary unavailable write sockets (#221).
* contrib: Fix usb devices' acl permissions (rhbz #1364744).
* lirc-setup: Fix crasher bugfix (Fedora abort trace).
* contrib: disable udev /dev/uinput rule requiring lirc user.
* plugins: audio_alsa: Fix byte truncating in 16-bit data (#218):
* plugins: irtoy: improve error handling (#220).
* Minor documentation fixes.
- Changes from version 0.9.4b
* lircd-uinput: A multitude of fixes (#213, #211, #177). Adds new options.
* lirc_client: Fix "Can't redirect irsend output" (#207).
* lirc_client: Fix un-terminated buffer causing irsend crash (#216).
* irrecord: Fix under-sized buffer causing crash (#208).
* systemd: Add hardening options comments to services (#204).
* lircmd: Options, udev examples and manpage update.
* lib: Add missing Makefile.am dep, fixes parallel build failure (#210).
* Remove a single python2 dependency [4e3c97c].
* build: Don't define docdir - autoconf defines docdir (#215).
* build: support runstatedir configure option (#212).
* doc: Manpages and configuration guide fixes.
- Remove fix-remote-keys.pl, README.SUSE and 51-lirc.rules; not relevant
for a while already
- Remove 0001-Fix-segfault-when-starting-lircd-AUR-41581.patch and
0002-lircd-Fix-bad-default-for-lircdfile.patch; fixed on upstream
- Add missing dependency to systemd
- Global sweeping
- Add lirc nologgin user; now needed
- Add lircd-Remove-use-of-functions-killed-in-kernel-4.8.0.patch;
fix build on openSUSE > 42.2
-------------------------------------------------------------------
Wed Jun 29 14:24:22 UTC 2016 - mpluskal@suse.com

View File

@ -22,7 +22,7 @@
%endif
Name: lirc
#
Version: 0.9.4a
Version: 0.9.4c
Release: 0
Summary: Tools for Infrared Receivers
License: GPL-2.0+
@ -30,13 +30,11 @@ Group: Hardware/Other
Url: http://www.lirc.org/
Source0: http://downloads.sourceforge.net/project/lirc/LIRC/%{version}/lirc-%{version}.tar.bz2
Source1: baselibs.conf
Source6: fix-remote-keys.pl
Source8: README.SUSE
Source9: 51-lirc.rules
# PATCH-FEATURE-UPSTREAM 0001-lirc-Fix-segfault-when-starting-lircd-AUR-41581.patch --lircd fails to start ending in a segfault
Patch0: 0001-Fix-segfault-when-starting-lircd-AUR-41581.patch
# PATCH-FEATURE-UPSTREAM 0002-lircd-Fix-bad-default-for-lircdfile.patch -- Fix bad default for lircdfile
Patch1: 0002-lircd-Fix-bad-default-for-lircdfile.patch
Patch0: lircd-Remove-use-of-functions-killed-in-kernel-4.8.0.patch
Patch1: lirc-lib-curl_poll.h-Ensure-build-on-unconfiguredclients.patch
Patch2: lirc-configure-libudev.patch
BuildRequires: autoconf
BuildRequires: autogen
BuildRequires: doxygen
BuildRequires: fdupes
BuildRequires: gcc-c++
@ -53,6 +51,7 @@ BuildRequires: pkgconfig(libudev)
%endif
BuildRequires: python3
BuildRequires: python3-PyYAML
BuildRequires: zypper
BuildRequires: pkgconfig(libusb)
BuildRequires: pkgconfig(portaudio-2.0)
BuildRequires: pkgconfig(sm)
@ -83,6 +82,8 @@ License: GPL-2.0+
Group: Hardware/Other
Provides: %{name} = %{version}
Obsoletes: %{name} < %{version}
Requires(pre): shadow
%{?systemd_requires}
%description core
The LIRC core contains the lircd daemons, the devinput and
@ -111,8 +112,6 @@ Requires: libirrecord0 = %{version}
Requires: liblirc0 = %{version}
Requires: liblirc_client0 = %{version}
Requires: liblirc_driver0 = %{version}
# files were in lirc package previously
Conflicts: lirc <= 0.8.4
%description devel
LIRC is a package that supports receiving and sending IR signals with
@ -125,8 +124,6 @@ control your computer with a remote control.
Summary: LIRC client library
License: GPL-2.0+
Group: Hardware/Other
# files were in lirc package previously
Conflicts: lirc <= 0.8.4
%description -n liblirc_client0
The LIRC client library. To actually use LIRC the lircd daemon from
@ -200,35 +197,31 @@ Requires: xorg-x11-fonts-core
%description tools-gui
Some seldom used X11-based tools for debugging lirc configurations.
%prep
%setup -q
# Don't provide or require anything from _docdir, per policy.
%global __provides_exclude_from ^%{_docdir}/.*$
%global __requires_exclude_from ^%{_docdir}/.*$
%prep
%setup -q
sed -i -e 's|/usr/local/etc/|/etc/|' contrib/irman2lirc
sed -i -e 's/#effective-user/effective-user /' lirc_options.conf
sed -i -e '/^effective-user/s/=$/= lirc/' lirc_options.conf
if zypper vcmp $(rpm -qf "%%{version}" linux-glibc-devel) 4.8~ | grep
"is newer"; then
%patch0 -p1
fi
%patch1 -p1
cp %{SOURCE8} .
%if %{defined _rundir}
# Fix rundir for openSUSE > 13.1
sed -i 's|${localstatedir}/run|run|g' configure
%else
# But fix systemd unit files for openSUSE <= 13.1
sed -i 's|run|%{_localstatedir}/run|g' systemd/lircd.socket
%endif
%patch2 -p1
%build
# we are using python3
sed "s|python|python3|g" -i ./tools/make_rel_symlink.py
%configure \
--enable-ipv6
# make %%{?_smp_mflags}
# parallel makes are currently busted, do single-threaded for now
make
perl %{SOURCE6} configs
# Run autogen; required by lirc-configure-libudev.patch, as it touches configure script
NOCONFIGURE=1 ./autogen.sh
%configure
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
chmod a+x %{buildroot}%{_bindir}/pronto2lirc
# Create backward compatibility symlink
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}d
ln -s %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name}md
@ -238,7 +231,8 @@ echo "d %{_localstatedir}/run/lirc 0755 root root 10d" \
#
# udev stuff
install -d -m 755 %{buildroot}/%{_udevdir}/rules.d
install -m 644 %{SOURCE9} %{buildroot}/%{_udevdir}/rules.d
install -Dpm 644 contrib/60-lirc.rules \
%{buildroot}%{_udevrulesdir}/60-lirc.rules
#
install -Dpm 644 contrib/99-remote-control-lirc.rules \
%{buildroot}%{_udevrulesdir}/99-remote-control-lirc.rules
@ -249,7 +243,7 @@ find %{buildroot}%{_libdir} -type f -name "*.la" -print -delete
# Don't install documentation in a non standard directory
rm -rf %{buildroot}%{_datadir}/doc
# hide python dependency
chmod 644 %{buildroot}%{_bindir}/pronto2lirc
chmod a+x %{buildroot}%{_bindir}/pronto2lirc
mkdir -p %{buildroot}%{_rundir}
# Remove old %{_rundir}; depreciated but still installed by lirc, which is not looking for it
rm -rf %{buildroot}%{_localstatedir}
@ -258,6 +252,7 @@ rm -rf %{buildroot}%{_datadir}/lirc/contrib
#
rm -rf %{buildroot}%{_datadir}/lirc/plugindocs
#
rm -rf contrib/.release-process.txt.swp
%fdupes -s %{buildroot}
%fdupes -s .
@ -272,37 +267,32 @@ rm -rf %{buildroot}%{_datadir}/lirc/plugindocs
%postun -n libirrecord0 -p /sbin/ldconfig
%pre core
%service_add_pre lircd.service lircmd.service lircd.socket irexec.service
getent group lirc >/dev/null || groupadd -r lirc
getent passwd lirc >/dev/null || \
useradd -r -g lirc -d /var/log/lirc -s /sbin/nologin \
-c "LIRC daemon user, runs lircd." lirc
usermod -a -G dialout lirc &> /dev/null || :
usermod -a -G lock lirc &> /dev/null || :
usermod -a -G input lirc &> /dev/null || :
%service_add_pre lircd.service lircmd.service lircd-uinput.service lircd.socket irexec.service
%post core
%service_add_post lircd.service lircmd.service lircd.socket irexec.service
%service_add_post lircd.service lircmd.service lircd-uinput.service lircd.socket irexec.service
%if 0%{?suse_version} <= 1320
systemd-tmpfiles --create %{_tmpfilesdir}/%{name}.conf >/dev/null 2>&1 || :
%else
%tmpfiles_create %{_tmpfilesdir}/%{name}.conf
%endif
# config files moved to /etc/lirc in 0.8.6
for file in lircd.conf lircmd.conf lircrc; do
if [ -e %{_sysconfdir}/$file -a ! -L %{_sysconfdir}/$file ]; then
if [ ! -e %{_sysconfdir}/lirc/$file ]; then
mv %{_sysconfdir}/$file %{_sysconfdir}/lirc/$file || true
ln -s lirc/$file %{_sysconfdir}/$file || true
else
echo "Warning: lirc ignores %{_sysconfdir}/$file, use %{_sysconfdir}/lirc/$file instead" >&2
fi
fi
done
%preun core
%service_del_preun lircd.service lircmd.service lircd.socket irexec.service
%service_del_preun lircd.service lircmd.service lircd-uinput.service lircd.socket irexec.service
%postun core
%service_del_postun lircd.service lircmd.service lircd.socket irexec.service
%service_del_postun lircd.service lircmd.service lircd-uinput.service lircd.socket irexec.service
%files core
%defattr (-,root,root)
%doc AUTHORS COPYING ChangeLog NEWS README
%doc README.SUSE
%doc doc/html doc/lirc.hwdb doc/irxevent.keys
%doc contrib
%dir %{_datadir}/%{name}
@ -317,7 +307,7 @@ done
%{_bindir}/*
%{_datadir}/%{name}/lirc.hwdb
%{_sbindir}/*
%{_udevdir}/rules.d/51-%{name}.rules
%{_udevdir}/rules.d/60-%{name}.rules
%{_libdir}/%{name}/plugins
%exclude %{_libdir}/%{name}/plugins/ftdi.so
%exclude %{_libdir}/%{name}/plugins/audio.so

View File

@ -0,0 +1,110 @@
From 6a57d48e1a233dfc55d436e8d064509cb03973d1 Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Fri, 19 Aug 2016 04:48:02 +0200
Subject: [PATCH 7/7] lircd: Remove use of functions killed in kernel 4.8.0
From 4.8.0 the kernel no longer supports LIRC_NOTIFY_DECODE,
LIRC_SETUP_START/LIRC_SETUP_END and several constants related
to initiating filters. Remove corresponding calls from lircd.
---
daemons/lircd.cpp | 51 ++-------------------------------------------------
lib/driver.h | 7 +++++++
2 files changed, 9 insertions(+), 49 deletions(-)
diff --git a/daemons/lircd.cpp b/daemons/lircd.cpp
index a7dbc94..a50d11f 100644
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -464,50 +464,6 @@ static int setup_timeout(void)
}
-static int setup_filter(void)
-{
- int ret1, ret2;
- lirc_t min_pulse_supported = 0, max_pulse_supported = 0;
- lirc_t min_space_supported = 0, max_space_supported = 0;
-
- if (!(curr_driver->features & LIRC_CAN_SET_REC_FILTER))
- return 1;
- if (curr_driver->drvctl_func(LIRC_GET_MIN_FILTER_PULSE,
- &min_pulse_supported) == -1 ||
- curr_driver->drvctl_func(LIRC_GET_MAX_FILTER_PULSE, &max_pulse_supported) == -1
- || curr_driver->drvctl_func(LIRC_GET_MIN_FILTER_SPACE, &min_space_supported) == -1
- || curr_driver->drvctl_func(LIRC_GET_MAX_FILTER_SPACE, &max_space_supported) == -1) {
- log_error("could not get filter range");
- log_perror_err(__func__);
- }
-
- if (setup_min_pulse > max_pulse_supported)
- setup_min_pulse = max_pulse_supported;
- else if (setup_min_pulse < min_pulse_supported)
- setup_min_pulse = 0; /* disable filtering */
-
- if (setup_min_space > max_space_supported)
- setup_min_space = max_space_supported;
- else if (setup_min_space < min_space_supported)
- setup_min_space = 0; /* disable filtering */
-
- ret1 = curr_driver->drvctl_func(LIRC_SET_REC_FILTER_PULSE, &setup_min_pulse);
- ret2 = curr_driver->drvctl_func(LIRC_SET_REC_FILTER_SPACE, &setup_min_space);
- if (ret1 == -1 || ret2 == -1) {
- if (curr_driver->
- drvctl_func(LIRC_SET_REC_FILTER,
- setup_min_pulse < setup_min_space ? &setup_min_pulse : &setup_min_space) == -1) {
- log_error("could not set filter");
- log_perror_err(__func__);
- return 0;
- }
- }
- return 1;
-}
-
-
-
-
static int setup_hardware(void)
{
int ret = 1;
@@ -516,10 +472,7 @@ static int setup_hardware(void)
if ((curr_driver->features & LIRC_CAN_SET_REC_CARRIER)
|| (curr_driver->features & LIRC_CAN_SET_REC_TIMEOUT)
|| (curr_driver->features & LIRC_CAN_SET_REC_FILTER)) {
- (void)curr_driver->drvctl_func(LIRC_SETUP_START, NULL);
- ret = setup_frequency() && setup_timeout()
- && setup_filter();
- (void)curr_driver->drvctl_func(LIRC_SETUP_END, NULL);
+ ret = setup_frequency() && setup_timeout();
}
}
return ret;
@@ -2162,7 +2115,7 @@ void loop(void)
int reps;
if (curr_driver->drvctl_func && (curr_driver->features & LIRC_CAN_NOTIFY_DECODE))
- curr_driver->drvctl_func(LIRC_NOTIFY_DECODE, NULL);
+ curr_driver->drvctl_func(DRVCTL_NOTIFY_DECODE, NULL);
get_release_data(&remote_name, &button_name, &reps);
diff --git a/lib/driver.h b/lib/driver.h
index c7c4a6a..fc7318e 100644
--- a/lib/driver.h
+++ b/lib/driver.h
@@ -97,6 +97,13 @@ int drv_handle_options(const char* options);
/** drvctl cmd: Free memory in argument obtained using DRVCTL_GET_DEVICES. */
#define DRVCTL_FREE_DEVICES 6
+/**
+ * The former LIRC_NOTIFY_DECODE, informs drier that signal is successfully
+ * decoded e. g., to initiate some visual feedback through a LED.
+ */
+
+#define DRVCTL_NOTIFY_DECODE 7
+
/** Last well-known command. Remaining is used in driver-specific controls.*/
#define DRVCTL_MAX 128
--
2.5.5