OBS User unknown 2007-04-23 21:19:51 +00:00 committed by Git OBS Bridge
parent eb63b9cc9b
commit acf2566a2d
6 changed files with 376 additions and 2 deletions

126
imon2_conf.patch Normal file
View File

@ -0,0 +1,126 @@
diff -Nur lirc-0.8.1.orig/remotes/imon/lircd.conf.imon2 lirc-0.8.1/remotes/imon/lircd.conf.imon2
--- lirc-0.8.1.orig/remotes/imon/lircd.conf.imon2 1970-01-01 01:00:00.000000000 +0100
+++ lirc-0.8.1/remotes/imon/lircd.conf.imon2 2007-04-23 14:17:52.000000000 +0200
@@ -0,0 +1,122 @@
+#
+# this config file was automatically generated
+# using lirc-0.8.1(imon2) on Mon Jan 23 20:22:11 2006
+#
+# contributed by M.Brakemeier
+#
+# brand: SoundGraph
+# model no. of remote control: iMON-PAD
+# devices being controlled by this remote:
+#
+
+begin remote
+
+ name iMON-PAD
+ bits 32
+ eps 30
+ aeps 100
+
+ one 0 0
+ zero 0 0
+ gap 235965
+ min_repeat 1
+ toggle_bit 0
+
+
+ begin codes
+ AppExit 0x288195B7
+ Power 0x289115B7
+ Record 0x298115B7
+ Play 0x2A8115B7
+ Open 0x29B1D5B7
+ Rewind 0x2A8195B7
+ Pause 0x2A9115B7
+ FastForward 0x2B8115B7
+ PrevChapter 0x2B9115B7
+ Stop 0x2B9715B7
+ NextChapter 0x298195B7
+ Esc 0x2BB715B7
+ Eject 0x299395B7
+ AppLauncher 0x29B715B7
+ MultiMon 0x2AB195B7
+ TaskSwitcher 0x2A9395B7
+ Mute 0x2B9595B7
+ Vol+ 0x28A395B7
+ Vol- 0x28A595B7
+ Ch+ 0x289395B7
+ Ch- 0x288795B7
+ Timer 0x2B8395B7
+ 1 0x28B595B7
+ 2 0x2BB195B7
+ 3 0x28B195B7
+ 4 0x2A8595B7
+ 5 0x299595B7
+ 6 0x2AA595B7
+ 7 0x2B9395B7
+ 8 0x2A8515B7
+ 9 0x2AA115B7
+ 0 0x2BA595B7
+ ShiftTab 0x28B515B7
+ Tab 0x29A115B7
+ MyMovie 0x2B8515B7
+ MyMusic 0x299195B7
+ MyPhoto 0x2BA115B7
+ MyTV 0x28A515B7
+ MyDVD 0x29A295B7
+ Bookmark 0x288515B7
+ Thumbnail 0x2AB715B7
+ AspectRatio 0x29A595B7
+ FullScreen 0x2AA395B7
+ Menu 0x2BA385B7
+ Caption 0x298595B7
+ Language 0x2B8595B7
+ MouseKeyboard 0x299115B7
+ SelectSpace 0x2A9315B7
+ MouseMenu 0x28B715B7
+ MouseRightClick 0x688481B7
+ Enter 0x28A195B7
+ MouseLeftClick 0x688301B7
+ WindowsKey 0x2B8195B7
+ Backspace 0x28A115B7
+ Mouse_N 0x690281B7
+ Mouse_S 0x688291B7
+ Mouse_W 0x6A8281B7
+ Mouse_E 0x688A81B7
+ end codes
+
+end remote
+
+#
+# this config file was automatically generated
+# using lirc-0.8.0(userspace) on Tue Oct 17 22:45:11 2006
+#
+# contributed by
+#
+# brand: Antec Fusion Wheel
+# model no. of remote control:
+# devices being controlled by this remote:
+#
+
+begin remote
+
+ name Antec_Fusion_Wheel
+ bits 16
+ eps 30
+ aeps 100
+
+ one 0 0
+ zero 0 0
+ post_data_bits 16
+ post_data 0xFF
+ gap 131971
+ min_repeat 1
+ toggle_bit 0
+
+
+ begin codes
+ CCW 0x0100
+ CW 0x0001
+ end codes
+
+end remote
+

View File

@ -0,0 +1,222 @@
--- lirc-0.8.1/drivers/lirc_imon/lirc_imon.c 2006-12-29 11:00:07.000000000 +0100
+++ lirc-0.8.1/drivers/lirc_imon2/lirc_imon2.c 2007-04-23 14:50:31.000000000 +0200
@@ -65,9 +65,9 @@
#define MOD_AUTHOR "Venky Raju <dev@venky.ws>"
-#define MOD_DESC "Driver for Soundgraph iMON MultiMedian IR/VFD"
-#define MOD_NAME "lirc_imon"
-#define MOD_VERSION "0.3"
+#define MOD_DESC "Driver for Soundgraph iMON MultiMedian IR/VFD w/imon pad2keys patch"
+#define MOD_NAME "lirc_imon2"
+#define MOD_VERSION "0.3p2k"
#define VFD_MINOR_BASE 144 /* Same as LCD */
#define DEVFS_MODE S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH
@@ -81,6 +81,7 @@
#define SUCCESS 0
#define TRUE 1
#define FALSE 0
+#define CURSOR_LIMIT 16
/* ------------------------------------------------------------
@@ -160,6 +161,9 @@
atomic_t busy; /* write in progress */
int status; /* status of tx completion */
} tx;
+ int key_x;
+ int key_y;
+ int last_count; /* number of times pressed */
};
#define LOCK_CONTEXT down (&context ->sem)
@@ -250,6 +254,7 @@
MODULE_AUTHOR (MOD_AUTHOR);
MODULE_DESCRIPTION (MOD_DESC);
+MODULE_VERSION(MOD_VERSION); /* MBr: was missing */
MODULE_LICENSE ("GPL");
module_param (debug, int, 0);
MODULE_PARM_DESC (debug, "Debug messages: 0=no, 1=yes (default: no)");
@@ -574,6 +579,11 @@
context ->rx.initial_space = 1;
context ->rx.prev_bit = 0;
+ /* init pad context */
+ context ->key_x = 0;
+ context ->key_y = 0;
+ context ->last_count = 0;
+
usb_fill_int_urb (context ->rx_urb, context ->dev,
usb_rcvintpipe (context ->dev,
context ->rx_endpoint-> bEndpointAddress),
@@ -704,6 +714,76 @@
/* The signals have been decoded onboard the iMON controller */
+ /* encode mouse pad as key events */
+ /* we like pad events, not mouse button events*/
+ if((buf[0] & 0x40) &&
+ !(buf[1] & 0x01 || buf[1] >> 2 & 0x01))
+ {
+ int rel_x = (buf[1] & 0x08) | (buf[1] & 0x10) >> 2 | (buf[1] & 0x20) >> 4 | (buf[1] & 0x40) >> 6;
+ int rel_y = (buf[2] & 0x08) | (buf[2] & 0x10) >> 2 | (buf[2] & 0x20) >> 4 | (buf[2] & 0x40) >> 6;
+
+ if(buf[0] & 0x02)
+ rel_x |= ~0x10+1;
+ if(buf[0] & 0x01)
+ rel_y |= ~0x10+1;
+
+ /* keyboard direction key emulation */
+ if( context->last_count > 32 )
+ { /* Hopefully eliminate drift*/
+ context->last_count=0;
+ context->key_y=0;
+ context->key_x=0;
+ }
+ context->last_count++;
+
+ /* limit decoded events */
+ if(abs(context->key_x) > CURSOR_LIMIT || abs(context->key_y) > CURSOR_LIMIT )
+ {
+ if(abs(context->key_y ) > abs(context->key_x))
+ { /* mouse s/n */
+ if(context->key_y > 0 && rel_y > 0)
+ { /* mouse s */
+ buf[0] = 0x68;
+ buf[1] = 0x82;
+ buf[2] = 0x91;
+ }
+ else if(context->key_y < 0 && rel_y < 0)
+ { /* mouse n */
+ buf[0] = 0x69;
+ buf[1] = 0x02;
+ buf[2] = 0x81;
+ }
+ }
+ else
+ { /* mouse e/w*/
+ if(context->key_x > 0 && rel_x > 0 )
+ { /* mouse e */
+ buf[0] = 0x68;
+ buf[1] = 0x8A;
+ buf[2] = 0x81;
+ }
+ else if(context->key_x < 0 && rel_x < 0 )
+ { /* mouse w */
+ buf[0] = 0x6A;
+ buf[1] = 0x82;
+ buf[2] = 0x81;
+ }
+ }
+ }
+ else
+ {
+ context->key_x += rel_x;
+ context->key_y += rel_y;
+
+ return; /* discard those key codes */
+ }
+ }
+
+ /* a key was pressed, reset count */
+ context->key_x = 0;
+ context->key_y = 0;
+ context->last_count = 0;
+
lirc_buffer_write_1 (context ->plugin ->rbuf, buf);
wake_up (&context ->plugin ->rbuf ->wait_poll);
return;
--- lirc-0.8.1/drivers/lirc_imon/Makefile.am 2005-01-26 21:07:28.000000000 +0100
+++ lirc-0.8.1/drivers/lirc_imon2/Makefile.am 2007-04-23 14:50:31.000000000 +0200
@@ -5,9 +5,9 @@
## this is so that Automake includes the C compiling definitions, and
## includes the source files in the distribution.
EXTRA_PROGRAMS = automake_dummy
-automake_dummy_SOURCES = lirc_imon.c
+automake_dummy_SOURCES = lirc_imon2.c
## there is no *just* object file support in automake. This is close enough
-module_DATA = lirc_imon.o
+module_DATA = lirc_imon2.o
-include ../Makefile.common
\ No newline at end of file
+include ../Makefile.common
--- lirc-0.8.1/drivers/lirc_imon/Makefile.in 2007-01-07 13:45:12.000000000 +0100
+++ lirc-0.8.1/drivers/lirc_imon2/Makefile.in 2007-04-23 14:50:31.000000000 +0200
@@ -124,9 +124,9 @@
x_progs = @x_progs@
EXTRA_PROGRAMS = automake_dummy
-automake_dummy_SOURCES = lirc_imon.c
+automake_dummy_SOURCES = lirc_imon2.c
-module_DATA = lirc_imon.o
+module_DATA = lirc_imon2.o
KERNEL_LOCATION = @kerneldir@
@@ -142,12 +142,12 @@
CLEANFILES = $(module_DATA) .$(module_DATA).flags $(module_DATA:.o=.mod.c) $(module_DATA:.o=.@kernelext@) *~
-subdir = drivers/lirc_imon
+subdir = drivers/lirc_imon2
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
CONFIG_HEADER = $(top_builddir)/config.h
CONFIG_CLEAN_FILES =
EXTRA_PROGRAMS = automake_dummy$(EXEEXT)
-am_automake_dummy_OBJECTS = lirc_imon.$(OBJEXT)
+am_automake_dummy_OBJECTS = lirc_imon2.$(OBJEXT)
automake_dummy_OBJECTS = $(am_automake_dummy_OBJECTS)
automake_dummy_LDADD = $(LDADD)
automake_dummy_DEPENDENCIES =
@@ -159,7 +159,7 @@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@
depcomp = $(SHELL) $(top_srcdir)/depcomp
-@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/lirc_imon.Po
+@AMDEP_TRUE@DEP_FILES = $(DEPDIR)/lirc_imon2.Po
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) \
@@ -189,7 +189,7 @@
-rm -f libtool
$(srcdir)/Makefile.in: Makefile.am $(srcdir)/../Makefile.common $(top_srcdir)/configure.in $(ACLOCAL_M4)
cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu drivers/lirc_imon/Makefile
+ $(AUTOMAKE) --gnu drivers/lirc_imon2/Makefile
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) && \
CONFIG_HEADERS= CONFIG_LINKS= \
@@ -204,7 +204,7 @@
distclean-compile:
-rm -f *.tab.c
-@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lirc_imon.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/lirc_imon2.Po@am__quote@
distclean-depend:
-rm -rf $(DEPDIR)
--- lirc-0.8.1/drivers/Makefile.am
+++ lirc-0.8.1/drivers/Makefile.am
@@ -15,6 +15,7 @@
lirc_i2c \
lirc_igorplugusb \
lirc_imon \
+ lirc_imon2 \
lirc_it87 \
lirc_mceusb \
lirc_mceusb2 \
--- lirc-0.8.1/drivers/Makefile.in
+++ lirc-0.8.1/drivers/Makefile.in
@@ -128,6 +128,7 @@
lirc_i2c \
lirc_igorplugusb \
lirc_imon \
+ lirc_imon2 \
lirc_it87 \
lirc_mceusb \
lirc_mceusb2 \

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 23 15:09:38 CEST 2007 - hvogel@suse.de
- Added imon2 driver that is a copy of imon with the pad2key
patch from M. Brakemeier
-------------------------------------------------------------------
Wed Apr 4 21:59:29 CEST 2007 - lrupp@suse.de

View File

@ -17,11 +17,12 @@ License: GNU General Public License (GPL)
Group: System/Kernel
Summary: LIRC kernel modules
Version: 0.8.1
Release: 6
Release: 7
Source0: lirc-0.8.1.tar.bz2
Source1: Makefile.module
Source2: Makefile.modsub
Patch: lirc-0.8.1-kernel_SLAB_ATOMIC.diff
Patch1: lirc-0.8.1-imon_pad2keys.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%suse_kernel_module_package -n lirc kdump um debug
@ -42,7 +43,12 @@ receivers for the serial port.
%prep
%setup -q -n lirc-%{version}
pushd drivers
cp -av lirc_imon lirc_imon2
mv lirc_imon2/lirc_imon.c lirc_imon2/lirc_imon2.c
popd
%patch -p1
%patch1 -p1
./configure --with-driver=all
cp -a drivers source
find source -name 'Makefile*'|xargs rm
@ -71,6 +77,9 @@ for flavor in %flavors_to_build; do
done
%changelog
* Mon Apr 23 2007 - hvogel@suse.de
- Added imon2 driver that is a copy of imon with the pad2key
patch from M. Brakemeier
* Wed Apr 04 2007 - lrupp@suse.de
- added module-init-tools to BuildRequires
* Tue Feb 27 2007 - ro@suse.de

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Mon Apr 23 15:11:22 CEST 2007 - hvogel@suse.de
- Add config for imon2 driver with missing keys and pad2key
addidtion from M. Brakemeier
-------------------------------------------------------------------
Tue Jan 16 16:37:14 CET 2007 - lnussel@suse.de

View File

@ -17,7 +17,7 @@ License: GNU General Public License (GPL)
Group: Hardware/Other
Autoreqprov: on
Version: 0.8.1
Release: 13
Release: 16
PreReq: %fillup_prereq
Summary: Tools for Infrared Receivers
Source0: lirc-0.8.1.tar.bz2
@ -31,6 +31,7 @@ Source9: 51-lirc.rules
#Patch0: lirc-hw.diff
Patch1: lirc-sockets-in-var.diff
Patch2: lirc-0.8.0-k2.6.18.diff
Patch3: imon2_conf.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: udev
@ -48,6 +49,7 @@ control your computer with a remote control.
#%patch0 -p1 -b .hw
%patch1 -p1 -b .var
#%patch2
%patch3 -p1
cp %{SOURCE8} .
#find . -type d -name CVS -print0 | xargs -0 -- rm -rf
#find . -name .cvsignore -print0 | xargs -0 -- rm -rf
@ -132,6 +134,9 @@ find %{buildroot}/usr/share/lirc -perm +111 -type f -print0 | xargs -r -0 chmod
%{fillup_only}
%changelog
* Mon Apr 23 2007 - hvogel@suse.de
- Add config for imon2 driver with missing keys and pad2key
addidtion from M. Brakemeier
* Tue Jan 16 2007 - lnussel@suse.de
- use optflags
* Thu Jan 11 2007 - lnussel@suse.de