lirc: move out of remote

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue
2014-08-14 06:32:52 +02:00
parent 67ef70493b
commit 3cc381c2da
18 changed files with 0 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,139 @@
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.1-git(default) on Sat Jan 26 21:54:39 2013
#
# contributed by
#
# brand: xbox.conf
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name xbox.conf
bits 8
eps 30
aeps 100
one 0 0
zero 0 0
gap 63950
min_repeat 4
# suppress_repeat 4
# uncomment to suppress unwanted repeats
# toggle_bit_mask 0x72
toggle_bit_mask 0xE1
begin codes
KEY_OK 0x0B
KEY_OK 0xEA
KEY_STOP 0xE0
KEY_PAUSE 0xE6
KEY_NEXT 0xDF
KEY_PREVIOUS 0xDD
KEY_FASTFORWARD 0xE3
KEY_REWIND 0xE2
KEY_MEDIA 0xD5
KEY_EPG 0xE5
KEY_INFO 0xC3
KEY_UP 0xA6
KEY_DOWN 0xA7
KEY_LEFT 0xA9
KEY_RIGHT 0xA8
KEY_MENU 0xF7
KEY_EXIT 0xD8
KEY_0 0xCF
KEY_1 0xCE
KEY_2 0xCD
KEY_3 0xCC
KEY_4 0xCB
KEY_5 0xCA
KEY_6 0xC9
KEY_7 0xC8
KEY_8 0xC7
KEY_9 0xC6
end codes
end remote
# Please make this file available to others
# by sending it to <lirc@bartelmus.de>
#
# this config file was automatically generated
# using lirc-0.9.0-pre1(default) on Sat Feb 23 12:47:57 2013
#
# contributed by DynaMight
#
# brand: Xbox 360 remote (White) /home/pi/lircd.conf
# model no. of remote control:
# devices being controlled by this remote:
#
begin remote
name Xbox 360 Remote
bits 13
flags RC6|CONST_LENGTH
eps 30
aeps 100
header 2685 886
one 457 433
zero 457 433
pre_data_bits 24
pre_data 0x1BFF80
gap 107197
toggle_bit_mask 0x8000
rc6_mask 0x100000000
begin codes
KEY_STOP 0x0BE6
KEY_PLAY 0x0BE9
KEY_VOLUMEDOWN 0x0BEE
KEY_VOLUMEUP 0x0BEF
KEY_MUTE 0x0BF1
KEY_0 0x0BFF
KEY_1 0x0BFE
KEY_2 0x0BFD
KEY_3 0x0BFC
KEY_4 0x0BFB
KEY_5 0x0BFA
KEY_6 0x0BF9
KEY_7 0x0BF8
KEY_8 0x0BF7
KEY_9 0x0BF6
KEY_MENU 0x0BDB
KEY_YELLOW 0x0BD9
KEY_BLUE 0x0B97
KEY_GREEN 0x0B99
KEY_RED 0x0BDA
KEY_REWIND 0x0BEA
KEY_PLAYPAUSE 0x0BE9
KEY_FASTFORWARD 0x0BEB
KEY_BACK 0x0BDC
KEY_TITLE 0x0BAE
KEY_STOP 0x0BE6
KEY_INFO 0x0BF0
KEY_UP 0x0BE1
KEY_DOWN 0x0BE0
KEY_LEFT 0x0BDF
KEY_RIGHT 0x0BDE
KEY_OK 0x0BDD
KEY_POWER 0x0BF3
KEY_PAGEUP 0x0B93
KEY_PAGEDOWN 0x0B92
KEY_ENTER 0x0BF4
KEY_RECORD 0x0BE8
KEY_CLEAR 0x0BF5
KEY_NEXTSONG 0x0BE5
KEY_PREVIOUSSONG 0x0BE4
KEY_DISPLAYTOGGLE 0x0BB0
KEY_PAUSE 0x037FF00BE7
end codes
end remote

View File

@@ -0,0 +1,66 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
PKG_NAME="lirc"
PKG_VERSION="0.9.0"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.lirc.org"
PKG_URL="$SOURCEFORGE_SRC/lirc/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS_TARGET="toolchain libftdi libusb-compat"
PKG_PRIORITY="optional"
PKG_SECTION="sysutils/remote"
PKG_SHORTDESC="lirc: Linux Infrared Remote Control"
PKG_LONGDESC="LIRC is a package that allows you to decode and send infra-red signals of many (but not all) commonly used remote controls."
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
PKG_CONFIGURE_OPTS_TARGET="ac_cv_path_LIBUSB_CONFIG= /
ac_cv_func_forkpty=no \
ac_cv_lib_util_forkpty=no \
--enable-sandboxed \
--with-gnu-ld \
--without-x \
--with-driver=userspace \
--with-syslog=LOG_DAEMON"
if [ "$DEBUG" = yes ]; then
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --enable-debug"
else
PKG_CONFIGURE_OPTS_TARGET="$PKG_CONFIGURE_OPTS_TARGET --disable-debug"
fi
pre_make_target() {
export MAKEFLAGS=-j1
}
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin/pronto2lirc
mkdir -p $INSTALL/etc/lirc
cp $PKG_DIR/config/lircd.conf.xbox $INSTALL/etc/lirc
cp $PKG_DIR/config/lircd.conf.rpi $INSTALL/etc/lirc
mkdir -p $INSTALL/usr/lib/openelec
cp $PKG_DIR/scripts/lircd_helper $INSTALL/usr/lib/openelec
mkdir -p $INSTALL/usr/lib/udev
cp $PKG_DIR/scripts/lircd_wakeup_enable $INSTALL/usr/lib/udev
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,22 @@
diff -Naur lirc-0.9.0-old/drivers/lirc_serial/lirc_serial.c lirc-0.9.0-new/drivers/lirc_serial/lirc_serial.c
--- lirc-0.9.0-old/drivers/lirc_serial/lirc_serial.c 2011-03-25 15:28:18.000000000 -0700
+++ lirc-0.9.0-new/drivers/lirc_serial/lirc_serial.c 2012-06-10 14:18:21.000000000 -0700
@@ -66,7 +66,6 @@
#include <linux/poll.h>
#include <linux/platform_device.h>
-#include <asm/system.h>
#include <linux/io.h>
#include <linux/irq.h>
#include <linux/fcntl.h>
diff -Naur lirc-0.9.0-old/drivers/lirc_sir/lirc_sir.c lirc-0.9.0-new/drivers/lirc_sir/lirc_sir.c
--- lirc-0.9.0-old/drivers/lirc_sir/lirc_sir.c 2011-03-25 15:28:18.000000000 -0700
+++ lirc-0.9.0-new/drivers/lirc_sir/lirc_sir.c 2012-06-10 14:18:42.000000000 -0700
@@ -59,7 +59,6 @@
#include <linux/mm.h>
#include <linux/delay.h>
#include <linux/poll.h>
-#include <asm/system.h>
#include <linux/io.h>
#include <asm/irq.h>
#include <linux/fcntl.h>

View File

@@ -0,0 +1,201 @@
diff -Naur lirc-0.9.0-old/configure.ac lirc-0.9.0-new/configure.ac
--- lirc-0.9.0-old/configure.ac 2012-02-29 21:54:01.000000000 -0800
+++ lirc-0.9.0-new/configure.ac 2012-02-29 21:55:06.000000000 -0800
@@ -164,7 +164,6 @@
(lirc_dev lirc_atiusb) \
(lirc_dev lirc_bt829) \
(lirc_dev lirc_gpio) \
- (lirc_dev lirc_i2c) \
(lirc_dev lirc_igorplugusb) \
(lirc_dev lirc_ttusbir) \
(lirc_dev lirc_imon) \
@@ -420,32 +419,31 @@
AC_ARG_WITH(driver,
[ --with-driver=X specify the driver to use, where X is one of:
all, none, userspace, accent, act200l,
- act220l, adaptec, alsa_usb, animax, asusdh,
+ act220l, alsa_usb, animax, asusdh,
atilibusb, atiusb, atwf83, audio, audio_alsa
avermedia, avermedia_vdomate, avermedia98,
- awlibusb, bestbuy, bestbuy2, breakoutbox,
+ awlibusb, bestbuy, bestbuy2,
bte, bw6130, caraca, chronos, commandir,
comX, cph06x, creative, creative_infracd,
devinput, dfclibusb, digimatrix, dsp, dvico, ea65,
exaudio, flyvideo, ftdi, gvbctv5pci,
- hauppauge, hauppauge_dvb,
- hercules_smarttv_stereo, i2cuser,
+ i2cuser,
igorplugusb, iguanaIR, imon, imon_24g,
imon_knob, imon_lcd, imon_pad, imon_rsc,
irdeo, irdeo_remote, irlink, irman, irreal,
- knc_one, kworld,
- leadtek_0007, leadtek_0010, leadtek_pvr2000,
+ kworld,
+ leadtek_0007, leadtek_0010,
livedrive_midi, livedrive_seq, logitech,
lptX, macmini, mediafocusI,
mouseremote, mouseremote_ps2, mp3anywhere,
mplay, nslu2,packard_bell, parallel, pcmak,
- pcmak_usb, pctv, pixelview_bt878,
- pixelview_pak, pixelview_pro, provideo,
+ pcmak_usb, pctv,
+ pixelview_pak, pixelview_pro,
realmagic, remotemaster, sa1100, samsung,
sasem, sb0540, serial, silitek, sir, slinke,
srm7500libusb, tekram,
tekram_bt829, tira, tira_raw, ttusbir,
- tuxbox, tvbox, udp, uirt2, uirt2_raw,
+ tuxbox, udp, uirt2, uirt2_raw,
usb_uirt_raw, usbx, wpc8769l],
driver=${withval},
driver="unset"
@@ -592,9 +590,6 @@
lirc_dev-lirc_gpio)
#lirc_driver="${lirc_driver} lirc_dev lirc_gpio"
;;
- lirc_dev-lirc_i2c)
- #lirc_driver="${lirc_driver} lirc_dev lirc_i2c"
- ;;
lirc_dev-lirc_igorplugusb)
;;
lirc_dev-lirc_ttusbir)
@@ -721,12 +716,6 @@
AC_DEFINE(LIRC_SIR_ACTISYS_ACT220L)
fi
-if test "$driver" = "adaptec"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="adaptec/lircd.conf.AVC-2410"
-# lircmd_conf="adaptec/lircmd.conf.AVC-2410"
-fi
-
if test "$driver" = "alsa_usb"; then
lirc_driver="alsa_usb"
hw_module="hw_alsa_usb.o"
@@ -828,11 +817,6 @@
lircmd_conf="bestbuy/lircmd.conf.bestbuy2"
fi
-if test "$driver" = "breakoutbox"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="creative/lircd.conf.breakoutbox"
-fi
-
if test "$driver" = "bte"; then
lirc_driver="none"
hw_module="hw_bte.o serial.o"
@@ -983,23 +967,6 @@
# lircmd_conf="iodata/lircmd.conf.gvbctv5pci"
fi
-if test "$driver" = "hauppauge"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="hauppauge/lircd.conf.hauppauge"
- lircmd_conf="hauppauge/lircmd.conf.hauppauge"
-fi
-
-if test "$driver" = "hauppauge_dvb"; then
- lirc_driver="lirc_dev"
- lircd_conf="hauppauge/lircd.conf.hauppauge"
- lircmd_conf="hauppauge/lircmd.conf.hauppauge"
-fi
-
-if test "$driver" = "hercules_smarttv_stereo"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="hercules/lircd.conf.smarttv_stereo"
-fi
-
if test "$driver" = "i2cuser"; then
lirc_driver="none"
hw_module="hw_i2cuser.o receive.o"
@@ -1084,12 +1051,6 @@
HW_DEFAULT="hw_irreal"
fi
-if test "$driver" = "knc_one"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="knc_one/lircd.conf.knc_one"
-# lircmd_conf="knc_one/lircmd.conf.knc_one"
-fi
-
if test "$driver" = "kworld"; then
lirc_driver="lirc_dev lirc_gpio"
lircd_conf="kworld/lircd.conf.kworld"
@@ -1108,12 +1069,6 @@
lircmd_conf="leadtek/lircmd.conf.RM-0010"
fi
-if test "$driver" = "leadtek_pvr2000"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="leadtek/lircd.conf.PVR2000"
-# lircmd_conf="leadtek/lircmd.conf.PVR2000"
-fi
-
if test "$driver" = "livedrive_midi"; then
lirc_driver="none"
hw_module="hw_livedrive_common.o hw_livedrive_midi.o"
@@ -1230,12 +1185,6 @@
# lircmd_conf="pinnacle_systems/lircmd.conf.pctv"
fi
-if test "$driver" = "pixelview_bt878"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="pixelview/lircd.conf.playtv_bt878"
-# lircmd_conf="pixelview/lircmd.conf.pixelview_bt878"
-fi
-
if test "$driver" = "pixelview_pak"; then
lirc_driver="lirc_dev lirc_gpio"
# the config files are the same as for the PlayTV pro
@@ -1249,12 +1198,6 @@
lircmd_conf="pixelview/lircmd.conf.playtv_pro"
fi
-if test "$driver" = "provideo"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="provideo/lircd.conf.pv951"
-# lircmd_conf="provideo/lircmd.conf.pv951"
-fi
-
if test "$driver" = "realmagic"; then
lirc_driver="none"
hw_module="hw_pixelview.o serial.o"
@@ -1372,11 +1315,6 @@
HW_DEFAULT="hw_default"
fi
-if test "$driver" = "tvbox"; then
- lirc_driver="lirc_dev lirc_i2c"
- lircd_conf="asus/lircd.conf.asus"
-fi
-
if test "$driver" = "udp"; then
lirc_driver="none"
hw_module="hw_udp.o receive.o"
@@ -1512,7 +1450,6 @@
lirc_driver="lirc_dev \
lirc_atiusb \
lirc_bt829 \
- lirc_i2c \
lirc_igorplugusb \
lirc_imon \
lirc_parallel \
@@ -1779,7 +1716,6 @@
drivers/lirc_bt829/Makefile
drivers/lirc_dev/Makefile
drivers/lirc_gpio/Makefile
- drivers/lirc_i2c/Makefile
drivers/lirc_igorplugusb/Makefile
drivers/lirc_ttusbir/Makefile
drivers/lirc_imon/Makefile
@@ -1808,9 +1744,6 @@
elif test "$driver" = "alsa_usb"; then
echo "You will have to use the snd-usb-audio driver from:"
echo "http://www.alsa-project.org/"
-elif test "$driver" = "hauppauge_dvb"; then
- echo "You will have to use the DVB driver from:"
- echo "http://www.linuxtv.org"
elif test "$kernel_module" = ""; then
echo "Your hardware does not require a special LIRC kernel module."
if test "${irtty}" != ""; then

View File

@@ -0,0 +1,33 @@
diff -Naur lirc-0.9.0-old-old/drivers/lirc_atiusb/lirc_atiusb.c lirc-0.9.0-old-new/drivers/lirc_atiusb/lirc_atiusb.c
--- lirc-0.9.0-old-old/drivers/lirc_atiusb/lirc_atiusb.c 2012-05-01 12:09:19.000000000 -0700
+++ lirc-0.9.0-old-new/drivers/lirc_atiusb/lirc_atiusb.c 2012-05-01 12:14:52.000000000 -0700
@@ -138,23 +138,23 @@
static struct usb_device_id usb_remote_table[] = {
/* X10 USB Firecracker Interface */
- { USB_DEVICE(VENDOR_ATI1, 0x0002) },
+ /* { USB_DEVICE(VENDOR_ATI1, 0x0002) }, */
/* X10 VGA Video Sender */
- { USB_DEVICE(VENDOR_ATI1, 0x0003) },
+ /* { USB_DEVICE(VENDOR_ATI1, 0x0003) }, */
/* ATI Wireless Remote Receiver */
- { USB_DEVICE(VENDOR_ATI1, 0x0004) },
+ /* { USB_DEVICE(VENDOR_ATI1, 0x0004) }, */
/* NVIDIA Wireless Remote Receiver */
- { USB_DEVICE(VENDOR_ATI1, 0x0005) },
+ /* { USB_DEVICE(VENDOR_ATI1, 0x0005) }, */
/* ATI Wireless Remote Receiver */
- { USB_DEVICE(VENDOR_ATI1, 0x0006) },
+ /* { USB_DEVICE(VENDOR_ATI1, 0x0006) }, */
/* X10 USB Wireless Transceivers */
{ USB_DEVICE(VENDOR_ATI1, 0x0007) },
- { USB_DEVICE(VENDOR_ATI1, 0x0008) },
+ /* { USB_DEVICE(VENDOR_ATI1, 0x0008) }, */
{ USB_DEVICE(VENDOR_ATI1, 0x0009) },
{ USB_DEVICE(VENDOR_ATI1, 0x000A) },
{ USB_DEVICE(VENDOR_ATI1, 0x000B) },

View File

@@ -0,0 +1,11 @@
diff -Naur lirc-0.9.0-old/drivers/lirc_atiusb/lirc_atiusb.c lirc-0.9.0-new/drivers/lirc_atiusb/lirc_atiusb.c
--- lirc-0.9.0-old/drivers/lirc_atiusb/lirc_atiusb.c 2011-07-27 20:45:01.000000000 -0700
+++ lirc-0.9.0-new/drivers/lirc_atiusb/lirc_atiusb.c 2011-07-27 20:45:53.000000000 -0700
@@ -48,7 +48,6 @@
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/kmod.h>
-#include <linux/smp_lock.h>
#include <linux/completion.h>
#include <linux/uaccess.h>
#include <linux/usb.h>

View File

@@ -0,0 +1,29 @@
diff -Naur lirc-0.9.0-old/drivers/lirc_wpc8769l/lirc_wpc8769l.c lirc-0.9.0-new/drivers/lirc_wpc8769l/lirc_wpc8769l.c
--- lirc-0.9.0-old/drivers/lirc_wpc8769l/lirc_wpc8769l.c 2011-07-27 20:45:36.000000000 -0700
+++ lirc-0.9.0-new/drivers/lirc_wpc8769l/lirc_wpc8769l.c 2011-07-27 20:46:22.000000000 -0700
@@ -361,14 +361,14 @@
size = count << 3;
ldata = (unsigned long *) data_buf;
- next_one = generic_find_next_le_bit(ldata, size, 0);
+ next_one = find_next_bit_le(ldata, size, 0);
if (next_one > 0)
put_pulse_bit(next_one
* WPC8769L_USECS_PER_BIT);
while (next_one < size) {
- next_zero = generic_find_next_zero_le_bit(ldata,
+ next_zero = find_next_zero_bit_le(ldata,
size, next_one + 1);
put_space_bit(
@@ -376,7 +376,7 @@
* WPC8769L_USECS_PER_BIT);
if (next_zero < size) {
- next_one = generic_find_next_le_bit(ldata,
+ next_one = find_next_bit_le(ldata,
size, next_zero + 1);
put_pulse_bit(

View File

@@ -0,0 +1,63 @@
diff -Naur lirc-0.9.0-old/daemons/input_map.c lirc-0.9.0-new/daemons/input_map.c
--- lirc-0.9.0-old/daemons/input_map.c 2011-07-27 20:46:13.000000000 -0700
+++ lirc-0.9.0-new/daemons/input_map.c 2011-07-27 20:47:15.000000000 -0700
@@ -25,6 +25,19 @@
NULL, 0}
};
+int get_input_code_by_index(int index, linux_input_code * code)
+{
+ int i;
+
+ for (i = 0; input_map[i].name != NULL; i++) {
+ if (i == index) {
+ *code = input_map[i].code;
+ return i;
+ }
+ }
+ return -1;
+}
+
int get_input_code(const char *name, linux_input_code * code)
{
int i;
diff -Naur lirc-0.9.0-old/daemons/input_map.h lirc-0.9.0-new/daemons/input_map.h
--- lirc-0.9.0-old/daemons/input_map.h 2011-07-27 20:46:13.000000000 -0700
+++ lirc-0.9.0-new/daemons/input_map.h 2011-07-27 20:47:15.000000000 -0700
@@ -28,6 +28,7 @@
typedef unsigned short linux_input_code;
#endif
+int get_input_code_by_index(int index, linux_input_code * code);
int get_input_code(const char *name, linux_input_code * code);
void fprint_namespace(FILE * f);
int is_in_namespace(const char *name);
diff -Naur lirc-0.9.0-old/daemons/lircd.c lirc-0.9.0-new/daemons/lircd.c
--- lirc-0.9.0-old/daemons/lircd.c 2011-07-27 20:46:13.000000000 -0700
+++ lirc-0.9.0-new/daemons/lircd.c 2011-07-27 20:47:15.000000000 -0700
@@ -406,6 +406,8 @@
#if defined(__linux__)
int fd;
int key;
+ linux_input_code code;
+ int i;
struct uinput_user_dev dev;
fd = open("/dev/input/uinput", O_RDWR);
@@ -428,9 +430,13 @@
goto setup_error;
}
- for (key = KEY_RESERVED; key <= KEY_UNKNOWN; key++) {
- if (ioctl(fd, UI_SET_KEYBIT, key) != 0) {
- goto setup_error;
+ for(i = 0; get_input_code_by_index(i, &code) >= 0; i++) {
+ key = (int)code;
+ if (((key >= KEY_ESC) && (key <= KEY_RFKILL )) ||
+ ((key >= KEY_OK ) && (key <= KEY_WPS_BUTTON))) {
+ if (ioctl(fd, UI_SET_KEYBIT, key) != 0) {
+ goto setup_error;
+ }
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,48 @@
From 4022c521c26e339152c6cc8febd6d737725de8ee Mon Sep 17 00:00:00 2001
From: Stefan Saraev <stefan@saraev.ca>
Date: Wed, 22 Jan 2014 15:59:14 +0200
Subject: [PATCH] meh alsa...
---
configure.ac | 25 -------------------------
1 files changed, 0 insertions(+), 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index 73a353f..74ccba8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -342,31 +342,6 @@ AC_CHECK_HEADERS(portaudio.h,[
],,${portaudio_lib_other}
)]
)
-dnl audio_alsa driver requires ALSA library installed and some linker flags
-have_alsa=no
-AC_CHECK_HEADERS(alsa/asoundlib.h,[
- AC_CHECK_LIB(asound, snd_pcm_open,[
- AC_DEFINE(HAVE_LIBALSA)
- have_alsa=yes
- possible_drivers="${possible_drivers} (audio_alsa)"
- ],,
- )]
-)
-dnl alsa_usb driver requires an ALSA that knows about our hwdep device
-if test "$have_alsa" = "yes"; then
- AC_MSG_CHECKING(for ALSA SB RC hwdep support)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-#include <alsa/asoundlib.h>
-]], [[
- if (snd_hwdep_info_get_iface(NULL) == SND_HWDEP_IFACE_SB_RC) {}
-]])],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_ALSA_SB_RC)
- possible_drivers="${possible_drivers} (alsa_usb)"
- ],[
- AC_MSG_RESULT(no)
- ])
-fi
dnl creative_infracd driver requires linux scsi api
AC_CHECK_HEADERS(scsi/sg.h,[
AC_DEFINE(HAVE_SCSI)
--
1.7.2.5

View File

@@ -0,0 +1,12 @@
diff -Naur lirc-0.9.0-old/configure.ac lirc-0.9.0-new/configure.ac
--- lirc-0.9.0-old/configure.ac 2011-03-25 15:28:18.000000000 -0700
+++ lirc-0.9.0-new/configure.ac 2012-12-31 05:01:51.000000000 -0800
@@ -8,7 +8,7 @@
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE(lirc, 0.9.1-git)
-AM_CONFIG_HEADER(config.h)
+AC_CONFIG_HEADERS(config.h)
CFLAGS="${CFLAGS--O2 -g -Wall}"

View File

@@ -0,0 +1,67 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
ACTION=$(echo "$1")
DEVICE=$(echo "$2" | cut -f1 -d:)
DRIVER=$(echo "$2" | cut -f2 -d:)
CONFIG=$(echo "$2" | cut -f3 -d:)
case "$ACTION" in
add)
if [ "x$DRIVER" = "x" ]; then
exit 1;
fi
mkdir -p '/run/lirc'
if [ ! -e "/run/lirc/lircd-$DEVICE.pid" ]; then
LIRCD="/usr/sbin/lircd"
LIRCD_CONFIG="--uinput --driver=$DRIVER --device=/dev/$DEVICE"
LIRCD_CONFIG="$LIRCD_CONFIG --output=/run/lirc/lircd-$DEVICE"
LIRCD_CONFIG="$LIRCD_CONFIG --pidfile=/run/lirc/lircd-$DEVICE.pid"
if [ -e "/storage/.config/lircd.conf" ]; then
LIRCD_CONFIG="$LIRCD_CONFIG /storage/.config/lircd.conf"
elif [ -n "$CONFIG" ]; then
if [ -e "/storage/.config/$CONFIG" ]; then
LIRCD_CONFIG="$LIRCD_CONFIG /storage/.config/$CONFIG"
elif [ -e "/etc/lirc/$CONFIG" ]; then
LIRCD_CONFIG="$LIRCD_CONFIG /etc/lirc/$CONFIG"
else
exit 1
fi
else
exit 1
fi
exec $LIRCD $LIRCD_CONFIG
fi
;;
remove)
if [ -e "/run/lirc/lircd-$DEVICE.pid" ]; then
PID=`cat /run/lirc/lircd-$DEVICE.pid`
if [ ! "x$PID" = "x" ]; then
kill $PID
fi
fi
;;
esac
exit 0

View File

@@ -0,0 +1,17 @@
#!/bin/sh
################################################################################
# wakeup_enable
################################################################################
devpath=`readlink -f "/sys/${DEVPATH}"`
while echo "${devpath}" | grep -q '^/sys/devices/' > /dev/null 2>&1 ; do
if test -e "${devpath}/power/wakeup" ; then
state=`cat "${devpath}/power/wakeup"`
if test "x${state}" = "xdisabled" ; then
echo "enabled" > "${devpath}/power/wakeup"
fi
fi
devpath=`dirname "${devpath}"`
done
exit 0

View File

@@ -0,0 +1,12 @@
[Unit]
Description=Lirc with %I
[Service]
Type=oneshot
ExecStart=/usr/lib/openelec/lircd_helper add %I
ExecStop=/usr/lib/openelec/lircd_helper remove %I
TimeoutStopSec=1
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,19 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2014 Stephan Raue (stephan@openelec.tv)
#
# OpenELEC is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# OpenELEC 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 General Public License
# along with OpenELEC. If not, see <http://www.gnu.org/licenses/>.
################################################################################
d /run/lirc 0755 root root - -

View File

@@ -0,0 +1,64 @@
################################################################################
# An example udev rules file for lircd.
################################################################################
# lircd_helper only does something for "add" and "remove" actions.
ACTION!="add|remove", GOTO="end"
KERNEL=="hiddev[0-9]*", SUBSYSTEM=="usb", SUBSYSTEMS=="usb", GOTO="begin"
KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", GOTO="begin"
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", SUBSYSTEMS=="i2c", GOTO="begin"
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", SUBSYSTEMS=="usb", GOTO="begin"
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", SUBSYSTEMS=="platform", GOTO="begin"
KERNEL=="lirc[0-9]*", SUBSYSTEM=="lirc", SUBSYSTEMS=="pnp", GOTO="begin"
GOTO="end"
LABEL="begin"
#-------------------------------------------------------------------------------
# Ask lircd_helper to lirc devices.
#-------------------------------------------------------------------------------
#SUBSYSTEM=="lirc", \
# ENV{lircd_driver}="default", \
# ENV{lircd_conf}="lircd.conf"
### Microsoft Xbox DVD dongle
SUBSYSTEM=="lirc", DRIVERS=="lirc_xbox", \
ENV{lircd_driver}="default", \
ENV{lircd_conf}="lircd.conf.xbox"
### RPi GPIO IR Receiver
SUBSYSTEM=="lirc", DRIVERS=="lirc_rpi", \
ENV{lircd_driver}="default", \
ENV{lircd_conf}="lircd.conf.rpi"
#-------------------------------------------------------------------------------
# Ask lircd_helper to handle USB devices that do not show up as lirc devices
# and are supported by lircd. Remote controls that are USB HID devices that show
# up as event devices are not included as as they are handled by eventlircd.
#-------------------------------------------------------------------------------
SUBSYSTEMS=="usb", GOTO="begin-usb"
GOTO="end-usb"
LABEL="begin-usb"
ENV{ID_USB_INTERFACES}=="", IMPORT{builtin}="usb_id"
ENV{ID_VENDOR_ID}=="04d8", ENV{ID_MODEL_ID}=="fd08", \
ENV{lircd_driver}="usb_irtoy", \
ENV{lircd_conf}="lircd.conf"
ENV{ID_VENDOR_ID}=="0fe9", ENV{ID_MODEL_ID}=="9010", \
ENV{lircd_driver}="dvico", \
ENV{lircd_conf}="lircd.conf"
LABEL="end-usb"
ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="add", \
TAG+="systemd", ENV{SYSTEMD_WANTS}+="lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service", \
RUN+="lircd_wakeup_enable"
ENV{lircd_driver}=="?*", ENV{lircd_conf}=="?*", ACTION=="remove", \
RUN+="/usr/bin/systemctl stop lircd@$name:$env{lircd_driver}:$env{lircd_conf}.service"
LABEL="end"